:root {
  color-scheme: light;
  --ink: #181715;
  --muted: #635c52;
  --paper: #fbf7ef;
  --panel: #fffdf8;
  --rule: #ded4c5;
  --music: #476a67;
  --writing: #7b4053;
  --comic: #25222b;
  --game: #7a6127;
  --accent: #b54635;
  --shadow: 0 18px 45px rgba(30, 24, 18, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@font-face {
  font-family: "EmbossedBlackWide";
  src: local("EmbossedBlackWide"), local("Embossed Black Wide");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(24, 23, 21, 0.035) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--paper);
  line-height: 1.5;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 1rem;
}

.site-header,
.site-footer,
.hero,
.page-hero,
.listing,
.page-shell,
.comic-shell,
.game-panel {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.6rem;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--panel);
}

.brand-mark img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.4rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 70vh;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.hero h1,
.page-hero h1,
.comic-top h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 7.2rem);
  line-height: 0.92;
  font-weight: 700;
}

.page-hero h1,
.comic-top h1 {
  max-width: 950px;
  font-size: clamp(2.7rem, 6vw, 5.3rem);
}

.series-title {
  font-family: "EmbossedBlackWide", Impact, Haettenschweiler, "Arial Black", sans-serif;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lede {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(1.12rem, 2vw, 1.45rem);
}

.portrait-card {
  display: grid;
  place-items: center;
  padding: 2rem;
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 35%, rgba(181, 70, 53, 0.18), transparent 32%),
    linear-gradient(145deg, #2a2522, #5c493c);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.portrait-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border: 2px solid rgba(251, 247, 239, 0.8);
}

.portrait-initials {
  display: grid;
  place-items: center;
  width: min(72%, 250px);
  aspect-ratio: 1;
  border: 2px solid rgba(251, 247, 239, 0.8);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
}

.portrait-card p {
  margin: 1rem 0 0;
  color: rgba(251, 247, 239, 0.78);
}

.section-grid,
.card-list,
.issue-grid,
.thumb-grid {
  display: grid;
  gap: 1rem;
}

.section-grid {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 5rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card,
.list-card,
.issue-card,
.thumb-card {
  min-height: 100%;
  padding: 1.3rem;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(30, 24, 18, 0.06);
}

.feature-card {
  display: flex;
  min-height: 270px;
  flex-direction: column;
  justify-content: flex-end;
}

.feature-card span,
.list-card span,
.issue-card span,
.thumb-card span {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card h2,
.list-card h3,
.issue-card h3 {
  margin: 0.6rem 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.feature-card p,
.list-card p,
.issue-card p,
.section-heading p {
  margin: 0;
  color: var(--muted);
}

.music-card {
  border-top: 7px solid var(--music);
}

.writing-card {
  border-top: 7px solid var(--writing);
}

.comic-card {
  border-top: 7px solid var(--comic);
}

.game-card {
  border-top: 7px solid var(--game);
}

.page-hero {
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(2rem, 5vw, 4rem);
}

.music-hero,
.writing-hero,
.comic-hero,
.game-hero {
  border-top: 1px solid var(--rule);
}

.listing {
  padding: 2rem 0 4rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.card-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.list-card {
  display: block;
}

.prose {
  font-size: 1.08rem;
}

.prose h1,
.prose h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.writing-body {
  max-width: 760px;
}

.writing-body p {
  margin: 1.1rem 0;
}

.writing-body hr {
  width: 6rem;
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.indent-1,
.indent-2,
.indent-3 {
  display: inline-block;
}

.indent-1 {
  padding-left: 2rem;
}

.indent-2 {
  padding-left: 4rem;
}

.indent-3 {
  padding-left: 6rem;
}

.page-shell {
  padding: 4rem 0;
}

.resource-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button,
.comic-controls a,
.comic-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 750;
}

.button.primary {
  background: var(--ink);
  color: var(--paper);
}

.media-frame {
  position: relative;
  overflow: hidden;
  margin: 2rem 0;
  aspect-ratio: 16 / 9;
  background: #000;
}

.media-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-list {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.video-item h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.video-item .media-frame {
  margin: 0;
}

.video-item p {
  margin: 0.75rem 0 0;
  color: var(--muted);
}

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

.issue-card img,
.thumb-card img {
  margin-bottom: 1rem;
  background: #eee8dc;
  border: 1px solid var(--rule);
}

.thumb-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.thumb-card {
  padding: 0.75rem;
}

.comic-reader {
  background: #141212;
  color: var(--paper);
}

.comic-reader .site-header,
.comic-reader .site-footer {
  color: var(--paper);
}

.comic-shell {
  padding: 2rem 0 4rem;
}

.comic-top {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.comic-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.comic-controls a,
.comic-controls span {
  border-color: rgba(251, 247, 239, 0.6);
}

.comic-controls span,
.comic-controls a[aria-disabled="true"] {
  opacity: 0.48;
}

.comic-page {
  margin: 0;
  padding: 1rem;
  background: #0d0c0b;
}

.comic-page img {
  width: min(100%, 1100px);
  margin-inline: auto;
}

.comic-controls-bottom {
  margin-top: 1rem;
  justify-content: center;
}

.game-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.9fr);
  gap: 2rem;
  align-items: center;
  padding: 0 0 5rem;
}

.game-embed {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 5rem;
}

.game-embed iframe {
  display: block;
  width: 100%;
  min-height: 980px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
}

.ascii-stage {
  overflow: auto;
  padding: 1.5rem;
  background: #171310;
  color: #e8d89a;
  border-radius: 8px;
}

.ascii-stage pre {
  margin: 0;
  font-size: clamp(0.82rem, 1.8vw, 1.2rem);
  line-height: 1.25;
}

.site-footer {
  padding: 2rem 0;
  color: var(--muted);
  border-top: 1px solid var(--rule);
}

@media (max-width: 900px) {
  .hero,
  .game-panel {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .card-list,
  .issue-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portrait-card {
    min-height: 320px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .section-grid,
  .card-list,
  .issue-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    min-height: 210px;
  }

  .comic-page {
    padding: 0.4rem;
  }
}
