/* =========================================================
   Hurdiss Lab — site styles
   Colours live in :root; edit them there to re-theme the site.
   ========================================================= */
:root {
  --bg: #07090d;
  --bg-alt: #0b0f15;
  --surface: #10151d;
  --surface-2: #151c26;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #e9eef4;
  --muted: #8d99a8;
  --accent: #5ee1e6;      /* cyan */
  --accent-2: #a594ff;    /* violet */
  --accent-3: #ffb86b;    /* amber */
  --grad: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 60%, #ff8fc7 100%);
  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--font);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(94, 225, 230, .5); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
p a, .lede a, li a { color: var(--accent); text-decoration: none; }
p a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); font-size: .8rem; letter-spacing: .02em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { width: min(860px, 100% - 32px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.eyebrow {
  font-family: var(--mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); margin-bottom: 14px; display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; opacity: .7; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 13, .72);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.logo-mark { width: 26px; height: 26px; color: var(--accent); }
.site-nav { display: flex; gap: 4px; }
.site-nav a { text-decoration: none; font-size: .9rem; color: var(--muted); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.site-nav a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.08); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; height: 1.6px; background: var(--text); margin: 6px 0; transition: transform .25s; }
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.8px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(7, 9, 13, .97); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 8px; border-radius: 8px; font-size: 1rem; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; font-size: .95rem;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn .arrow { width: 18px; height: 18px; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-primary { background: var(--text); color: #05070a; }
.btn-primary:hover { background: var(--accent); color: #05070a; }
.btn-ghost { border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.link-arrow .arrow { width: 16px; height: 16px; transition: transform .2s; }
.link-arrow:hover { color: var(--accent); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 9vw, 110px) 0 48px; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(94, 225, 230, .13), rgba(165, 148, 255, .07) 55%, transparent 75%);
  pointer-events: none;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-copy h1 { margin-bottom: 24px; }
.lede { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: #b8c2cf; max-width: 60ch; }
.hero-figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.hero-orbit {
  position: relative; width: min(440px, 80vw); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
}
.hero-orbit::before, .hero-orbit::after {
  content: ""; position: absolute; inset: -6%; border-radius: 50%; border: 1px dashed rgba(94, 225, 230, .22);
  animation: spin 80s linear infinite reverse;
}
.hero-orbit::after { inset: -14%; border-style: solid; border-color: rgba(165, 148, 255, .1); }
.hero-orbit img {
  width: 100%; height: 100%; object-fit: contain;
  /* RCSB images have a white background: invert + rotate hue keeps the colours but makes the background black, then 'screen' drops it */
  filter: invert(1) hue-rotate(180deg) saturate(1.35) brightness(1.08);
  mix-blend-mode: screen;
  animation: spin 120s linear infinite;
}
.hero-figure figcaption { color: var(--muted); display: flex; align-items: center; gap: 8px; text-align: center; }
.hero-figure figcaption a { color: var(--accent); text-decoration: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 64px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hero-stats div { background: rgba(11, 15, 21, .85); padding: 20px 22px; display: flex; flex-direction: column; gap: 2px; }
.hero-stats strong { font-family: var(--display); font-size: 1.8rem; font-weight: 600; letter-spacing: -.02em; }
.hero-stats span { color: var(--muted); font-size: .85rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
  .hero-orbit { width: min(300px, 70vw); }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { position: relative; padding: clamp(56px, 8vw, 96px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::before {
  content: ""; position: absolute; right: -15%; top: -60%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(165, 148, 255, .12), rgba(94, 225, 230, .06) 50%, transparent 72%);
  pointer-events: none;
}
.page-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.6rem); max-width: 20ch; position: relative; }
.page-hero .lede { position: relative; }

/* ---------- sections ---------- */
.section { padding: clamp(64px, 8vw, 104px) 0; }
.section-tight { padding-top: 48px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.row-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; max-width: none; }
.row-head h2 { margin: 0; }

/* themes */
.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.theme-card {
  position: relative; background: linear-gradient(180deg, var(--surface) 0%, rgba(16, 21, 29, .6) 100%);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; overflow: hidden;
  transition: border-color .3s, translate .3s;
}
.theme-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: var(--grad); opacity: 0; transition: opacity .3s;
}
.theme-card:hover { border-color: var(--line-strong); translate: 0 -3px; }
.theme-card:hover::after { opacity: 1; }
.theme-num { color: var(--accent); display: block; margin-bottom: 36px; }
.theme-card h3 { font-size: 1.3rem; margin-bottom: 14px; }
.theme-card p { color: var(--muted); margin: 0; font-size: .95rem; }
.outro { margin-top: 40px; max-width: 70ch; color: #b8c2cf; font-size: 1.05rem; }
@media (max-width: 900px) { .theme-grid { grid-template-columns: 1fr; } }

/* structure strip (home) */
.struct-strip { display: grid; grid-template-columns: repeat(8, 1fr); gap: 14px; }
.strip-item {
  position: relative; aspect-ratio: 1; border-radius: var(--radius-sm); background: radial-gradient(circle at 50% 45%, #141b26, #0a0d12 70%);
  border: 1px solid var(--line); overflow: hidden; text-decoration: none; transition: border-color .25s, transform .25s;
}
.strip-item img { width: 100%; height: 100%; object-fit: contain; padding: 10%; filter: invert(1) hue-rotate(180deg) saturate(1.3); mix-blend-mode: screen; transition: transform .5s; }
.strip-item span { position: absolute; left: 10px; bottom: 8px; color: var(--muted); font-size: .72rem; }
.strip-item:hover { border-color: rgba(94, 225, 230, .4); transform: translateY(-3px); }
.strip-item:hover img { transform: scale(1.08) rotate(6deg); }
@media (max-width: 1000px) { .struct-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .struct-strip { grid-template-columns: repeat(2, 1fr); } }

/* highlights */
.hl-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.hl-grid--home { grid-template-columns: repeat(3, 1fr); }
.hl-card {
  display: flex; flex-direction: column; text-decoration: none; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; transition: border-color .3s, translate .3s;
}
.hl-card:hover { border-color: rgba(94, 225, 230, .35); translate: 0 -4px; color: inherit; }
.hl-img { background: #fff; aspect-ratio: 1098 / 659; overflow: hidden; }
.hl-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hl-card:hover .hl-img img { transform: scale(1.03); }
.hl-body { padding: 20px 22px 24px; }
.hl-journal { color: var(--accent); margin-bottom: 8px; }
.hl-body h3 { font-size: 1.08rem; margin-bottom: 10px; }
.hl-body p:last-child { margin: 0; }
@media (max-width: 1000px) { .hl-grid--home { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .hl-grid, .hl-grid--home { grid-template-columns: 1fr; } }

/* news */
.news-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.news-timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.news-img { aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-img--empty { display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #18202c, #0d1118); }
.news-img--empty .logo-mark { width: 54px; height: 54px; opacity: .5; }
.news-body { padding: 18px 20px 22px; }
.news-body time { color: var(--accent); display: block; margin-bottom: 8px; }
.news-body p { margin: 0; font-size: .95rem; }
@media (max-width: 1000px) { .news-grid, .news-timeline { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .news-grid, .news-timeline { grid-template-columns: 1fr; } }

/* team teaser */
.team-teaser { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.team-teaser img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
@media (max-width: 860px) { .team-teaser { grid-template-columns: 1fr; } }

/* ---------- research page ---------- */
.prose-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: start; }
.prose p { font-size: 1.06rem; color: #c3ccd7; }
.prose h3 { margin-top: 2em; }
.method-panel { position: sticky; top: 96px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.method-list { list-style: none; margin: 0; padding: 0; }
.method-list li { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; }
.method-list li:first-child { border-top: 0; padding-top: 0; }
.method-list span { font-family: var(--display); font-weight: 500; font-size: 1.05rem; }
.method-list small { color: var(--muted); }
@media (max-width: 860px) { .prose-grid { grid-template-columns: 1fr; } .method-panel { position: static; } }

.grant-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grant { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 20px 22px; font-size: .92rem; color: var(--muted); }
.grant strong { display: block; color: var(--text); font-family: var(--display); font-size: 1.05rem; font-weight: 600; margin-bottom: 6px; }
@media (max-width: 760px) { .grant-list { grid-template-columns: 1fr; } }
.impact h3 { color: var(--text); }

/* ---------- structures page ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font: 500 .85rem var(--font); color: var(--muted); background: transparent; border: 1px solid var(--line-strong);
  padding: 7px 14px; border-radius: 999px; cursor: pointer; transition: all .2s;
}
.chip span { font-family: var(--mono); font-size: .72rem; opacity: .7; margin-left: 4px; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.is-active { background: var(--text); color: #05070a; border-color: var(--text); }
.struct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.struct-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .3s; scroll-margin-top: 90px; }
.struct-card:hover, .struct-card:target { border-color: rgba(94, 225, 230, .35); }
.struct-card[hidden] { display: none; }
.struct-img {
  position: relative; display: block; width: 100%; aspect-ratio: 1; border: 0; padding: 0; cursor: pointer;
  background: radial-gradient(circle at 50% 45%, #161e2a, #090c11 72%);
}
.struct-img img { width: 100%; height: 100%; object-fit: contain; padding: 8%; filter: invert(1) hue-rotate(180deg) saturate(1.3); mix-blend-mode: screen; transition: transform .6s; }
.struct-img:hover img { transform: scale(1.06); }
.view3d {
  position: absolute; right: 12px; bottom: 12px; font: 500 .75rem var(--mono); color: var(--text);
  background: rgba(7, 9, 13, .7); border: 1px solid var(--line-strong); padding: 5px 10px; border-radius: 999px;
  opacity: 0; transform: translateY(4px); transition: all .25s;
}
.struct-img:hover .view3d, .struct-img:focus-visible .view3d { opacity: 1; transform: none; }
@media (hover: none) { .view3d { opacity: 1; transform: none; } }
.struct-meta { padding: 16px 18px 20px; display: flex; flex-direction: column; }
.struct-id { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.struct-id a { color: var(--accent); text-decoration: none; font-weight: 500; }
.struct-meta h3 { font-size: .98rem; font-family: var(--font); font-weight: 500; letter-spacing: 0; line-height: 1.4; margin-bottom: 6px; }
.struct-meta p { margin: 0; }

.viewer {
  width: min(1100px, 100vw - 32px); height: min(760px, 100vh - 48px); padding: 0; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg); color: var(--text); overflow: hidden;
}
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(3, 4, 6, .78); backdrop-filter: blur(6px); }
.viewer-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.viewer-head .eyebrow { margin: 0 0 4px; }
.viewer-head h3 { margin: 0; font-size: 1.05rem; }
.viewer-actions { display: flex; align-items: center; gap: 10px; }
.viewer-close { background: none; border: 1px solid var(--line-strong); color: var(--text); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.viewer-close:hover { border-color: var(--accent); color: var(--accent); }
.viewer-canvas { position: relative; flex: 1; min-height: 0; }
.viewer-note { padding: 10px 20px; margin: 0; border-top: 1px solid var(--line); }
@media (max-width: 600px) { .viewer-head { flex-direction: column; align-items: flex-start; } }

/* ---------- people ---------- */
.team-photo { margin: 0 0 32px; }
.team-photo img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.team-photo figcaption { color: var(--muted); margin-top: 10px; text-align: right; }
.team-intro { max-width: 75ch; color: #c3ccd7; font-size: 1.06rem; }
.pi-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; margin-bottom: 48px; }
.pi-card { display: flex; gap: 28px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.pi-card img { width: 140px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.pi-card h2 { font-size: 1.8rem; margin-bottom: 4px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.tag { font: 500 .75rem var(--mono); color: var(--accent); border: 1px solid rgba(94, 225, 230, .3); padding: 4px 10px; border-radius: 999px; }
.pi-links { display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; }
.pi-links a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.pi-links a:hover { color: var(--accent); border-color: var(--accent); }
.subhead { font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; font-family: var(--mono); font-weight: 500; color: var(--muted); margin-bottom: 18px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; padding: 0 0 18px 22px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.timeline span { color: var(--accent); }
.timeline p { margin: 2px 0 0; font-size: .95rem; color: #c3ccd7; }
.honours { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.honour { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; }
.honour summary { cursor: pointer; list-style: none; display: flex; gap: 14px; align-items: baseline; }
.honour summary::-webkit-details-marker { display: none; }
.honour summary::after { content: "+"; margin-left: auto; color: var(--muted); font-family: var(--mono); }
.honour[open] summary::after { content: "–"; }
.honour summary span { color: var(--accent); flex-shrink: 0; }
.honour summary strong { font-weight: 500; }
.honour p { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
@media (max-width: 900px) { .pi-grid, .honours { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .pi-card { flex-direction: column; } }

.people-cols { columns: 3 280px; column-gap: 28px; }
.people-group { break-inside: avoid; margin-bottom: 32px; }
.people-group h3 { font-size: 1.1rem; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.people-group h4 { color: var(--muted); font-weight: 400; margin: 14px 0 6px; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; }
.people-list { list-style: none; margin: 0; padding: 0; }
.person { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.person strong { display: block; font-weight: 500; line-height: 1.3; }
.person small { color: var(--muted); font-size: .72rem; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; font-size: .75rem; color: #05070a; font-weight: 500;
  background: var(--grad);
}
.alumni .avatar { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-strong); }

/* ---------- publications ---------- */
.pub-tools { position: sticky; top: 64px; z-index: 5; background: rgba(7, 9, 13, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 16px 0 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.pub-tools .filter-bar { margin-bottom: 10px; }
.pub-tools .chip { padding: 5px 11px; font-size: .8rem; }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 16px; margin-bottom: 14px; }
.search:focus-within { border-color: var(--accent); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.search input { flex: 1; background: none; border: 0; color: var(--text); font: 400 1rem var(--font); padding: 12px 0; outline: none; min-width: 0; }
.pub-year { display: grid; grid-template-columns: 90px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.pub-year[hidden] { display: none; }
.pub-year h2 { font-size: 1.1rem; color: var(--accent); position: sticky; top: 240px; align-self: start; }
.pub-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 26px; }
.pub[hidden] { display: none; }
.pub h3 { font-family: var(--font); font-weight: 600; font-size: 1.05rem; line-height: 1.4; letter-spacing: -.005em; margin-bottom: 6px; }
.pub h3 a { text-decoration: none; }
.pub-authors { color: var(--muted); font-size: .9rem; margin-bottom: 4px; }
.pub-authors .me { color: var(--text); font-weight: 600; }
.pub-venue { font-size: .9rem; color: #c3ccd7; margin-bottom: 8px; }
.pub-links { display: flex; gap: 8px; }
.pub-links a { text-decoration: none; color: var(--accent); border: 1px solid rgba(94, 225, 230, .3); padding: 2px 10px; border-radius: 999px; font-size: .72rem; }
.pub-links a:hover { background: rgba(94, 225, 230, .1); }
.badge { font: 500 .68rem var(--mono); color: var(--accent-3); border: 1px solid rgba(255, 184, 107, .35); padding: 2px 8px; border-radius: 999px; vertical-align: middle; margin-left: 6px; white-space: nowrap; }
@media (max-width: 640px) { .pub-year { grid-template-columns: 1fr; gap: 12px; } .pub-year h2 { position: static; } }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.contact-card p:last-child { margin: 0; line-height: 1.8; }
.link-list { list-style: none; padding: 0; margin: 0; }
.link-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.link-list li:first-child a { border-top: 0; }
.link-list .arrow { width: 16px; height: 16px; color: var(--muted); transition: transform .2s; }
.link-list a:hover { color: var(--accent); }
.link-list a:hover .arrow { transform: translateX(3px); color: var(--accent); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 28px; background: var(--bg-alt); }
.footer-grid { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-grid .muted { margin-top: 14px; font-size: .88rem; }
.footer-links { display: grid; grid-template-columns: repeat(2, auto); gap: 8px 32px; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: var(--accent); }
.footer-base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.footer-base a { color: var(--muted); }

/* ---------- reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease, border-color .3s; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
