/* Center for Research in VIG-Robotics, CUI Lahore
   Palette: white paper, graphite ink, one deep-magenta accent.
   Type: Unbounded (wide geometric display) + Geist (text).
   Shape: 6px radius on every surface and control. The one graphic device is a Bezier path with handles. */

:root {
  --paper: #fcfcfb;
  --tint: #f2f2f0;
  --surface: #ffffff;
  --ink: #16181d;
  --ink-2: #41454f;
  --muted: #646973;
  --line: #e1e2e5;
  --accent: #c8175d;
  --accent-ink: #ffffff;
  --accent-soft: #fbe6ee;
  --accent-text: #b0144f;
  --foot: #16181d;
  --foot-ink: #fcfcfb;
  --r: 6px;
  --header-h: 70px;
  --display: "Unbounded", ui-sans-serif, system-ui, sans-serif;
  --text: "Geist", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101114; --tint: #17191e; --surface: #1b1e24; --ink: #ecedf0; --ink-2: #c0c3ca; --muted: #8c919b; --line: #2a2d34;
    --accent: #ff5b97; --accent-ink: #101114; --accent-soft: #3a1626; --accent-text: #ff7aab; --foot: #17191e; --foot-ink: #ecedf0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #101114; --tint: #17191e; --surface: #1b1e24; --ink: #ecedf0; --ink-2: #c0c3ca; --muted: #8c919b; --line: #2a2d34;
  --accent: #ff5b97; --accent-ink: #101114; --accent-soft: #3a1626; --accent-text: #ff7aab; --foot: #17191e; --foot-ink: #ecedf0; color-scheme: dark;
}

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1.0625rem/1.65 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--r); }
::selection { background: var(--accent); color: var(--accent-ink); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r); }
.skip:focus { top: 12px; }
.wrap { max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 44px); }
.ph { font-size: 1.15em; line-height: 1; }

/* ---------- buttons, links */
.btn { display: inline-flex; align-items: center; gap: .55em; padding: .85em 1.3em; border-radius: var(--r); font: 600 1rem/1 var(--text); text-decoration: none; border: 1px solid transparent; white-space: nowrap; cursor: pointer; transition: transform .2s var(--ease), background-color .2s, border-color .2s; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { transform: translateY(-1px); }
.btn-quiet { border-color: var(--line); background: var(--surface); color: var(--ink); }
.btn-quiet:hover { border-color: var(--ink); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; font-size: .92rem; font-weight: 500; background: var(--surface); transition: border-color .2s; }
.links a:hover { border-color: var(--ink); }
.links .ph { color: var(--accent-text); }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top-row { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.mark svg { width: 34px; height: 34px; color: var(--ink); }
.mark .m-acc { stroke: var(--accent); }
.mark .m-ctrl { fill: var(--paper); stroke: var(--accent); }
.mark .m-pt { fill: var(--accent); }
.mark b { font: 700 1.02rem/1 var(--display); letter-spacing: -.01em; }
.mark small { display: block; font: 500 .75rem/1.2 var(--text); color: var(--muted); margin-top: 3px; letter-spacing: 0; }
.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: var(--r); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; transition: background-color .2s, color .2s; }
.nav a:hover { background: var(--tint); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.tools { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .2s; }
.icon-btn:hover { border-color: var(--ink); }
[data-theme-toggle] .ph-sun { display: none; }
:root[data-theme="dark"] [data-theme-toggle] .ph-sun { display: inline; }
:root[data-theme="dark"] [data-theme-toggle] .ph-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [data-theme-toggle] .ph-sun { display: inline; }
  :root:not([data-theme="light"]) [data-theme-toggle] .ph-moon { display: none; }
}
.nav-toggle { display: none; }
.nav-toggle .ph-x, .nav-open .nav-toggle .ph-list { display: none; }
.nav-open .nav-toggle .ph-x { display: inline; }
@media (max-width: 1040px) {
  .nav-toggle { display: grid; }
  .tools { margin-left: auto; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 2px; margin: 0; padding: 10px clamp(16px, 4vw, 44px) 20px;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px -20px rgb(0 0 0 / .35);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav a { padding: 13px 12px; font-size: 1.08rem; }
}

/* ---------- hero */
.hero { padding-block: clamp(36px, 6vw, 80px) clamp(28px, 4vw, 48px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.kicker { font-weight: 600; color: var(--accent-text); margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 4.4rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.02; margin-bottom: 24px; }
.hero .lede { font-size: clamp(1.08rem, 1.4vw, 1.22rem); color: var(--ink-2); max-width: 46ch; margin-bottom: 30px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { margin: 0; }
.hero-photo img { width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 45% 50%; border-radius: var(--r); }
.hero-photo figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .hero-grid > *, .page-head > * { animation: rise .8s var(--ease) both; }
  .hero-grid > :nth-child(2), .page-head > :nth-child(2) { animation-delay: .12s; }
  .page-head > :nth-child(3) { animation-delay: .2s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* ---------- principle band */
.principle { border-block: 1px solid var(--line); background: var(--surface); }
.principle-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; padding-block: clamp(40px, 6vw, 72px); align-items: start; }
.principle h2 { font: 600 1rem/1.3 var(--text); color: var(--muted); letter-spacing: 0; padding-top: 10px; }
.principle blockquote { margin: 0; font: 500 clamp(1.35rem, 2.6vw, 2.2rem)/1.3 var(--display); letter-spacing: -.02em; }
.principle blockquote mark { background: linear-gradient(transparent 62%, var(--accent-soft) 62%); color: inherit; }
.principle .after { grid-column: 2; color: var(--ink-2); margin: 20px 0 0; max-width: 64ch; }

/* ---------- sections */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section.flush { padding-top: 0; }
.section.tinted { background: var(--tint); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.7rem); max-width: 20ch; }
.sec-head p { color: var(--ink-2); max-width: 46ch; margin: 0; }

/* ---------- focus areas */
.focus { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.focus p { color: var(--ink-2); }
.chip-list { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-list li { padding: 6px 12px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font-size: .92rem; font-weight: 500; }
.focus figure { margin: 0; background: #fff; border-radius: var(--r); border: 1px solid var(--line); padding: 20px; }
.focus figure img { margin-inline: auto; max-height: 340px; width: auto; }

/* ---------- bezier path */
.path-box { position: relative; aspect-ratio: 1200 / 360; margin-block: 110px 90px; }
.path-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.curve { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; }
.handle { stroke: var(--accent); stroke-width: 1.2; }
.ctrl { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.anchor { fill: var(--accent); stroke: var(--paper); stroke-width: 4; }
.milestone { position: absolute; width: 210px; text-align: left; }
.milestone b { display: block; font: 700 1.05rem/1 var(--display); color: var(--accent-text); margin-bottom: 6px; }
.milestone span { display: block; font-size: .9rem; color: var(--ink-2); line-height: 1.4; }
.path-list { display: none; list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.path-list li { position: relative; padding: 0 0 22px 24px; }
.path-list li::before { content: ""; position: absolute; left: -8px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--paper); }
.path-list b { display: block; font: 700 1rem/1.2 var(--display); color: var(--accent-text); }
.path-list span { color: var(--ink-2); font-size: .95rem; }
@media (prefers-reduced-motion: no-preference) {
  .js .path-box:not(.in) .curve { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
  .js .path-box:not(.in) .anchor, .js .path-box:not(.in) .ctrl, .js .path-box:not(.in) .handle, .js .path-box:not(.in) .milestone { opacity: 0; }
  .path-box.in .curve { stroke-dasharray: 1600; stroke-dashoffset: 1600; }
  .path-box.in .anchor, .path-box.in .ctrl, .path-box.in .handle, .path-box.in .milestone { opacity: 0; }
  .path-box.in .curve { animation: draw 2.2s var(--ease) .1s forwards; }
  .path-box.in .anchor, .path-box.in .ctrl, .path-box.in .handle, .path-box.in .milestone { animation: fade .5s var(--ease) forwards; }
  .path-box.in .a1 { animation-delay: .2s; } .path-box.in .a2 { animation-delay: .7s; } .path-box.in .a3 { animation-delay: 1.1s; }
  .path-box.in .a4 { animation-delay: 1.5s; } .path-box.in .a5 { animation-delay: 1.9s; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* ---------- projects */
.proj-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.proj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 22px; display: flex; flex-direction: column; gap: 40px; min-height: 230px; text-decoration: none; transition: border-color .2s, transform .3s var(--ease); }
a.proj:hover { border-color: var(--ink); transform: translateY(-2px); }
.proj b { font: 700 clamp(1.25rem, 2vw, 1.7rem)/1 var(--display); letter-spacing: -.02em; }
.proj span { margin-top: auto; color: var(--ink-2); font-size: .97rem; line-height: 1.45; }
.proj small { color: var(--accent-text); font-weight: 600; font-size: .85rem; display: inline-flex; gap: 4px; align-items: center; margin-top: -24px; }
.proj.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.proj.hot span, .proj.hot small { color: inherit; opacity: .92; }
.completed { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 32px; }
.completed h3 { font-size: 1.15rem; }
.completed ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.completed li { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.funder { flex: none; font-size: .78rem; font-weight: 600; padding: 3px 9px; border-radius: var(--r); background: var(--tint); color: var(--ink-2); align-self: start; white-space: nowrap; }
.funder.eu { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- video (click to load) */
.video { position: relative; display: block; width: 100%; border: 0; padding: 0; border-radius: var(--r); overflow: hidden; background: #000; cursor: pointer; aspect-ratio: 16 / 9; color: #fff; text-align: left; font: inherit; }
.video img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: opacity .3s, transform .8s var(--ease); }
.video:hover img { opacity: 1; transform: scale(1.02); }
.video .play { position: absolute; left: 20px; bottom: 20px; right: 20px; display: inline-flex; align-items: center; gap: 10px; width: fit-content; max-width: calc(100% - 40px); padding: 12px 16px; border-radius: var(--r); background: var(--accent); color: var(--accent-ink); font-weight: 600; line-height: 1.3; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.protos { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 16px; align-items: start; }
.proto-side { display: grid; gap: 16px; }
.proto-card { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; transition: border-color .2s; }
a.proto-card:hover { border-color: var(--ink); }
.proto-card img { width: 140px; height: 110px; object-fit: contain; background: #fff; border-radius: 4px; }
.proto-card b { font: 700 1rem/1.2 var(--display); display: block; margin-bottom: 4px; }
.proto-card span { font-size: .9rem; color: var(--ink-2); line-height: 1.4; display: block; }
.second-video { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: center; }
.second-video h3 { font-size: 1.3rem; margin-bottom: 10px; }
.second-video p { color: var(--ink-2); margin: 0; }

/* ---------- people (home) */
.founder { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.founder img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); }
.founder h2, .founder h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); margin-bottom: 8px; }
.founder .role { color: var(--accent-text); font-weight: 600; margin-bottom: 18px; }
.founder .bio { color: var(--ink-2); max-width: 58ch; }
.founder .links { margin-top: 20px; }
.grads { margin-top: 56px; }
.grads h3 { font-size: 1.15rem; margin-bottom: 18px; display: flex; justify-content: space-between; gap: 16px; }
.grads h3 span { font: 500 .95rem var(--text); color: var(--muted); }
.grad-row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 12px; }
.grad { display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.grad img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r); background: var(--surface); transition: transform .4s var(--ease); }
.grad:hover img { transform: translateY(-3px); }
.grad b { font: 700 .95rem/1 var(--display); color: var(--accent-text); }
.grad span { font-size: .86rem; line-height: 1.3; font-weight: 600; }

/* ---------- collaboration */
.collab { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; align-items: start; }
.big-num { margin: 0; font: 700 clamp(4rem, 9vw, 7.5rem)/.9 var(--display); letter-spacing: -.05em; color: var(--accent-text); }
.big-num + p { color: var(--ink-2); margin-top: 14px; max-width: 30ch; }
.countries { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; border-top: 1px solid var(--ink); }
.country { padding: 14px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; }
.country b { font-weight: 600; }
.country em { font-style: normal; color: var(--muted); font-size: .9rem; }
.country span { grid-column: 1 / -1; font-size: .92rem; color: var(--ink-2); }
.pde { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; }
.pde img { width: 180px; background: #fff; border-radius: 4px; }
.pde p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.pde strong { color: var(--ink); }

/* ---------- gallery */
.gallery { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px 16px; align-items: start; }
.gallery figure { margin: 0; }
.gallery .zoom { cursor: zoom-in; overflow: hidden; border-radius: var(--r); background: var(--tint); }
.gallery img { width: 100%; height: auto; object-fit: cover; transition: transform .8s var(--ease); }
.gallery .zoom:hover img { transform: scale(1.03); }
.gallery figcaption { font-size: .86rem; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.g-7 { grid-column: span 7; } .g-5 { grid-column: span 5; } .g-4 { grid-column: span 4; } .g-6 { grid-column: span 6; } .g-8 { grid-column: span 8; } .g-3 { grid-column: span 3; }
.ar-wide img { aspect-ratio: 16 / 10; } .ar-std img { aspect-ratio: 4 / 3; } .ar-tall img { aspect-ratio: 3 / 4; }

/* ---------- page head + tabs */
.page-head { padding-block: clamp(36px, 6vw, 72px) 28px; }
.page-head h1 { font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -.035em; }
.page-head p { color: var(--ink-2); max-width: 62ch; margin: 14px 0 0; font-size: 1.1rem; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--tint); border-radius: calc(var(--r) + 4px); margin-top: 22px; }
.tab { border: 0; background: transparent; padding: 9px 14px; border-radius: var(--r); font: 600 .93rem var(--text); color: var(--ink-2); cursor: pointer; min-height: 40px; }
.tab span { color: var(--muted); font-weight: 500; margin-left: 4px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgb(0 0 0 / .1); }

/* ---------- members page */
.group { padding-block: 24px 40px; }
.group[hidden] { display: none; }
.group > h2 { font-size: 1.4rem; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.group > h2 span { font: 500 .95rem var(--text); color: var(--muted); }
.faculty { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fac { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); scroll-margin-top: calc(var(--header-h) + 16px); }
.fac img { width: 150px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; }
.fac h3 { font-size: 1.15rem; margin-bottom: 4px; }
.fac .role { color: var(--accent-text); font-weight: 600; font-size: .95rem; margin-bottom: 10px; }
.fac p { color: var(--ink-2); font-size: .93rem; margin-bottom: 6px; }
.fac .links { margin-top: 12px; }
.fac .links a { padding: 6px 10px; font-size: .85rem; }
.scholars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.scholar { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); scroll-margin-top: calc(var(--header-h) + 16px); }
.scholar:target, .fac:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.scholar img { width: 96px; height: 120px; object-fit: cover; border-radius: 4px; background: var(--tint); }
.scholar h3 { font-size: 1rem; margin-bottom: 6px; }
.scholar h3 a { text-decoration: none; }
.scholar h3 a:hover { text-decoration: underline; }
.scholar .yr { display: inline-block; font: 700 .8rem/1 var(--display); color: var(--accent-text); margin-bottom: 8px; }
.scholar .thesis { font-size: .9rem; color: var(--ink-2); line-height: 1.4; margin-bottom: 10px; }
.scholar dl { margin: 0; font-size: .82rem; color: var(--muted); display: grid; grid-template-columns: auto 1fr; gap: 3px 8px; }
.scholar dt { font-weight: 600; color: var(--ink-2); }
.scholar dd { margin: 0; }
.scholar .scholar-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; font-size: .84rem; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.scholar .scholar-link:hover { text-decoration: underline; }

/* ---------- timelines (news, events) */
.year-group { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 24px; padding-block: 28px; border-top: 1px solid var(--line); }
.year-group:first-of-type { border-top: 1px solid var(--ink); }
.year-group > h2 { font-size: 1.5rem; color: var(--accent-text); position: sticky; top: calc(var(--header-h) + 20px); align-self: start; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 26px 28px; border-left: 2px solid var(--line); }
.timeline li:last-child { padding-bottom: 4px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px; border-radius: 3px; background: var(--paper); border: 2px solid var(--accent); }
.timeline time { font: 600 .9rem/1 var(--text); color: var(--muted); }
.timeline h3 { font-size: 1.12rem; margin: 8px 0 6px; font-family: var(--text); font-weight: 650; letter-spacing: -.01em; line-height: 1.35; }
.timeline p { color: var(--ink-2); max-width: 72ch; margin: 0; font-size: .97rem; }
.timeline p + p { margin-top: 8px; }
.timeline .where { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.tag { display: inline-block; font: 600 .74rem/1.6 var(--text); padding: 1px 8px; border-radius: var(--r); background: var(--accent-soft); color: var(--accent-text); margin-left: 8px; vertical-align: 2px; letter-spacing: 0; white-space: nowrap; }
.tag.neutral { background: var(--tint); color: var(--ink-2); }
.timeline li[hidden] { display: none; }
.year-group[hidden] { display: none; }

/* ---------- lab resources */
.lab-intro { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin-bottom: 24px; }
.lab-intro p { margin: 0; color: var(--ink-2); }
.lab-stats { display: flex; gap: 28px; }
.lab-stats div b { display: block; font: 700 1.6rem/1 var(--display); color: var(--accent-text); }
.lab-stats div span { font-size: .85rem; color: var(--muted); }
.equip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.equip section { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 20px 22px; }
.equip h2 { font-size: 1.05rem; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.equip h2 .ph { color: var(--accent-text); margin-right: 8px; }
.equip h2 span { font: 600 .85rem var(--text); color: var(--muted); }
.equip ul { list-style: none; margin: 0; padding: 0; }
.equip li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .94rem; }
.equip li b { font-weight: 600; }
.equip li em { font-style: normal; color: var(--accent-text); font-weight: 700; font-variant-numeric: tabular-nums; }
.equip li small { grid-column: 1 / -1; color: var(--muted); font-size: .83rem; line-height: 1.4; }

/* ---------- anomaly detection page */
.ad-hero { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding-block: clamp(36px, 6vw, 72px) clamp(40px, 6vw, 72px); }
.ad-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: -.035em; margin-bottom: 18px; }
.ad-hero p { color: var(--ink-2); font-size: 1.08rem; }
.anomaly-types { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.anomaly-types p { color: var(--ink-2); font-size: 1.1rem; max-width: 52ch; }
.types { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.types li { padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); font: 600 1.05rem var(--display); letter-spacing: -.01em; }
.anomaly-types figure { margin: 0; }
.anomaly-types figure img { border-radius: var(--r); }
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); }
.benefit { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--line); }
.benefit:not(:nth-child(3n + 1)) { padding-left: 24px; border-left: 1px solid var(--line); }
.benefit .ph { font-size: 1.6rem; color: var(--accent-text); margin-bottom: 14px; display: block; }
.benefit h3 { font-size: 1.05rem; margin-bottom: 8px; }
.benefit p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.results { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.results figure { margin: 0; cursor: zoom-in; }
.results img { border-radius: var(--r); background: #fff; }
.results p { color: var(--ink-2); }

/* ---------- footer */
.foot { background: var(--foot); color: var(--foot-ink); padding-block: 56px 28px; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; }
.foot h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); color: inherit; margin-bottom: 14px; }
.foot p { opacity: .78; margin: 0; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.foot ul a { text-decoration: none; opacity: .88; }
.foot ul a:hover { text-decoration: underline; opacity: 1; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--foot-ink) 18%, transparent); font-size: .88rem; opacity: .72; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- lightbox */
.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; background: rgb(10 11 14 / .92); opacity: 0; transition: opacity .2s; }
.lightbox.open { opacity: 1; }
.lightbox img { max-width: min(1300px, 100%); max-height: calc(100dvh - 48px); width: auto; height: auto; border-radius: var(--r); }
.lightbox button { position: absolute; top: 16px; right: 16px; background: rgb(255 255 255 / .1); border-color: rgb(255 255 255 / .3); color: #fff; }

/* ---------- responsive */
@media (max-width: 1000px) {
  .hero-grid, .principle-grid, .completed, .founder, .collab, .foot-grid, .focus, .protos, .second-video, .ad-hero, .anomaly-types, .results { grid-template-columns: 1fr; }
  .principle .after { grid-column: 1; }
  .proj-grid { grid-template-columns: 1fr 1fr; }
  .grad-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .countries { grid-template-columns: 1fr; }
  .gallery > figure { grid-column: span 6; }
  .scholars, .equip { grid-template-columns: 1fr 1fr; }
  .faculty { grid-template-columns: 1fr; }
  .benefits { grid-template-columns: 1fr 1fr; }
  .benefit, .benefit:not(:nth-child(3n + 1)) { padding: 22px 18px 22px 0; border-left: 0; }
  .benefit:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
  .path-box { display: none; }
  .path-list { display: block; }
  .hero-photo img { aspect-ratio: 4 / 3; }
}
@media (max-width: 640px) {
  .proj-grid, .scholars, .equip, .benefits, .types { grid-template-columns: 1fr; }
  .benefit:nth-child(2n) { padding-left: 0; border-left: 0; }
  .gallery > figure { grid-column: span 12; }
  .grad-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fac { grid-template-columns: 96px 1fr; }
  .fac img { width: 96px; }
  .year-group { grid-template-columns: 1fr; gap: 12px; }
  .year-group > h2 { position: static; }
  .completed li { flex-direction: column; gap: 6px; }
  .foot ul { grid-template-columns: 1fr; }
  .proto-card { grid-template-columns: 96px 1fr; }
  .proto-card img { width: 96px; height: 80px; }
  .pde { flex-direction: column; align-items: flex-start; }
  .tabs { display: flex; }
}

@media print { .top, .foot, .tabs { display: none; } body { background: #fff; color: #000; } }
.pos-top img { object-position: 50% 22%; }
