:root {
  --ink: #0f141f;
  --slate: #7a8599;
  --rule: #d0d3d9;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  --display: "Oswald", "Arial Narrow", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #e8e8e8;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.38;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- page sheets (A4) ---------- */
.sheet {
  width: 794px;               /* 210mm @ 96dpi */
  min-height: 1123px;         /* 297mm @ 96dpi */
  margin: 24px auto;
  background: #ffffff;
  padding: 42px 29px;
  box-shadow: 0 2px 18px rgba(0,0,0,0.14);
}

/* ---------- header ---------- */
.header {
  text-align: center;
  /* Wide enough that PDF text extractors cut the page horizontally here and
     emit the name before the sidebar column, rather than reading the sidebar
     first. Below ~40px they treat the whole page as two columns. */
  margin-bottom: 44px;
}

/* Name: the one dominant element on the page, but regular weight (not bold) per direction */
.name {
  font-family: var(--display);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin: 0 0 10px 0;
  color: var(--ink);
  line-height: 1;
}

/* Subtitle: original sets this in the body font (Source Sans), small, non-bold, tracked caps. */
.subtitle {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
  text-align: center;
}

/* ---------- sheet 1 two-column body ---------- */
.sheet1-body {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 8px;
}

/* ---------- sidebar ---------- */
.sidebar { text-align: left; }

.side-sec { margin-bottom: 30px; }

.side-head {
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 9px 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
}

.ring {
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: none;
  box-sizing: border-box;
}

.sidebar p {
  margin: 0 0 6px 0;
  font-size: 12px;
}

.sidebar a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* skills — clean list, no bars */
.skill { margin-bottom: 4px; }

.skill span {
  display: block;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
}

/* ---------- main column / timeline ---------- */
.main {
  position: relative;
  padding-left: 20px;
}

/* No global rail: each section draws its own connector (see .entry/.award/.profile ::after
   below) so the line only ever runs between two dots, never above a section's first dot
   or below its last. Rail center sits at 7px from .main's left edge. */

/* page 2 has no sidebar column, so offset it by the same amount the grid (138px sidebar + 14px gap)
   shifts .main on page 1 — keeps the rail in the same horizontal spot on both pages */
.main-full { padding-left: 24px; margin-left: 152px; }

.sec { margin-bottom: 14px; }

.sec-head {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 4px;
}

/* icon box centered on the rail (masks the line): left = railCenter(7) - mainPadding(24) - width/2(9) */
.sec-icon {
  position: absolute;
  left: -26px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sec-icon img {
  width: 13px;
  height: 13px;
  object-fit: contain;
}

.sec-head h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin: 0;
  color: var(--ink);
}

/* entries with timeline node */
.entry {
  position: relative;
  margin-bottom: 12px;
}

.entry:last-child { margin-bottom: 0; }

.award {
  position: relative;
  margin-bottom: 2px;
}

/* dot centered on the rail: left = railCenter(7) - mainPadding(24) - dot/2(3);
   top aligned to the vertical center of the role/profile line's cap-height */
.timeline .entry::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 6px;
  width: 6px;
  height: 6px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-sizing: border-box;
  z-index: 1;
}

/* One continuous rail from the first dot to the last. Its ends are set by the
   script in index.html so it always starts and stops exactly on a dot. */
.timeline { position: relative; }

.timeline::before {
  content: "";
  position: absolute;
  left: -18px;
  width: 2px;
  background: var(--ink);
  top: var(--rail-top, 0);
  bottom: var(--rail-bottom, 0);
}

.role {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12.5px;
  margin: 0 0 1px 0;
  color: var(--ink);
}

.dates {
  margin: 0 0 2px 0;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  color: var(--slate);
}

.desc {
  margin: 0 0 2px 0;
  font-size: 12.5px;
  line-height: 1.28;
  color: var(--ink);
}

.desc:last-child { margin-bottom: 0; }

.profile {
  position: relative;
  margin: 0;
  font-size: 12.5px;
  font-style: italic;
  line-height: 1.36;
  color: #23282f;
}

/* awards — date sits inline at the end of the line, not on its own row */
.award p {
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.award strong { font-weight: 600; }

.org { font-weight: 600; }

.award .year {
  color: var(--slate);
  font-size: 10.5px;
  white-space: nowrap;
  margin-left: 4px;
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; }
  .sheet {
    box-shadow: none;
    margin: 0;
    width: 100%;
    min-height: 0;
    /* No padding here — the @page margin below applies to EVERY physical page,
       including wherever content naturally splits mid-flow (e.g. mid-Emmy-Awards),
       so there's always real breathing room at the bottom of one page and the top
       of the next. Padding on .sheet itself only ever applied once, at the very
       start/end of the whole document, not at internal page breaks. */
    padding: 0;
  }
  /* No forced break between sheets — let Annie Awards flow immediately after
     wherever Emmy Awards naturally ends, so the page break lands wherever the
     real content runs out rather than always starting Annie on a fresh page
     (which left a near-empty page behind whenever Emmy spilled over). */
  /* Only individual entries/awards are atomic — NOT the whole .sec — so a long
     section (e.g. Emmy Awards) can split across the page boundary instead of the
     entire section jumping to the next page as one block. */
  .entry, .award, .side-sec { break-inside: avoid; }
  .sec-head { break-after: avoid; }
  @page { size: A4; margin: 0.4in 0.3in; }
}

.award-group { margin-top: 8px; }
