:root {
  --primary: #818cf8;
  --primary-strong: #6366f1;
  --bg: #090912;
  --surface: #12121e;
  --surface-soft: #17172a;
  --text: #e6ebf5;
  --text-muted: #a3afc2;
  --text-soft: #7f8ba0;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.16);
  --radius-lg: 18px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -8%, rgba(99, 102, 241, 0.1), transparent 35%),
    var(--bg);
  line-height: 1.68;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: #a5b4fc;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
  z-index: 1001;
  background: #111124;
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.72rem 0.95rem;
}

.shell {
  width: min(920px, 100% - 2rem);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 7, 14, 0.88);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.nav-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  flex-shrink: 0;
  min-height: 44px;
}

.nav-logo span {
  background: linear-gradient(135deg, #e2e8f0, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.blog-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.nav-link {
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-current {
  color: var(--primary);
  background: rgba(129, 140, 248, 0.14);
}

.blog-home,
.post-shell {
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}

.hero {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.6rem;
}

.eyebrow {
  margin: 0;
  color: #c7d2fe;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

h1,
h2,
h3 {
  font-family: "Source Serif 4", Georgia, serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

h1 {
  margin: 0.72rem 0 0.9rem;
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 18ch;
}

h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
}

.lead {
  margin: 0;
  max-width: 62ch;
  color: var(--text-muted);
  font-size: 1rem;
}

.hero-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.featured,
.post-listing,
.post-shell article,
.post-actions {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 1.4rem;
}

.section-head {
  display: block;
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.featured-card {
  margin-top: 0.95rem;
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) 1.25fr;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  background: var(--surface-soft);
}

.featured-media {
  display: flex;
  min-height: 170px;
  border-radius: 11px;
  border: 1px solid rgba(129, 140, 248, 0.26);
  padding: 0.9rem;
  align-items: flex-end;
  background:
    radial-gradient(circle at 80% 20%, rgba(99, 102, 241, 0.34), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(52, 211, 153, 0.18), transparent 36%),
    #101022;
}

.featured-caption {
  margin: 0;
  color: #d3dcf5;
  max-width: 18ch;
  font-size: 0.95rem;
}

.featured-body h3 {
  margin: 0.55rem 0;
  font-size: clamp(1.18rem, 2vw, 1.46rem);
}

.featured-body p {
  margin: 0;
  color: var(--text-muted);
}

.meta {
  margin: 0.82rem 0 0.92rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.post-list {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 0.95rem;
}

.post-card h3 {
  margin: 0.58rem 0;
  font-size: 1.2rem;
}

.post-card p {
  margin: 0;
  color: var(--text-muted);
}

.post-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.post-link::after {
  content: "→";
  font-size: 0.82rem;
}

.post-shell article {
  padding: 1.5rem;
}

.post-header h1 {
  margin: 0.82rem 0 0;
  max-width: 17ch;
}

.quick-summary {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 0.85rem;
}

.quick-summary h2 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.quick-summary ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  display: grid;
  gap: 0.25rem;
}

.post-content {
  margin-top: 1.2rem;
}

.post-content p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.post-content h2 {
  margin: 1.5rem 0 0.62rem;
  color: #d3ddf7;
  font-size: clamp(1.22rem, 2.3vw, 1.55rem);
}

.post-actions {
  padding: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(129, 140, 248, 0.44);
  background: linear-gradient(135deg, var(--primary-strong), var(--primary));
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.58rem 1rem;
}

.btn:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(129, 140, 248, 0.45);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(9, 9, 18, 0.92);
}

.footer-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.94rem;
}

@media (max-width: 720px) {
  .shell {
    width: min(920px, 100% - 1.2rem);
  }

  .nav-shell {
    padding: 0 1rem;
    min-height: 64px;
  }

  .blog-nav-links {
    gap: 0.2rem;
  }

  .nav-link {
    font-size: 0.82rem;
    padding: 0.35rem 0.55rem;
  }

  h1 {
    max-width: none;
  }

  .hero,
  .featured,
  .post-listing,
  .post-shell article,
  .post-actions {
    padding: 1rem;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .featured-media {
    min-height: 140px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .footer-row {
    min-height: auto;
    padding: 0.9rem 0;
    flex-direction: column;
    align-items: flex-start;
  }
}
