@font-face {
  font-family: 'Fraunces';
  src: local('Fraunces');
}

:root {
  --ink: #14181f;
  --paper: #ece6d8;
  --paper-raised: #f4efe4;
  --text: #1c2129;
  --text-muted: #565048;
  --line: #d8cfba;
  --brass: #9a6b2f;
  --brass-strong: #7a5322;
  --verdigris: #4d6e63;
  --amber-flag: #a8481f;
  --shadow: 0 1px 2px rgba(20, 24, 31, 0.06), 0 8px 24px rgba(20, 24, 31, 0.05);
}

:root[data-theme="dark"] {
  --ink: #0e1116;
  --paper: #171b22;
  --paper-raised: #1e232c;
  --text: #e7e2d4;
  --text-muted: #a29c8c;
  --line: #333a46;
  --brass: #c99a52;
  --brass-strong: #e0b268;
  --verdigris: #7fa396;
  --amber-flag: #d97a4c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #0e1116;
    --paper: #171b22;
    --paper-raised: #1e232c;
    --text: #e7e2d4;
    --text-muted: #a29c8c;
    --line: #333a46;
    --brass: #c99a52;
    --brass-strong: #e0b268;
    --verdigris: #7fa396;
    --amber-flag: #d97a4c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
  color: var(--text);
}

a { color: var(--brass-strong); }
a:hover { color: var(--amber-flag); }

.eyebrow {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verdigris);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25em 0.6em;
  border-radius: 3px;
  border: 1px solid var(--line);
  color: var(--text-muted);
  background: var(--paper-raised);
}
.tag.verified { border-color: var(--verdigris); color: var(--verdigris); }
.tag.scaffold { border-color: var(--brass); color: var(--brass-strong); }

.site-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
:root[data-theme="light"] .site-header,
@media (prefers-color-scheme: light) { .site-header { border-bottom-color: rgba(0,0,0,0.06); } }

.site-header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: #e7e2d4;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand span { color: var(--brass); }

.site-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.88rem;
}
.site-nav a {
  color: #c7c1b0;
  text-decoration: none;
}
.site-nav a:hover { color: var(--brass); }

main.page {
  background: var(--paper);
  color: var(--text);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0.6rem 0 1.1rem;
  max-width: 18ch;
}
.hero p.lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 58ch;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.7em 1.3em;
  background: var(--brass-strong);
  color: #fff8ec;
  border-radius: 3px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--amber-flag); color: #fff8ec; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn.ghost:hover { border-color: var(--brass); color: var(--brass-strong); }

section.block { padding: 3.5rem 0; border-bottom: 1px solid var(--line); }
section.block:last-of-type { border-bottom: none; }

.section-head { margin-bottom: 2rem; max-width: 60ch; }
.section-head h2 { font-size: 1.7rem; margin: 0.4rem 0 0.6rem; }
.section-head p { color: var(--text-muted); margin: 0; }

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease;
}
.card:hover { transform: translateY(-2px); }
.card h3 { font-size: 1.25rem; margin: 0; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }
.card .theater { font-size: 0.78rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}
figure.photo {
  margin: 0;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
figure.photo img { aspect-ratio: 4/3; object-fit: cover; width: 100%; }
figure.photo figcaption { padding: 0.85rem 1rem 1.1rem; }
figure.photo figcaption .cap-title { font-weight: 600; font-size: 0.95rem; display: block; margin-bottom: 0.3rem; }
figure.photo figcaption .cap-meta { font-size: 0.78rem; color: var(--text-muted); }

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 700px) { .about-grid { grid-template-columns: 1fr; } }

.principle-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.principle-list li {
  padding-left: 1.6rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.principle-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  background: var(--brass);
  border-radius: 1px;
  transform: rotate(45deg);
}
.principle-list strong { color: var(--text); display: block; margin-bottom: 0.15em; }

.site-footer {
  background: var(--ink);
  color: #a9a394;
  padding: 3rem 0;
  font-size: 0.88rem;
}
.site-footer a { color: #cdb27e; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }

/* Article pages */
article.piece { max-width: 720px; margin: 0 auto; padding: 3.5rem 1.5rem 5rem; }
article.piece .article-head { margin-bottom: 2.2rem; }
article.piece .article-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0.7rem 0 1rem; }
article.piece .article-meta { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
article.piece figure.lead-image { margin: 0 0 2.2rem; }
article.piece figure.lead-image img { border-radius: 6px; box-shadow: var(--shadow); }
article.piece figure.lead-image figcaption {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-top: 0.6rem;
}
article.piece p { font-size: 1.08rem; margin: 0 0 1.3rem; }
article.piece p.dropcap:first-of-type::first-letter {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 3.4rem;
  float: left;
  line-height: 0.85;
  padding: 0.05em 0.08em 0 0;
  color: var(--brass-strong);
}
article.piece blockquote {
  border-left: 3px solid var(--brass);
  margin: 2rem 0;
  padding: 0.3rem 0 0.3rem 1.3rem;
  font-style: italic;
  color: var(--text);
  font-size: 1.1rem;
}
article.piece .source-note {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-muted);
}
article.piece .source-note a { color: var(--brass-strong); }
article.piece .back-link { display: inline-block; margin-bottom: 2rem; font-size: 0.9rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
