:root {
  --paper: #fbfaf4;
  --paper-deep: #f2eadb;
  --ink: #191715;
  --muted: #6d665c;
  --line: #ded5c6;
  --mustard: #d49a25;
  --mustard-dark: #95620f;
  --sci: #e8eef6;
  --library: #fff3d3;
  --fantasy: #e6efe5;
  --white: #fffdf8;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

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

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

.skip-link {
  position: absolute;
  left: 16px;
  top: 16px;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--white);
  padding: 10px 14px;
  z-index: 10;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 44px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-decoration: none;
}

.brand-dot {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--mustard);
  border: 1px solid #b57a17;
}

.nav-links {
  display: flex;
  gap: 24px;
  white-space: nowrap;
}

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

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

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(300px, 0.98fr);
  gap: 58px;
  align-items: center;
  position: relative;
  padding: 64px 0 46px;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(76px, 12vw, 160px);
  line-height: 0.86;
  font-weight: 700;
  letter-spacing: 0;
}

.hero p {
  max-width: 560px;
  margin: 30px 0 0;
  color: #332f2a;
  font-family: var(--serif);
  font-size: clamp(22px, 2.1vw, 28px);
  line-height: 1.45;
}

.hero-symbol {
  position: absolute;
  left: min(48%, 560px);
  top: 92px;
  width: 184px;
  height: 184px;
  border-radius: 50%;
  background: var(--mustard);
  border: 1px solid #b57a17;
  box-shadow: 0 24px 70px rgba(139, 91, 15, 0.18);
}

.hero-symbol::before,
.hero-symbol::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(97, 61, 8, 0.26);
}

.hero-symbol::before {
  inset: 18px;
}

.hero-symbol::after {
  inset: 38px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.filter-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--muted);
  padding: 9px 12px;
  font: 700 12px/1 var(--sans);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-button:hover {
  border-color: #c7ad70;
  color: var(--ink);
}

.filter-button.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 10px;
}

.story-card {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: 0 18px 50px rgba(54, 40, 18, 0.08);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.story-card:hover {
  border-color: #c7ad70;
  transform: translateY(-2px);
  box-shadow: 0 22px 58px rgba(54, 40, 18, 0.12);
}

.story-card[hidden] {
  display: none;
}

.story-card-link {
  display: grid;
  min-height: 100%;
  grid-template-rows: auto auto auto 1fr;
  gap: 0;
  padding: 0 0 22px;
  color: inherit;
  text-decoration: none;
}

.story-card-art {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  background: var(--paper-deep);
}

.story-kicker {
  display: block;
  margin: 20px 22px 0;
  color: var(--mustard-dark);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.story-card h2 {
  margin: 10px 22px 0;
  font-family: var(--serif);
  font-size: clamp(25px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: 0;
}

.story-card p {
  margin: 14px 22px 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 40px;
  margin-top: 76px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.about-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1;
  letter-spacing: 0;
}

.about-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.about-copy p {
  margin: 0;
}

.about-copy p + p {
  margin-top: 16px;
}

.site-footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-top: 76px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.site-footer p {
  margin: 0;
}

.back-link {
  display: inline-block;
  margin-top: 56px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.story-header {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(320px, 0.72fr);
  gap: 52px;
  align-items: center;
  margin-top: 34px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}

.story-header .story-kicker {
  margin: 0 0 16px;
}

.story-header h1 {
  grid-column: 1;
  margin: 0;
  font-family: var(--serif);
  max-width: 100%;
  font-size: clamp(50px, 6.8vw, 102px);
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.story-header > p:not(.story-kicker) {
  grid-column: 1;
  max-width: 620px;
  margin: 24px 0 0;
  color: #332f2a;
  font-family: var(--serif);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.45;
}

.story-hero-image {
  grid-column: 2;
  grid-row: 1 / span 3;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  box-shadow: 0 18px 50px rgba(54, 40, 18, 0.08);
}

.story-text {
  width: min(720px, 100%);
  margin: 62px auto 0;
  color: #24211d;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 23px);
  line-height: 1.78;
}

.story-text p {
  margin: 0;
}

.story-text p + p {
  margin-top: 1.15em;
}

.story-pagination {
  width: min(860px, 100%);
  margin: 64px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.story-pagination a {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 12px 14px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
}

.story-pagination a:hover {
  border-color: #c7ad70;
}

.story-sci-fi .story-hero-image,
.story-sci-fi .story-pagination a:hover {
  background: var(--sci);
}

.story-reportaz .story-hero-image,
.story-reportaz .story-pagination a:hover {
  background: var(--library);
}

.story-fantasy .story-hero-image,
.story-fantasy .story-pagination a:hover {
  background: var(--fantasy);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
    padding-top: 50px;
  }

  .hero-symbol {
    right: 0;
    left: auto;
    top: 52px;
    width: 128px;
    height: 128px;
  }

  .story-grid {
    grid-template-columns: 1fr;
  }

  .about-section,
  .story-header {
    grid-template-columns: 1fr;
  }

  .story-hero-image {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 28px, 1160px);
    padding-top: 22px;
  }

  .site-nav {
    align-items: flex-start;
  }

  .nav-links {
    gap: 14px;
    font-size: 11px;
    letter-spacing: 0.08em;
  }

  .brand {
    font-size: 16px;
  }

  .hero h1 {
    font-size: clamp(52px, 19vw, 84px);
  }

  .story-header h1 {
    font-size: clamp(42px, 15vw, 58px);
    line-height: 1;
  }

  .hero p {
    font-size: 22px;
  }

  .hero-symbol {
    width: 104px;
    height: 104px;
    opacity: 0.9;
  }

  .filter-button {
    flex: 1 1 auto;
  }

  .story-card h2 {
    font-size: 28px;
  }

  .site-footer {
    display: block;
  }

  .site-footer p {
    margin-top: 8px;
  }
}
