@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --canvas: #f7f7f4;
  --canvas-soft: #fafaf7;
  --surface-card: #ffffff;
  --surface-strong: #e6e5e0;
  --primary: #f54e00;
  --primary-active: #d04200;
  --on-primary: #ffffff;
  --ink: #26251e;
  --body: #5a5852;
  --body-strong: #26251e;
  --muted: #807d72;
  --muted-soft: #a09c92;
  --hairline: #e6e5e0;
  --hairline-soft: #efeee8;
  --hairline-strong: #cfcdc4;
  --timeline-thinking: #dfa88f;
  --timeline-grep: #9fc9a2;
  --timeline-read: #9fbbe0;
  --timeline-edit: #c0a8dd;
  --timeline-done: #c08532;
  --semantic-success: #1f8a65;
  --semantic-error: #cf2d56;
  --rounded-xs: 4px;
  --rounded-sm: 6px;
  --rounded-md: 8px;
  --rounded-lg: 12px;
  --rounded-xl: 16px;
  --rounded-pill: 9999px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--canvas);
  color: var(--body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--ink); }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
code, pre, .code { font-family: 'JetBrains Mono', monospace; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* TOP NAV */
.top-nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-wordmark {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
}
.nav-wordmark span { color: var(--primary); }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--body);
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  height: 40px;
  border-radius: var(--rounded-md);
  display: inline-flex;
  align-items: center;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-active); color: var(--on-primary); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--ink);
}
.nav-hamburger svg { display: block; }
.nav-mobile {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 16px 24px;
  flex-direction: column;
  gap: 12px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--body);
  padding: 8px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.nav-mobile a:last-child { border-bottom: none; }

/* HERO */
.hero-band {
  padding: 80px 0;
  background: var(--canvas);
}
.hero-band .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.hero-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-strong);
  padding: 4px 10px;
  border-radius: var(--rounded-pill);
}
.hero-band h1 {
  font-size: 72px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -2.16px;
  color: var(--ink);
  max-width: 860px;
}
.hero-band .hero-sub {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--body);
  max-width: 560px;
}
.hero-image-wrap {
  margin-top: 16px;
  width: 100%;
  max-width: 940px;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  background: var(--surface-card);
}
.hero-image-wrap img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}

/* SECTION */
.section {
  padding: 80px 0;
}
.section-alt {
  background: var(--canvas-soft);
}
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.section-head {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
  margin-bottom: 16px;
}
.section-sub {
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  max-width: 560px;
}
.section-head-center {
  text-align: center;
}
.section-sub-center {
  text-align: center;
  margin: 0 auto;
}

/* CARDS GRID */
.cards-grid {
  display: grid;
  gap: 20px;
  margin-top: 40px;
}
.cards-grid-3 { grid-template-columns: repeat(3, 1fr); }
.cards-grid-2 { grid-template-columns: repeat(2, 1fr); }

.feature-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 24px;
}
.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--body);
}
.feature-card .card-icon {
  width: 40px;
  height: 40px;
  background: var(--surface-strong);
  border-radius: var(--rounded-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 20px;
}

/* ARTICLE CARDS */
.article-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s;
}
.article-card:hover { border-color: var(--hairline-strong); }
.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}
.article-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-card-meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
}
.article-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.article-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--body);
  flex: 1;
}
.article-read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  margin-top: 8px;
}
.article-read-link:hover { color: var(--primary-active); }

/* DIVIDER */
.hairline { border: none; border-top: 1px solid var(--hairline); margin: 0; }

/* CTA BAND */
.cta-band {
  padding: 96px 0;
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  text-align: center;
}
.cta-band h2 {
  font-size: 36px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.72px;
  color: var(--ink);
  margin-bottom: 20px;
}
.cta-band p {
  font-size: 16px;
  line-height: 1.5;
  color: var(--body);
  max-width: 480px;
  margin: 0 auto 32px;
}

/* FOOTER */
.footer {
  background: var(--canvas);
  border-top: 1px solid var(--hairline);
  padding: 64px 0 48px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 48px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 12px;
  max-width: 240px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  font-size: 14px;
  line-height: 1.5;
  color: var(--body);
  transition: color 0.15s;
}
.footer-col ul li a:hover { color: var(--ink); }
.footer-bottom {
  border-top: 1px solid var(--hairline-soft);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p {
  font-size: 13px;
  color: var(--muted-soft);
}
.footer-bottom a {
  font-size: 13px;
  color: var(--muted);
}
.footer-bottom a:hover { color: var(--ink); }

/* ARTICLE PAGE */
.article-hero {
  padding: 64px 0 0;
}
.article-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.article-hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1.44px;
  color: var(--ink);
  margin-bottom: 20px;
  max-width: 780px;
}
.article-hero .lead {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 680px;
  margin-bottom: 32px;
}
.article-cover {
  width: 100%;
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  margin-bottom: 64px;
}
.article-cover img {
  width: 100%;
  height: 460px;
  object-fit: cover;
}
.article-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
  align-items: start;
  padding-bottom: 80px;
}
.article-content h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: 40px 0 16px;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 28px 0 12px;
}
.article-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 18px;
}
.article-content ul, .article-content ol {
  margin: 16px 0 18px 0;
  padding-left: 20px;
}
.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }
.article-content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 6px;
}
.article-content a { color: var(--primary); }
.article-content a:hover { color: var(--primary-active); }
.article-content .info-box {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  margin: 28px 0;
}
.article-content .info-box h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.article-content .info-box p { margin-bottom: 0; font-size: 15px; }
.article-content .article-img {
  border-radius: var(--rounded-lg);
  overflow: hidden;
  border: 1px solid var(--hairline);
  margin: 28px 0;
}
.article-content .article-img img {
  width: 100%;
  height: 320px;
  object-fit: cover;
}
.article-content .article-img figcaption {
  font-size: 13px;
  color: var(--muted);
  padding: 10px 16px;
  border-top: 1px solid var(--hairline-soft);
  background: var(--canvas-soft);
}
.article-content .code-block {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  margin: 24px 0;
  overflow-x: auto;
}
.article-content .source-note {
  font-size: 13px;
  color: var(--muted-soft);
  border-top: 1px solid var(--hairline-soft);
  padding-top: 24px;
  margin-top: 40px;
}
.article-content .source-note a { color: var(--muted); }

.article-sidebar {
  position: sticky;
  top: 84px;
}
.sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  padding: 20px 20px 24px;
  margin-bottom: 20px;
}
.sidebar-card h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.sidebar-card ul li {
  margin-bottom: 8px;
}
.sidebar-card ul li a {
  font-size: 14px;
  color: var(--body);
  transition: color 0.15s;
}
.sidebar-card ul li a:hover { color: var(--ink); }
.toc-list li a { display: flex; align-items: center; gap: 6px; }
.toc-list li a::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-soft);
  flex-shrink: 0;
}
.season-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.88px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--rounded-pill);
  color: var(--ink);
  background: var(--timeline-thinking);
}
.season-badge.spring { background: var(--timeline-grep); }
.season-badge.summer { background: var(--timeline-done); color: var(--on-primary); }
.season-badge.fall { background: var(--timeline-thinking); }
.season-badge.winter { background: var(--timeline-read); }

/* ABOUT / PAGES */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 64px;
}
.page-hero h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -1.44px;
  color: var(--ink);
  margin-bottom: 16px;
}
.page-hero p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--body);
  max-width: 600px;
}
.page-content {
  padding-bottom: 80px;
  max-width: 780px;
}
.page-content h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin: 40px 0 14px;
}
.page-content h2:first-child { margin-top: 0; }
.page-content h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  margin: 28px 0 10px;
}
.page-content p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 16px;
}
.page-content ul, .page-content ol {
  margin: 12px 0 16px 20px;
}
.page-content ul { list-style: disc; }
.page-content ol { list-style: decimal; }
.page-content li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 6px;
}
.page-content a { color: var(--primary); }
.last-updated {
  font-size: 13px;
  color: var(--muted-soft);
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline-soft);
}

/* CONTACT FORM */
.contact-section {
  padding: 80px 0;
  border-top: 1px solid var(--hairline);
}
.contact-section h2 {
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.325px;
  color: var(--ink);
  margin-bottom: 8px;
}
.contact-section .contact-sub {
  font-size: 16px;
  color: var(--body);
  margin-bottom: 32px;
}
.contact-form {
  max-width: 560px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  transition: border-color 0.15s;
  height: 44px;
}
.form-group textarea {
  height: 120px;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--ink);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted-soft); }
.form-submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-form-submit {
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  height: 44px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-form-submit:hover { opacity: 0.85; }
.btn-form-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.form-status {
  font-size: 14px;
  color: var(--semantic-success);
  display: none;
}
.form-status.visible { display: block; }

/* COOKIE BANNER */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 560px;
  background: var(--ink);
  color: var(--canvas);
  border-radius: var(--rounded-lg);
  padding: 20px 24px;
  z-index: 999;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cookie-banner.hidden { display: none; }
.cookie-banner p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--canvas);
}
.cookie-banner p a {
  color: var(--canvas);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-actions {
  display: flex;
  gap: 10px;
}
.btn-cookie-accept {
  background: var(--primary);
  color: var(--on-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--rounded-md);
  border: none;
  cursor: pointer;
  height: 36px;
}
.btn-cookie-reject {
  background: transparent;
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--rounded-md);
  border: 1px solid rgba(247,247,244,0.3);
  cursor: pointer;
  height: 36px;
}
.btn-cookie-accept:hover { background: var(--primary-active); }
.btn-cookie-reject:hover { border-color: rgba(247,247,244,0.6); }

/* BREADCRUMBS */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumb a, .breadcrumb span {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { color: var(--muted-soft); }

/* DISCLAIMER */
.disclaimer-bar {
  background: var(--canvas-soft);
  border-bottom: 1px solid var(--hairline-soft);
  padding: 10px 0;
  text-align: center;
}
.disclaimer-bar p {
  font-size: 12px;
  color: var(--muted-soft);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .hero-band h1 { font-size: 56px; letter-spacing: -1.2px; }
  .cards-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
}

@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .top-nav { position: relative; }
  .hero-band h1 { font-size: 38px; letter-spacing: -0.8px; }
  .hero-band { padding: 56px 0; }
  .hero-image-wrap img { height: 260px; }
  .section-head { font-size: 28px; }
  .section { padding: 56px 0; }
  .cards-grid-3, .cards-grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-hero h1 { font-size: 34px; letter-spacing: -0.5px; }
  .article-cover img { height: 240px; }
  .cta-band h2 { font-size: 28px; }
  .page-hero h1 { font-size: 34px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-band h1 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cookie-banner { bottom: 0; left: 0; right: 0; border-radius: var(--rounded-lg) var(--rounded-lg) 0 0; }
}
