/* ==========================================================
   Tanay Purwar — personal site
   ========================================================== */

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #efeae1;
  --ink: #15171c;
  --ink-2: #474c57;
  --muted: #7a7f89;
  --line: #e3ddd1;
  --accent: #d9480f;
  --accent-2: #b93c0b;
  --accent-soft: #fbe5d8;
  --on-accent: #ffffff;

  --c-camunda: #d9480f;
  --c-java: #2563eb;
  --c-ai: #7c3aed;
  --c-architecture: #b7791f;
  --c-leadership: #0f766e;

  --grid-dot: rgba(21, 23, 28, 0.09);
  --shadow: 0 1px 2px rgba(21, 23, 28, 0.04), 0 12px 32px -12px rgba(21, 23, 28, 0.12);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --container: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1013;
    --surface: #16191e;
    --surface-2: #1d2127;
    --ink: #f2efe9;
    --ink-2: #b9bcc4;
    --muted: #868b95;
    --line: #2a2f37;
    --accent: #ff7a3d;
    --accent-2: #ff9361;
    --accent-soft: #3a1e12;
    --on-accent: #16191e;
    --c-camunda: #ff7a3d;
    --c-java: #60a5fa;
    --c-ai: #a78bfa;
    --c-architecture: #f0b952;
    --c-leadership: #2dd4bf;
    --grid-dot: rgba(242, 239, 233, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1013;
  --surface: #16191e;
  --surface-2: #1d2127;
  --ink: #f2efe9;
  --ink-2: #b9bcc4;
  --muted: #868b95;
  --line: #2a2f37;
  --accent: #ff7a3d;
  --accent-2: #ff9361;
  --accent-soft: #3a1e12;
  --on-accent: #16191e;
  --c-camunda: #ff7a3d;
  --c-java: #60a5fa;
  --c-ai: #a78bfa;
  --c-architecture: #f0b952;
  --c-leadership: #2dd4bf;
  --grid-dot: rgba(242, 239, 233, 0.08);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px -16px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color .3s ease, color .3s ease;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 16px; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.12; letter-spacing: -0.02em; margin: 0; font-variation-settings: "opsz" 96; }
p { margin: 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-size: 17px; font-weight: 600; font-style: italic;
  position: relative;
}
.brand-mark::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg);
}
.brand-name { font-size: 16px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; color: var(--ink-2);
  transition: color .2s ease, background-color .2s ease;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--surface-2); font-weight: 500; }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center;
  transition: border-color .2s ease, transform .2s ease;
}
.icon-btn:hover { border-color: var(--ink-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-toggle { display: none; }

@media (max-width: 820px) {
  .menu-toggle { display: grid; }
  .nav {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 17px; border-radius: 12px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-size: 15px; font-weight: 500; line-height: 1;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-ghost { border-color: var(--line); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 110px) 0 clamp(56px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 40%, #000 30%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6.2vw, 5rem); margin: 22px 0 26px; }
.hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.hero-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid var(--line); }
.stat { padding: 20px 20px 0 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--font-display); font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }

/* Process canvas */
.canvas {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden;
}
.canvas-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.canvas-bar .dots { display: flex; gap: 6px; }
.canvas-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.canvas-bar .file { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-live { display: inline-flex; align-items: center; gap: 7px; color: var(--c-leadership); }
.chip-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.canvas-body {
  padding: 18px 14px 8px;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 16px 16px;
}
.bpmn { width: 100%; height: auto; }
.bpmn .shape { fill: var(--surface); stroke: var(--ink); stroke-width: 1.6; }
.bpmn .shape-ai { stroke: var(--c-ai); }
.bpmn .shape-java { stroke: var(--c-java); }
.bpmn .shape-human { stroke: var(--c-leadership); }
.bpmn .flow { fill: none; stroke: var(--ink-2); stroke-width: 1.4; }
.bpmn .arrow { fill: var(--ink-2); }
.bpmn .label { font-family: var(--font-mono); font-size: 10.5px; fill: var(--ink); text-anchor: middle; }
.bpmn .sub { font-family: var(--font-mono); font-size: 8.5px; fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.bpmn .end { fill: var(--surface); stroke: var(--ink); stroke-width: 3.4; }
.bpmn .gw-mark { stroke: var(--ink); stroke-width: 2; }
.bpmn .token { fill: var(--accent); }
.bpmn .token-halo { fill: var(--accent); opacity: .22; }

.canvas-foot {
  display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted);
}
.canvas-foot div { padding: 12px 16px; }
.canvas-foot div + div { border-left: 1px solid var(--line); }
.canvas-foot b { display: block; color: var(--ink); font-size: 13px; font-weight: 500; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { margin-top: 44px; }
}
@media (max-width: 520px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(3) { grid-column: 1 / -1; border-left: 0; padding-left: 0; border-top: 1px solid var(--line); margin-top: 20px; }
  .canvas-foot div { padding: 10px 10px; }
}

/* ---------- Marquee ---------- */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; background: var(--surface); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font-family: var(--font-display); font-size: 22px; font-style: italic; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 48px; }
.marquee span::after { content: "✦"; font-style: normal; font-size: 12px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin-top: 14px; max-width: 16em; }
.section-head h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.section-head p { color: var(--ink-2); max-width: 30em; margin-top: 14px; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 4px; transition: border-color .2s ease, color .2s ease; }
.link-arrow:hover { color: var(--accent); border-color: var(--accent); }

/* Pillars */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.pillar {
  --c: var(--accent);
  position: relative; padding: 28px 24px 26px; border-radius: var(--radius);
  background: var(--bg); border: 1px solid var(--line);
  transition: transform .3s ease, border-color .3s ease;
}
.section-alt .pillar { background: var(--bg); }
.pillar:hover { transform: translateY(-4px); border-color: var(--c); }
.pillar-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); margin-bottom: 22px; }
.pillar-icon svg { width: 22px; height: 22px; }
.pillar h3 { font-size: 1.45rem; margin-bottom: 10px; }
.pillar p { color: var(--ink-2); font-size: 15.5px; }
.pillar ul { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pillar li { font-family: var(--font-mono); font-size: 11.5px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.pillar.camunda { --c: var(--c-camunda); }
.pillar.java { --c: var(--c-java); }
.pillar.ai { --c: var(--c-ai); }
.pillar.leadership { --c: var(--c-leadership); }
@media (max-width: 1040px) { .pillars { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* Tags */
.tag {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--c);
}
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.tag--camunda { --c: var(--c-camunda); }
.tag--java { --c: var(--c-java); }
.tag--ai { --c: var(--c-ai); }
.tag--architecture { --c: var(--c-architecture); }
.tag--leadership { --c: var(--c-leadership); }

/* Article cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3 { grid-template-columns: 1fr; } }

.card {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.section-alt .card { background: var(--bg); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--ink) 25%, var(--line)); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.card h3 { font-size: 1.4rem; line-height: 1.22; }
.card p { color: var(--ink-2); font-size: 15.5px; flex: 1; }
.card-link { font-size: 14px; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.card:hover .card-link { color: var(--accent); }

.article-feature {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 0; padding: 0; overflow: hidden; margin-bottom: 20px;
}
.article-feature .feature-art {
  position: relative; min-height: 300px; background: #15171c; color: #fff; overflow: hidden;
  display: flex; align-items: flex-end; padding: 28px;
}
.feature-art::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--accent) 70%, transparent), transparent 45%),
    radial-gradient(circle at 85% 70%, color-mix(in srgb, var(--c-ai) 60%, transparent), transparent 45%);
  opacity: .85;
}
.feature-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 18px 18px;
}
.feature-art span { position: relative; z-index: 1; font-family: var(--font-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #fff; }
:root[data-theme="dark"] .article-feature .feature-art { background: #08090b; }
.article-feature .feature-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.article-feature h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
@media (max-width: 820px) { .article-feature { grid-template-columns: 1fr; } .article-feature .feature-art { min-height: 180px; } }

/* Courses */
.courses { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 820px) { .courses { grid-template-columns: 1fr; } }
.course {
  --c: var(--accent);
  position: relative; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px; overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.section-alt .course { background: var(--bg); }
.course::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--c); }
.course:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course.c-camunda { --c: var(--c-camunda); }
.course.c-java { --c: var(--c-java); }
.course.c-ai { --c: var(--c-ai); }
.course.c-leadership { --c: var(--c-leadership); }
.course-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.status { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); }
.status.enrolling { background: var(--c); color: #fff; border-color: transparent; }
:root[data-theme="dark"] .status.enrolling { color: #0e1013; }
.course h3 { font-size: 1.75rem; }
.course .subtitle { color: var(--ink-2); margin-top: -8px; }
.course-facts { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; color: var(--muted); padding: 14px 0; border-block: 1px solid var(--line); }
.course-facts b { color: var(--ink); font-weight: 500; }
.course ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; flex: 1; }
.course li { display: flex; gap: 12px; font-size: 15.5px; color: var(--ink-2); }
.course li::before { content: ""; flex: none; width: 6px; height: 6px; margin-top: 10px; border-radius: 50%; background: var(--c); }
.course .btn { align-self: flex-start; }

/* Thoughts */
.thoughts { columns: 3 300px; column-gap: 20px; }
.thought {
  break-inside: avoid; margin-bottom: 20px; padding: 26px 26px 22px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
}
.section-alt .thought { background: var(--bg); }
.thought blockquote { margin: 0 0 18px; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.38; letter-spacing: -0.01em; }
.thought blockquote::before { content: "“"; display: block; font-size: 3rem; line-height: .6; color: var(--accent); margin-bottom: 6px; height: 22px; }
.thought footer { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }

/* About */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.portrait {
  position: sticky; top: 104px;
  aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden;
  background: var(--ink); color: var(--bg);
  display: flex; flex-direction: column; justify-content: space-between; padding: 28px;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.portrait .initials { font-family: var(--font-display); font-style: italic; font-size: clamp(6rem, 14vw, 10rem); line-height: .9; letter-spacing: -0.04em; position: relative; }
.portrait .initials span { color: var(--accent); }
.portrait .caption { position: relative; font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.portrait::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.1) 1px, transparent 1px); background-size: 18px 18px; }
.portrait { position: sticky; }
.about-copy h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); margin: 14px 0 24px; }
.about-copy h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.about-copy > p { color: var(--ink-2); font-size: 1.1rem; margin-bottom: 18px; }
.principles { list-style: none; padding: 0; margin: 40px 0 0; counter-reset: p; border-top: 1px solid var(--line); }
.principles li { counter-increment: p; display: grid; grid-template-columns: 56px 1fr; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.principles li::before { content: "0" counter(p); font-family: var(--font-mono); font-size: 13px; color: var(--accent); padding-top: 4px; }
.principles h4 { font-size: 1.25rem; margin-bottom: 6px; }
.principles p { color: var(--ink-2); font-size: 15.5px; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .portrait { position: relative; top: 0; aspect-ratio: 16 / 10; }
}

/* Newsletter / CTA */
.cta {
  position: relative; overflow: hidden;
  border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  background: var(--ink); color: var(--bg);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
}
:root[data-theme="dark"] .cta { background: var(--surface-2); color: var(--ink); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cta { background: var(--surface-2); color: var(--ink); } }
.cta::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -160px; top: -220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 55%, transparent), transparent 65%);
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
.cta h2 em { font-style: italic; color: var(--accent); font-weight: 400; }
.cta p { opacity: .75; margin-top: 14px; }
.subscribe { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.subscribe input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: inherit;
  padding: 12px 16px; font: inherit; font-size: 15px; outline: none;
}
.subscribe input::placeholder { color: inherit; opacity: .55; }
.subscribe .btn { background: var(--accent); color: #fff; }
.subscribe .btn:hover { background: var(--accent-2); color: #fff; }
:root[data-theme="dark"] .subscribe { background: var(--bg); border-color: var(--line); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .subscribe { background: var(--bg); border-color: var(--line); } }
.form-note { font-size: 13px; opacity: .6; margin-top: 12px; padding-left: 16px; }
@media (max-width: 860px) { .cta { grid-template-columns: 1fr; } }
@media (max-width: 460px) {
  .subscribe { flex-direction: column; border-radius: 18px; }
  .subscribe .btn { justify-content: center; }
}

/* ---------- Page header ---------- */
.page-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(32px, 5vw, 56px); position: relative; }
.page-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 18px 0 18px; max-width: 14em; }
.page-hero h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.page-hero p { color: var(--ink-2); font-size: 1.15rem; max-width: 38em; }

.toolbar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-size: 14px; color: var(--ink-2); transition: all .2s ease;
}
.filter:hover { border-color: var(--ink-2); color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { position: relative; flex: 0 1 300px; min-width: 200px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search input {
  width: 100%; padding: 11px 16px 11px 40px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 15px; outline: none;
}
.search input:focus { border-color: var(--ink-2); }
.empty { padding: 48px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ---------- Article ---------- */
.article-hero { padding: clamp(40px, 7vw, 88px) 0 32px; }
.article-hero .back { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; margin-bottom: 32px; }
.article-hero .back:hover { color: var(--ink); }
.article-hero h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); margin: 18px 0 22px; max-width: 18em; }
.article-hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 36em; }
.byline { display: flex; align-items: center; gap: 14px; margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.byline .avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-family: var(--font-display); font-style: italic; font-size: 15px; }
.byline b { color: var(--ink); font-weight: 500; display: block; }

.prose { max-width: 70ch; margin: 0 auto; padding-bottom: 32px; font-size: 1.12rem; line-height: 1.78; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.85rem; margin-top: 2em; }
.prose h3 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .5em; }
.prose li::marker { color: var(--accent); }
.prose blockquote {
  margin: 2em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--accent);
  font-family: var(--font-display); font-size: 1.55rem; line-height: 1.4; font-style: italic; color: var(--ink);
}
.prose code { font-family: var(--font-mono); font-size: .86em; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.prose pre {
  background: #121418; color: #e8e6e1; padding: 22px 24px; border-radius: var(--radius-sm);
  overflow-x: auto; font-size: .86rem; line-height: 1.65; border: 1px solid var(--line);
}
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }

.share { max-width: 70ch; margin: 0 auto; display: flex; gap: 10px; align-items: center; padding: 24px 0 0; border-top: 1px solid var(--line); flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.share a, .share button { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; color: var(--ink-2); }
.share a:hover, .share button:hover { border-color: var(--ink-2); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 64px 0 32px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin: 0 0 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid ul a { color: var(--ink-2); font-size: 15px; }
.footer-grid ul a:hover { color: var(--accent); }
.footer-tagline { margin-top: 18px; color: var(--ink-2); max-width: 26em; font-size: 15px; }
.socials { display: flex; gap: 8px; margin-top: 22px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; color: var(--ink-2); transition: all .2s ease; }
.socials a:hover { color: var(--accent); border-color: var(--accent); }
.socials svg { width: 17px; height: 17px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .bpmn .token, .bpmn .token-halo { display: none; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .status.enrolling { color: #0e1013; } }
.card-link svg, .link-arrow svg { width: 16px; height: 16px; flex: none; transition: transform .2s ease; }
.card:hover .card-link svg, .link-arrow:hover svg { transform: translateX(3px); }
.hero-grid > *, .about-grid > *, .footer-grid > * { min-width: 0; }
.share { max-width: none; width: min(100%, calc(70ch * 1.12)); }
.prose code { font-variant-ligatures: none; }

/* ---------- About page ---------- */
.about-intro { display: grid; grid-template-columns: 1.35fr .9fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about-intro > * { min-width: 0; }
.id-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow);
  padding: 28px; display: grid; gap: 22px;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px); background-size: 16px 16px;
}
.id-top { display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); font-size: 12px; }
.id-name { display: block; font-family: var(--font-display); font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
.id-role { color: var(--accent); font-size: 15px; font-weight: 500; }
.id-card dl { margin: 0; display: grid; border-top: 1px solid var(--line); }
.id-card dl div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.id-card dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.id-card dd { margin: 0; color: var(--ink); }
@media (max-width: 900px) { .about-intro { grid-template-columns: 1fr; } }

.impact-band { border-block: 1px solid var(--line); background: var(--surface); }
.impact { display: grid; grid-template-columns: repeat(6, 1fr); }
.impact > div { padding: 32px 20px; border-left: 1px solid var(--line); }
.impact > div:first-child { border-left: 0; padding-left: 0; }
.impact b { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 3.4vw, 2.8rem); letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px; }
.impact sup { font-size: .5em; color: var(--accent); vertical-align: super; margin-left: 2px; }
.impact span { font-size: 14px; color: var(--muted); line-height: 1.45; display: block; }
@media (max-width: 1040px) {
  .impact { grid-template-columns: repeat(3, 1fr); }
  .impact > div:nth-child(3n+1) { border-left: 0; padding-left: 0; }
  .impact > div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .impact { grid-template-columns: repeat(2, 1fr); }
  .impact > div { border-left: 1px solid var(--line) !important; padding-left: 16px !important; border-top: 1px solid var(--line); }
  .impact > div:nth-child(odd) { border-left: 0 !important; padding-left: 0 !important; }
  .impact > div:nth-child(-n+2) { border-top: 0; }
}

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.role { display: grid; grid-template-columns: 200px 1fr; gap: 40px; position: relative; padding-bottom: 56px; }
.role:last-child { padding-bottom: 0; }
.role::before { content: ""; position: absolute; left: 200px; margin-left: 19px; top: 10px; bottom: -10px; width: 1px; background: var(--line); }
.role:last-child::before { display: none; }
.role-when { position: relative; padding-top: 2px; }
.role-when span { font-family: var(--font-mono); font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.role-when::after {
  content: ""; position: absolute; right: -27px; top: 6px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.role:first-child .role-when::after { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.role-body { padding-left: 12px; }
.role-body h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.role-org { font-size: 15px; color: var(--accent); font-weight: 500; margin-top: 6px; }
.role-summary { color: var(--ink); font-size: 1.08rem; margin-top: 14px; }
.role-body ul { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; max-width: 72ch; }
.role-body li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: 16px; }
.role-body li::before { content: ""; position: absolute; left: 0; top: 11px; width: 10px; height: 1.5px; background: var(--accent); }
.role-body strong { color: var(--ink); font-weight: 600; }
.role-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.role-tags span { font-family: var(--font-mono); font-size: 11.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
@media (max-width: 760px) {
  .role { grid-template-columns: 1fr; gap: 10px; padding-left: 28px; padding-bottom: 44px; }
  .role::before { left: 6px; margin-left: 0; top: 16px; }
  .role-when::after { right: auto; left: -28px; top: 4px; }
  .role-body { padding-left: 0; }
}

.skill-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.skill-group { padding: 26px 24px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--line); border-top: 3px solid var(--c); }
.skill-group h3 { font-size: 1.3rem; margin-bottom: 16px; }
.skill-group ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.skill-group li { font-size: 13.5px; padding: 5px 11px; border-radius: 999px; background: color-mix(in srgb, var(--c) 10%, transparent); color: var(--ink); }

.creds { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.cred { padding: clamp(26px, 4vw, 40px); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.cred h3 { font-size: 1.6rem; margin-top: 16px; }
.cred ul { margin: 18px 0 0; padding-left: 1.2em; color: var(--ink-2); display: grid; gap: 8px; }
.cred li::marker { color: var(--accent); }
.cert { display: flex; gap: 16px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cert:first-of-type { margin-top: 10px; }
.cert:last-child { border-bottom: 0; padding-bottom: 0; }
.cert-icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .06em; }
.cert b { display: block; font-weight: 600; }
.cert span { font-size: 14px; color: var(--muted); }
@media (max-width: 820px) { .creds { grid-template-columns: 1fr; } }
.skill-groups { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1100px) { .skill-groups { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) { .skill-groups { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .skill-groups { grid-template-columns: 1fr; } }

/* ---------- Course reader ---------- */
.course-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.learn-main { padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 8vw, 96px); }
.learn { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.learn-nav { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow-y: auto; padding-right: 6px; font-size: 14.5px; }
.learn-nav-toggle { display: none; }
.learn-course { display: grid; gap: 6px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 18px; }
.learn-course b { font-family: var(--font-display); font-size: 1.3rem; font-weight: 500; line-height: 1.2; }
.learn-course > span:last-child { color: var(--muted); font-size: 13.5px; }
.learn-group { display: grid; gap: 2px; margin: 4px 0 10px; }
.learn-group a { display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); line-height: 1.4; }
.learn-group a:hover { background: var(--surface-2); color: var(--ink); }
.learn-group a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); font-weight: 500; }
.learn-group .ln { font-family: var(--font-mono); font-size: 12px; color: var(--muted); padding-top: 2px; min-width: 24px; }
.learn-module { border-top: 1px solid var(--line); }
.learn-module summary, .learn-module.soon { list-style: none; display: grid; gap: 2px; padding: 14px 12px 12px; cursor: pointer; }
.learn-module summary::-webkit-details-marker { display: none; }
.learn-module summary { position: relative; padding-right: 28px; }
.learn-module summary::after { content: "+"; position: absolute; right: 10px; top: 14px; color: var(--muted); font-size: 18px; }
.learn-module[open] summary::after { content: "–"; }
.learn-module .mn { font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.learn-module summary > span:last-child { font-weight: 500; color: var(--ink); line-height: 1.35; }
.learn-module.soon { cursor: default; color: var(--muted); }
.learn-module.soon .mn { color: var(--muted); }
.learn-module.soon em { font-style: normal; font-size: 12px; opacity: .75; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 28px; }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }
.crumbs [aria-current] { color: var(--ink-2); }

.lesson { margin: 0; max-width: 76ch; }
.lesson h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.1; margin-bottom: .2em; }
.lesson h1 + p { color: var(--muted); font-size: 1rem; }
.lesson h2 { padding-top: .6em; }
.lesson h4 { font-size: 1.15rem; margin-top: 1.4em; }
.lesson hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.lesson blockquote { font-size: 1.2rem; font-style: normal; font-family: var(--font-body); line-height: 1.6; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 16px 22px; }
.lesson blockquote p { color: inherit; }
.lesson-loading { color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.prose table { width: 100%; border-collapse: collapse; font-size: .92rem; line-height: 1.55; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface-2); }
.prose tr:last-child td { border-bottom: 0; }
.prose td { color: var(--ink-2); }
.prose pre { font-size: .82rem; }
.prose details { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 22px; background: var(--surface); }
.prose details[open] { padding-bottom: 22px; }
.prose summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--accent); }
.prose input[type="checkbox"] { accent-color: var(--accent); margin-right: 8px; }
.prose li:has(> input[type="checkbox"]) { list-style: none; margin-left: -1.3em; }
.mermaid { display: flex; justify-content: center; overflow-x: auto; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); }

.lesson-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 76ch; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--line); }
.lesson-pager a { display: grid; gap: 4px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); transition: border-color .2s ease, transform .2s ease; }
.lesson-pager a:hover { border-color: var(--accent); transform: translateY(-2px); }
.lesson-pager span { font-size: 13px; color: var(--muted); }
.lesson-pager b { font-weight: 500; line-height: 1.35; }
.pager-next { text-align: right; grid-column: 2; }

@media (max-width: 900px) {
  .learn { grid-template-columns: minmax(0, 1fr); }
  .learn-nav { position: static; max-height: none; padding: 0; }
  .learn-nav-toggle { display: flex; justify-content: space-between; width: 100%; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
  .learn-nav-body { display: none; padding-top: 14px; }
  .learn-nav.open .learn-nav-body { display: block; }
}
@media (max-width: 560px) {
  .lesson-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
}
.lesson blockquote p + p { margin-top: .8em; }
.prose details > * + * { margin-top: 1.1em; }
