:root {
  --bg: #0b0a1a;
  --bg-2: #12102a;
  --surface: rgba(255, 255, 255, .045);
  --surface-2: rgba(255, 255, 255, .08);
  --line: rgba(255, 255, 255, .10);
  --text: #eceaff;
  --muted: #a9a6c8;
  --violet: #7c5cff;
  --blue: #4d7cff;
  --cyan: #22d3ee;
  --pink: #ff5cb8;
  --grad: linear-gradient(100deg, #8b6cff 0%, #4d9bff 55%, #22d3ee 100%);
  --radius: 22px;
  --ff-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --ff-body: "Inter", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 16.5px/1.65 var(--ff-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
svg { width: 1.2em; height: 1.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- background ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-orbs i { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.bg-orbs i:nth-child(1) { width: 560px; height: 560px; left: -140px; top: -120px; background: #5b3df5; animation: drift 22s ease-in-out infinite alternate; }
.bg-orbs i:nth-child(2) { width: 520px; height: 520px; right: -160px; top: 30vh; background: #0aa5c9; opacity: .35; animation: drift 28s ease-in-out infinite alternate-reverse; }
.bg-orbs i:nth-child(3) { width: 460px; height: 460px; left: 25vw; bottom: -200px; background: #c13cff; opacity: .28; animation: drift 25s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(60px, 50px) scale(1.12); } }

.glow-cursor {
  position: fixed; width: 460px; height: 460px; left: 0; top: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle, rgba(124, 92, 255, .20), transparent 65%);
  transform: translate(-50%, -50%); opacity: 0; transition: opacity .4s;
}

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 68px; padding: 0 clamp(18px, 5vw, 64px);
  display: flex; align-items: center; justify-content: space-between;
  transition: background .3s, border-color .3s, backdrop-filter .3s; border-bottom: 1px solid transparent;
}
.nav.scrolled { background: rgba(11, 10, 26, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 700 18px var(--ff-head); }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #0b0a1a; font-size: 14px; }
.links { display: flex; align-items: center; gap: 30px; }
.links a:not(.btn) { color: var(--muted); font-weight: 500; font-size: 15px; transition: color .2s; position: relative; }
.links a:not(.btn):hover, .links a.active { color: #fff; }
.links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--grad); border-radius: 2px; }
.burger { display: none; width: 44px; height: 44px; position: relative; }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: #fff; border-radius: 2px; transition: transform .25s, top .25s; }
.burger span:first-child { top: 17px; } .burger span:last-child { top: 25px; }
.burger[aria-expanded="true"] span:first-child { top: 21px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 999px;
  background: var(--grad); color: #0b0a1a; font: 600 15.5px var(--ff-body);
  box-shadow: 0 10px 34px -10px rgba(77, 124, 255, .75); transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -10px rgba(77, 155, 255, .9); }
.btn svg { transition: transform .2s; }
.btn:hover svg { transform: translateX(4px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-small { padding: 9px 20px; font-size: 14.5px; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh; padding: 120px clamp(18px, 5vw, 64px) 70px; max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); font-size: 14px; margin-bottom: 26px; }
.dot, .live { width: 8px; height: 8px; border-radius: 50%; background: #34e39a; box-shadow: 0 0 0 0 rgba(52, 227, 154, .6); animation: pulse 2s infinite; display: inline-block; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 227, 154, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 227, 154, 0); } }
h1 { font: 700 clamp(40px, 5.6vw, 76px)/1.04 var(--ff-head); letter-spacing: -.025em; }
.lead { margin: 26px 0 34px; color: var(--muted); font-size: clamp(17px, 1.5vw, 20px); max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 38px; }
.stack li, .pills li, .skills li {
  padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: #d6d3f5; font-size: 13.5px; font-weight: 500;
}

.hero-visual { position: relative; height: min(640px, 70vh); min-height: 460px; perspective: 1200px; }
.phone {
  position: absolute; border-radius: 11% / 5.2%; padding: 2.6%; background: linear-gradient(145deg, #2c2a4d, #0e0d20);
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 0 60px -10px rgba(124, 92, 255, .35);
  transition: transform .25s ease-out; will-change: transform;
}
.phone img { width: 100%; border-radius: 9% / 4.2%; background: #fff; }
.phone-front { --k: 20; width: 36%; left: 32%; top: 7%; z-index: 3; animation: float 7s ease-in-out infinite; }
.phone-back { --k: 10; --r: -7deg; width: 31%; left: 3%; top: 22%; z-index: 2; animation: float 8s ease-in-out -2s infinite; }
.phone-side { --k: 14; --r: 7deg; width: 31%; right: 1%; top: 28%; z-index: 2; animation: float 9s ease-in-out -4s infinite; }
@keyframes float { 50% { translate: 0 -16px; } }
.chip {
  position: absolute; z-index: 5; padding: 10px 16px; border-radius: 14px; font-size: 14px; color: var(--muted);
  background: rgba(20, 18, 44, .78); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); display: flex; align-items: center; gap: 8px; transition: transform .25s ease-out;
}
.chip b { color: #fff; font: 700 17px var(--ff-head); }
.chip-a { --k: 30; left: 0; top: 10%; } .chip-b { --k: 26; right: 6%; bottom: 8%; }
.hero-visual .phone, .hero-visual .chip { transform: translate3d(calc(var(--mx, 0) * var(--k) * 1px), calc(var(--my, 0) * var(--k) * 1px), 0) rotate(var(--r, 0deg)); }

/* ---------- numbers ---------- */
.numbers { max-width: 1100px; margin: 0 auto; padding: 10px clamp(18px, 5vw, 64px) 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.num { padding: 22px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.num b { display: block; font: 700 clamp(34px, 3.6vw, 48px)/1.1 var(--ff-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.num span { color: var(--muted); font-size: 14.5px; line-height: 1.4; display: block; margin-top: 4px; }

/* ---------- sections ---------- */
.section { max-width: 1280px; margin: 0 auto; padding: 100px clamp(18px, 5vw, 64px); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.kicker { color: var(--cyan); font: 600 13px var(--ff-body); letter-spacing: .16em; text-transform: uppercase; margin-bottom: 14px; }
h2 { font: 700 clamp(30px, 4vw, 52px)/1.1 var(--ff-head); letter-spacing: -.02em; }
.sub { color: var(--muted); margin-top: 16px; font-size: 18px; }
h3 { font: 600 22px/1.25 var(--ff-head); }

/* ---------- projects ---------- */
.project {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center;
  padding: clamp(24px, 4vw, 48px); border-radius: 32px; background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid var(--line); margin-bottom: 36px; overflow: hidden;
}
.project-flip .project-stage { order: -1; }
.project-title { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.project-title h3 { font-size: clamp(28px, 3vw, 38px); }
.tag { color: var(--muted); font-size: 14.5px; }
.app-icon { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 10px 30px -8px rgba(34, 211, 238, .5); }
.app-icon-ep { display: grid; place-items: center; background: linear-gradient(135deg, #2f6bff, #6ad1ff); font: 700 30px var(--ff-head); color: #fff; box-shadow: 0 10px 30px -8px rgba(47, 107, 255, .6); }
.project-info > p { color: #cfcce9; }
.pills, .skills { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.note { color: var(--muted) !important; font-size: 14px; margin-bottom: 22px; }
.checks { margin: 18px 0 8px; display: grid; gap: 9px; }
.checks li { position: relative; padding-left: 28px; color: #cfcce9; font-size: 15.5px; }
.checks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 8px; border-left: 2px solid var(--cyan); border-bottom: 2px solid var(--cyan); transform: rotate(-45deg) scale(.9); }

.feature-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.feature-tabs button {
  padding: 9px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line); transition: all .2s;
}
.feature-tabs button:hover { color: #fff; background: var(--surface-2); }
.feature-tabs button.on { color: #0b0a1a; background: var(--grad); border-color: transparent; font-weight: 600; }

.project-stage { position: relative; display: grid; justify-items: center; align-content: center; gap: 22px; min-height: 520px; }
.stage-glow { position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(124, 92, 255, .55), transparent 65%); filter: blur(40px); z-index: 0; top: 0; }
.stage-glow-b { background: radial-gradient(circle, rgba(34, 211, 238, .4), transparent 65%); }
.phone-stage { position: relative; width: min(290px, 70vw); z-index: 1; transform: rotate(2deg); }
.phone-stage img { aspect-ratio: 600 / 1277; object-fit: cover; transition: opacity .25s; }
.caption { position: relative; z-index: 1; text-align: center; max-width: 380px; min-height: 100px; }
.caption h4 { font: 600 19px var(--ff-head); margin-bottom: 6px; }
.caption p { color: var(--muted); font-size: 15px; }
.fade { opacity: 0 !important; }

.stage-web { min-height: 0; }
.browser { position: relative; z-index: 1; width: 100%; border-radius: 16px; overflow: hidden; background: #0e0d20; border: 1px solid var(--line); box-shadow: 0 40px 80px -24px rgba(0, 0, 0, .75), 0 0 80px -20px rgba(34, 211, 238, .25); }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #181634; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff6b81; }
.browser-bar i:nth-child(2) { background: #ffc44d; } .browser-bar i:nth-child(3) { background: #37d67a; }
.browser-bar span { margin-left: 12px; flex: 1; padding: 4px 14px; border-radius: 8px; background: rgba(255, 255, 255, .06); color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.browser-body { aspect-ratio: 1100 / 700; overflow: hidden; background: #f3f6ff; }
.browser-body img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: opacity .25s; }
.phone-mini { width: 128px; right: -4px; bottom: -34px; z-index: 2; transform: rotate(5deg); }
.stage-web .phone-mini { position: absolute; }

/* ---------- services ---------- */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { padding: 30px 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); transition: transform .3s, border-color .3s, background .3s; position: relative; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 92, 255, .22), transparent 70%); opacity: 0; transition: opacity .3s; }
.card:hover { transform: translateY(-6px); border-color: rgba(124, 92, 255, .5); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.ico { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(124, 92, 255, .3), rgba(34, 211, 238, .25)); margin-bottom: 20px; color: #fff; }
.ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 20px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 15.5px; }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; position: relative; }
.steps li { padding: 26px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-n { font: 700 44px/1 var(--ff-head); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; display: block; margin-bottom: 18px; }
.steps h3 { font-size: 20px; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 15.5px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.about-photo { position: relative; max-width: 420px; justify-self: center; width: 100%; }
.photo-frame { padding: 8px; border-radius: 34px; background: var(--grad); box-shadow: 0 30px 80px -20px rgba(77, 124, 255, .55); transform: rotate(-2deg); transition: transform .4s; }
.photo-frame:hover { transform: rotate(0); }
.photo-frame img { border-radius: 27px; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; }
.photo-badge { position: absolute; left: -14px; bottom: 28px; padding: 10px 18px; border-radius: 14px; font-size: 14px; background: rgba(20, 18, 44, .85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--line); }
.about-copy p { color: #cfcce9; margin-top: 18px; }
.about-copy h2 { margin-bottom: 6px; }
.skills { margin-top: 26px; }

/* ---------- contact ---------- */
.contact-box { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 5vw, 64px); padding: clamp(26px, 5vw, 60px); border-radius: 36px; background: radial-gradient(900px circle at 0% 0%, rgba(124, 92, 255, .28), transparent 60%), radial-gradient(700px circle at 100% 100%, rgba(34, 211, 238, .18), transparent 60%), var(--bg-2); border: 1px solid var(--line); }
.contact-copy > p:not(.kicker) { color: var(--muted); margin-top: 16px; }
.contact-links { margin-top: 28px; display: grid; gap: 12px; }
.contact-links a { display: inline-flex; align-items: center; gap: 12px; padding: 12px 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: background .2s, transform .2s; font-weight: 500; }
.contact-links a:hover { background: var(--surface-2); transform: translateX(4px); }
.contact-links svg { color: var(--cyan); }
.contact-form { display: grid; gap: 16px; align-content: start; }
.contact-form label { display: grid; gap: 7px; font-size: 14px; color: var(--muted); font-weight: 500; }
.contact-form input, .contact-form textarea { font: 400 16px var(--ff-body); color: var(--text); padding: 13px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: border-color .2s, background .2s; resize: vertical; }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: #6e6b92; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--violet); background: rgba(255, 255, 255, .08); }
.contact-form .btn { justify-self: start; }
.form-status { min-height: 1.4em; font-size: 14.5px; color: var(--muted); }
.form-status.err { color: #ff8aa0; }

.footer { max-width: 1280px; margin: 0 auto; padding: 30px clamp(18px, 5vw, 64px) 50px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--line); }
.footer a:hover { color: #fff; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; padding-top: 110px; text-align: left; }
  .hero-visual { height: 520px; max-width: 560px; width: 100%; margin: 0 auto; }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .project, .project-flip { grid-template-columns: 1fr; }
  .project-flip .project-stage { order: 0; }
  .cards, .steps { grid-template-columns: repeat(2, 1fr); }
  .about, .contact-box { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .links {
    position: fixed; inset: 68px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0; padding: 12px 18px 22px;
    background: rgba(11, 10, 26, .96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .3s; visibility: hidden;
  }
  .links.open { transform: none; visibility: visible; }
  .links a { padding: 14px 6px; font-size: 17px; }
  .links .btn { margin-top: 10px; justify-content: center; }
  .section { padding: 70px 18px; }
  .hero-visual { height: 440px; }
  .chip-a { top: 2%; } .chip-b { bottom: 2%; }
  .phone-mini { width: 96px; right: 4px; bottom: -22px; }
  .project { padding: 22px 18px; border-radius: 26px; }
}
@media (max-width: 520px) {
  .cards, .steps { grid-template-columns: 1fr; }
  .numbers { gap: 10px; }
  .num { padding: 16px; }
  .contact-form .btn { justify-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

.phone-mini img { aspect-ratio: 600 / 1277; object-fit: cover; object-position: top; }
