/* ── Reset & Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --teal: #0d9488;
  --teal-light: #14b8a6;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-card: #ffffff;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --max-w: 900px;
  --max-w-wide: 1100px;
}

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  color: var(--navy);
  line-height: 1.25;
}

h2 {
  font-size: 1.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--navy-light);
}

h4 {
  font-size: 1.1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--teal); text-decoration: underline; }

strong { font-weight: 600; }

/* ── Sticky Navigation ──────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.nav-inner {
  max-width: var(--max-w-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 56px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-inner a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-inner a:hover,
.nav-inner a.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
  text-decoration: none;
}

/* ── Author Card ────────────────────────────────────────────── */
.author-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.author-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 100%);
}

.author-avatar {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
}

.author-meta {
  flex: 1;
}

.author-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: #fff !important;
  margin: 0 0 0.15rem !important;
}

.author-title {
  font-size: 0.95rem;
  color: var(--teal-light);
  margin: 0 0 0.15rem !important;
  font-weight: 600;
}

.author-affil {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 !important;
}

.author-affil a {
  color: #7dd3fc;
}

.author-body {
  padding: 1.75rem 2rem 1.5rem;
}

.author-body h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  font-size: 1.1rem;
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border);
}

.author-body h4:first-child {
  margin-top: 0;
}

.author-pubs ul {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

.author-pubs li {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.author-pubs li:last-child {
  border-bottom: none;
}

@media (max-width: 600px) {
  .author-header {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  .author-body { padding: 1.25rem; }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #1e3a5f 60%, #1a4050 100%);
  color: #fff;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.4rem;
  color: #fff;
  max-width: 820px;
  margin: 0 auto 1rem;
  line-height: 1.2;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto 0.75rem;
  font-style: italic;
}

.hero .date {
  font-size: 0.9rem;
  color: #64748b;
  margin-bottom: 2.5rem;
}

.stat-row {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.stat-card {
  text-align: center;
}

.stat-card .number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--teal-light);
  line-height: 1;
}

.stat-card .label {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-top: 0.35rem;
  max-width: 180px;
}

/* ── Main Content ───────────────────────────────────────────── */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

section {
  margin-bottom: 3rem;
}

/* ── Abstract Box ───────────────────────────────────────────── */
.abstract-box {
  background: var(--bg-alt);
  border-left: 4px solid var(--teal);
  padding: 1.5rem 2rem;
  border-radius: 0 8px 8px 0;
  margin-bottom: 2rem;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.85;
}

/* ── Callout / Key Figure ───────────────────────────────────── */
.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

/* ── Citation Superscripts ──────────────────────────────────── */
sup.cite a {
  font-size: 0.72em;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
  padding: 0 1px;
}
sup.cite a:hover {
  color: var(--teal);
  text-decoration: underline;
}

/* ── Data Cards Grid ────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  transition: box-shadow 0.2s;
}
.data-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.data-card h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  margin: 0 0 0.4rem;
}

.data-card .card-meta {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.data-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.55;
}

/* ── Chart Containers ───────────────────────────────────────── */
.chart-wrap {
  max-width: var(--max-w-wide);
  margin: 2rem auto;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.chart-wrap canvas {
  width: 100% !important;
  max-height: 380px;
}

.chart-wrap .chart-caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ── Architecture Diagram ───────────────────────────────────── */
.arch-diagram {
  max-width: var(--max-w-wide);
  margin: 2rem auto;
  overflow-x: auto;
}

.arch-diagram svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* ── Roadmap Timeline ───────────────────────────────────────── */
.roadmap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.phase {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.phase-marker {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.phase-content {
  flex: 1;
}

.phase-content .phase-title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.phase-content .phase-time {
  font-size: 0.82rem;
  color: var(--teal);
  font-weight: 600;
}

.phase-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ── Bullet Lists ───────────────────────────────────────────── */
ul, ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}
li {
  margin-bottom: 0.4rem;
}

/* ── References ─────────────────────────────────────────────── */
.references {
  font-size: 0.88rem;
  line-height: 1.65;
}

.references ol {
  padding-left: 2.5rem;
}

.references li {
  margin-bottom: 0.6rem;
  color: var(--text-muted);
}

.references li a {
  word-break: break-all;
}

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #94a3b8;
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
  line-height: 1.7;
}

.site-footer a {
  color: var(--teal-light);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .hero h1 { font-size: 1.7rem; }
  .stat-row { gap: 1.5rem; }
  .stat-card .number { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  main { padding: 2rem 1.25rem 3rem; }
  .card-grid { grid-template-columns: 1fr; }
  .nav-inner { gap: 1rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.4rem; }
  .hero .subtitle { font-size: 1rem; }
  body { font-size: 16px; }
  .stat-row { flex-direction: column; align-items: center; gap: 1.25rem; }
}
