:root {
  --radius: 10px;
  --max-width: 1080px;
}

/* Dark theme (default) — Saturn/Moon/Mars palette */
:root,
html[data-theme="dark"] {
  --bg: #121212;
  --bg-alt: #1a1a1a;
  --text: #f5f5f7;
  --text-muted: #a7acae;
  --accent: #87ff96;
  --accent-contrast: #0b0b0f;
  --border: #7f8c8d;
}

/* Light theme — same Mercury/Moon/Saturn logic, light variant */
html[data-theme="light"] {
  --bg: #f6f5f2;
  --bg-alt: #ffffff;
  --text: #1b1b1f;
  --text-muted: #5b6167;
  --accent: #2f8f52;
  --accent-contrast: #f6f5f2;
  --border: #c9cdce;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Georgia", "Times New Roman", serif;
  line-height: 1.6;
  transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3 {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.2;
  margin: 0 0 0.5em;
  overflow-wrap: break-word;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--text);
  margin-left: 16px;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle .icon { font-size: 1rem; line-height: 1; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.logo {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--text);
  letter-spacing: 0.03em;
}
.logo:hover { text-decoration: none; color: var(--accent); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-nav {
  display: flex;
  gap: 24px;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
}
.primary-nav a { color: var(--text-muted); }
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
}

/* Hero */
.hero { padding: 64px 0 0; }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.hero-inner > * { min-width: 0; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  color: var(--accent);
  font-family: "Helvetica Neue", Arial, sans-serif;
  margin: 0 0 12px;
}
.hero-text h1 {
  font-size: 2.75rem;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
}
.tagline {
  font-family: "Caveat", "Helvetica Neue", Arial, sans-serif;
  text-transform: capitalize;
  color: var(--text-muted);
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 4px;
  min-height: 1.2em;
}
.typewriter-text { color: var(--accent); }
.typewriter-cursor {
  color: var(--accent);
  animation: blink 0.8s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .typewriter-cursor { animation: none; }
}
.hero-desc { color: var(--text-muted); max-width: 100%; overflow-wrap: break-word; word-break: break-word; }

.hero-cta { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { opacity: 0.9; }
.btn-outline { color: var(--accent); }
.btn-outline:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 64px;
  padding-bottom: 80px;
}
.highlight-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.highlight-card p { color: var(--text-muted); }

/* Page intro (poetry/artist) */
.page-intro { padding-top: 48px; padding-bottom: 16px; }

/* Poetry */
.poetry-list { padding-top: 24px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 24px; }
.poetry-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  min-width: 0;
}
.poetry-title { font-size: 1.3rem; overflow-wrap: break-word; }
.poetry-body { color: var(--text); overflow-wrap: break-word; word-break: break-word; }
.poetry-date { color: var(--text-muted); font-family: "Helvetica Neue", Arial, sans-serif; font-size: 0.85rem; margin-top: 12px; }

.copyright-note {
  padding-bottom: 80px;
}
.copyright-note p {
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: var(--text-muted);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0;
}
.copyright-note strong { color: var(--text); }

/* Artist page */
.artist-profile {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
  padding-top: 24px;
  padding-bottom: 80px;
}
.artist-art {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  display: block;
  object-fit: cover;
}
.artist-links { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.footer-inner { display: flex; justify-content: center; text-align: center; flex-wrap: wrap; gap: 8px; }

/* Responsive */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 16px;
  }
  .primary-nav.open { display: flex; }
  .highlights { grid-template-columns: 1fr; }
  .artist-profile { grid-template-columns: 1fr; }
}
