:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-soft: #f1f4fb;
  --ink: #101624;
  --muted: #667085;
  --line: #e4e8f2;
  --line-strong: #d7ddeb;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --violet: #8b5cf6;
  --cyan: #06b6d4;
  --shadow: 0 24px 70px rgba(20, 30, 60, 0.09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(79, 70, 229, 0.12), transparent 28%),
    radial-gradient(circle at 92% 10%, rgba(6, 182, 212, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 48%, #ffffff 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-image:
    linear-gradient(rgba(16, 22, 36, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 22, 36, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.34), rgba(0, 0, 0, 0.03));
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(228, 232, 242, 0.82);
  padding: 0 max(20px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.26);
  font-size: 13px;
  letter-spacing: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  border-radius: var(--radius);
  padding: 9px 12px;
  color: #445066;
  font-size: 14px;
  font-weight: 650;
  transition: background 180ms ease, color 180ms ease;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  padding: 92px max(20px, calc((100% - 1180px) / 2)) 76px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 56px;
  align-items: center;
}

.eyebrow,
.section-kicker {
  color: var(--indigo);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 18px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius);
  padding: 8px 11px;
  background: rgba(79, 70, 229, 0.06);
}

h1 {
  max-width: 780px;
  margin-bottom: 22px;
  font-size: clamp(46px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}

.hero-subtitle {
  max-width: 650px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.24);
}

.button.secondary {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
}

.button.secondary:hover {
  box-shadow: 0 16px 34px rgba(20, 30, 60, 0.08);
}

.hero-panel,
.column-card,
.experiment-card,
.about-card,
.subscribe-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 24px;
}

.hero-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--violet), var(--cyan));
  content: "";
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: #475467;
  font-weight: 800;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.12);
}

.panel-grid {
  display: grid;
  gap: 12px;
}

.panel-grid div,
.panel-note {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  background: #fbfcff;
}

.panel-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}

.panel-grid strong {
  font-size: 20px;
}

.panel-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 84px 0;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 58px;
  align-items: start;
  margin-top: 16px;
}

.intro-text {
  border-left: 1px solid var(--line-strong);
  padding-left: 28px;
}

.intro-text p,
.section-heading p,
.column-card p,
.experiment-card p,
.about-text p,
.subscribe-card p {
  color: var(--muted);
}

.intro-text p:last-child,
.about-text p,
.subscribe-card p {
  margin-bottom: 0;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.column-card {
  min-height: 286px;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.column-card:hover,
.experiment-card:hover,
.article-item:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 28px 80px rgba(20, 30, 60, 0.12);
  transform: translateY(-3px);
}

.card-icon {
  display: inline-flex;
  min-width: 42px;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  border-radius: var(--radius);
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  font-size: 13px;
  font-weight: 850;
}

.article-list {
  display: grid;
  gap: 12px;
}

.article-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.8);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.article-item span {
  color: var(--indigo);
  font-size: 13px;
  font-weight: 850;
}

.article-item strong {
  font-size: 18px;
}

.experiments {
  width: 100%;
  max-width: none;
  padding-right: max(20px, calc((100% - 1180px) / 2));
  padding-left: max(20px, calc((100% - 1180px) / 2));
  background:
    radial-gradient(circle at 84% 10%, rgba(6, 182, 212, 0.13), transparent 30%),
    radial-gradient(circle at 12% 88%, rgba(139, 92, 246, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff, #f4f7ff);
  box-shadow:
    inset 0 1px 0 rgba(228, 232, 242, 0.9),
    inset 0 -1px 0 rgba(228, 232, 242, 0.9);
}

.experiment-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.experiment-card {
  min-height: 220px;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.experiment-card span {
  display: inline-block;
  margin-bottom: 38px;
  color: var(--indigo);
  font-size: 13px;
  font-weight: 850;
}

.about-card,
.subscribe-card {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 54px;
  padding: 36px;
  align-items: center;
}

.about-card {
  background:
    radial-gradient(circle at 92% 10%, rgba(37, 99, 235, 0.09), transparent 26%),
    #ffffff;
}

.subscribe-card {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(139, 92, 246, 0.08)),
    #ffffff;
}

.subscribe-form {
  display: flex;
  gap: 10px;
}

.subscribe-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 0 15px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
}

.subscribe-form input:focus {
  outline: 3px solid rgba(79, 70, 229, 0.14);
  border-color: rgba(79, 70, 229, 0.48);
}

.subscribe-form button {
  flex: 0 0 auto;
  min-height: 52px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 32px 0 40px;
  color: var(--muted);
}

.site-footer strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.site-footer p {
  margin: 0;
}

.page-hero {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 78px 0 36px;
}

.page-hero h1 {
  margin-bottom: 14px;
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 19px;
}

.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px;
  align-items: start;
}

.sidebar,
.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 44px rgba(20, 30, 60, 0.06);
}

.sidebar h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.sidebar a,
.toc a {
  display: block;
  border-radius: var(--radius);
  padding: 9px 10px;
  color: var(--muted);
  font-weight: 700;
}

.sidebar a:hover,
.toc a:hover {
  color: var(--ink);
  background: var(--surface-soft);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.post-grid.compact {
  grid-template-columns: repeat(2, 1fr);
}

.post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 54px rgba(20, 30, 60, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.post-card:hover {
  border-color: rgba(79, 70, 229, 0.3);
  box-shadow: 0 28px 80px rgba(20, 30, 60, 0.12);
  transform: translateY(-3px);
}

.post-card a {
  display: block;
  min-height: 240px;
  padding: 24px;
}

.post-category {
  display: inline-flex;
  margin-bottom: 38px;
  border-radius: var(--radius);
  padding: 6px 9px;
  color: var(--indigo);
  background: rgba(79, 70, 229, 0.08);
  font-size: 13px;
  font-weight: 850;
}

.post-card h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.post-card p,
.post-card time {
  color: var(--muted);
}

.post-card time {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
}

.article-shell {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 24px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 42px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--indigo);
}

.article-header {
  max-width: 860px;
  margin-bottom: 42px;
}

.article-header h1 {
  margin-bottom: 18px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
}

.article-header p {
  color: var(--muted);
  font-size: 20px;
}

.article-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 14px;
}

.article-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 38px;
  align-items: start;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.article-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.article-content p {
  color: #384152;
  font-size: 18px;
}

.article-content h2 {
  margin-top: 42px;
  font-size: 30px;
}

.article-content blockquote {
  margin: 30px 0;
  border-left: 4px solid var(--indigo);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 19px;
  font-weight: 750;
}

.related-posts {
  padding-top: 42px;
}

.category-section {
  border-top: 1px solid var(--line);
}

.category-heading {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  max-width: 820px;
  margin-bottom: 28px;
  align-items: start;
}

.category-heading .card-icon {
  margin-bottom: 0;
}

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

@media (max-width: 1040px) {
  .hero-inner,
  .intro-grid,
  .page-layout,
  .article-layout,
  .about-card,
  .subscribe-card {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 620px;
  }

  .card-grid,
  .experiment-grid,
  .post-grid,
  .post-grid.compact {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar,
  .toc {
    position: static;
  }
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
  }

  .brand span:last-child {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    display: none;
    width: min(280px, calc(100vw - 40px));
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 12px;
  }

  .hero {
    padding-top: 68px;
    padding-bottom: 54px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 34px;
  }

  .section {
    width: min(100% - 32px, 1180px);
    padding: 64px 0;
  }

  .experiments {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .intro-text {
    border-left: 0;
    padding-left: 0;
  }

  .card-grid,
  .experiment-grid,
  .post-grid,
  .post-grid.compact {
    grid-template-columns: 1fr;
  }

  .column-card,
  .experiment-card {
    min-height: auto;
  }

  .card-icon,
  .experiment-card span {
    margin-bottom: 26px;
  }

  .subscribe-form {
    flex-direction: column;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-panel,
  .about-card,
  .subscribe-card {
    padding: 22px;
  }

  .article-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .article-content {
    padding: 24px;
  }

  .category-heading {
    grid-template-columns: 1fr;
  }
}

