:root {
  --bg: #05070d;
  --bg2: #0a0f1c;
  --panel: rgba(13, 20, 36, .66);
  --line: rgba(148, 178, 230, .12);
  --line2: rgba(148, 178, 230, .22);
  --text: #eaf1fb;
  --muted: #8e9cb6;
  --cyan: #4fe3ff;
  --violet: #9b7bff;
  --lime: #b6f35a;
  --pink: #ff6f8f;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: 'Inter Tight', Inter, system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--violet); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--cyan); color: #000; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 16px; }
.mono { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.grad { background: linear-gradient(100deg, var(--cyan), var(--violet) 55%, var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Ambient background */
#field { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -2; }
.grain {
  position: fixed; inset: -50%; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Nav */
.nav {
  position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1180px, calc(100% - 32px));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 12px 10px 16px; border-radius: 18px;
  background: rgba(8, 12, 22, .55); border: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(8, 12, 22, .82); border-color: var(--line2); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .12em; font-size: 14px; }
.logo svg { width: 32px; height: 32px; }
.logo b { color: var(--cyan); font-weight: 800; }
.nav nav { display: flex; gap: 4px; }
.nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 10px; transition: color .2s, background .2s; }
.nav nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }

/* Hero */
main { position: relative; }
.hero { max-width: 1180px; margin: 0 auto; padding: 170px 24px 70px; }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; display: flex; align-items: center; gap: 10px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgba(182, 243, 90, .6); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(182, 243, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(182, 243, 90, 0); } }
.headline { font-size: clamp(44px, 8.4vw, 118px); line-height: .95; letter-spacing: -.045em; font-weight: 800; margin: 0 0 28px; }
.headline .line { display: block; overflow: hidden; padding-bottom: .06em; }
.headline .word { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.headline.in .word { transform: none; }
.lede { max-width: 640px; font-size: clamp(17px, 1.6vw, 20px); color: #b7c3d9; margin: 0 0 34px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 15px var(--font); padding: 13px 20px; border-radius: 14px; border: 1px solid var(--line2);
  color: var(--text); background: rgba(255, 255, 255, .03); transition: transform .25s var(--ease), box-shadow .25s, background .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .3); }
.btn.primary { background: linear-gradient(110deg, #c6ff6a, var(--lime)); color: #0b1405; border-color: transparent; }
.btn.primary:hover { box-shadow: 0 10px 40px -8px rgba(182, 243, 90, .55); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 70px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stats div { background: rgba(7, 11, 20, .85); padding: 22px 24px; }
.stats dt { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 6px 0 0; font-size: clamp(30px, 3.6vw, 46px); font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* Marquee */
.marquee { border-block: 1px solid var(--line); overflow: hidden; padding: 18px 0; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.track { display: flex; gap: 46px; width: max-content; animation: marquee 40s linear infinite; }
.track span { font: 500 14px var(--mono); color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 46px; }
.track span::after { content: '✦'; color: var(--violet); opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Work */
.work, .principles, .contact { max-width: 1180px; margin: 0 auto; padding: 110px 24px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
h2 { font-size: clamp(38px, 5.4vw, 72px); letter-spacing: -.04em; line-height: 1; margin: 0; font-weight: 800; }
.search { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; min-width: min(320px, 100%); transition: border-color .2s; }
.search:focus-within { border-color: var(--cyan); }
.search svg { width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { background: none; border: 0; color: var(--text); font: 15px var(--font); padding: 13px 0; width: 100%; outline: none; }
.controls { flex: 1; display: flex; justify-content: flex-end; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { font: 500 13px var(--font); padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--muted); cursor: pointer; transition: all .2s; }
.chip:hover { color: var(--text); border-color: var(--line2); }
.chip[aria-pressed="true"] { color: #05070d; background: var(--text); border-color: var(--text); }
.chip .n { opacity: .55; margin-left: 4px; font-family: var(--mono); font-size: 11px; }

.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.card {
  --mx: 50%; --my: 50%; --accent: var(--cyan);
  grid-column: span 2; position: relative; text-align: left; cursor: pointer; color: inherit; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transform-style: preserve-3d; transition: border-color .3s, transform .5s var(--ease), opacity .6s var(--ease);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card.feature { grid-column: span 3; }
.card::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 22%, transparent), transparent 60%);
}
.card::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(300px circle at var(--mx) var(--my), var(--accent), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.card:hover::before, .card:hover::after, .card:focus-within::before { opacity: 1; }
.card:hover { border-color: transparent; }
.shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b1120; border-bottom: 1px solid var(--line); }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.02); transition: transform 1.2s var(--ease), filter .6s; filter: saturate(.92); }
.card:hover .shot img { transform: scale(1.07); filter: saturate(1.1); }
.shot::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5, 7, 13, .75)); }
.shot.code { display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 60%), #070b15; }
.shot.code pre { margin: 0; font: 12px/1.7 var(--mono); color: #a9b7d0; padding: 20px; width: 100%; white-space: pre-wrap; }
.shot.code pre b { color: var(--accent); font-weight: 500; }
.cbody { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; position: relative; z-index: 3; }
.ctop { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h3 { font-size: 22px; letter-spacing: -.02em; margin: 0; font-weight: 700; }
.card.feature h3 { font-size: 28px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; }
.tag { font: 500 11px var(--mono); padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: #b4c1d8; }
.badge { font: 600 10px var(--mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 9px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border: 1px solid; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.badge.live { color: var(--lime); border-color: rgba(182, 243, 90, .35); }
.badge.demo { color: var(--cyan); border-color: rgba(79, 227, 255, .35); }
.badge.prototype { color: #ffc35a; border-color: rgba(255, 195, 90, .35); }
.arrow { position: absolute; right: 18px; top: 18px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(5, 7, 13, .7); border: 1px solid var(--line2); opacity: 0; transform: translate(-6px, 6px); transition: all .35s var(--ease); backdrop-filter: blur(8px); }
.card:hover .arrow, .card:focus-within .arrow { opacity: 1; transform: none; }
.cardlink { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cardlink:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* Projects taking real payments */
.livebox { position: absolute; top: 14px; left: 14px; z-index: 4; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 9px; background: var(--lime); color: #071006; font: 800 12px var(--mono); letter-spacing: .16em; box-shadow: 0 6px 24px rgba(182, 243, 90, .45); pointer-events: none; }
.livebox .dot { width: 8px; height: 8px; border-radius: 50%; background: #071006; animation: livepulse 1.6s ease-in-out infinite; }
@keyframes livepulse { 50% { opacity: .25; } }
.card.paid { border-color: rgba(182, 243, 90, .45); }
.golive { position: relative; z-index: 4; display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0 22px 22px; padding: 13px 16px; border-radius: 12px; background: rgba(182, 243, 90, .12); border: 1px solid rgba(182, 243, 90, .45); color: var(--lime); font-weight: 700; text-decoration: none; transition: background .25s, transform .25s; overflow-wrap: anywhere; }
.golive:hover, .golive:focus-visible { background: var(--lime); color: #071006; transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .livebox .dot { animation: none; } }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }
.card.hide { display: none; }

/* Reveal */
.reveal, .card { opacity: 0; transform: translateY(26px); }
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in, .card.in { opacity: 1; transform: none; }

/* Principles */
.principles h2 { margin-bottom: 34px; }
.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pcard { padding: 26px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.pnum { font: 500 12px var(--mono); color: var(--cyan); }
.pcard h3 { font-size: 21px; margin: 40px 0 8px; letter-spacing: -.02em; }
.pcard p { margin: 0; color: var(--muted); font-size: 15px; }

/* Contact */
.contact { padding-bottom: 110px; }
.contact-card { position: relative; overflow: hidden; border-radius: 30px; padding: clamp(36px, 6vw, 80px); border: 1px solid var(--line2); background: radial-gradient(circle at 85% 10%, rgba(155, 123, 255, .25), transparent 45%), radial-gradient(circle at 10% 100%, rgba(79, 227, 255, .18), transparent 45%), var(--bg2); }
.contact-card p { color: #b7c3d9; max-width: 560px; font-size: 18px; margin: 18px 0 30px; }
.foot { max-width: 1180px; margin: 0 auto; padding: 30px 24px 40px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }

/* Detail dialog */
dialog { width: min(1180px, calc(100% - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 1px solid var(--line2); border-radius: 26px; background: #070b15; color: var(--text); overflow: hidden; }
dialog::backdrop { background: rgba(2, 4, 9, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
dialog[open] { animation: pop .45s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.d-inner { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); max-height: calc(100vh - 24px); }
.d-close { position: absolute; right: 16px; top: 16px; z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(5, 7, 13, .8); color: var(--text); cursor: pointer; font-size: 15px; }
.d-media { position: relative; padding: 34px; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent, #4fe3ff) 22%, transparent), transparent 60%), #0a1020; display: flex; align-items: center; overflow: hidden; min-height: 420px; }
.browser { margin: 0; width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line2); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); background: #0b1120; }
.chrome { display: flex; align-items: center; gap: 6px; padding: 10px 12px; background: #0e1526; border-bottom: 1px solid var(--line); }
.chrome i { width: 10px; height: 10px; border-radius: 50%; background: #2a3550; }
.chrome i:nth-child(1) { background: #ff5f57; } .chrome i:nth-child(2) { background: #febc2e; } .chrome i:nth-child(3) { background: #28c840; }
.chrome span { margin-left: 10px; font: 11px var(--mono); color: var(--muted); background: #070b15; padding: 4px 12px; border-radius: 6px; flex: 1; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone { position: absolute; right: 22px; bottom: -40px; width: 30%; max-width: 190px; margin: 0; border-radius: 30px; padding: 7px; background: #0e1526; border: 1px solid var(--line2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9); }
.phone img { border-radius: 24px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.d-body { padding: 40px 36px; overflow-y: auto; }
.d-code { margin: 0; width: 100%; font: 14px/1.9 var(--mono); color: #b4c1d8; background: rgba(5, 7, 13, .6); border: 1px solid var(--line2); border-radius: 14px; padding: 24px; white-space: pre-wrap; }
.d-code b { color: var(--accent, var(--cyan)); font-weight: 500; }
.d-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.d-body h2 { font-size: clamp(32px, 3.4vw, 46px); }
.d-tag { font-size: 19px; color: #c9d4e8; margin: 10px 0 18px; }
.d-body > p { color: var(--muted); }
.d-body h3 { font: 500 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 26px 0 12px; }
.d-feat { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.d-feat li { display: flex; gap: 10px; align-items: baseline; }
.d-feat li::before { content: ''; width: 6px; height: 6px; flex: none; border-radius: 2px; background: var(--accent, var(--cyan)); transform: translateY(-2px); }
.d-stack { display: flex; gap: 6px; flex-wrap: wrap; }
#d-cta { margin-top: 28px; }
.d-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.d-nav .btn { padding: 10px 14px; font-size: 14px; }
.note { font-size: 13px; color: var(--muted); margin: 10px 0 0; }

/* Responsive */
@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card, .card.feature { grid-column: span 1; }
  .card.feature:first-child { grid-column: span 2; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .d-inner { grid-template-columns: minmax(0, 1fr); overflow-y: auto; }
  .d-body { overflow: visible; }
  .d-media { min-height: 0; padding: 26px 26px 60px; }
}
@media (max-width: 680px) {
  .nav nav a:not(:last-child) { display: none; }
  .hero { padding: 130px 16px 50px; }
  .work, .principles, .contact { padding: 80px 16px 0; }
  .contact { padding-bottom: 80px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 50px; }
  .bento, .pgrid { grid-template-columns: minmax(0, 1fr); }
  .card.feature:first-child { grid-column: span 1; }
  .controls { justify-content: stretch; }
  .search { min-width: 0; width: 100%; }
  .d-body { padding: 28px 20px; }
  .d-media { padding: 20px 20px 50px; }
  .phone { width: 34%; right: 14px; }
  .foot { padding: 26px 16px 34px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .card, .headline .word { opacity: 1; transform: none; }
}
