/* Colours & type: drjoyce.co palette + a deep "fog" blue for EcoFog */
:root {
  --bg: #ffffff;
  --bg-2: #f7f7f6;
  --card: #fafafa;
  --ink: #111;
  --ink-2: #3a3a38;
  --muted: #84837e;
  --line: #ececea;
  --line-2: #d9d9d6;
  --amp: #bdbdb9;
  --dark: #1c1d1f;
  --deep: #0c2a31;
  --deep-2: #123842;
  --fog: #9cc9d1;
  --fog-soft: #dbeef1;
  --g: 48px;
  --max: 1320px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sans: "Geist", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "cv03", "cv04", "cv09", "cv11";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
strong { font-weight: 500; color: var(--ink); }

.eyebrow, .meta, .mono {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow.light { color: rgba(255,255,255,.62); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--g);
  transition: background .35s var(--ease), box-shadow .35s var(--ease), color .35s;
}
.nav.scrolled { background: rgba(255, 255, 255, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.scrolled.on-dark { background: rgba(12, 42, 49, .82); box-shadow: 0 1px 0 rgba(255,255,255,.08); color: #fff; }
.nav.on-dark .nav-links a { color: rgba(255,255,255,.75); }
.nav.on-dark .nav-links a::after { background: #fff; }
.nav.on-dark .nav-links a.active { color: #fff; }
.nav.on-dark .nav-cta { background: #fff; color: var(--deep); }
.nav-name { font-size: 15px; font-weight: 500; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { font-size: 14px; color: var(--ink-2); position: relative; padding: 4px 0; transition: color .3s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-links a.active { color: var(--ink); }
.nav-cta { font-size: 13.5px; padding: 9px 16px; border-radius: 999px; background: var(--dark); color: #fff; transition: transform .3s var(--ease), background .3s, color .3s; }
.nav-cta:hover { transform: translateY(-1px); }

.menu-btn {
  display: none; width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--dark); position: relative; z-index: 60;
}
.menu-btn span { position: absolute; left: 17px; right: 17px; height: 1.5px; background: #fff; transition: transform .35s var(--ease); }
.menu-btn span:first-child { top: 22px; }
.menu-btn span:last-child { top: 29px; }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.menu-panel {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 24px;
  opacity: 0; pointer-events: none; transition: opacity .35s var(--ease);
}
.menu-panel a { font-family: var(--serif); font-size: 48px; line-height: 1.05; transform: translateY(12px); transition: transform .5s var(--ease); }
.menu-panel.open { opacity: 1; pointer-events: auto; }
.menu-panel.open a { transform: none; }

/* ---------- 1. Stage (intro animation) ---------- */
.stage { position: relative; }
.stage-wrap { position: relative; }
.amp {
  font-weight: 100; line-height: 1; text-align: center; color: var(--amp);
  user-select: none; pointer-events: none;
}
.col-head { font-size: 44px; font-weight: 400; letter-spacing: -0.035em; margin-bottom: 18px; display: inline-block; }
.slide { margin-bottom: 18px; }
.slide-img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(17,17,17,.08); }
.slide figcaption { margin-top: 8px; }
.rows li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 11px 0; border-top: 1px solid var(--line-2);
}
.rows li:last-child { border-bottom: 1px solid var(--line-2); }
.rows li.slide-row { display: block; border: 0; padding: 0 0 6px; }
.rows li > span:first-child { font-size: 14px; color: var(--ink-2); }
.rows li > .meta { font-size: 10.5px; white-space: nowrap; }
.stage-foot { display: flex; justify-content: space-between; gap: 24px; font-size: 14px; color: var(--muted); }
.stage-end { text-align: center; }
.stage-end h1 { font-size: clamp(30px, 4vw, 52px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.05; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; border: 0; cursor: pointer;
  padding: 13px 22px; border-radius: 999px; background: var(--dark); color: #fff; font-size: 14px;
  transition: transform .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); background: #000; }
.btn.light { background: #fff; color: var(--deep); }
.btn.light:hover { background: var(--fog-soft); }
.portrait { overflow: hidden; border-radius: 4px; }
.portrait-img { width: 100%; height: 100%; }
.scroll-hint { display: flex; align-items: center; gap: 10px; }
.scroll-hint i { width: 1px; height: 36px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink);
  animation: drip 1.6s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }
.scroll-hint span { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* Mobile / reduced-motion fallback: simple stacked layout */
.stage-wrap { padding: 110px 20px 64px; display: flex; flex-direction: column; gap: 36px; }
.stage .amp { font-size: 300px; height: 210px; margin-top: -40px; opacity: .35; }
.stage .portrait { width: 214px; aspect-ratio: 3 / 4; margin: -170px auto 0; position: relative; }
.stage .scroll-hint, .stage .stage-foot { display: none; }
.stage .amp { order: 0; }
.stage .portrait { order: 1; }
.stage .stage-end { order: 2; }
.stage .col { order: 3; }

/* Desktop: the sticky scroll-driven version (same numbers as drjoyce.co) */
@media (min-width: 960px) and (min-height: 600px) and (prefers-reduced-motion: no-preference) {
  .stage { height: 300vh; --phH: min(400px, 44vh); --phW: calc(var(--phH) * .75); --phTop: calc(41vh - var(--phH) / 2); }
  .stage-wrap { position: sticky; top: 0; height: 100vh; overflow: hidden; display: block; padding: 0; }
  .stage .amp {
    position: absolute; left: 0; right: 0; top: 2vh; z-index: 1; margin: 0; height: auto;
    font-size: min(880px, 97.8vh, 61vw); opacity: 1;
  }
  .stage .col { position: absolute; top: 24vh; width: min(318px, 26vw); z-index: 2; }
  .stage .col-left { left: var(--g); }
  .stage .col-right { right: var(--g); }
  .stage .col-head { will-change: transform; }
  .stage .rows li, .stage .slide { will-change: transform, opacity; transform-origin: 50% 0; }
  .stage .portrait {
    position: absolute; z-index: 3; left: 50%; top: var(--phTop); margin: 0 0 0 calc(var(--phW) / -2);
    width: var(--phW); height: var(--phH); aspect-ratio: auto; clip-path: inset(50% 0 50% 0);
  }
  .stage .stage-foot { display: flex; position: absolute; left: var(--g); right: var(--g); bottom: 34px; z-index: 2; }
  .stage .stage-end {
    position: absolute; left: 0; right: 0; z-index: 3;
    top: calc(var(--phTop) + var(--phH) + 6vh); opacity: 0; pointer-events: none;
  }
  .stage .scroll-hint { display: flex; position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%); z-index: 2; }
}

/* load-in animation for the stage */
.stage .col-head, .stage .rows li, .stage .stage-foot p { animation: rise 1s var(--ease) backwards; }
.stage .amp { animation: ampIn 1.4s var(--ease) .1s backwards; }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
@keyframes ampIn { from { opacity: 0; scale: .94; } }

/* ---------- 2. Home ---------- */
.hello { position: relative; background: var(--bg); overflow: hidden; }
.hello-inner {
  position: relative; max-width: var(--max); margin: 0 auto; padding: 150px var(--g) 90px;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: start;
}
.hello-text .eyebrow { margin-bottom: 22px; }
.hello-headline { font-size: clamp(30px, 3.5vw, 52px); line-height: 1.22; letter-spacing: -0.035em; font-weight: 400; }
.hello-links { margin-top: 56px; display: grid; border-top: 1px solid var(--line-2); }
.hello-links li { border-bottom: 1px solid var(--line-2); }
.hello-links a { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 16px 0; transition: padding .4s var(--ease); }
.hello-links a:hover { padding-left: 10px; }
.hello-links .lbl { font-size: clamp(20px, 1.8vw, 27px); letter-spacing: -0.03em; }
.hello-links .lbl i { font-style: normal; display: inline-block; color: var(--muted); transition: transform .35s var(--ease), color .3s; }
.hello-links a:hover .lbl i { transform: translate(3px, -3px); color: var(--ink); }
.hello-photo { position: relative; aspect-ratio: 4 / 5; max-width: 445px; margin-left: auto; }
.hello-img { width: 100%; height: 100%; overflow: hidden; border-radius: 6px; box-shadow: none; }
.badge {
  position: absolute; left: -56px; bottom: -28px; width: 172px; height: 172px; border-radius: 50%;
  background: var(--deep); color: #fff; display: grid; place-items: center; text-align: center;
  font-family: var(--serif); font-size: 21px; line-height: 1.15; padding: 26px; transition: transform .5s var(--ease);
  box-shadow: 0 0 0 8px var(--bg);
}
.hello-bio { margin: 52px 0 0 auto; max-width: 445px; font-size: 16.5px; line-height: 1.7; color: #66655f; }


/* ---------- 3. Research: EcoFog ---------- */
.research { scroll-margin-top: 0; }
.r-hero { background: var(--deep); color: #fff; position: relative; overflow: hidden; }
.r-hero-inner { position: relative; max-width: var(--max); margin: 0 auto; padding: 130px var(--g) 64px; }
.r-hero-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.16); }
.r-title { font-family: var(--serif); font-weight: 400; font-size: clamp(96px, 17vw, 260px); line-height: .85; letter-spacing: -0.035em; margin-top: 40px; }
.r-sub { margin-top: 26px; max-width: 760px; font-size: clamp(19px, 1.9vw, 26px); line-height: 1.35; letter-spacing: -0.02em; color: rgba(255,255,255,.86); }
.r-meta { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.r-meta div { border-top: 1px solid rgba(255,255,255,.16); padding-top: 14px; }
.r-meta dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fog); }
.r-meta dd { margin-top: 6px; font-size: 14.5px; line-height: 1.45; color: rgba(255,255,255,.88); }

.bento { margin-top: 0; display: grid; grid-template-columns: 1.55fr 1fr 1fr; grid-template-rows: 260px 260px; gap: 14px; }
.bento figure { position: relative; overflow: hidden; border-radius: 4px; background: var(--card); }
.bento .b-main { grid-row: 1 / 3; }
.bento .b-1 { grid-column: 2 / 4; }
.bento .b-1 img { object-position: center top; }
.bento img { object-position: center 25%; }
.bento img.contain { object-fit: contain; background: #fff; }
.captions { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.captions b { font-weight: 400; color: var(--ink-2); margin-right: 4px; }
.zoom { display: block; width: 100%; height: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; }
.zoom img { transition: transform 1s var(--ease); }

.r-body { max-width: var(--max); margin: 0 auto; padding: 0 var(--g); }
.r-story { max-width: 820px; padding: 88px 0 72px; }
.r-story p { font-size: 18px; line-height: 1.75; color: var(--ink-2); }
.r-story p + p { margin-top: 22px; }

.r-stats { margin-top: 88px; display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--ink); }
.r-stat { padding: 34px 24px 34px 0; }
.r-stat + .r-stat { padding-left: 24px; border-left: 1px solid var(--line-2); }
.r-stat .v { font-family: var(--serif); font-size: clamp(54px, 5.6vw, 84px); line-height: .9; color: var(--deep); }
.r-stat .v small { font-family: var(--mono); font-size: 12px; letter-spacing: .04em; margin-left: 6px; color: var(--muted); }
.r-stat .l { margin-top: 14px; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

.r-block { padding-top: 96px; }
.r-block-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.r-block-head h3 { font-size: clamp(34px, 4vw, 56px); font-weight: 400; letter-spacing: -0.04em; line-height: 1; }

.layers { display: grid; }
.layer {
  display: grid; grid-template-columns: 70px 1.1fr 1.6fr; gap: 24px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--line-2); position: relative;
}
.layer-n { font-size: 13px; color: var(--deep); }
.layer-name { font-size: 24px; letter-spacing: -0.03em; margin-bottom: 4px; }
.layer-role { font-size: 16px; line-height: 1.55; color: var(--ink-2); }

.alist li > a, .alist li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.alist-award { font-size: 20px; letter-spacing: -0.02em; }
.alist li > a:hover .alist-award { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.alist .mono { text-align: right; }

.press { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 20px; padding-top: 24px; }
.press-card .press-img { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.press-card .press-img img { object-position: top; }
.press-card .mono { margin-top: 14px; color: var(--deep); }
.press-title { margin-top: 6px; font-size: 15px; line-height: 1.4; letter-spacing: -0.01em; }

.r-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding: 90px 0 30px; }
.obtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 14px 24px; border: 1px solid var(--ink); background: none; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border-radius: 999px;
  transition: background .3s, color .3s;
}
.obtn:hover { background: var(--ink); color: #fff; }

/* ---------- Sections ---------- */
/* blocks shared by popups / interests */
.block + .block { margin-top: 24px; }
.block h4 { font-family: var(--mono); font-weight: 400; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.block p { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.bullets li { position: relative; padding: 10px 0 10px 20px; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; color: var(--ink-2); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 18px; width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--ink-2); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a { font-size: 13px; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 999px; transition: background .25s, color .25s, border-color .25s; }
.pills a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 24px; }
.gallery .frame { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; }
.gallery figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.gallery img.contain { object-fit: contain; background: #fff; }

/* placeholder when an image is missing */
.ph {
  width: 100%; height: 100%; display: grid; place-items: center; text-align: center; padding: 16px;
  background: repeating-linear-gradient(135deg, #f1f1ef 0 10px, #f8f8f7 10px 20px);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; color: var(--muted); word-break: break-all;
}

/* contact */
.contact { margin-top: 130px; padding: 120px var(--g) 44px; text-align: center; background: var(--dark); color: #fff; }
.contact .eyebrow { color: rgba(255,255,255,.55); }
.contact-title { font-family: var(--serif); font-weight: 400; font-size: clamp(64px, 10vw, 150px); line-height: .95; margin-top: 16px; }
.contact-email {
  display: inline-block; margin-top: 30px; font-size: clamp(22px, 3vw, 36px); letter-spacing: -0.03em;
  border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 4px; transition: color .3s, border-color .3s;
}
.contact-email:hover { color: var(--fog); border-color: var(--fog); }
.socials { display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; margin-top: 34px; }
.socials a { font-size: 15px; color: rgba(255,255,255,.75); }
.socials a:hover { color: #fff; }
.fine { margin-top: 100px; font-size: 12px; color: rgba(255,255,255,.4); font-family: var(--mono); }

/* popups */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgba(12, 16, 18, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.modal { width: min(820px, calc(100% - 32px)); max-height: calc(100% - 48px); margin: auto; border-radius: 12px; background: var(--bg-2); overflow: auto; }
.modal[open] { animation: pop .45s var(--ease); }
.modal-body { padding: 48px; }
.modal-title { font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 6vw, 76px); line-height: .95; margin: 12px 0 18px; }
.lede { font-size: 21px; line-height: 1.4; letter-spacing: -0.02em; margin-bottom: 26px; }
.lede.small { font-size: 18px; color: var(--ink-2); }
.abstract { font-size: 16px; line-height: 1.8; color: var(--ink-2); }
.meta-row { display: flex; flex-wrap: wrap; gap: 28px; margin-bottom: 28px; }
.meta-row dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.meta-row dd { font-size: 14.5px; margin-top: 3px; }
.modal-close {
  position: sticky; top: 14px; float: right; margin: 14px 14px 0 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--dark); color: #fff; cursor: pointer; font-size: 14px;
}
.lightbox { background: none; width: 100%; height: 100%; max-width: none; max-height: none; display: none; }
.lightbox[open] { display: grid; place-items: center; animation: fadeIn .3s var(--ease); }
.lightbox figure { max-width: min(1200px, 92vw); max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img { width: auto; height: auto; max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { margin-top: 12px; color: #fff; font-size: 14px; text-align: center; }
.lightbox .modal-close { position: fixed; top: 20px; right: 20px; margin: 0; background: #fff; color: var(--ink); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes fadeIn { from { opacity: 0; } }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .press { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  :root { --g: 20px; }
  .nav { padding: 12px 16px; }
  .nav-links, .nav-cta { display: none; }
  .menu-btn { display: block; }
  .hello-inner { grid-template-columns: 1fr; padding-top: 110px; gap: 56px; }
  .hello-photo { margin: 0 0 0 40px; }
  .hello-bio { margin: 48px 0 0; }
  .badge { width: 130px; height: 130px; left: -36px; bottom: -22px; font-size: 16px; padding: 18px; }
  .r-stats { grid-template-columns: 1fr 1fr; }
  .r-stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .r-stat:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .r-hero-inner { padding: 100px var(--g) 56px; }
  .r-meta { grid-template-columns: 1fr 1fr; }
  .bento { grid-template-columns: 1fr 1fr; grid-template-rows: 300px 200px 160px; }
  .bento .b-main { grid-row: auto; grid-column: 1 / 3; }
  .bento .b-1 { grid-column: 1 / 3; }
  .r-story { padding: 56px 0 40px; }
  .r-block { padding-top: 70px; }
  .r-block-head { flex-direction: column; align-items: start; }
  .layer { grid-template-columns: 1fr; gap: 8px; }
  .press { grid-template-columns: 1fr 1fr; }
  .section { padding-top: 96px; }
  .modal-body { padding: 28px 22px; }
}
@media (max-width: 520px) {
  .r-meta { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ---------- Section heads (shared) ---------- */
.section { max-width: var(--max); margin: 0 auto; padding: 150px var(--g) 20px; scroll-margin-top: 30px; }
.section-head { position: relative; display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 26px; margin-bottom: 8px; }
.section-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease) .15s; }
.section-head.in::after { transform: none; }
.section-head h2 { order: -1; font-size: clamp(60px, 10vw, 156px); font-weight: 300; letter-spacing: -0.06em; line-height: .88; }
.section-head h2 em { letter-spacing: -0.02em; }
.section-head .eyebrow { padding-bottom: 10px; }

/* heading words slide up */
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .12em .08em 0; margin: 0 -.12em -.08em 0; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.in .split .w > span, .split.in .w > span, .in.split .w > span { transform: none; }
.section-head.reveal, .e-head.reveal { opacity: 1; transform: none; }

/* ---------- Projects: index + drawers ---------- */
.plist { border-top: 0; }
.pitem { border-bottom: 1px solid var(--line-2); }
.prow {
  width: 100%; display: grid; grid-template-columns: 64px 1fr auto 44px; align-items: center; gap: 20px;
  padding: 30px 0; background: none; border: 0; cursor: pointer; text-align: left; position: relative;
}
.prow::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.prow:hover::before, .pitem.open .prow::before { transform: none; }
.pnum { color: var(--muted); transition: color .4s; }
.ptitle { font-size: clamp(34px, 5.2vw, 76px); font-weight: 300; letter-spacing: -0.05em; line-height: 1; transition: transform .7s var(--ease), font-style .3s; }
.prow:hover .ptitle, .pitem.open .ptitle { transform: translateX(14px); }
.prow:hover .pnum, .pitem.open .pnum { color: var(--ink); }
.pkick { text-align: right; }
.pplus { position: relative; width: 22px; height: 22px; justify-self: end; }
.pplus::before, .pplus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--ink); transition: transform .6s var(--ease); }
.pplus::after { transform: rotate(90deg); }
.pitem.open .pplus::after { transform: rotate(0); }
.pitem.open .pplus::before { transform: rotate(180deg); }
.pitem.is-soon .prow { cursor: default; }
.pitem.is-soon .ptitle { color: #b8b8b4; }
.pitem.is-soon .pplus { opacity: 0; }
.pitem.is-soon .prow::before { display: none; }

.pdrawer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .8s var(--ease); }
.pitem.open .pdrawer { grid-template-rows: 1fr; }
.pdrawer-inner { overflow: hidden; }
.pdrawer-pad { padding: 8px 0 64px 84px; opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.pitem.open .pdrawer-pad { opacity: 1; transform: none; transition-delay: .2s; }

.d-lede { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 40px); line-height: 1.18; max-width: 900px; }
.d-meta { margin-top: 18px; font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.8; }
.d-meta i { font-style: normal; margin: 0 10px; color: var(--line-2); }
.d-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(32px, 6vw, 96px); margin-top: 44px; }
.d-body p { font-size: 17px; line-height: 1.75; color: var(--ink-2); }
.d-body p + p { margin-top: 18px; }
.facts li { display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.f-v { font-family: var(--serif); font-size: 46px; line-height: 1; color: var(--deep); min-width: 120px; }
.f-l { font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.d-awards { margin-top: 30px; }
.d-awards li { padding: 12px 0 12px 22px; position: relative; }
.d-awards li::before { content: "✦"; position: absolute; left: 0; top: 12px; font-size: 12px; color: var(--deep); }
.d-awards li > a, .d-awards li { display: flex; flex-direction: column; gap: 4px; }
.d-awards li > span:first-child, .d-awards a > span:first-child { font-size: 18px; letter-spacing: -0.02em; }
.d-awards a:hover > span:first-child { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.m-strip { display: flex; gap: 14px; margin-top: 48px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.m-item { flex: 0 0 auto; width: clamp(240px, 30vw, 380px); scroll-snap-align: start; }
.m-item .zoom, .m-video a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 4px; background: var(--card); }
.m-item img { object-position: center 18%; transition: transform 1.2s var(--ease); }
.m-item:hover img { transform: scale(1.03); }
.m-item figcaption { margin-top: 10px; font-size: 13px; color: var(--muted); }
.m-video a { position: relative; background: var(--deep); }
.play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255,255,255,.92); transition: transform .5s var(--ease); }
.play::after { content: ""; position: absolute; left: 26px; top: 21px; border-left: 16px solid var(--ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.m-video a:hover .play { transform: scale(1.12); }

.docs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; margin-top: 40px; }
.doc { display: grid; grid-template-columns: 112px 1fr; gap: 18px; align-items: center; padding: 10px; border-radius: 6px; border: 1px solid var(--line-2); transition: border-color .4s, background .4s; }
.doc:hover { border-color: var(--ink); background: var(--bg-2); }
.doc-thumb { position: relative; aspect-ratio: 4 / 3; border-radius: 3px; overflow: hidden; background: var(--fog-soft); }
.doc-thumb::before { content: attr(data-kind); position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--deep); }
.doc-thumb img { position: relative; object-position: top; }
.doc-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.doc-title { font-size: 17px; line-height: 1.3; letter-spacing: -0.02em; }
.doc-host { font-size: 13px; color: var(--muted); }
.doc-host i { font-style: normal; display: inline-block; transition: transform .4s var(--ease); }
.doc:hover .doc-host { color: var(--ink); }
.doc:hover .doc-host i { transform: translate(3px, -3px); }
.doc-thumb img { transition: transform .8s var(--ease); }
.doc:hover .doc-thumb img { transform: scale(1.06); }

/* floating hover preview */
.hover-img { position: fixed; left: 0; top: 0; z-index: 40; width: 300px; aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; pointer-events: none; opacity: 0; scale: .85; transition: opacity .35s var(--ease), scale .5s var(--ease); }
.hover-img.show { opacity: 1; scale: 1; }

/* ---------- Interests: typographic columns ---------- */
.groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 64px); padding-top: 40px; }
.igroup-name { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 4vw, 60px); line-height: 1; margin: 10px 0 24px; }
.ilist li { border-top: 1px solid var(--line-2); }
.ilist li:last-child { border-bottom: 1px solid var(--line-2); }
.ilink { width: 100%; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0; background: none; border: 0; text-align: left; font-size: 19px; letter-spacing: -0.02em; cursor: pointer; }
.ilink span { background: linear-gradient(var(--ink), var(--ink)) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease); }
.ilink:hover span { background-size: 100% 1px; }
.ilink i { font-style: normal; color: var(--muted); }
.soon-item { cursor: default; color: var(--ink-2); }
.soon-item em { font-style: normal; font-size: 10.5px; }

/* ---------- Education ---------- */
.school-line { padding-top: 40px; }
.school-line h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 56px); line-height: 1.05; }
.school-line .mono { margin-top: 12px; }

.es-block { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; padding: 56px 0; border-top: 1px solid var(--line-2); }
.es-block:first-of-type { margin-top: 56px; }
.es-head h3 { font-size: 26px; font-weight: 400; letter-spacing: -0.03em; }
.es-head p { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 300px; }
.es-rows li > a, .es-rows li > div { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.es-rows li:first-child > a, .es-rows li:first-child > div { padding-top: 0; }
.es-label { font-size: 16px; }
.es-label em { font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--deep); margin-left: 10px; }
.es-rows a:hover .es-label em { text-decoration: underline; text-underline-offset: 3px; }
.es-value { font-size: 16px; font-variant-numeric: tabular-nums; white-space: pre; color: var(--ink-2); }

@media (max-width: 900px) {
  .section { padding-top: 110px; }
  .section-head { flex-direction: column; align-items: start; gap: 10px; }
  .section-head .eyebrow { order: -2; padding: 0; }
  .prow { grid-template-columns: 34px 1fr 22px; gap: 12px; padding: 24px 0; }
  .pkick { grid-column: 2; grid-row: 2; text-align: left; margin-top: -4px; }
  .pplus { grid-column: 3; grid-row: 1; }
  .prow:hover .ptitle, .pitem.open .ptitle { transform: none; }
  .pdrawer-pad { padding: 4px 0 48px; }
  .d-grid { grid-template-columns: 1fr; margin-top: 30px; }
  .groups { grid-template-columns: 1fr; gap: 48px; }
  .es-block { grid-template-columns: 1fr; gap: 20px; padding: 40px 0; }
  .es-label em { display: block; margin: 2px 0 0; }
  .docs { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .split .w > span, .section-head::after { transform: none !important; }
}
