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

:root {
  --paper: #F5F2EC;
  --ink:   #1A1A2E;
  --teal:  #2A9D8F;
  --ink-60: rgba(26,26,46,0.60);
  --ink-20: rgba(26,26,46,0.20);
  --paper-65: rgba(245,242,236,0.65);
  --paper-40: rgba(245,242,236,0.40);
  --paper-10: rgba(245,242,236,0.10);
  --paper-08: rgba(245,242,236,0.08);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --mono:  'DM Mono', monospace;
  --sans:  'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────── */
nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.5rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s, box-shadow 0.3s;
}
nav.scrolled {
  background: var(--paper);
  box-shadow: 0 1px 0 var(--ink-20);
}
.nav-wordmark {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--ink);
}
.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  opacity: 0.55;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2.25rem;
  display: inline-block;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--teal); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink-20);
}
.btn-outline:hover { border-color: var(--ink); }

/* ── SECTION HEADERS ──────────────────────────────── */
.section-label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--paper);
  white-space: nowrap;
}
.section-header { margin-bottom: 4.5rem; }

/* ── PAGE HEADER (blog index, posts) ─────────────────── */
.page-header {
  padding: 10rem 2.5rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}
.page-header .section-title { color: var(--ink); margin-top: 0.75rem; white-space: normal; }
.page-header-sub {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-60);
  max-width: 560px;
  margin-top: 1.5rem;
}
.back-link {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-60);
  text-decoration: none;
  display: inline-block;
}
.back-link:hover { color: var(--teal); }

/* ── NOTES / BLOG LIST ────────────────────────────── */
.notes-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem 7rem;
  display: flex;
  flex-direction: column;
}
.note-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-top: 1px solid var(--ink-20);
  text-decoration: none;
  color: inherit;
}
.notes-list .note-card:last-child { border-bottom: 1px solid var(--ink-20); }
.note-date {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
}
.note-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  transition: color 0.2s;
}
.note-card:hover .note-title { color: var(--teal); }
.note-excerpt {
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-60);
  max-width: 640px;
}

/* ── POST CONTENT ─────────────────────────────────── */
.post-header { padding: 10rem 2.5rem 3rem; max-width: 760px; margin: 0 auto; }
.post-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 1.5rem 0;
}
.post-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.25rem;
}
.post-dek {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  color: var(--ink-60);
}
.post-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2.5rem 7rem;
}
.post-content p {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.post-content h2 {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 400;
  margin: 3rem 0 1.25rem;
}
.post-content ul, .post-content ol {
  margin: 0 0 1.5rem 1.25rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.85;
}
.post-content li { margin-bottom: 0.5rem; }
.post-content a { color: var(--teal); }
.post-content strong { font-weight: 500; }
.post-cta {
  margin-top: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--ink-20);
  border-bottom: 1px solid var(--ink-20);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.post-cta p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--ink-60);
  margin: 0;
}

/* ── FOOTER ───────────────────────────────────────── */
footer {
  background: var(--ink);
  padding: 2.75rem 2.5rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.footer-wordmark {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--paper);
  letter-spacing: 0.06em;
}
.footer-slogan {
  font-family: var(--serif);
  font-size: 1rem;
  font-style: italic;
  color: var(--paper-40);
}
.footer-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  color: rgba(245,242,236,0.3);
  text-align: right;
  line-height: 1.8;
}

/* ── SCROLL REVEAL ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }

/* ── MOBILE (shared) ──────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-meta { text-align: center; }
  .note-card { grid-template-columns: 1fr; gap: 0.75rem; }
}

@media (max-width: 600px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-links { display: none; }
  .hero h1, .section-title { white-space: normal; }
  footer { padding: 2.25rem 1.5rem; }
  .page-header, .post-header { padding-top: 8rem; }
}
