@import url('/brand/tokens.css');

:root {
  color-scheme: dark;
  font-family: Inter, Arial, Helvetica, sans-serif;
  --bg: var(--brand-black);
  --surface: #121212;
  --surface-2: #191919;
  --paper: #f4f6f4;
  --ink: var(--brand-ink);
  --text: #f4f4f2;
  --muted: #a7adb4;
  --muted-dark: #5b6671;
  --line: rgba(255, 255, 255, 0.14);
  --line-light: #d8dfdc;
  --red: var(--brand-red);
  --green: var(--brand-teal);
  --blue: var(--brand-blue);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); }
body, button, a { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: 0; }
p, li { line-height: 1.65; }
:focus-visible { outline: 3px solid rgba(255, 59, 54, 0.62); outline-offset: 3px; }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; color: #000; background: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.wrap { width: min(var(--max), calc(100% - 44px)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 40; min-height: 68px; display: flex; align-items: center; border-bottom: 1px solid var(--line); background: rgba(10, 10, 10, 0.96); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; min-width: 0; }
.nav { display: flex; align-items: center; gap: 3px; color: #c7cbd0; font-size: 0.82rem; }
.nav a { padding: 9px 10px; border-radius: 5px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.07); }
.menu-button { display: none; width: 42px; height: 42px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 6px; color: #fff; background: transparent; }
.menu-button span { width: 18px; height: 2px; display: block; margin: 3px; background: currentColor; }

.eyebrow { margin-bottom: 16px; color: var(--red); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.tag { display: inline-flex; min-height: 26px; align-items: center; padding: 4px 8px; border: 1px solid currentColor; border-radius: 4px; color: #ffb5b2; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.tag.green { color: #88d7c8; }
.tag.blue { color: #9dc1ff; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border: 1px solid currentColor; border-radius: 6px; font-size: 0.85rem; font-weight: 800; }
.button:hover { transform: translateY(-1px); }
.button.primary { border-color: var(--red); color: #fff; background: var(--red); }
.button.secondary { border-color: rgba(255, 255, 255, 0.42); color: #fff; background: transparent; cursor: pointer; }
.button.dark { border-color: #152437; color: #fff; background: #152437; }
.text-link { display: inline-flex; align-items: center; gap: 7px; font-size: 0.82rem; font-weight: 800; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.28); text-underline-offset: 4px; }
.text-link:hover { text-decoration-color: var(--red); }

.cv-hero { padding: 70px 0 66px; border-bottom: 1px solid var(--line); background: #101010; }
.cv-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 72px; align-items: center; }
.cv-hero h1, .case-hero h1 { max-width: 900px; margin-bottom: 20px; font-size: clamp(3rem, 7vw, 6.7rem); line-height: 0.91; }
.cv-lead, .case-lead { max-width: 780px; color: #ced2d6; font-size: clamp(1rem, 1.7vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.portrait { position: relative; aspect-ratio: 4 / 5; overflow: hidden; margin: 0; border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.portrait-caption { position: absolute; inset: auto 0 0; padding: 16px; color: #d7dadc; background: rgba(0,0,0,0.78); font-size: 0.72rem; }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.proof-strip div { min-height: 104px; padding: 20px; border-right: 1px solid var(--line); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip strong, .proof-strip span { display: block; }
.proof-strip strong { font-size: 1.35rem; }
.proof-strip span { margin-top: 5px; color: var(--muted); font-size: 0.72rem; line-height: 1.4; }

.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 64px; padding: 68px 0 90px; }
.toc { position: sticky; top: 94px; align-self: start; }
.toc strong { display: block; margin-bottom: 14px; color: #fff; font-size: 0.74rem; text-transform: uppercase; }
.toc a { display: block; padding: 8px 0; color: var(--muted); font-size: 0.78rem; border-bottom: 1px solid var(--line); }
.toc a:hover { color: #fff; }
.toc .mini-profile { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.toc .mini-profile img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.toc .mini-profile span { color: #fff; font-size: 0.74rem; font-weight: 800; line-height: 1.25; }
.content-section { padding: 0 0 70px; scroll-margin-top: 90px; }
.section-followup { margin: 24px 0 0; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) 0.56fr; gap: 42px; align-items: end; margin-bottom: 28px; }
.section-heading h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1; }
.section-heading > p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; }
.intro-copy { max-width: 850px; color: #c8cdd2; font-size: 1.02rem; }
.intro-copy p:last-child { margin-bottom: 0; }

.case-links { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.case-link { min-height: 230px; padding: 24px; border-right: 1px solid var(--line); }
.case-link:last-child { border-right: 0; }
.case-link h3 { margin: 32px 0 10px; font-size: 1.25rem; }
.case-link p { color: var(--muted); font-size: 0.82rem; }
.case-link .text-link { margin-top: 14px; }

.timeline { border-top: 1px solid var(--line); }
.timeline-item { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.timeline-time { color: #ff8f8b; font-size: 0.76rem; font-weight: 800; }
.timeline-item h3 { margin-bottom: 4px; font-size: 1.15rem; }
.timeline-org { margin-bottom: 12px; color: var(--muted); font-size: 0.78rem; }
.timeline-item ul { margin: 0; padding-left: 18px; color: #c9cdd1; font-size: 0.86rem; }

.teaching-list { border-top: 1px solid var(--line); }
.teaching-item { display: grid; grid-template-columns: 86px minmax(0, 1fr) 150px; gap: 24px; align-items: start; padding: 25px 0; border-bottom: 1px solid var(--line); }
.teaching-item time { color: #ff8f8b; font-weight: 800; }
.teaching-item h3 { margin-bottom: 5px; font-size: 1.08rem; }
.teaching-item p { margin-bottom: 0; color: var(--muted); font-size: 0.82rem; }
.teaching-meta { color: #fff; font-size: 0.78rem; text-align: right; }

.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.evidence { min-height: 210px; padding: 25px; background: var(--surface); }
.evidence h3 { margin: 20px 0 8px; font-size: 1.08rem; }
.evidence p { color: var(--muted); font-size: 0.82rem; }
.evidence .text-link { margin-top: 8px; }

.record-list { border-top: 1px solid var(--line); }
.record { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 25px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.record-label { color: #ff8f8b; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; }
.record h3 { margin-bottom: 6px; font-size: 1.05rem; }
.record p { margin-bottom: 0; color: var(--muted); font-size: 0.82rem; }
.record a { text-decoration: underline; text-decoration-color: rgba(255,255,255,0.3); text-underline-offset: 3px; }
.record[id] { scroll-margin-top: 90px; }

details.archive { border-bottom: 1px solid var(--line); }
details.archive summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; color: #fff; font-weight: 800; font-size: 0.84rem; }
details.archive summary::after { content: "+"; color: var(--red); font-size: 1.2rem; }
details.archive[open] summary::after { content: "−"; }
details.archive .archive-content { padding: 0 0 24px; }

.qualification-group + .qualification-group { margin-top: 52px; }
.qualification-heading { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 18px; align-items: start; padding: 18px 0; }
.qualification-heading > span { color: var(--red); font-size: 0.72rem; font-weight: 800; }
.qualification-heading h3 { margin-bottom: 6px; font-size: 1.22rem; }
.qualification-heading p { max-width: 720px; margin-bottom: 0; color: var(--muted); font-size: 0.82rem; }
.qualification-archive { margin-top: -1px; }
.qualification-archive .archive-content.record-list { border-top: 1px solid var(--line); }

.competency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.competency-block { min-height: 250px; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.competency-block:nth-child(even) { border-right: 0; }
.competency-block > span { display: block; margin-bottom: 28px; color: var(--red); font-size: 0.72rem; font-weight: 800; }
.competency-block h3 { margin-bottom: 16px; font-size: 1.08rem; }
.competency-block ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.83rem; }
.competency-block li + li { margin-top: 9px; }

.closing { padding: 70px 0; color: var(--ink); background: var(--paper); }
.closing-grid { display: grid; grid-template-columns: 1fr 0.65fr; gap: 60px; align-items: end; }
.closing h2 { max-width: 760px; margin-bottom: 0; font-size: clamp(2.3rem, 5vw, 4.6rem); line-height: 0.98; }
.closing p { color: var(--muted-dark); }
.closing .button.secondary { border-color: #4f5c68; color: var(--ink); }
.site-footer { min-height: 74px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 0.74rem; border-top: 1px solid var(--line); }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px 20px; }
.site-footer a { color: inherit; text-decoration: none; transition: color 160ms ease; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--red); }

.case-hero { min-height: 560px; display: flex; align-items: flex-end; padding: 80px 0 52px; border-bottom: 1px solid var(--line); background: #111; }
.case-hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; align-items: end; }
.case-hero-media { margin: 0; border: 1px solid var(--line); background: #191919; }
.case-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: left top; }
.case-hero-media.strategy-media { position: relative; overflow: hidden; background: #191919; }
.case-hero-media.strategy-media img { aspect-ratio: 16 / 9; object-fit: cover; object-position: center; }
.case-hero-media.strategy-media figcaption { position: absolute; inset: auto 0 0; }
.case-hero-media.strategy-media span { padding: 16px; border-top: 0; color: #d7dadc; background: rgba(0,0,0,0.78); }
.case-hero-media span { display: block; padding: 13px; color: var(--muted); font-size: 0.7rem; border-top: 1px solid var(--line); }
.case-main { color: var(--ink); background: var(--paper); }
.case-section { padding: 76px 0; border-bottom: 1px solid var(--line-light); }
.case-section-grid { display: grid; grid-template-columns: 0.62fr 1fr; gap: 70px; }
.case-section h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1; }
.case-section-copy { color: var(--muted-dark); }
.case-section-copy strong { color: var(--ink); }
.fact-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 32px; border-block: 1px solid var(--line-light); }
.fact-list div { padding: 20px; border-right: 1px solid var(--line-light); }
.fact-list div:last-child { border-right: 0; }
.fact-list strong, .fact-list span { display: block; }
.fact-list strong { font-size: 1.5rem; }
.fact-list span { margin-top: 4px; color: var(--muted-dark); font-size: 0.72rem; }
.principle-list { border-top: 1px solid var(--line-light); }
.principle { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line-light); }
.principle span { color: var(--blue); font-weight: 800; }
.principle h3 { margin-bottom: 6px; font-size: 1rem; }
.principle p { margin-bottom: 0; color: var(--muted-dark); font-size: 0.83rem; }
.source-list { display: grid; gap: 10px; margin-top: 24px; }
.source-list a { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-light); font-size: 0.82rem; font-weight: 800; }

.talks-hero { padding: 82px 0 70px; border-bottom: 1px solid var(--line); background: #101010; }
.talks-hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(390px, 0.96fr); gap: 64px; align-items: center; }
.talks-hero h1 { max-width: 760px; margin-bottom: 22px; font-size: clamp(3rem, 5.6vw, 5.8rem); line-height: 0.92; }
.talks-hero-copy { max-width: 780px; color: #cbd0d4; font-size: clamp(1rem, 1.7vw, 1.22rem); }
.talks-hero-media { margin: 0; overflow: hidden; border: 1px solid #383838; background: #080808; }
.talks-hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 34% center; }
.talks-hero-media figcaption { padding: 12px 14px; color: #aeb4b9; font-size: 0.72rem; }
.talks-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 42px; border-block: 1px solid var(--line); }
.talks-stats div { min-height: 100px; padding: 20px; border-right: 1px solid var(--line); }
.talks-stats div:last-child { border-right: 0; }
.talks-stats strong, .talks-stats span { display: block; }
.talks-stats strong { font-size: 1.45rem; }
.talks-stats span { margin-top: 5px; color: var(--muted); font-size: 0.74rem; }
.talks-main { color: var(--ink); background: var(--paper); }
.featured-talk { padding: 76px 0; border-bottom: 1px solid var(--line-light); }
.featured-talk-grid { display: grid; grid-template-columns: minmax(340px, 0.9fr) 1fr; gap: 64px; align-items: center; }
.featured-talk img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; border: 1px solid var(--line-light); }
.featured-talk h2 { margin: 18px 0 12px; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1; }
.featured-talk p { color: var(--muted-dark); }
.featured-talk .hero-actions .button.secondary { border-color: #465665; color: var(--ink); }
.talk-archive { padding: 76px 0; }
.talk-archive-head { display: grid; grid-template-columns: 1fr 0.55fr; gap: 48px; align-items: end; margin-bottom: 36px; }
.talk-archive-head h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1; }
.talk-archive-head > p { margin-bottom: 0; color: var(--muted-dark); }
.talk-list { border-top: 1px solid var(--line-light); }
.talk-entry { display: grid; grid-template-columns: 130px minmax(260px, 320px) minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line-light); }
.talk-date { color: #9e2525; font-size: 0.73rem; font-weight: 800; text-transform: uppercase; }
.talk-entry img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; border: 1px solid var(--line-light); }
.talk-entry h3 { margin-bottom: 5px; font-size: 1.15rem; }
.talk-entry .talk-meta { margin-bottom: 8px; color: var(--muted-dark); font-size: 0.76rem; }
.talk-entry .talk-subject { margin-bottom: 10px; color: var(--muted-dark); font-size: 0.84rem; }
.talk-entry .text-link { color: var(--ink); }
.award-note { display: inline-flex; margin-bottom: 5px; color: #9e2525; font-size: 0.67rem; font-weight: 800; text-transform: uppercase; }

.social-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; }
.social-links a { color: #c5cbd1; font-size: 0.78rem; font-weight: 700; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.28); text-underline-offset: 4px; }

body.modal-open { overflow: hidden; }
.media-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(0,0,0,0.9); }
.media-modal[hidden] { display: none; }
.media-modal-panel { width: min(1060px, 100%); overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #0b0b0b; box-shadow: 0 28px 80px rgba(0,0,0,0.62); }
.media-modal-header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.media-modal-header span { color: var(--red); font-size: 0.65rem; font-weight: 800; text-transform: uppercase; }
.media-modal-header h2 { margin: 3px 0 0; color: #fff; font-size: 1.05rem; }
.media-modal-close { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: #fff; background: transparent; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.media-modal-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.media-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 920px) {
  .cv-hero-grid, .case-hero-inner, .case-section-grid, .closing-grid { grid-template-columns: 1fr; }
  .portrait { width: min(330px, 100%); }
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
  .case-links { grid-template-columns: 1fr; }
  .case-link { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .case-link:last-child { border-bottom: 0; }
  .featured-talk-grid, .talks-hero-grid { grid-template-columns: 1fr; }
  .talks-hero-media { width: min(760px, 100%); }
  .talks-hero-media img { aspect-ratio: 16 / 9; object-position: 38% center; }
  .talk-entry { grid-template-columns: 110px 220px minmax(0, 1fr); gap: 20px; }
}

@media (min-width: 721px) and (max-width: 1080px) {
  .menu-button { display: grid; }
  .nav { position: absolute; top: 68px; right: 22px; width: min(330px, calc(100vw - 44px)); display: none; align-items: stretch; flex-direction: column; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #111; box-shadow: 0 20px 45px rgba(0,0,0,0.45); }
  .nav.open { display: flex; }
  .nav a { padding: 11px; }
}

@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--max)); }
  .site-header { min-height: 64px; }
  .brand span:last-child { max-width: 178px; line-height: 1.2; }
  .menu-button { display: grid; }
  .nav { position: absolute; top: 64px; left: 16px; right: 16px; display: none; align-items: stretch; flex-direction: column; padding: 10px; border: 1px solid var(--line); background: #111; }
  .nav.open { display: flex; }
  .cv-hero { padding-top: 52px; }
  .cv-hero h1, .case-hero h1 { font-size: clamp(2.8rem, 13vw, 4.8rem); overflow-wrap: anywhere; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip div:nth-child(2) { border-right: 0; }
  .proof-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .layout { padding-top: 52px; }
  .section-heading { grid-template-columns: 1fr; gap: 12px; }
  .timeline-item, .record { grid-template-columns: 1fr; gap: 8px; }
  .qualification-heading { grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
  .competency-grid { grid-template-columns: 1fr; }
  .competency-block { min-height: 0; border-right: 0; }
  .teaching-item { grid-template-columns: 1fr; gap: 7px; }
  .teaching-meta { text-align: left; }
  .evidence-grid { grid-template-columns: 1fr; }
  .talks-stats { grid-template-columns: 1fr; }
  .talks-stats div { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .talks-stats div:last-child { border-bottom: 0; }
  .talk-archive-head { grid-template-columns: 1fr; gap: 12px; }
  .talk-entry { grid-template-columns: 1fr; gap: 10px; }
  .talk-entry img { margin: 5px 0 10px; }
  .media-modal { padding: 12px; }
  .media-modal-header { min-height: 62px; }
  .case-hero { min-height: 0; padding-top: 72px; }
  .fact-list { grid-template-columns: 1fr; }
  .fact-list div { border-right: 0; border-bottom: 1px solid var(--line-light); }
  .fact-list div:last-child { border-bottom: 0; }
  .site-footer { padding: 22px 0; align-items: flex-start; flex-direction: column; }
  .site-footer nav { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .toc, .hero-actions, .closing, .site-footer { display: none !important; }
  body { color: #111; background: #fff; }
  .cv-hero, .content-section { color: #111; background: #fff; }
  .cv-lead, .intro-copy, .timeline-org, .timeline-item ul, .record p, .teaching-item p { color: #333; }
  .layout { display: block; padding: 20px 0; }
  .content-section { break-inside: avoid; padding-bottom: 30px; }
}
