@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Noto+Serif+SC:wght@500;600;700;900&display=swap");

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

:root {
  color-scheme: dark;
  --night: #0c0d0f;
  --night-soft: #121317;
  --ink: #f0ece4;
  --muted: #aaa59c;
  --faint: #747178;
  --line: rgba(237, 229, 215, 0.14);
  --wine: #9a4355;
  --indigo: #7182b5;
  --gold: #c9ac72;
}

html {
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  min-height: 100%;
  color: var(--ink);
  background: var(--night);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: #fff;
  background: rgba(154, 67, 85, 0.72);
}

a {
  color: inherit;
  text-decoration: none;
}

.archive-hero {
  position: relative;
  isolation: isolate;
  min-height: 82svh;
  max-height: 820px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 7rem max(1.25rem, calc((100vw - 1180px) / 2)) 5.2rem;
  border-bottom: 1px solid var(--line);
  background: #0d0e10;
}

.archive-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("/assets/saikoroshi/jinja.jpg") center 44% / cover no-repeat;
  filter: saturate(0.68) contrast(1.08);
  transform: scale(1.025);
}

.archive-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(9, 10, 12, 0.96) 0%, rgba(9, 10, 12, 0.78) 43%, rgba(9, 10, 12, 0.2) 76%, rgba(9, 10, 12, 0.62) 100%),
    linear-gradient(180deg, rgba(8, 9, 11, 0.3) 0%, rgba(8, 9, 11, 0.08) 38%, #0c0d0f 100%);
}

.site-nav {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4.5rem;
  padding: 0 max(1.25rem, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(237, 229, 215, 0.12);
  color: rgba(240, 236, 228, 0.72);
  font-size: 0.85rem;
}

.site-nav a:hover {
  color: #fff;
}

.site-nav .wordmark {
  color: var(--ink);
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
}

.archive-hero-copy {
  position: relative;
  z-index: 2;
  width: min(680px, 68%);
}

.series-mark,
.eyebrow {
  color: var(--gold);
  font-size: 0.76rem;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 700;
}

.archive-hero h1 {
  margin-top: 0.7rem;
  font-family: "Noto Serif SC", serif;
  font-size: 4.9rem;
  line-height: 1.08;
  font-weight: 900;
  text-wrap: balance;
}

.archive-hero h1 span {
  display: block;
  margin-top: 0.45rem;
  color: rgba(240, 236, 228, 0.76);
  font-size: 2rem;
  font-weight: 500;
}

.archive-lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: rgba(240, 236, 228, 0.7);
  font-family: "Noto Serif SC", serif;
  font-size: 1.08rem;
  line-height: 1.95;
}

.primary-link,
.read-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 1.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid rgba(201, 172, 114, 0.42);
  border-radius: 6px;
  background: rgba(201, 172, 114, 0.11);
  color: #f3e4c5;
  font-size: 0.88rem;
  font-weight: 700;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-link:hover,
.read-link:hover {
  transform: translateY(-1px);
  border-color: rgba(201, 172, 114, 0.7);
  background: rgba(201, 172, 114, 0.19);
}

.hero-character {
  position: absolute;
  z-index: 1;
  right: max(6%, calc((100vw - 1260px) / 2));
  bottom: -0.7rem;
  width: 290px;
  height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  filter: drop-shadow(0 24px 38px rgba(0, 0, 0, 0.62));
}

.hero-character img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.hero-note {
  position: absolute;
  z-index: 2;
  right: max(1.25rem, calc((100vw - 1180px) / 2));
  bottom: 2rem;
  color: rgba(240, 236, 228, 0.46);
  font-size: 0.73rem;
}

.archive-main {
  padding: 5rem max(1.25rem, calc((100vw - 1180px) / 2)) 6rem;
  background:
    linear-gradient(180deg, #0c0d0f 0%, #111217 48%, #0c0d0f 100%),
    repeating-linear-gradient(90deg, transparent 0 119px, rgba(255, 255, 255, 0.018) 119px 120px);
}

.archive-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28rem;
  gap: 3rem;
  align-items: end;
  padding-bottom: 1.6rem;
  border-bottom: 1px solid var(--line);
}

.archive-heading h2 {
  margin-top: 0.45rem;
  font-family: "Noto Serif SC", serif;
  font-size: 2.25rem;
  line-height: 1.25;
}

.archive-heading > p {
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-size: 0.96rem;
  line-height: 1.8;
}

.essay-list {
  display: grid;
  gap: 0;
}

.essay-entry {
  display: grid;
  grid-template-columns: minmax(280px, 43%) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
  padding: 3.2rem 0;
  border-bottom: 1px solid var(--line);
}

.entry-visual {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #15161a;
}

.entry-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 46%, rgba(5, 6, 8, 0.66) 100%);
}

.entry-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 420ms ease, filter 420ms ease;
}

.entry-visual:hover img {
  transform: scale(1.025);
  filter: brightness(1.06);
}

.saikoroshi-visual {
  background:
    linear-gradient(90deg, rgba(13, 14, 17, 0.7), rgba(13, 14, 17, 0.12)),
    url("/assets/saikoroshi/jinja.jpg") center / cover no-repeat;
}

.saikoroshi-visual img {
  width: 38%;
  margin-left: auto;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(-10px 18px 20px rgba(0, 0, 0, 0.48));
}

.saikoroshi-visual:hover img {
  transform: scale(1.025) translateY(-1%);
}

.giant-visual img {
  object-position: center 35%;
  filter: saturate(0.68) brightness(0.78);
}

.entry-index {
  position: absolute;
  z-index: 2;
  left: 1rem;
  bottom: 0.8rem;
  color: rgba(255, 255, 255, 0.76);
  font-family: "Noto Serif SC", serif;
  font-size: 1.2rem;
  font-weight: 700;
}

.entry-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--faint);
  font-size: 0.76rem;
}

.chapter-tag {
  display: inline-flex;
  min-width: 2rem;
  min-height: 2rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(154, 67, 85, 0.48);
  border-radius: 50%;
  color: #e9a9b5;
  font-family: "Noto Serif SC", serif;
  font-weight: 700;
}

.chapter-tag.answer {
  border-color: rgba(113, 130, 181, 0.52);
  color: #b7c4eb;
}

.entry-copy h3 {
  max-width: 39rem;
  margin-top: 0.9rem;
  font-family: "Noto Serif SC", serif;
  font-size: 2rem;
  line-height: 1.38;
  text-wrap: balance;
}

.entry-copy h3 a:hover {
  color: #fff;
}

.entry-copy > p {
  max-width: 39rem;
  margin-top: 1rem;
  color: var(--muted);
  font-family: "Noto Serif SC", serif;
  font-size: 0.98rem;
  line-height: 1.9;
}

.read-link {
  min-height: 2.45rem;
  margin-top: 1.3rem;
  padding: 0.52rem 0.85rem;
}

.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 7rem;
  padding: 2rem max(1.25rem, calc((100vw - 1180px) / 2));
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.82rem;
  background: #090a0c;
}

.archive-footer > div {
  display: flex;
  gap: 1.2rem;
}

.archive-footer a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .archive-hero {
    min-height: 78svh;
    padding-bottom: 3.8rem;
  }

  .archive-hero-copy {
    width: 72%;
  }

  .archive-hero h1 {
    font-size: 3.5rem;
  }

  .hero-character {
    right: -1rem;
    width: 250px;
    height: 450px;
    opacity: 0.78;
  }

  .hero-note {
    display: none;
  }

  .archive-heading {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .archive-heading > p {
    max-width: 34rem;
  }

  .essay-entry {
    grid-template-columns: minmax(240px, 42%) minmax(0, 1fr);
    gap: 2rem;
  }

  .entry-copy h3 {
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .site-nav {
    min-height: 4rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .archive-hero {
    min-height: 76svh;
    padding: 6rem 1rem 3.2rem;
  }

  .archive-hero::after {
    background:
      linear-gradient(90deg, rgba(9, 10, 12, 0.94), rgba(9, 10, 12, 0.55)),
      linear-gradient(180deg, rgba(8, 9, 11, 0.34), rgba(8, 9, 11, 0.34) 42%, #0c0d0f 100%);
  }

  .archive-hero-copy {
    width: 100%;
  }

  .archive-hero h1 {
    max-width: 20rem;
    font-size: 2.75rem;
  }

  .archive-hero h1 span {
    font-size: 1.45rem;
  }

  .archive-lead {
    max-width: 22rem;
    font-size: 0.98rem;
  }

  .hero-character {
    right: -4.5rem;
    width: 210px;
    height: 365px;
    opacity: 0.42;
  }

  .archive-main {
    padding: 3.5rem 1rem 4.5rem;
  }

  .archive-heading h2 {
    font-size: 1.8rem;
  }

  .essay-entry {
    grid-template-columns: 1fr;
    gap: 1.35rem;
    padding: 2.4rem 0;
  }

  .entry-copy h3 {
    font-size: 1.55rem;
  }

  .archive-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .entry-visual img,
  .primary-link,
  .read-link {
    transition: none;
  }
}
