@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;1,6..72,400&family=IBM+Plex+Mono:wght@400;500&family=Caveat:wght@500;600&display=swap');

:root {
  --ink: #16140f;
  --paper: #f6f3ec;
  --paper-dim: #efebe0;
  --red: #b0332a;
  --rule: #d8d2c2;
  --muted: #6b6858;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(circle, rgba(22,20,15,0.14) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  font-size: 19px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */

header.site-head {
  padding: 72px 0 40px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}

header.site-head h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: 34px;
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}

.roles {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 22px;
}

.hero-row {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 0 28px;
}

.hero-mark {
  flex: none;
  width: 78px;
  height: 78px;
}

.hero-mark svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-mark svg path {
  fill: none;
  stroke: var(--red);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 480;
  stroke-dashoffset: 480;
  opacity: 0;
}

.hero-mark svg.replay path {
  animation: draw-fade 7s ease-in-out infinite;
}

.hero-mark svg.replay path:nth-of-type(1) { animation-delay: 0s; }
.hero-mark svg.replay path:nth-of-type(2) { animation-delay: 1.3s; }
.hero-mark svg.replay path:nth-of-type(3) { animation-delay: 2.6s; }
.hero-mark svg.replay path:nth-of-type(4) { animation-delay: 3.9s; }
.hero-mark svg.replay path:nth-of-type(5) { animation-delay: 5.2s; }

@keyframes draw-fade {
  0%   { stroke-dashoffset: 480; opacity: 0; }
  6%   { opacity: 0.9; }
  38%  { stroke-dashoffset: 0; opacity: 0.9; }
  78%  { stroke-dashoffset: 0; opacity: 0.55; }
  100% { stroke-dashoffset: 0; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mark svg.replay path {
    animation: none;
    stroke-dashoffset: 0;
    opacity: 0.7;
  }
}

.thesis {
  margin: 0;
  font-family: 'Newsreader', Georgia, serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.25;
}

.thesis span {
  display: block;
}

.thesis .line-1 { color: var(--ink); }
.thesis .line-2 { color: var(--red); }

nav.site-nav {
  display: flex;
  gap: 26px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

nav.site-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 3px;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  border-bottom-color: var(--red);
  color: var(--red);
}

/* ---------- Stream ---------- */

main.stream {
  padding: 24px 0 100px;
}

.entry {
  padding: 56px 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}

.entry:last-child { border-bottom: none; }

.entry-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 10px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.entry-meta .medium::after {
  content: "\2014";
  margin-left: 14px;
  color: var(--rule);
}

.entry h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: 27px;
  margin: 0 0 20px;
  line-height: 1.25;
}

.entry-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--paper-dim);
  border: 1px solid var(--rule);
  margin-bottom: 22px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.entry-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.entry-media .media-fallback {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-body p {
  margin: 0 0 16px;
}

.entry-body p.strike {
  color: var(--red);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  font-size: 17px;
  opacity: 0.75;
}

.annotation {
  font-family: 'Caveat', cursive;
  color: var(--red);
  font-size: 27px;
  line-height: 1.35;
  max-width: 42ch;
  margin: 22px 0 0;
  transform: rotate(-0.6deg);
}

.entry-links {
  margin-top: 22px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.entry-links a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.entry-links a:hover { color: var(--red); border-color: var(--red); }

/* ---------- Conversations page ---------- */

.page-intro {
  padding: 40px 0 20px;
}

.page-intro h1 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  font-size: 30px;
  margin: 0 0 14px;
}

.page-intro p {
  max-width: 52ch;
  color: var(--muted);
  font-style: italic;
}

.empty-state {
  padding: 60px 0 120px;
  color: var(--muted);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.03em;
  border-top: 1px solid var(--rule);
}

/* ---------- Footer ---------- */

footer.site-foot {
  border-top: 1px solid var(--rule);
  padding: 32px 0 60px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  header.site-head { padding: 48px 0 32px; }
  header.site-head h1 { font-size: 28px; }
  .hero-mark { width: 56px; height: 56px; }
  .thesis { font-size: 23px; }
  .entry { padding: 40px 0; }
  .entry h2 { font-size: 23px; }
  .annotation { font-size: 23px; }
}
