/* ==================================================================
   HABITS Lab — styles
   Colours live in the variables below; dark mode redefines them.
   ================================================================== */

:root {
  --bg: #f6f4ef;
  --bg-tint: #edeae2;
  --surface: #fffefb;
  --ink: #1a1c21;
  --ink-soft: #4a4e57;
  --ink-faint: #7b7f88;
  --line: #dcd8cd;
  --accent: #0e6f68;        /* teal: links, primary buttons */
  --accent-ink: #ffffff;
  --accent-soft: #d6ebe7;
  --warm: #d4572d;          /* coral: highlights, urgent deadlines */
  --warm-soft: #f7e0d6;
  --gold: #b88a1e;
  --node-1: #0e6f68;
  --node-2: #d4572d;
  --node-3: #6b5fb5;
  --node-4: #b88a1e;
  --edge: rgba(26, 28, 33, 0.14);
  --shadow: 0 1px 2px rgba(26, 28, 33, .05), 0 8px 24px -12px rgba(26, 28, 33, .18);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

/* Dark theme: follows the system unless the visitor picked a theme */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1215;
    --bg-tint: #151a1e;
    --surface: #171c21;
    --ink: #ebe8e1;
    --ink-soft: #b5b4ae;
    --ink-faint: #868780;
    --line: #2a3137;
    --accent: #5fd1c3;
    --accent-ink: #0b1513;
    --accent-soft: #163632;
    --warm: #f08a63;
    --warm-soft: #3a2219;
    --gold: #e0b44c;
    --node-1: #5fd1c3;
    --node-2: #f08a63;
    --node-3: #a99cf0;
    --node-4: #e0b44c;
    --edge: rgba(235, 232, 225, 0.12);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1215;
  --bg-tint: #151a1e;
  --surface: #171c21;
  --ink: #ebe8e1;
  --ink-soft: #b5b4ae;
  --ink-faint: #868780;
  --line: #2a3137;
  --accent: #5fd1c3;
  --accent-ink: #0b1513;
  --accent-soft: #163632;
  --warm: #f08a63;
  --warm-soft: #3a2219;
  --gold: #e0b44c;
  --node-1: #5fd1c3;
  --node-2: #f08a63;
  --node-3: #a99cf0;
  --node-4: #e0b44c;
  --edge: rgba(235, 232, 225, 0.12);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 400; }
h2 { font-size: clamp(1.45rem, 3vw, 1.85rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
code { font-family: var(--font-mono); font-size: .88em; background: var(--bg-tint); padding: .1em .35em; border-radius: 5px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }
.wrap--narrow { max-width: 760px; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

.kicker { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 1rem; }
.kicker a { color: inherit; }
.lede { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--ink-soft); max-width: 46rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex-shrink: 0; }
.brand-mark { width: 30px; height: 30px; }
.brand-mark line { stroke: var(--ink-faint); stroke-width: 1.3; }
.brand-mark .n1 { fill: var(--node-1); } .brand-mark .n2 { fill: var(--node-3); } .brand-mark .n3 { fill: var(--node-2); }
.brand-text { font-family: var(--font-display); font-size: 1.2rem; }
.brand-text strong { font-weight: 600; letter-spacing: .02em; }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav a { display: block; padding: 6px 11px; border-radius: 999px; color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--ink); background: var(--bg-tint); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--accent-soft); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.theme-toggle, .menu-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 999px; cursor: pointer; padding: 0;
}
.theme-toggle:hover, .menu-toggle:hover { border-color: var(--ink-faint); }
.theme-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.icon-moon { display: none; }
:root[data-theme-resolved="dark"] .icon-sun { display: none; }
:root[data-theme-resolved="dark"] .icon-moon { display: block; }
.menu-toggle { display: none; gap: 4px; align-content: center; }
.menu-toggle span { display: block; width: 16px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .2s, opacity .2s; }

@media (max-width: 920px) {
  .menu-toggle { display: grid; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; margin: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none; padding: 8px 16px 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 10px 12px; font-size: 1.05rem; border-radius: 10px; }
  .header-actions { margin-left: auto; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }
}

/* ---------- buttons, tags, chips ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 600; font-size: .97rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}
.btn:hover { border-color: var(--ink-faint); transform: translateY(-1px); text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { border-color: var(--accent); filter: brightness(1.06); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: .6em 0 0; }
.tag {
  display: inline-block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .02em;
  padding: 2px 9px; border-radius: 999px; background: var(--bg-tint); color: var(--ink-soft);
  border: 1px solid var(--line); vertical-align: middle;
}
.tag--journal { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.tag--conference { background: var(--warm-soft); color: var(--warm); border-color: transparent; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .9rem; font-weight: 500; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-soft);
}
.chip:hover { color: var(--ink); border-color: var(--ink-faint); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search input {
  font: inherit; width: min(100%, 360px); padding: 10px 16px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
}
.search { flex: 1 1 260px; }
.search input { width: 100%; max-width: 380px; }
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.switch input { accent-color: var(--accent); width: 17px; height: 17px; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-inner { padding-top: clamp(72px, 12vw, 140px); padding-bottom: clamp(64px, 10vw, 120px); }
.hero-title { font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.02; max-width: 15ch; margin-bottom: .35em; }
.hero-title em { font-style: italic; color: var(--accent); }
.hero .lede { max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.wrap.section { padding-left: 16px; padding-right: 16px; }
@media (min-width: 720px) { .wrap.section { padding-left: 32px; padding-right: 32px; } }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.more { font-weight: 600; font-size: .93rem; text-decoration: none; white-space: nowrap; }
.split { display: grid; gap: 48px; }
@media (min-width: 880px) { .split { grid-template-columns: 1fr 1.25fr; gap: 64px; } }

.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); }
.page-hero h1 { margin-bottom: .3em; }
.page-body { padding-bottom: 96px; }

/* ---------- research themes ---------- */
.themes { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.theme {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.theme:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.theme h3, .theme h2 { font-size: 1.22rem; margin: 14px 0 8px; }
.theme p { color: var(--ink-soft); font-size: .97rem; margin: 0; }
.themes--large { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 48px; }
.themes--large .theme { padding: 28px; }
.icon { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.theme:nth-child(3n+2) .icon { stroke: var(--warm); }
.theme:nth-child(3n) .icon { stroke: var(--node-3); }

/* ---------- news ---------- */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 104px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.news-list li:last-child { border-bottom: 1px solid var(--line); }
.news-list time, .news-card time { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); padding-top: 3px; }
.news-list a { color: var(--ink); text-decoration: none; font-weight: 500; }
.news-list a:hover { color: var(--accent); text-decoration: underline; }

.news-year h2 { font-family: var(--font-mono); font-size: .9rem; font-weight: 600; color: var(--ink-faint); letter-spacing: .06em; margin: 40px 0 8px; }
.news-cards { list-style: none; padding: 0; margin: 0; }
.news-card { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.news-card h3 { margin: 0 0 6px; font-size: 1.3rem; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--accent); }
.news-card p { color: var(--ink-soft); margin: 0; }

/* ---------- posts / prose ---------- */
.post .page-hero { padding-bottom: 12px; }
.prose { max-width: 720px; padding-bottom: 80px; }
.prose h2 { margin-top: 1.8em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1.5em 0; padding: 0 0 0 20px; border-left: 3px solid var(--accent); color: var(--ink-soft); font-family: var(--font-display); font-size: 1.15rem; }
.prose img { border-radius: var(--radius); margin: 1.5em 0; }
.post-cover { border-radius: var(--radius); margin-bottom: 2em; }
.back-link { margin-top: 3em; }

/* ---------- people ---------- */
.group-title { font-size: 1.35rem; margin: 48px 0 20px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.people-page .group-title:first-child { margin-top: 8px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.person-link { display: block; color: var(--ink); text-decoration: none; }
.person-photo {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: var(--bg-tint); border: 1px solid var(--line);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; transition: transform .35s ease; }
a.person-link:hover .person-photo img, a.person-link:focus-visible .person-photo img { transform: scale(1.03); }
.person-photo.has-gif::after {
  content: "GIF"; position: absolute; right: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: .62rem; font-weight: 600; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--bg) 80%, transparent); color: var(--ink-soft);
  transition: opacity .2s;
}
.person-photo.is-playing::after { opacity: 0; }
.person-initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.6rem; color: var(--ink-faint);
  background: radial-gradient(circle at 30% 25%, var(--accent-soft), transparent 60%), var(--bg-tint);
}
.person-name { font-weight: 600; margin: 12px 0 2px; line-height: 1.3; }
a.person-link:hover .person-name { color: var(--accent); }
.person-role { font-size: .9rem; color: var(--ink-soft); margin: 0; line-height: 1.4; }
.person-topic { font-size: .85rem; color: var(--ink-faint); font-style: italic; margin: 2px 0 0; line-height: 1.4; }
.person-more { margin: 12px 0 0; }
.person-more .btn { padding: 7px 14px; font-size: .86rem; }
.people--strip { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.plain-list { padding-left: 1.2em; color: var(--ink-soft); }
.plain-list li { margin-bottom: .4em; }

/* PI page */
.pi-hero { padding: clamp(40px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); }
.pi-hero-inner { display: grid; gap: 36px 56px; align-items: center; }
@media (min-width: 860px) { .pi-hero-inner { grid-template-columns: minmax(0, 1fr) 340px; } }
.pi-hero h1 { margin-bottom: .15em; }
.pi-honorific { display: block; font-family: var(--font-mono); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .9rem; }
.pi-role { font-size: 1.1rem; color: var(--accent); font-weight: 600; margin: 0 0 4px; }
.pi-org { color: var(--ink-soft); margin: 0 0 22px; }
.pi-bio { font-size: clamp(1.05rem, 1.8vw, 1.16rem); color: var(--ink-soft); max-width: 40rem; }
.pi-bio p { margin: 0 0 .9em; }
.pi-bio p:last-child { margin-bottom: 0; }
.pi-bio p + p { font-size: .94em; }
.pi-jump { position: sticky; top: 64px; z-index: 40; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.pi-jump ul { list-style: none; margin: 0; padding: 10px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pi-jump ul::-webkit-scrollbar { display: none; }
.pi-jump a { display: block; white-space: nowrap; padding: 5px 12px; border-radius: 999px; font-size: .88rem; font-weight: 500; color: var(--ink-soft); text-decoration: none; }
.pi-jump a:hover { background: var(--bg-tint); color: var(--ink); }
.pi-section { scroll-margin-top: 130px; }
.pi-research { display: grid; gap: 20px; }
@media (min-width: 860px) { .pi-research { grid-template-columns: 1fr 1fr; } }
.pi-research-group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; border-top: 3px solid var(--node-1); }
.pi-research-group:nth-child(2) { border-top-color: var(--node-3); }
.pi-research-group h3 { font-size: 1.2rem; margin: 0 0 16px; }
.pi-research-group ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pi-research-group li p { margin: 4px 0 0; color: var(--ink-soft); font-size: .94rem; line-height: 1.5; }
.pi-research-group:nth-child(2) .tag--topic { background: color-mix(in srgb, var(--node-3) 16%, transparent); color: var(--node-3); }
.pi-stats { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.pi-stats li { display: grid; gap: 2px; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(140deg, var(--accent-soft), transparent 75%), var(--surface); border: 1px solid var(--line); }
.pi-stats li:nth-child(even) { background: linear-gradient(140deg, var(--warm-soft), transparent 75%), var(--surface); }
.pi-stat-num { font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--ink); }
.pi-stat-label { font-weight: 600; margin-top: 6px; }
.pi-stat-note { font-size: .85rem; color: var(--ink-soft); line-height: 1.4; }
.pi-courses { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.pi-course-card { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pi-course-card h3 { font-size: 1.05rem; margin: 0 0 12px; }
.pi-course-card .profile-list { font-size: .9rem; gap: 8px; }
.pi-service { columns: 2 320px; column-gap: 48px; display: block; }
.pi-service li { break-inside: avoid; margin-bottom: 12px; }
.pi-dated { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pi-dated li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; font-size: .94rem; }
.pi-dated span { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-faint); padding-top: 3px; }
.pi-dated p { margin: 0; color: var(--ink-soft); line-height: 1.5; }
.timeline--muted li:first-child::before { background: var(--surface); border-color: var(--warm); }
.pi-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.pi-photo { position: relative; max-width: 340px; width: 100%; justify-self: center; }
@media (min-width: 860px) { .pi-photo { justify-self: end; } }
.pi-photo::before {
  content: ""; position: absolute; inset: 18px -18px -18px 18px; border-radius: calc(var(--radius) + 6px);
  background: linear-gradient(135deg, var(--accent-soft), var(--warm-soft)); z-index: 0;
}
.pi-photo .person-photo { position: relative; z-index: 1; border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow); }
.pi-contact { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 22px 0 0; font-size: .92rem; }
.pi-contact dt { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.pi-contact dd { margin: 2px 0 0; color: var(--ink-soft); overflow-wrap: anywhere; }
.pi-body { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 96px; }
.pi-section { margin-bottom: clamp(44px, 6vw, 64px); }
.pi-section > h2 { display: flex; align-items: baseline; gap: 14px; }
.pi-section > h2::after { content: ""; flex: 1; height: 1px; background: var(--line); transform: translateY(-.3em); }
  padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  font-weight: 500; border-left: 3px solid var(--node-1);
}
.pi-cols { display: grid; gap: 44px 56px; }
@media (min-width: 900px) { .pi-cols { grid-template-columns: 1.25fr 1fr; } }
.pi-cols h2 { font-size: 1.35rem; margin-bottom: 18px; }
.pub-source { font-size: .88rem; color: var(--ink-faint); margin: -6px 0 18px; }
.pub-source a { color: var(--ink-soft); }
.pub-source--foot { margin: 24px 0 0; }
.pub-more-wrap { margin: 24px 0 0; text-align: center; }
.pub-more-wrap .btn[hidden] { display: none; }
.pub-cites { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-faint); }
.tag--data { background: color-mix(in srgb, var(--node-3) 16%, transparent); color: var(--node-3); border-color: transparent; }
.tag--book { background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); border-color: transparent; }
.pi-pubs .pub-authors mark { background: none; color: var(--ink); font-weight: 600; box-shadow: inset 0 -.4em 0 var(--accent-soft); }

.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px; display: grid; gap: 1px; font-size: .93rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--ink-faint);
}
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline-when { font-family: var(--font-mono); font-size: .76rem; color: var(--ink-faint); }
.timeline-what { color: var(--ink); font-weight: 500; line-height: 1.4; }
.timeline-where { color: var(--ink-soft); }
.profile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: .93rem; color: var(--ink-soft); }
.profile-list li { padding-left: 14px; position: relative; line-height: 1.45; }
.profile-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 5px; height: 5px; border-radius: 50%; background: var(--warm); }
.profile-list strong { display: block; color: var(--ink); font-weight: 500; }

/* ---------- publications ---------- */
.pubs { list-style: none; padding: 0; margin: 0; }
.pub { padding: 18px 0; border-top: 1px solid var(--line); }
.pub:last-child { border-bottom: 1px solid var(--line); }
.pub p { margin: 0; }
.pub-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { color: var(--ink-soft); font-size: .95rem; margin-top: 4px !important; }
.pub-authors mark { background: none; color: var(--ink); font-weight: 600; box-shadow: inset 0 -.4em 0 var(--accent-soft); }
.pub-meta { color: var(--ink-faint); font-size: .92rem; margin-top: 2px !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pub-links { display: flex; gap: 14px; margin-top: 8px !important; font-size: .88rem; font-weight: 600; }
.pub-links a { text-decoration: none; }
.pub-links a:hover { text-decoration: underline; }
.pub-year h2 { font-family: var(--font-mono); font-size: .95rem; color: var(--ink-faint); letter-spacing: .06em; margin: 36px 0 4px; }
.pub-year:first-child h2 { margin-top: 0; }
.pubs--compact .pub-title { font-size: 1.05rem; }
.empty { color: var(--ink-faint); padding: 24px 0; }

/* ---------- deadlines ---------- */
.page-body--wide { max-width: var(--wrap); }
.deadline-meta { font-size: .9rem; color: var(--ink-faint); margin: -12px 0 20px; }
.deadlines { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.deadline {
  display: grid; gap: 16px 28px; align-items: center;
  grid-template-columns: 1fr; padding: 22px 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 4px solid var(--area-color, var(--accent));
}
@media (min-width: 760px) { .deadline { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; } }
.deadline.is-past { opacity: .55; }
.deadline-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; }
.deadline-name a { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.deadline-name a:hover { color: var(--accent); }
.deadline-full { color: var(--ink-soft); font-size: .93rem; margin: 2px 0 0; }
.deadline-where { color: var(--ink-faint); font-size: .88rem; margin: 6px 0 0; }
.area-tag { font-family: var(--font-mono); font-size: .7rem; padding: 2px 8px; border-radius: 999px; color: var(--area-color); border: 1px solid currentColor; }
.deadline-steps { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.deadline-steps li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--ink-soft); }
.deadline-steps li.done { color: var(--ink-faint); text-decoration: line-through; text-decoration-color: var(--line); }
.deadline-steps li.next { color: var(--ink); font-weight: 600; }
.deadline-steps time { font-family: var(--font-mono); font-size: .82rem; white-space: nowrap; }
.countdown { text-align: right; min-width: 200px; }
@media (max-width: 759px) { .countdown { text-align: left; } }
.countdown-clock { font-family: var(--font-mono); font-size: 1.55rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.countdown-clock small { font-size: .55em; font-weight: 400; color: var(--ink-faint); margin: 0 6px 0 1px; }
.countdown-label { font-size: .82rem; color: var(--ink-faint); margin: 4px 0 0; }
.deadline.is-soon .countdown-clock { color: var(--warm); }
.deadline.is-soon { box-shadow: 0 0 0 1px color-mix(in srgb, var(--warm) 35%, transparent); }
.cal-link { font-size: .8rem; font-weight: 600; text-decoration: none; display: inline-block; margin-top: 6px; }
.tba { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tba li { padding: 14px 18px; border: 1px dashed var(--line); border-radius: 12px; font-size: .92rem; color: var(--ink-soft); }
.tba a { font-weight: 600; color: var(--ink); text-decoration: none; }
.tba a:hover { color: var(--accent); }
.tba span { display: block; color: var(--ink-faint); font-size: .85rem; margin-top: 2px; }
.credit { margin-top: 40px; font-size: .85rem; color: var(--ink-faint); }

/* ---------- teaching ---------- */
.course { margin-bottom: 56px; }
.course-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 8px; }
.course-head h2 { margin: 0; }
.course > p { color: var(--ink-soft); max-width: 46rem; }
.repos { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.repo a {
  display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s;
}
.repo a:hover { border-color: var(--accent); transform: translateY(-2px); }
.repo-name { font-family: var(--font-mono); font-weight: 600; font-size: .92rem; color: var(--accent); word-break: break-word; }
.repo-desc { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.repo-lang { font-size: .8rem; color: var(--ink-faint); display: flex; align-items: center; gap: 6px; }
.lang-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); display: inline-block; }
.lang-c { background: #555555; } .lang-html { background: #e34c26; } .lang-shell { background: #89e051; } .lang-python { background: #3572a5; }

/* ---------- posters ---------- */
.chip-count { font-family: var(--font-mono); font-size: .75em; opacity: .65; margin-left: 2px; }
.posters { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px 28px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.poster[hidden] { display: none; }
.poster { display: flex; flex-direction: column; }
.poster-frame {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 5;
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); cursor: zoom-in; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--surface) 70%, transparent), transparent 70%),
    var(--bg-tint);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.poster-frame img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 3px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 30px -12px rgba(0,0,0,.35);
  transform-origin: 50% 60%; transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease;
}
.poster-frame:hover, .poster-frame:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.poster-frame:hover img, .poster-frame:focus-visible img { transform: translateY(-4px) rotate(-.6deg) scale(1.025); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 26px 44px -16px rgba(0,0,0,.45); }
.poster:nth-child(even) .poster-frame:hover img { transform: translateY(-4px) rotate(.6deg) scale(1.025); }
.poster-zoom {
  position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink);
  opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease;
}
.poster-zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.poster-frame:hover .poster-zoom, .poster-frame:focus-visible .poster-zoom { opacity: 1; transform: none; }
@media (hover: none) { .poster-zoom { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .poster-frame img, .poster-zoom { transition: none; } .poster-frame:hover img { transform: none !important; } }
.poster-info { padding: 18px 4px 0; display: flex; flex-direction: column; flex: 1; }
.poster-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-faint); }
.tag--topic { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.poster:nth-child(3n+2) .tag--topic { background: var(--warm-soft); color: var(--warm); }
.poster-title { font-size: 1.28rem; line-height: 1.25; margin: 0 0 8px; }
.poster-title span { display: block; font-weight: 400; font-style: italic; font-size: .85em; color: var(--ink-soft); margin-top: 2px; }
.poster-authors { font-size: .92rem; color: var(--ink-soft); margin: 0 0 10px; }
.poster-authors mark { background: none; color: var(--ink); font-weight: 600; box-shadow: inset 0 -.4em 0 var(--accent-soft); }
.poster-summary { font-size: .93rem; color: var(--ink-soft); margin: 0 0 14px; }
.poster-links { display: flex; gap: 18px; margin: auto 0 0; font-size: .88rem; font-weight: 600; }
.poster-links a { text-decoration: none; }
.poster-links a:hover { text-decoration: underline; }

/* viewer */
body.has-lightbox { overflow: hidden; }
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10, 12, 14, .94); color: #ebe8e1; display: none; flex-direction: column;
}
.lightbox[open] { display: flex; animation: lb-in .2s ease; }
.lightbox::backdrop { background: rgba(10, 12, 14, .6); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lightbox[open] { animation: none; } }
.lightbox-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.lightbox-title { margin: 0; flex: 1; min-width: 0; font-family: var(--font-display); font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox-actions { display: flex; align-items: center; gap: 8px; }
.btn--small { padding: 7px 14px; font-size: .88rem; }
.lightbox .btn { background: transparent; color: #ebe8e1; border-color: rgba(255,255,255,.25); }
.lightbox .btn:hover { border-color: rgba(255,255,255,.6); }
.lightbox-btn {
  width: 42px; height: 42px; display: grid; place-items: center; padding: 0; cursor: pointer;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #ebe8e1;
}
.lightbox-btn:hover { background: rgba(255,255,255,.14); }
.lightbox-btn[hidden] { display: none; }
.lightbox-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lightbox-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px 64px; overflow: auto; }
.lightbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; background: #fff; cursor: zoom-in; box-shadow: 0 20px 60px -20px rgba(0,0,0,.8); }
.lightbox-stage img.is-zoomed { max-height: none; max-width: none; width: min(2200px, 180%); cursor: zoom-out; margin: auto; }
.lightbox-stage:has(img.is-zoomed) { align-items: flex-start; justify-content: flex-start; }
.lightbox-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(20,22,25,.7); }
.lightbox-nav--prev { left: 12px; }
.lightbox-nav--next { right: 12px; }
.lightbox-hint { margin: 0; padding: 8px 16px 12px; text-align: center; font-size: .78rem; color: rgba(235,232,225,.55); }
@media (max-width: 640px) {
  .lightbox-stage { padding: 12px; }
  .lightbox-nav { top: auto; bottom: 44px; transform: none; }
  .lightbox-hint { display: none; }
}

/* ---------- gallery (Instagram-style) ---------- */
.ig { max-width: 975px; padding-top: clamp(32px, 6vw, 64px); padding-bottom: 96px; }
.ig-profile { display: grid; grid-template-columns: auto 1fr; gap: 20px clamp(24px, 7vw, 88px); align-items: center; margin-bottom: 36px; }
.ig-avatar {
  width: clamp(88px, 18vw, 150px); aspect-ratio: 1; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 210deg, var(--node-1), var(--node-3), var(--node-2), var(--node-4), var(--node-1));
}
.ig-avatar .brand-mark {
  width: 100%; height: 100%; display: block; border-radius: 50%; padding: 22%;
  background: var(--surface); border: 3px solid var(--bg);
}
.ig-info .kicker { margin-bottom: .4rem; }
.ig-info h1 { margin: 0 0 12px; font-size: clamp(2rem, 5vw, 2.8rem); }
.ig-stats { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; color: var(--ink-soft); font-size: .97rem; }
.ig-stats strong { color: var(--ink); font-weight: 600; }
.ig-bio { margin: 0; color: var(--ink-soft); max-width: 34rem; }
@media (max-width: 560px) { .ig-profile { grid-template-columns: 1fr; justify-items: start; } }

.ig-highlights { display: flex; gap: clamp(14px, 4vw, 36px); overflow-x: auto; padding: 4px 4px 18px; margin-bottom: 8px; scrollbar-width: none; }
.ig-highlights::-webkit-scrollbar { display: none; }
.ig-highlight { flex: 0 0 auto; display: grid; justify-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; font: inherit; }
.ig-ring { width: 78px; height: 78px; border-radius: 50%; padding: 3px; background: var(--line); transition: transform .2s ease; }
.ig-highlight[aria-pressed="true"] .ig-ring { background: conic-gradient(from 210deg, var(--node-1), var(--node-3), var(--node-2), var(--node-4), var(--node-1)); }
.ig-highlight:hover .ig-ring { transform: scale(1.05); }
.ig-ring-inner { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; border: 3px solid var(--bg); background: var(--bg-tint); }
.ig-ring-inner img { width: 100%; height: 100%; object-fit: cover; }
.ig-ring-all svg { width: 28px; height: 28px; fill: none; stroke: var(--ink-soft); stroke-width: 1.6; }
.ig-highlight-label { font-size: .8rem; font-weight: 500; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-highlight[aria-pressed="true"] .ig-highlight-label { font-weight: 600; }

.ig-tabs { display: flex; justify-content: center; border-top: 1px solid var(--line); margin-bottom: 4px; }
.ig-tab { display: inline-flex; align-items: center; gap: 6px; margin-top: -1px; padding: 14px 4px; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.ig-tab.is-active { color: var(--ink); border-top: 1px solid var(--ink); }
.ig-tab svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.ig-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
@media (min-width: 736px) { .ig-grid { gap: 6px; } }
.gallery-item[hidden] { display: none; }
.gallery-frame {
  position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; cursor: pointer; overflow: hidden;
  background: var(--bg-tint); border-radius: 3px;
}
.gallery-frame::after { /* loading shimmer */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--surface) 55%, transparent) 50%, transparent 80%);
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
.is-loaded .gallery-frame::after { display: none; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
.gallery-frame img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.3,1); }
.is-loaded .gallery-frame img { opacity: 1; }
.ig-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 14px;
  background: linear-gradient(to top, rgba(10,12,14,.78), rgba(10,12,14,.15) 60%, transparent);
  color: #fff; text-align: left; opacity: 0; transition: opacity .25s ease;
}
.ig-overlay-caption { font-weight: 600; font-size: .92rem; line-height: 1.3; }
.ig-overlay-album { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.gallery-frame:hover .ig-overlay, .gallery-frame:focus-visible .ig-overlay { opacity: 1; }
.gallery-frame:hover img, .gallery-frame:focus-visible img { transform: scale(1.05); }
.gallery-frame:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 600px) { .ig-overlay { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .gallery-frame::after { animation: none; }
  .gallery-frame img, .ig-overlay, .ig-ring { transition: none; }
  .gallery-frame:hover img { transform: none; }
}

/* single-photo viewer */
.ig-viewer {
  width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(8, 9, 11, .88); display: none; place-items: center;
}
.ig-viewer[open] { display: grid; animation: lb-in .2s ease; }
.ig-viewer::backdrop { background: transparent; }
.ig-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px; width: min(1100px, calc(100vw - 140px)); height: min(86dvh, 820px);
  background: var(--surface); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7);
}
.ig-media { background: #000; display: grid; place-items: center; min-height: 0; }
.ig-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ig-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); color: var(--ink); }
.ig-side-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ig-mini-avatar { width: 36px; height: 36px; border-radius: 50%; padding: 2px; flex-shrink: 0; background: conic-gradient(from 210deg, var(--node-1), var(--node-3), var(--node-2), var(--node-4), var(--node-1)); }
.ig-mini-avatar .brand-mark { width: 100%; height: 100%; display: block; border-radius: 50%; padding: 18%; background: var(--surface); border: 2px solid var(--surface); }
.ig-side-name { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.2; }
.ig-side-album { margin: 0; font-size: .8rem; color: var(--ink-faint); }
.ig-side-caption { flex: 1; margin: 0; padding: 16px; font-size: .97rem; line-height: 1.5; overflow-y: auto; }
.ig-side-count { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: .75rem; color: var(--ink-faint); }
.ig-close, .ig-nav {
  position: fixed; display: grid; place-items: center; padding: 0; border: 0; cursor: pointer; color: #fff; z-index: 2;
}
.ig-close { top: 14px; right: 16px; width: 40px; height: 40px; background: none; }
.ig-nav { top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); color: #111; box-shadow: 0 2px 10px rgba(0,0,0,.3); }
.ig-nav:hover { background: #fff; }
.ig-nav[hidden] { display: none; }
.ig-nav--prev { left: 22px; }
.ig-nav--next { right: 22px; }
.ig-close svg, .ig-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ig-nav svg { width: 18px; height: 18px; }
@media (max-width: 860px) {
  .ig-card { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; width: calc(100vw - 24px); height: auto; max-height: 88dvh; }
  .ig-media { max-height: 70dvh; }
  .ig-side { border-left: 0; border-top: 1px solid var(--line); }
  .ig-side-caption { flex: none; }
  .ig-nav { top: auto; bottom: 18px; transform: none; }
}

/* research page teaser */
.poster-teaser { margin: 0 0 48px; }
.poster-teaser .section-head p { margin: 4px 0 0; color: var(--ink-soft); }
.poster-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.poster-strip a {
  display: grid; place-items: center; aspect-ratio: 4 / 5; padding: 18px; border-radius: var(--radius);
  background: var(--bg-tint); border: 1px solid var(--line); transition: border-color .2s ease;
}
.poster-strip a:hover { border-color: var(--accent); }
.poster-strip img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 2px; background: #fff;
  box-shadow: 0 10px 24px -12px rgba(0,0,0,.4); transition: transform .3s ease;
}
.poster-strip a:hover img { transform: translateY(-3px) scale(1.03); }
@media (prefers-reduced-motion: reduce) { .poster-strip img { transition: none; } }

/* ---------- call to action ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: 32px; border-radius: calc(var(--radius) + 4px);
  background: linear-gradient(120deg, var(--accent-soft), var(--warm-soft));
  border: 1px solid var(--line);
}
.cta h2 { margin: 0 0 4px; }
.cta p { margin: 0; color: var(--ink-soft); }
.cta .kicker { margin: 0 0 1rem; color: var(--ink-faint); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-tint); font-size: .93rem; color: var(--ink-soft); }
.footer-inner { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 32px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.footer-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--ink); margin-bottom: 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 4px; }
.footer-links a, .site-footer a { color: var(--ink-soft); }
.footer-links a:hover, .site-footer a:hover { color: var(--accent); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--ink-faint); }

/* ---------- co-author ego network (publications) ---------- */
.coauthors { margin: 0 0 48px; padding-bottom: 40px; border-bottom: 1px solid var(--line); }
.coauthors-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 16px; }
.coauthors-head h2 { margin: 0; }
.coauthors-summary { margin: 0; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-faint); }
.coauthors-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 900px) { .coauthors-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 40px; align-items: start; } }

.net-figure { position: relative; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.net { display: block; width: 100%; height: auto; overflow: visible; }
.net-edge { stroke-linecap: round; transition: opacity .15s; }
.net-edge--tie { stroke: var(--edge); }
.net-edge--spoke { stroke: var(--accent); opacity: .28; }
.net-node circle { fill: var(--node-1); stroke: var(--surface); stroke-width: 1.5; transition: opacity .15s; }
.net-node--member circle { fill: var(--node-2); }
.net-node--ego circle { fill: var(--ink); }
.net-node[role="button"] { cursor: pointer; outline: none; }
.net-node[role="button"]:focus-visible circle, .net-node.is-selected circle { stroke: var(--ink); stroke-width: 3; }
.net-ego-initials { fill: var(--bg); font-family: var(--font-display); font-size: 17px; font-weight: 600; pointer-events: none; }
.net-count { fill: var(--surface); font-family: var(--font-mono); font-size: 10px; font-weight: 600; pointer-events: none; }
.net-label { fill: var(--ink-soft); font-family: var(--font-body); font-size: 12px; font-weight: 500;
  paint-order: stroke; stroke: var(--surface); stroke-width: 3.5px; stroke-linejoin: round; pointer-events: none; }
.net-label--ego { fill: var(--ink); font-weight: 600; font-size: 13px; }
.net.has-focus .net-edge--tie:not(.is-on) { opacity: .15; }
.net.has-focus .net-edge--tie.is-on { stroke: var(--ink-faint); }
.net.has-focus .net-edge--spoke:not(.is-on) { opacity: .06; }
.net.has-focus .net-edge--spoke.is-on { opacity: .9; }
.net.has-focus .net-node:not(.is-on):not(.net-node--ego) { opacity: .22; }
.net.has-focus .net-node.is-current .net-label { fill: var(--ink); font-weight: 600; }
@media (max-width: 600px) { .net-label--minor { display: none; } .net-label { font-size: 15px; } }

.coauthor-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none; z-index: 2;
  background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 10px; font-size: .85rem; line-height: 1.35;
  white-space: nowrap; box-shadow: var(--shadow);
}
.coauthor-tip strong, .coauthor-tip span { display: block; }
.coauthor-tip span { opacity: .8; }
.coauthor-tip .coauthor-tip-tag { color: var(--warm); opacity: 1; font-weight: 600; }

.net-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 10px 4px; font-size: .8rem; color: var(--ink-faint); }
.net-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--node-1); }
.dot--member { background: var(--node-2); }
.dot--ego { background: var(--ink); }

.coauthor-side h3 { font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 10px; }
.coauthor-list { list-style: none; padding: 0; margin: 0 0 14px; }
.coauthor-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 30% 2.2em; align-items: center; gap: 12px; width: 100%;
  font: inherit; font-size: .92rem; text-align: left; color: var(--ink); background: none; border: 0; border-radius: 8px;
  padding: 6px 8px; cursor: pointer;
}
.coauthor-row:hover, .coauthor-row:focus-visible { background: var(--bg-tint); }
.coauthor-row[aria-pressed="true"] { background: var(--accent-soft); }
.coauthor-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coauthor-bar { height: 8px; border-radius: 99px; background: var(--bg-tint); overflow: hidden; }
.coauthor-bar span { display: block; height: 100%; border-radius: inherit; background: var(--node-1); }
.is-member .coauthor-bar span { background: var(--node-2); }
.coauthor-n { font-family: var(--font-mono); font-size: .85rem; text-align: right; color: var(--ink-soft); }
.coauthor-hint { font-size: .85rem; color: var(--ink-faint); margin: 12px 0 0; }
.coauthor-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: -12px 0 24px; color: var(--ink-soft); }
.coauthor-status[hidden] { display: none; }
.coauthor-status .chip { font-size: .82rem; padding: 4px 12px; }
.net-label--off { display: none; }
.net-node.is-current .net-label--off, .net-node:focus-visible .net-label--off { display: inline; }
