/* =========================================================
   Hajin Moon — AI Systems Engineer
   Design language: Linear / Stripe / Vercel hybrid
   ========================================================= */

:root {
  --ink: #0F172A;
  --ink-2: #1E293B;
  --sub: #475569;
  --muted: #94A3B8;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-3: #F1F5F9;
  --indigo: #4F46E5;
  --indigo-soft: #EEF2FF;
  --emerald: #10B981;
  --emerald-soft: #ECFDF5;
  --amber: #F59E0B;
  --slate: #64748B;
  --radius: 8px;
  --radius-lg: 12px;
  --rainbow: linear-gradient(120deg, #6366F1 0%, #22D3EE 38%, #34D399 62%, #FB7185 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, 'Inter', system-ui, -apple-system, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Balanced wrapping for headings, prettier wrapping for paragraphs.
   These are the modern CSS rules that fix Korean line-break awkwardness. */
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, "Noto Sans Arabic","Noto Sans SC", monospace;
  font-feature-settings: 'tnum';
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
}

.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
}
.nav-mark {
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.05em;
}
.nav-name { color: var(--ink); }
.nav-sub {
  color: var(--muted); font-size: 13px; font-weight: 500;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
}

.nav-links {
  display: flex; align-items: center; gap: 26px;
}
.nav-links a {
  color: var(--sub);
  font-size: 13.5px; font-weight: 500;
  transition: color 0.15s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-cta {
  display: flex; align-items: center; gap: 8px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 500;
  padding: 8px 14px; border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-solid {
  background: var(--ink); color: #fff;
  border: 1px solid var(--ink);
}
.btn-solid:hover { background: #000; border-color: #000; }
.btn-ghost {
  background: #fff; color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-arrow {
  display: inline-block; transition: transform 0.2s ease;
}
.btn:hover .btn-arrow { transform: translateX(2px); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}
.section-alt { background: var(--bg-alt); }

.section-head { margin-bottom: 48px; max-width: 720px; }
.eyebrow {
  display: inline-block;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11.5px; font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 14px;
}
.section h2 {
  font-size: 34px; font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.section-lede {
  margin-top: 16px;
  color: var(--sub);
  font-size: 16px; line-height: 1.65;
  max-width: 640px;
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: 88px 0 64px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FAFAFC 100%);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(15,23,42,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,23,42,0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.status-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--emerald-soft);
  border: 1px solid #BBF7D0;
  font-size: 12px; font-weight: 500;
  color: #065F46;
  margin-bottom: 28px;
}
.status-pill .mono { font-size: 10.5px; letter-spacing: 0.1em; }
.status-pill strong { color: #047857; }

.dot {
  display: inline-block;
  width: 6px; height: 6px; border-radius: 50%;
}
.dot-emerald { background: var(--emerald); box-shadow: 0 0 0 3px rgba(16,185,129,0.18); }
.dot-indigo  { background: var(--indigo);  box-shadow: 0 0 0 3px rgba(79,70,229,0.18); }
.dot-slate   { background: var(--slate);   box-shadow: 0 0 0 3px rgba(100,116,139,0.18); }

.hero-title {
  font-size: clamp(38px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  max-width: 900px;
}
.hero-emph {
  color: var(--ink);
  border-bottom: 3px solid var(--indigo);
  padding-bottom: 2px;
}

.hero-sub {
  margin-top: 14px;
  color: var(--sub);
  font-size: 16px;
  line-height: 1.7;
  max-width: 680px;
}
.hero-sub-lead {
  margin-top: 22px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
}

.hero-outcomes {
  margin-top: 40px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.outcome {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 20px;
  background: #fff;
  transition: border-color 0.18s ease;
}
.outcome:hover { border-color: var(--ink-2); }
.outcome-mono {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.outcome-title {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
.outcome-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--sub);
  line-height: 1.5;
}

.hero-actions {
  margin-top: 32px;
  display: flex; gap: 10px; flex-wrap: wrap;
}

/* hero diagram */
.hero-diagram {
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
  background: #fff;
}
.hero-diagram svg { width: 100%; height: auto; }
.dg rect { fill: #fff; stroke: var(--line-2); stroke-width: 1; }
.dg-strong rect { fill: #F8FAFC; stroke: var(--ink-2); stroke-width: 1.2; }
.dg-mono {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px; fill: var(--sub);
}
.dg-mono-b {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11.5px; font-weight: 600; fill: var(--ink);
}
.dg-mono-muted {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10px; fill: var(--muted);
  letter-spacing: 0.12em;
}
.dg-mono-small {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11.5px; fill: var(--sub);
}

/* =========================================================
   SYSTEM
   ========================================================= */
.system {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.system:first-of-type { border-top: none; padding-top: 0; }
.system:last-of-type { padding-bottom: 0; }

.system-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: start;
}

.system-num {
  font-size: 12px; color: var(--muted);
  letter-spacing: 0.18em;
  margin-bottom: 12px;
}
.system-tag {
  display: inline-block;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 4px;
  background: var(--indigo-soft);
  color: var(--indigo);
  margin-bottom: 16px;
}
.system-name {
  font-size: 28px; font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.system-blurb {
  margin-top: 14px;
  font-size: 15px;
  color: var(--sub);
  line-height: 1.65;
  max-width: 540px;
}

.system-spec {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}
.system-spec > div {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.system-spec dt {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  padding-top: 2px;
}
.system-spec dd { color: var(--ink); }
.system-spec dd.mono { font-size: 12.5px; color: var(--sub); }

.system-modules {
  margin-top: 22px;
  display: grid;
  gap: 6px;
}
.module {
  font-size: 13.5px;
  color: var(--ink);
  padding: 6px 0;
  border-bottom: 1px dashed var(--line);
}
.module .mono {
  color: var(--muted);
  font-size: 11px;
  margin-right: 10px;
  letter-spacing: 0.06em;
}

/* DIAGRAM column */
.system-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  overflow: hidden;
}
.diag-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-alt);
}
.diag-head .mono {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--sub);
}

.diag-svg {
  width: 100%; height: auto;
  padding: 16px;
}
.d-node-light rect { fill: #fff; stroke: var(--line-2); }
.d-node-light text { font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace; font-size: 11px; fill: var(--sub); }
.d-node rect { fill: #F8FAFC; stroke: var(--ink-2); stroke-width: 1.2; }
.d-node text { font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif; font-size: 13px; fill: var(--ink); font-weight: 600; }
.d-foundation rect { fill: var(--bg-3); stroke: var(--line-2); }

/* 4-layer architecture stack (legacy, kept) */
.d-layer-users rect { fill: #fff; stroke: var(--line-2); }
.d-layer-products rect { fill: #fff; stroke: var(--ink-2); stroke-width: 1.2; transition: fill 0.2s ease, stroke 0.2s ease; }
.system-diagram:hover .d-layer-products rect { fill: #EEF2FF; stroke: var(--indigo); }
.d-layer-backend rect { fill: var(--ink); stroke: var(--ink); }
.d-layer-infra rect { fill: var(--bg-3); stroke: var(--line-2); }

/* Design-flow steps (new) */
.d-step-light rect { fill: #fff; stroke: var(--line-2); transition: stroke 0.2s ease; }
.d-step-light:hover rect { stroke: var(--ink-2); }
.d-step-dark rect { fill: var(--ink); stroke: var(--ink); }
.step-num {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 22px; font-weight: 600;
  fill: var(--muted);
}
.step-num-inv {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 22px; font-weight: 600;
  fill: rgba(255,255,255,0.4);
}
.step-name {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 15px; font-weight: 700;
  fill: var(--ink);
}
.step-name-inv {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 15px; font-weight: 700;
  fill: #fff;
}
.step-desc {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 12.5px;
  fill: var(--sub);
}
.step-desc-inv {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 12.5px;
  fill: rgba(255,255,255,0.7);
}

.layer-label {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 9.5px; letter-spacing: 0.16em;
  fill: var(--muted);
}
.layer-label-inv {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 9.5px; letter-spacing: 0.16em;
  fill: rgba(255,255,255,0.5);
}
.layer-content {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 12px; fill: var(--ink); font-weight: 500;
}
.layer-content-inv {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10.5px; fill: rgba(255,255,255,0.55);
}
.layer-sub {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10px; fill: var(--muted);
}
.prod-name {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 13px; fill: var(--ink); font-weight: 600;
}
.prod-sub {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10px; fill: var(--sub);
}
.backend-main {
  font-family: 'Pretendard Variable', Inter, "Noto Sans SC","Noto Sans Arabic",sans-serif;
  font-size: 13.5px; fill: #fff; font-weight: 600;
}
.found-mono {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px; fill: var(--muted);
  letter-spacing: 0.18em;
}
.found-sub {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px; fill: var(--sub);
}

/* pipeline table */
.pipeline { padding: 6px 16px 18px; }
.p-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.3fr 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  align-items: center;
}
.p-header {
  border-bottom: 1px solid var(--ink);
  color: var(--muted);
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10.5px;
  letter-spacing: 0.12em;
}
.p-stage {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
}
.p-result {
  background: var(--bg-alt);
  border-bottom: none;
  padding: 12px 8px;
  border-radius: 4px;
  margin-top: 6px;
  grid-template-columns: 1.2fr 3.3fr;
}
.p-result .mono { color: var(--indigo); }

/* Research list */
.diag-light { background: #fff; }
.research-list { padding: 14px 18px 20px; }
.research-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.research-list li:last-child { border-bottom: none; }
.rl-tag {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 6px;
}
.rl-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.rl-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--sub);
}

/* =========================================================
   CAPABILITIES TABLE
   ========================================================= */
.cap-table {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.cap-row {
  display: grid;
  grid-template-columns: 240px 1fr 130px;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
  font-size: 13.5px;
  transition: background 0.15s ease;
}
.cap-row:last-child { border-bottom: none; }
.cap-row:not(.cap-head):hover { background: var(--bg-alt); }
.cap-head {
  background: var(--bg-alt);
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding: 12px 24px;
}
.cap-area { font-weight: 600; color: var(--ink); }
.cap-desc { color: var(--sub); line-height: 1.55; }
.cap-depth {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-align: right;
  color: var(--indigo);
  font-weight: 600;
}

/* =========================================================
   INFRA
   ========================================================= */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.infra-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: #fff;
}
.infra-num {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 10px;
}
.infra-card h3 {
  font-size: 19px; font-weight: 700;
  color: var(--ink);
}
.infra-card p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.6;
}
.infra-bullets {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid; gap: 6px;
}
.infra-bullets li {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 12px;
  color: var(--sub);
}
.infra-bullets li::before {
  content: '·';
  color: var(--indigo);
  margin-right: 8px;
  font-weight: 700;
}

.infra-callout {
  margin-top: 28px;
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 28px;
  align-items: center;
}
.callout-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.callout-body {
  font-size: 14.5px;
  line-height: 1.6;
  color: #E2E8F0;
}
.callout-body strong { color: #fff; }

/* =========================================================
   PRINCIPLES
   ========================================================= */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
}
.principle {
  padding: 28px 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.principle:nth-child(2n) { border-right: none; }
.principle:nth-last-child(-n+2) { border-bottom: none; }
.p-mono {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.principle h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.principle p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.65;
}
.principle p strong { color: var(--ink); font-weight: 600; }

/* =========================================================
   STACK
   ========================================================= */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stack-col {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: #fff;
}
.stack-head {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.stack-col ul { display: grid; gap: 8px; }
.stack-col li {
  font-size: 13.5px;
  color: var(--ink);
  display: flex; justify-content: space-between; align-items: center;
}
.stack-col li .mono {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

/* =========================================================
   TIMELINE
   ========================================================= */
.timeline {
  border-left: 1px solid var(--line);
  padding-left: 28px;
  display: grid; gap: 28px;
}
.timeline li {
  position: relative;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 4px;
  width: 10px; height: 10px;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 50%;
}
.t-mono {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.t-title {
  margin-top: 4px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.t-sub {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--sub);
}

/* =========================================================
   CONTACT
   ========================================================= */
.section-contact { border-bottom: none; }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: #fff;
  display: grid; gap: 8px;
  position: relative;
  transition: all 0.15s ease;
}
.contact-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}
.cc-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.cc-value {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.cc-arrow {
  position: absolute;
  right: 24px; top: 24px;
  color: var(--muted);
  font-size: 18px;
  transition: transform 0.15s ease, color 0.15s ease;
}
.contact-card:hover .cc-arrow {
  color: var(--ink);
  transform: translate(2px, -2px);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
  background: var(--ink);
  color: #fff;
  padding: 36px 0;
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.footer-name {
  font-size: 16px;
  font-weight: 700;
}
.footer-sub {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 4px;
}
.footer-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* =========================================================
   REVEAL
   ========================================================= */
.reveal-init {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   DESIGN ENHANCEMENTS — added in v2.1
   ========================================================= */

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 2px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.scroll-progress-fill {
  height: 100%; width: 0%;
  background: var(--rainbow);
  transition: width 0.08s linear;
}

/* dot-pulse — kept for backwards compatibility, no actual animation */
.dot-emerald.dot-pulse { position: relative; }

/* Aurora glow in hero */
.hero::after {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px; height: 600px;
  background:
    radial-gradient(ellipse 60% 50% at 30% 50%, rgba(79,70,229,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 55% 45% at 70% 40%, rgba(16,185,129,0.08) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}

/* big number watermark for systems */
.system {
  position: relative;
}
.system-watermark {
  position: absolute;
  top: -10px;
  left: -20px;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 180px;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15,23,42,0.06);
  letter-spacing: -0.05em;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}
.system-grid { position: relative; z-index: 1; }

/* hover state on diagram nodes */
.d-node rect { transition: fill 0.18s ease, stroke 0.18s ease; }
.system-diagram:hover .d-node rect { fill: #EEF2FF; stroke: var(--indigo); }
.d-node-light rect { transition: stroke 0.18s ease; }

/* Corner accent line on cards */
.system-diagram { position: relative; }
.system-diagram::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 32px; height: 32px;
  border-top: 2px solid var(--indigo);
  border-left: 2px solid var(--indigo);
  border-top-left-radius: var(--radius-lg);
  pointer-events: none;
}

/* outcome cards — number badge + hover */
.outcome {
  position: relative;
  overflow: hidden;
}
.outcome::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--indigo), var(--emerald));
  transition: width 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.outcome:hover::after { width: 100%; }
.outcome:hover { transform: translateY(-2px); transition: transform 0.18s ease, border-color 0.18s ease; }

/* color-coded depth badges */
.cap-depth {
  display: inline-flex; align-items: center; gap: 6px;
  justify-content: flex-end;
}
.cap-depth::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}
.cap-row[data-depth="ship-ready"] .cap-depth { color: var(--indigo); }
.cap-row[data-depth="ship-ready"] .cap-depth::before {
  background: var(--indigo);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
}
.cap-row[data-depth="delivered"] .cap-depth { color: var(--slate); }
.cap-row[data-depth="delivered"] .cap-depth::before {
  background: var(--slate);
  box-shadow: 0 0 0 3px rgba(100,116,139,0.15);
}
.cap-row:hover { position: relative; }
.cap-row:not(.cap-head) {
  position: relative;
}
.cap-row:not(.cap-head)::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 0%;
  background: var(--indigo);
  transition: height 0.2s ease;
}
.cap-row:not(.cap-head):hover::before { height: 60%; }

/* Live metrics row for Infrastructure */
.metrics-row {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  background: #fff;
  position: relative;
  overflow: hidden;
}
.metric-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(79,70,229,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.metric-label {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.14em;
}
.metric-value {
  margin-top: 8px;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1;
}
.metric-unit {
  font-size: 14px;
  color: var(--muted);
  margin-left: 4px;
  font-weight: 500;
}
.metric-sub {
  margin-top: 8px;
  font-size: 12px;
  color: var(--sub);
}

/* Terminal block */
.terminal {
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #0B0F1A;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 12.5px;
  line-height: 1.7;
  overflow: hidden;
}
.terminal-bar {
  background: #11172A;
  padding: 8px 14px;
  border-bottom: 1px solid #1E293B;
  display: flex; align-items: center; gap: 10px;
}
.term-dot {
  width: 10px; height: 10px; border-radius: 50%;
}
.term-dot.r { background: #FF5F57; }
.term-dot.y { background: #FEBC2E; }
.term-dot.g { background: #28C840; }
.terminal-bar-name {
  margin-left: 8px;
  font-size: 11px;
  color: #64748B;
  letter-spacing: 0.04em;
}
.terminal-body {
  padding: 16px 20px;
  color: #E2E8F0;
}
.term-line { display: block; }
.term-prompt { color: #10B981; margin-right: 8px; }
.term-cmd { color: #E2E8F0; }
.term-out { color: #94A3B8; }
.term-ok { color: #10B981; }
.term-arrow { color: #818CF8; }
.term-tag { color: #FBBF24; }
.term-caret {
  display: inline-block;
  width: 7px; height: 14px;
  background: #10B981;
  vertical-align: -2px;
  animation: blink 1s steps(2) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Subtle dot pattern bg on alt sections (overrides section-alt) */
.section-alt {
  background-color: var(--bg-alt);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(15,23,42,0.06) 1px, transparent 0);
  background-size: 22px 22px;
}

/* Section icon */
.section-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.section-icon-box {
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  color: var(--ink);
}
.section-icon-box svg { width: 14px; height: 14px; stroke-width: 1.5; }
.section-icon .eyebrow { margin-bottom: 0; }

/* Timeline "current" marker */
.timeline li.t-current::before {
  background: var(--emerald);
  border-color: var(--emerald);
  animation: pulseDot 2.2s ease-out infinite;
}
.timeline li.t-current .t-mono { color: var(--emerald); font-weight: 600; }
.t-current-pill {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 10px;
  padding: 2px 8px; border-radius: 999px;
  background: var(--emerald-soft);
  color: #047857;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 9.5px;
  letter-spacing: 0.12em;
  vertical-align: middle;
}

/* Principles — refined */
.principle {
  position: relative;
  transition: background 0.18s ease;
}
.principle:hover { background: var(--bg-alt); }
.principle-icon {
  width: 32px; height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--indigo);
  margin-bottom: 14px;
  background: #fff;
}
.principle-icon svg { width: 16px; height: 16px; stroke-width: 1.5; }

/* Stack — column icon header */
.stack-head {
  display: flex; align-items: center; justify-content: space-between;
}
.stack-head-icon {
  width: 20px; height: 20px;
  color: var(--muted);
}
.stack-head-icon svg { width: 100%; height: 100%; stroke-width: 1.5; }
.stack-col li {
  position: relative;
  padding: 4px 0;
  transition: padding 0.18s ease;
}
.stack-col li:hover {
  padding-left: 8px;
}
.stack-col li:hover::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 14px;
  background: var(--indigo);
  border-radius: 2px;
}

/* Back-to-top */
.back-top {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease, border-color 0.18s ease;
  z-index: 60;
  color: var(--ink);
  box-shadow: 0 6px 20px -8px rgba(15,23,42,0.15);
}
.back-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-top:hover { border-color: var(--ink); }
.back-top svg { width: 14px; height: 14px; stroke-width: 2; }

/* Featured callout in Systems */
.featured-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--bg-alt);
  border-radius: var(--radius);
  margin-bottom: 32px;
  font-size: 12.5px;
}
.featured-banner .mono {
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.14em;
}
.featured-banner-text {
  color: var(--sub);
}
.featured-banner-text strong { color: var(--ink); font-weight: 600; }

/* Stat micro-row inside system spec */
.system-stat-row {
  margin-top: 20px;
  display: flex;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.system-stat {
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
}
.system-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}
.system-stat-label {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* Pull quote in Approach */
.pull-quote {
  margin: 48px auto 0;
  max-width: 760px;
  padding: 28px 32px;
  border-left: 3px solid var(--ink);
  background: #fff;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
  position: relative;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.pull-quote::before {
  content: '"';
  position: absolute;
  top: 8px; left: 20px;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 60px;
  color: var(--line-2);
  line-height: 1;
}
.pull-quote-body { padding-left: 36px; }
.pull-quote-author {
  margin-top: 14px;
  padding-left: 36px;
  font-family: 'JetBrains Mono', "Noto Sans Arabic","Noto Sans SC", monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
}

/* footer avatar */
.footer-id {
  display: flex; align-items: center; gap: 14px;
}
.footer-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: #1E293B;
  border: 1px solid rgba(255,255,255,0.1);
}

/* =========================================================
   STATUS LINE (replaces status pill — less corporate)
   ========================================================= */
.status-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--sub);
  margin-bottom: 28px;
  padding: 6px 0;
}
.status-line .dot { width: 8px; height: 8px; }

/* infra footer note */
.infra-foot {
  margin-top: 24px;
  padding: 16px 20px;
  border-left: 3px solid var(--ink);
  background: var(--bg-alt);
  color: var(--sub);
  font-size: 14px;
  line-height: 1.6;
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* =========================================================
   DELIVERABLE STRIP (in hero)
   ========================================================= */
.deliverable-strip {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(248,250,252,0.6));
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}
.ds-label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--muted);
}
.ds-divider {
  width: 1px; height: 14px;
  background: var(--line-2);
}
.ds-item {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.ds-dot { color: var(--line-2); font-weight: 400; }

/* =========================================================
   ENGAGEMENT CARDS
   ========================================================= */
.eng-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.eng-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px 22px;
  background: #fff;
  display: flex; flex-direction: column;
  transition: border-color 0.18s ease, transform 0.18s ease;
  overflow: hidden;
}
.eng-card:hover { border-color: var(--ink-2); transform: translateY(-2px); }
.eng-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 0%;
  background: var(--indigo);
  transition: height 0.25s ease;
}
.eng-card:hover::before { height: 100%; }
.eng-num {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.12em;
  margin-bottom: 8px;
}
.eng-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.eng-card p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--sub);
  line-height: 1.6;
  flex: 1;
}
.eng-tags {
  margin-top: 16px;
  display: flex; flex-wrap: wrap; gap: 5px;
}
.eng-tag {
  display: inline-flex; align-items: center;
  padding: 3px 8px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  background: var(--bg-alt);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.eng-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* Featured engagement card (FLAGSHIP) */
.eng-card-featured {
  background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
  border-color: var(--ink);
  color: #fff;
}
.eng-card-featured .eng-num { color: rgba(255,255,255,0.5); }
.eng-card-featured h3 { color: #fff; }
.eng-card-featured p { color: rgba(226,232,240,0.85); }
.eng-card-featured .eng-tag {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #E2E8F0;
}
.eng-card-featured .eng-foot {
  border-top-color: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.5);
}
.eng-card-featured::before { background: var(--emerald); }
.eng-card-featured:hover { transform: translateY(-2px); border-color: var(--emerald); }
.eng-badge {
  position: absolute;
  top: 22px; right: 22px;
  padding: 3px 8px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  background: var(--emerald);
  color: #052e16;
  border-radius: 4px;
  font-weight: 700;
}

.eng-note {
  margin-top: 24px;
  padding: 14px 18px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-alt);
  display: flex; align-items: center; gap: 14px;
  font-size: 13px;
  color: var(--sub);
}
.eng-note .mono {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink);
  font-weight: 700;
}

/* =========================================================
   HERO ENTRANCE + COUNT-UP (v2.2)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .hero .status-line { animation: heroIn .7s cubic-bezier(.2,.8,.2,1) both .05s; }
  .hero-title        { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) both .12s; }
  .hero-sub-lead     { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) both .20s; }
  .hero .hero-sub:not(.hero-sub-lead) { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) both .28s; }
  .hero-actions      { animation: heroIn .8s cubic-bezier(.2,.8,.2,1) both .42s; }
}
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* hero two-column layout + rainbow accents */
.hero-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 52px;
  align-items: center;
}
.hero-copy { min-width: 0; }
.hero-media { justify-self: center; width: 100%; max-width: 360px; }
.hp-frame {
  position: relative;
  border-radius: 22px;
  padding: 4px;
  background: var(--rainbow);
  box-shadow: 0 28px 64px -30px rgba(15, 23, 42, 0.45);
}
.hp-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 18px;
  background: #fff;
}
.hero-title .grad {
  background: var(--rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-media { animation: heroIn 0.9s cubic-bezier(.2,.8,.2,1) both 0.3s; }
}

.metric-value .count { display: inline-block; }
.metric-value.pop { animation: metricPop .45s cubic-bezier(.2,.8,.2,1); }
@keyframes metricPop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-sub { display: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-media { order: -1; justify-self: start; max-width: 240px; }
  .hero-outcomes { grid-template-columns: 1fr; }
  .system-grid { grid-template-columns: 1fr; gap: 28px; }
  .cap-row { grid-template-columns: 1fr; gap: 6px; padding: 14px 16px; }
  .cap-row.cap-head { display: none; }
  .cap-depth { text-align: left; }
  .infra-grid { grid-template-columns: 1fr; }
  .infra-callout { grid-template-columns: 1fr; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle { border-right: none; }
  .principle:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section h2 { font-size: 26px; }
}
@media (max-width: 960px) {
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .system-watermark { display: none; }
  .back-top { right: 16px; bottom: 16px; }
  .eng-grid { grid-template-columns: 1fr 1fr; }
  .deliverable-strip { border-radius: 12px; }
}
@media (max-width: 640px) {
  .eng-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-cta .btn-ghost { display: none; }
  .stack-grid { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 40px; }
  .hero-diagram { display: none; }
  .metrics-row { grid-template-columns: 1fr; }
  .terminal { font-size: 11px; }
}
