/*
 * Seongtae Bang, site styles.
 *
 * Newsreader for headings and Instrument Sans for text, both self-hosted.
 * One color per research thread, used as a marker (chips, charts, stack,
 * paper cards) rather than as decoration.
 */

@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/newsreader-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/newsreader-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/instrument-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f8;
  --text: #0f172a;
  --ink-2: #1e293b;
  --muted: #475569;
  --soft: #5b6a80;
  --line: #e2e8f0;
  --line-soft: rgba(226, 232, 240, 0.9);

  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-rgb: 37, 99, 235;
  --venue: #3730a3;
  --venue-rgb: 55, 48, 163;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-lift: 0 2px 6px rgba(15, 23, 42, 0.05), 0 16px 36px rgba(15, 23, 42, 0.08);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Instrument Sans", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max: 1140px;
}

/* One color per research area: --tc for text, --tc-fill for bars and pills. */
.t-memory { --tc: #2563eb; --tc-fill: #2563eb; --tc-rgb: 37, 99, 235; }
.t-execution { --tc: #0f766e; --tc-fill: #0d9488; --tc-rgb: 13, 148, 136; }
.t-training { --tc: #c2410c; --tc-fill: #ea580c; --tc-rgb: 234, 88, 12; }
.t-arch { --tc: #6d28d9; --tc-fill: #7c3aed; --tc-rgb: 124, 58, 237; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-deep); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; }

.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 20px;
  top: -80px;
  z-index: 50;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
}
.skip:focus { top: 12px; color: #fff; }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 247, 251, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 24px;
  min-height: 70px;
  transition: min-height 0.18s ease;
}
.site-header { transition: box-shadow 0.2s ease; }
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06); }
.site-header.is-scrolled .header-inner { min-height: 58px; }
.brand {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand:hover { color: var(--text); }
.site-nav { display: flex; gap: 26px; }
.site-nav a { position: relative; color: #334155; font-size: 0.93rem; font-weight: 600; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -5px;
  height: 1px;
  background: currentColor;
  transition: right 0.18s ease;
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { right: 0; }
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--brand); }
section[id], .topic-item[id] { scroll-margin-top: 88px; }

/* Hero ------------------------------------------------------------------ */

.hero { position: relative; isolation: isolate; padding: 76px 0 36px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 1rem;
  font-weight: 600;
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(3rem, 6vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.hero-role {
  margin: 0 0 18px;
  color: var(--ink-2);
  font-size: 1.1rem;
  font-weight: 600;
}
.availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 7px 15px 7px 12px;
  border: 1px solid rgba(22, 163, 74, 0.24);
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.08);
  color: #166534;
  font-size: 0.9rem;
  font-weight: 650;
  line-height: 1.4;
}
.availability-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.18);
}
.lead {
  max-width: 40em;
  margin: 0;
  color: var(--ink-2);
  font-size: 1.12rem;
}
.accent-memory { color: #2563eb; font-weight: 650; }
.accent-execution { color: #0f766e; font-weight: 650; }
.accent-training { color: #c2410c; font-weight: 650; }
.intro-note {
  max-width: 690px;
  margin: 18px 0 0;
  padding-left: 13px;
  border-left: 3px solid rgba(var(--brand-rgb), 0.35);
  color: var(--ink-2);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.6;
}
.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
  margin: 18px 0 0;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}
.hero-highlights-label {
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 600;
}
.hero-highlights a { color: var(--ink-2); font-weight: 600; }
.hero-highlights a:hover { color: var(--brand); }
.hero-highlights .venue-inline { margin-left: 3px; font-weight: 750; }

.signals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-width: 540px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.signal {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 600;
}
.signal-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(var(--tc-rgb), 0.1);
  color: var(--tc);
}
.signals > li { display: flex; }
.signals .signal { width: 100%; }
a.signal { transition: border-color 0.2s ease, color 0.2s ease; }
a.signal:hover { border-color: rgba(var(--tc-rgb), 0.45); color: var(--tc); }
.paper-note { margin: 8px 0 0; color: var(--soft); font-size: 0.82rem; font-weight: 600; }
.paper-note::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--good, #16a34a); }
.signal-icon svg { width: 16px; height: 16px; }
.signal-icon { transition: transform 0.17s ease; }
.signal:hover .signal-icon { transform: scale(1.06); }

.link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 10px; margin-top: 26px; }
.profile-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-left: 12px; }
.profile-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); font-size: 0.93rem; font-weight: 600; }
.profile-links a:hover { color: var(--brand); }
.profile-links svg { width: 16px; height: 16px; flex: none; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}
.button:hover { color: var(--brand); border-color: rgba(var(--brand-rgb), 0.35); background: rgba(var(--brand-rgb), 0.04); transform: translateY(-1px); }
.button.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 20px rgba(var(--brand-rgb), 0.28); }
.button.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }

.hero-photo { margin: 0; }
.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: var(--surface-2);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.chart { margin: 0; }
.card .chart { margin: 4px 0 2px; }
.chart figcaption { margin-bottom: 4px; color: var(--soft); font-size: 0.78rem; font-weight: 700; }
.bar-row {
  display: grid;
  grid-template-columns: 7.4rem minmax(0, 1fr) 3.2rem;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.bar-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.bar-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #e9eef6;
}
.bar-track::after {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: var(--one);
  border-left: 1.5px dashed rgba(15, 23, 42, 0.35);
}
.bar-fill {
  display: block;
  width: var(--w);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(var(--tc-rgb), 0.7), var(--tc-fill));
  animation: bar-grow 1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s both;
}
@keyframes bar-grow { from { width: 0; } }
.bar-value {
  color: var(--tc);
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.bar-axis { margin-top: 2px; }
.bar-axis .bar-track { height: auto; background: none; }
.bar-axis .bar-track::after { content: none; }
.bar-one {
  display: inline-block;
  margin-left: var(--one);
  transform: translateX(-50%);
  color: var(--soft);
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Sections ---------------------------------------------------------------- */

.section { padding: 64px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 26px;
}
.section-head h2,
.section-title {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 2.6rem);
}
.section-head > a { margin-bottom: 4px; font-size: 0.9rem; font-weight: 650; }

/* Paper cards (home) ------------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 40px 30px;
  align-items: start;
}
.card-figure {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.card-figure:hover,
.card.is-open .card-figure { border-color: rgba(var(--brand-rgb), 0.3); box-shadow: var(--shadow-lift); }
.card-figure img { width: 100%; aspect-ratio: 760 / 420; }
.card-body { padding: 16px 4px 0; }
.card-title { margin: 10px 0 4px; font-size: 1.65rem; line-height: 1.15; }
.card-teaser { margin: 0; color: var(--muted); font-size: 0.96rem; }

.badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 9px; }
.venue-badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--venue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.badge-year { color: var(--soft); font-size: 0.84rem; font-weight: 600; }
.role-badge {
  color: #b45309;
  font-size: 0.84rem;
  font-weight: 700;
}
.key-result {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--tc);
  font-size: 0.93rem;
  font-weight: 700;
}
.key-result::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--tc-fill);
}
.tags { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.tags li { color: var(--soft); font-size: 0.86rem; font-weight: 500; }
.tags li:not(:last-child)::after { content: ","; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 14px;
  font-size: 0.92rem;
  font-weight: 700;
}
.actions a[target="_blank"]::after { content: " ↗"; font-size: 0.8em; }
.cite-toggle {
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.cite-toggle::after { content: " +"; }
.cite-toggle[aria-expanded="true"]::after { content: " −"; }
.cite-toggle:hover { color: var(--brand-deep); }
.cite-panel {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}
.cite-panel pre {
  margin: 0 0 10px;
  overflow-x: auto;
  color: var(--ink-2);
  font: 0.76rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre;
}
.cite-copy {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand);
  font: 700 0.8rem var(--sans);
  cursor: pointer;
}
.cite-copy:hover { border-color: rgba(var(--brand-rgb), 0.35); }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.toggle::after { content: none; }
.toggle:hover { color: var(--brand-deep); }

.overview {
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.overview-text { display: grid; gap: 12px; margin: 0; }
.overview-text dt { color: var(--tc, var(--brand)); font-size: 0.86rem; font-weight: 800; }
.overview-text dd { margin: 2px 0 0; color: var(--muted); font-size: 0.93rem; line-height: 1.6; }

/* Research focus + side column --------------------------------------------- */

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 58px;
  align-items: start;
}
.main-col,
.side { min-width: 0; }
.side { padding-left: 34px; border-left: 1px solid var(--line); }

.topic-list { margin-top: 22px; border-top: 1px solid var(--line); }
.topic-item {
  display: grid;
  grid-template-columns: minmax(170px, 220px) minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.topic-item h3 { margin: 0; color: var(--tc); font-size: 1.05rem; line-height: 1.35; }
.topic-item p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }
.research-thesis {
  max-width: 44rem;
  margin: 14px 0 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid rgba(var(--brand-rgb), 0.45);
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 1.14rem;
  line-height: 1.55;
}
.topic-item .topic-concept { margin-bottom: 6px; color: var(--text); font-size: 0.98rem; font-weight: 700; line-height: 1.45; }
.topic-item .related-work { margin-top: 8px; color: var(--soft); font-size: 0.88rem; }
.related-work a { color: var(--brand); font-weight: 650; }
.related-work a:hover { text-decoration: underline; text-underline-offset: 3px; }

.stack-title { margin: 36px 0 0; font-size: 1.3rem; }
.stack {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.layers { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.layer {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  align-items: center;
  gap: 2px 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-2);
  background: color-mix(in srgb, var(--brand) calc(var(--depth) * 2.4%), #f3f6fb);
}
.layer-name { font-size: 0.95rem; line-height: 1.35; }
.layer-tools { grid-column: 1; grid-row: 2; color: var(--soft); font-size: 0.76rem; line-height: 1.4; }
.layer-papers { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  background: var(--tc);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
}
a.pill:hover { color: #fff; filter: brightness(1.12); }
.pill small { font-size: 0.7rem; font-weight: 600; opacity: 0.85; }
.pill-ongoing {
  padding: 4px 10px;
  border: 1.5px dashed rgba(var(--tc-rgb), 0.6);
  background: var(--surface);
  color: var(--tc);
}

.side-section + .side-section { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--line); }
.side-title {
  margin: 0 0 12px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 600;
}
.news-stream { border-top: 1px solid var(--line); }
.news-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.83rem;
  line-height: 1.45;
}
.news-row p { margin: 0; }
.news-row a { color: inherit; }
.news-row a:hover { color: var(--brand); }
.news-year { color: var(--soft); font-variant-numeric: tabular-nums; }
.venue-inline { color: var(--venue); font-weight: 700; }

.tech-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tech {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  padding: 10px 10px 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}
.tech-logo { display: flex; align-items: center; width: 31px; height: 31px; }
.tech-logo img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.17s ease; }
.tech { transition: border-color 0.18s ease, transform 0.18s ease; }
.tech:hover { border-color: rgba(var(--brand-rgb), 0.35); }
.tech:hover .tech-logo img { transform: scale(1.06); }
.tech-logo-wide { width: 54px; }
.tech-logo-gem5 { width: 38px; height: 38px; margin: -4px 0 -3px; }
.expertise { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.skill-groups { display: grid; gap: 14px; margin-top: 18px; }
.skill-group h3 {
  margin: 0 0 3px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0;
}
.skill-group .expertise { gap: 0 6px; margin-top: 0; }
.expertise span { color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.expertise span:not(:last-child)::after { content: ","; }

.compact-education > div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}
.compact-education > div:last-child { border-bottom: 0; }
.compact-education span { color: var(--soft); font-size: 0.78rem; }
.compact-education p { margin: 0; font-size: 0.86rem; line-height: 1.5; }

/* Contact and footer ------------------------------------------------------- */

.compact-width { width: min(100% - 40px, 920px); }
.contact-line { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-kicker {
  color: var(--brand);
  font-size: 0.95rem;
  font-weight: 600;
}
.contact-line h2 { margin: 10px 0 0; font-size: clamp(1.55rem, 3vw, 2.05rem); }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 650; }
.results-note { margin-top: 12px; color: var(--soft); font-size: 0.82rem; }

.site-footer { border-top: 1px solid var(--line); color: var(--soft); font-size: 0.84rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 32px 0 44px;
}

/* Publications page ------------------------------------------------------------ */

.page-hero { padding: 64px 0 26px; }
.page-hero h1 { margin: 0; font-size: clamp(2.3rem, 4.4vw, 3.2rem); line-height: 1; }
.page-hero p { max-width: 46em; margin: 12px 0 0; color: var(--muted); }

.pub-year {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 24px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pub-year-label { margin: 0; color: var(--soft); font-size: 1.45rem; line-height: 1.2; }
.pub { padding-bottom: 30px; scroll-margin-top: 92px; }
.pub + .pub { padding-top: 26px; border-top: 1px dashed var(--line); }
.pub-title { margin: 10px 0 6px; font-size: 1.28rem; line-height: 1.35; letter-spacing: -0.015em; }
.pub-title button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 0.16s ease;
}
.pub-title button:hover,
.pub.is-target .pub-title button { color: var(--brand); }
.pub .print-only { display: none; }
.pub-authors { margin: 0; color: var(--ink-2); font-size: 0.95rem; }
.pub-authors strong { font-weight: 700; }
.pub-venue { margin: 2px 0 0; color: var(--soft); font-size: 0.92rem; }
.pub-summary { max-width: 52em; margin: 10px 0 0; color: var(--muted); }
.pub-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.pub-figure { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pub-figure img { width: 100%; aspect-ratio: 760 / 420; }
.footnote { margin: 0; padding: 16px 0 40px; border-top: 1px solid var(--line); color: var(--soft); font-size: 0.86rem; }

.notice { padding: 96px 0; }
.notice h1 { margin: 0; font-size: clamp(2.2rem, 4vw, 3rem); }
.notice p { margin: 12px 0 0; color: var(--muted); }

/* Paper overview window ------------------------------------------------------ */

html { scrollbar-gutter: stable; }
html.pd-lock { overflow: hidden; }
.pd {
  width: min(1000px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 40px 90px rgba(15, 23, 42, 0.3);
}
.pd::backdrop { background: rgba(15, 23, 42, 0.45); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.pd-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
}
.pd-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 30px 34px 28px; }
.pd-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.pd-close::before,
.pd-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}
.pd-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.pd-close:hover { border-color: rgba(var(--brand-rgb), 0.35); transform: rotate(90deg); }
.pd-head { padding-right: 48px; }
.pd-title { margin: 12px 0 2px; font-size: clamp(2rem, 3.6vw, 2.7rem); line-height: 1.05; }
.pd-fulltitle { margin: 0; color: var(--ink-2); font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; letter-spacing: -0.01em; }
.pd-authors { margin: 8px 0 0; color: var(--muted); font-size: 0.9rem; }
.pd-authors strong { color: var(--text); }
.pd-figure {
  position: relative;
  display: block;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f8fa;
}
.pd-figure img { width: 100%; aspect-ratio: 760 / 420; }
.pd-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.94);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.pd-figure:hover .pd-zoom,
.pd-figure:focus-visible .pd-zoom { opacity: 1; }
@media (hover: none) { .pd-zoom { opacity: 1; } }

.pd-flow { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: step; }
.pd-flow.pd-flow-next { margin-top: 10px; counter-reset: none; }
.pd-fig { margin: 22px 0 0; }
.pd-fig .pd-figure { margin-top: 0; }
.pd-fig + .pd-flow { margin-top: 12px; }
.pd-figcap {
  margin: 0 0 8px;
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 600;
}
.pd-step {
  display: grid;
  grid-template-columns: 7.8rem minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
}
.pd-lead { max-width: 46rem; margin: 6px 0 10px; color: var(--ink-2); font-size: 1.06rem; font-weight: 600; line-height: 1.5; }
.pd-step-label { display: flex; align-items: flex-start; gap: 10px; color: var(--tc); font-size: 0.84rem; font-weight: 800; line-height: 24px; }
.pd-step-label::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(var(--tc-rgb), 0.12);
  font-size: 0.74rem;
}
.pd-step p { margin: 0; color: var(--muted); font-size: 0.96rem; line-height: 1.65; }
.pd-step p strong { color: var(--tc); font-weight: 800; }
.pd-step.is-prior .pd-step-label { color: var(--soft); }
.pd-step.is-prior .pd-step-label::before { background: var(--surface-2); }
.pd-step.is-key {
  margin: 4px -14px;
  padding: 14px;
  border-top: 0;
  border-radius: 16px;
  background: rgba(var(--tc-rgb), 0.08);
  box-shadow: inset 3px 0 0 var(--tc-fill);
}
.pd-step.is-key p { color: var(--ink-2); font-weight: 600; }
.pd-step.is-key + .pd-step { border-top: 0; }
.pd-step.is-result p { color: var(--ink-2); }
.pd-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-top: 18px;
}
.pd-bottom .chart { padding: 16px 18px 12px; border: 1px solid var(--line); border-radius: 16px; }
.pd-key { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; }
.pd-meta .tags { margin-top: 0; }
.pd-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.pd-nav button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 45%;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}
.pd-nav button:hover { border-color: rgba(var(--brand-rgb), 0.35); color: var(--brand); transform: translateY(-1px); }
.pd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-count { color: var(--soft); font-size: 0.82rem; font-variant-numeric: tabular-nums; }

/* Motion ------------------------------------------------------------------------- */

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes rise-photo { from { opacity: 0; transform: translateY(10px) scale(0.97); } }
@keyframes pd-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } }
@keyframes pd-out { to { opacity: 0; transform: translateY(10px) scale(0.99); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(0.9); } }
@keyframes available { 50% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0.05); } }

@media (prefers-reduced-motion: no-preference) {
  /* Hero: one staggered entrance on load. */
  .hero-grid > div > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero-grid > div > :nth-child(2) { animation-delay: 0.06s; }
  .hero-grid > div > :nth-child(3) { animation-delay: 0.12s; }
  .hero-grid > div > :nth-child(4) { animation-delay: 0.18s; }
  .hero-grid > div > :nth-child(5) { animation-delay: 0.24s; }
  .hero-grid > div > :nth-child(6) { animation-delay: 0.3s; }
  .hero-grid > div > :nth-child(7) { animation-delay: 0.36s; }
  .hero-grid > div > :nth-child(8) { animation-delay: 0.42s; }
  .hero-grid > div > :nth-child(9) { animation-delay: 0.48s; }
  .availability-dot { animation: available 2.4s ease-in-out infinite; }
  .hero-photo { animation: rise-photo 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both; }
  .card .chart-go .bar-fill { animation-delay: 0.15s; }
  .chart-wait .bar-fill { width: 0; animation: none; }

  /* Everything below the first screen fades up as it scrolls into view. */
  .motion-ready .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: var(--delay, 0ms);
  }
  .motion-ready .reveal.is-in { opacity: 1; transform: none; }
  .motion-ready .layer.reveal .pill { opacity: 0; }
  .motion-ready .layer.reveal.is-in .pill { opacity: 1; animation: pop 0.35s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--delay, 0ms) + 0.2s); }
  .motion-ready .layer.reveal.is-in .pill:nth-child(2) { animation-delay: calc(var(--delay, 0ms) + 0.26s); }
  .motion-ready .layer.reveal.is-in .pill:nth-child(3) { animation-delay: calc(var(--delay, 0ms) + 0.32s); }
  .motion-ready .layer.reveal.is-in .pill:nth-child(4) { animation-delay: calc(var(--delay, 0ms) + 0.38s); }

  /* Overview window. */
  .pd[open] { animation: pd-in 0.28s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .pd[open]::backdrop { animation: fade-in 0.28s ease; }
  .pd.is-closing { animation: pd-out 0.17s ease forwards; }
  .pd.is-closing::backdrop { animation: fade-out 0.17s ease forwards; }
  .pd-content .pd-figure { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.06s both; }
  .pd-content .pd-step { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.12s both; }
  .pd-content .pd-step:nth-child(2) { animation-delay: 0.18s; }
  .pd-content .pd-step:nth-child(3) { animation-delay: 0.24s; }
  .pd-content .pd-step:nth-child(4) { animation-delay: 0.3s; }
  .pd .bar-fill { animation-delay: 0.3s; }
}

/* Narrow screens ----------------------------------------------------------------- */

@media (max-width: 1080px) {
  .home-grid { grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr); gap: 46px; }
  .side { padding-left: 30px; }
}

@media (max-width: 1000px) {
  .home-grid { grid-template-columns: 1fr; }
  .side { padding: 36px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .site-header { position: static; }
  .header-inner { padding: 12px 0; min-height: 0; }
  .site-nav { gap: 20px; }
  section[id], .topic-item[id] { scroll-margin-top: 12px; }

  .hero { padding: 40px 0 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-photo { order: -1; width: 100%; max-width: none; }
  .profile-links { width: 100%; margin: 6px 0 0; gap: 10px 20px; }
  .hero-photo img { aspect-ratio: 4 / 5; object-position: 50% 100%; border-radius: 20px; }
  .lead { font-size: 1.05rem; }
  .availability { display: flex; align-items: flex-start; border-radius: 14px; font-size: 0.86rem; }
  .availability-dot { margin-top: 6px; }
  .intro-note { padding-left: 11px; }
  .hero-highlights { align-items: flex-start; gap: 7px 11px; }
  .hero-highlights-label { flex-basis: 100%; }
  .signals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .signal { width: 100%; border-radius: 14px; line-height: 1.25; padding: 5px 8px 5px 5px; font-size: 0.8rem; }

  .cards { grid-template-columns: 1fr; gap: 36px; }
  .topic-item { grid-template-columns: 1fr; gap: 6px; }
  .layer { grid-template-columns: 1fr; }
  .layer-tools,
  .layer-papers { grid-column: auto; grid-row: auto; }
  .layer-papers { margin-top: 6px; }
  .contact-line { flex-direction: column; align-items: flex-start; }

  .pub-year { grid-template-columns: 1fr; gap: 6px; }
  .pub-overview { grid-template-columns: 1fr; }
  .pub { scroll-margin-top: 12px; }

  .pd,
  .pd-shell { width: 100vw; height: 100vh; height: 100dvh; max-height: none; }
  .pd { margin: 0; border-radius: 0; }
  .pd-scroll { padding: 22px 18px 24px; }
  .pd-close { top: 10px; right: 10px; }
  .pd-step { grid-template-columns: 1fr; gap: 6px; }
  .pd-zoom { right: 8px; bottom: 8px; padding: 3px 8px; font-size: 0.68rem; }
  .pd-bottom { grid-template-columns: 1fr; }
  .pd-nav { padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

@media print {
  .site-header, .actions, .skip, .pd { display: none; }
  .pub .print-only { display: grid; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
