:root {
  --sea: #10262e;
  --sea-deep: #0b1d23;
  --wave-1: #17343d;
  --wave-2: #1d3f48;
  --line: #2a4a52;
  --text: #eef2ee;
  --text-strong: #f4f1ea;
  --text-body: #dbe5e2;
  --muted: #a9c0bd;
  --sand: #e6c79c;
  --sand-light: #f3dfc1;
  --serif: 'Instrument Serif', Georgia, serif;
  --sans: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--sea);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--sand); }
a:hover { color: var(--sand-light); }

:focus-visible { outline: 2px solid var(--sand); outline-offset: 3px; }

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 20px clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 2;
}
.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 15px;
}
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--sand); }

/* ---------- Landing: quotes ---------- */
body.home { display: flex; flex-direction: column; overflow-x: hidden; }

.quotes {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 36px;
  padding: 24px clamp(16px, 6vw, 96px) 170px;
  position: relative;
  z-index: 1;
}


.quote {
  margin: 0;
  max-width: 860px;
  min-height: 2.4em;
  font-family: var(--serif);
  font-size: clamp(34px, 5.5vw, 66px);
  line-height: 1.15;
  color: var(--text-strong);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  transition: opacity 600ms ease, transform 600ms ease, filter 600ms ease;
}
.quote.is-leaving { opacity: 0; transform: translateY(-10px); filter: blur(4px); }
.quote.is-entering { opacity: 0; transform: translateY(12px); filter: blur(4px); transition: none; }

.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.btn-primary, .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font: 600 14px var(--sans);
  cursor: pointer;
  transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease;
}
.btn-primary { border: none; background: var(--sand); color: var(--sea); }
.btn-primary:hover { background: var(--sand-light); transform: translateX(2px); }
.btn-ghost { border: 1px solid #3c5c63; background: transparent; color: var(--text); font-weight: 500; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-ghost[aria-pressed="true"] { border-color: var(--sand); color: var(--sand); }


.sea {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  pointer-events: none;
  overflow: hidden;
}
.sea svg { display: block; width: 200%; height: 120px; animation: drift 40s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.yt-hidden { position: fixed; left: -9999px; top: 0; width: 200px; height: 200px; }

/* ---------- Blog ---------- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px clamp(16px, 4vw, 48px) 96px;
}
.page-title {
  margin: 0 0 32px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 7vw, 64px);
  line-height: 1;
}
.post-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.post-list li { border-top: 1px solid var(--line); }
.post-list a {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 0;
  color: inherit;
  text-decoration: none;
}
.post-title { font-family: var(--serif); font-size: 30px; line-height: 1.2; color: var(--text-strong); }
.post-list a:hover .post-title { color: var(--sand-light); }
.post-summary { font-size: 15px; line-height: 1.55; color: #c3d3d0; }
.empty { color: var(--muted); }

.post h1 {
  margin: 12px 0 28px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6vw, 54px);
  line-height: 1.1;
  color: var(--text-strong);
}
.prose { font-size: 17px; line-height: 1.75; color: var(--text-body); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol, .prose blockquote, .prose pre, .prose table, .prose figure { margin: 0 0 1.2em; }
.prose h2, .prose h3, .prose h4 { color: var(--text-strong); line-height: 1.3; margin: 1.8em 0 0.6em; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 32px; }
.prose h3 { font-size: 20px; font-weight: 600; }
.prose img, .prose video { max-width: 100%; height: auto; border-radius: 8px; }
.prose blockquote { padding-left: 20px; border-left: 2px solid var(--sand); color: var(--muted); font-style: italic; }
.prose code { font-size: 0.88em; background: var(--wave-1); padding: 2px 6px; border-radius: 4px; }
.prose pre {
  padding: 18px 20px;
  background: var(--sea-deep);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.back { margin-top: 48px; font-size: 14px; }
.back a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .sea svg { animation: none; }
  .quote, .quote.is-leaving, .quote.is-entering { transition: none; transform: none; filter: none; }
}

/* Small uppercase date line on blog pages */
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
