:root {
  --ink: #071823;
  --paper: #f4f0e8;
  --surface: #fffdf8;
  --line: #d8d1c4;
  --muted: #6e6a63;
  --orange: #d9601a;
  --orange-dark: #a8112a;
  --teal: #007f72;
  --focus: #a3e635;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

:where(a, button):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 24, 35, 0.96);
  backdrop-filter: blur(18px);
}

.header-main {
  width: min(100% - 2rem, 1280px);
  min-height: 78px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  justify-self: start;
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 114px;
  height: auto;
  object-fit: contain;
}

.journal-name {
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.045em;
}

.header-link {
  justify-self: end;
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  font-size: 0.72rem;
  font-weight: 850;
  text-decoration: none;
  color: #fff;
}

.header-link:hover {
  background: #fff;
  color: var(--ink);
}

.topic-strip {
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.topics {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.topics::-webkit-scrollbar {
  display: none;
}

.topic {
  flex: 0 0 auto;
  min-height: 38px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #b7b0a5;
  cursor: pointer;
  font: inherit;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.topic.active {
  border-bottom-color: var(--orange);
  color: #fff;
}

.page {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  padding: 2rem 0 5rem;
}

.edition-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.edition-line span:last-child {
  color: var(--orange-dark);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(2.3rem, 6vw, 5rem) 0;
  border-bottom: 1px solid var(--ink);
}

.hero-kicker,
.card-kicker,
.article-kicker {
  color: var(--orange-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  margin: 0.9rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7.6rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.hero-summary {
  max-width: 45rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.65;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 1.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  color: var(--orange-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.read-link::after {
  content: "→";
  transition: transform 0.15s;
}

.read-link:hover::after {
  transform: translateX(4px);
}

.hero-visual {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--ink);
  background:
    linear-gradient(145deg, transparent 0 45%, rgba(255, 255, 255, 0.16) 45% 47%, transparent 47%),
    var(--orange);
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04);
}

.hero-visual.no-image::before {
  content: "PLAY";
  position: absolute;
  left: -0.07em;
  bottom: -0.15em;
  color: rgba(17, 19, 21, 0.94);
  font-size: clamp(6rem, 16vw, 13rem);
  font-weight: 950;
  letter-spacing: -0.09em;
  line-height: 0.8;
  transform: rotate(-90deg) translateY(30%);
  transform-origin: bottom left;
}

.hero-visual.no-image::after {
  content: "";
  position: absolute;
  width: 12rem;
  height: 12rem;
  right: -3rem;
  top: -3rem;
  border: 2.5rem solid var(--paper);
  border-radius: 50%;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--ink);
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.section-head span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--ink);
}

.story-card {
  min-width: 0;
  padding: 1.5rem;
  border-right: 1px solid var(--ink);
}

.story-card:nth-child(3n + 1) {
  padding-left: 0;
}

.story-card:nth-child(3n) {
  padding-right: 0;
  border-right: 0;
}

.card-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-bottom: 1.2rem;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--teal);
}

.card-visual::after {
  content: attr(data-index);
  position: absolute;
  right: 0.6rem;
  bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.88);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  line-height: 1;
}

.card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card h3 {
  margin: 0.65rem 0 0.75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.6;
}

.card-meta {
  display: flex;
  gap: 0.7rem;
  margin-top: 1.1rem;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 750;
}

.empty-journal {
  padding: clamp(4rem, 10vw, 9rem) 0;
  border-bottom: 1px solid var(--ink);
  text-align: center;
}

.empty-journal strong {
  display: block;
  max-width: 12ch;
  margin: 0 auto 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.empty-journal p {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--muted);
  line-height: 1.65;
}

.article {
  padding-top: clamp(2.5rem, 7vw, 6rem);
}

.article-header {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.article h1 {
  margin: 1rem 0 1.25rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.article-deck {
  max-width: 48rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
}

.article-meta {
  display: flex;
  justify-content: center;
  gap: 0.8rem 1.3rem;
  flex-wrap: wrap;
  margin: 1.6rem 0 2.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.article-cover {
  width: 100%;
  max-height: 680px;
  object-fit: cover;
  border: 1px solid var(--ink);
}

.article-body {
  max-width: 720px;
  margin: 3rem auto 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.05rem, 1.5vw, 1.18rem);
  line-height: 1.82;
}

.article-body > p:first-of-type::first-letter {
  float: left;
  margin: 0.14em 0.12em 0 0;
  color: var(--orange-dark);
  font-size: 4.2em;
  line-height: 0.72;
}

.article-body h2,
.article-body h3 {
  margin: 2.3em 0 0.65em;
  font-family: var(--font);
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.article-body h2 {
  font-size: 1.75em;
}

.article-body h3 {
  font-size: 1.28em;
}

.article-body blockquote {
  margin: 2.2rem 0;
  padding: 0.8rem 0 0.8rem 1.5rem;
  border-left: 5px solid var(--orange);
  color: var(--ink);
  font-size: 1.35em;
  font-style: italic;
  line-height: 1.45;
}

.article-body pre {
  overflow-x: auto;
  padding: 1.2rem;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font: 0.82rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.article-body code {
  padding: 0.1em 0.28em;
  border-radius: 4px;
  background: #e7e0d4;
  font-size: 0.84em;
}

.article-body pre code {
  padding: 0;
  background: transparent;
}

.article-body a {
  color: var(--orange-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-body li {
  margin: 0.45rem 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--orange-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-decoration: none;
}

.back-link::before {
  content: "←";
}

.footer {
  border-top: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
}

.footer-inner {
  width: min(100% - 2rem, 1280px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.2rem 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
}

.footer a {
  color: #fff;
}

.loading {
  display: grid;
  min-height: 60vh;
  place-items: center;
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 850px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 300px;
  }

  .story-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-card:nth-child(3n + 1),
  .story-card:nth-child(3n) {
    padding: 1.2rem;
    border-right: 1px solid var(--ink);
  }

  .story-card:nth-child(2n + 1) {
    padding-left: 0;
  }

  .story-card:nth-child(2n) {
    padding-right: 0;
    border-right: 0;
  }
}

@media (max-width: 560px) {
  .header-main {
    grid-template-columns: 1fr auto;
  }

  .journal-name {
    display: none;
  }

  .header-link {
    font-size: 0.64rem;
  }

  .story-grid {
    display: block;
  }

  .story-card,
  .story-card:nth-child(n) {
    padding: 1.3rem 0;
    border-right: 0;
    border-bottom: 1px solid var(--ink);
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
