/* ==========================================================================
   QUANTUM SPECTARE — still room
   Superposition is empty space. Observation is a single mark.
   ========================================================================== */

:root,
[data-theme="paper"] {
  --bg: #f3eee4;
  --bg-subtle: #eae3d6;
  --text-main: #1c1a16;
  --text-muted: #6a655c;
  --text-faint: #9a9488;
  --line: rgba(28, 26, 22, 0.1);
  --accent: #8a7348;
  --canvas-stroke: rgba(28, 26, 22, 0.32);
  --canvas-stroke-faint: rgba(28, 26, 22, 0.08);
  --canvas-fill: #f3eee4;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --font-body: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

[data-theme="ink"] {
  --bg: #0b0b0a;
  --bg-subtle: #121210;
  --text-main: #c8c4bc;
  --text-muted: #7a766e;
  --text-faint: #4a4842;
  --line: rgba(200, 196, 188, 0.1);
  --accent: #b8a078;
  --canvas-stroke: rgba(200, 196, 188, 0.38);
  --canvas-stroke-faint: rgba(200, 196, 188, 0.1);
  --canvas-fill: #0b0b0a;
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.7;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
}

/* Header — a book margin, not a bar */
.site-header {
  padding: 2.25rem 0 0;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1.5rem;
}

.header-inner.is-wide {
  max-width: 920px;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-main);
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-main);
}

.theme-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--text-faint);
}

.theme-toggle .theme-word.is-active {
  color: var(--text-main);
}

.theme-sep {
  margin: 0 0.3rem;
  color: var(--text-faint);
}

/* Home */
.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 1.75rem 3.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 1.15rem;
  font-weight: 400;
  max-width: 28em;
  line-height: 1.65;
}

.art-viewport {
  position: relative;
  width: 100%;
  height: min(46vh, 420px);
  margin: 0 0 2rem;
  overflow: hidden;
  background: var(--canvas-fill);
}

.art-viewport canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
}

.art-hint {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--text-faint);
  pointer-events: none;
}

.statements {
  max-width: 520px;
  margin: 0 auto;
  padding: 5rem 1.75rem 2rem;
}

.statement {
  margin-bottom: 4.5rem;
}

.statement:last-child {
  margin-bottom: 0;
}

.statement h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.85rem;
}

.statement p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.writings {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.75rem 7rem;
}

.writings-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: lowercase;
  color: var(--text-faint);
  margin-bottom: 2rem;
}

.notes-list {
  list-style: none;
}

.notes-item + .notes-item {
  margin-top: 1.75rem;
}

.notes-link {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1.25rem;
  align-items: baseline;
  text-decoration: none;
  color: var(--text-main);
}

.notes-meta {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.notes-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.notes-link:hover .notes-title {
  color: var(--accent);
}

/* Archive page */
.archive {
  max-width: 720px;
  margin: 0 auto;
  padding: 6rem 1.75rem 7rem;
}

.archive-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 0.75rem;
}

.archive-lede {
  color: var(--text-muted);
  margin-bottom: 4rem;
  max-width: 28em;
}

/* Articles */
.article-container {
  max-width: 640px;
  margin: 0 auto;
  padding: 5.5rem 1.75rem 6rem;
}

.article-header {
  margin-bottom: 3.25rem;
}

.article-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: lowercase;
  color: var(--text-faint);
  margin-bottom: 1rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}

.article-meta {
  font-size: 0.82rem;
  color: var(--text-faint);
  display: flex;
  gap: 0.85rem;
}

.article-body {
  font-size: 1.08rem;
  line-height: 1.85;
}

.article-body p {
  margin-bottom: 1.6rem;
}

.article-body h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 3.25rem 0 1rem;
}

.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  font-style: italic;
  margin: 2.25rem 0 0.7rem;
}

.article-body ul,
.article-body ol {
  margin: 0.5rem 0 1.6rem 1.25rem;
}

.article-body li {
  margin-bottom: 0.55rem;
  color: var(--text-muted);
}

.article-body li strong {
  color: var(--text-main);
}

.article-body blockquote {
  margin: 2.5rem 0;
  padding: 0;
  border: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--text-main);
}

.math-block {
  font-family: var(--font-body);
  font-size: 1rem;
  font-style: italic;
  color: var(--text-main);
  background: transparent;
  border: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 1.15rem 0.25rem;
  margin: 1.75rem 0;
  text-align: center;
  overflow-x: auto;
}

/* 404 */
.void-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.void-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 1.75rem 6rem;
  max-width: 520px;
  margin: 0 auto;
}

.void-main h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.void-main a {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  text-decoration: none;
  color: var(--text-muted);
}

.void-main a:hover {
  color: var(--text-main);
}

/* Footer */
.site-footer {
  margin-top: auto;
  padding: 0 0 3.5rem;
}

.footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.75rem 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
}

.footer-inner.is-wide {
  max-width: 920px;
}

.footer-nav {
  display: flex;
  gap: 1.35rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-faint);
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--text-main);
}

@media (max-width: 640px) {
  .header-inner,
  .footer-inner {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
    gap: 0.9rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-link,
  .theme-toggle {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
  }

  .hero {
    padding: 4.25rem 1.25rem 2.5rem;
  }

  .statements,
  .writings,
  .archive,
  .article-container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .notes-link {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .art-viewport {
    height: 38vh;
  }
}
