/* gineraaron.com: one stylesheet for every public page. Mobile first; wider layouts start at 720px.
   Colours are tokens on :root. Dark mode redefines them twice: when the system asks for it, and when
   the page is forced with data-theme="dark". AnRoll (anroll.css) redefines the same tokens on its body. */
:root {
  --bg: #f6f6f3;
  --fg: #16171b;
  --muted: #5f616a;
  --accent: #2f5d8c;
  --accent-strong: #234b73;
  --accent-soft: #e3ecf6;
  --on-accent: #ffffff;
  --card: #ffffff;
  --line: #e3e3de;
  --shadow-sm: 0 1px 2px rgba(18, 20, 28, .06);
  --shadow-md: 0 10px 26px -14px rgba(18, 20, 28, .22);
  --shadow-lg: 0 28px 60px -18px rgba(18, 20, 28, .32);
  --max: 1040px;
  --gutter: 16px;
  --radius: 16px;
  --radius-sm: 12px;
  --header: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e0f13;
    --fg: #eceef2;
    --muted: #9ea2ad;
    --accent: #8fb6e0;
    --accent-strong: #b3d0ee;
    --accent-soft: #1b2634;
    --on-accent: #0e0f13;
    --card: #16181e;
    --line: #2a2d36;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-md: 0 10px 26px -14px rgba(0, 0, 0, .7);
    --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, .85);
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f13;
  --fg: #eceef2;
  --muted: #9ea2ad;
  --accent: #8fb6e0;
  --accent-strong: #b3d0ee;
  --accent-soft: #1b2634;
  --on-accent: #0e0f13;
  --card: #16181e;
  --line: #2a2d36;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 26px -14px rgba(0, 0, 0, .7);
  --shadow-lg: 0 28px 60px -18px rgba(0, 0, 0, .85);
}

@media (min-width: 720px) { :root { --gutter: 24px; --radius: 18px; } }

* { box-sizing: border-box; }
/* Always reserve the scrollbar's space, so short pages (no scrollbar) and long ones line up identically. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
/* A soft light at the top of every page, behind the content. Off on AnRoll, which has its own hero. */
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, var(--accent-soft), transparent 75%);
  opacity: .9;
}
body.anroll::before { display: none; }
::selection { background: var(--accent-soft); color: var(--fg); }
img, video, iframe { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 7vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 .9em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
/* Vertical spacing only: the side gutter comes from .wrap, and a shorthand here would remove it. */
.section { padding-top: 28px; padding-bottom: 8px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 8px 12px; z-index: 60; border-radius: 8px; }
.skip:focus { left: 8px; top: 8px; }
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------------------------------------
   Header: one bar, frosted glass, always on top.
   Phones: the menu is a drop panel under the bar, over a dimmed page.
   ------------------------------------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 85%, transparent);
}
.bar { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--fg); white-space: nowrap;
}
.brand::before {
  content: "AG"; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: var(--on-accent); font-size: .74rem; font-weight: 800; letter-spacing: .04em;
  box-shadow: var(--shadow-sm);
}

/* The bar's right-hand group: the light/dark switch, then the menu button on phones. */
.bar-end { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
  background: var(--card); color: var(--fg); border: 1px solid var(--line); border-radius: 50%;
  box-shadow: var(--shadow-sm); transition: border-color .2s var(--ease), color .2s var(--ease), transform .3s var(--ease);
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:active { transform: scale(.94); }
/* Block-level spans and svg: no inline baseline/line-height gap, so the icon sits in the exact center. */
.theme-toggle > span { display: block; line-height: 0; }
.theme-toggle .icon { display: block; width: 20px; height: 20px; }
/* Show the icon for the theme the button switches to: the moon in light mode, the sun in dark. */
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.nav-toggle {
  display: inline-flex; align-items: center; gap: 10px;
  font: inherit; font-size: .92rem; font-weight: 600; color: var(--fg);
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px 0 12px; min-height: 44px; cursor: pointer; box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--accent); }
.burger { position: relative; display: block; width: 18px; height: 12px; }
.burger::before, .burger::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px;
  background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger::before { top: 0; }
.burger::after { top: 10px; }
.nav-toggle[aria-expanded="true"] .burger::before { top: 5px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .burger::after { top: 5px; transform: rotate(-45deg); }

/* The scrim dims the page under the open menu. It sits below the bar, so the bar stays readable. */
.scrim {
  position: fixed; inset: 0; z-index: 30;
  background: rgba(10, 12, 16, .38);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .25s ease, visibility 0s linear .25s;
}
html.nav-open .scrim { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .25s ease, visibility 0s; }

#site-nav {
  position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
  z-index: 50;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  max-height: calc(100vh - var(--header) - 24px); overflow-y: auto;
  transform-origin: top center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-10px) scale(.97);
  transition: opacity .2s ease, transform .3s var(--ease), visibility 0s linear .3s;
}
#site-nav.open {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity .2s ease, transform .3s var(--ease), visibility 0s;
}
#site-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#site-nav a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; padding: 0 14px; border-radius: var(--radius-sm);
  text-decoration: none; color: var(--fg); font-size: 1.04rem; font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
#site-nav a::after {
  content: ""; width: 8px; height: 8px; flex: none;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg); opacity: .35;
}
#site-nav a:hover, #site-nav a:focus-visible { background: var(--accent-soft); }
#site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 700; }
#site-nav a[aria-current="page"]::after { opacity: 1; }

/* The language switch: one segmented control, the current language lit. */
.lang-switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
}
#site-nav .lang-switch a {
  justify-content: center; min-height: 44px; padding: 0; font-weight: 700; font-size: .9rem;
  letter-spacing: .06em; color: var(--muted); border-radius: 10px;
}
#site-nav .lang-switch a::after { content: none; }
#site-nav .lang-switch a:not([aria-current="true"]):hover { background: transparent; color: var(--fg); }
#site-nav .lang-switch a[aria-current="true"] { background: var(--card); color: var(--fg); box-shadow: var(--shadow-sm); }
#site-nav li.lang-li { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

@media (min-width: 720px) {
  .nav-toggle { display: none; }
  .scrim { display: none; }
  .theme-toggle { width: 40px; height: 40px; }
  #site-nav {
    position: static; inset: auto; z-index: auto; margin-left: auto;
    background: none; border: 0; box-shadow: none; padding: 0; border-radius: 0;
    max-height: none; overflow: visible;
    opacity: 1; visibility: visible; pointer-events: auto; transform: none; transition: none;
  }
  #site-nav.open { position: static; transform: none; }
  #site-nav ul { display: flex; align-items: center; gap: 4px; }
  #site-nav a {
    min-height: 38px; padding: 0 14px; font-size: .95rem; font-weight: 500; color: var(--muted);
    border-radius: 999px;
  }
  #site-nav a::after { content: none; }
  #site-nav a:hover, #site-nav a:focus-visible { color: var(--fg); background: color-mix(in srgb, var(--fg) 6%, transparent); }
  #site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
  #site-nav li.lang-li { margin: 0 0 0 10px; padding: 0; border: 0; }
  #site-nav .lang-switch { display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px; }
  #site-nav .lang-switch a { min-height: 32px; min-width: 40px; padding: 0 10px; font-size: .78rem; border-radius: 999px; }
  #site-nav .lang-switch a[aria-current="true"] { background: var(--accent); color: var(--on-accent); box-shadow: none; }
  #site-nav .lang-switch a:not([aria-current="true"]):hover { background: transparent; }
}

/* ------------------------------------------------------------------------------------------------
   Shared bits: eyebrow pills, chips, page heads
   ------------------------------------------------------------------------------------------------ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.lead { font-size: 1.14rem; color: var(--muted); }
.where { color: var(--muted); font-size: .92rem; margin-bottom: .2em; }

/* On phones the chips form two balanced columns, so no chip is left alone on a line. */
.profile-links { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 719px) { .profile-links a { width: 100%; } }
@media (min-width: 720px) { .profile-links { display: flex; flex-wrap: wrap; } }
.profile-links a {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 999px;
  text-decoration: none; color: var(--fg); font-size: .92rem; font-weight: 500;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.profile-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.page-head { padding-top: 44px; padding-bottom: 4px; }
.page-head h1 { margin: 0; }
@media (min-width: 720px) { .page-head { padding-top: 64px; } }

/* ------------------------------------------------------------------------------------------------
   Start page
   ------------------------------------------------------------------------------------------------ */
.hero { display: grid; gap: 24px; padding-top: 36px; padding-bottom: 20px; align-items: center; }
.portrait {
  width: 132px; height: 132px; border-radius: 50%; object-fit: cover; justify-self: start;
  border: 4px solid var(--card);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-md);
}
.hero h1 { margin-bottom: .3em; }
.hero p:not(.eyebrow) { color: var(--muted); font-size: 1.05rem; max-width: 36em; }
@media (min-width: 720px) {
  .hero { grid-template-columns: 200px 1fr; gap: 48px; padding-top: 64px; }
  .portrait { width: 200px; height: 200px; }
}

/* Category cards: an icon tile, an index, a glow on hover, and an arrow that moves. */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
.card {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 176px; padding: 24px;
  border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--fg);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card::before {
  content: ""; position: absolute; z-index: -1; right: -70px; bottom: -90px;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 70%);
  opacity: 0; transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px); box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
.card:hover::before, .card:focus-visible::before { opacity: 1; transform: scale(1.15); }
.card-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  transition: background .35s var(--ease), color .35s var(--ease);
}
.card:hover .card-icon { background: var(--accent); color: var(--on-accent); }
.card-index {
  position: absolute; top: 24px; right: 24px;
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card h3 { margin: 8px 0 0; font-size: 1.22rem; }
/* A lone card takes the full row rather than leaving half the grid empty. */
.cards > :only-child { grid-column: 1 / -1; }
.card p { color: var(--muted); margin: 0; }
.card .more {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent); font-weight: 600; font-size: .94rem;
}
.card .more .arrow { transition: transform .35s var(--ease); }
.card:hover .more .arrow, .card:focus-visible .more .arrow { transform: translateX(5px); }
.arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------------------------------------------------------
   CV sections: experience and education as cards on a quiet line.
   ------------------------------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------------------------------
   Timeline (experience, education). A line runs down the page; each entry has a dot on it.
   Phones: the date sits above its card, the line runs down the left.
   PCs: the dates sit in their own column, the line runs between dates and cards.
   The first entry, the current one, has a filled dot.
   ------------------------------------------------------------------------------------------------ */
.timeline {
  position: relative; list-style: none; margin: 0; padding: 0;
}
.timeline::before {
  content: ""; position: absolute; top: 8px; bottom: 8px; left: 6px; width: 2px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--line) 85%, transparent);
}
.timeline li { position: relative; padding-left: 36px; margin-bottom: 22px; }
.timeline li:last-child { margin-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; box-sizing: border-box;
  border-radius: 50%; border: 3px solid var(--accent); background: var(--bg);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.timeline li:first-child::before {
  background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft);
}
.timeline li:hover::before { transform: scale(1.2); }

.timeline .when {
  display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent);
  font-size: .78rem; font-weight: 700; letter-spacing: .03em;
}
.tl-card {
  padding: 20px 20px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.timeline li:hover .tl-card { transform: translateX(3px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.item-title { font-size: 1.14rem; margin: 0 0 6px; border: 0; padding: 0; line-height: 1.3; }
.timeline .where { color: var(--fg); font-weight: 600; font-size: .95rem; margin: 0 0 8px; opacity: .85; }
.timeline p:not(.when):not(.where) { color: var(--muted); margin: 0 0 6px; }
.timeline p:last-child { margin-bottom: 0; }

@media (min-width: 720px) {
  /* Date column 200px, a 48px gutter; the line runs down its middle and fades at both ends. */
  .timeline::before { left: 223px; top: 26px; bottom: 0; }
  .timeline li {
    display: grid; grid-template-columns: 200px 1fr; column-gap: 48px;
    padding-left: 0; margin-bottom: 26px;
  }
  .timeline li::before { left: 217px; top: 26px; }
  .timeline .when {
    grid-column: 1; grid-row: 1; justify-self: end; align-self: start;
    margin: 20px 0 0; white-space: nowrap;
  }
  .tl-card { grid-column: 2; grid-row: 1; padding: 22px 24px 20px; }
  .timeline li:hover .tl-card { transform: translateX(4px); }
  .item-title { font-size: 1.2rem; }
}

/* ------------------------------------------------------------------------------------------------
   Publications: grouped by year, native cards with inline PDF / DOI / Project / Abstract / BibTeX.
   ------------------------------------------------------------------------------------------------ */
.pub-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px;
}
.pub-summary { margin: 10px 0 0; color: var(--muted); font-size: .98rem; }
.pub-all-bib {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--fg); text-decoration: none; font-size: .9rem; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.pub-all-bib .icon { width: 17px; height: 17px; color: var(--accent); }
.pub-all-bib:hover, .pub-all-bib:focus-visible {
  border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md);
}

.pub-year-group { margin-bottom: 38px; }
.pub-year-group:last-child { margin-bottom: 0; }
.pub-year {
  display: flex; align-items: center; gap: 14px; margin: 0 0 18px;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .04em; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.pub-year::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right, var(--line), transparent);
}

.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.pub-card {
  position: relative; padding: 22px 22px 20px;
  border-radius: var(--radius); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.pub-card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-md);
}
@media (min-width: 720px) { .pub-card { padding: 26px 28px 24px; } }

.pub-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px;
}
.pub-badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em;
}
.pub-badge-type {
  background: var(--accent-soft); color: var(--accent);
}
.pub-badge-venue {
  background: color-mix(in srgb, var(--fg) 7%, transparent); color: var(--fg);
}
.pub-date {
  margin-left: auto; color: var(--muted); font-size: .84rem; font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.pub-title {
  margin: 0 0 8px; font-size: clamp(1.12rem, 2.6vw, 1.32rem); line-height: 1.32;
  letter-spacing: -.015em;
}
.pub-title a { color: var(--fg); text-decoration: none; transition: color .2s var(--ease); }
.pub-title a:hover, .pub-title a:focus-visible { color: var(--accent); }

.pub-authors {
  margin: 0 0 6px; color: var(--muted); font-size: .96rem; line-height: 1.5;
}
.pub-self {
  color: var(--fg); font-weight: 650;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.pub-venue {
  margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5;
}
.pub-venue em { font-style: italic; color: color-mix(in srgb, var(--fg) 84%, var(--muted)); }

.pub-actions {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px;
}
.pub-btn {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 13px;
  border-radius: 999px; font: inherit; font-size: .86rem; font-weight: 600;
  text-decoration: none; cursor: pointer;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line);
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.pub-btn .icon { width: 15px; height: 15px; }
.pub-btn:hover, .pub-btn:focus-visible {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
}
.pub-btn[aria-expanded="true"] {
  border-color: var(--accent); color: var(--accent); background: var(--accent-soft);
}
.pub-btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--on-accent);
}
.pub-btn-primary:hover, .pub-btn-primary:focus-visible {
  background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent);
}

.pub-drawer {
  margin-top: 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line); overflow: hidden;
}
.pub-drawer[hidden] { display: none; }
.pub-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 14px; border-bottom: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; color: var(--muted);
}
.pub-drawer-label code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .82rem; color: var(--fg);
}
.pub-abstract {
  margin: 0; padding: 14px 16px; color: var(--fg); font-size: .94rem; line-height: 1.6;
}
.pub-bibtex {
  margin: 0; padding: 14px 16px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: .82rem; line-height: 1.55; color: var(--fg);
}
.pub-copy {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px;
  border-radius: 999px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer;
  background: var(--card); color: var(--fg); border: 1px solid var(--line);
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.pub-copy .icon { width: 14px; height: 14px; }
.pub-copy .i-check { display: none; }
.pub-copy.copied { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.pub-copy.copied .i-copy { display: none; }
.pub-copy.copied .i-check { display: inline-flex; }
.pub-copy:hover, .pub-copy:focus-visible { border-color: var(--accent); color: var(--accent); }

/* ------------------------------------------------------------------------------------------------
   Project pages
   ------------------------------------------------------------------------------------------------ */
.project { padding-top: 36px; }
.project-head { padding-bottom: 8px; }
.project-head h1 { margin-top: 0; }
.project-head .eyebrow a { display: inline-flex; align-items: center; gap: 6px; }
.project .section ul { padding-left: 1.2em; }
.project .section h3 { margin-top: 1.4em; }

.downloads { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .downloads { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.download {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border-radius: var(--radius-sm); background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  text-decoration: none; color: var(--fg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.download:hover, .download:focus-visible {
  transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--accent);
}
.download-icon {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.download-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.download-label { font-weight: 650; color: var(--fg); }
.download-note { color: var(--muted); font-size: .9rem; line-height: 1.45; }
.download-note:empty { display: none; }

.media-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .media-grid { grid-template-columns: 1fr 1fr; gap: 20px; } }
video { width: 100%; border-radius: var(--radius); background: #000; box-shadow: var(--shadow-md); }

/* ------------------------------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------------------------------ */
.site-footer {
  margin-top: 72px; border-top: 1px solid var(--line);
  padding: 26px 0 40px; color: var(--muted); font-size: .92rem;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 500; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.site-footer .sep { opacity: .5; margin: 0 6px; }

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