/* ==========================================================================
   Danny Paik — portfolio
   Monochrome editorial system. Cormorant Garamond (display) + Jost (body).
   ========================================================================== */

:root {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --surface: #151517;
  --surface-2: #1c1c1f;
  --text: #f3f1ec;
  --text-2: #cfcbc3;
  --muted: #918d85;
  --line: rgba(243, 241, 236, 0.14);
  --line-strong: rgba(243, 241, 236, 0.32);
  --ink: #0a0a0b;

  --font-display: 'Cormorant Garamond', 'Times New Roman', Georgia, serif;
  --font-body: 'Jost', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 180ms;
  --dur: 420ms;
  --dur-slow: 900ms;

  --container: 1180px;
  --container-narrow: 820px;
  --gutter: clamp(20px, 4vw, 48px);

  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --s7: 144px;

  --radius: 2px;
  --nav-h: 84px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  opacity: 0;
  transition: opacity 500ms ease;
}
body.is-loaded { opacity: 1; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 500; color: var(--text); }
em { font-style: italic; }
::selection { background: var(--text); color: var(--ink); }

:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: var(--radius); }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 1000;
  background: var(--text); color: var(--ink); padding: 10px 16px; border-radius: 2px;
  transition: top var(--dur-fast);
}
.skip-link:focus { top: 16px; }

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

/* ---------- Type ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7.5vw, 6.5rem); }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.15; }
h4 { font-size: 1.35rem; line-height: 1.25; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.lede {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 44ch;
}
.serif-italic { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.measure { max-width: 66ch; }
.measure p { color: var(--text-2); }

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }
.rule--strong { border-top-color: var(--line-strong); }

/* ---------- Layout ---------- */
.hero > *, .split > *, .project > *, .page-head__inner > *, .grid > *, .highlight > *, .award > *, .pub > *, .fact > *, .footer__grid > *, .section-head > *, .explore > *, .featured > *, .mini-grid > *, .slides > * { min-width: 0; }
.project__media figure { margin: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); }
.container--narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--s6); }
.section--tight { padding-block: var(--s5); }
.section--flush-top { padding-top: 0; }
.section-head { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s5); }
.section-head .rule { margin-top: var(--s3); }
.section-head--row {
  flex-direction: row; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap;
}
.grid { display: grid; gap: var(--s4); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  transition: background-color var(--dur) ease, border-color var(--dur) ease, height var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.nav::before {
  /* blur lives on a pseudo-element so the fixed mobile overlay is not trapped inside the nav's containing block */
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: rgba(10, 10, 11, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0; transition: opacity var(--dur) ease;
}
.nav.is-scrolled { height: 68px; border-bottom-color: var(--line); }
.nav.is-scrolled::before { opacity: 1; }
.nav__inner {
  position: relative; z-index: 1; height: 100%; max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
}
.nav__brand {
  font-family: var(--font-display); font-size: 1.7rem; font-weight: 500; letter-spacing: 0.01em;
  white-space: nowrap;
}
.nav__links { display: flex; gap: clamp(14px, 1.9vw, 30px); }
.nav__links a, .nav__mobile a {
  position: relative; font-size: 0.74rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-2); padding-block: 6px; white-space: nowrap;
  transition: color var(--dur-fast) ease;
}
.nav__links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--text);
  transform: scaleX(0); transform-origin: right; transition: transform var(--dur) var(--ease-out);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }

/* Centred navigation shared by every page: no name mark, small uppercase links, underline on the current page */
.nav__inner { justify-content: center; max-width: none; padding-inline: 40px; }
.nav__links { gap: 34px; flex-wrap: wrap; justify-content: center; }
.nav__links a { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 13px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: #b6b0a4; padding-block: 0 6px; }
.nav__links a::after { display: none; }
.nav__links a:hover { color: #c9c2b4; }
.nav__links a.is-active { color: #f2efe9; border-bottom: 1px solid #f2efe9; }
.nav__toggle { margin-left: auto; }
@media (max-width: 760px) { .nav__inner { padding-inline: var(--gutter); } }

.nav__toggle {
  display: none; width: 44px; height: 44px; position: relative; margin-right: -10px;
}
.nav__toggle span {
  position: absolute; left: 11px; right: 11px; height: 1px; background: var(--text);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast);
}
.nav__toggle span:nth-child(1) { top: 18px; }
.nav__toggle span:nth-child(2) { top: 26px; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

.nav__mobile {
  position: fixed; inset: 0; z-index: 90; background: var(--bg);
  display: flex; flex-direction: column; justify-content: flex-start;
  padding: calc(var(--nav-h) + 16px) var(--gutter) var(--s5);
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  gap: 4px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--dur) ease, visibility 0s linear var(--dur), transform var(--dur) var(--ease-out);
}
.nav__mobile.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav__mobile a {
  font-family: var(--font-display); font-size: clamp(2rem, 8vw, 3rem); text-transform: none; letter-spacing: 0;
  padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--text);
}
.nav__mobile a.is-active { color: var(--muted); }
@media (max-width: 1120px) {
  .nav__links { display: none; }
  .nav__toggle { display: block; z-index: 101; }
}

/* ---------- Buttons & pills ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 26px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.8rem; font-weight: 400; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text);
  transition: background-color var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease, transform var(--dur) var(--ease-out);
  cursor: pointer; min-height: 44px;
}
.btn:hover { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn:active { transform: scale(0.98); }
.btn--fill { background: var(--text); color: var(--ink); border-color: var(--text); }
.btn--fill:hover { background: transparent; color: var(--text); }
.btn svg { width: 14px; height: 14px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2);
  transition: border-color var(--dur-fast) ease, color var(--dur-fast) ease, background-color var(--dur-fast) ease;
  cursor: pointer; line-height: 1.4; min-height: 30px;
}
.pill svg { width: 11px; height: 11px; flex: none; }
.pill:hover { border-color: var(--text); color: var(--text); }
.pill--todo { border-style: dashed; color: var(--muted); }
.pill--todo:hover { border-color: var(--muted); color: var(--muted); background: rgba(255, 255, 255, 0.03); cursor: help; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s3); }
.pill--xs { padding: 3px 9px; font-size: 0.62rem; min-height: 24px; }

.tag {
  display: inline-block; padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.tag--live { border-color: rgba(243, 241, 236, 0.4); color: var(--text-2); }
.tag--live::before {
  content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--text);
  margin-right: 7px; vertical-align: 1px; animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(0.96); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 100svh; padding-top: var(--nav-h);
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center;
  max-width: var(--container); margin: 0 auto; padding-inline: var(--gutter); gap: var(--s5);
}
.hero__copy { display: flex; flex-direction: column; gap: var(--s3); padding-block: var(--s6); }
.hero__title { font-size: clamp(3.6rem, 9vw, 7.8rem); font-weight: 400; line-height: 0.95; }
.hero__title .line { display: block; overflow: hidden; }
.hero__title .word { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease-out) forwards; }
.hero__title .line:nth-child(2) .word { animation-delay: 120ms; }
@keyframes rise { to { transform: none; } }
.hero__lede { animation: fade-up 1s var(--ease-out) 380ms both; }
.hero__actions { animation: fade-up 1s var(--ease-out) 520ms both; }
.hero__eyebrow { animation: fade-up 1s var(--ease-out) 200ms both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero__figure { position: relative; margin: 0; justify-self: end; width: min(100%, 520px); animation: fade-in 1.4s ease 300ms both; }
.hero__figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; filter: grayscale(18%) contrast(1.02); }
.hero__figure::after {
  content: ''; position: absolute; inset: 0; border: 1px solid var(--line-strong);
  transform: translate(18px, 18px); pointer-events: none;
  animation: frame-in 1.2s var(--ease-out) 700ms both;
}
@keyframes frame-in { from { transform: translate(0, 0); opacity: 0; } to { transform: translate(18px, 18px); opacity: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.hero__caption {
  position: absolute; left: 0; bottom: -34px; font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll {
  position: absolute; left: var(--gutter); bottom: 28px; display: flex; align-items: center; gap: 12px;
  font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted);
}
.hero__scroll::after { content: ''; width: 48px; height: 1px; background: var(--muted); transform-origin: left; animation: scroll-hint 2.4s var(--ease-in-out) infinite; }
@keyframes scroll-hint { 0% { transform: scaleX(0); } 50% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: var(--s4); padding-bottom: var(--s5); }
  .hero__copy { padding-block: var(--s5) 0; }
  .hero__figure { justify-self: start; width: min(100%, 420px); }
  .hero__scroll { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line); padding-block: 18px; white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: inline-flex; gap: 0; animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item {
  font-family: var(--font-display); font-style: italic; font-weight: 400; font-size: clamp(1.2rem, 2vw, 1.6rem);
  color: var(--text-2); padding-inline: 28px; display: inline-flex; align-items: center; gap: 28px;
}
.marquee__item::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel__viewport { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.carousel__slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity var(--dur-slow) ease, transform 1.6s var(--ease-out);
  transform: scale(1.03);
}
.carousel__slide.is-active { opacity: 1; transform: none; z-index: 1; }
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel__caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3);
  padding-top: 14px; font-size: 0.85rem; color: var(--muted);
}
.carousel__caption .count { font-family: var(--font-display); font-size: 1.1rem; color: var(--text-2); white-space: nowrap; }
.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(10, 10, 11, 0.35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  display: grid; place-items: center; color: #fff;
  transition: background-color var(--dur-fast), transform var(--dur-fast);
}
.carousel__btn:hover { background: rgba(10, 10, 11, 0.7); }
.carousel__btn:active { transform: translateY(-50%) scale(0.95); }
.carousel__btn--prev { left: 18px; }
.carousel__btn--next { right: 18px; }
.carousel__btn svg { width: 16px; height: 16px; }
.carousel__dots { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.carousel__dots button { width: 28px; height: 20px; display: grid; place-items: center; }
.carousel__dots button::before { content: ''; width: 24px; height: 1.5px; background: rgba(255, 255, 255, 0.4); transition: background-color var(--dur-fast); }
.carousel__dots button[aria-current="true"]::before { background: #fff; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); }
.stat { padding: var(--s4) var(--s3); border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat__num { font-family: var(--font-display); font-size: clamp(2.6rem, 4.6vw, 4rem); font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__num sup { font-size: 0.45em; vertical-align: 0.6em; margin-left: 2px; }
.stat__label { margin-top: 10px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

/* ---------- Explore cards ---------- */
.explore { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.explore__card { position: relative; overflow: hidden; grid-column: span 2; aspect-ratio: 4 / 5; background: var(--surface); display: block; }
.explore__card:nth-child(1), .explore__card:nth-child(2) { grid-column: span 3; aspect-ratio: 16 / 10; }
.explore__card img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter var(--dur-slow); filter: grayscale(35%); }
.explore__card:hover img { transform: scale(1.05); filter: grayscale(0%); }
.explore__card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0) 40%, rgba(10, 10, 11, 0.85) 100%);
}
.explore__meta { position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 1; display: flex; flex-direction: column; gap: 6px; }
.explore__meta h3 { font-size: clamp(1.5rem, 2.2vw, 2rem); }
.explore__arrow {
  position: absolute; right: 20px; top: 20px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5); display: grid; place-items: center;
  transform: translate(6px, -6px); opacity: 0; transition: opacity var(--dur), transform var(--dur) var(--ease-out);
}
.explore__card:hover .explore__arrow { opacity: 1; transform: none; }
.explore__arrow svg { width: 14px; height: 14px; }
@media (max-width: 800px) {
  .explore { grid-template-columns: repeat(2, 1fr); }
  .explore__card, .explore__card:nth-child(1), .explore__card:nth-child(2) { grid-column: span 1; aspect-ratio: 4 / 5; }
}
@media (max-width: 480px) { .explore { grid-template-columns: minmax(0, 1fr); } .explore__card { aspect-ratio: 16 / 11; } }

/* ---------- Page header ---------- */
.page-head { padding-top: calc(var(--nav-h) + var(--s4)); padding-bottom: var(--s3); }
.page-head__inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: center; }
.page-head h1 { margin-top: 8px; font-size: clamp(2.2rem, 3.6vw, 3.4rem); white-space: nowrap; }
.page-head .lede { max-width: 58ch; font-size: clamp(1rem, 1.25vw, 1.12rem); }
.page-head .rule { margin-top: var(--s3); }
@media (max-width: 900px) { .page-head__inner { grid-template-columns: minmax(0, 1fr); gap: var(--s2); } .page-head h1 { white-space: normal; } }

/* ---------- Project blocks (Gianna-style) ---------- */
.project { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--s5); align-items: start; padding-block: var(--s4); border-top: 1px solid var(--line); }
.project:first-of-type { border-top: 0; padding-top: 0; }
.project--flip .project__media { order: 2; }
.project__media { position: sticky; top: 96px; }
.project__media .frame { position: relative; overflow: hidden; background: var(--surface); }
.project__media .frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.project__media .frame--portrait img { aspect-ratio: 4 / 5; }
.project__media .frame--tall img { aspect-ratio: 1 / 1; }
.project__media .frame:hover img { transform: scale(1.03); }
.project__media .frame button { position: absolute; inset: 0; width: 100%; cursor: zoom-in; }
.project__media .frame button:focus-visible { outline-offset: -4px; }
.project__media figcaption { margin-top: 10px; font-size: 0.78rem; color: var(--muted); letter-spacing: 0.04em; }
.project__body { display: flex; flex-direction: column; gap: var(--s2); }
.project__body h3 { font-size: clamp(1.8rem, 2.8vw, 2.5rem); }
.project__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 0.82rem; color: var(--muted); letter-spacing: 0.04em; }
.project__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
/* Independent Research: larger period label and keyword line for readability */
#independent .project__body > .eyebrow { font-size: 0.95rem; letter-spacing: 0.16em; color: #c9a86a; }
#independent .project__meta { font-size: 1.05rem; gap: 12px; color: var(--text-2); }
#independent .project__meta .dot { width: 4px; height: 4px; }
.project__body .project__award { margin: 2px 0 6px; font-family: var(--font-body); font-size: clamp(0.62rem, 1.05vw, 0.78rem); line-height: 1.7; font-weight: 400; letter-spacing: 0.07em; text-transform: uppercase; color: #c9a86a; }
.project__award > span { display: block; white-space: nowrap; }
@media (max-width: 900px) { .project__body .project__award { font-size: 0.8rem; } .project__award > span { white-space: normal; } }
.project__body p { color: var(--text-2); }
.project__body ul.bullets { display: flex; flex-direction: column; gap: 8px; color: var(--text-2); }
.project__body ul.bullets li { padding-left: 18px; position: relative; }
.project__body ul.bullets li::before { content: ''; position: absolute; left: 0; top: 0.75em; width: 8px; height: 1px; background: var(--muted); }
.project__strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: var(--s3); }
.project__strip button { aspect-ratio: 1; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.project__strip img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out), opacity var(--dur); opacity: 0.85; }
.project__strip button:hover img { transform: scale(1.06); opacity: 1; }
@media (max-width: 900px) {
  .project { grid-template-columns: minmax(0, 1fr); gap: var(--s4); }
  .project--flip .project__media { order: 0; }
  .project__media { position: static; }
}

/* Update / note boxes */
.note { border: 1px solid var(--line); padding: var(--s3) var(--s4); background: var(--bg-2); display: flex; flex-direction: column; gap: 10px; }
.note--dashed { border-style: dashed; color: var(--muted); }
.note .eyebrow { color: var(--text-2); }
.note p { color: var(--text-2); }

/* Placeholders for future media */
.placeholder {
  border: 1px dashed var(--line-strong); display: grid; place-items: center; text-align: center;
  padding: var(--s4); color: var(--muted); font-size: 0.85rem; letter-spacing: 0.06em; background: var(--bg-2);
  min-height: 180px; gap: 8px;
}
.placeholder svg { width: 26px; height: 26px; opacity: 0.7; }
.placeholder--video { aspect-ratio: 16 / 9; min-height: 0; }

/* ---------- Galleries ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery button { aspect-ratio: 1; overflow: hidden; background: var(--surface); cursor: zoom-in; position: relative; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out), filter var(--dur-slow); filter: grayscale(20%); }
.gallery button:hover img { transform: scale(1.05); filter: grayscale(0%); }
.gallery--wide button { aspect-ratio: 4 / 3; }
.gallery--masonry button:nth-child(4n + 1) { grid-row: span 2; aspect-ratio: auto; }
.gallery--masonry { grid-auto-flow: dense; grid-auto-rows: 180px; }
.gallery--masonry button { aspect-ratio: auto; height: 100%; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(6, 6, 7, 0.94);
  display: grid; place-items: center; padding: 64px var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity var(--dur) ease, visibility 0s linear var(--dur);
}
.lightbox.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.lightbox__img {
  max-width: min(1200px, 100%); max-height: calc(100vh - 160px); object-fit: contain;
  transform: scale(0.96); transition: transform var(--dur) var(--ease-out), opacity var(--dur);
}
.lightbox.is-open .lightbox__img { transform: none; }
.lightbox__img.is-switching { opacity: 0; }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 0.85rem; color: var(--muted); padding-inline: 80px; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid; place-items: center; color: #fff; transition: background-color var(--dur-fast);
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.12); }
.lightbox__btn svg { width: 16px; height: 16px; }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
body.lightbox-open { overflow: hidden; }

/* ---------- Awards ---------- */
.featured { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.featured__card {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; border: 1px solid var(--line);
}
.featured__card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(60%); opacity: 0.55; transition: transform 1.2s var(--ease-out), opacity var(--dur-slow), filter var(--dur-slow); }
.featured__card:hover img { transform: scale(1.05); opacity: 0.75; filter: grayscale(20%); }
.featured__card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 11, 0.1), rgba(10, 10, 11, 0.9) 75%); }
.featured__card > * { position: relative; z-index: 1; }
.featured__rank { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--text-2); margin-bottom: auto; }
.featured__card h3 { font-size: 1.35rem; margin-top: 8px; }
.featured__card .small { color: var(--text-2); margin-top: 4px; }
@media (max-width: 1000px) { .featured { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) {
  .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .featured__card { aspect-ratio: 3 / 4; padding: 14px; }
  .featured__card h3 { font-size: 1.1rem; }
  .featured__rank { font-size: 1.8rem; }
  .featured__card .eyebrow { font-size: 0.6rem; letter-spacing: 0.14em; }
  .featured__card .small { font-size: 0.72rem; }
}

.award-group { padding-block: var(--s4); border-top: 1px solid var(--line); }
.award-group__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: 4px; }
.award-group__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); }
@media (max-width: 900px) { .award-group__list { grid-template-columns: minmax(0, 1fr); } }
.award-group__head .count { font-family: var(--font-display); font-size: 1.2rem; color: var(--muted); }
.award {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 13px 0; border-top: 1px solid var(--line);
  transition: background-color var(--dur-fast);
}
.award__main { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: flex-start; }
.award__main > div:first-child { flex: 1 1 260px; min-width: 0; }
.award__grade { display: flex; flex-wrap: wrap; gap: 3px; padding-top: 5px; }
.award__grade span { font-size: 0.62rem; letter-spacing: 0.06em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; }
.award__title { font-family: var(--font-display); font-size: 1.22rem; font-weight: 500; line-height: 1.2; }
.award__title em { color: var(--text-2); }
.award__detail { color: var(--text-2); margin-top: 2px; font-size: 0.86rem; line-height: 1.45; }
.award__sub { color: var(--muted); font-size: 0.8rem; margin-top: 4px; padding-left: 10px; border-left: 1px solid var(--line); line-height: 1.4; }
.award__links { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; padding-top: 2px; }
.award__links .thumb { width: 34px; height: 34px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.award__links .thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%); transition: filter var(--dur-fast), transform var(--dur); }
.award__links .thumb:hover img { filter: none; transform: scale(1.08); }
.award--major .award__title { font-size: 1.32rem; }
@media (max-width: 760px) {
  .award { grid-template-columns: 44px minmax(0, 1fr); gap: 8px; }
  .award__links { justify-content: flex-start; }
}

/* ---------- Research timeline ---------- */
.chapter { position: relative; padding-block: var(--s5); border-top: 1px solid var(--line); }
.chapter__head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; max-width: 760px; margin-bottom: var(--s4); }
.chapter__head h2 { font-size: clamp(2.4rem, 4.6vw, 4rem); }
.chapter__head .chapter__org { margin: -2px 0 2px; font-family: 'DM Sans', Helvetica, sans-serif; font-size: clamp(calc(1.625rem - 3px), calc(2.29vw - 3px), calc(2.06rem - 3px)); font-weight: 400; line-height: 1.4; color: #e8e2d6; max-width: none; }
.chapter__head .chapter__org strong { display: inline; font-size: 1em; font-weight: 700; color: #f4eee2; }
.chapter__head .chapter__org span { display: block; }
.chapter__head .chapter__org .chapter__org-date { margin-left: 10px; font-family: 'Jost', Helvetica, sans-serif; font-size: calc(0.48em + 1.44px); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #c9a86a; vertical-align: 0.2em; white-space: nowrap; }
/* chapter titles use the same face as the Awards page heading */
#cdi .chapter__head h2, #independent .chapter__head h2, #hsrc .chapter__head h2, #posters .chapter__head h2, #publications .chapter__head h2, #more .chapter__head h2 { font-family: sans-serif; font-weight: 300; font-size: clamp(2rem, 3.6vw, 3rem); line-height: 1.1; letter-spacing: 0; color: #f6f2ea; }
/* keep chapter titles on one line on wider screens */
@media (min-width: 901px) { .chapter__head { max-width: none; } .chapter__head h2 { font-size: clamp(2.2rem, 4vw, 3.4rem); white-space: nowrap; } .chapter__head .lede { max-width: 760px; } #cdi .chapter__head .lede { max-width: none; } }
.chapter__period { justify-self: start; margin-top: 4px; padding: 6px 16px; border: 1px solid rgba(201, 168, 106, 0.55); border-radius: 999px; font-family: 'Jost', Helvetica, sans-serif; font-size: 15px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #c9a86a; }
.chapter__head .eyebrow { display: flex; gap: 12px; align-items: center; }
.chapter__head .eyebrow::before { content: ''; width: 36px; height: 1px; background: var(--muted); }
.chapter--major { background: var(--bg-2); overflow-x: clip; }
.chapter--major::before { content: ''; position: absolute; inset: 0 -100vw; background: var(--bg-2); z-index: -1; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.split--wide { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
@media (max-width: 900px) { .split, .split--wide { grid-template-columns: minmax(0, 1fr); gap: var(--s4); } }

.quote { border-left: 1px solid var(--line-strong); padding-left: var(--s3); margin: var(--s4) 0; }
.quote p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.35; color: var(--text); }
.quote cite { display: block; margin-top: 12px; font-style: normal; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }

.slides { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.slide-card { border: 1px solid var(--line); padding: 22px; background: var(--bg); display: flex; flex-direction: column; gap: 10px; min-height: 220px; transition: border-color var(--dur), transform var(--dur) var(--ease-out); }
.slide-card:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.slide-card .num { font-family: var(--font-display); font-size: 1.6rem; color: var(--muted); }
.slide-card h4 { font-size: 1.25rem; }
.slide-card p { font-size: 0.9rem; color: var(--text-2); }
@media (max-width: 900px) { .slides { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .slides { grid-template-columns: minmax(0, 1fr); } }

.pubs { display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: 230px minmax(0, 1fr) auto; gap: var(--s3); padding: 14px 0; border-top: 1px solid var(--line); align-items: start; }
.pub:first-child { border-top: 0; }
.pub__venue { display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; line-height: 1.5; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding-top: 6px; }
.pub__title { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.25; }
.pub__meta { color: var(--muted); font-size: 0.88rem; margin-top: 4px; }
@media (max-width: 760px) { .pub { grid-template-columns: minmax(0, 1fr); gap: 8px; } }

.mini-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini { border: 1px solid var(--line); padding: 24px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); transition: border-color var(--dur), transform var(--dur) var(--ease-out); }
.mini:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.mini .eyebrow { font-size: 0.66rem; }
.mini h4 { font-size: 1.3rem; }
.mini p { font-size: 0.92rem; color: var(--text-2); }
.mini .mini__img { aspect-ratio: 16 / 10; overflow: hidden; margin: -24px -24px 8px; }
.mini .mini__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(30%); transition: filter var(--dur-slow), transform 1.2s var(--ease-out); }
.mini:hover .mini__img img { filter: none; transform: scale(1.04); }
@media (max-width: 900px) { .mini-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .mini-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- About ---------- */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.fact:nth-child(odd) { padding-right: var(--s4); }
.fact:nth-child(even) { padding-left: var(--s4); border-left: 1px solid var(--line); }
.fact dt { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding-top: 4px; }
.fact dd { margin: 0; color: var(--text-2); }
@media (max-width: 760px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact:nth-child(odd) { padding-right: 0; }
  .fact:nth-child(even) { padding-left: 0; border-left: 0; }
}
.portrait { position: relative; }
.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.portrait::after { content: ''; position: absolute; inset: 0; border: 1px solid var(--line-strong); transform: translate(16px, 16px); pointer-events: none; }

.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.skills h4 { font-size: 1.1rem; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.skills li { color: var(--text-2); padding: 4px 0; font-size: 0.95rem; }
@media (max-width: 760px) { .skills { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Fun page ---------- */
.joke-box { border: 1px solid var(--line); padding: var(--s4); background: var(--bg-2); display: flex; flex-direction: column; gap: var(--s3); min-height: 240px; justify-content: space-between; }
.joke-box__text { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; transition: opacity var(--dur) ease, transform var(--dur) var(--ease-out); }
.joke-box__text.is-switching { opacity: 0; transform: translateY(6px); }
.joke-box__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; }
.ski-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ski-stat { border: 1px solid var(--line); padding: 20px; }
.ski-stat .big { font-family: var(--font-display); font-size: 2.2rem; line-height: 1; }
.ski-stat .small { color: var(--muted); margin-top: 6px; display: block; }
@media (max-width: 600px) { .ski-stats { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Highlights (home) ---------- */
.highlight { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4); padding: var(--s5) 0; border-top: 1px solid var(--line); align-items: center; }
.highlight__num { font-family: var(--font-display); font-size: 2.4rem; color: var(--muted); }
.highlight__img { overflow: hidden; background: var(--surface); }
.highlight__img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; filter: grayscale(30%); transition: filter var(--dur-slow), transform 1.2s var(--ease-out); }
.highlight:hover .highlight__img img { filter: none; transform: scale(1.03); }
.highlight__body { display: flex; flex-direction: column; gap: 12px; }
.highlight__body p { color: var(--text-2); }
.link-arrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text); }
.link-arrow svg { width: 14px; height: 14px; transition: transform var(--dur) var(--ease-out); }
.link-arrow:hover svg { transform: translateX(5px); }
@media (max-width: 900px) { .highlight { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } .highlight__num { display: none; } }

/* ---------- Contact band ---------- */
.contact-band { padding-block: var(--s6); text-align: center; border-top: 1px solid var(--line); }
.contact-band h2 { font-size: clamp(2.4rem, 6vw, 5rem); font-weight: 400; }
.contact-band a.email { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); font-style: italic; display: inline-block; margin-top: var(--s3); border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; transition: border-color var(--dur); }
.contact-band a.email:hover { border-color: var(--text); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: var(--s5) var(--s3); background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s4); }
.footer__brand { font-family: var(--font-display); font-size: 1.8rem; }
.footer__tag { color: var(--muted); font-size: 0.9rem; margin-top: 8px; max-width: 32ch; }
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a, .footer__contact a { color: var(--text-2); font-size: 0.85rem; letter-spacing: 0.06em; transition: color var(--dur-fast); }
.footer__links a:hover, .footer__contact a:hover { color: var(--text); }
.footer__contact { display: flex; flex-direction: column; gap: 8px; }
.footer__bottom { display: flex; justify-content: space-between; gap: var(--s3); margin-top: var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
/* footer holds only the copyright line on every page */
.footer__bottom { margin-top: 0; padding-top: 0; border-top: 0; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } .footer__bottom { flex-direction: column; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__title .word { transform: none; }
  .marquee__track { animation: none; }
}


/* ---------- Compact home (v2) ---------- */
.hero--compact { min-height: 0; padding-top: calc(var(--nav-h) + var(--s4)); padding-bottom: var(--s4); align-items: center; }
.hero--compact .hero__copy { padding-block: var(--s3); }
.hero--compact .hero__figure { width: min(100%, 440px); }
.hero--compact .hero__figure img { aspect-ratio: 3 / 4; object-position: center 15%; filter: none; }
.hero--compact .hero__title { font-size: clamp(3.4rem, 8vw, 6.6rem); }
.hero--compact .hero__caption { bottom: -30px; }
.brief { border-top: 1px solid var(--line); padding-block: var(--s5); }
.brief__grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s4); align-items: start; }
.brief__grid > * { min-width: 0; }
.brief p { color: var(--text-2); font-size: 1.05rem; }
.brief__meta { display: flex; flex-direction: column; gap: 8px; }
.brief__meta h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
@media (max-width: 760px) { .brief__grid { grid-template-columns: minmax(0, 1fr); gap: var(--s3); } }

.accolades { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--s4); border-top: 1px solid var(--line); }
.accolade { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); }
.accolade__t { font-family: var(--font-display); font-size: 1.12rem; line-height: 1.2; }
.accolade__d { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 2px; letter-spacing: 0.02em; }
.accolade__y { font-size: 0.68rem; letter-spacing: 0.1em; color: var(--muted); white-space: nowrap; }
@media (max-width: 960px) { .accolades { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .accolades { grid-template-columns: minmax(0, 1fr); } }

.hl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.hl { display: flex; flex-direction: column; gap: 10px; }
.hl__img { overflow: hidden; background: var(--surface); }
.hl__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(25%); transition: filter var(--dur-slow), transform 1.2s var(--ease-out); }
.hl:hover .hl__img img { filter: none; transform: scale(1.03); }
.hl h3 { font-size: 1.45rem; }
.hl p { color: var(--text-2); font-size: 0.95rem; }
@media (max-width: 900px) { .hl-grid { grid-template-columns: minmax(0, 1fr); } .hl__img img { aspect-ratio: 16 / 9; } }

/* ---------- Compact research ---------- */
.gallery--compact { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.compact-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); border-top: 1px solid var(--line); }
.cl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cl__t { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.cl__d { display: block; color: var(--muted); font-size: 0.8rem; margin-top: 2px; }
.cl .thumb { width: 44px; height: 44px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; flex: none; }
.cl .thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 760px) { .compact-list { grid-template-columns: minmax(0, 1fr); } }
/* Along the Way: one activity per row, larger type */
.compact-list--rows { grid-template-columns: minmax(0, 1fr); }
.compact-list--rows .cl { padding: 16px 0; }
.compact-list--rows .cl > div { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: var(--s3); align-items: baseline; }
.compact-list--rows .cl__t { font-size: 1.35rem; }
.compact-list--rows .cl__d { margin-top: 0; font-size: 1rem; line-height: 1.55; color: var(--text-2); }
@media (max-width: 760px) { .compact-list--rows .cl > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }
details.fold { border: 1px solid var(--line); background: var(--bg); }
details.fold summary { cursor: pointer; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-display); font-size: 1.25rem; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: '+'; font-family: var(--font-body); color: var(--muted); font-size: 1.2rem; }
details.fold[open] summary::after { content: '–'; }
details.fold .fold__body { padding: 0 20px 20px; }
.next-link { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding-block: var(--s4); border-top: 1px solid var(--line); flex-wrap: wrap; }
.next-link h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }


/* ---------- Simple award lists (v3) ---------- */
.alist { padding-block: var(--s4); border-top: 1px solid var(--line); }
.alist:first-of-type { border-top: 0; padding-top: var(--s2); }
.alist h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 14px; }
.alist ul { columns: 1; }
.alist li { break-inside: avoid; padding: 5px 0 5px 18px; position: relative; color: var(--text-2); font-size: 0.98rem; line-height: 1.45; }
.alist li::before { content: ''; position: absolute; left: 0; top: 0.78em; width: 8px; height: 1px; background: var(--muted); }
.alist li a { color: var(--text); border-bottom: 1px solid var(--line-strong); transition: border-color var(--dur-fast); cursor: zoom-in; }
.alist li a[href^="http"], .alist li a[href$=".pdf"] { cursor: pointer; }
.alist li a:hover { border-color: var(--text); }
.alist li .g { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.alist--single ul { columns: 1; }


/* ---------- Mini project (nested) ---------- */
.mini-project { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: start; margin-top: var(--s3); padding: 16px; border: 1px solid var(--line); background: var(--bg-2); }
.mini-project__thumb { aspect-ratio: 4 / 3; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; }
.mini-project__thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.mini-project__t { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; margin-top: 4px; }
@media (max-width: 520px) { .mini-project { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Slideshows, posters, video, PDF ---------- */
.carousel--contain .carousel__viewport { background: #fff; }
.carousel--contain .carousel__slide img { object-fit: contain; }
.carousel--letters .carousel__viewport { aspect-ratio: 2.05 / 1; }
.carousel--slides .carousel__viewport { aspect-ratio: 16 / 9; border: 1px solid var(--line); }
.carousel--slides .carousel__btn { background: rgba(10, 10, 11, 0.55); }
.video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.media-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s3); align-items: start; }
@media (max-width: 900px) { .media-pair { grid-template-columns: minmax(0, 1fr); } }
.poster-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.poster { display: flex; flex-direction: column; gap: 10px; }
.poster__img { border: 1px solid var(--line); background: #fff; overflow: hidden; cursor: zoom-in; }
.poster__img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.poster__img:hover img { transform: scale(1.02); }
.poster h4 { font-size: clamp(0.75rem, 1.28vw, 1.03rem); line-height: 1.3; white-space: nowrap; }
@media (max-width: 900px) { .poster h4 { font-size: 1.15rem; white-space: normal; } .poster .small { font-size: 1rem; } .poster .small > span { white-space: normal; } }
.poster .small { font-size: clamp(0.68rem, 1.15vw, 0.95rem); line-height: 1.5; color: var(--text); display: flex; flex-direction: column; gap: 2px; }
.poster .small > span { white-space: nowrap; }
@media (max-width: 900px) { .poster-grid { grid-template-columns: minmax(0, 1fr); } }
.pdf-embed { width: 100%; aspect-ratio: 8.5 / 11; max-height: 780px; border: 1px solid var(--line); background: #fff; }
.vimeo { position: relative; aspect-ratio: 16 / 9; background: #000; }
.vimeo iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.frame--poster img { aspect-ratio: 1 / 1; object-fit: cover; object-position: top; background: #fff; }


/* ---------- Awards: two side-by-side columns of sections ---------- */
.alist-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s5); }
.alist-grid > * { min-width: 0; }
.alist-grid .alist { padding-block: var(--s3) var(--s4); }
.alist-grid .alist:first-of-type { border-top: 1px solid var(--line); padding-top: var(--s3); }
.alist li .ext { margin-left: 6px; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; }
.alist li .ext:hover { color: var(--text); border-color: var(--text); }
@media (max-width: 900px) { .alist-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Captioned photo grid ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.photo-grid figure { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.photo-grid .ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); cursor: zoom-in; }
.photo-grid .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter var(--dur-slow); filter: grayscale(20%); }
.photo-grid .ph:hover img { transform: scale(1.04); filter: none; }
.photo-grid figcaption { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.photo-grid figcaption strong { color: var(--text-2); font-weight: 400; display: block; font-family: var(--font-display); font-size: 1.05rem; }
@media (max-width: 900px) { .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-embed { width: 100%; aspect-ratio: 4 / 3; max-height: 640px; border: 1px solid var(--line); background: #fff; display: block; }

/* ---------- Press cards ---------- */
.press-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.press { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--bg-2); transition: border-color var(--dur), transform var(--dur) var(--ease-out); }
.press:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.press__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.press__img img { width: 100%; height: 100%; object-fit: cover; }
.press__body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.press__src { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.press__t { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; }
.press__d { font-size: 0.86rem; color: var(--text-2); }
.press__logo { aspect-ratio: 16 / 9; display: grid; place-items: center; background: var(--surface); font-family: var(--font-display); font-size: 2.6rem; color: var(--text-2); }
@media (max-width: 900px) { .press-grid { grid-template-columns: minmax(0, 1fr); } }


/* ---------- Video rows ---------- */
.video-row { display: flex; gap: 12px; align-items: stretch; height: clamp(220px, 24.5vw, 352px); }
.video-row .vr { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.video-row video { height: 100%; width: auto; max-width: 100%; background: #000; display: block; }
.video-row .vr--wide { flex: 16 1 0; }
.video-row .vr--tall { flex: 9 1 0; }
.video-row .vr video { aspect-ratio: 16 / 9; }
.video-row .vr--tall video { aspect-ratio: 9 / 16; }
.video-row .cap { font-size: 0.78rem; color: var(--muted); }
@media (max-width: 760px) { .video-row { flex-direction: column; height: auto; } .video-row video { width: 100%; height: auto; } .video-row .vr--tall video { max-height: 70vh; width: auto; margin-inline: auto; } }
.video--small { max-width: 520px; }

/* Research · Admitted programs grow slightly on hover */
.admit-link { display: inline-block; align-self: flex-start; min-height: 3.1em; margin: 0; transition: transform 0.2s ease, color 0.2s ease; transform-origin: center; }
.admit-link:hover, .admit-link:focus-visible { transform: scale(1.1); color: #c9a86a; }

.admit-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 32px; align-items: start; }
.admit-item { display: flex; flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; }
.admit-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; border: 1px solid var(--line); background: #fff; cursor: zoom-in; transition: border-color 0.2s ease; }
.admit-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 0.3s ease; }
.admit-thumb:hover { border-color: #c9a86a; }
.admit-thumb:hover img { transform: scale(1.06); }
@media (max-width: 760px) { .admit-row { grid-template-columns: minmax(0, 1fr); } .admit-link { min-height: 0; } }

/* Research: photo slot sized like the chapter videos */
.split-photo { display: block; width: 100%; padding: 0; border: 0; background: #000; cursor: zoom-in; overflow: hidden; }
.split-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
.split-photo:hover img { transform: scale(1.02); }

/* Research Internship title centered */
#cdi .chapter__head h2 { text-align: center; font-size: clamp(1.7rem, 3.06vw, 2.55rem); }
#cdi .chapter__head .chapter__org { text-align: center; line-height: 1.15; margin-top: 18px; margin-bottom: -4px; }

/* Research chapter titles share the home AWARDS heading style */
.chapter .chapter__head h2,
#cdi .chapter__head h2, #independent .chapter__head h2, #hsrc .chapter__head h2, #posters .chapter__head h2, #publications .chapter__head h2, #more .chapter__head h2 {
  font-family: Arial, Helvetica, sans-serif; font-weight: 700; font-size: 33px; line-height: 1.1; letter-spacing: 0.04em; text-transform: uppercase; color: #f4eee2; white-space: normal;
}
.chapter .chapter__head h2::first-letter { font-size: 36px; }
#cdi .chapter__head .lede { text-align: center; line-height: 1.35; margin-left: auto; margin-right: auto; }
#cdi .chapter__org .chapter__org-line + .chapter__org-line { display: table; position: relative; margin: 0 auto; }
#cdi .chapter__org .chapter__org-line + .chapter__org-line .chapter__org-date { display: block; margin: 4px 0 0; line-height: 1.2; text-align: center; vertical-align: baseline; }
#cdi .chapter__head .chapter__media { width: 100%; margin-top: 14px; }
#cdi .chapter__head .chapter__media .media-pair { align-items: start; }
#cdi .chapter__head .chapter__media-links { justify-content: center; margin-top: 12px; }
/* Research Day video takes two thirds of the row, slides sit below it */
@media (min-width: 901px) {
  #cdi .chapter__head .chapter__media .media-pair { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: var(--s3); }
  #cdi .chapter__head .chapter__media .media-pair > *:first-child { width: 66.6%; }
  #cdi .chapter__head .chapter__media .media-pair > *:last-child { width: calc((100% - var(--s3)) / 2); }
}
#cdi .chapter__head .chapter__media-cap { margin: 10px 0 0; font-family: 'DM Sans', Helvetica, sans-serif; font-size: 1rem; font-weight: 500; letter-spacing: 0.02em; line-height: 1.4; text-align: center; color: #e8e2d6; }
/* Dalerba project: text first at full width, photos below */
#cdi .cdi-text { max-width: 88ch; margin: 0 auto; }
#cdi .cdi-text h3 { margin: 0 0 18px; }
#cdi .cdi-text p { color: var(--text-2); }
#cdi .cdi-photos { width: 100%; margin: 22px auto; }
@media (max-width: 900px) { #cdi .cdi-photos { width: 100%; } }
#cdi .cdi-text .cdi-journey { margin: 0 0 2px; font-family: Arial, Helvetica, sans-serif; font-size: 31px; font-weight: 700; line-height: 1.2; letter-spacing: 0.04em; text-transform: uppercase; color: #f4eee2; }
#cdi .cdi-text h3:not(.cdi-journey) { font-family: 'Jost', Helvetica, sans-serif; font-size: 29px; font-weight: 500; letter-spacing: 0.01em; color: #f4eee2; }
#cdi .cdi-text p { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.35; }
#cdi .cdi-text { text-align: center; }
#cdi .cdi-text p { color: #ffffff; }
#cdi .chapter__head .chapter__media-album { width: 66.6%; margin: 14px auto 0; }
#cdi .cdi-text { margin-top: 96px; }
@media (max-width: 900px) { #cdi .chapter__head .chapter__media-album { width: 100%; } }
#cdi .chapter__head .lede, #cdi .cdi-text p { font-family: 'DM Sans', Helvetica, sans-serif; font-weight: 400; }
/* Research page body copy in DM Sans */
.chapter .chapter__head .lede, .chapter .project__body p, .chapter .project__body li, .chapter .measure p, .chapter .pub__title, .chapter .pub__meta, .chapter .compact-list .cl__d, .chapter .poster .small { font-family: 'DM Sans', Helvetica, sans-serif; font-weight: 400; }
.chapter figcaption, .chapter .project__meta, .chapter .pub__venue { font-family: 'DM Sans', Helvetica, sans-serif; }
/* Summer entries: short text beside its photos */
#cdi .cdi-summer { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 28px; align-items: center; margin-top: 56px; text-align: left; }
#cdi .cdi-summer:first-of-type { margin-top: 96px; }
#cdi .cdi-summer__text p { margin: 0; }
#cdi .cdi-summer__photos .gallery { grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (max-width: 900px) { #cdi .cdi-summer { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
#cdi .cdi-summer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 86%; margin-left: auto; margin-right: auto; }
#cdi .cdi-summer__shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); background: var(--surface); cursor: zoom-in; overflow: hidden; }
#cdi .cdi-summer__shot img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform var(--dur-slow) var(--ease-out); }
#cdi .cdi-summer__shot:hover img { transform: scale(1.03); }
#cdi .cdi-summer { align-items: stretch; }
#cdi .cdi-summer__text { display: flex; align-items: center; }
#cdi .cdi-summer__photos { display: flex; align-items: center; }
#cdi .cdi-summer__shot { width: 100%; }
#cdi .cdi-summer { gap: 44px; }
#cdi .cdi-summer__photos { align-items: stretch; }
#cdi .cdi-summer__shot { display: flex; }
#cdi .cdi-summer__shot img { height: 100%; aspect-ratio: auto; object-fit: cover; }
#cdi .cdi-summer__photos { position: relative; min-height: 200px; }
#cdi .cdi-summer__shot { position: absolute; inset: 0; display: block; }
#cdi .cdi-summer__shot img { width: 100%; height: 100%; }
#cdi .cdi-summer__text p { font-weight: 500; }
#cdi .cdi-summer__text strong { font-size: calc(1em + 1px); font-weight: 700; }
#cdi .cdi-summer__text strong { color: #7fd8e0; }
#cdi .chapter__org strong { color: #5d8ed4; }
/* Photo album frame: same length as the text beside it, photos fill the frame */
#cdi .cdi-summer { align-items: stretch; }
#cdi .cdi-summer__photos { position: relative; min-height: 240px; display: block; }
#cdi .cdi-summer__frame { position: absolute; inset: 0; display: grid; grid-template-rows: 1fr; gap: 12px; }
#cdi .cdi-summer__frame--split { grid-template-rows: 1fr 1fr; gap: 18px; }
#cdi .cdi-summer__shot { position: static; display: block; width: 100%; height: 100%; padding: 0; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
#cdi .cdi-summer__shot img { width: 100%; height: 100%; aspect-ratio: auto; object-fit: cover; }
@media (max-width: 900px) {
  #cdi .cdi-summer__photos { position: static; min-height: 0; }
  #cdi .cdi-summer__frame { position: static; grid-template-rows: none; }
  #cdi .cdi-summer__shot { height: auto; }
  #cdi .cdi-summer__shot img { height: auto; aspect-ratio: 4 / 3; }
}
#cdi .cdi-summer__shot--lunch img { object-position: 62% center; }
#cdi .cdi-summer__shot--lunch { cursor: default; }
#cdi .cdi-summer__shot--lunch:hover img { transform: none; }
#independent .chapter__head h2, #independent .chapter__head .chapter__period, #independent .chapter__head .lede { text-align: center; }
#independent .chapter__head .chapter__period { justify-self: center; }
#independent .chapter__head .lede { margin-left: auto; margin-right: auto; }
#independent .chapter__head .lede { max-width: none; line-height: 1.35; }
