:root {
  --bg: #ffffff;
  --bg-soft: #fafbfc;
  --surface: #ffffff;
  --ink: #0f172a;
  --ink-muted: #475569;
  --ink-soft: #64748b;
  --accent: #1d4ed8;
  --accent-hover: #1e3a8a;
  --accent-teal: #0f766e;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --max-read: 42rem;
  --max-wide: 74rem;
  --radius: 0.625rem;
  --radius-lg: 1rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --font-serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.22;
  color: var(--ink);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.875rem, 4.2vw, 2.625rem);
  margin: 0 0 1rem;
}

h2 {
  font-size: clamp(1.3rem, 2.4vw, 1.625rem);
  margin: 2.5rem 0 0.85rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.125rem;
  margin: 1.75rem 0 0.5rem;
}

p {
  margin: 0 0 1.15rem;
}

ul,
ol {
  margin: 0 0 1.15rem;
  padding-left: 1.35rem;
}

li {
  margin-bottom: 0.45rem;
}

li::marker {
  color: var(--accent-teal);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-tag {
  font-size: 0.7rem;
  color: var(--ink-soft);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-toggle {
  display: none;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease;
}

.site-nav a:hover {
  background: var(--bg-soft);
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
  background: #eff6ff;
}

main {
  min-height: 55vh;
}

.container {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--max-read);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero {
  padding: 3.5rem 0 3rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-teal) 100%);
}

.hero .container {
  padding-left: calc(1.5rem + 0.5rem);
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--ink-muted);
  max-width: 38rem;
  margin: 0;
  line-height: 1.65;
}

.section {
  padding: 3rem 0;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  margin-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card a {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.card-img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  border-left: 3px solid var(--accent);
}

.card-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.card h3 {
  margin: 0 0 0.55rem;
  font-size: 1.125rem;
  line-height: 1.35;
}

.card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.article-hero {
  margin: 0 0 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.article-meta {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}

.breadcrumb {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  color: var(--ink-muted);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.article-body a {
  font-weight: 500;
}

.article-body strong {
  color: var(--ink);
  font-weight: 600;
}

.callout {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 1.15rem 1.35rem;
  margin: 2rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.callout p:last-child {
  margin-bottom: 0;
}

.site-footer {
  background: var(--bg);
  color: var(--ink-muted);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}

.site-footer a {
  color: var(--accent);
}

.site-footer a:hover {
  color: var(--accent-hover);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.footer-note {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 30rem;
  color: var(--ink-muted);
}

.footer-heading {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0 0 0.85rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.footer-links a:hover {
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--ink-soft);
}

.resource-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.resource-list li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.resource-list h3 {
  margin-top: 0;
  color: var(--ink);
}

.error-page {
  text-align: center;
  padding: 6rem 1.5rem;
  background: var(--bg);
}

.error-page h1 {
  font-size: 5rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.error-page h2 {
  margin-top: 0;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.5rem 1.25rem;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-nav a {
    display: block;
    padding: 0.6rem 0.75rem;
  }

  .site-header {
    position: relative;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero::before {
    width: 3px;
  }
}
