:root {
  --bg: #05060c;
  --bg-2: #0a0d1a;
  --ink: #eef1ff;
  --muted: #9aa3c7;
  --faint: #5b6488;
  --cyan: #38e8ff;
  --violet: #8b5cff;
  --grad: linear-gradient(110deg, #38e8ff 0%, #8b5cff 60%, #ff5cc8 100%);
  --glass: rgba(255, 255, 255, 0.04);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --max: 1180px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: radial-gradient(ellipse at 50% -10%, #131735 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  cursor: none;
}
@media (hover: none) { body { cursor: auto; } }

a { color: inherit; text-decoration: none; }

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

/* ---------- 3D canvas ---------- */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

main { position: relative; z-index: 2; }

/* ---------- cursor + progress ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56,232,255,.9), rgba(139,92,255,.25) 60%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: screen;
  transition: width .25s, height .25s, opacity .3s;
}
.cursor-glow.big { width: 70px; height: 70px; }
@media (hover: none) { .cursor-glow { display: none; } }

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad);
  z-index: 9998;
  box-shadow: 0 0 14px rgba(56,232,255,.7);
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 5vw, 60px);
  transition: padding .3s, background .3s, backdrop-filter .3s;
}
.nav.scrolled {
  padding: 14px clamp(20px, 5vw, 60px);
  background: rgba(5, 6, 12, 0.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-brd);
}
.nav__brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: .5px;
}
.nav__brand span { color: var(--cyan); }
.nav__links { display: flex; gap: 30px; }
.nav__links a {
  font-size: .92rem;
  color: var(--muted);
  position: relative;
  transition: color .25s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 2px;
  background: var(--grad);
  transition: width .3s;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { width: 100%; }
.nav__cta {
  font-size: .9rem;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  transition: border-color .3s, box-shadow .3s, transform .2s;
}
.nav__cta:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 24px rgba(56,232,255,.35);
  transform: translateY(-1px);
}
@media (max-width: 720px) { .nav__links { display: none; } }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px clamp(20px, 5vw, 60px) 80px;
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  align-items: center;
  gap: clamp(30px, 5vw, 70px);
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__photo { order: -1; }
}

/* ---------- hero portrait ---------- */
.hero__photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  width: min(360px, 78vw);
  aspect-ratio: 1;
}
.hero__photo-ring {
  position: absolute;
  inset: -14px;
  border-radius: 32px;
  background: conic-gradient(from 0deg, #38e8ff, #8b5cff, #ff5cc8, #38e8ff);
  filter: blur(18px);
  opacity: 0.55;
  animation: spin 8s linear infinite;
  z-index: 0;
}
.hero__photo-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(160deg, #161a33 0%, #0a0d1a 100%);
  box-shadow: 0 30px 80px -30px rgba(56, 232, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floaty 6s ease-in-out infinite;
}
.hero__photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero__photo-fallback {
  display: none;
  font-family: "Space Grotesk", sans-serif;
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__photo-frame.is-empty .hero__photo-fallback { display: block; }
.hero__photo-badge {
  position: absolute;
  z-index: 2;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink);
  background: rgba(5, 6, 12, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-brd);
  white-space: nowrap;
}
.hero__photo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #37f5a0;
  box-shadow: 0 0 10px #37f5a0;
  animation: pulse 2s infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero__eyebrow {
  font-family: "Space Grotesk", sans-serif;
  font-size: .85rem;
  letter-spacing: 4px;
  color: var(--cyan);
  margin-bottom: 26px;
}
.hero__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 8rem);
  line-height: 0.95;
  letter-spacing: -2px;
}
.hero__title span { display: block; }
.hero__sub {
  max-width: 620px;
  margin-top: 32px;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__actions { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }

.btn {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 15px 30px;
  border-radius: 999px;
  transition: transform .2s, box-shadow .3s, background .3s;
}
.btn--primary {
  background: var(--grad);
  color: #05060c;
  font-weight: 600;
  box-shadow: 0 10px 40px -8px rgba(56,232,255,.5);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 50px -8px rgba(139,92,255,.7); }
.btn--ghost {
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--cyan); transform: translateY(-3px); }

.hero__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 22px;
  margin-top: 60px;
  max-width: 640px;
}
.stat { border-left: 1px solid var(--glass-brd); padding-left: 16px; }
.stat__num {
  display: block;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { font-size: .82rem; color: var(--faint); }
@media (max-width: 620px) { .hero__stats { grid-template-columns: repeat(2, 1fr); } }

.hero__scroll {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: .72rem;
  letter-spacing: 3px;
}
.hero__scroll-line {
  width: 1px; height: 46px;
  background: linear-gradient(var(--cyan), transparent);
  animation: scrollpulse 2s infinite;
}
@keyframes scrollpulse { 0%,100%{opacity:.3; transform:scaleY(.6)} 50%{opacity:1; transform:scaleY(1)} }

/* ---------- generic section ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(80px, 12vh, 150px) clamp(20px, 5vw, 60px);
}
.section__head { margin-bottom: 60px; }
.section__index {
  font-family: "Space Grotesk", sans-serif;
  color: var(--cyan);
  font-size: .9rem;
  letter-spacing: 3px;
}
.section__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -1px;
  margin-top: 10px;
}

/* ---------- about ---------- */
.about__grid { display: grid; gap: 50px; }
.about__lead { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--muted); max-width: 860px; }
.about__lead strong { color: var(--ink); }
.about__cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 800px) { .about__cards { grid-template-columns: 1fr; } }

.glass {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: 18px;
  padding: 28px;
  backdrop-filter: blur(10px);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s, box-shadow .35s;
  transform-style: preserve-3d;
}
.glass:hover {
  border-color: rgba(56,232,255,.4);
  box-shadow: 0 20px 60px -20px rgba(56,232,255,.35);
}
.glass h3 { font-family: "Space Grotesk", sans-serif; font-size: 1.2rem; margin-bottom: 10px; }
.glass p { color: var(--muted); font-size: .98rem; }

/* ---------- section lead ---------- */
.section__lead {
  margin-top: 18px;
  max-width: 620px;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- products ---------- */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
@media (max-width: 820px) { .products { grid-template-columns: 1fr; } }

.prod {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 30px 26px;
  overflow: hidden;
}
.prod::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--grad);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .5s;
}
.prod:hover::before { transform: scaleY(1); }
.prod--featured { grid-column: 1 / -1; }
.prod--featured .prod__what { font-size: 1.12rem; }

.prod__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.prod__kind {
  font-family: "Space Grotesk", sans-serif;
  font-size: .74rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 5px 12px;
  border: 1px solid rgba(56,232,255,.25);
  border-radius: 999px;
  background: rgba(56,232,255,.06);
}
.prod__date { font-size: .8rem; color: var(--faint); white-space: nowrap; }
.prod__name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.5px;
}
.prod__role { color: var(--violet); font-size: .9rem; margin-top: 2px; }
.prod__what { color: var(--muted); margin-top: 14px; font-size: 1rem; }

.prod__section { margin-top: 18px; }
.prod__label {
  font-family: "Space Grotesk", sans-serif;
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--faint);
}
.prod__built { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.prod__built li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: .93rem;
}
.prod__built li::before {
  content: "";
  position: absolute;
  left: 0; top: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--grad);
}

.prod__impact { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.prod__metric {
  font-family: "Space Grotesk", sans-serif;
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--ink);
  background: rgba(139,92,255,.12);
  border: 1px solid rgba(139,92,255,.3);
}

.prod__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--glass-brd);
}
.prod__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.job__tag {
  font-size: .74rem;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--glass-brd);
  color: var(--muted);
}
.prod__cta {
  font-family: "Space Grotesk", sans-serif;
  font-size: .92rem;
  font-weight: 600;
  padding: 11px 22px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--grad);
  color: #05060c;
  transition: transform .2s, box-shadow .3s;
  box-shadow: 0 8px 30px -10px rgba(56,232,255,.5);
}
.prod__cta:hover { transform: translateY(-2px); box-shadow: 0 12px 36px -8px rgba(139,92,255,.6); }
.prod__cta-arrow { display: inline-block; transition: transform .2s; }
.prod__cta:hover .prod__cta-arrow { transform: translate(2px, -2px); }
.prod__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.prod__cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--glass-brd);
  box-shadow: none;
}
.prod__cta--ghost:hover { border-color: var(--cyan); box-shadow: none; }
.prod__cta--soon {
  background: transparent;
  color: var(--faint);
  border: 1px dashed var(--glass-brd);
  box-shadow: none;
  cursor: default;
}
.prod__cta--nda {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 200, 120, 0.35);
  box-shadow: none;
  cursor: default;
}
.prod__lock { filter: grayscale(0.2); }

/* ---------- skills ---------- */
.skills__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 800px) { .skills__grid { grid-template-columns: 1fr; } }
.skillcat {
  padding: 28px;
  border-radius: 18px;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  backdrop-filter: blur(8px);
  transition: border-color .3s, box-shadow .3s;
}
.skillcat:hover { border-color: rgba(56,232,255,.35); box-shadow: 0 16px 50px -22px rgba(56,232,255,.4); }
.skillcat h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin-bottom: 16px;
  color: var(--cyan);
  letter-spacing: .5px;
}
.skillcat__chips { display: flex; flex-wrap: wrap; gap: 9px; }
.chip {
  font-size: .84rem;
  padding: 7px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-brd);
  color: var(--muted);
  transition: color .25s, border-color .25s, transform .2s;
}
.chip:hover { color: var(--ink); border-color: var(--violet); transform: translateY(-2px); }

/* ---------- contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 820px; margin: 0 auto; }
.contact__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 8vw, 5rem);
  line-height: 1;
  letter-spacing: -1.5px;
  margin: 16px 0 20px;
}
.contact__sub { color: var(--muted); font-size: 1.15rem; max-width: 560px; margin: 0 auto; }
.contact__links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 50px;
}
@media (max-width: 720px) { .contact__links { grid-template-columns: 1fr; } }
.contact__link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--glass-brd);
  background: var(--glass);
  text-align: left;
  transition: transform .25s, border-color .3s, box-shadow .3s;
}
.contact__link:hover {
  transform: translateY(-4px);
  border-color: var(--cyan);
  box-shadow: 0 20px 50px -20px rgba(56,232,255,.4);
}
.contact__link-label { font-size: .78rem; color: var(--faint); letter-spacing: 2px; text-transform: uppercase; }
.contact__link-val { font-family: "Space Grotesk", sans-serif; font-size: 1rem; word-break: break-all; }

.footer {
  max-width: var(--max);
  margin: 60px auto 0;
  padding-top: 30px;
  border-top: 1px solid var(--glass-brd);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: .82rem;
}

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

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  * { animation: none !important; }
  html { scroll-behavior: auto; }
}
