*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cave: #0f0c14;
  --surface: #16121e;
  --surface-raised: #1e1826;
  --mulberry: #2a2238;
  --mulberry-light: #382a45;
  --moon: #ece8f2;
  --moon-muted: #b8b3c4;
  --beam: #46a5b8;
  --beam-glow: rgba(70, 165, 184, 0.18);
  --lilac: #9b8cc4;
  --grey: #7f7c8a;
  --border: rgba(236, 232, 242, 0.08);
  --border-strong: rgba(70, 165, 184, 0.28);
  --measure: 68ch;
  --pad: clamp(3rem, 6vw, 7.5rem);
  --radius: 6px;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

html { scroll-behavior: smooth; font-size: 100%; color-scheme: dark; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: 'Alegreya', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.74;
  color: var(--moon);
  background: var(--cave);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; background: var(--surface-raised); }
img[src*="/images/"] {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
}
.hero-photo img, .article-photo img, .page-hero-img img, .post-card img, .journal-card img, .featured-card img {
  border: 1px solid var(--border-strong);
}
a { color: var(--beam); text-decoration-thickness: 1px; text-underline-offset: 3px; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--lilac); opacity: 1; }

.surface-moon { background: var(--surface); color: var(--moon); }
.surface-mulberry { background: var(--mulberry); color: var(--moon); border: 1px solid var(--border); }
.surface-cave { background: var(--cave); color: var(--moon); }
.surface-beam { background: var(--beam); color: var(--cave); }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(15, 12, 20, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--moon);
  border-bottom: 1px solid var(--border-strong);
  transition: box-shadow 0.3s;
}
.site-header.is-scrolled { box-shadow: 0 4px 32px rgba(0, 0, 0, 0.55); }

.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  position: relative;
}

.logo {
  font-family: 'Zilla Slab', serif;
  font-weight: 700; font-size: 1.5rem;
  text-decoration: none; letter-spacing: 0.02em;
  color: var(--moon);
}
.logo:hover { color: var(--moon); opacity: 1; }
.logo span { color: var(--beam); }

.nav-list { display: flex; gap: 1.75rem; list-style: none; }
.nav-list a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--moon-muted); }
.nav-list a:hover { color: var(--beam); opacity: 1; }

.menu-toggle {
  display: none; background: none; border: 1px solid var(--beam);
  color: var(--moon); padding: 0.4rem 0.75rem; cursor: pointer;
  font-family: 'Sometype Mono', monospace; font-size: 0.75rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  border-radius: var(--radius);
}

main { min-height: 60vh; }

.eyebrow {
  font-family: 'Sometype Mono', monospace;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--beam);
}
.surface-mulberry .eyebrow { color: var(--lilac); }

h1, h2, h3 {
  font-family: 'Zilla Slab', serif;
  font-weight: 700; line-height: 1.16;
  color: var(--moon);
}
h1 { font-size: clamp(2.35rem, 5vw, 4.25rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.65rem); font-weight: 600; }

.prose { max-width: var(--measure); color: var(--moon-muted); }
.prose p { margin-bottom: 1.28em; }
.prose p:last-child { margin-bottom: 0; }
.prose a { color: var(--beam); }

.pull-quote {
  font-family: 'Zilla Slab', serif;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 600; line-height: 1.42;
  border-left: 3px solid var(--beam);
  padding: 0.65rem 0 0.65rem 1.5rem;
  margin: 2.25rem 0;
  color: var(--moon);
  background: var(--beam-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.section { padding: var(--pad) 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }

.hero-home {
  position: relative; overflow: hidden;
  padding: calc(var(--pad) * 1.15) 1.5rem var(--pad);
  background: var(--cave); color: var(--moon);
}
.hero-home::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 62% 42%, rgba(70, 165, 184, 0.12) 0%, transparent 68%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(126, 111, 166, 0.08) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1;
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.hero-text h1 .accent { color: var(--beam); }
.hero-text .eyebrow { color: var(--lilac); }
.hero-text .prose { color: var(--moon-muted); }
.hero-photo { position: relative; }
.hero-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(145deg, rgba(15, 12, 20, 0.5) 0%, rgba(15, 12, 20, 0.1) 55%, rgba(15, 12, 20, 0.4) 100%);
  border-radius: var(--radius); pointer-events: none;
}
.hero-photo img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }
.btn {
  display: inline-block; padding: 0.85rem 1.75rem;
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border-radius: var(--radius);
  font-family: 'Zilla Slab', serif;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-1px); opacity: 1; color: inherit; }
.btn-primary {
  background: var(--beam); color: var(--cave); border: none;
  box-shadow: 0 4px 20px rgba(70, 165, 184, 0.35);
}
.btn-primary:hover { background: #52b8cc; color: var(--cave); box-shadow: 0 6px 28px rgba(70, 165, 184, 0.45); }
.btn-secondary {
  background: transparent; color: var(--moon);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { border-color: var(--beam); color: var(--beam); }

.featured-card {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 2.5rem;
  padding: 2.5rem; border-radius: var(--radius); margin-top: 2rem;
  background: var(--mulberry);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.featured-card img {
  border-radius: var(--radius);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-strong);
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.featured-card .prose, .featured-card p { color: var(--moon-muted); }

.about-strip {
  display: grid; grid-template-columns: 180px 1fr; gap: 2rem;
  align-items: center; margin-top: 3rem; padding-top: 3rem;
  border-top: 1px solid var(--border);
}
.about-strip img {
  width: 180px; height: 180px; object-fit: cover; border-radius: 50%;
  border: 3px solid var(--beam);
  box-shadow: 0 0 32px var(--beam-glow);
}

.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem; margin-top: 2rem;
}
.post-card {
  border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-raised);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  border-color: var(--border-strong);
}
.post-card img { width: 100%; height: 200px; object-fit: cover; }
.post-card-body { padding: 1.5rem; }
.post-card .date {
  font-family: 'Sometype Mono', monospace;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--grey); margin-bottom: 0.5rem;
}
.post-card h3 a { text-decoration: none; color: var(--moon); }
.post-card h3 a:hover { color: var(--beam); }
.post-card p { color: var(--moon-muted); font-size: 0.95rem; }

.article-hero { padding: var(--pad) 1.5rem 2rem; background: var(--surface); }
.article-hero .meta {
  font-family: 'Sometype Mono', monospace;
  font-size: 12px; letter-spacing: 0.08em;
  color: var(--grey); margin: 1rem 0 2rem;
}
.article-photo {
  max-width: 900px; margin: 2rem auto;
  padding: 0 1.5rem;
}
.article-photo img {
  width: 100%; border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-strong);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.article-body {
  max-width: var(--measure); margin: 0 auto;
  padding: 2rem 1.5rem var(--pad);
}
.caption {
  font-size: 0.85rem; color: var(--grey);
  font-style: italic; margin-top: 0.75rem;
}

.journal-list { display: flex; flex-direction: column; gap: 2rem; }
.journal-card {
  display: grid; grid-template-columns: 280px 1fr; gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-raised);
  transition: border-color 0.25s, box-shadow 0.25s;
}
.journal-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.journal-card img {
  width: 100%; height: 180px; object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.journal-card h2 a { color: var(--moon); }
.journal-card h2 a:hover { color: var(--beam); }
.journal-card p { color: var(--moon-muted); }

.more-strip {
  padding: 3rem 1.5rem var(--pad);
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.more-strip > a {
  display: block; text-align: center;
  font-family: 'Zilla Slab', serif;
  font-size: 1.35rem; font-weight: 600;
  margin-bottom: 2rem;
  color: var(--beam);
  text-decoration: none;
}
.more-strip > a:hover { color: var(--lilac); }

.more-cards {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

/* Footer */
.site-footer {
  background: linear-gradient(180deg, var(--surface) 0%, var(--cave) 100%);
  color: var(--moon-muted);
  padding: 4rem 1.5rem 2.5rem;
  font-size: 0.9rem; line-height: 1.65;
  border-top: 1px solid var(--border-strong);
  position: relative;
}
.site-footer::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(200px, 40%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--beam), transparent);
}
.footer-inner { max-width: 1100px; margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-logo {
  font-family: 'Zilla Slab', serif;
  font-weight: 700; font-size: 1.65rem;
  margin-bottom: 0.75rem;
}
.footer-logo a { text-decoration: none; color: var(--moon); }
.footer-logo a:hover { color: var(--moon); }
.footer-logo span { color: var(--beam); }
.footer-tagline {
  color: var(--grey);
  font-style: italic;
  max-width: 28ch;
  line-height: 1.5;
}
.footer-heading {
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--beam);
  margin-bottom: 1rem;
}
.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-nav a { text-decoration: none; color: var(--moon-muted); }
.footer-nav a:hover { color: var(--beam); }
.footer-contact p { margin-bottom: 0.5rem; }
.footer-contact a { color: var(--beam); text-decoration: none; }
.footer-contact a:hover { color: var(--lilac); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.footer-disclaimer {
  color: var(--grey);
  font-size: 0.82rem;
  margin-bottom: 1rem;
  max-width: 72ch;
}
.footer-copy {
  font-family: 'Sometype Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--grey);
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
  margin-top: 2rem;
}
.contact-aside img {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.contact-aside .aside-note {
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--moon-muted);
}

.contact-form { max-width: 100%; }
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block; font-weight: 500; margin-bottom: 0.4rem;
  font-size: 0.95rem; color: var(--moon);
}
.form-group input, .form-group textarea {
  width: 100%; padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font-family: inherit; font-size: 1rem;
  background: var(--surface-raised);
  color: var(--moon);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--beam);
  box-shadow: 0 0 0 3px var(--beam-glow);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.form-check {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.form-check input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0.2rem 0 0 0;
  accent-color: var(--beam);
  cursor: pointer;
}
.form-check label {
  flex: 1;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--moon-muted);
  cursor: pointer;
  margin: 0;
}
.form-check label a { color: var(--beam); }
.form-msg { padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; }
.form-msg.ok { background: var(--beam-glow); border: 1px solid var(--beam); color: var(--moon); }
.form-msg.err { background: rgba(126, 111, 166, 0.12); border: 1px solid var(--lilac); color: var(--moon); }

.privacy-content h2 { margin: 2rem 0 1rem; font-size: 1.5rem; }
.privacy-content h3 { margin: 1.5rem 0 0.75rem; font-size: 1.2rem; }
.privacy-content ul { margin: 0.75rem 0 1.25rem 1.5rem; color: var(--moon-muted); }
.privacy-content li { margin-bottom: 0.5rem; }
.privacy-content p { color: var(--moon-muted); }

.error-page, .thanks-page {
  text-align: center;
  padding: calc(var(--pad) * 1.5) 1.5rem;
  background: var(--surface);
}
.error-page h1, .thanks-page h1 { margin-bottom: 1rem; }

.img-placeholder {
  background: linear-gradient(135deg, var(--mulberry) 0%, var(--surface-raised) 50%, var(--mulberry-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9999;
  background: var(--surface-raised); color: var(--moon);
  padding: 1.25rem 1.5rem;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.5);
  border-top: 1px solid var(--border-strong);
  transform: translateY(110%);
  transition: transform 0.35s ease;
  will-change: transform;
}
#cookie-banner.is-visible { transform: translateY(0); }
.cookie-inner { max-width: 1100px; margin: 0 auto; }
.cookie-inner p { color: var(--moon-muted); font-size: 0.9rem; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.cookie-actions button {
  padding: 0.6rem 1.25rem; font-size: 0.88rem; font-weight: 600;
  border: 1px solid var(--beam); background: transparent;
  color: var(--moon); cursor: pointer; border-radius: var(--radius);
  font-family: 'Zilla Slab', serif;
  transition: background 0.2s;
}
.cookie-actions button:first-child { background: var(--beam); color: var(--cave); border-color: var(--beam); }
.cookie-actions button:hover { opacity: 0.9; }
#cookie-panel { display: none; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
#cookie-panel.is-open { display: block; }
#cookie-panel label {
  display: flex; flex-direction: row; align-items: center;
  gap: 0.65rem; margin-bottom: 0.5rem; font-size: 0.9rem;
  color: var(--moon-muted);
}
#cookie-panel label input { accent-color: var(--beam); }

.page-hero-img {
  margin: 1.5rem 0 2.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  max-width: 100%;
}
.page-hero-img img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  display: block;
}
.page-hero-img--portrait {
  max-width: 280px;
  margin-left: 0;
  margin-right: auto;
}
.page-hero-img--portrait img {
  aspect-ratio: 3 / 4;
  object-position: center top;
}

.js .reveal {
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
.js .reveal:not(.is-visible) {
  opacity: 0;
  transform: translateY(12px);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-list {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--surface-raised); flex-direction: column; padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-strong);
  }
  .nav-list.is-open { display: flex; }
  .hero-grid, .featured-card, .about-strip, .journal-card, .contact-layout, .footer-grid {
    grid-template-columns: 1fr;
  }
  .about-strip img { width: 140px; height: 140px; margin: 0 auto; }
  .contact-aside { order: -1; }
  .contact-aside img { max-height: 240px; aspect-ratio: 16 / 9; }
}
