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

:root {
  --ink:       #1a1a1a;
  --ink-mid:   #4a4a4a;
  --ink-light: #7a7a7a;
  --rule:      #e2e2e2;
  --bg:        #fafaf8;
  --bg-card:   #ffffff;
  --accent:    #1a4a7a;
  --accent-lt: #e8eff7;
  --accent-mid:#2e6da4;
  --serif:     'EB Garamond', Georgia, serif;
  --sans:      'Inter', system-ui, sans-serif;
  --mono:      'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

a { color: var(--accent-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ── */
.container { max-width: 900px; margin: 0 auto; padding: 0 2rem; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,250,248,0.95);
  backdrop-filter: blur(6px);
  border-bottom: 0.5px solid var(--rule);
  padding: 0;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.01em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-mid);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* ── Page header ── */
.page-header {
  padding: 4rem 0 3rem;
  border-bottom: 0.5px solid var(--rule);
}

.page-header .eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 0.75rem;
}

.page-header h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

/* ── Section ── */
section { padding: 3rem 0; border-bottom: 0.5px solid var(--rule); }
section:last-child { border-bottom: none; }

h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

p { margin-bottom: 1rem; color: var(--ink-mid); }
p:last-child { margin-bottom: 0; }

/* ── Tags / badges ── */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-lt);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 3px;
  margin-right: 6px;
  margin-bottom: 6px;
}

/* ── Paper link ── */
.paper-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-mid);
  border: 0.5px solid var(--accent-mid);
  border-radius: 3px;
  padding: 4px 10px;
  margin-top: 8px;
  margin-right: 6px;
  transition: background 0.15s;
}
.paper-link:hover { background: var(--accent-lt); text-decoration: none; }

/* ── Footer ── */
footer {
  border-top: 0.5px solid var(--rule);
  padding: 2rem 0;
  margin-top: 1rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-inner p { font-size: 12px; color: var(--ink-light); margin: 0; }

.footer-icons { display: flex; gap: 1.25rem; }
.footer-icons a { font-size: 12px; color: var(--ink-light); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.footer-icons a:hover { color: var(--ink); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .page-header h1 { font-size: 28px; }
  .footer-inner { flex-direction: column; gap: 1rem; align-items: flex-start; }
}
