:root {
  color-scheme: dark;
  --bg: #101723;
  --panel: #172231;
  --panel-soft: #1d2a3a;
  --text: #f3eddf;
  --muted: #b8ad9d;
  --faint: #7f8a96;
  --line: rgba(243, 237, 223, 0.16);
  --gold: #d6ad60;
  --gold-dark: #9e7939;
  --ink: #0b111a;
  --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 {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  margin: 0;
}

a {
  color: inherit;
}

.sr-only {
  clip: rect(0, 0, 0, 0);
  border: 0;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.site-header {
  background: rgba(16, 23, 35, 0.92);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.nav {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1180px;
  min-height: 72px;
  padding: 0 24px;
}

.brand {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-links {
  align-items: center;
  display: flex;
  gap: 26px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.read-more:hover,
.back-link:hover {
  color: var(--gold);
}

.menu-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 4px;
  display: none;
  flex-direction: column;
  gap: 4px;
  height: 40px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.menu-toggle span:not(.sr-only) {
  background: var(--text);
  display: block;
  height: 2px;
  width: 18px;
}

.hero,
.page-hero,
.about-page {
  margin: 0 auto;
  max-width: 1180px;
  padding: 78px 24px 42px;
}

.hero {
  min-height: 48vh;
  background:
    linear-gradient(to right, rgba(6, 8, 20, 0.68) 0%, rgba(6, 8, 20, 0.44) 30%, rgba(6, 8, 20, 0.05) 55%, rgba(6, 8, 20, 0.02) 100%),
    url("hero-texas-sunrise.svg");
  background-position: center, center bottom;
  background-repeat: no-repeat;
  background-size: auto, cover;
  min-height: 62vh;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 50px rgba(5, 9, 15, 0.34);
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.hero-inner {
  max-width: 820px;
  position: relative;
  z-index: 1;
}

.hero::before {
  background: radial-gradient(circle at center, rgba(214, 173, 96, 0.16) 0%, rgba(214, 173, 96, 0) 70%);
  content: "";
  height: 460px;
  pointer-events: none;
  position: absolute;
  right: -140px;
  top: -180px;
  width: 460px;
  z-index: 0;
}

.kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 14px;
  text-transform: uppercase;
}

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

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.96;
  margin-bottom: 24px;
  max-width: 900px;
}

h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.05;
  margin-bottom: 20px;
}

h3 {
  font-size: 1.55rem;
  line-height: 1.18;
  margin-bottom: 14px;
}

.hero-copy {
  margin-top: 4.5rem;
}

.hero-copy,
.lede,
.page-hero p {
  color: var(--muted);
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.75;
  max-width: 720px;
}

.featured-section,
.posts-section,
.archive-section,
.related-section {
  margin: 0 auto;
  max-width: 1180px;
  padding: 28px 24px 72px;
}

.section-heading {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-top: 28px;
}

.section-heading.with-filters {
  align-items: flex-start;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.filter-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font: 700 0.82rem var(--sans);
  padding: 9px 12px;
}

.filter-button.active,
.filter-button:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}

.featured-grid,
.post-grid,
.related-grid {
  display: grid;
  gap: 18px;
}

.featured-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.post-grid,
.related-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.post-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  padding: 22px;
}

.featured-card {
  background: var(--panel);
}

.card-meta,
.article-meta {
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 10px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.card-meta span,
.archive-year li span {
  color: var(--gold);
}

.post-card h3 a {
  text-decoration: none;
}

.post-card p {
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.7;
  margin-bottom: 22px;
}

.read-more,
.back-link {
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 800;
  margin-top: auto;
  text-decoration: none;
}

.loading,
.error,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.article-shell {
  margin: 0 auto;
  max-width: 920px;
  padding: 54px 24px 80px;
}

.article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 44px;
}

.article-header {
  margin: 30px 0 38px;
}

.article-header h1 {
  font-size: clamp(2.7rem, 8vw, 5.8rem);
}

.article-meta {
  text-transform: none;
}

.article-content {
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.16rem, 2.4vw, 1.34rem);
  line-height: 1.78;
  max-width: 74ch;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content blockquote {
  margin-bottom: 1.35rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: var(--text);
  line-height: 1.18;
  margin: 2.2rem 0 0.8rem;
}

.article-content h2 {
  font-size: 2rem;
}

.article-content h3 {
  font-size: 1.65rem;
}

.article-content a {
  color: var(--gold);
}

.article-content img {
  border-radius: 6px;
  height: auto;
  max-width: 100%;
}

.related-section {
  padding-left: 0;
  padding-right: 0;
}

.archive-section {
  padding-top: 0;
}

.archive-section .filter-list {
  justify-content: flex-start;
  margin-bottom: 32px;
}

.archive-year {
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.archive-year h2 {
  color: var(--gold);
  font-size: 1.6rem;
}

.archive-year ol {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.archive-year li {
  align-items: baseline;
  display: grid;
  gap: 14px;
  grid-template-columns: 180px minmax(0, 1fr) 170px;
}

.archive-year time,
.archive-year span {
  color: var(--faint);
  font-size: 0.86rem;
}

.archive-year a {
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.28rem;
  text-decoration: none;
}

.about-page {
  align-items: start;
  display: grid;
  gap: 44px;
  grid-template-columns: minmax(220px, 320px) minmax(0, 720px);
}

.portrait-placeholder {
  align-items: center;
  aspect-ratio: 4 / 5;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--faint);
  display: flex;
  font-family: var(--serif);
  font-size: 1.6rem;
  justify-content: center;
  width: 100%;
}

.about-copy p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.78;
  max-width: 68ch;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  margin: 30px auto 0;
  max-width: 1180px;
  padding: 28px 24px 42px;
}

.site-footer p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .featured-grid,
  .post-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading {
    display: block;
  }

  .filter-list {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .nav {
    min-height: 64px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 6px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 8px;
    position: absolute;
    right: 16px;
    top: 62px;
    width: min(260px, calc(100vw - 32px));
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px;
    width: 100%;
  }

  .hero,
  .page-hero,
  .about-page {
    padding-top: 54px;
  }

  .hero {
    border-radius: 7px;
    min-height: 42vh;
  }

  .hero::before {
    height: 300px;
    right: -120px;
    top: -120px;
    width: 300px;
  }

  .featured-grid,
  .post-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .post-card {
    min-height: auto;
  }

  .archive-year li {
    display: block;
  }

  .archive-year time,
  .archive-year span {
    display: block;
    margin: 4px 0;
  }

  .about-page {
    grid-template-columns: 1fr;
  }

  .site-footer {
    display: block;
  }
}
