:root {
  --bg: #0b0d10;
  --panel: #151922;
  --panel-soft: #1e2630;
  --text: #f4f0e8;
  --muted: #b9c1ca;
  --line: rgba(255,255,255,.14);
  --gold: #d8a548;
  --teal: #39b7a6;
  --coral: #e56f55;
  --ink: #101318;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,13,16,.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.brand-mark { width: 18px; height: 18px; border: 2px solid var(--gold); border-radius: 50%; box-shadow: 10px 0 0 -5px var(--teal); }
.main-nav { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 14px; }
.main-nav a:hover { color: var(--text); }
.menu-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 1px solid var(--line); background: transparent; border-radius: var(--radius); }
.menu-toggle span { display: block; height: 2px; background: var(--text); margin: 5px 0; }
.nav-scrim { display: none; }

.home-hero, .page-hero {
  position: relative;
  min-height: 620px;
  display: grid;
  align-items: end;
  overflow: hidden;
}
.compact-hero { min-height: 420px; }
.article-hero { min-height: 560px; }
.home-hero > img, .page-hero > img, .page-hero > picture, .page-hero picture img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,13,16,.06), rgba(11,13,16,.34) 46%, rgba(11,13,16,.72));
}
.article-hero .hero-shade {
  background:
    linear-gradient(180deg, rgba(11,13,16,.03), rgba(11,13,16,.22) 48%, rgba(11,13,16,.52)),
    linear-gradient(90deg, rgba(11,13,16,.38), rgba(11,13,16,.06) 58%);
}
.hero-content, .page-hero .container {
  position: relative;
  z-index: 2;
  padding: 108px 0 86px;
}
.home-hero h1, .page-hero h1 {
  max-width: 830px;
  margin: 10px 0 18px;
  font-size: 58px;
  line-height: 1.04;
  text-shadow: 0 2px 20px rgba(0,0,0,.35);
}
.home-hero p, .page-hero p { max-width: 650px; color: #eef3f7; font-size: 19px; margin: 0; text-shadow: 0 1px 16px rgba(0,0,0,.34); }
.eyebrow { color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: var(--radius);
  background: var(--gold);
  color: #111;
  font-weight: 800;
}
.btn-secondary { background: rgba(255,255,255,.12); color: var(--text); border: 1px solid var(--line); }

.section { padding: 72px 0; }
.section-heading { max-width: 760px; margin-bottom: 30px; }
.section-heading h2 { margin: 8px 0 10px; font-size: 34px; line-height: 1.15; }
.section-heading p { color: var(--muted); margin: 0; }
.section-heading-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading-left { max-width: 680px; }
.text-link { color: var(--gold); font-weight: 800; }

.feature-grid, .guide-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-grid-large { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.image-card, .guide-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.image-card a, .guide-card a { display: grid; height: 100%; }
.image-card img, .guide-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--panel-soft);
}
.guide-card img { aspect-ratio: 16 / 10; }
.image-card div, .guide-card div { padding: 18px; }
.image-card h2, .image-card h3, .guide-card h2, .guide-card h3 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.image-card p, .guide-card p { margin: 0; color: var(--muted); }
.card-meta { display: inline-block; margin-top: 14px; color: var(--teal); font-size: 13px; font-weight: 800; }

.split-band { background: #f3eee4; color: var(--ink); }
.split-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 54px; align-items: start; }
.split-grid h2 { margin: 8px 0 16px; font-size: 36px; line-height: 1.16; }
.split-grid p { color: #38414b; }
.info-list { display: grid; gap: 12px; }
.info-list div { background: #fff; border: 1px solid #ded5c7; border-radius: var(--radius); padding: 18px; }
.info-list strong { display: block; margin-bottom: 4px; color: #0f1720; }
.info-list span { color: #52606d; }

.topic-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.topic-strip a { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--panel); }
.topic-strip span { display: block; font-weight: 800; margin-bottom: 6px; }
.topic-strip small { color: var(--muted); }

.breadcrumbs-wrapper { padding-top: 18px; }
.breadcrumbs { color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumbs a { color: var(--text); }

.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 42px; align-items: start; }
.article-body, .topic-intro, .page-prose {
  background: #fff;
  color: #1a2028;
  border-radius: var(--radius);
  padding: 34px;
}
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; color: #65717d; font-size: 14px; margin-bottom: 24px; }
.prose h2, .prose h3 { color: #111820; line-height: 1.22; margin-top: 32px; }
.prose p { color: #303945; }
.prose a { color: #087c72; font-weight: 700; }
.prose img { border-radius: var(--radius); margin: 24px 0; }
.article-sidebar { display: grid; gap: 16px; position: sticky; top: 90px; }
.sidebar-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.sidebar-panel h2 { font-size: 18px; margin: 0 0 10px; }
.sidebar-panel p { margin: 0; color: var(--muted); }
.sidebar-link { display: block; color: var(--muted); padding: 10px 0; border-top: 1px solid var(--line); }
.sidebar-link:first-of-type { border-top: 0; }

.gallery-section { margin-top: 42px; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery-item { margin: 0; background: #f5f0e8; border-radius: var(--radius); overflow: hidden; }
.gallery-item button { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-item figcaption { padding: 10px 12px; color: #4a5562; font-size: 14px; }
.photo-credit { margin-top: 28px; padding-top: 16px; border-top: 1px solid #e0e5ea; color: #65717d; font-size: 13px; line-height: 1.5; }
.photo-credit a { color: #4b5b66; font-weight: 700; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: center;
  justify-items: center;
  gap: 10px;
  background: #050608;
  padding: 70px 76px 28px;
  text-align: center;
  overflow: hidden;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: min(100%, 1280px); max-height: calc(100dvh - 170px); width: auto; height: auto; border-radius: var(--radius); object-fit: contain; box-shadow: 0 18px 54px rgba(0,0,0,.42); }
.lightbox p { max-width: min(100%, 900px); color: #fff; margin: 0; text-align: center; }
.lightbox-close, .lightbox-nav { position: fixed; z-index: 1002; display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(17, 21, 27, .92); color: #fff; cursor: pointer; }
.lightbox-close { top: 18px; right: 18px; font-size: 28px; }
.lightbox-nav { top: 50%; transform: translateY(-50%); font-size: 38px; line-height: 1; }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-counter { font-size: 13px; color: var(--muted); }
.lightbox.single-image .lightbox-nav, .lightbox.single-image .lightbox-counter { display: none; }

.tags-container { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; align-items: center; }
.tags-container span { color: #4a5562; font-weight: 800; }
.tags-container a { background: #edf7f5; color: #087c72; padding: 7px 10px; border-radius: var(--radius); font-weight: 800; font-size: 14px; }
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 34px; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); }
.pagination a.active { background: var(--gold); color: #111; }
.empty-state { color: var(--muted); }

.site-footer { border-top: 1px solid var(--line); background: #11151b; padding: 42px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 30px; }
.footer-grid h2, .footer-grid h3 { margin: 0 0 10px; }
.footer-grid p, .footer-grid a { color: var(--muted); }
.footer-grid a { display: block; margin: 6px 0; }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; color: var(--muted); font-size: 14px; }

@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav-scrim.open {
    position: fixed;
    inset: 68px 0 0;
    z-index: 45;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 68px;
    z-index: 55;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: #11151b;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 10px; }
  .home-hero h1, .page-hero h1 { font-size: 40px; }
  .home-hero, .page-hero { min-height: 520px; }
  .article-hero { min-height: 480px; }
  .feature-grid, .guide-grid, .guide-grid-large, .topic-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-grid, .article-layout, .footer-grid { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 620px) {
  .container { width: min(100% - 24px, 1160px); }
  .hero-content, .page-hero .container { padding: 84px 0 52px; }
  .home-hero h1, .page-hero h1 { font-size: 32px; }
  .home-hero p, .page-hero p { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-heading-row { display: block; }
  .feature-grid, .guide-grid, .guide-grid-large, .topic-strip, .gallery-grid { grid-template-columns: 1fr; }
  .article-body, .topic-intro, .page-prose { padding: 22px; }
  .lightbox { padding: calc(64px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom)); gap: 8px; }
  .lightbox img { max-width: 100%; max-height: calc(100dvh - 154px); }
  .lightbox p { font-size: 14px; line-height: 1.35; }
  .lightbox-close, .lightbox-nav { width: 40px; height: 40px; }
  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
}
