@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&display=swap');

:root {
  --card: #faf9f5;
  --ring: #c96442;
  --input: #b4b2a7;
  --muted: #ede9de;
  --accent: #e9e6dc;
  --border: #dad9d4;
  --radius: 0.5rem;
  --chart-1: #b05730;
  --chart-2: #9c87f5;
  --chart-3: #ded8c4;
  --chart-4: #dbd3f0;
  --chart-5: #b4552d;
  --popover: #ffffff;
  --primary: #c96442;
  --sidebar: #f5f4ee;
  --secondary: #e9e6dc;
  --background: #faf9f5;
  --foreground: #3d3929;
  --destructive: #141413;
  --sidebar-ring: #b5b5b5;
  --sidebar-accent: #e9e6dc;
  --sidebar-border: #ebebeb;
  --card-foreground: #141413;
  --sidebar-primary: #c96442;
  --muted-foreground: #83827d;
  --accent-foreground: #28261b;
  --popover-foreground: #28261b;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #3d3d3a;
  --secondary-foreground: #535146;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #343434;
  --sidebar-primary-foreground: #fbfbfb;
}

.dark {
  --card: #262624;
  --ring: #d97757;
  --input: #52514a;
  --muted: #1b1b19;
  --accent: #1a1915;
  --border: #3e3e38;
  --chart-1: #b05730;
  --chart-2: #9c87f5;
  --chart-3: #1a1915;
  --chart-4: #2f2b48;
  --chart-5: #b4552d;
  --popover: #30302e;
  --primary: #d97757;
  --sidebar: #1f1e1d;
  --secondary: #faf9f5;
  --background: #262624;
  --foreground: #c3c0b6;
  --destructive: #ef4444;
  --sidebar-ring: #b5b5b5;
  --sidebar-accent: #0f0f0e;
  --sidebar-border: #ebebeb;
  --card-foreground: #faf9f5;
  --sidebar-primary: #343434;
  --muted-foreground: #b7b5a9;
  --accent-foreground: #f5f4ee;
  --popover-foreground: #e5e5e2;
  --primary-foreground: #ffffff;
  --sidebar-foreground: #c3c0b6;
  --secondary-foreground: #30302e;
  --destructive-foreground: #ffffff;
  --sidebar-accent-foreground: #c3c0b6;
  --sidebar-primary-foreground: #fbfbfb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Geist', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--foreground);
  background:
    radial-gradient(circle at 16% 8%, rgba(201, 100, 66, 0.13), transparent 26rem),
    radial-gradient(circle at 86% 18%, rgba(156, 135, 245, 0.12), transparent 28rem),
    linear-gradient(rgba(61,57,41,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(61,57,41,0.035) 1px, transparent 1px),
    var(--background);
  background-size: auto, auto, 42px 42px, 42px 42px, auto;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(250,249,245,0.2), rgba(250,249,245,0.84) 72%);
  z-index: -2;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.site-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  width: min(1120px, calc(100% - 32px));
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px;
  border: 1px solid rgba(218, 217, 212, 0.82);
  border-radius: 16px;
  background: rgba(250,249,245,0.78);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(61, 57, 41, 0.07);
}

.brand { display: inline-flex; align-items: center; gap: 10px; padding-left: 4px; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 24px rgba(201,100,66,0.28);
  font-weight: 900;
}
.brand-text { font-size: 17px; }

.nav { display: flex; align-items: center; gap: 3px; }
.nav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--secondary-foreground);
  font-size: 14px;
  font-weight: 650;
}
.nav a:hover { background: var(--accent); color: var(--accent-foreground); }
.nav .nav-cta { background: var(--foreground); color: #fff; padding-inline: 15px; }
.nav .nav-cta:hover { background: var(--primary); color: #fff; }

main, .footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }

.hero {
  min-height: calc(100vh - 110px);
  padding: 72px 0 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 420px;
  gap: 26px;
  align-items: center;
}

.hero-copy { padding: 24px 0; }
.pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.42);
  color: var(--secondary-foreground);
  font-family: 'Geist Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pill span { width: 8px; height: 8px; border-radius: 999px; background: var(--primary); box-shadow: 0 0 0 5px rgba(201,100,66,0.14); }

h1, h2, h3, p { margin-top: 0; }
h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(52px, 8vw, 104px);
  line-height: 0.88;
  letter-spacing: -0.085em;
  color: var(--foreground);
}
h2 { font-size: clamp(34px, 4.4vw, 58px); line-height: 0.96; letter-spacing: -0.065em; margin-bottom: 16px; }
h3 { font-size: 25px; line-height: 1.05; letter-spacing: -0.045em; margin-bottom: 14px; }
.hero-text { max-width: 640px; color: var(--muted-foreground); font-size: 18px; line-height: 1.75; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button, .signup button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  padding: 12px 17px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 750;
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease, background 170ms ease;
}
.button:hover, .signup button:hover { transform: translateY(-1px); }
.primary { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 14px 32px rgba(201,100,66,0.22); }
.primary:hover { background: #b4552d; }
.secondary { background: var(--secondary); color: var(--secondary-foreground); border-color: var(--border); }
.secondary:hover { background: var(--accent); color: var(--accent-foreground); }
.dark-text { color: var(--foreground); }

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 540px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(150deg, rgba(255,255,255,0.72), rgba(250,249,245,0.66)),
    radial-gradient(circle at 85% 14%, rgba(201,100,66,0.24), transparent 12rem),
    var(--card);
  box-shadow: 0 28px 80px rgba(61,57,41,0.13);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.hero-card::before {
  content: '';
  position: absolute;
  inset: 76px 24px auto auto;
  width: 210px;
  height: 210px;
  border-radius: 999px;
  background: repeating-linear-gradient(135deg, rgba(201,100,66,0.14) 0 8px, transparent 8px 18px);
}
.hero-card::after {
  content: '';
  position: absolute;
  left: 24px;
  bottom: 155px;
  width: 170px;
  height: 170px;
  border-radius: 28px;
  border: 1px solid rgba(201,100,66,0.24);
  background: linear-gradient(135deg, rgba(222,216,196,0.82), rgba(233,230,220,0.38));
  transform: rotate(-8deg);
}
.hero-card > * { position: relative; z-index: 1; }
.hero-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted-foreground); font-family: 'Geist Mono', monospace; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-card-top strong { color: var(--primary); font-size: 28px; letter-spacing: -0.08em; }
.hero-card h2 { margin-top: auto; max-width: 360px; font-size: clamp(36px, 4vw, 52px); }
.hero-card p { max-width: 340px; color: var(--muted-foreground); line-height: 1.7; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 22px; }
.metric-grid div { border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,0.44); padding: 14px; }
.metric-grid strong { display: block; font-size: 25px; letter-spacing: -0.05em; color: var(--foreground); }
.metric-grid span { color: var(--muted-foreground); font-size: 12px; }

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 4px 0 84px;
}
.signal-strip div {
  min-height: 172px;
  padding: 19px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(250,249,245,0.72);
}
.signal-strip .index, .framework-card span, .post-meta {
  font-family: 'Geist Mono', monospace;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}
.signal-strip strong { display: block; margin: 30px 0 8px; font-size: 21px; letter-spacing: -0.04em; }
.signal-strip p { color: var(--muted-foreground); line-height: 1.55; margin-bottom: 0; }

.section { margin: 86px 0; }
.section-heading { max-width: 780px; margin-bottom: 30px; }
.eyebrow { margin-bottom: 12px; color: var(--primary); font-family: 'Geist Mono', monospace; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.section-heading > p:last-child { color: var(--muted-foreground); font-size: 17px; line-height: 1.7; }

.posts-grid { display: grid; grid-template-columns: 1.15fr 0.92fr 0.92fr; gap: 14px; }
.post-card {
  min-height: 372px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(61,57,41,0.06);
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 26px 70px rgba(61,57,41,0.12); border-color: rgba(201,100,66,0.35); }
.featured-post { background: var(--foreground); color: #faf9f5; }
.post-card p { color: var(--muted-foreground); line-height: 1.68; }
.featured-post p { color: rgba(250,249,245,0.68); }
.post-meta { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 28px; }
.featured-post .post-meta { color: #d97757; }
.post-card a { width: fit-content; color: var(--primary); font-weight: 850; }
.featured-post a { color: #d97757; }

.framework { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }
.framework-card {
  min-height: 250px;
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 16px 44px rgba(61,57,41,0.06);
}
.intro-card { grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end; background: linear-gradient(135deg, #f5f4ee, #faf9f5); }
.step-card p { color: var(--muted-foreground); line-height: 1.68; }
.dark-card { background: #262624; color: #faf9f5; border-color: #3e3e38; }
.dark-card p { color: #b7b5a9; }

.workshops, .newsletter {
  display: grid;
  grid-template-columns: 1fr 0.85fr auto;
  gap: 24px;
  align-items: center;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--accent);
}
.workshops p, .newsletter p { color: var(--muted-foreground); line-height: 1.7; margin-bottom: 0; }
.newsletter { grid-template-columns: 1fr 0.9fr; background: #262624; color: #faf9f5; border-color: #3e3e38; }
.newsletter .eyebrow { color: #d97757; }
.newsletter p { color: #b7b5a9; }
.signup { display: grid; gap: 12px; }
.signup input {
  width: 100%;
  min-height: 48px;
  padding: 14px 15px;
  border: 1px solid #52514a;
  border-radius: var(--radius);
  background: #30302e;
  color: #faf9f5;
  font: inherit;
  outline: none;
}
.signup input:focus { border-color: #d97757; box-shadow: 0 0 0 4px rgba(217,119,87,0.14); }
.signup input::placeholder { color: #b7b5a9; }
.signup button { background: #d97757; color: #fff; }
.signup-note { color: #d97757; min-height: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--border);
  color: var(--muted-foreground);
  font-size: 14px;
}

.article-page { max-width: 920px; margin: 0 auto; padding: 54px 22px 100px; }
.article-page .back { display: inline-flex; margin-bottom: 26px; color: var(--primary); font-weight: 850; }
.article-shell {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 28px;
  padding: clamp(28px, 5vw, 54px);
  box-shadow: 0 28px 80px rgba(61,57,41,0.11);
}
.article-shell h1 { color: var(--foreground); font-size: clamp(44px, 7vw, 76px); }
.article-shell p, .article-shell li { color: var(--muted-foreground); font-size: 18px; line-height: 1.86; }
.article-shell ul { padding-left: 22px; }
.article-kicker { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.article-kicker span { font-family: 'Geist Mono', monospace; font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; }

@media (max-width: 960px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .hero, .framework, .workshops, .newsletter { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 52px; }
  .hero-card { min-height: 460px; }
  .signal-strip, .posts-grid { grid-template-columns: 1fr 1fr; }
  .featured-post { grid-column: span 2; }
}

@media (max-width: 640px) {
  main, .footer, .site-header { width: min(100% - 24px, 1120px); }
  .nav a { font-size: 13px; padding: 9px 10px; }
  h1 { font-size: clamp(48px, 16vw, 72px); }
  .signal-strip, .posts-grid { grid-template-columns: 1fr; }
  .featured-post { grid-column: auto; }
  .hero-card { min-height: 420px; padding: 20px; }
  .metric-grid { grid-template-columns: 1fr; }
  .section { margin: 64px 0; }
  .workshops, .newsletter { padding: 22px; }
  .footer { flex-direction: column; }
}
