/* Nestlerest / Isaac W. Fox story pages — shared stylesheet */

:root {
  --red: #ff3d3d;
  --cyan: #3dcfff;
  --green: #4dff3d;
  --text: #1a1a0e;
  --muted: #5c5c50;
  --border: #e0dbd3;
  --note-bg: #fffbe8;
  --link-color: #0055aa;
  --link-visited: #8a4a6a;
  --bg: #fafaf8;
  --max: 760px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 17px;
  line-height: 1.78;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Navigation ── */
.site-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.4rem 1.5rem 0;
  font-size: 0.74rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 600;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }
.site-nav .sep { margin: 0 0.45em; opacity: 0.35; }

/* ── Hero ── */
.hero {
  width: 100%;
  overflow: hidden;
  margin: 1.5rem 0 0;
  position: relative;
  max-height: 540px;
}
.hero img {
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  filter: sepia(8%) contrast(1.04);
}
.hero-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem 0.9rem;
  background: linear-gradient(transparent, rgba(10, 10, 6, 0.7));
  color: rgba(255,255,255,0.82);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

/* ── Masthead ── */
.masthead {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 0;
}
.masthead .kicker {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.6rem;
}
.masthead h1 {
  font-size: clamp(2rem, 5.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.03em;
  color: var(--red);
  margin-bottom: 0.6rem;
}
.masthead .subtitle {
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 1.1rem;
  line-height: 1.4;
}
.masthead .dateline {
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* ── Signature ── */
.signature-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.signature {
  display: block;
  max-width: 280px;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  opacity: 0.88;
}
.signature-caption {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-style: italic;
}

/* ── Article ── */
article {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.25rem 1.5rem 5rem;
}

p {
  margin-bottom: 1.45rem;
  font-size: 1.05rem;
}

h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 3.25rem 0 1.1rem;
  color: var(--text);
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--red);
}

h3 {
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.7rem;
  color: var(--text);
}

/* ── Links ── */
a {
  color: var(--link-color);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 3px solid;
  border-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 5.87"><path fill="%234dff3d" d="M89 10c-2.788 0-4.228 1.143-5.5 2.15-1.162.922-2.165 1.718-4.255 1.718-2.091 0-3.095-.796-4.257-1.718-1.271-1.007-2.712-2.15-5.499-2.15-2.785 0-4.225 1.143-5.496 2.15-1.161.922-2.164 1.718-4.253 1.718-2.09 0-3.093-.796-4.254-1.718-1.271-1.007-2.711-2.15-5.498-2.15-2.785 0-4.225 1.143-5.495 2.15-1.161.922-2.164 1.718-4.253 1.718-2.088 0-3.09-.796-4.251-1.718-1.27-1.007-2.71-2.15-5.495-2.15S26.27 11.143 25 12.151c-1.162.921-2.164 1.717-4.251 1.717-2.09 0-3.092-.796-4.253-1.718C15.226 11.143 13.786 10 11 10a1 1 0 1 0 0 2c2.088 0 3.091.796 4.252 1.718 1.27 1.008 2.71 2.15 5.497 2.15 2.784 0 4.224-1.142 5.494-2.15 1.16-.922 2.163-1.718 4.251-1.718s3.09.796 4.252 1.718c1.27 1.008 2.71 2.15 5.494 2.15 2.786 0 4.226-1.142 5.496-2.15C46.897 12.796 47.9 12 49.988 12c2.09 0 3.093.796 4.255 1.718 1.27 1.008 2.71 2.15 5.497 2.15 2.786 0 4.226-1.142 5.496-2.15C66.397 12.796 67.4 12 69.49 12c2.09 0 3.094.796 4.256 1.718 1.272 1.008 2.712 2.15 5.5 2.15 2.787 0 4.227-1.142 5.498-2.15C85.906 12.796 86.91 12 89 12a1 1 0 1 0 0-2z"/></svg>') 0 0 100 0 repeat;
  opacity: 0.82;
  transition: opacity 0.15s;
}
a:hover { opacity: 1; }
a:visited { color: var(--link-visited); }

/* Source citation superscripts */
sup a.src {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  border: none;
  border-image: none;
  vertical-align: super;
  line-height: 0;
  padding: 0 0.08em;
  opacity: 1;
  letter-spacing: 0;
}
sup a.src:hover { color: var(--red); }

/* ── Pull quote ── */
blockquote {
  margin: 2.25rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--red);
  font-size: 1.18rem;
  font-weight: 500;
  font-style: italic;
  line-height: 1.55;
  color: var(--text);
  background: transparent;
}
blockquote cite {
  display: block;
  margin-top: 0.55rem;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Research note ── */
.note {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--note-bg);
  border-left: 3px solid #c8a800;
  font-size: 0.84rem;
  line-height: 1.65;
  color: #5a4e00;
}
.note strong {
  color: #7a5e00;
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

/* ── Figures / images ── */
figure {
  margin: 2.75rem 0;
}
figure img {
  width: 100%;
  display: block;
  border: 1px solid var(--border);
}
figcaption {
  margin-top: 0.55rem;
  font-size: 0.73rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2.75rem 0;
}
.figure-pair figure { margin: 0; }

/* ── Cross-link card ── */
.crosslink {
  margin: 3.5rem 0 0;
  padding: 1.75rem 2rem;
  border: 2px solid var(--cyan);
  background: linear-gradient(135deg, rgba(61,207,255,0.06) 0%, var(--bg) 100%);
}
.crosslink .label {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.crosslink h3 {
  margin: 0 0 0.45rem;
  font-size: 1.1rem;
  color: var(--text);
}
.crosslink p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0; }
.crosslink a.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.45rem 1.1rem;
  background: var(--cyan);
  color: #000;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  border-image: none;
  opacity: 1;
  transition: background 0.15s, color 0.15s;
}
.crosslink a.btn:hover { background: var(--text); color: #fff; }

/* ── Footnotes ── */
.footnotes {
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}
.footnotes h2 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
  padding-bottom: 0;
  border-bottom: none;
}
.footnotes ol {
  list-style: decimal;
  padding-left: 1.4rem;
}
.footnotes li {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  line-height: 1.55;
}
.footnotes li a {
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── Footer ── */
footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.65;
}
footer a {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted);
  border-image: none;
  border-bottom: 1px solid var(--border);
  opacity: 1;
}
footer a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .figure-pair { grid-template-columns: 1fr; }
  .hero img { height: 320px; }
  .hero { max-height: 320px; }
  blockquote { font-size: 1rem; padding: 0.75rem 1rem; }
  article { padding: 2rem 1.25rem 4rem; }
  .masthead { padding: 2rem 1.25rem 0; }
  .site-nav { padding: 1.2rem 1.25rem 0; }
  .crosslink { padding: 1.25rem 1.25rem; }
}

@media print {
  body { font-size: 12pt; background: #fff; }
  .hero-caption { display: none; }
  a { border: none !important; border-image: none !important; text-decoration: underline; }
  .crosslink { border: 1px solid #ccc; }
}
