:root {
  color-scheme: dark;
  --bg: #0b0a08;
  --surface: #15130f;
  --surface-2: #1b1813;
  --text: #f4efe6;
  --soft: #cfc5b5;
  --muted: #8d8374;
  --line: rgba(244, 239, 230, 0.13);
  --accent: #c8a46a;
  --max: 1040px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -20rem, rgba(200, 164, 106, 0.15), transparent 36rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 26rem),
    var(--bg);
  color: var(--text);
  font: 17px/1.6 "Geist", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.75'/%3E%3C/svg%3E");
}

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

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px 22px 60px;
}

.about-button {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(21, 19, 15, 0.72);
  color: var(--soft);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  cursor: pointer;
  font: 500 0.78rem/1.35 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.about-button:hover,
.about-button:focus-visible {
  border-color: rgba(200, 164, 106, 0.58);
  background: rgba(27, 24, 19, 0.92);
  color: var(--text);
  outline: none;
}

.about-dialog {
  width: min(560px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid rgba(244, 239, 230, 0.17);
  border-radius: 24px;
  background: rgba(21, 19, 15, 0.96);
  color: var(--text);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.48);
}

.about-dialog::backdrop {
  background: rgba(5, 4, 3, 0.72);
  backdrop-filter: blur(8px);
}

.about-panel {
  position: relative;
  padding: 30px;
}

.about-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.about-close:hover,
.about-close:focus-visible {
  color: var(--text);
  border-color: rgba(244, 239, 230, 0.24);
  outline: none;
}

.about-kicker {
  margin-bottom: 12px;
  color: var(--accent);
  font: 500 0.74rem/1.35 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.about-panel h2 {
  max-width: 12ch;
  margin-bottom: 18px;
  font-size: clamp(2rem, 7vw, 3.55rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.about-panel p {
  max-width: 48ch;
  margin-bottom: 14px;
  color: var(--soft);
}

.about-panel a {
  color: var(--accent);
}

.hero {
  max-width: 820px;
  padding: clamp(34px, 8vw, 92px) 0 clamp(34px, 6vw, 70px);
}

.hero.compact {
  padding-bottom: 34px;
}

h1,
h2,
p { margin-top: 0; }

h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(3.1rem, 9vw, 6.6rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
  font-weight: 610;
  overflow-wrap: normal;
}

.hero.compact h1 {
  font-size: clamp(3rem, 8vw, 5.3rem);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 520px;
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: none;
  background: rgba(21, 19, 15, 0.76);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  font: inherit;
}

.search-box input::placeholder {
  color: var(--muted);
}

.search-box input:focus {
  border-color: rgba(200, 164, 106, 0.65);
  box-shadow:
    0 0 0 4px rgba(200, 164, 106, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.search-status {
  min-width: max-content;
  color: var(--muted);
  font: 500 0.74rem/1.35 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stories {
  column-width: 340px;
  column-gap: 14px;
}

.story {
  display: inline-block;
  width: 100%;
  margin: 0 0 14px;
  break-inside: avoid;
}

.story-link {
  display: block;
  height: auto;
  min-height: 0;
  padding: 16px;
  border-radius: 18px;
  background: rgba(21, 19, 15, 0.76);
  box-shadow:
    0 0 0 1px var(--line),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.story-link:hover {
  transform: translateY(-2px);
  background: rgba(27, 24, 19, 0.92);
  box-shadow:
    0 0 0 1px rgba(244, 239, 230, 0.2),
    0 18px 55px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.story-source {
  width: fit-content;
  margin-bottom: 13px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(200, 164, 106, 0.11);
  color: var(--accent);
  font: 500 0.71rem/1.35 "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
}

.story h2 {
  margin-bottom: 12px;
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 600;
}

.story p {
  margin-bottom: 0;
  color: var(--soft);
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .stories { column-width: auto; column-count: 1; }
  .story-link { padding: 16px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  main { padding: 10px 18px 46px; }
  h1 {
    max-width: 10ch;
    font-size: clamp(3.2rem, 17vw, 5.2rem);
  }
  .hero { padding-top: 42px; }
}
