:root {
  --bg-top: #fafaf8;
  --bg-bottom: #eef1f4;
  --surface: #ffffff;
  --ink: #16242d;
  --muted: #5b6670;
  --accent: #1f4f79;
  --accent-strong: #163a5a;
  --line: rgba(22, 36, 45, 0.11);
  --shadow: 0 18px 40px -34px rgba(22, 36, 45, 0.22);
  --radius-xl: 18px;
  --radius-lg: 12px;
  --max-width: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(31, 79, 121, 0.06), transparent 30%),
    radial-gradient(circle at top right, rgba(91, 102, 112, 0.06), transparent 22%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 22%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p,
h1,
h2,
h3,
dl,
dd,
dt {
  margin: 0;
}

input,
button {
  font: inherit;
}

.site-shell {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  background: rgba(250, 250, 248, 0.94);
  border-bottom: 1px solid var(--line);
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-mark {
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef4f8;
  border: 1px solid rgba(31, 79, 121, 0.14);
  color: var(--accent-strong);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-copy {
  display: grid;
  gap: 0.08rem;
}

.brand-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

.nav-link {
  padding: 0.52rem 0.74rem;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: rgba(31, 79, 121, 0.08);
  color: var(--ink);
  transform: translateY(-1px);
}

.nav-link.is-active {
  background: rgba(31, 79, 121, 0.1);
  color: var(--accent-strong);
}

.nav-link-cta {
  background: var(--accent-strong);
  color: #f8fbff;
}

.hero,
.page-intro {
  padding: 3.4rem 0 1.8rem;
}

.hero-home {
  padding-top: 3.8rem;
}

.hero-grid,
.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(260px, 0.87fr);
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.intro-sidecard,
.filter-panel,
.results-toolbar,
.stat-card,
.info-panel,
.paper-card,
.policy-card,
.module-card,
.guide-card,
.media-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 1.2rem 1.2rem auto;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31, 79, 121, 0.08), transparent 70%);
}

.hero-panel,
.intro-sidecard,
.filter-panel,
.results-toolbar,
.stat-card,
.info-panel,
.paper-card,
.policy-card,
.module-card,
.guide-card {
  padding: 1.2rem;
}

.intro-sidecard-scholar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.intro-sidecard-scholar .text-link {
  margin-top: 0;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  margin-bottom: 0.85rem;
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, serif;
  line-height: 1.14;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.8rem);
  margin-bottom: 0.9rem;
}

h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  margin-bottom: 0.7rem;
}

h3 {
  font-size: 1rem;
}

.lead {
  font-size: 1rem;
  max-width: 62ch;
}

.action-row,
.topic-row,
.inline-link-row,
.badge-row,
.chip-set,
.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.action-row,
.topic-row {
  margin-top: 1.4rem;
}

.button,
.text-link,
.ghost-button,
.filter-chip,
.link-pill {
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.05rem;
  border-radius: 10px;
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf2;
}

.button-secondary {
  background: rgba(31, 79, 121, 0.08);
  color: var(--accent-strong);
}

.button-tertiary {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid var(--line);
}

.button:hover,
.button:focus-visible,
.text-link:hover,
.text-link:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible,
.filter-chip:hover,
.filter-chip:focus-visible,
.link-pill:hover,
.link-pill:focus-visible {
  transform: translateY(-1px);
}

.topic-pill,
.meta-pill,
.paper-tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.56rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.topic-pill,
.paper-tag {
  background: rgba(31, 79, 121, 0.08);
  color: var(--accent-strong);
}

.status-pill {
  background: rgba(22, 58, 90, 0.08);
  color: var(--accent-strong);
}

.meta-pill {
  background: rgba(22, 36, 45, 0.05);
  color: var(--muted);
}

.monogram-panel {
  padding: 0.85rem;
  border-radius: calc(var(--radius-lg) - 2px);
  background:
    radial-gradient(circle at top, rgba(31, 79, 121, 0.12), transparent 36%),
    linear-gradient(160deg, #fbfcfd 0%, #eef3f6 100%);
  border: 1px solid var(--line);
}

.monogram-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 20px;
}

.contact-card {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: calc(var(--radius-lg) - 2px);
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--line);
}

.contact-card h2 {
  font-size: 1.55rem;
}

.contact-list {
  margin-top: 1rem;
  display: grid;
  gap: 0.9rem;
}

.contact-list dt {
  font-weight: 800;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.separator {
  color: rgba(23, 51, 57, 0.28);
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding-bottom: 2rem;
}

.stat-card strong {
  display: block;
  font-size: 2.1rem;
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--accent-strong);
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card-link {
  display: block;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stat-card-link:hover,
.stat-card-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(31, 79, 121, 0.2);
  box-shadow: 0 20px 44px -34px rgba(22, 36, 45, 0.28);
}

.section-block {
  padding: 1.8rem 0;
}

.section-heading {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1.4rem;
  max-width: 48rem;
}

.card-grid,
.stack-grid,
.details-stack {
  display: grid;
  gap: 1.1rem;
}

.card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid-large {
  grid-template-columns: 1fr;
}

.split-block {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  padding: 1.8rem 0 3.5rem;
}

.accent-panel {
  background:
    radial-gradient(circle at top right, rgba(31, 79, 121, 0.08), transparent 30%),
    var(--surface);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.text-link::after {
  content: "\2197";
  font-size: 0.85em;
}

.media-summary .text-link {
  white-space: nowrap;
  margin-top: 0;
}

.research-shell {
  display: grid;
  grid-template-columns: minmax(270px, 300px) minmax(0, 1fr);
  gap: 1.4rem;
  padding-bottom: 4rem;
}

.filter-panel {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  padding: 1rem 1rem 0.95rem;
}

.filter-section + .filter-section {
  margin-top: 0.8rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.filter-label,
.results-note,
.result-summary,
.intro-sidecard p,
.paper-authors,
.paper-note-text,
.media-meta,
.module-card p {
  color: var(--muted);
}

.filter-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.55rem;
}

.search-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.84);
  color: var(--ink);
}

.filter-heading-row,
.results-toolbar,
.media-summary,
.media-link-item,
.paper-card-header,
.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.filter-heading-row h2,
.filter-section h2 {
  margin-bottom: 0.55rem;
  font-size: 0.98rem;
}

.ghost-button,
.filter-chip {
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.86);
  border-radius: 999px;
  cursor: pointer;
}

.ghost-button {
  padding: 0.36rem 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.filter-panel .ghost-button {
  padding: 0.14rem 0.4rem;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.2;
}

.filter-chip {
  padding: 0.38rem 0.68rem;
  color: var(--ink);
  font-weight: 600;
}

.filter-chip.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fffaf2;
  border-color: transparent;
}

.filter-list {
  display: grid;
  gap: 0.08rem;
}

.filter-list-item {
  display: block;
  width: 100%;
  padding: 0.24rem 0 0.24rem 0.95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  position: relative;
}

.filter-list-item::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 50%;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: rgba(31, 79, 121, 0.14);
  transform: translateY(-50%);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

.filter-list-item:hover,
.filter-list-item:focus-visible {
  transform: translateX(2px);
  color: var(--ink);
}

.filter-list-item.is-active {
  background: transparent;
  color: var(--accent-strong);
  border-color: transparent;
  box-shadow: none;
}

.filter-list-item.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 0.18rem rgba(31, 79, 121, 0.14);
}

.results-toolbar {
  margin-bottom: 0.7rem;
  padding: 0 0 0.7rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.results-toolbar p:first-child,
.result-summary {
  font-weight: 800;
}

.paper-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
}

.paper-card-compact {
  gap: 0.28rem;
}

.paper-title {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.38;
  letter-spacing: -0.01em;
  margin-bottom: 0.22rem;
}

.paper-card-compact .paper-title {
  font-size: 0.99rem;
  font-weight: 700;
  margin-bottom: 0;
}

.paper-card-header-compact {
  align-items: flex-start;
  flex-wrap: nowrap;
}

.paper-citation {
  flex: 1;
  min-width: 0;
  font-size: 0.98rem;
  line-height: 1.32;
}

.paper-inline-meta {
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
}

.paper-inline-authors {
  color: var(--muted);
  font-size: inherit;
  font-weight: 400;
}

.paper-meta-line {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.paper-journal {
  font-style: italic;
  font-weight: 700;
}

.paper-journal-detail {
  font-style: normal;
  font-weight: 400;
}

.paper-authors-compact {
  font-size: 0.84rem;
  line-height: 1.32;
}

.badge-row-compact {
  gap: 0.15rem 0.55rem;
}

.paper-tag-compact {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.paper-tag-compact::before {
  content: "#";
  margin-right: 0.08rem;
  color: rgba(31, 79, 121, 0.78);
}

.mini-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--muted);
  font-size: 0.94rem;
}

.mini-list li + li {
  margin-top: 0.25rem;
}

.link-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.44rem 0.74rem;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.9rem;
}

.link-row-compact {
  gap: 0.18rem 0.8rem;
}

.link-pill-compact {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.link-pill-compact:hover,
.link-pill-compact:focus-visible {
  background: transparent;
  color: var(--accent);
}

.abstract-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-strong);
}

.abstract-toggle[aria-expanded="true"] {
  color: var(--accent);
}

.link-symbol {
  font-size: 0.78em;
  opacity: 0.76;
}

.paper-abstract {
  margin-top: 0.55rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 79, 121, 0.12);
  background: rgba(31, 79, 121, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  cursor: pointer;
}

.paper-abstract[hidden] {
  display: none !important;
}

.paper-abstract.is-open {
  animation: abstract-expand 180ms ease;
}

@keyframes abstract-expand {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-results {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.8);
  border: 1px dashed rgba(22, 36, 45, 0.16);
  color: var(--muted);
}

.policy-card,
.guide-card {
  display: grid;
  gap: 0.9rem;
}

.media-group {
  overflow: hidden;
}

.media-group summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 1.25rem;
}

.media-group summary::-webkit-details-marker {
  display: none;
}

.media-group[open] summary {
  border-bottom: 1px solid rgba(23, 51, 57, 0.10);
}

.media-link-list {
  display: grid;
  gap: 0.8rem;
  padding: 1.15rem 1.25rem 1.25rem;
}

.media-link-item {
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.88);
  border: 1px solid var(--line);
}

.site-footer {
  padding: 1.2rem 0 2rem;
  border-top: 1px solid rgba(22, 36, 45, 0.06);
}

.footer-row {
  color: var(--muted);
  font-size: 0.92rem;
}

.paper-card-header {
  align-items: flex-start;
}

.paper-authors,
.paper-note-text,
.results-note {
  font-size: 0.95rem;
}

.results-note {
  font-size: 0.88rem;
}

.results-panel {
  min-width: 0;
}

.results-panel .card-grid-large {
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0 1.1rem;
  box-shadow: var(--shadow);
}

.results-panel .paper-card {
  padding: 1rem 0;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.results-panel .paper-card:first-child {
  border-top: 0;
  padding-top: 0.35rem;
}

.results-panel .paper-card-header,
.results-panel .badge-row,
.results-panel .link-row {
  gap: 0.55rem;
}

.results-panel .paper-card-compact {
  gap: 0.28rem;
  padding: 0.8rem 0;
}

.results-panel .paper-card-compact:first-child {
  padding-top: 0.5rem;
}

.results-panel .paper-card-header-compact {
  gap: 0.75rem;
}

.results-panel .badge-row-compact {
  gap: 0.15rem 0.55rem;
}

.results-panel .link-row-compact {
  gap: 0.18rem 0.75rem;
}

.paper-card-compact .status-pill {
  padding: 0.18rem 0.48rem;
  font-size: 0.69rem;
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 680ms ease forwards;
}

[data-reveal]:nth-of-type(2) {
  animation-delay: 90ms;
}

[data-reveal]:nth-of-type(3) {
  animation-delay: 150ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .intro-grid,
  .research-shell,
  .split-block {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .stat-strip,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-panel .card-grid-large {
    padding: 0 1rem;
  }
}

@media (max-width: 680px) {
  .nav-row,
  .footer-row,
  .filter-heading-row,
  .results-toolbar,
  .media-summary,
  .media-link-item,
  .paper-card-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero,
  .page-intro {
    padding-top: 3.5rem;
  }

  .stat-strip,
  .card-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: clamp(2rem, 10vw, 3.1rem);
  }

  .results-panel .card-grid-large {
    padding: 0 0.8rem;
  }

  .paper-card-header-compact {
    flex-wrap: wrap;
  }

  .paper-citation {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
