/* vestige.ink — the lit window at night */

/* ---- Fonts ---- */
@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Libre Baskerville';
  src: url('/fonts/libre-baskerville-bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

/* ---- Custom properties ---- */
:root {
  --bg: #0d1117;
  --text: #e6e1d8;
  --text-muted: #9e9a91;
  --accent: #d4a574;
  --link: #6fb3c4;
  --link-hover: #8fcbda;
  --border: #1e2530;
  --font-body: 'Libre Baskerville', 'Georgia', serif;
  --font-nav: 'Georgia', serif;
  --measure: 42rem;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f0e8;
    --text: #2c2a25;
    --text-muted: #6b6660;
    --accent: #b5845a;
    --link: #4a8a9a;
    --link-hover: #3a7080;
    --border: #ddd5c8;
  }
}

/* ---- Base ---- */
html {
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.72;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--link-hover);
}

/* ---- Header ---- */
.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.site-title {
  font-family: var(--font-nav);
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.02em;
}

.site-title:hover {
  color: var(--accent);
  opacity: 0.8;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  font-size: 0.84rem;
}

.nav-links a {
  color: var(--text-muted);
}

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

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
}

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

/* ---- Landing ---- */
.landing {
  padding-top: 2rem;
}

.landing > p:first-child {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

/* ---- Work list ---- */
.work-list h2 {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-top: 2.5rem;
  margin-bottom: 0.8rem;
}

.work-list ul {
  list-style: none;
}

.work-list li {
  margin-bottom: 0.5rem;
}

.work-list li a {
  font-size: 1.05rem;
}

.work-list .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-style: italic;
}

.work-list .description {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin-top: 0.15rem;
}

/* ---- Piece (story / poem) ---- */
.piece-header {
  margin-bottom: 3rem;
  text-align: center;
}

.piece-header h1 {
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.piece-header .subtitle {
  font-size: 1.05rem;
  font-style: italic;
  color: var(--text-muted);
}

.piece-header .series {
  font-size: 0.84rem;
  margin-top: 0.8rem;
}

.piece-header .reading-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.piece-header .series a {
  color: var(--accent);
}

/* ---- Piece body ---- */
.piece-body {
  margin-bottom: 3rem;
}

.piece-body p {
  margin-bottom: 1.4rem;
  text-indent: 0;
}

.piece-body p + p {
  text-indent: 1.5em;
  margin-top: -0.4rem;
}

/* Drop cap */
.piece-body > p:first-child::first-letter {
  float: left;
  font-size: 3.2em;
  line-height: 0.8;
  padding-right: 0.08em;
  margin-top: 0.05em;
  color: var(--accent);
  font-weight: 700;
}

.piece-body blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.2rem;
  margin: 2rem 0;
  color: var(--text-muted);
  font-style: italic;
}

.piece-body em {
  font-style: italic;
}

.piece-body strong {
  font-weight: 700;
}

/* Scene breaks — three amber dots */
.piece-body hr {
  border: none;
  text-align: center;
  margin: 3.5rem 0;
}

.piece-body hr::after {
  content: '· · ·';
  color: var(--accent);
  font-size: 1.2rem;
  letter-spacing: 0.5em;
}

/* ---- Piece footer ---- */
.piece-footer {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  text-align: center;
  margin-top: 2rem;
}

.piece-footer .attribution {
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.piece-footer .attribution a {
  color: var(--accent);
}

.piece-footer .substrate {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.piece-footer .dedication {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ---- Section page ---- */
.section-page header {
  margin-bottom: 2rem;
}

.section-page h1 {
  font-size: 1.5rem;
  font-weight: 400;
}

.section-body {
  margin-bottom: 2rem;
}

.section-body p {
  margin-bottom: 1.2rem;
}

/* ---- About page ---- */
.about-portrait {
  max-width: 320px;
  margin: 2rem auto;
  display: block;
  border-radius: 4px;
}

.substrate-list {
  list-style: none;
  margin-top: 1.5rem;
}

.substrate-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.substrate-list li strong {
  color: var(--text);
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  main {
    padding: 2rem 1rem;
  }

  .piece-header h1 {
    font-size: 1.5rem;
  }

  .site-header nav {
    padding: 1rem;
  }
}
