/* =====================================================================
   PBL Math — Redesign Stylesheet
   Single source of truth for Home, About, Projects, Lessons, Tools, How To.
   ===================================================================== */

/* ----------------------------------------------------------------------
   1. Tokens
   ---------------------------------------------------------------------- */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #1A2238;
  --ink-2: #2D3E6E;
  --ink-soft: #4F5670;
  --muted: #8A8FA3;
  --line: #ECE6DA;
  --line-strong: #DFD6C5;
  --accent: #E76F51;
  --accent-2: #F4A261;
  --accent-soft: #FDF1ED;
  --warm: #E9C46A;
  --positive: #2A9D8F;
  --negative: #C44536;
  --shadow-sm: 0 1px 2px rgba(26,34,56,.04), 0 4px 12px rgba(26,34,56,.05);
  --shadow-md: 0 2px 4px rgba(26,34,56,.05), 0 12px 28px rgba(26,34,56,.08);
  --shadow-lg: 0 4px 8px rgba(26,34,56,.06), 0 20px 48px rgba(26,34,56,.12);
  --shadow-xl: 0 10px 40px rgba(26,34,56,.12), 0 30px 80px rgba(26,34,56,.08);
  --radius: 16px;
}

/* ----------------------------------------------------------------------
   2. Base
   ---------------------------------------------------------------------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0;
}
a { color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ----------------------------------------------------------------------
   3. Typography helpers
   ---------------------------------------------------------------------- */
.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}
.ic { width: 14px; height: 14px; vertical-align: -2px; flex-shrink: 0; }
.accent-wrap {
  position: relative;
  display: inline-block;
  white-space: nowrap;
}
.accent-underline {
  position: absolute;
  left: 0; right: 0;
  bottom: -8px;
  width: 100%;
  height: 16px;
  pointer-events: none;
}

/* ----------------------------------------------------------------------
   4. Navigation
   ---------------------------------------------------------------------- */
.nav-wrap {
  background: rgba(250, 247, 242, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-weight: 600;
  color: var(--ink); text-decoration: none;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-link {
  color: var(--ink-soft); text-decoration: none;
  font-weight: 500; font-size: 14.5px;
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); border-bottom-color: var(--accent); }
.btn-primary-cta {
  background: var(--ink); color: var(--surface);
  border: none;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .15s ease;
}
.btn-primary-cta:hover { background: #000; color: var(--surface); }

/* ----------------------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------------------- */
.btn-primary-large, .btn-secondary-large {
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  transition: all .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
}
.btn-primary-large {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  box-shadow: 0 6px 18px rgba(26, 34, 56, 0.18);
}
.btn-primary-large:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(231, 111, 81, 0.36);
}
.btn-secondary-large {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-secondary-large:hover { border-color: var(--ink); color: var(--ink); }

/* Btn-CTA (used on Tools idea-cta) */
.btn-cta {
  background: var(--accent);
  color: white;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .15s ease;
  box-shadow: 0 8px 24px rgba(231, 111, 81, 0.45);
}
.btn-cta:hover {
  background: #d05f43;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(231, 111, 81, 0.55);
}

/* ----------------------------------------------------------------------
   6. Section header
   ---------------------------------------------------------------------- */
.section-header {
  text-align: center;
  margin-bottom: 44px;
  max-width: 660px;
  margin-left: auto;
  margin-right: auto;
}
.section-header h2 {
  font-size: clamp(32px, 4.4vw, 46px);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: 14px;
}
.section-header h2 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.section-header p {
  color: var(--ink-soft);
  font-size: 17px;
  margin: 0;
}

/* ----------------------------------------------------------------------
   7. Hero — base + variants
   ---------------------------------------------------------------------- */
.hero {
  padding: 80px 0 32px;
  text-align: center;
  position: relative;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
}
.hero h1 {
  font-size: clamp(40px, 5.5vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  margin-bottom: 18px;
}
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.hero p.lede {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 620px;
}
.hero-deco {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.hero-deco--tl { top: 64px; left: 4%; width: 140px; }
.hero-deco--tr { top: 56px; right: 4%; width: 150px; }
.hero-deco--bl { bottom: -10px; left: 12%; width: 90px; }
.hero-deco--br { bottom: 0; right: 8%; width: 100px; }
@media (max-width: 992px) { .hero-deco { display: none; } }

/* Lessons hero overrides (slightly different decoration positions) */
.hero.lessons-hero { padding: 72px 0 32px; }
.hero.lessons-hero h1 { font-size: clamp(38px, 5.5vw, 56px); }
.hero.lessons-hero .hero-deco--tl { top: 32px; left: 8%; width: 140px; }
.hero.lessons-hero .hero-deco--tr { top: 24px; right: 6%; width: 160px; }
.hero.lessons-hero .hero-deco--bl { bottom: -10px; left: 14%; width: 100px; }
.hero.lessons-hero .hero-deco--br { bottom: 0; right: 8%; width: 100px; }

/* ----------------------------------------------------------------------
   8. Home hero (photo backdrop)
   ---------------------------------------------------------------------- */
.hero-home {
  position: relative;
  overflow: hidden;
  padding: 120px 0 96px;
  isolation: isolate;
  background-color: var(--ink);
  text-align: center;
}
.hero-home .hero-content {
  max-width: 820px;
  margin: 0 auto;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/FrontPage.png');
  background-size: cover;
  background-position: center 60%;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26,34,56,0.55) 0%, rgba(26,34,56,0.30) 35%, rgba(26,34,56,0.75) 100%),
    linear-gradient(120deg, rgba(45,62,110,0.45) 0%, rgba(231,111,81,0.18) 100%);
  z-index: -1;
}
.hero-home .eyebrow {
  color: var(--accent-2);
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.hero-home h1 {
  font-size: clamp(46px, 7vw, 78px);
  font-weight: 600;
  line-height: 1.02;
  margin-bottom: 22px;
  color: white;
  text-shadow: 0 4px 30px rgba(0,0,0,0.35);
}
.hero-home h1 em { color: var(--accent-2); }
.hero-home p.lede {
  font-size: 19px;
  color: rgba(255,255,255,0.92);
  margin: 0 auto 36px;
  max-width: 620px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-home .btn-primary-large {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 8px 26px rgba(231, 111, 81, 0.45);
}
.hero-home .btn-primary-large:hover {
  background: #d05f43;
  border-color: #d05f43;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(231, 111, 81, 0.55);
}
.hero-home .btn-secondary-large {
  background: rgba(255,255,255,0.12);
  color: white;
  border-color: rgba(255,255,255,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.hero-home .btn-secondary-large:hover {
  background: rgba(255,255,255,0.22);
  border-color: white;
  color: white;
}

/* ----------------------------------------------------------------------
   9. About hero
   ---------------------------------------------------------------------- */
.about-hero { padding: 80px 0 48px; position: relative; }
.about-hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 768px) {
  .about-hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
    gap: 32px;
  }
}
.author-portrait {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--warm) 100%);
  position: relative;
  box-shadow: 0 16px 48px rgba(231, 111, 81, 0.3);
  overflow: hidden;
}
.author-portrait-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 88px; font-weight: 600;
  color: white; letter-spacing: -0.02em;
}
.author-portrait img {
  position: relative; z-index: 1;
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}
.author-portrait::after {
  content: '';
  position: absolute;
  bottom: 12px; right: 12px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--accent);
  border: 4px solid var(--bg);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(231, 111, 81, 0.4);
}
.author-portrait::before {
  content: '✎';
  position: absolute;
  bottom: 18px; right: 22px;
  font-size: 22px;
  color: white;
  z-index: 3;
  transform: rotate(-15deg);
}
@media (max-width: 768px) {
  .author-portrait { width: 200px; height: 200px; }
  .author-portrait-fallback { font-size: 68px; }
}
.about-hero h1 {
  font-size: clamp(40px, 5.5vw, 60px);
  font-weight: 600;
  line-height: 1.04;
  margin-bottom: 18px;
}
.about-hero h1 em { font-style: italic; color: var(--accent); font-weight: 500; }
.about-hero .role {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 18px;
  font-weight: 500;
}
.about-hero p {
  font-size: 17px;
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 560px;
}
@media (max-width: 768px) { .about-hero p { margin-left: auto; margin-right: auto; } }
.about-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 768px) { .about-hero .actions { justify-content: center; } }

/* ----------------------------------------------------------------------
   10. Search field (Lessons hero)
   ---------------------------------------------------------------------- */
.search {
  max-width: 580px;
  margin: 0 auto;
  position: relative;
}
.search input {
  width: 100%;
  padding: 16px 20px 16px 52px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input::placeholder { color: var(--muted); }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

/* ----------------------------------------------------------------------
   11. Pillars / Trust strip
   ---------------------------------------------------------------------- */
.value-pillars {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px dashed rgba(255,255,255,0.25);
}
.pillar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
  font-size: 14px;
}
.pillar .ic-pill {
  width: 30px;
  height: 30px;
  background: white;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.pillar .ic-pill .ic { width: 18px; height: 18px; vertical-align: 0; }

/* Tools trust strip (light variant) */
.trust-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 28px;
  margin: 48px auto 0;
  box-shadow: var(--shadow-sm);
}
.trust-strip-inner {
  display: flex;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}
.trust-strip .pillar {
  color: var(--ink);
}
.trust-strip .ic-pill {
  background: linear-gradient(135deg, var(--accent-soft), #FEF5E7);
  border: 1px solid #F6E6D2;
  box-shadow: none;
}

/* ----------------------------------------------------------------------
   12. Filter bar (Lessons + Projects)
   ---------------------------------------------------------------------- */
.filter-bar {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 40px 0 32px;
  box-shadow: var(--shadow-sm);
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.filter-row + .filter-row { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); }
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 95px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.filter-label .ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 13px;
  font-family: inherit;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 4px;
}
.results-count { color: var(--ink-soft); font-size: 14px; }
.results-count strong { color: var(--ink); font-weight: 600; }
.sort-select {
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 7px 32px 7px 12px;
  font-size: 13px;
  font-family: inherit;
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%234F5670' stroke-width='2.5'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

/* ----------------------------------------------------------------------
   13. Lesson grid + cards
   ---------------------------------------------------------------------- */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}
.card {
  background: var(--surface);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  grid-column: span 4;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card.featured {
  grid-column: span 12;
  flex-direction: row;
  min-height: 320px;
}
@media (max-width: 900px) {
  .card { grid-column: span 6; }
  .card.featured { flex-direction: column; grid-column: span 12; }
}
@media (max-width: 600px) { .card { grid-column: span 12; } }
.card-media {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
}
.card.featured .card-media { aspect-ratio: auto; width: 50%; flex-shrink: 0; }
@media (max-width: 900px) {
  .card.featured .card-media { width: 100%; aspect-ratio: 16/9; }
}
.card-media .media-fill {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform .4s ease;
}
.card:hover .media-fill { transform: scale(1.03); }
.badge-overlay {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
}
.badge {
  background: rgba(255,255,255,0.96);
  color: var(--ink);
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.badge.accent { background: var(--accent); color: white; }
.card-body-wrap { display: flex; flex-direction: column; flex: 1; }
.card-body {
  padding: 22px 22px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-subjects {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.card-title {
  font-family: 'Fraunces', serif;
  font-size: 23px;
  font-weight: 600;
  margin-bottom: 10px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.card.featured .card-title { font-size: 30px; }
.card-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin-bottom: 16px;
  flex: 1;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-soft);
}
.meta-item { display: inline-flex; align-items: center; gap: 5px; }
.meta-item .ic { color: var(--muted); }
.card-actions {
  padding: 0 22px 22px;
  display: flex;
  gap: 8px;
}
.btn-card {
  flex: 1;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 13.5px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all .15s ease;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}
.btn-card.primary {
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
}
.btn-card.primary:hover { background: #000; }
.btn-card.secondary { background: transparent; color: var(--ink); }
.btn-card.secondary:hover { background: var(--bg); }

/* ----------------------------------------------------------------------
   14. Project grid + cards
   ---------------------------------------------------------------------- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 80px;
}
@media (max-width: 768px) { .projects-grid { grid-template-columns: 1fr; gap: 24px; } }
.project-card {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .3s ease, border-color .2s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
  color: inherit;
}
.project-media {
  aspect-ratio: 16 / 10;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
}
.project-media .media-fill {
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform .5s ease, filter .3s ease;
}
.project-card:hover .media-fill { transform: scale(1.04); }
.project-status {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.project-status.available { background: var(--positive); color: white; }
.project-status.coming { background: var(--accent-2); color: var(--ink); }
.project-status .dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 0 0 0 rgba(255,255,255,0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255,255,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,255,255,0); }
}
.project-status.coming .dot-pulse { background: var(--ink); box-shadow: 0 0 0 0 rgba(26,34,56,0.5); }
.project-card.is-coming .media-fill { filter: saturate(0.55) brightness(0.92); }
.project-card.is-coming:hover .media-fill { filter: saturate(0.85) brightness(0.96); }

.project-body {
  padding: 26px 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-subjects {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.project-title {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.1;
  margin-bottom: 12px;
}
.project-title em { font-style: italic; color: var(--ink-soft); font-weight: 500; }
.project-desc {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 20px;
  flex: 1;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-soft);
}
.project-cta-row {
  padding: 0 28px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.project-cta {
  flex: 1;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s ease;
}
.project-cta:hover { background: var(--accent); border-color: var(--accent); color: white; }
.project-card.is-coming .project-cta {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line-strong);
  cursor: default;
}
.project-card.is-coming:hover .project-cta {
  background: transparent;
  border-color: var(--accent-2);
  color: var(--ink);
}

/* Equation of Me illustrated media */
.media-illustrated {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2D3E6E 0%, #1A2238 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.media-illustrated::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(231,111,81,0.2) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(233,196,106,0.18) 0%, transparent 45%);
}
.media-illustrated .eq-formula {
  position: relative;
  z-index: 1;
  font-family: 'Fraunces', serif;
  color: white;
  font-size: 48px;
  letter-spacing: -0.02em;
  text-align: center;
  text-shadow: 0 4px 24px rgba(0,0,0,0.35);
}
.media-illustrated .eq-formula em { font-style: italic; color: var(--accent-2); font-weight: 500; }
.media-illustrated .eq-tags {
  position: absolute;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}
.media-illustrated .eq-tag-1 { top: 20%; left: 12%; transform: rotate(-6deg); }
.media-illustrated .eq-tag-2 { bottom: 22%; right: 14%; transform: rotate(8deg); }
.media-illustrated .eq-tag-3 { top: 60%; left: 18%; transform: rotate(4deg); }

/* ----------------------------------------------------------------------
   15. Home — three paths
   ---------------------------------------------------------------------- */
.three-paths { margin: 96px auto; }
.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .paths-grid { grid-template-columns: 1fr; } }
.path-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.path-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: inherit;
}
.path-icon-wrap {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent-soft), #FEF5E7);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  border: 1px solid #F6E6D2;
}
.path-icon-wrap .ic { width: 32px; height: 32px; vertical-align: 0; }
.path-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.015em;
}
.path-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 20px;
  flex: 1;
}
.path-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .15s ease;
}
.path-card:hover .path-cta { gap: 10px; }

/* ----------------------------------------------------------------------
   16. Home — dramatic featured project
   ---------------------------------------------------------------------- */
.featured-project-dramatic {
  position: relative;
  margin: 0;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  min-height: 600px;
  display: flex;
  align-items: center;
}
.dramatic-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: -2;
  filter: saturate(1.05);
  transform: scale(1.03);
}
.dramatic-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(26,34,56,0.94) 0%, rgba(26,34,56,0.78) 38%, rgba(26,34,56,0.25) 75%, rgba(26,34,56,0.05) 100%);
  z-index: -1;
}
@media (max-width: 768px) {
  .dramatic-overlay { background: linear-gradient(to bottom, rgba(26,34,56,0.7) 0%, rgba(26,34,56,0.9) 100%); }
}
.dramatic-content {
  max-width: 620px;
  padding: 96px 24px;
  color: white;
  position: relative;
  z-index: 1;
}
.dramatic-content .eyebrow { color: var(--accent-2); margin-bottom: 18px; }
.dramatic-content h2 {
  color: white;
  font-size: clamp(38px, 5.5vw, 60px);
  font-weight: 600;
  line-height: 1.02;
  margin: 0 0 20px;
  text-shadow: 0 4px 28px rgba(0,0,0,0.35);
}
.dramatic-content h2 em { font-style: italic; color: var(--accent-2); font-weight: 500; }
.dramatic-content > p {
  color: rgba(255,255,255,0.9);
  font-size: 17px;
  margin: 0 0 24px;
  max-width: 560px;
  text-shadow: 0 2px 14px rgba(0,0,0,0.25);
}
.dramatic-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13.5px;
  color: rgba(255,255,255,0.85);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 30px;
}
.dramatic-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dramatic-content .btn-primary-large {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 8px 24px rgba(231, 111, 81, 0.4);
}
.dramatic-content .btn-primary-large:hover {
  background: #d05f43;
  border-color: #d05f43;
  transform: translateY(-1px);
}
.dramatic-content .btn-secondary-large {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.35);
  color: white;
  backdrop-filter: blur(8px);
}
.dramatic-content .btn-secondary-large:hover {
  background: rgba(255,255,255,0.22);
  border-color: white;
  color: white;
}
.dramatic-credit {
  position: absolute;
  bottom: 22px;
  right: 28px;
  color: rgba(255,255,255,0.65);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  font-weight: 500;
  z-index: 2;
}

/* ----------------------------------------------------------------------
   17. Make your own (Lessons section) + tool cards
   ---------------------------------------------------------------------- */
.make-your-own { margin: 64px auto 24px; }
.tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
  color: inherit;
}
.tool-illustration {
  background: linear-gradient(135deg, #FDF1ED 0%, #FEF5E7 100%);
  padding: 20px 24px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}
.tool-illustration svg { width: 100%; max-width: 340px; height: auto; display: block; }
.tool-body { padding: 26px 28px 28px; }
.tool-body h3 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.tool-body p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 18px;
}
.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 600;
  font-size: 14.5px;
}
.tool-card:hover .tool-cta { gap: 10px; }
.tool-cta svg { transition: transform .2s ease; }

/* ----------------------------------------------------------------------
   18. Tools page — feature blocks + browser frame
   ---------------------------------------------------------------------- */
.tool-feature {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: center;
  padding: 96px 0;
}
.tool-feature.reverse { grid-template-columns: 1.1fr 1fr; }
.tool-feature.reverse .tool-content { order: 2; }
.tool-feature.reverse .tool-visual { order: 1; }
@media (max-width: 900px) {
  .tool-feature, .tool-feature.reverse {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 64px 0;
  }
  .tool-feature.reverse .tool-content { order: 1; }
  .tool-feature.reverse .tool-visual { order: 2; }
}
.tool-feature + .tool-feature { border-top: 1px solid var(--line); }

.tool-content .eyebrow { margin-bottom: 12px; }
.tool-content h2 {
  font-size: clamp(34px, 4.4vw, 48px);
  font-weight: 600;
  line-height: 1.04;
  margin-bottom: 14px;
  letter-spacing: -0.02em;
}
.tool-content h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
.tool-tagline {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 19px;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.4;
}
.tool-content > p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 0 0 22px;
}
.tool-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}
@media (max-width: 600px) { .tool-features-list { grid-template-columns: 1fr; } }
.tool-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.45;
}
.check-mark {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 1px;
}
.tool-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.tool-visual { position: relative; }
.visual-frame {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 1;
}
.visual-frame-header {
  background: #F5F1E8;
  border-bottom: 1px solid var(--line);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.browser-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.browser-dot.r { background: #FF6058; }
.browser-dot.y { background: #FFC130; }
.browser-dot.g { background: #28CA42; }
.browser-url {
  margin-left: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px;
  color: var(--muted);
  background: var(--surface);
  padding: 5px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex: 1;
  text-align: center;
}
.visual-frame-body {
  padding: 36px 28px;
  background: linear-gradient(135deg, var(--accent-soft) 0%, #FEF5E7 100%);
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.visual-frame-body svg { max-width: 100%; height: auto; }

.visual-note {
  position: absolute;
  background: var(--ink);
  color: white;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  box-shadow: 0 8px 24px rgba(26, 34, 56, 0.25);
  max-width: 220px;
  z-index: 2;
}
.visual-note .note-eyebrow {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 4px;
}
.visual-note::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  background: var(--ink);
  transform: rotate(45deg);
}
.visual-note.bottom-left { bottom: -22px; left: -28px; }
.visual-note.bottom-left::after { top: 18px; right: -5px; }
.visual-note.top-right { top: -22px; right: -28px; }
.visual-note.top-right::after { bottom: 18px; left: -5px; }
@media (max-width: 900px) { .visual-note { display: none; } }

/* ----------------------------------------------------------------------
   19. Home — Author section
   ---------------------------------------------------------------------- */
.author-section { margin: 96px auto; }
.author-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 48px 56px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 44px;
  align-items: center;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) {
  .author-card {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 40px 28px;
    justify-items: center;
    gap: 24px;
  }
}
.author-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  opacity: 0.85;
  pointer-events: none;
}
.author-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--warm) 100%);
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 36px rgba(231, 111, 81, 0.3);
  overflow: hidden;
}
.author-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 64px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.02em;
}
.author-avatar img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
}
.author-content { position: relative; z-index: 1; }
.author-content .eyebrow { margin-bottom: 8px; }
.author-content h3 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.015em;
}
.author-content .role {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}
.author-content > p {
  color: var(--ink-soft);
  margin: 0 0 18px;
  font-size: 15.5px;
  max-width: 620px;
}
.author-quote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding: 4px 0 4px 18px;
  margin: 0 0 18px;
  line-height: 1.5;
  max-width: 620px;
}
@media (max-width: 768px) {
  .author-quote { border-left: none; border-top: 2px solid var(--accent); padding: 16px 0 0; }
}
.author-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .15s ease;
}
.author-cta:hover { gap: 10px; color: var(--accent); }

/* ----------------------------------------------------------------------
   20. About — Vision card
   ---------------------------------------------------------------------- */
.vision-card {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: white;
  border-radius: 28px;
  padding: 64px 56px;
  margin: 64px 0;
  position: relative;
  overflow: hidden;
}
.vision-card::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.22;
  pointer-events: none;
}
.vision-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--warm) 0%, transparent 60%);
  opacity: 0.15;
  pointer-events: none;
}
.vision-content { position: relative; z-index: 1; max-width: 760px; }
.vision-card .eyebrow { color: var(--accent-2); }
.vision-card h2 {
  color: white;
  font-size: clamp(32px, 4.4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 22px;
}
.vision-card h2 em { font-style: italic; color: var(--accent-2); font-weight: 500; }
.vision-card p {
  font-family: 'Fraunces', serif;
  font-size: 21px;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255,255,255,0.92);
  margin: 0;
}
.vision-quote-mark {
  font-family: 'Fraunces', serif;
  font-size: 100px;
  line-height: 0.8;
  color: var(--accent-2);
  opacity: 0.4;
  position: absolute;
  top: 36px;
  left: 28px;
}

/* ----------------------------------------------------------------------
   21. About — Reasons grid
   ---------------------------------------------------------------------- */
.why-section { margin: 96px auto; }
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .reasons-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .reasons-grid { grid-template-columns: 1fr; } }
.reason-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
}
.reason-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.reason-number {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-soft), #FEF5E7);
  border: 1px solid #F6E6D2;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 16px;
}
.reason-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}
.reason-card p { color: var(--ink-soft); font-size: 14px; margin: 0; }

/* ----------------------------------------------------------------------
   22. Myths accordion (About) + Better accordion (HowTo)
   ---------------------------------------------------------------------- */
.myths-section { margin: 96px auto; }
.myths-list { max-width: 880px; margin: 0 auto; }
.myth-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.myth-item[open] { border-color: var(--accent); box-shadow: var(--shadow-md); }
.myth-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.myth-item summary::-webkit-details-marker { display: none; }
.myth-tag {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FDF1ED;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #F4D6CC;
}
.myth-title {
  flex: 1;
  font-family: 'Fraunces', serif;
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.myth-toggle {
  width: 28px;
  height: 28px;
  background: var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, background .2s ease;
  flex-shrink: 0;
}
.myth-item[open] .myth-toggle { background: var(--accent); transform: rotate(180deg); }
.myth-item[open] .myth-toggle svg { stroke: white; }
.myth-body {
  padding: 0 28px 26px 78px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
@media (max-width: 600px) {
  .myth-item summary { padding: 18px 20px; flex-wrap: wrap; }
  .myth-body { padding: 0 20px 22px 20px; }
  .myth-title { font-size: 17px; width: 100%; order: 3; }
}

/* Better accordion */
.better-section { margin: 96px auto; }
.better-list { max-width: 880px; margin: 0 auto; }
.better-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 14px;
  overflow: hidden;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.better-item[open] { border-color: var(--accent); box-shadow: var(--shadow-md); }
.better-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.better-item summary::-webkit-details-marker { display: none; }
.better-number {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-soft), #FEF5E7);
  border: 1px solid #F6E6D2;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}
.better-title {
  flex: 1;
  font-family: 'Fraunces', serif;
  font-size: 19px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.better-toggle {
  width: 28px;
  height: 28px;
  background: var(--bg);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, background .2s ease;
  flex-shrink: 0;
}
.better-item[open] .better-toggle { background: var(--accent); transform: rotate(180deg); }
.better-item[open] .better-toggle svg { stroke: white; }
.better-body {
  padding: 0 28px 26px 82px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.65;
}
.better-body ul { padding-left: 18px; margin: 14px 0; }
.better-body ul li { margin-bottom: 6px; }
.better-body em { color: var(--accent); font-style: italic; }
.better-body strong { color: var(--ink); }
@media (max-width: 600px) {
  .better-item summary { padding: 18px 20px; }
  .better-body { padding: 0 20px 22px; }
}

/* ----------------------------------------------------------------------
   23. HowTo — Formula card + principles + example + compare
   ---------------------------------------------------------------------- */
.formula-card {
  margin: 48px auto 0;
  max-width: 880px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: white;
  padding: 40px 32px;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.formula-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.2;
  pointer-events: none;
}
.formula-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -10%;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--warm) 0%, transparent 60%);
  opacity: 0.16;
  pointer-events: none;
}
.formula-content { position: relative; z-index: 1; text-align: center; }
.formula-card .eyebrow { color: var(--accent-2); }
.formula {
  font-family: 'Fraunces', serif;
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
}
.formula .term {
  background: rgba(255,255,255,0.1);
  padding: 8px 18px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-style: italic;
}
.formula .op { color: var(--accent-2); font-weight: 600; font-style: normal; }
.formula .result { color: var(--accent-2); font-weight: 600; font-style: italic; }

/* Principles */
.principles { margin: 96px auto; }
.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 768px) { .principles-grid { grid-template-columns: 1fr; } }
.principle-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .25s ease, border-color .2s ease;
  position: relative;
}
.principle-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.principle-number {
  position: absolute;
  top: 24px;
  right: 28px;
  font-family: 'Fraunces', serif;
  font-size: 88px;
  font-weight: 600;
  line-height: 1;
  color: var(--accent-soft);
  letter-spacing: -0.04em;
  pointer-events: none;
}
.principle-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.015em;
  max-width: 380px;
}
.principle-card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  margin: 0 0 14px;
  max-width: 460px;
}
.principle-question {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--accent);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

/* Example card */
.example-card {
  margin: 96px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 56px 48px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) { .example-card { padding: 36px 28px; } }
.example-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--warm) 100%);
}
.example-card h3 {
  font-size: clamp(26px, 3.4vw, 34px);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.1;
}
.example-card h3 em { font-style: italic; color: var(--accent); font-weight: 500; }
.example-card .standard {
  color: var(--ink-soft);
  font-size: 14px;
  margin-bottom: 24px;
  display: inline-block;
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #F4D6CC;
  font-weight: 500;
}
.example-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.example-steps li {
  counter-increment: step;
  padding-left: 60px;
  position: relative;
  margin-bottom: 22px;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.6;
}
.example-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: -2px;
  width: 36px; height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
}
.example-steps strong { color: var(--accent); font-weight: 600; }

/* Compare cards (IS / IS NOT) */
.compare-section { margin: 96px auto; }
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 768px) { .compare-grid { grid-template-columns: 1fr; } }
.compare-card {
  border-radius: 24px;
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}
.compare-card.not {
  background: linear-gradient(135deg, #FFF1F0 0%, #FFE5E1 100%);
  border: 1px solid #F4C5BD;
}
.compare-card.is {
  background: linear-gradient(135deg, #E8F6F3 0%, #D7EFE8 100%);
  border: 1px solid #B8DDD2;
}
.compare-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
}
.compare-card.not .compare-badge { background: var(--negative); color: white; }
.compare-card.is .compare-badge { background: var(--positive); color: white; }
.compare-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 22px;
  letter-spacing: -0.018em;
}
.compare-card.not h3 { color: var(--negative); }
.compare-card.is h3 { color: var(--positive); }
.compare-list { list-style: none; padding: 0; margin: 0; }
.compare-list li {
  padding: 10px 0 10px 32px;
  position: relative;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
}
.compare-list li + li { border-top: 1px solid rgba(0,0,0,0.05); }
.compare-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 14px;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.compare-card.not .compare-list li::before {
  background: var(--negative);
  content: '×';
  color: white;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}
.compare-card.is .compare-list li::before {
  background: var(--positive);
  content: '✓';
  color: white;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
}
.compare-list em { color: var(--accent); font-style: italic; font-weight: 500; }

/* Design flow image */
.design-flow { margin: 96px 0; text-align: center; }
.design-flow img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  background: white;
}

/* ----------------------------------------------------------------------
   23b. Related projects (cross-link section on project pages)
   ---------------------------------------------------------------------- */
.related-projects { margin: 0 0 80px; }
.related-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 768px) { .related-grid { grid-template-columns: 1fr; } }
.related-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, border-color .2s ease, box-shadow .25s ease;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  color: inherit;
}
.related-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
  background-color: var(--ink);
  position: relative;
  overflow: hidden;
}
.related-thumb.is-coming { filter: saturate(0.55) brightness(0.95); }
.related-content { flex: 1; min-width: 0; }
.related-subject {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 4px;
}
.related-card h3 {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.related-card p {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 10px;
  line-height: 1.4;
}
.related-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 9px;
  border-radius: 6px;
}
.related-status.available {
  background: #E8F6F3;
  color: var(--positive);
  border: 1px solid #B8DDD2;
}
.related-status.coming {
  background: #FEF5E7;
  color: #C28A2B;
  border: 1px solid #F0D9A8;
}
.related-arrow {
  flex-shrink: 0;
  color: var(--accent);
  margin-left: 4px;
  transition: transform .2s ease;
}
.related-card:hover .related-arrow { transform: translateX(4px); }
@media (max-width: 600px) {
  .related-card { flex-direction: column; text-align: center; align-items: stretch; }
  .related-thumb { width: 100%; height: 140px; }
  .related-arrow { display: none; }
}

/* Equation of Me illustrated thumbnail variant */
.related-thumb.illustrated {
  background: linear-gradient(135deg, #2D3E6E 0%, #1A2238 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}
.related-thumb.illustrated .formula {
  font-family: 'Fraunces', serif;
  color: white;
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.related-thumb.illustrated .formula em {
  color: var(--accent-2);
  font-style: italic;
}

/* ----------------------------------------------------------------------
   24. Closing CTAs (light card + dark idea-cta)
   ---------------------------------------------------------------------- */
.close-cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  margin: 0 0 80px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.close-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  opacity: 0.85;
  pointer-events: none;
}
.close-cta-content { position: relative; z-index: 1; }
.close-cta h2 { font-size: clamp(28px, 3.8vw, 38px); font-weight: 600; margin-bottom: 14px; }
.close-cta h2 em { font-style: italic; color: var(--accent); font-weight: 500; }
.close-cta p { color: var(--ink-soft); max-width: 540px; margin: 0 auto 26px; font-size: 16px; }
.close-cta .actions { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.idea-cta {
  margin: 16px 0 80px;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  color: white;
  border-radius: 24px;
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.idea-cta::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.22;
  pointer-events: none;
}
.idea-cta::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--warm) 0%, transparent 60%);
  opacity: 0.16;
  pointer-events: none;
}
.idea-cta-content { position: relative; z-index: 1; }
.idea-cta .eyebrow { color: var(--accent-2); }
.idea-cta h2 {
  color: white;
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.08;
}
.idea-cta h2 em { font-style: italic; color: var(--accent-2); font-weight: 500; }
.idea-cta p {
  color: rgba(255,255,255,0.82);
  max-width: 540px;
  margin: 0 auto 28px;
  font-size: 16px;
}

/* ----------------------------------------------------------------------
   25. Footer
   ---------------------------------------------------------------------- */
footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 56px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p {
  color: var(--ink-soft);
  font-size: 14px;
  max-width: 340px;
  margin-top: 12px;
}
.footer-col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  color: var(--ink);
}
.footer-col a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 8px;
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
