/* Catppuccin Latte (https://catppuccin.com) */
:root {
  --bg: #eff1f5;          /* base */
  --bar: #e6e9ef;         /* mantle */
  --surface: #ccd0da;     /* surface0 */
  --ink: #4c4f69;         /* text */
  --text: #4c4f69;        /* text */
  --muted: #6c6f85;       /* subtext0 */
  --faint: #8c8fa1;       /* overlay1 */
  --rule: #ccd0da;        /* surface0 */
  --rule-strong: #bcc0cc; /* surface1 */
  --accent: #8839ef;      /* mauve */
  --accent-soft: #ea76cb; /* pink, used sparingly */
  --link: #1e66f5;        /* blue */
  --link-hover: #8839ef;  /* mauve */

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.07rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- TOP BAR ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(230, 233, 239, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  padding: 0.85rem 1.5rem;
}

.brand {
  font-family: var(--serif);
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topnav a {
  color: var(--muted);
  text-decoration: none;
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.topnav a:hover,
.topnav a.current {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* ---------- HERO (home) ---------- */
.hero {
  text-align: center;
  padding: 5rem 1.5rem 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero .tagline {
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 0.9rem;
}

.hero-quote {
  max-width: 34rem;
  margin: 2rem auto 0;
}

.hero-quote .quote-text {
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
}

.hero-quote .quote-cite {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.btn {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.6rem 1.5rem;
  border-radius: 3px;
  color: var(--accent);
  border: 1px solid var(--accent);
  transition: background 0.15s, color 0.15s;
}

.btn:hover { background: var(--accent); color: var(--bg); }

/* ---------- PAGE HEADER (subpages) ---------- */
.page-header {
  padding: 3rem 1.5rem 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.page-header .inner { max-width: 44rem; margin: 0 auto; }

.page-header h1 {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
}

.page-header p {
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* ---------- CONTENT ---------- */
main { flex: 1; max-width: 44rem; margin: 0 auto; width: 100%; padding: 0 1.5rem; }

section { padding: 2.8rem 0; border-bottom: 1px solid var(--rule); }
section:last-of-type { border-bottom: none; }

h2 { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; color: var(--ink); margin-bottom: 1rem; }
h2 .mark { display: block; width: 2rem; height: 2px; background: var(--accent); opacity: 0.85; margin-top: 0.6rem; }

h3 { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
section h3 { margin-top: 0.6rem; }
section h3.subhead {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.6rem;
}

p + p { margin-top: 1.05rem; }

a { color: var(--link); text-decoration: none; }
main a, .page-header a { border-bottom: 1px solid rgba(30, 102, 245, 0.3); }
main a:hover, .page-header a:hover { color: var(--link-hover); border-bottom-color: var(--accent); }

/* lists */
.list { list-style: none; margin-top: 0.4rem; }
.list li { padding: 0.95rem 0; border-bottom: 1px solid var(--rule); }
.list li:last-child { border-bottom: none; }
.list .title { font-size: 1.08rem; color: var(--ink); }
.list .meta { display: block; font-family: var(--sans); font-size: 0.78rem; color: var(--muted); margin-top: 0.2rem; }
.list .summary { color: var(--text); margin-top: 0.3rem; }
.empty { color: var(--muted); font-style: italic; }
.lede { font-size: 1.22rem; line-height: 1.6; color: var(--text); }

/* ---------- ARTICLE / ESSAY ---------- */
.back {
  display: inline-block;
  margin-bottom: 1.2rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: none;
}
.back:hover { color: var(--ink); border-bottom: none; }

article { padding: 2.8rem 0; }
article p { margin-top: 1.05rem; }
article h3 { margin-top: 1.8rem; }
article blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 1.2rem;
  margin: 1.4rem 0;
  font-style: italic;
  color: var(--muted);
}

.comments { border-top: 1px solid var(--rule); }

/* ---------- FOOTER ---------- */
footer {
  background: var(--bar);
  border-top: 1px solid var(--rule-strong);
  text-align: center;
  padding: 2.2rem 1.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
footer a:hover { color: var(--ink); }

@media (max-width: 600px) {
  .topbar { justify-content: center; text-align: center; }
  .topnav { justify-content: center; gap: 1rem; }
  .hero { padding-top: 3.5rem; }
  .page-header h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }
}
