/* ─────────────────────────────────────────────────────────────
   Joana Carvalho — Portfolio
   Editorial / technical minimalism. Vanilla CSS, no framework.
   Tokens → Base → Layout → Components → Sections → Responsive
   ───────────────────────────────────────────────────────────── */

/* ============================== TOKENS ============================== */
/* Default: warm cream parchment (light) inspired by the tiger-skin palette.
   Dark theme = deep teal dominant. Both share tiger-orange accent. */
:root {
  --bg:        #efe3c8;
  --bg-2:      #e6d6ad;
  --bg-3:      #d9c89c;
  --fg:        #163d48;          /* deep teal text */
  --fg-muted:  #41616c;
  --fg-dim:    #7c8c91;
  --rule:      #c6b58e;
  --rule-2:    #a89875;
  --accent:    #e8853a;          /* tiger orange */
  --accent-ink: #efe3c8;         /* text on accent */
  --warning:   oklch(0.62 0.18 25);

  /* Type */
  --font-display: "Helvetica Neue", Arial, Helvetica, system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-body:    "Helvetica Neue", Arial, Helvetica, system-ui, sans-serif;

  /* Scale 
  --fz-hero:   clamp(72px, 13vw, 220px);
  --fz-title:  clamp(48px, 7vw, 110px);
  --fz-h3:     clamp(22px, 2.2vw, 30px);
  --fz-lede:   clamp(17px, 1.4vw, 20px);
  --fz-body:   16px;
  --fz-meta:   12px;
  --fz-tiny:   10.5px;
  */

   /* Scale — reduced so "Francisco Pessanha" fits on one line in the hero column */
  --fz-hero:   clamp(70px, 9.5vw, 170px);
  --fz-title:  clamp(48px, 7vw, 110px);
  --fz-h3:     clamp(22px, 2.2vw, 30px);
  --fz-lede:   clamp(17px, 1.4vw, 20px);
  --fz-body:   16px;
  --fz-meta:   12px;
  --fz-tiny:   10.5px;
  

  /* Geometry */
  --max-w:     1440px;
  --gutter:    clamp(20px, 4vw, 64px);
  --rail:      80px;
  --header-h:  68px;

  /* Motion */
  --ease:      cubic-bezier(.2,.7,.2,1);

  /* Pattern: subtle teal brush-strokes on parchment */
  --bg-pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='340' height='340' viewBox='0 0 340 340'><g fill='none' stroke='%23163d48' stroke-width='3' stroke-linecap='round' opacity='0.09'><path d='M-30 60 Q 70 20 170 55 T 380 70'/><path d='M-30 110 Q 80 90 190 110 T 380 100'/><path d='M-30 195 Q 95 165 210 200 T 380 210'/><path d='M-30 265 Q 80 235 200 265 T 380 280'/></g><g fill='none' stroke='%23e8853a' stroke-width='2' stroke-linecap='round' opacity='0.07'><path d='M-30 30 Q 60 50 150 30 T 380 30'/><path d='M-30 145 Q 90 165 200 140 T 380 150'/><path d='M-30 235 Q 80 215 190 235 T 380 230'/><path d='M-30 320 Q 95 295 195 320 T 380 320'/></g></svg>");
}

/* Light theme = the default parchment (kept explicit for the toggle) */
[data-theme="light"] {
  --bg:        #efe3c8;
  --bg-2:      #e6d6ad;
  --bg-3:      #d9c89c;
  --fg:        #163d48;
  --fg-muted:  #41616c;
  --fg-dim:    #7c8c91;
  --rule:      #c6b58e;
  --rule-2:    #a89875;
  --accent:    #e8853a;
  --accent-ink: #efe3c8;
}

/* Dark theme = lighter sea teal body, deep teal cards/chrome for contrast */
[data-theme="dark"] {
  --bg:        #4d8a9b;   /* body — lighter sea teal (kept) */
  --bg-2:      #1f4d59;   /* deep teal — cards/nav stand out */
  --bg-3:      #143b46;   /* deepest — strong contrast surfaces */
  --fg:        #fcf3dd;   /* brighter cream */
  --fg-muted:  #ddc99a;
  --fg-dim:    #082c36;   /* deep teal-ink for tiny labels on light bg */
  --rule:      #19454f;   /* darker for visible separators */
  --rule-2:    #0f3640;
  --accent:    #f49339;   /* slightly brighter tiger orange */
  --accent-ink: #143b46;
  /* Pattern: bolder orange brush-strokes on lighter teal */
  --bg-pattern: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='340' height='340' viewBox='0 0 340 340'><g fill='none' stroke='%23f49339' stroke-width='3' stroke-linecap='round' opacity='0.16'><path d='M-30 60 Q 70 20 170 55 T 380 70'/><path d='M-30 110 Q 80 90 190 110 T 380 100'/><path d='M-30 195 Q 95 165 210 200 T 380 210'/><path d='M-30 265 Q 80 235 200 265 T 380 280'/></g><g fill='none' stroke='%23143b46' stroke-width='2' stroke-linecap='round' opacity='0.10'><path d='M-30 30 Q 60 50 150 30 T 380 30'/><path d='M-30 145 Q 90 165 200 140 T 380 150'/><path d='M-30 235 Q 80 215 190 235 T 380 230'/><path d='M-30 320 Q 95 295 195 320 T 380 320'/></g></svg>");
}

/* ============================== RESET ============================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg);
  background-image: var(--bg-pattern);
  background-attachment: fixed;
  background-size: 340px 340px;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fz-body);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* mono utility */
.mono { font-family: var(--font-mono); font-size: var(--fz-meta); letter-spacing: .04em; text-transform: uppercase; }

/* ============================== HEADER ============================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 0 var(--gutter);
  height: var(--header-h);
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 8px 24px -18px rgba(0,0,0,.4);
  transition: background-color .3s var(--ease), border-color .5s var(--ease);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 28px; height: 28px;
  border: 1px solid var(--rule-2);
  display: grid; place-items: center;
  border-radius: 2px;
  position: relative;
}
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 22%, transparent);
}
.brand-text { display: grid; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-size: 18px; letter-spacing: 0; }
.brand-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .15em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.site-nav {
  justify-self: center;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-2);
}
.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-muted);
  transition: color .25s var(--ease), background-color .25s var(--ease);
  position: relative;
}
.nav-link:hover { color: var(--fg); }
.nav-link.is-active {
  background: var(--fg);
  color: var(--bg);
}
.nav-link.is-active .nav-idx { color: var(--accent); }
.nav-idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--fg-dim);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--fg-muted);
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.theme-toggle:hover { border-color: var(--rule-2); color: var(--fg); }
.tt-track {
  position: relative;
  width: 30px; height: 16px;
  border-radius: 999px;
  background: var(--bg-3);
  display: inline-block;
}
.tt-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  background: var(--fg);
  border-radius: 50%;
  transition: transform .35s var(--ease), background-color .25s var(--ease);
}
[data-theme="light"] .tt-knob { transform: translateX(14px); background: var(--accent); }

/* ============================== LAYOUT  É AQUI QUE SE MUDA AS DISTANCIAS DAS SECTIONS ============================== */
main { display: block; }

.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 50px var(--gutter) 50px;
  position: relative;
}
.section + .section { border-top: 1px solid var(--rule); }

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px 32px;
}

@media (min-width: 900px) {
  .section-grid {
    grid-template-columns: 11fr 5fr;
  }
}

.section-head {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 48px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.section-head--full { margin-bottom: 56px; }
.sh-idx { color: var(--accent); }
.sh-label { color: var(--fg); }
.sh-line {
  height: 1px; background: var(--rule);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fz-title);
  line-height: .92;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
}
.section-lede {
  font-size: var(--fz-lede);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 42ch;
  margin: 0;
  text-wrap: pretty;
}

/* ============================== HERO ============================== */
.section--hero { padding-top: 40px; }

.hero-left {
  display: grid;
  gap: 28px;
  align-content: start;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  width: max-content;
  max-width: 100%;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: oklch(0.78 0.16 145); /* leaf green for "on" */
  box-shadow: 0 0 0 3px color-mix(in oklab, oklch(0.78 0.16 145) 22%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px color-mix(in oklab, oklch(0.78 0.16 145) 22%, transparent); }
  50%      { box-shadow: 0 0 0 5px color-mix(in oklab, oklch(0.78 0.16 145) 10%, transparent); }
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fz-hero);
  line-height: .85;
  letter-spacing: -0.035em;
  margin: 4px 0 0;
  text-wrap: balance;
}
.hero-name .italic { font-style: italic; color: var(--accent); }
.hero-name .name-accent { color: var(--accent); }
.hero-name { max-width: 100%; overflow-wrap: break-word; }

.hero-role {
  font-size: clamp(18px, 1.8vw, 22px);
  margin: 0;
  color: var(--fg);
  max-width: 100ch;
}
.hero-role .role-sep { color: var(--fg-dim); margin: 0 .35em; }

.hero-bio {
  font-size: var(--fz-lede);
  line-height: 1.5;
  color: var(--fg-muted);
  max-width: 50ch;
  margin: 0;
  text-wrap: pretty;
}

.hero-meta {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px dashed var(--rule);
}
.meta-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 16px;
  align-items: baseline;
}
.meta-k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--fg-dim);
  text-transform: uppercase;
}
.meta-v { font-size: 15px; }
.meta-v.link {
  position: relative;
  transition: color .2s var(--ease);
}
.meta-v.link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--fg-dim);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform .35s var(--ease), background-color .25s var(--ease);
}
.meta-v.link:hover { color: var(--accent); }
.meta-v.link:hover::after { background: var(--accent); transform-origin: left; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}
.cv-cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px 18px 26px;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 999px;
  font-weight: 500;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--accent) 30%, transparent),
              0 12px 32px -10px color-mix(in oklab, var(--accent) 60%, transparent);
}
.cv-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 color-mix(in oklab, var(--accent) 30%, transparent),
              0 18px 40px -8px color-mix(in oklab, var(--accent) 60%, transparent);
}
.cv-cta-text { display: inline-grid; line-height: 1.1; }
.cv-cta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .65;
}
.cv-cta-file { font-family: var(--font-display); font-size: 22px; letter-spacing: -.01em; }
.cv-cta-arrow {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent-ink);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 18px;
  transition: transform .3s var(--ease);
}
.cv-cta:hover .cv-cta-arrow { transform: translateY(3px); }

.ghost-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 18px 22px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  font-size: 15px;
  color: var(--fg);
  transition: border-color .25s var(--ease), color .25s var(--ease), gap .25s var(--ease);
}
.ghost-cta:hover { border-color: var(--fg); gap: 14px; }

/* Hero right */
.hero-right {
  display: grid;
  gap: 24px;
  align-content: start;
}

.portrait { display: grid; gap: 12px; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule-2);
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 16px 36px -22px rgba(0,0,0,.55);
}
.portrait-placeholder {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg,
      transparent 0 12px,
      color-mix(in oklab, var(--fg) 4%, transparent) 12px 13px);
}
.portrait-initials {
  font-family: var(--font-display);
  font-size: clamp(110px, 16vw, 220px);
  line-height: 1;
  color: var(--fg);
  letter-spacing: -.04em;
  position: relative;
}
.portrait-caption {
  position: absolute;
  bottom: 12px; left: 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--fg-muted);
}
.portrait-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.pm-k { color: var(--accent); }

.hero-clock {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--rule);
  background: var(--bg-2);
  color: var(--fg);
}
.clock-row {
  display: grid;
  grid-template-columns: 70px 1fr;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--fg);
  text-transform: uppercase;
}
.clock-row > span:first-child { color: var(--fg-dim); }

.scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 64px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .2em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.cue-line {
  width: 80px; height: 1px;
  background: linear-gradient(to right, var(--fg-muted), transparent);
  position: relative;
  overflow: hidden;
}
.cue-line::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  animation: cueShimmer 2.5s infinite linear;
}
@keyframes cueShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ============================== CHIPS / FILTERS ============================== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 13px;
  color: var(--fg-muted);
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease), transform .2s var(--ease);
}
.chip:hover { color: var(--fg); border-color: var(--rule-2); transform: translateY(-1px); }
.chip.is-active {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}
.chip.is-active .chip-glyph { color: var(--accent); }
.chip-glyph {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
}

/* small inline tag for stack */
.tag {
  display: inline-block;
  padding: 3px 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: color-mix(in oklab, var(--bg-2) 50%, transparent);
}

/* ============================== TIMELINE ============================== */
.tl-tools {
  display: grid;
  gap: 18px;
  align-content: start;
  padding-top: 6px;
}
.tl-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.timeline {
  list-style: none;
  margin: 48px 0 0;
  padding: 0;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 1px;
  background: var(--rule);
  transform: translateX(-0.5px);
}

/* Each row: left content | center marker | right content */
.tl-item {
  display: grid;
  grid-template-columns: 1fr 56px 1fr;
  align-items: start;
  padding: 6px 0;
  position: relative;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.tl-item + .tl-item { margin-top: 12px; }
.tl-item.is-hidden { display: none; }

.tl-marker {
  grid-column: 2;
  display: grid;
  place-items: center;
  position: relative;
  padding-top: 10px;
  align-self: start;
}
/* Connector line — child of marker so it is ALWAYS aligned with the dot */
.tl-marker::before {
  content: "";
  position: absolute;
  top: 23.5px;            /* padding-top 10 + dot radius 14 - line half-thickness */
  height: 1px;
  width: 42px;            /* dot edge → card edge */
  background: var(--rule-2);
  pointer-events: none;
}
.tl-item[data-side="left"]  .tl-marker::before { right: 14px; left: auto; }
.tl-item[data-side="right"] .tl-marker::before { left: 14px; right: auto; }
.tl-marker-dot {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  z-index: 1;
  box-shadow: 0 6px 14px -8px rgba(0,0,0,.5);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.tl-item:hover .tl-marker-dot {
  transform: scale(1.12);
  border-color: var(--accent);
}
.tl-item[data-type="education"]   .tl-marker-dot { color: oklch(0.45 0.06 220); }
.tl-item[data-type="experience"]  .tl-marker-dot { color: var(--accent); }
.tl-item[data-type="project"]     .tl-marker-dot { color: oklch(0.55 0.08 60); }
.tl-item[data-type="achievement"] .tl-marker-dot { color: oklch(0.55 0.16 28); }
[data-theme="dark"] .tl-item[data-type="education"]   .tl-marker-dot { color: oklch(0.82 0.06 200); }
[data-theme="dark"] .tl-item[data-type="project"]     .tl-marker-dot { color: oklch(0.86 0.08 70); }
[data-theme="dark"] .tl-item[data-type="achievement"] .tl-marker-dot { color: oklch(0.72 0.16 30); }

.tl-body {
  position: relative;
  display: flex;
}
.tl-item[data-side='left']  .tl-body { grid-column: 1; justify-content: flex-end; padding-right: 28px; }
.tl-item[data-side='right'] .tl-body { grid-column: 3; justify-content: flex-start; padding-left: 28px; }

/* ── Clean single card: logo | content ── */
.tl-card {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: var(--fg);
  text-align: left;
  box-shadow: 0 8px 28px -14px rgba(0,0,0,.35);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.tl-card:hover,
.tl-card:focus-visible {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -16px color-mix(in oklab, var(--accent) 40%, rgba(0,0,0,.35));
  outline: none;
}

/* Logo block */
.tl-card-logo {
  flex: 0 0 90px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-right: 1px solid var(--rule-2);
  padding: 14px 12px;
}
.tl-card-logo img {
  display: block;
  max-width: 66px;
  max-height: 62px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.tl-card-logo-initials {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: -.02em;
  text-align: center;
  line-height: 1;
}

/* Content block */
.tl-card-content {
  flex: 1;
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

/* Meta: date + type badge */
.tl-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 2px;
}
.tl-card-date {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .13em;
  color: var(--accent);
  text-transform: uppercase;
}
.tl-card-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .10em;
  color: var(--fg-dim);
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}

/* Title */
.tl-card-title {
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -.01em;
}

/* Where: org + location */
.tl-card-where {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  margin-top: 3px;
}
.tl-card-org {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.tl-card-loc {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--fg-dim);
}
.tl-card-loc::before {
  content: "\21B3  ";
  color: var(--accent);
  opacity: .7;
}

/* CTA hint */
.tl-card-cta {
  margin-top: auto;
  padding-top: 10px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  align-self: flex-end;
  transition: color .2s var(--ease), letter-spacing .2s var(--ease);
}
.tl-card:hover .tl-card-cta,
.tl-card:focus-visible .tl-card-cta {
  color: var(--accent);
  letter-spacing: .20em;
}

/* Left-side cards: logo on right */
.tl-item[data-side="left"] .tl-card       { flex-direction: row-reverse; }
.tl-item[data-side="left"] .tl-card-logo  { border-right: none; border-left: 1px solid var(--rule-2); }
.tl-item[data-side="left"] .tl-card-cta   { align-self: flex-start; }


/* ============================== FEATURED PROJECTS ============================== */
.featured-grid {
  margin-top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.featured-grid[hidden] { display: none; }

.feat-header {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.feat-header-star { color: var(--accent); }
.feat-header-line { height: 1px; background: var(--rule); }

.feat-card-wrap {
  position: relative;
  overflow: visible;
}

.feat-card {
  display: grid;
  grid-template-columns: 42% 1fr;
  border: 1px solid var(--rule-2);
  border-left: 3px solid var(--accent);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  color: var(--fg);
  box-shadow: 0 12px 36px -20px rgba(0,0,0,.5);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 52px -18px rgba(0,0,0,.55);
  border-color: var(--accent);
}

.feat-thumb {
  position: relative;
  overflow: hidden;
  background: var(--bg-3);
  min-height: 260px;
}
.feat-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.feat-card:hover .feat-thumb img { transform: scale(1.04); }
.feat-thumb .proj-thumb-placeholder { position: absolute; inset: 0; }

.feat-body {
  padding: 32px 28px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.feat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.feat-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 14px;
  border: 1px solid color-mix(in oklab, var(--accent) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent) 8%, transparent);
}
.feat-type {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .10em;
  color: var(--fg-dim);
  text-transform: uppercase;
  padding: 2px 8px;
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.feat-name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
  text-wrap: pretty;
}
.feat-desc {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  max-width: 50ch;
  text-wrap: pretty;
}
.feat-foot {
  display: flex;
  border-top: 1px solid var(--rule);
  margin-top: auto;
}
.feat-foot .proj-link { flex: 0 0 auto; }
.feat-foot .proj-link + .proj-link { border-left: 1px solid var(--rule); }

@media (max-width: 720px) {
  .feat-card { grid-template-columns: 1fr; }
  .feat-thumb { min-height: 200px; max-height: 260px; }
  .feat-body { padding: 22px 18px 0; gap: 10px; }
}

/* ============================== PROJECTS ============================== */
.proj-tools { padding-top: 6px; }

.proj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 56px;
}
@media (min-width: 720px) {
  .proj-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1180px) {
  .proj-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Overflow drawer — cards 4+ hidden until "View all" */
.proj-overflow {
  display: none;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
  gap: 32px;
}
.proj-overflow.is-open { display: grid; }
@media (min-width: 720px) {
  .proj-overflow { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1180px) {
  .proj-overflow { grid-template-columns: repeat(3, 1fr); }
}

/* View all button */
.proj-view-all-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}
.proj-view-all-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 10px 28px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.proj-view-all-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}

.proj-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  border: 1px solid var(--rule-2);
  background: var(--bg-2);
  color: var(--fg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 12px 30px -20px rgba(0,0,0,.5);
  transition: border-color .3s var(--ease), transform .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.proj-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 18px 38px -16px rgba(0,0,0,.55);
}
.proj-card.is-hidden { display: none; }

.proj-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-3);
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.proj-thumb-placeholder {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg,
      transparent 0 14px,
      color-mix(in oklab, var(--fg) 5%, transparent) 14px 15px);
  display: grid; place-items: center;
}
.proj-thumb-label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--fg-muted);
  text-transform: uppercase;
  background: var(--bg-2);
  padding: 4px 10px;
  border: 1px solid var(--rule);
}
.proj-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.proj-card:hover .proj-thumb img { transform: scale(1.04); }

.proj-meta-top {
  position: absolute;
  top: 12px; left: 12px; right: 12px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--fg);
  text-transform: uppercase;
  z-index: 2;
}
.proj-id { color: var(--accent); background: var(--bg); padding: 3px 8px; border: 1px solid var(--rule); }
.proj-type { color: var(--fg-muted); background: var(--bg); padding: 3px 8px; border: 1px solid var(--rule); }

.proj-body { padding: 24px 22px 6px; display: grid; gap: 10px; }
.proj-name {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.01em;
}
.proj-desc {
  color: var(--fg-muted);
  margin: 0;
  text-wrap: pretty;
}
.proj-stack { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.proj-foot {
  display: flex;
  border-top: 1px solid var(--rule);
  margin-top: 22px;
}
.proj-link {
  flex: 1;
  padding: 16px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--fg-muted);
  text-transform: uppercase;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.proj-link + .proj-link { border-left: 1px solid var(--rule); }
.proj-link:hover { color: var(--accent); background: color-mix(in oklab, var(--accent) 6%, transparent); }
.proj-link.is-disabled { opacity: .35; pointer-events: none; }

/* ============================== SKILLS ============================== */
.skills-meta { display: grid; gap: 10px; padding-top: 6px; align-content: start; }

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  margin-top: 64px;
}
@media (min-width: 800px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); column-gap: 64px; }
}

.skill-cat {
  display: grid;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}
.skill-cat-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.skill-cat-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -.01em;
  margin: 0;
}
.skill-cat-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .14em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

.skill-list { display: grid; gap: 14px; }

.skill-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}
.skill-name {
  font-size: 15px;
}
.skill-level {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--fg-muted);
  text-transform: uppercase;
}
.skill-bar {
  grid-column: 1 / -1;
  height: 2px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}
.skill-fill {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: var(--fg);
  width: 0;
  transition: width 1.1s var(--ease);
}
.skill-row:hover .skill-fill { background: var(--accent); }

/* Tag style for soft skills / languages */
.skill-list--tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.skill-list--tags .skill-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  font-size: 14px;
  color: var(--fg);
  transition: border-color .2s var(--ease), color .2s var(--ease);
}
.skill-list--tags .skill-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.skill-pill-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--fg-dim);
}

/* ============================== FOOTER ============================== */
.site-footer {
  margin-top: 64px;
  padding: 0 var(--gutter) 32px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
}
.footer-rule {
  height: 1px;
  background: var(--rule);
  margin-bottom: 56px;
  position: relative;
}
.footer-rule::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 60px; height: 1px; background: var(--accent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px 24px;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .foot-col--brand { grid-row: 1; }
  .foot-col--colophon { grid-column: 1 / 3; grid-row: 2; }
  .foot-col--copy {
    grid-column: 3 / 5;
    grid-row: 2;
    text-align: right;
    align-self: end;
  }
}
.foot-name {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1;
  letter-spacing: -.01em;
}
.foot-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--fg-muted);
  margin-top: 8px;
  text-transform: uppercase;
}
.foot-k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--fg-dim);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.foot-v { font-size: 14px; color: var(--fg-muted); max-width: 38ch; }
.foot-link {
  display: block;
  font-size: 14px;
  color: var(--fg);
  padding: 2px 0;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.foot-link:hover { color: var(--accent); transform: translateX(3px); }

.foot-copy {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  color: var(--fg-muted);
  text-transform: uppercase;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.foot-sep { color: var(--fg-dim); }
.foot-top {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--fg);
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-2);
  padding-bottom: 2px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.foot-top:hover { color: var(--accent); border-color: var(--accent); }

/* ============================== MODAL ============================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s var(--ease);
}
.modal.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in oklab, #0a0a08 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal-shell {
  position: relative;
  width: min(480px, 100%);
  background: var(--bg);
  border: 1px solid var(--rule-2);
  border-radius: 6px;
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.4);
  padding: 32px 36px 30px;
  transform: translateY(12px) scale(.985);
  transition: transform .3s var(--ease);
}
.modal.is-open .modal-shell { transform: none; }

.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 22px;
  line-height: 1;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: var(--bg);
  transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.modal-close:hover { color: var(--accent); border-color: var(--accent); transform: rotate(90deg); }

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 28px 10px 0;
  text-wrap: pretty;
}
/* Modal logo — shown when timeline item has a `logo` field */
.modal-logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.modal-logo[hidden] { display: none; }
.modal-logo img {
  max-width: 140px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.modal-date {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.modal-desc {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--fg-muted);
  text-wrap: pretty;
}

.modal-highlights-wrap {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.modal-highlights-label {
  font-family: var(--font-mono);
  font-size: var(--fz-tiny);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 10px;
}
.modal-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-highlights li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 14.5px;
  color: var(--fg);
  line-height: 1.5;
}
.modal-highlights li::before {
  content: "→";
  flex-shrink: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
}

body.modal-open { overflow: hidden; }

/* Modal org + location row */
.modal-org-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 14px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-2);
  border-radius: 6px;
  border: 1px solid var(--rule);
}
.modal-org-wrap[hidden] { display: none; }
.modal-org {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.modal-loc {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--fg-dim);
}
.modal-loc::before {
  content: "↳ ";
  color: var(--accent);
}

@media (max-width: 520px) {
  .modal-shell { padding: 26px 24px 26px; }
  .modal-title { font-size: 24px; }
}


/* ============================== PROJECT CARD (clickable) ============================== */
.proj-card { cursor: pointer; }
.proj-card:hover { border-color: var(--rule-2); }

/* ── First-visit "click me" hint ── */
.section--projects.has-proj-hint .proj-grid { padding-top: 88px; }

.proj-hint {
  position: absolute;
  bottom: calc(100% + 24px);
  left: 20px;
  display: flex;
  align-items: flex-end;
  gap: 15px;
  pointer-events: none;
  z-index: 30;
  white-space: nowrap;
  animation: proj-hint-bob 2.6s ease-in-out infinite;
  transition: opacity .5s ease;
}
.proj-hint.is-gone { opacity: 0; }

.proj-hint-label {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 6px;
}
.proj-hint-arrow {
  color: var(--accent);
  flex-shrink: 0;
  opacity: .9;
}

@keyframes proj-hint-bob {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}



/* ============================== BLOG CONTENT BLOCKS (used in project.html) ============================== */
.blog-h {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 28px);
  line-height: 1.15;
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.blog-h:first-child { margin-top: 0; }

.blog-text {
  color: var(--fg-muted);
  font-size: 15.5px;
  line-height: 1.75;
  margin: 20px 0;
}
.blog-text:first-child { margin-top: 0; }
.blog-text p { margin: 0 0 14px; }
.blog-text p:last-child { margin-bottom: 0; }
.blog-text strong { color: var(--fg); font-weight: 600; }
.blog-text a { color: var(--accent); text-decoration: underline; }

.blog-row {
  display: grid;
  gap: 16px;
  align-items: start;
  margin: 32px 0;
}
.blog-row .blog-figure,
.blog-row .blog-video-wrap {
  margin: 0;
}
@media (max-width: 600px) {
  .blog-row { grid-template-columns: 1fr !important; }
}

.blog-figure {
  margin: 32px 0;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.blog-figure img {
  width: 100%;
  display: block;
  max-height: 500px;
  object-fit: contain;
  background: var(--bg-2);
}
.blog-figure figcaption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
}

.blog-video-wrap {
  margin: 32px 0;
  border: 1px solid var(--rule);
  overflow: hidden;
}
.blog-video-ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}
.blog-video-ratio iframe {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.blog-video-caption {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 10px 16px;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.blog-link-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
  margin: 10px 10px 0 0;
}
.blog-link-block:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: color-mix(in oklab, var(--accent) 6%, transparent);
}

/* ============================== REVEAL ============================== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-dot { animation: none; }
  .cue-line::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 899px) {
  :root { --rail: 56px; --header-h: 60px; }
  .section { padding: 64px var(--gutter) 80px; }
  .section--hero { padding-top: 32px; }
  .section-head { margin-bottom: 32px; }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    overflow-x: auto;
    justify-content: flex-start;
    width: 100%;
    border: 0;
    background: none;
    padding: 0 0 12px;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
    gap: 2px;
    scrollbar-width: none;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .nav-link { padding: 6px 10px; flex: 0 0 auto; }
  .site-header {
    height: auto;
    padding-top: 14px;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 16px;
  }
  .brand-meta { display: none; }
  .theme-toggle .tt-label { display: none; }
  .theme-toggle { padding: 6px; }

  .hero-meta .meta-row { grid-template-columns: 70px 1fr; gap: 12px; }
  .cv-cta { padding: 14px 16px 14px 20px; gap: 14px; }
  .cv-cta-arrow { width: 32px; height: 32px; }
  .ghost-cta { padding: 14px 18px; }

  .timeline { margin-top: 40px; }
  .timeline::before { left: 20px; transform: none; }
  .tl-item {
    grid-template-columns: 40px 1fr;
    gap: 0;
    padding: 16px 0;
  }
  .tl-marker { grid-column: 1 !important; padding-top: 8px; }
  .tl-item[data-side="left"]  .tl-body,
  .tl-item[data-side="right"] .tl-body {
    grid-column: 2;
    padding-left: 16px;
    padding-right: 0;
    justify-content: flex-start;
  }
  .tl-item[data-side="left"]  .tl-body::before,
  .tl-item[data-side="right"] .tl-body::before {
    display: none;
  }
  .tl-item[data-side="left"]  .tl-marker::before,
  .tl-item[data-side="right"] .tl-marker::before {
    left: 100%; right: auto; width: 16px;
  }
  .tl-item[data-side="left"]  .tl-card,
  .tl-item[data-side="right"] .tl-card { max-width: none; border-radius: 10px; }
  .tl-item[data-side="left"]  .tl-card      { flex-direction: row; }
  .tl-item[data-side="left"]  .tl-card-logo { border-right: 1px solid var(--rule-2); border-left: none; }
  .tl-item[data-side="left"]  .tl-card-cta  { align-self: flex-end; }
  .tl-date { font-size: 10.5px; }
  .scroll-cue { margin-top: 40px; }
  .portrait-frame { aspect-ratio: 5 / 6; }
}

@media (max-width: 520px) {
  :root { --gutter: 18px; --rail: 48px; }
  .site-nav { gap: 0; }
  .nav-link { font-size: 12px; gap: 4px; }
  .meta-row { grid-template-columns: 64px 1fr; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .cv-cta, .hero-actions .ghost-cta { justify-content: space-between; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .foot-col--brand { grid-column: 1 / -1; }
  .foot-col--colophon { grid-column: 1 / -1; }
  .foot-col--copy { grid-column: 1 / -1; text-align: left; }
  .foot-copy { justify-content: flex-start; }
}
