:root {
  --bg: #0b0f14;
  --bg-2: #10161d;
  --surface: #141b23;
  --border: #222c37;
  --text: #e6edf3;
  --muted: #94a3b3;
  --accent: #34d399;
  --accent-2: #38bdf8;
  --accent-ink: #052e1f;
  --radius: 14px;
  --sans: "Space Grotesk", system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px;
  font-weight: 600; font-size: 15px;
  border: 1px solid transparent;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { box-shadow: 0 10px 30px -10px rgba(52, 211, 153, .6); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 15, 20, .85); backdrop-filter: blur(12px); border-color: var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { font-family: var(--mono); font-weight: 700; font-size: 17px; }
.logo .prompt, .logo .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 15px; }
.nav-links a:not(.btn) { color: var(--muted); transition: color .2s; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; width: 32px; height: 32px; position: relative; }
.nav-toggle span { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--text); transition: .3s; }
.nav-toggle span:first-child { top: 11px; }
.nav-toggle span:last-child { top: 19px; }
.nav-toggle.open span:first-child { top: 15px; transform: rotate(45deg); }
.nav-toggle.open span:last-child { top: 15px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 140px 0 80px; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .35;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 65%);
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-family: var(--mono); color: var(--accent);
  padding: 6px 14px; border: 1px solid rgba(52,211,153,.3); border-radius: 999px;
  background: rgba(52,211,153,.06); margin-bottom: 24px;
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
h1 { font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.hl { color: var(--accent); position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 8px; background: rgba(52,211,153,.18); z-index: -1; }
.lead { color: var(--muted); font-size: 18px; margin: 22px 0 32px; max-width: 580px; }
.lead strong { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 36px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero-meta .k { color: var(--accent-2); margin-right: 6px; }

.hero-visual { position: relative; }
.photo-card {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid var(--border); background: var(--surface);
  max-width: 380px; margin-left: auto;
}
.photo-card img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.photo-tag {
  position: absolute; left: 14px; right: 14px; top: 14px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; padding: 10px 14px; border-radius: 10px;
  background: rgba(11,15,20,.82); backdrop-filter: blur(6px); border: 1px solid var(--border);
}
.photo-tag .ok { color: var(--accent); font-family: var(--mono); }

.arch-card {
  position: absolute; left: -40px; bottom: -40px; width: 330px;
  background: rgba(16,22,29,.95); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
}
.arch-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.arch-head span { width: 9px; height: 9px; border-radius: 50%; background: #3a4452; }
.arch-head em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 8px; }
.arch { width: 100%; height: auto; padding: 8px 10px 0; }
.arch .edge { fill: none; stroke: #3a4757; stroke-width: 1.5; }
.arch .edge.faint { stroke-dasharray: 3 4; }
.arch .arrow { fill: #3a4757; }
.arch .node rect { fill: var(--bg); stroke: #3a4757; }
.arch .node.accent rect { stroke: var(--accent); }
.arch .node.db rect { stroke: var(--accent-2); }
.arch .node text { fill: var(--text); font-family: var(--mono); font-size: 10.5px; text-anchor: middle; }
.arch .pkt { fill: var(--accent); filter: drop-shadow(0 0 4px rgba(52,211,153,.9)); }
.arch .pkt.b { fill: var(--accent-2); filter: drop-shadow(0 0 4px rgba(56,189,248,.9)); }
.arch-foot { display: flex; justify-content: space-between; padding: 8px 14px 12px; font-size: 10.5px; color: var(--muted); }
.arch-foot b { color: var(--accent); font-weight: 500; }

/* ---------- Trust ---------- */
.trust { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-2); padding: 26px 0; margin-top: 40px; }
.trust-label { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 14px; }
.trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 44px; }
.trust-list li { font-size: 20px; font-weight: 600; color: #b8c4d0; letter-spacing: -.01em; opacity: .85; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding-top: 72px; padding-bottom: 24px; }
.stat { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stat b { display: block; font-size: 40px; font-weight: 700; letter-spacing: -.03em; color: var(--accent); line-height: 1.1; }
.stat b[data-count]::after { content: "+"; }
.stat span { color: var(--muted); font-size: 14px; line-height: 1.5; display: block; margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow { display: inline-block; color: var(--accent); font-size: 13px; margin-bottom: 14px; }
h2 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
.section-head p { color: var(--muted); margin-top: 14px; }
h3 { font-size: 20px; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-size: 18px; letter-spacing: -.01em; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  padding: 28px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: border-color .25s, transform .25s;
}
.card:hover { border-color: rgba(52,211,153,.5); transform: translateY(-4px); }
.icon {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px;
  background: rgba(52,211,153,.1); color: var(--accent); font-family: var(--mono); font-weight: 700; font-size: 18px;
  margin-bottom: 18px;
}
.card p { color: var(--muted); font-size: 15px; margin: 10px 0 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 11.5px; padding: 4px 10px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); color: #b8c4d0; }

/* ---------- Approach ---------- */
.approach { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.approach-story p { color: var(--muted); margin-top: 18px; }
.approach-story em { color: var(--text); }
.quote {
  margin-top: 28px; padding: 18px 20px; border-radius: 10px; font-size: 14px;
  background: var(--bg); border: 1px solid var(--border); border-left: 3px solid var(--accent); color: var(--text);
}
.quote .c { color: var(--muted); }
.principles { display: grid; gap: 14px; }
.principle { display: flex; gap: 18px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.principle .num { color: var(--accent-2); font-size: 13px; padding-top: 3px; }
.principle p { color: var(--muted); font-size: 15px; margin-top: 6px; }

/* ---------- Work ---------- */
.work { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.project {
  padding: 30px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  position: relative; overflow: hidden; transition: border-color .25s;
}
.project::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: 0; transition: opacity .25s;
}
.project:hover { border-color: #33414f; }
.project:hover::before { opacity: 1; }
.project-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.kind { font-size: 12px; color: var(--muted); }
.badge { font-family: var(--mono); font-size: 11px; color: var(--accent); border: 1px solid rgba(52,211,153,.35); padding: 3px 10px; border-radius: 999px; }
.project p { color: var(--muted); font-size: 15px; margin: 10px 0 18px; }

/* ---------- Stack ---------- */
.stack { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.stack-row { display: grid; grid-template-columns: 160px 1fr; gap: 20px; padding: 18px 24px; border-bottom: 1px solid var(--border); align-items: center; }
.stack-row:last-child { border-bottom: 0; }
.stack-row .k { color: var(--accent-2); font-size: 13px; }
.stack-row div { display: flex; flex-wrap: wrap; gap: 8px; }
.stack-row div span { font-size: 14px; padding: 5px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 780px; padding-left: 28px; border-left: 1px solid var(--border); }
.timeline li { position: relative; padding-bottom: 40px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -34px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.when { font-size: 12.5px; color: var(--accent); }
.timeline h4 { margin-top: 6px; }
.where { color: var(--accent-2); font-size: 14px; margin-top: 2px; }
.timeline p:not(.where) { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Relationship ---------- */
.relationship { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.relationship > div > p { color: var(--muted); margin-top: 16px; }
.promises { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.promise { padding: 22px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.promise b { display: block; font-size: 16px; }
.promise b::before { content: "✓ "; color: var(--accent); }
.promise p { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* ---------- Contact ---------- */
.contact-box {
  text-align: center; padding: 64px 32px; border-radius: 22px; border: 1px solid var(--border);
  background:
    radial-gradient(ellipse at top, rgba(52,211,153,.12), transparent 60%),
    var(--surface);
}
.contact-box h2 { max-width: 720px; margin: 0 auto; }
.contact-box > p { color: var(--muted); margin: 16px auto 32px; max-width: 520px; }
.contact-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.contact-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 36px; font-size: 13px; color: var(--muted); }
.contact-links a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 28px 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner, .approach, .relationship { grid-template-columns: 1fr; }
  .hero-visual { max-width: 420px; margin: 0 auto 60px; }
  .photo-card { margin: 0 auto; }
  .arch-card { left: 50%; transform: translateX(-50%); bottom: -60px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 20px;
    transform: translateY(-120%); transition: transform .3s; z-index: -1;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav-links .btn { margin-top: 14px; justify-content: center; border-bottom: 0; }
  .hero { padding-top: 110px; }
  .cards, .work, .promises { grid-template-columns: 1fr; }
  .stack-row { grid-template-columns: 1fr; gap: 10px; }
  .arch-card { width: 300px; }
  .section { padding: 72px 0; }
  .contact-box { padding: 48px 20px; }
  .hl { white-space: normal; }
}
