:root {
  --bg: #fbfaf7;
  --bg-tint: #f2f0ea;
  --surface: #ffffff;
  --ink: #14213d;
  --ink-soft: #4a5468;
  --muted: #6b7385;
  --rule: #e3e0d8;
  --accent: #1f5fae;
  --accent-ink: #ffffff;
  --sun: #e9a23b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1422;
    --bg-tint: #131b2d;
    --surface: #172137;
    --ink: #eef1f7;
    --ink-soft: #c2c9d6;
    --muted: #8e98ab;
    --rule: #26324a;
    --accent: #7fb0ff;
    --accent-ink: #0e1422;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
h3 { font-size: 1.25rem; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
}

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--ink); }
.topbar nav { display: flex; gap: 22px; overflow-x: auto; }
.topbar nav a { color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; white-space: nowrap; }
.topbar nav a:hover { color: var(--ink); text-decoration: none; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 30%, transparent);
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
}
.btn:hover { border-color: var(--ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }

/* Hero */
.hero {
  position: relative;
  padding: 72px 0 64px;
  background: radial-gradient(ellipse at 80% 40%, color-mix(in srgb, var(--sun) 18%, transparent), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 56px; align-items: center; }
.lede { font-size: 1.15rem; color: var(--ink-soft); margin: 22px 0 0; max-width: 40em; }
.portrait img {
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 24px 60px -24px rgba(20, 33, 61, 0.35);
  aspect-ratio: 635 / 900;
  object-fit: cover;
}
.portrait { margin: 0; }

/* Sections */
.section { padding: 80px 0; border-top: 1px solid var(--rule); }
.section.tinted { background: var(--bg-tint); }
.section-lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 46em; margin: 0 0 32px; }

.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 18px;
  padding: 26px;
}
.card h3 { margin-bottom: 10px; }
.card p { margin: 0; color: var(--ink-soft); }
.card ul { margin: 14px 0 0; padding-left: 18px; color: var(--ink-soft); }
.card li { margin-bottom: 6px; }
.project-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.project-head a { font-size: 0.9rem; font-weight: 500; }
.card .role { color: var(--muted); font-size: 0.88rem; margin: 2px 0 12px; }

/* Featured engagement */
.case {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--accent);
  border-radius: 18px;
  padding: 32px;
  margin-bottom: 24px;
}
.case-head h3 { font-size: 1.6rem; margin-bottom: 10px; }
.case-head p:not(.eyebrow) { color: var(--ink-soft); margin: 0; max-width: 52em; }
.steps {
  list-style: none; counter-reset: step;
  padding: 0; margin: 28px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 28px;
}
.steps li { counter-increment: step; display: flex; flex-direction: column; gap: 4px; }
.steps strong::before {
  content: counter(step, decimal-leading-zero) "  ";
  color: var(--accent); font-family: var(--sans); font-size: 0.85rem; font-weight: 600;
}
.steps strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.steps span { color: var(--ink-soft); font-size: 0.95rem; }

/* Book */
.book { background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
.book-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.cover { margin: 0; }
.cover img { border-radius: 6px; box-shadow: 0 30px 60px -20px rgba(20, 33, 61, 0.45); }
.subtitle { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; font-weight: 600; }
.book p { color: var(--ink-soft); }
.buy { font-size: 0.95rem; margin-top: 16px; }
.next-book {
  display: flex; gap: 18px; align-items: center;
  margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule);
}
.next-book img { width: 84px; border-radius: 4px; box-shadow: 0 10px 24px -10px rgba(20, 33, 61, 0.4); }
.next-book p { margin: 4px 0 0; }
.next-book .eyebrow { margin: 0 0 4px; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 8px; }
.principles h3 { margin-bottom: 8px; }
.principles p { margin: 0; color: var(--ink-soft); }
.stack { color: var(--muted); font-size: 0.95rem; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }

/* Project features */
.feature {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 36px;
  margin-top: 28px;
}
.feature-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.feature-head h3 { font-size: 2rem; }
.feature-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 50em; margin: 14px 0 0; }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule); }
.highlights h4 { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; margin: 0 0 6px; }
.highlights p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }

/* About */
.about { max-width: 820px; }
.about p:not(.eyebrow) { font-size: 1.12rem; color: var(--ink-soft); }

/* Contact */
.contact { text-align: center; }
.contact .section-lede { margin: 0 auto; }
.contact .actions { justify-content: center; }

.footer { padding: 28px 24px 40px; color: var(--muted); font-size: 0.88rem; border-top: 1px solid var(--rule); }

/* Responsive */
@media (max-width: 900px) {
  .principles, .highlights { grid-template-columns: 1fr; gap: 20px; }
  .feature { padding: 24px; }
  .hero-grid, .book-grid { grid-template-columns: 1fr; gap: 36px; }
  .portrait { max-width: 300px; order: -1; }
  .cover { max-width: 300px; }
  .cards.three, .cards.two { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .case { padding: 24px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand { font-size: 1rem; }
  .topbar nav { gap: 14px; }
  .topbar nav a:nth-child(n+4):not(:last-child) { display: none; }
  .hero { padding: 40px 0 48px; }
  .section { padding: 56px 0; }
  .steps { grid-template-columns: 1fr; }
}
