/* Srijeet Qazi portfolio
   Tokens follow Apple's semantic roles: background levels, label levels,
   separator, fill, and a single accent that means "interactive" or "location". */

:root {
  color-scheme: light dark;

  --bg: #fbfbfd;
  --bg-2: #f5f5f7;
  --card: #ffffff;
  --panel: #f5f5f7;          /* grouped content on the page background */
  --group: #f5f5f7;          /* grouped content inside a card */
  --seg-on: #ffffff;
  --label: #1d1d1f;          /* 16.5:1 on --bg */
  --label-2: #6e6e73;        /* 5.1:1 on #fff, 4.6:1 on --bg-2 */
  --sep: rgba(0, 0, 0, 0.1);
  --fill: rgba(0, 0, 0, 0.045);
  --fill-2: rgba(0, 0, 0, 0.08);

  --accent: #0066cc;         /* link text, 5.6:1 on #fff */
  --accent-fill: #0071e3;    /* white label on it, 4.7:1 */
  --accent-fill-hover: #0062c4;
  --done: #28a745;
  --active: #ff9f0a;

  --glass: rgba(251, 251, 253, 0.72);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 10px 30px rgba(0, 0, 0, 0.06);

  --map-land: #f1efe9;
  --map-park: #d3e8c7;
  --map-water: #a9d3f1;
  --map-water-edge: #8cc0e6;
  --map-road: #ffffff;
  --map-casing: #dcd7cc;
  --map-arterial: #fde7a2;
  --map-arterial-casing: #e6c875;
  --map-heat: 0, 113, 227;
  --map-route: #0a55b8;
  --map-pin: #e5443b;
  --map-chrome: #ffffff;

  /* Diagram colours: grey is what goes in, indigo is what the model does, green is what comes out */
  --dg-process: #5856d6;
  --dg-process-bg: rgba(88, 86, 214, 0.09);
  --dg-process-line: rgba(88, 86, 214, 0.22);
  --dg-result: #1f7a38;

  --radius-lg: 28px;
  --radius-md: 20px;
  --gutter: 22px;
  --maxw: 1080px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #0d0d0e;
    --card: #1c1c1e;
    --panel: #1c1c1e;
    --group: #2c2c2e;
    --seg-on: #5a5a5e;
    --label: #f5f5f7;
    --label-2: #a1a1a6;      /* 6.5:1 on #1c1c1e */
    --sep: rgba(255, 255, 255, 0.14);
    --fill: rgba(255, 255, 255, 0.07);
    --fill-2: rgba(255, 255, 255, 0.12);

    --accent: #2997ff;       /* 5.6:1 on #1c1c1e */
    --done: #30d158;
    --active: #ff9f0a;

    --glass: rgba(22, 22, 23, 0.72);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow: none;

    --map-land: #1f2226;
    --map-park: #1d3323;
    --map-water: #16344f;
    --map-water-edge: #1f4668;
    --map-road: #3c4046;
    --map-casing: #2a2d31;
    --map-arterial: #6e5c2b;
    --map-arterial-casing: #4b3f21;
    --map-heat: 41, 151, 255;
    --map-route: #8cc8ff;
    --map-pin: #ff5a4f;

    --dg-process: #8f8dff;
    --dg-process-bg: rgba(143, 141, 255, 0.16);
    --dg-process-line: rgba(143, 141, 255, 0.34);
    --dg-result: #21833c;
    --map-chrome: #2c2c2e;
  }
}

@media (prefers-contrast: more) {
  :root {
    --label-2: #424245;
    --sep: rgba(0, 0, 0, 0.32);
    --fill-2: rgba(0, 0, 0, 0.14);
    --glass-border: rgba(0, 0, 0, 0.4);
    --accent: #0050a8;
  }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root {
    --label-2: #d1d1d6;
    --sep: rgba(255, 255, 255, 0.36);
    --fill-2: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.45);
    --accent: #6cb6ff;
  }
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
  border-radius: 8px;
}

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--card);
  color: var(--label);
  box-shadow: var(--shadow);
}
.skip-link:focus { top: 12px; }

.sym {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -0.2em;
}

.logo {
  width: 16px;
  height: 16px;
  flex: none;
  fill: currentColor;
}

.mono {
  font-family: var(--mono);
  letter-spacing: 0;
}

.muted { color: var(--label-2); }

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 17px;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.btn:hover { text-decoration: none; }

.btn-prominent { background: var(--accent-fill); color: #fff; }
.btn-prominent:hover { background: var(--accent-fill-hover); }

.btn-gray { background: var(--fill-2); color: var(--label); }
.btn-gray:hover { background: color-mix(in srgb, var(--label) 14%, transparent); }

.btn-plain { color: var(--accent); padding: 0 6px; }
.btn-plain:hover { text-decoration: underline; }

.btn-small { min-height: 36px; padding: 0 14px; font-size: 14px; }

.copy-btn .i-done { display: none; }
.copy-btn.is-done .i-copy { display: none; }
.copy-btn.is-done .i-done { display: inline-block; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 17px;
}

/* Navigation: the only Liquid Glass surface, because it floats above content */

.nav-wrap {
  position: fixed;
  top: 12px;
  left: 0;
  right: 0;
  z-index: 50;
  padding-inline: 12px;
  pointer-events: none;
}

.nav {
  position: relative;
  pointer-events: auto;
  max-width: 1000px;
  height: 52px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 20px;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.nav-name {
  margin-right: auto;
  color: var(--label);
  font-weight: 600;
  white-space: nowrap;
}
.nav-name:hover { text-decoration: none; }

.nav-links {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--label-2);
  font-size: 14px;
}
.nav-links a:hover { color: var(--label); background: var(--fill); text-decoration: none; }
.nav-links a[aria-current="location"] { color: var(--label); background: var(--fill-2); }

.nav-cta { margin-left: 6px; }

.nav-menu {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--label);
  cursor: pointer;
}
.nav-menu .sym { width: 22px; height: 22px; }
.nav-menu .i-close { display: none; }
.nav-menu[aria-expanded="true"] .i-open { display: none; }
.nav-menu[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 759px) {
  .nav { padding-left: 18px; gap: 4px; }
  .nav-menu { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    padding: 8px;
    border-radius: 24px;
    /* A menu is text heavy, so it stays close to opaque over scrolling content */
    background: color-mix(in srgb, var(--card) 94%, transparent);
    -webkit-backdrop-filter: blur(30px) saturate(1.4);
    backdrop-filter: blur(30px) saturate(1.4);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 44px; padding: 0 16px; border-radius: 16px; font-size: 17px; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav, .nav-links { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav, .nav-links { background: var(--card); }
}

/* Type */

.eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--label-2);
  font-size: 15px;
  font-weight: 600;
}
.eyebrow.mono { font-size: 14px; font-weight: 500; }
.eyebrow .sym { color: var(--accent); width: 16px; height: 16px; margin-top: 4px; }

.display {
  margin: 0;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.title {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.07;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.section-lede {
  margin: 20px 0 0;
  color: var(--label-2);
  font-size: 19px;
  line-height: 1.5;
}

.subhead {
  margin: 72px 0 20px;
  font-size: 24px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

/* Hero */

.hero { padding: 120px 0 80px; }

.hero-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.hero-photo { margin: 0; order: -1; max-width: 200px; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 52% 28%;
  border-radius: 28px;
  background: var(--bg-2);
}

.hero-headline {
  margin: 14px 0 0;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.lede {
  margin: 20px 0 0;
  max-width: 38em;
  color: var(--label-2);
  font-size: 19px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 32px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--fill);
  font-size: 14px;
}
.hero-facts .sym { color: var(--label-2); }

@media (min-width: 900px) {
  .hero { padding: 168px 0 128px; }
  .hero-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 72px; }
  .hero-photo { order: 0; max-width: none; }
  .hero-photo img { border-radius: 36px; }
}

/* Sections */

.section { padding: 88px 0; }
.section-alt { background: var(--bg-2); }
.section-head { max-width: 780px; margin-bottom: 48px; }

@media (min-width: 900px) {
  .section { padding: 136px 0; }
  .section-head { margin-bottom: 64px; }
}

/* Inverse navigation demo */

.demo {
  display: grid;
  gap: 8px;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.demo-stage {
  border-radius: 20px;
  overflow: hidden;
  background: var(--group);
}

.demo-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--map-land);
  touch-action: manipulation;
}

.demo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 0;
  padding: 10px 14px;
  list-style: none;
  color: var(--label-2);
  font-size: 13px;
}
.demo-legend li { display: inline-flex; align-items: center; gap: 7px; }
.demo-legend li[hidden] { display: none; }

.lg { display: inline-block; width: 12px; height: 12px; flex: none; }
.lg-start {
  border-radius: 50%;
  background: var(--accent-fill);
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px rgba(var(--map-heat), 0.25);
}
.lg-heat { border-radius: 4px; background: rgba(var(--map-heat), 0.45); }
.lg-pin {
  width: 11px;
  height: 11px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--map-pin);
}

.demo-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 14px 8px 8px;
}

.panel-label {
  margin: 0 0 8px;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--fill-2);
}
.segmented button {
  min-height: 36px;
  padding: 0 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--label);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
}
.segmented button[aria-checked="true"] {
  background: var(--seg-on);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04);
  font-weight: 600;
}

.clues {
  margin: 0;
  padding: 0 12px;
  list-style: none;
  border-radius: 14px;
  background: var(--group);
}
.clue {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--sep);
}
.clue:first-child { border-top: 0; }
.clue-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 8px;
  background: var(--fill-2);
  color: var(--label-2);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.clue-icon .sym { width: 18px; height: 18px; }
.clue.is-applied .clue-icon { background: var(--accent-fill); color: #fff; }
.clue-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.3; }
.clue-name { color: var(--label-2); font-size: 13px; }
.clue-value { font-size: 15px; font-weight: 500; }
.clue-check { color: var(--accent); opacity: 0; transition: opacity 0.25s ease; }
.clue.is-applied .clue-check { opacity: 1; }

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--label-2);
  font-size: 14px;
}
.meter-value {
  color: var(--label);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.meter-track {
  height: 6px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--fill-2);
}
.meter-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-fill);
}
.meter-note {
  min-height: 3em;
  margin: 10px 0 0;
  color: var(--label-2);
  font-size: 14px;
  line-height: 1.45;
}

.demo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.demo-actions .btn[aria-pressed="true"] { background: var(--label); color: var(--bg); }

.demo-result { min-height: 1.45em; margin: -8px 0 0; font-size: 14px; line-height: 1.45; }

.footnote {
  max-width: 64em;
  margin: 16px 6px 0;
  color: var(--label-2);
  font-size: 13px;
}

@media (min-width: 960px) {
  .demo { grid-template-columns: minmax(0, 1fr) 320px; }
  .demo-panel { padding: 16px 12px 12px 16px; }
}

/* Research */

.research-item {
  display: grid;
  gap: 28px;
  padding: 48px 0;
  border-top: 1px solid var(--sep);
}
.research-item:first-child { padding-top: 0; border-top: 0; }

@media (min-width: 900px) {
  .research-item { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 72px; padding: 64px 0; }
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--label-2);
  font-size: 14px;
  font-weight: 600;
}
.dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.dot-done { background: var(--done); }
.dot-active { background: var(--active); }

.item-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.item-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: var(--fill-2);
  color: var(--label);
}
.item-icon .sym { width: 24px; height: 24px; }

.item-body p { margin: 0 0 14px; color: var(--label-2); }
.item-body strong { color: var(--label); font-weight: 600; }

.specs {
  margin: 0;
  padding: 2px 20px;
  border-radius: var(--radius-md);
  background: var(--panel);
}
.specs div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--sep);
}
.specs div:first-child { border-top: 0; }
.specs dt { color: var(--label-2); font-size: 15px; }
.specs dd {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--label-2);
  font-size: 13px;
}

/* Publications */

.pubs { display: grid; gap: 20px; }
@media (min-width: 900px) { .pubs { grid-template-columns: 1fr 1fr; } }

.pub {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.pub-venue {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  color: var(--label-2);
  font-size: 14px;
  font-weight: 600;
}
.pub-venue .logo { width: 24px; height: 24px; color: var(--label); }

.pub-title { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; font-weight: 600; }
.pub-authors { margin: 0; color: var(--label-2); font-size: 15px; }
.pub-authors strong { color: var(--label); font-weight: 600; }
.pub-meta { margin: 0; color: var(--label-2); font-size: 14px; overflow-wrap: anywhere; }
.pub-meta a { font-family: var(--mono); font-size: 13px; letter-spacing: 0; }

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
}

.milestones {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) { .milestones { grid-template-columns: repeat(3, 1fr); } }

.milestone {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--card);
}
.milestone h4 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.milestone p { margin: 0; color: var(--label-2); font-size: 15px; line-height: 1.45; }

/* Projects */

.projects { display: grid; gap: 20px; }
@media (min-width: 900px) { .projects { grid-template-columns: repeat(3, 1fr); } }

.project {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--panel);
}
.project .item-icon { background: var(--card); }
@media (prefers-color-scheme: dark) { .project .item-icon { background: var(--fill-2); } }

.project-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.project-year { color: var(--label-2); font-family: var(--mono); font-size: 13px; }
.project h3 { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -0.015em; }
.project p { margin: 0; color: var(--label-2); font-size: 16px; line-height: 1.5; }
.project .note { display: flex; gap: 8px; align-items: flex-start; color: var(--label); font-size: 14px; line-height: 1.4; }
.project .note .sym { margin-top: 1px; color: var(--label-2); }

.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: auto 0 0;
  padding: 8px 0 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--fill-2);
  font-size: 13px;
  line-height: 1.3;
}
.chip .logo { width: 14px; height: 14px; color: var(--label-2); }

/* About */

.about-grid { display: grid; gap: 48px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 72px; } }

.about-copy .title { margin-bottom: 24px; }
.about-copy p:not(.eyebrow) { margin: 0 0 16px; color: var(--label-2); font-size: 19px; line-height: 1.5; }
.about-copy strong { color: var(--label); font-weight: 600; }

.groups { display: grid; gap: 28px; align-content: start; }
.group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px 16px;
  color: var(--label-2);
  font-size: 14px;
  font-weight: 600;
}

.list {
  margin: 0;
  padding: 0 16px;
  list-style: none;
  border-radius: 16px;
  background: var(--card);
}
.list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--sep);
}
.list li:first-child { border-top: 0; }
.row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-title { font-weight: 500; line-height: 1.35; }
.row-sub { color: var(--label-2); font-size: 14px; line-height: 1.45; }
.row-meta { color: var(--label-2); font-size: 14px; white-space: nowrap; }

@media (max-width: 520px) {
  .list li { flex-direction: column; gap: 2px; }
}

.toolkit { display: grid; gap: 12px; }
@media (min-width: 760px) { .toolkit { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .toolkit { grid-template-columns: repeat(3, 1fr); } }

.tool-group { padding: 20px; border-radius: var(--radius-md); background: var(--card); }
.tool-group h4 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.tool-group .stack { margin: 0; padding: 0; }

/* Contact */

.contact { text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact .title { max-width: 16em; margin-inline: auto; }
.contact p:not(.eyebrow) { max-width: 34em; margin: 20px auto 0; color: var(--label-2); font-size: 19px; }
.contact-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.contact .contact-email { margin-top: 24px; font-size: 14px; }

.footer {
  padding: 28px 0 40px;
  border-top: 1px solid var(--sep);
  color: var(--label-2);
  font-size: 13px;
}
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* Figures, galleries, and the image viewer */

.figure { margin: 0; }

.figure-frame {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--sep);
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.figure-frame:hover { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.09); }
.figure-frame img { display: block; width: 100%; border-radius: 9px; transition: transform 0.3s ease; }
@media (prefers-reduced-motion: no-preference) {
  .figure-frame:hover img { transform: scale(1.012); }
}

/* A quiet badge shows that a picture opens larger */
.figure-frame::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  opacity: 0;
  background: rgba(0, 0, 0, 0.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='M15.5 15.5 20 20M9 11h4M11 9v4'/%3E%3C/svg%3E") center / 17px no-repeat;
  transition: opacity 0.2s ease;
}
.figure-frame:hover::after,
.figure-frame:focus-visible::after { opacity: 1; }
.figure figcaption { margin-top: 10px; color: var(--label-2); font-size: 13px; line-height: 1.45; }

/* Diagrams and plots are drawn on white, so they keep a paper surface in both themes */
.figure-paper .figure-frame { background: #ffffff; }
@media (prefers-color-scheme: dark) {
  .figure-paper .figure-frame { background: #e8e8ea; border-color: rgba(255, 255, 255, 0.18); }
}

.figure-photo .figure-frame img { aspect-ratio: 4 / 3; object-fit: cover; }

/* Every picture in a row uses the same card shape. Diagrams sit inside it. Photographs fill it. */
.media-row .figure-frame img { aspect-ratio: 4 / 3; height: auto; }
.media-row .figure-paper .figure-frame img { object-fit: contain; }
.media-row .figure-photo .figure-frame img { object-fit: cover; object-position: 50% 30%; }
.media-row figcaption { max-width: 46em; }

/* Photographs of people are a mix of upright and wide, so a square card keeps more of each one */
.media-row-square .figure-frame img { aspect-ratio: 1 / 1; object-position: 50% 28%; }

.media-row {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 560px) { .media-row-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 560px) { .media-row-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .media-row-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 560px) { .media-row-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .media-row-4 { grid-template-columns: repeat(4, 1fr); } }

.research-media { grid-column: 1 / -1; }

/* A single picture keeps its own shape instead of a card crop */
.media-row-1 .figure-paper .figure-frame img { aspect-ratio: auto; max-height: 460px; object-fit: contain; }

.diagram-stack { display: grid; gap: 44px; margin-top: 8px; }

.project .figure { margin-bottom: 4px; }
.project .figure-frame img { aspect-ratio: 3 / 2; object-fit: cover; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--label);
  font-size: 14px;
}
.link-chip:hover { background: color-mix(in srgb, var(--label) 14%, transparent); text-decoration: none; }
.link-chip .sym { color: var(--label-2); }

/* Diagrams: one visual language for every process figure on the site */

.diagram { margin: 0; }
.diagram figcaption { margin-top: 14px; color: var(--label-2); font-size: 13px; line-height: 1.45; }

.flow {
  display: grid;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.flow-step {
  position: relative;
  padding: 16px 16px 18px;
  border: 1px solid var(--sep);
  border-radius: 16px;
  background: var(--card);
}
.flow-step h4 { margin: 0 0 4px; font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; }
.flow-step p { margin: 0; color: var(--label-2); font-size: 13px; line-height: 1.45; }

.flow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: var(--fill-2);
  color: var(--label-2);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* What goes in */
.flow-step.is-input { background: var(--fill); }
.flow-step.is-input .flow-num { background: var(--fill-2); color: var(--label-2); }

/* What the model does */
.flow-step.is-process { background: var(--dg-process-bg); border-color: var(--dg-process-line); }
.flow-step.is-process .flow-num { background: var(--dg-process); color: #fff; }
@media (prefers-color-scheme: dark) { .flow-step.is-process .flow-num { color: #14142b; } }

/* What comes out */
.flow-step.is-result { background: var(--dg-result); border-color: var(--dg-result); }
.flow-step.is-result h4 { color: #fff; }
.flow-step.is-result p { color: rgba(255, 255, 255, 0.85); }
.flow-step.is-result .flow-num { background: rgba(255, 255, 255, 0.26); color: #fff; }

/* Connector between steps: down when stacked, right when in a row */
.flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -17px;
  width: 8px;
  height: 8px;
  border-right: 1.75px solid var(--label-2);
  border-bottom: 1.75px solid var(--label-2);
  opacity: 0.5;
  transform: translateX(-50%) rotate(45deg);
}

@media (min-width: 900px) {
  .flow { grid-auto-flow: column; grid-auto-columns: 1fr; gap: 24px; }
  .flow-step:not(:last-child)::after {
    left: auto;
    right: -16px;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }
}

/* Inputs that feed one step */
.flow-inputs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.flow-inputs li {
  padding: 4px 9px;
  border: 1px dashed var(--sep);
  border-radius: 8px;
  color: var(--label-2);
  font-size: 12px;
}

/* Phased diagrams: a labelled lane holds its own short flow */
.lanes { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.lane { padding: 16px 16px 18px; border: 1px solid var(--sep); border-radius: 20px; background: var(--panel); }
.lane-label { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--label-2); font-size: 13px; font-weight: 600; }
.lane-label .sym { width: 16px; height: 16px; }
.lane .flow-step:not(.is-result):not(.is-process):not(.is-input) { background: var(--card); }

/* Breakdown: a set of parts rather than a sequence */
.breakdown { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 560px) { .breakdown { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .breakdown { grid-template-columns: repeat(3, 1fr); } }
.breakdown > li { padding: 16px; border: 1px solid var(--sep); border-radius: 16px; background: var(--card); }
.breakdown h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.breakdown h4 .sym { width: 17px; height: 17px; color: var(--label-2); }
.breakdown ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }

/* Coverage cards: the video and the university article */

.coverage {
  display: grid;
  gap: 16px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) { .coverage { grid-template-columns: repeat(2, 1fr); } }

.coverage-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--sep);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease;
}
.coverage-card:hover { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1); text-decoration: none; }

.coverage-media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--group);
}
.coverage-media img { display: block; width: 100%; height: 100%; object-fit: cover; }

.coverage-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.coverage-play span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease;
}
.coverage-card:hover .coverage-play span { background: rgba(0, 0, 0, 0.72); }
.coverage-play svg { width: 26px; height: 26px; color: #fff; margin-left: 3px; }

.coverage-plate {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}
.coverage-plate p {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(18px, 2.2vw, 23px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.coverage-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.coverage-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--label-2);
  font-size: 13px;
  font-weight: 600;
}
.coverage-title { margin: 0; font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -0.015em; }
.coverage-meta { margin: 0; color: var(--label-2); font-size: 14px; }
.coverage-cta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  color: var(--accent);
  font-size: 15px;
}

.practice-grid { display: grid; gap: 20px; }
@media (min-width: 900px) {
  .practice-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 32px; align-items: start; }
  .practice-grid .milestones { grid-template-columns: 1fr; }
}
.practice-figure .figure-frame img { aspect-ratio: auto; object-fit: contain; }

.groups-wide { max-width: 760px; margin-bottom: 8px; }

.lightbox {
  width: max-content;
  min-width: min(92vw, 460px);
  max-width: min(96vw, 1180px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--card);
  color: var(--label);
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.65); }
.lightbox img {
  display: block;
  width: auto;
  max-width: calc(min(96vw, 1180px) - 20px);
  max-height: 78vh;
  margin: 10px auto 0;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}
.lightbox-caption { max-width: 62ch; }
.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  /* The caption must not decide how wide the viewer is. The picture does. */
  width: 0;
  min-width: 100%;
}
.lightbox-caption { margin: 0; color: var(--label-2); font-size: 14px; line-height: 1.4; }

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

@media print {
  .nav-wrap, .demo, .footnote, .skip-link { display: none; }
  .section, .hero { padding: 32px 0; }
}
