:root {
  --bg: #050505;
  --ink: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.52);
  --faint: rgba(255,255,255,0.32);
  --line: rgba(255,255,255,0.08);
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; background: none; border: 0; color: inherit; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; color: #000; padding: 8px 12px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5,5,5,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; margin-right: auto; }
.brand img { height: 22px; width: auto; }
.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-desktop a,
.nav-drop > button {
  color: rgba(255,255,255,0.62);
  font-size: 14px;
  font-weight: 400;
  padding: 8px 14px;
  cursor: pointer;
}
.nav-desktop a:hover,
.nav-drop > button:hover,
.nav-desktop a.is-active { color: #fff; }
.nav-drop { position: relative; }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #0d0d0d;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
}
.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel { display: block; }
.nav-drop-panel a { display: block; padding: 10px 12px; color: rgba(255,255,255,0.75); }
.nav-drop-panel small { display: block; color: var(--faint); font-size: 12px; margin-top: 2px; }
.cta {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 16px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  font-size: 13.5px;
  color: #fff;
}
.cta:hover { background: #fff; color: #000; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #fff;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
}
.mobile-overlay[hidden] { display: none; }
.mobile-overlay-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  padding: 0 20px;
  background: url("../images/hero.webp") center/cover no-repeat;
}
.mobile-overlay-bar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; height: 64px;
  background: rgba(0,0,0,0.35);
  pointer-events: none;
}
.mobile-overlay-bar .brand,
.mobile-overlay-bar .burger-close { position: relative; z-index: 1; }
.burger-close { font-size: 22px; color: #fff; width: 40px; height: 40px; cursor: pointer; }
.mobile-overlay-nav {
  display: flex;
  flex-direction: column;
  padding: 8px 8px 40px;
}
.mobile-overlay-nav a,
.mobile-overlay-nav summary {
  display: block;
  padding: 18px 20px;
  font-size: 20px;
  font-weight: 400;
  color: rgba(255,255,255,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  list-style: none;
  cursor: pointer;
}
.mobile-overlay-nav details a {
  font-size: 16px;
  padding-left: 32px;
  color: rgba(255,255,255,0.55);
  border-bottom: 0;
}
.mobile-overlay-nav summary { display: flex; justify-content: space-between; align-items: center; }
.mobile-overlay-nav summary::-webkit-details-marker { display: none; }
.mobile-overlay-nav summary::after { content: "▾"; color: rgba(255,255,255,0.4); font-size: 16px; }

/* Hero */
.hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: flex-end;
  padding: 0 28px 72px;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,5,5,0.15) 0%, rgba(5,5,5,0.55) 45%, rgba(5,5,5,0.92) 100%);
}
.hero-copy { position: relative; z-index: 1; max-width: var(--max); margin: 0 auto; width: 100%; }
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin: 0 0 16px;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 6.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  max-width: 14ch;
}
.hero .lede {
  max-width: 36em;
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 28px;
}

/* Subscribe */
.subscribe-band {
  max-width: var(--max);
  margin: -28px auto 0;
  padding: 0 28px;
  position: relative;
  z-index: 2;
}
.subscribe-inner {
  border: 1px solid var(--line);
  background: #0c0c0c;
  border-radius: 14px;
  padding: 28px 32px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
  align-items: center;
}
.subscribe-inner h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 26px;
  margin: 0 0 6px;
}
.subscribe-inner p { color: var(--muted); margin: 0; font-size: 14.5px; }
.subscribe-form {
  display: flex;
  gap: 8px;
}
.subscribe-form input[type="email"] {
  flex: 1;
  height: 44px;
  border: 1px solid rgba(255,255,255,0.14);
  background: #161616;
  color: #fff;
  border-radius: 8px;
  padding: 0 14px;
  font-size: 14px;
}
.subscribe-form button,
.button {
  height: 44px;
  padding: 0 18px;
  background: #fff;
  color: #000;
  border: 0;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.subscribe-note { font-size: 12px; color: var(--faint); margin-top: 8px; }

/* Feed */
.feed {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 28px 96px;
}
.featured {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line);
}
.featured-media, .card-media {
  overflow: hidden;
  border-radius: 6px;
  background: #141414;
}
.featured-media { aspect-ratio: 16/10; }
.card-media { aspect-ratio: 16/10; }
.featured-media img, .card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img, .featured:hover .featured-media img { transform: scale(1.03); }
.featured h2, .card h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 10px 0 12px;
}
.featured h2 { font-size: clamp(28px, 3.5vw, 44px); line-height: 1.12; }
.card h3 { font-size: 24px; line-height: 1.22; margin: 0; }
.meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.excerpt, .card p { color: var(--muted); margin: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.card { display: flex; flex-direction: column; gap: 14px; }

/* Post */
.post-wrap { max-width: 780px; margin: 0 auto; padding: 80px 28px 40px; }
.post-wrap h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}
.post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.post-byline img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.post-hero { max-width: 1100px; margin: 0 auto 48px; padding: 0 28px; }
.post-hero img { width: 100%; border-radius: 6px; }
.gh-content { font-size: 18.5px; line-height: 1.72; color: rgba(255,255,255,0.82); }
.gh-content > * { margin: 0 0 1.25em; }
.gh-content h2, .gh-content h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: #fff;
  margin: 1.6em 0 0.6em;
}
.gh-content a { text-decoration: underline; text-underline-offset: 3px; color: #fff; }
.gh-content blockquote {
  border-left: 1px solid rgba(255,255,255,0.2);
  margin: 1.6em 0;
  padding: 0 0 0 20px;
  color: var(--muted);
  font-family: var(--serif);
}
.kg-width-wide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.kg-width-full { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.kg-image { width: 100%; }

.author-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 28px 24px;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 28px;
  align-items: center;
}
.author-hero img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; }
.author-hero h1 { font-family: var(--serif); font-weight: 400; font-size: 42px; margin: 0 0 8px; }
.author-hero p { color: var(--muted); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 72px 28px 36px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 56px;
}
.footer-logo { height: 22px; opacity: 0.45; margin-bottom: 16px; }
.footer-blurb { font-size: 13.5px; color: rgba(255,255,255,0.28); line-height: 1.7; max-width: 240px; margin: 0; }
.footer-col h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.25);
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 400;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: rgba(255,255,255,0.38); }
.footer-col a:hover { color: rgba(255,255,255,0.8); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  color: rgba(255,255,255,0.28);
  font-size: 13px;
}
.pagination {
  max-width: var(--max);
  margin: 0 auto 80px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 980px) {
  .nav-desktop, .desktop-only { display: none; }
  .burger { display: flex; }
  .featured, .grid, .footer-grid, .author-hero, .subscribe-inner { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; padding-bottom: 88px; }
  .subscribe-form { flex-direction: column; }
}
