/* ==========================================================================
   Navdeep Singh — portfolio stylesheet
   Sections: 1 Fonts · 2 Tokens · 3 Base · 4 Layout · 5 Header · 6 Buttons
   7 Hero · 8 Snapshot · 9 Sections · 10 Projects · 11 Credentials
   12 Experience · 13 Education · 14 Skills · 15 Contact · 16 Footer
   17 Case studies · 18 Motion · 19 Utilities
   ========================================================================== */

/* 1. Fonts (self-hosted, subset) ----------------------------------------- */
@font-face { font-family: "Pagella"; src: url("../fonts/pagella-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Pagella"; src: url("../fonts/pagella-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-display: swap; }

/* 2. Tokens --------------------------------------------------------------- */
:root {
  --paper: #F3F1EC;
  --paper-2: #EAE6DE;
  --paper-3: #FBFAF7;
  --ink: #17191D;
  --ink-2: #3A3E45;
  --muted: #61656C;
  --rule: #D5CFC4;
  --rule-strong: #A9A196;
  --field: #857E73;
  --navy: #172A4A;
  --accent: #2C4F8E;
  --accent-soft: #DCE3EF;
  --on-navy: #F3F1EC;
  --ok: #2C4F8E;
  --error: #9B2C2C;

  --serif: "Pagella", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1320px;
  --gutter: clamp(20px, 4.2vw, 56px);
  --gap: clamp(16px, 2vw, 28px);
  --section: clamp(88px, 11vw, 160px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #111316; --paper-2: #181B1F; --paper-3: #15181B;
    --ink: #ECE8E1; --ink-2: #CBC6BE; --muted: #9B9FA6;
    --rule: #2B2F35; --rule-strong: #4A4F57; --field: #6B717B;
    --navy: #C9D5EC; --accent: #93B1E6; --accent-soft: #1E2A3D;
    --on-navy: #111316; --ok: #93B1E6; --error: #F0A3A3;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #111316; --paper-2: #181B1F; --paper-3: #15181B;
  --ink: #ECE8E1; --ink-2: #CBC6BE; --muted: #9B9FA6;
  --rule: #2B2F35; --rule-strong: #4A4F57; --field: #6B717B;
  --navy: #C9D5EC; --accent: #93B1E6; --accent-soft: #1E2A3D;
  --on-navy: #111316; --ok: #93B1E6; --error: #F0A3A3;
  color-scheme: dark;
}

/* 3. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-feature-settings: "kern", "calt", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, picture { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-color: var(--accent); }
::selection { background: var(--accent-soft); color: var(--ink); }

:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: var(--on-navy); padding: 10px 16px;
  font-weight: 500; text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 4. Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }

/* 5. Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  background: var(--navy); color: var(--on-navy);
  font-family: var(--serif); font-size: 15px; letter-spacing: .02em; line-height: 1;
  padding-top: 1px;
}
.brand-name { font-family: var(--serif); font-size: 1.25rem; letter-spacing: .005em; white-space: nowrap; }

.nav ul { display: flex; gap: clamp(18px, 2.4vw, 34px); list-style: none; margin: 0; padding: 0; }
.nav a {
  position: relative; display: inline-block; padding: 10px 0;
  font-size: .9375rem; color: var(--ink-2); text-decoration: none;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px;
  background: var(--ink); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }
.nav a[aria-current="true"] { color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.btn-resume {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px;
  border: 1px solid var(--ink); color: var(--ink); text-decoration: none;
  font-size: .9375rem; font-weight: 500; transition: background .25s, color .25s;
}
.btn-resume:hover { background: var(--ink); color: var(--paper); }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.theme-icon-dark { display: none; }
[data-theme-resolved="dark"] .theme-icon-dark { display: block; }
[data-theme-resolved="dark"] .theme-icon-light { display: none; }

.menu-toggle { display: none; }
.mobile-menu { display: none; }

@media (max-width: 899px) {
  .nav, .header-actions .btn-resume { display: none; }
  .menu-toggle { display: grid; }
  .mobile-menu {
    display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--paper); padding: 24px var(--gutter) 40px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s linear .3s;
  }
  .mobile-menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .mobile-menu ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
  .mobile-menu li { border-bottom: 1px solid var(--rule); }
  .mobile-menu a.mm-link {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 18px 0; font-family: var(--serif); font-size: 2rem; text-decoration: none; line-height: 1.2;
  }
  .mobile-menu .mm-num { font-family: var(--sans); font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
  .mobile-menu .mm-foot { margin-top: 32px; display: grid; gap: 12px; }
  body.menu-open { overflow: hidden; }
}

/* 6. Buttons & links ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 500 1rem/1 var(--sans); letter-spacing: .005em; text-decoration: none;
  border: 1px solid var(--navy); cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn-primary { background: var(--navy); color: var(--on-navy); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn-secondary { background: transparent; color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--on-navy); }
.btn svg { width: 16px; height: 16px; flex: none; }

.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong);
}
.text-link:hover { text-decoration-color: var(--accent); }
.text-link svg { width: 16px; height: 16px; }

/* 7. Hero ----------------------------------------------------------------- */
.hero { padding-top: clamp(28px, 5vw, 72px); }
.hero-grid { align-items: start; row-gap: 40px; }
.hero-text { grid-column: 1 / span 7; padding-top: clamp(8px, 2vw, 32px); }
.hero-role { font-size: .9375rem; color: var(--ink-2); letter-spacing: .01em; }
.hero-name {
  margin-top: clamp(20px, 3vw, 36px);
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(3.75rem, 11.6vw, 10.75rem);
  line-height: .9; letter-spacing: -.028em;
  margin-left: -.04em;
}
.hero-name span { display: block; }
.hero-name span + span { padding-left: clamp(.6em, 9vw, 1.35em); }
.hero-lede {
  margin-top: clamp(28px, 4vw, 52px); max-width: 26ch; text-wrap: balance;
  font-family: var(--serif); font-size: clamp(1.625rem, 2.6vw, 2.25rem); line-height: 1.18; letter-spacing: -.008em;
}
.hero-copy { margin-top: 20px; max-width: 54ch; color: var(--ink-2); font-size: 1.0625rem; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.hero-actions .text-link { margin-left: 8px; }

.hero-portrait { grid-column: 9 / span 4; position: relative; }
.portrait-frame { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-2); }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 30%; }
.hero-portrait::before {
  /* mounted-photo offset rule, sized to the photo only */
  content: ""; position: absolute; top: 14px; left: 14px; width: 100%; aspect-ratio: 3 / 4; border: 1px solid var(--rule-strong); z-index: -1;
}
.hero-portrait figcaption {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 28px; font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

@media (max-width: 1099px) {
  .hero-text { grid-column: 1 / span 7; }
  .hero-portrait { grid-column: 8 / span 5; margin-top: 12px; }
  .hero-portrait figcaption { flex-direction: column; gap: 2px; }
  .hero-portrait::before { left: 10px; top: 10px; }
}
@media (max-width: 767px) {
  .hero-grid { display: flex; flex-direction: column; row-gap: 0; }
  .hero-portrait::before { aspect-ratio: 4 / 5; }
  .hero-portrait figcaption { flex-direction: column; gap: 2px; }
  .hero-text { display: contents; }
  .hero-role { order: 1; }
  .hero-name { order: 2; font-size: clamp(3.4rem, 18.5vw, 6rem); margin-top: 14px; }
  .hero-portrait { margin-top: 32px !important; }
  .hero-portrait { order: 3; width: calc(100% - 14px); margin-top: 8px; }
  .portrait-frame { aspect-ratio: 4 / 5; }
  .hero-lede { order: 4; margin-top: 36px; }
  .hero-copy { order: 5; }
  .hero-actions { order: 6; }
  .hero-portrait figcaption { margin-top: 24px; }
}

/* 8. Snapshot (statement row) --------------------------------------------- */
.snapshot { margin-top: clamp(64px, 9vw, 120px); }
.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  /* accountant's double rule under the "total" line */
  border-bottom: 3px double var(--ink);
}
.fact { padding: 24px clamp(14px, 2vw, 28px) 26px; border-left: 1px solid var(--rule); display: flex; flex-direction: column; gap: 6px; }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact dt { order: 2; font-size: .875rem; color: var(--muted); line-height: 1.4; }
.fact dd {
  order: 1; font-family: var(--serif); font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1;
  letter-spacing: -.01em; font-variant-numeric: lining-nums tabular-nums;
}
.fact dd small { font-size: .5em; letter-spacing: 0; margin-left: .2em; color: var(--ink-2); }
@media (max-width: 767px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact { padding: 20px 16px; }
  .fact:nth-child(odd) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* 9. Section scaffolding -------------------------------------------------- */
.section { padding-top: var(--section); }
.section-head { grid-column: 1 / span 4; }
.section-body { grid-column: 5 / span 8; }
.section-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(2.25rem, 4.2vw, 3.5rem);
  line-height: 1.02; letter-spacing: -.018em;
}
.section-note { margin-top: 16px; max-width: 30ch; font-size: .9375rem; color: var(--muted); }
.section-rule { grid-column: 1 / -1; height: 1px; background: var(--rule); margin-bottom: clamp(28px, 4vw, 48px); }
@media (min-width: 1024px) {
  .section-head .sticky { position: sticky; top: calc(var(--header-h) + 32px); }
}
@media (max-width: 1023px) {
  .section-head, .section-body { grid-column: 1 / -1; }
  .section-head { margin-bottom: 32px; }
}

.lead { font-family: var(--serif); font-size: clamp(1.5rem, 2.3vw, 2rem); line-height: 1.28; letter-spacing: -.006em; max-width: 30ch; }
.prose { max-width: 62ch; color: var(--ink-2); }
.prose p + p { margin-top: 1.05em; }
.prose strong { color: var(--ink); font-weight: 500; }

/* About */
.about-body .prose { margin-top: 32px; }
.about-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px var(--gap); margin-top: 32px; max-width: none; }
@media (max-width: 767px) { .about-cols { grid-template-columns: 1fr; } }

/* 10. Projects ------------------------------------------------------------ */
.projects { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.project {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 64px); padding: clamp(32px, 4vw, 56px) 0; border-bottom: 1px solid var(--rule);
}
.project-num { font-family: var(--serif); font-size: 1.125rem; color: var(--muted); font-variant-numeric: lining-nums; }
.project-area { margin-top: 2px; font-size: .9375rem; color: var(--ink-2); }
.project-title {
  margin-top: 20px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.875rem, 3vw, 2.625rem); line-height: 1.08; letter-spacing: -.014em;
}
.project-title a { text-decoration: none; }
.project-title a::after { content: ""; position: absolute; inset: 0; z-index: 2; }
.project-title a:focus-visible { outline: none; }
.project:has(.project-title a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 6px; }
.project-sub { margin-top: 10px; color: var(--muted); font-size: .9375rem; }
.project-summary { margin-top: 18px; max-width: 48ch; color: var(--ink-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 24px 0 0; padding: 0; list-style: none; }
.tags li {
  font-size: .8125rem; line-height: 1; padding: 8px 10px; border: 1px solid var(--rule-strong);
  color: var(--ink-2); font-variant-numeric: lining-nums;
}
.project-cta {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 28px;
  font-weight: 500; border-bottom: 1px solid var(--ink); padding-bottom: 4px;
}
.project-cta svg { width: 16px; height: 16px; transition: transform .35s var(--ease); }
.project:hover .project-cta svg { transform: translateX(4px); }
.project-meta-line { display: flex; gap: 14px; align-items: baseline; }

.project-visual { position: relative; min-height: 340px; background: var(--paper-2); overflow: hidden; container-type: inline-size; }
@media (max-width: 899px) {
  .project { grid-template-columns: 1fr; }
  .project-visual { order: -1; min-height: 280px; }
}

/* Visual: tax form stack — cascaded like a file, each header peeking out */
.formstack { position: absolute; inset: 0; }
.sheet {
  --i: 0;
  position: absolute; left: 50%; top: 50%; width: 52%; aspect-ratio: 8.5 / 11;
  background: var(--paper-3); border: 1px solid var(--rule-strong);
  padding: 3.5% 6% 5%; display: flex; flex-direction: column; gap: 7%;
  transform: translate(calc(-50% + (var(--i) - 2) * 8cqi), calc(-50% + (var(--i) - 2) * 10cqi));
  transition: transform .6s var(--ease);
}
.sheet:nth-child(1) { --i: 0; } .sheet:nth-child(2) { --i: 1; } .sheet:nth-child(3) { --i: 2; }
.sheet:nth-child(4) { --i: 3; } .sheet:nth-child(5) { --i: 4; }
.project:hover .sheet { transform: translate(calc(-50% + (var(--i) - 2) * 9cqi), calc(-50% + (var(--i) - 2) * 11cqi)); }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--ink); padding-bottom: 4%; gap: 8px; }
.sheet-head b { font-family: var(--serif); font-weight: 400; font-size: clamp(.75rem, 4.2cqi, 1.05rem); color: var(--ink); white-space: nowrap; }
.sheet-head span { font-size: clamp(.5625rem, 2.6cqi, .6875rem); color: var(--muted); font-variant-numeric: tabular-nums; }
.sheet i { display: block; height: 1px; background: var(--rule); flex: none; }
.sheet i.w { margin-right: 38%; }
.sheet i.box { height: 9%; max-height: 14px; border: 1px solid var(--rule); background: none; margin-left: 62%; }

/* Visual: audit risk model */
.riskmodel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(20px, 7cqi, 44px); }
.rm-eq { display: grid; grid-template-columns: repeat(7, auto); align-items: end; justify-content: space-between; column-gap: 4px; }
.rm-term { display: flex; flex-direction: column; gap: 10px; }
.rm-term b { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.75rem, 12cqi, 4.5rem); line-height: .9; color: var(--ink); }
.rm-term span { font-size: .75rem; color: var(--muted); line-height: 1.2; border-top: 1px solid var(--rule-strong); padding-top: 8px; }
.rm-op { font-family: var(--serif); font-size: clamp(1.125rem, 5.5cqi, 2.2rem); color: var(--muted); padding-bottom: 34px; }
.rm-term.is-ar b { color: var(--accent); }
.rm-list { margin-top: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid var(--rule); padding-top: 16px; }
.rm-list p { font-size: clamp(.75rem, 3cqi, .875rem); color: var(--ink-2); line-height: 1.45; }
.rm-list p b { display: block; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.project:hover .rm-term b { transform: translateY(-2px); }
.rm-term b { transition: transform .5s var(--ease); }
@media (max-width: 520px) {
  .rm-list { grid-template-columns: 1fr; gap: 8px; }
  .rm-term span { font-size: .6875rem; }
  .rm-op { padding-bottom: 30px; }
}

/* 11. Credential path ----------------------------------------------------- */
.ea { border-top: 1px solid var(--ink); }
.ea-head { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.ea-head h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; }
.ea-head p { font-size: .875rem; color: var(--muted); }
.ea-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.ea-part { position: relative; padding: 28px 24px 30px 0; border-right: 1px solid var(--rule); }
.ea-part + .ea-part { padding-left: 24px; }
.ea-part:last-child { border-right: 0; }
.ea-track { position: absolute; left: 0; right: 0; top: -1px; height: 3px; background: transparent; }
.ea-part.is-done .ea-track { background: var(--navy); }
.ea-part.is-current .ea-track { background: linear-gradient(90deg, var(--navy) 50%, transparent 50%); }
.ea-num { font-family: var(--serif); font-size: 1rem; color: var(--muted); font-variant-numeric: lining-nums; }
.ea-name { margin-top: 18px; font-family: var(--serif); font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.15; }
.ea-status { margin-top: 22px; display: inline-flex; align-items: center; gap: 10px; font-size: .9375rem; font-weight: 500; }
.ea-status svg { width: 22px; height: 22px; flex: none; }
.ea-part.is-upcoming .ea-status { color: var(--muted); font-weight: 400; }
.ea-parts { border-bottom: 1px solid var(--rule); }
.ea-foot { padding-top: 18px; font-size: .875rem; color: var(--muted); max-width: 70ch; }
@media (max-width: 767px) {
  .ea-parts { grid-template-columns: 1fr; }
  .ea-part, .ea-part + .ea-part { padding: 22px 0 24px; border-right: 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; }
  .ea-part:last-child { border-bottom: 0; }
  .ea-num { grid-row: 1 / span 2; }
  .ea-name { margin-top: 0; }
  .ea-status { margin-top: 10px; grid-column: 2; }
  .ea-head { flex-direction: column; gap: 4px; }
}

.timeline { list-style: none; margin: clamp(48px, 6vw, 72px) 0 0; padding: 0; position: relative; }
.timeline-title { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-top: clamp(56px, 7vw, 88px); padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.timeline { margin-top: 0; }
.tl-item { display: grid; grid-template-columns: 9.5rem 28px minmax(0, 1fr); column-gap: 18px; position: relative; }
.tl-when { padding: 22px 0; font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-mark { position: relative; display: flex; justify-content: center; }
.tl-mark::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); }
.tl-mark::after {
  content: ""; position: absolute; top: 0; width: 1px; height: 0; background: var(--navy);
  transition: height 1s var(--ease);
}
.tl-item.is-done .tl-mark::after { height: 100%; }
.tl-item.is-current .tl-mark::after { height: 34px; }
.tl-item:first-child .tl-mark::before, .tl-item:first-child .tl-mark::after { top: 30px; }
.tl-item:last-child .tl-mark::before { bottom: auto; height: 30px; }
.tl-dot { position: relative; z-index: 1; margin-top: 26px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--rule-strong); background: var(--paper); }
.tl-item.is-done .tl-dot { background: var(--navy); border-color: var(--navy); }
.tl-item.is-current .tl-dot { border: 1px solid var(--navy); background: linear-gradient(90deg, var(--navy) 50%, var(--paper) 50%); }
.tl-item.is-goal .tl-dot { border-radius: 0; transform: rotate(45deg); border-color: var(--navy); }
.tl-what { padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.tl-what h4 { font-weight: 500; font-size: 1.0625rem; line-height: 1.4; }
.tl-what p { font-size: .9375rem; color: var(--muted); margin-top: 2px; }
.tl-state { font-size: .75rem; letter-spacing: .02em; color: var(--muted); margin-left: 8px; font-weight: 400; white-space: nowrap; }
.tl-item.is-current .tl-state { color: var(--accent); }
@media (max-width: 600px) {
  .tl-item { grid-template-columns: 22px minmax(0, 1fr); column-gap: 14px; }
  .tl-when { grid-column: 2; grid-row: 1; padding: 20px 0 0; }
  .tl-mark { grid-column: 1; grid-row: 1 / span 2; }
  .tl-what { grid-column: 2; padding-top: 2px; }
  .tl-dot { margin-top: 24px; width: 12px; height: 12px; }
  .tl-item:first-child .tl-mark::before, .tl-item:first-child .tl-mark::after { top: 28px; }
}

/* 12. Experience ---------------------------------------------------------- */
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.role { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 8px var(--gap); padding: 32px 0 36px; border-bottom: 1px solid var(--rule); }
.role-when { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; line-height: 1.5; padding-top: 6px; }
.role-title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.2vw, 1.875rem); line-height: 1.15; }
.role-org { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); }
.role-desc { margin-top: 16px; max-width: 60ch; color: var(--ink-2); }
.role-skills { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px 18px; list-style: none; padding: 0; font-size: .875rem; color: var(--ink-2); }
.role-skills li::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--rule-strong); margin-right: 8px; vertical-align: middle; }
.role-label { margin-top: 22px; font-size: .8125rem; color: var(--muted); }
.role-label + .role-skills { margin-top: 8px; }
@media (max-width: 640px) { .role { grid-template-columns: 1fr; } .role-when { padding-top: 0; } }

/* 13. Education ----------------------------------------------------------- */
.school { border-top: 1px solid var(--ink); padding-top: 28px; }
.school + .school { margin-top: 48px; }
.school-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px 32px; flex-wrap: wrap; }
.school h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.school-when { font-size: .875rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.school-degree { margin-top: 8px; color: var(--ink-2); }
.school-gpa { margin-top: 24px; display: flex; align-items: baseline; gap: 14px; }
.school-gpa b { font-family: var(--serif); font-weight: 400; font-size: 2.5rem; line-height: 1; font-variant-numeric: lining-nums; }
.school-gpa span { font-size: .875rem; color: var(--muted); }

.courses { width: 100%; margin-top: 32px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.courses caption { text-align: left; font-size: .875rem; color: var(--muted); padding-bottom: 10px; }
.courses th, .courses td { text-align: left; padding: 13px 12px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline; }
.courses thead th { font-weight: 500; font-size: .8125rem; color: var(--muted); border-bottom-color: var(--ink); }
.courses td:first-child { color: var(--muted); font-size: .875rem; width: 6.5rem; white-space: nowrap; }
.courses td.status { text-align: right; white-space: nowrap; font-size: .875rem; padding-right: 0; }
.courses th.status { text-align: right; padding-right: 0; }
.status-done { color: var(--ink-2); }
.status-now { color: var(--accent); }
@media (max-width: 520px) {
  .courses td:first-child { display: none; }
  .courses thead th:first-child { display: none; }
}

/* 14. Skills -------------------------------------------------------------- */
.skills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--ink); }
.skill-group { padding: 26px 0 30px; border-bottom: 1px solid var(--rule); }
.skill-group h3 { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; }
.skill-group ul { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 7px; }
.skill-group li { color: var(--ink-2); font-size: .9688rem; line-height: 1.45; }
.skill-group li small { color: var(--muted); font-size: .8125rem; }
@media (max-width: 640px) { .skills { grid-template-columns: 1fr; } }

/* 15. Contact ------------------------------------------------------------- */
.contact { padding-bottom: var(--section); }
.contact-title { font-family: var(--serif); font-weight: 400; font-size: clamp(3.25rem, 8vw, 7rem); line-height: .95; letter-spacing: -.025em; }
.contact-intro { margin-top: 28px; max-width: 46ch; color: var(--ink-2); font-size: 1.125rem; }
.contact-direct { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.contact-direct li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.contact-direct span { font-size: .875rem; color: var(--muted); }
.contact-direct a { word-break: break-word; text-decoration-color: var(--rule-strong); }
.contact-left { grid-column: 1 / span 6; }
.contact-right { grid-column: 8 / span 5; padding-top: clamp(8px, 2vw, 20px); }
@media (max-width: 1023px) {
  .contact-left, .contact-right { grid-column: 1 / -1; }
  .contact-right { margin-top: 56px; }
}

.form { display: grid; gap: 22px; }
.form-title { font-family: var(--serif); font-size: 1.5rem; padding-bottom: 14px; border-bottom: 1px solid var(--ink); }
.field { display: grid; gap: 8px; }
.field label { font-size: .875rem; font-weight: 500; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper-3); border: 1px solid var(--field); border-radius: 0;
  padding: 13px 14px; min-height: 48px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.5; }
.field input:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { font-size: .8125rem; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-actions .btn { min-width: 180px; }
.form-actions .btn[disabled] { opacity: .6; cursor: progress; }
.form-privacy { font-size: .8125rem; color: var(--muted); max-width: 40ch; }
.form-status { font-size: .9375rem; padding: 14px 16px; border-left: 3px solid var(--rule-strong); background: var(--paper-2); }
.form-status:empty { display: none; }
.form-status.is-success { border-left-color: var(--ok); }
.form-status.is-error { border-left-color: var(--error); }
.form-status a { font-weight: 500; }

/* 16. Footer -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--rule); padding: 40px 0 48px; font-size: .875rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px 48px; flex-wrap: wrap; }
.footer-name { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); }
.footer-note { margin-top: 6px; max-width: 52ch; }
.footer-links { display: flex; gap: 8px 24px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-block; padding: 10px 0; color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }

/* 17. Case studies -------------------------------------------------------- */
.cs-hero { padding-top: clamp(32px, 5vw, 72px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .875rem; color: var(--muted); list-style: none; margin: 0; padding: 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; display: inline-block; padding: 10px 0; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--rule-strong); }
.crumbs li { display: flex; align-items: center; }
.cs-kicker { margin-top: clamp(24px, 3vw, 40px); font-size: .9375rem; color: var(--ink-2); }
.cs-title {
  margin-top: 14px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.75rem, 7vw, 6.25rem); line-height: .96; letter-spacing: -.026em; max-width: 18ch; text-wrap: balance;
}
.cs-dek { margin-top: 28px; font-family: var(--serif); font-size: clamp(1.375rem, 2.2vw, 1.875rem); line-height: 1.28; max-width: 36ch; color: var(--ink-2); }
.cs-meta {
  margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
}
.cs-meta div { padding: 18px 20px 20px 0; }
.cs-meta div + div { padding-left: 20px; border-left: 1px solid var(--rule); }
.cs-meta dt { font-size: .8125rem; color: var(--muted); }
.cs-meta dd { margin-top: 4px; font-size: .9688rem; line-height: 1.45; }
@media (max-width: 767px) {
  .cs-meta { grid-template-columns: 1fr 1fr; }
  .cs-meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-meta div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

.notice { margin-top: 32px; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; padding: 18px 20px; background: var(--paper-2); border-left: 3px solid var(--navy); max-width: 78ch; }
.notice svg { width: 20px; height: 20px; margin-top: 2px; color: var(--navy); }
.notice p { font-size: .9375rem; color: var(--ink-2); }
.notice strong { color: var(--ink); font-weight: 500; }

.cs-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-top: clamp(64px, 8vw, 112px); }
.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; }
.toc p { font-size: .8125rem; color: var(--muted); padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-bottom: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 1.75rem 1fr; padding: 10px 0; font-size: .875rem; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .2s; }
.toc a::before { content: counter(toc, decimal-leading-zero); font-variant-numeric: tabular-nums; color: var(--rule-strong); }
.toc a:hover, .toc a[aria-current="true"] { color: var(--ink); }
.toc a[aria-current="true"]::before { color: var(--accent); }
@media (max-width: 1023px) {
  .cs-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
}

.cs-section { padding-bottom: clamp(56px, 7vw, 96px); }
.cs-section + .cs-section { border-top: 1px solid var(--rule); padding-top: clamp(40px, 5vw, 64px); }
.cs-num { font-family: var(--serif); font-size: 1rem; color: var(--muted); font-variant-numeric: lining-nums; }
.cs-h2 { margin-top: 8px; font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 3.4vw, 2.875rem); line-height: 1.06; letter-spacing: -.016em; max-width: 22ch; }
.cs-section .prose { margin-top: 24px; }
.cs-section .lead { margin-top: 24px; }
.cs-h3 { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.2; }

/* Two-column issue lists */
.pairs { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--ink); }
.pairs > div { padding: 22px 0 24px; border-bottom: 1px solid var(--rule); }
.pairs h3 { font-weight: 500; font-size: 1rem; }
.pairs p { margin-top: 6px; font-size: .9375rem; color: var(--ink-2); max-width: 48ch; }
@media (max-width: 767px) { .pairs { grid-template-columns: 1fr; } }

/* Data table (forms, timing) */
.dtable { width: 100%; margin-top: 32px; border-collapse: collapse; }
.dtable caption { text-align: left; font-size: .875rem; color: var(--muted); padding-bottom: 10px; }
.dtable th, .dtable td { text-align: left; vertical-align: top; padding: 16px 20px 16px 0; border-bottom: 1px solid var(--rule); font-size: .9375rem; line-height: 1.5; }
.dtable thead th { font-size: .8125rem; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--ink); padding-top: 0; }
.dtable tbody th { font-family: var(--serif); font-weight: 400; font-size: 1.125rem; white-space: nowrap; color: var(--ink); }
.dtable td { color: var(--ink-2); }
.dtable td:last-child, .dtable th:last-child { padding-right: 0; }
@media (max-width: 767px) {
  .dtable.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dtable.stack tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--rule); }
  .dtable.stack th, .dtable.stack td { display: block; border: 0; padding: 0; }
  .dtable.stack td { margin-top: 6px; }
  .dtable.stack td[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; color: var(--muted); margin-top: 6px; }
}

/* Return flow diagram */
.flow { margin-top: 40px; display: grid; gap: 0; counter-reset: flow; }
.flow-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: var(--gap); align-items: stretch; }
.flow-stage { font-size: .8125rem; color: var(--muted); padding-top: 18px; }
.flow-nodes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.flow-nodes.is-single { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.flow-nodes.is-single .flow-node { width: calc(50% - 6px); }
.flow-node {
  position: relative; padding: 16px 18px 18px; background: var(--paper-3); border: 1px solid var(--rule-strong);
}
.flow-node b { display: block; font-family: var(--serif); font-weight: 400; font-size: 1.25rem; line-height: 1.15; }
.flow-node span { display: block; margin-top: 6px; font-size: .8438rem; color: var(--ink-2); line-height: 1.45; }
.flow-node.is-key { background: var(--navy); border-color: var(--navy); }
.flow-node.is-key b, .flow-node.is-key span { color: var(--on-navy); }
.flow-node.is-key span { opacity: .85; }
.flow-link { grid-column: 2; display: flex; justify-content: center; height: 40px; position: relative; }
.flow-link::before { content: ""; width: 1px; background: var(--rule-strong); }
.flow-link::after {
  content: ""; position: absolute; bottom: 2px; left: 50%; width: 7px; height: 7px;
  border-right: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
  transform: translateX(-50%) rotate(45deg);
}
.flow-link small { position: absolute; left: calc(50% + 14px); top: 50%; transform: translateY(-50%); font-size: .75rem; color: var(--muted); white-space: nowrap; }
@media (max-width: 767px) {
  .flow-row { grid-template-columns: 1fr; gap: 8px; }
  .flow-stage { padding-top: 0; }
  .flow-nodes { grid-template-columns: 1fr; }
  .flow-nodes.is-single .flow-node { width: 100%; }
  .flow-link { grid-column: 1; }
}

/* Numbered process steps (true sequence) */
.steps { list-style: none; margin: 32px 0 0; padding: 0; counter-reset: step; border-top: 1px solid var(--ink); }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 12px; padding: 20px 0 22px; border-bottom: 1px solid var(--rule); }
.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--serif); font-size: 1.125rem; color: var(--muted); font-variant-numeric: lining-nums; line-height: 1.5; }
.steps h3 { font-weight: 500; font-size: 1.0625rem; line-height: 1.5; }
.steps p { margin-top: 4px; font-size: .9375rem; color: var(--ink-2); max-width: 60ch; }

/* Concept notes */
.concepts { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.concept { padding: 24px 24px 26px; background: var(--paper-2); }
.concept h3 { font-family: var(--serif); font-weight: 400; font-size: 1.375rem; line-height: 1.2; }
.concept p { margin-top: 10px; font-size: .9375rem; color: var(--ink-2); }
@media (max-width: 767px) { .concepts { grid-template-columns: 1fr; } }

/* Risk columns (audit) */
.risk-cols { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.risk-col { border-top: 3px solid var(--navy); padding-top: 18px; }
.risk-col .rc-sym { font-family: var(--serif); font-style: italic; font-size: 2.25rem; line-height: 1; color: var(--accent); }
.risk-col h3 { margin-top: 10px; font-weight: 500; font-size: 1.0625rem; }
.risk-col p.rc-def { margin-top: 6px; font-size: .875rem; color: var(--muted); }
.risk-col ul { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.risk-col li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: .9375rem; color: var(--ink-2); }
@media (max-width: 899px) { .risk-cols { grid-template-columns: 1fr; gap: 36px; } }

/* Company facts strip */
.kv { margin-top: 32px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.kv div { padding: 16px 16px 18px 0; border-bottom: 1px solid var(--rule); }
.kv dt { font-size: .8125rem; color: var(--muted); }
.kv dd { margin-top: 4px; font-size: 1rem; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr 1fr; } }

/* Revenue split bar */
.split { margin-top: 36px; }
.split-bar { display: flex; height: 44px; gap: 2px; }
.split-bar span { display: block; height: 100%; }
.split-bar .s1 { background: var(--navy); border-radius: 0; }
.split-bar .s2 { background: var(--accent-soft); border: 1px solid var(--rule-strong); }
.split-legend { margin-top: 14px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .9375rem; }
.split-legend b { font-weight: 500; }
.split-legend span { color: var(--muted); }
.split-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 8px; vertical-align: 0; }
.split-legend .k1 { background: var(--navy); }
.split-legend .k2 { background: var(--accent-soft); border: 1px solid var(--rule-strong); }
.fig-note { margin-top: 12px; font-size: .8125rem; color: var(--muted); max-width: 70ch; }

/* CAM timeline */
.cams { list-style: none; margin: 32px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.cams li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.cams time { font-family: var(--serif); font-size: 1.125rem; font-variant-numeric: lining-nums tabular-nums; }
.cams span { color: var(--ink-2); }
.cams li.is-latest span { color: var(--ink); font-weight: 500; }

/* Fee chart */
.chart { margin-top: 36px; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font: 12px var(--sans); font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .pt { fill: var(--paper); stroke: var(--accent); stroke-width: 2; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + .pt, .chart .hit:focus + .pt { fill: var(--accent); }
.chart .lbl { fill: var(--ink-2); font: 500 12px var(--sans); font-variant-numeric: tabular-nums; }
.chart details { margin-top: 12px; font-size: .875rem; }
.chart-narrow { display: none; }
@media (max-width: 640px) {
  .chart-wide { display: none; }
  .chart-narrow { display: block; }
  .chart .chart-narrow .axis-text { font-size: 11px; }
  .chart .chart-narrow .lbl { font-size: 11px; }
}
.chart summary { cursor: pointer; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.chart table { border-collapse: collapse; margin-top: 8px; font-variant-numeric: tabular-nums; }
.chart th, .chart td { padding: 6px 24px 6px 0; border-bottom: 1px solid var(--rule); text-align: left; font-weight: 400; }

/* Procedures */
.proc-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.proc { border-top: 1px solid var(--ink); }
.proc h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; padding: 16px 0 12px; }
.proc ol { list-style: none; margin: 0; padding: 0; counter-reset: p; }
.proc li { counter-increment: p; display: grid; grid-template-columns: 2.25rem 1fr; padding: 12px 0; border-top: 1px solid var(--rule); font-size: .9375rem; color: var(--ink-2); }
.proc li::before { content: counter(p, lower-alpha) "."; color: var(--muted); font-family: var(--serif); }
@media (max-width: 899px) { .proc-grid { grid-template-columns: 1fr; gap: 40px; } }

.verdict { margin-top: 32px; padding: clamp(24px, 3vw, 40px); background: var(--navy); color: var(--on-navy); }
.verdict p.v-label { font-size: .875rem; opacity: .8; }
.verdict p.v-text { margin-top: 10px; font-family: var(--serif); font-size: clamp(1.625rem, 2.8vw, 2.375rem); line-height: 1.15; max-width: 26ch; }
.verdict ul { margin: 24px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid color-mix(in srgb, var(--on-navy) 30%, transparent); }
.verdict li { padding: 12px 0; border-bottom: 1px solid color-mix(in srgb, var(--on-navy) 18%, transparent); font-size: .9375rem; }
@media (max-width: 640px) { .verdict ul { grid-template-columns: 1fr; } }

.learned { margin-top: 32px; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--ink); }
.learned li { padding: 18px 0 20px; border-bottom: 1px solid var(--rule); }
.learned b { display: block; font-weight: 500; }
.learned span { display: block; margin-top: 4px; color: var(--ink-2); font-size: .9375rem; }
@media (max-width: 767px) { .learned { grid-template-columns: 1fr; } }

.next-project { border-top: 1px solid var(--ink); margin-top: clamp(24px, 4vw, 48px); padding: clamp(40px, 6vw, 80px) 0 var(--section); }
.next-project p { font-size: .9375rem; color: var(--muted); }
.next-project a { display: inline-flex; align-items: baseline; gap: 16px; margin-top: 10px; font-family: var(--serif); font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; letter-spacing: -.02em; text-decoration: none; }
.next-project a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.next-project a svg { width: .6em; height: .6em; flex: none; align-self: center; }

/* 404 */
.notfound { min-height: 62vh; display: flex; flex-direction: column; justify-content: center; padding-block: 80px; }
.notfound h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 8vw, 6rem); line-height: 1; }
.notfound p { margin-top: 20px; color: var(--ink-2); max-width: 44ch; }
.notfound .hero-actions { margin-top: 28px; }

/* 18. Motion -------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
  .js .reveal-d1 { transition-delay: .08s; }
  .js .reveal-d2 { transition-delay: .16s; }

  /* single orchestrated hero entrance */
  .js .hero-name span, .js .hero-role, .js .hero-lede, .js .hero-copy, .js .hero-actions { animation: rise 1s var(--ease) both; }
  .js .hero-role { animation-delay: .05s; }
  .js .hero-name span:nth-child(1) { animation-delay: .12s; }
  .js .hero-name span:nth-child(2) { animation-delay: .22s; }
  .js .hero-lede { animation-delay: .38s; }
  .js .hero-copy { animation-delay: .46s; }
  .js .hero-actions { animation-delay: .54s; }
  .js .portrait-frame { animation: unveil 1.3s var(--ease) .15s both; }
  .js .portrait-frame img { animation: settle 1.6s var(--ease) .15s both; }
  .js .hero-portrait::before { animation: fade 1s var(--ease) .9s both; }

  .js .tl-mark::after { height: 0 !important; }
  .js .timeline.is-in .tl-item.is-done .tl-mark::after { height: 100% !important; }
  .js .timeline.is-in .tl-item.is-current .tl-mark::after { height: 34px !important; }
  .js .timeline.is-in .tl-item:nth-child(2) .tl-mark::after { transition-delay: .25s; }
  .js .timeline.is-in .tl-item:nth-child(3) .tl-mark::after { transition-delay: .5s; }
  .js .timeline.is-in .tl-item:nth-child(4) .tl-mark::after { transition-delay: .75s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes unveil { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* 19. Print --------------------------------------------------------------- */
@media print {
  .site-header, .mobile-menu, .form, .hero-actions, .toc, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-top: 40px; }
}
@media (forced-colors: active) {
  .ea-part.is-done .ea-track, .tl-item.is-done .tl-dot { background: CanvasText; }
  .btn { border: 1px solid ButtonText; }
}
.cs-h3[data-gap] { margin-top: 56px; }
.split-bar .s1 { flex: 69.6 1 0; }
.split-bar .s2 { flex: 30.4 1 0; }
.menu-toggle path { transition: transform .3s var(--ease); transform-origin: 10px 10px; }
.menu-toggle[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .l2 { transform: translateY(-3px) rotate(-45deg); }
