@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #171108;
  --bg-deep: #0f0b06;
  --surface: #242009;
  --surface-soft: #302e10;
  --olive: #3c4511;
  --olive-bright: #96ad35;
  --amber: #f3a429;
  --cream: #f0e8d7;
  --muted: #b0a58e;
  --line: rgba(240, 232, 215, .15);
  --shadow: 0 24px 60px rgba(0, 0, 0, .34);
  --mono: "Space Mono", monospace;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 16% -6%, rgba(150, 173, 53, .11), transparent 28rem),
    linear-gradient(180deg, #1b1408 0%, var(--bg) 50%, #120d06 100%);
  color: var(--cream);
  font: 400 1rem/1.6 var(--sans);
}

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

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; width: 100%; }

.container { width: min(1180px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: .7rem 1rem; color: #171108; background: var(--cream); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  min-height: 146px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 34px;
}

.brand { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--mono); letter-spacing: -.08em; }
.brand__name em { color: var(--cream); font-style: normal; font-weight: 400; }
.brand__tagline { margin-top: 10px; color: var(--amber); font: 400 .72rem/1.2 var(--mono); letter-spacing: .04em; }

.header-tools { display: grid; justify-items: end; gap: 18px; }
.nav { display: flex; border: 1px solid var(--line); }
.nav a { min-width: 72px; padding: .72rem 1rem; color: var(--muted); text-align: center; font: .76rem var(--mono); border-right: 1px solid var(--line); transition: .2s ease; }
.nav a:last-child { border-right: 0; }
.nav a:hover, .nav a:focus-visible, .nav .active { color: var(--cream); background: rgba(255,255,255,.04); }

.search { display: flex; align-items: center; gap: 10px; }
.search label { color: var(--muted); font: .72rem var(--mono); }
.search__field { height: 38px; display: flex; background: #ece3cf; border: 1px solid #fff5e4; }
.search input { width: 220px; min-width: 0; padding: 0 12px; color: #21190e; background: transparent; border: 0; outline: 0; }
.search__field:focus-within { outline: 2px solid var(--amber); outline-offset: 3px; }
.search button { width: 42px; display: grid; place-items: center; color: #21190e; background: transparent; border: 0; cursor: pointer; }
.search svg { width: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.featured {
  position: relative;
  display: grid;
  grid-template-columns: 94px 220px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 30px;
  min-height: 390px;
  padding-block: 26px 54px;
}

.featured__thumbs { display: grid; gap: 14px; }
.thumb { position: relative; aspect-ratio: 16/10; padding: 0; overflow: hidden; background: #000; border: 1px solid transparent; opacity: .5; transition: transform .2s ease, opacity .2s ease, border-color .2s ease; }
.thumb img { height: 100%; object-fit: cover; }
.thumb:hover, .thumb:focus-visible { opacity: .82; transform: translateX(5px); }
.thumb.active { opacity: 1; border-color: var(--amber); transform: translateX(10px); }
.thumb.active::after { position: absolute; top: 50%; right: -11px; width: 18px; aspect-ratio: 1; content: ""; background: var(--amber); transform: translate(100%, -50%) rotate(45deg); }

.featured__copy { align-self: center; }
.eyebrow { color: var(--amber); font: 700 .7rem var(--mono); letter-spacing: .13em; text-transform: uppercase; }
.featured h1 { margin: .6rem 0 .9rem; font: 400 clamp(2rem, 3.8vw, 3.45rem)/1.03 var(--mono); letter-spacing: -.06em; }
.featured__copy p { margin: 0 0 1.4rem; color: var(--muted); line-height: 1.55; }
.button { display: inline-flex; align-items: center; gap: .8rem; padding: .72rem .95rem; color: #171108; background: var(--olive-bright); font: 700 .72rem var(--mono); box-shadow: inset 0 1px rgba(255,255,255,.3); transition: transform .2s, background .2s; }
.button:hover, .button:focus-visible { background: #b0c94a; transform: translateY(-2px); }
.featured__meta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.25rem; color: var(--muted); font: .64rem var(--mono); }
.stars { color: #ffc43d; letter-spacing: .07em; text-shadow: 0 1px #8c5500; }
.stars i { color: #665f51; font-style: normal; text-shadow: none; }

.featured__media { position: relative; aspect-ratio: 16/9; padding: 10px; background: #eee5d2; border: 1px solid #fff8e9; box-shadow: var(--shadow); }
.featured__media::after { position: absolute; inset: 18px; pointer-events: none; content: ""; border: 1px solid rgba(255,255,255,.14); }
.featured__media > img { height: 100%; object-fit: cover; filter: saturate(.76) contrast(1.03); }
.play { position: absolute; right: 22px; bottom: 22px; left: 22px; z-index: 1; min-height: 48px; display: flex; align-items: center; padding: 0; overflow: hidden; color: white; background: rgba(8, 15, 14, .84); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px); cursor: pointer; }
.play__icon { width: 54px; align-self: stretch; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.play__icon::before { width: 0; height: 0; content: ""; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid white; }
.play__label { padding-left: 14px; font: 700 .72rem var(--mono); }
.play__label::after { display: inline-block; width: 92px; height: 3px; margin-left: 14px; vertical-align: middle; content: ""; background: linear-gradient(90deg, var(--amber) 38%, rgba(255,255,255,.25) 38%); }
.play__time { margin-left: auto; padding: 0 14px; color: var(--muted); font: .65rem var(--mono); }
.featured__rail { display: grid; gap: 9px; }
.featured__rail a { width: 44px; aspect-ratio: 1; display: grid; place-items: center; color: #736b5c; border: 1px solid transparent; transition: .2s ease; }
.featured__rail a:hover, .featured__rail a:focus-visible { color: var(--amber); border-color: var(--line); background: rgba(255,255,255,.03); }
.featured__rail svg { width: 25px; fill: none; stroke: currentColor; stroke-width: 1.5; }

.tour-strip { border-block: 1px solid rgba(240,232,215,.08); background: rgba(0,0,0,.18); }
.tour-strip .container { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.tour-strip p { margin: 0; font: 400 .9rem var(--mono); letter-spacing: -.025em; }
.tour-strip p span { color: var(--olive-bright); }
.tour-strip a { flex: 0 0 auto; color: var(--amber); font: 700 .7rem var(--mono); }

.content { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 38px; padding-block: 54px 110px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 24px; }
.section-heading h2 { margin: .35rem 0 0; font: 400 clamp(1.8rem, 3vw, 2.7rem)/1 var(--mono); letter-spacing: -.06em; }
.result-count { color: var(--muted); font: .68rem var(--mono); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.story-card { min-width: 0; color: #1f190f; background: #e9dfca; border: 1px solid #fff6e5; box-shadow: 0 8px 28px rgba(0,0,0,.2); transition: transform .25s ease, box-shadow .25s ease; }
.story-card:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(0,0,0,.32); }
.story-card[hidden] { display: none; }
.story-card__image { position: relative; display: block; aspect-ratio: 4/5; margin: 7px; overflow: hidden; background: #29291e; }
.story-card__image img { height: 100%; object-fit: cover; filter: saturate(.8) sepia(.08); transition: transform .45s ease, filter .45s ease; }
.story-card:hover .story-card__image img { transform: scale(1.04); filter: saturate(1); }
.story-card__type { position: absolute; top: 10px; left: 10px; padding: .35rem .5rem; color: var(--cream); background: rgba(17,13,7,.74); font: .58rem var(--mono); backdrop-filter: blur(5px); }
.story-card__body { padding: 6px 12px 10px; }
.story-card h3 { margin: 0; font: 700 .9rem var(--mono); letter-spacing: -.04em; }
.story-card h3 a:hover { color: #637516; }
.story-card__body p { min-height: 2.7em; margin: .25rem 0 .75rem; color: #746a57; font-size: .78rem; line-height: 1.35; }
.story-card__footer { display: flex; justify-content: space-between; padding-top: 9px; color: #625a4d; font: .62rem var(--mono); border-top: 1px solid rgba(30,25,15,.14); }
.empty-state { padding: 80px 20px; text-align: center; border: 1px dashed var(--line); }
.empty-state > span { color: var(--amber); font-size: 2rem; }
.empty-state h3 { margin: .6rem 0 .2rem; font-family: var(--mono); }
.empty-state p { margin: 0; color: var(--muted); }

.sidebar { display: grid; align-content: start; gap: 34px; }
.panel { background: linear-gradient(145deg, #41491a, #30370f); border: 1px solid rgba(202,219,98,.3); box-shadow: inset 0 1px rgba(255,255,255,.05), 0 18px 40px rgba(0,0,0,.16); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid rgba(240,232,215,.13); }
.tabs span { min-height: 53px; display: grid; place-items: center; color: #bdb59f; background: rgba(0,0,0,.12); border-right: 1px solid rgba(240,232,215,.1); font: .76rem var(--mono); }
.tabs span:last-child { border-right: 0; }
.tabs span.active { color: var(--amber); background: transparent; }
.tab-content { padding: 16px 20px 20px; }
.tab-content > a { display: flex; justify-content: space-between; padding: .65rem 0; color: #e0d8c7; font-size: .9rem; border-bottom: 1px solid rgba(240,232,215,.1); }
.tab-content > a:last-child { border-bottom: 0; }
.tab-content > a span { color: #929d4f; font: .65rem var(--mono); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { padding: .36rem .5rem; color: #e6dece; background: rgba(0,0,0,.18); font: .66rem var(--mono); }
.sidebar-title { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: var(--amber); font: 700 .78rem var(--mono); }
.sidebar-title::after { height: 1px; flex: 1; content: ""; background: var(--line); }
.note-card { padding: 17px 18px 18px; border: 1px solid var(--line); background: rgba(255,255,255,.025); }
.note-card__date { color: var(--olive-bright); font: .64rem var(--mono); text-transform: uppercase; }
.note-card p { margin: .65rem 0 1rem; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.note-card a { color: var(--cream); font: .67rem var(--mono); }
.popular { padding: 18px; }
.popular h2 { margin: 0 0 10px; font: 400 1.25rem var(--mono); }
.popular ol { padding: 0; margin: 0; list-style: none; }
.popular li { border-top: 1px solid rgba(240,232,215,.11); }
.popular li > a { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 12px 0; }
.popular li > a > span { color: var(--amber); font: 700 .68rem var(--mono); }
.popular li div { font-size: .86rem; }
.popular small { display: block; margin-top: 2px; color: #aeb47b; font-size: .7rem; }

.site-footer { padding-block: 30px; background: #0b0804; border-top: 1px solid rgba(240,232,215,.09); }
.site-footer .container { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.site-footer strong { font: 700 .9rem var(--mono); }
.site-footer p { max-width: 540px; margin: .4rem 0 0; color: #827a6a; font-size: .75rem; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

@media (max-width: 1050px) {
  .featured { grid-template-columns: 76px 190px minmax(0, 1fr); gap: 22px; }
  .featured__rail { display: none; }
  .content { grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; }
  .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .container { width: min(100% - 32px, 720px); }
  .site-header { min-height: 0; flex-wrap: wrap; align-items: flex-start; padding-block: 25px 32px; }
  .header-tools { width: 100%; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 14px; }
  .nav { flex: 0 0 auto; }
  .nav a { min-width: 0; padding-inline: .75rem; }
  .search { min-width: 0; }
  .search__field, .search input { width: 100%; }
  .featured { grid-template-columns: 1fr; padding-top: 12px; }
  .featured__thumbs { order: 3; grid-template-columns: repeat(4, 1fr); }
  .thumb.active, .thumb:hover, .thumb:focus-visible { transform: translateY(-4px); }
  .thumb.active::after { display: none; }
  .featured__copy { order: 1; max-width: 580px; }
  .featured__media { order: 2; }
  .tour-strip .container { padding-block: 18px; }
  .content { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr 1fr; }
  .popular { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .container { width: min(100% - 24px, 500px); }
  .site-header { min-height: 100px; }
  .brand__name { font-size: 1.35rem; }
  .brand__tagline { font-size: .58rem; }
  .header-tools { align-items: stretch; flex-direction: column; }
  .nav { width: 100%; }
  .nav a { flex: 1; padding-inline: .45rem; }
  .search { display: grid; grid-template-columns: auto 1fr; }
  .featured { gap: 20px; padding-bottom: 38px; }
  .featured h1 { font-size: 2.35rem; }
  .featured__meta { gap: .6rem; }
  .featured__media { padding: 6px; }
  .play { right: 12px; bottom: 12px; left: 12px; min-height: 44px; }
  .play__label::after { display: none; }
  .play__time { padding-inline: 10px; }
  .featured__thumbs { gap: 8px; }
  .tour-strip .container { align-items: flex-start; flex-direction: column; gap: 8px; }
  .tour-strip p { font-size: .78rem; line-height: 1.5; }
  .content { padding-block: 42px 72px; }
  .card-grid { grid-template-columns: 1fr; }
  .story-card__image { aspect-ratio: 4/3; }
  .sidebar { grid-template-columns: 1fr; }
  .popular { grid-column: auto; }
  .site-footer .container { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
