:root {
  color-scheme: dark;
  --ink: #0a111a;
  --ink-soft: #101b27;
  --panel: rgba(19, 32, 45, 0.78);
  --panel-solid: #132231;
  --line: rgba(214, 173, 86, 0.25);
  --line-soft: rgba(227, 233, 238, 0.11);
  --gold: #d6ad56;
  --gold-soft: #efd18a;
  --paper: #f2eee5;
  --muted: #aeb8c2;
  --muted-bright: #cbd2d8;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(rgba(10, 17, 26, 0.94), rgba(10, 17, 26, 0.98)),
    linear-gradient(90deg, rgba(214, 173, 86, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(214, 173, 86, 0.06) 1px, transparent 1px);
  background-size: auto, 48px 48px, 48px 48px;
  color: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--gold-soft);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff1bd;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  border-radius: 0.25rem;
  background: var(--gold);
  color: var(--ink);
  font-weight: 700;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
.site-footer,
main {
  width: min(var(--max), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.wordmark {
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span {
  color: var(--gold);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  margin-left: 0.35rem;
  vertical-align: 0.12em;
}

/* Brand asset hook: an approved logo can be added beside this typographic wordmark later. */

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--muted-bright);
  font-size: 0.86rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-soft);
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.hero {
  position: relative;
  padding: 5.5rem 0 5rem;
}

.hero::before {
  position: absolute;
  top: 2.5rem;
  right: 0;
  width: min(36vw, 360px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  content: "";
  opacity: 0.8;
}

.hero h1,
.page-intro h1 {
  max-width: 920px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(2.25rem, 7vw, 5.5rem);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.hero h1 {
  max-width: 960px;
}

.lede {
  max-width: 720px;
  margin: 1.75rem 0 0;
  color: var(--muted-bright);
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.button:hover {
  background: var(--gold-soft);
  color: var(--ink);
}

.button.secondary {
  background: transparent;
  color: var(--gold-soft);
}

.button.secondary:hover {
  background: rgba(214, 173, 86, 0.12);
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid var(--line-soft);
}

.section-heading {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.section h2,
.content h2 {
  max-width: 700px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-intro {
  max-width: 700px;
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  padding: 1.4rem;
  border: 1px solid var(--line-soft);
  border-radius: 0.55rem;
  background: linear-gradient(145deg, var(--panel), rgba(13, 23, 34, 0.62));
}

.card h3 {
  margin: 0 0 0.6rem;
  color: var(--paper);
  font-size: 1.08rem;
  line-height: 1.3;
}

.card p,
.content p {
  margin: 0;
  color: var(--muted);
}

.card p + p,
.content p + p {
  margin-top: 1rem;
}

.index-mark {
  display: block;
  margin-bottom: 1.2rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.callout {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-left: 2px solid var(--gold);
  background: rgba(214, 173, 86, 0.07);
}

.callout p {
  margin: 0;
  color: var(--muted-bright);
}

.callout strong {
  color: var(--paper);
}

.page-intro {
  padding: 5rem 0 4rem;
}

.page-intro h1 {
  max-width: 850px;
  font-size: clamp(2.45rem, 6vw, 4.8rem);
}

.page-intro .lede {
  max-width: 760px;
}

.content {
  max-width: 820px;
  padding-bottom: 5rem;
}

.content h2 {
  margin: 3.5rem 0 1rem;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
}

.content h3 {
  margin: 2rem 0 0.45rem;
  color: var(--paper);
  font-size: 1.1rem;
}

.content ul,
.content ol {
  margin: 1.1rem 0 0;
  padding-left: 1.3rem;
  color: var(--muted);
}

.content li + li {
  margin-top: 0.65rem;
}

.journal-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.journal-card {
  padding: clamp(1.35rem, 3vw, 2rem);
  border: 1px solid var(--line-soft);
  border-radius: 0.55rem;
  background: linear-gradient(145deg, var(--panel), rgba(13, 23, 34, 0.62));
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.post-meta time {
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-bright);
  font-size: 0.75rem;
  line-height: 1.4;
}

.journal-card h2 {
  max-width: 800px;
  margin: 0 0 0.8rem;
  color: var(--paper);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
  font-weight: 550;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.journal-card p {
  max-width: 760px;
  margin: 0;
  color: var(--muted-bright);
}

.journal-card .post-link {
  display: inline-block;
  margin-top: 1.35rem;
  font-weight: 750;
}

.article-header {
  max-width: 900px;
  padding: 5rem 0 3rem;
}

.article-header h1 {
  max-width: 900px;
  margin: 0;
  color: var(--paper);
  font-size: clamp(2.4rem, 7vw, 5.3rem);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.article-header .lede {
  max-width: 780px;
}

.article-body {
  max-width: 760px;
  padding-bottom: 5rem;
}

.article-body h2 {
  margin-top: 3.5rem;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body p,
.article-body li {
  color: var(--muted-bright);
  font-size: 1.05rem;
  line-height: 1.8;
}

.article-body p {
  margin: 1.3rem 0 0;
}

.article-body ul {
  margin-top: 1.3rem;
}

.article-body blockquote {
  margin: 2rem 0;
  padding: 1.1rem 1.35rem;
  border-left: 2px solid var(--gold);
  background: rgba(214, 173, 86, 0.07);
  color: var(--paper);
  font-size: 1.15rem;
}

.article-body blockquote p {
  margin: 0;
  color: inherit;
}

.article-body .callout {
  margin-top: 2rem;
}

.article-body .callout p {
  font-size: 0.98rem;
  line-height: 1.65;
}

.article-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.2rem;
  margin-top: 0.85rem;
}

.article-links a {
  font-weight: 700;
}

.method-list {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding: 0;
  list-style: none;
}

.method-list li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.85rem;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line-soft);
}

.method-list li:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.method-number {
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}

.method-list h3 {
  margin: 0 0 0.35rem;
}

.method-list p {
  margin: 0;
}

.topic-grid {
  margin-top: 2rem;
}

.topic-grid .card {
  min-height: 100%;
}

.footer-inner {
  display: grid;
  gap: 1.4rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line-soft);
}

.footer-inner p {
  max-width: 540px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
}

.footer-links a {
  font-size: 0.9rem;
}

.fine-print {
  color: var(--muted);
  font-size: 0.88rem;
}

.not-found {
  min-height: 64vh;
  display: grid;
  align-content: center;
  padding: 5rem 0;
}

.not-found h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 550;
  letter-spacing: -0.045em;
  line-height: 1;
}

@media (min-width: 680px) {
  .site-header,
  .site-footer,
  main {
    width: min(var(--max), calc(100% - 4rem));
  }

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

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

  .section-heading.split {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: end;
  }

  .section-heading.split .section-intro {
    justify-self: end;
  }

  .callout {
    grid-template-columns: 0.55fr 1fr;
    align-items: center;
  }

  .footer-inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .footer-links {
    justify-content: flex-end;
  }
}

@media (max-width: 540px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav ul {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
