:root {
  --bg: #06070d;
  --bg-alt: #0b0d18;
  --surface: #10121e;
  --surface-2: #151827;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f4f5fb;
  --text-dim: #9a9db3;
  --accent-a: #7c5cff;
  --accent-b: #22d3ee;
  --accent-c: #ff5cb1;
  --gradient: linear-gradient(120deg, var(--accent-a), var(--accent-b));
  --radius: 18px;
  --max-w: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

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

h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 650; letter-spacing: -0.02em; }
p { color: var(--text-dim); }

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent-b);
  font-weight: 600;
  margin: 0 0 1em;
}

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

/* ---------- cursor glow ---------- */
.cursor-glow {
  position: fixed;
  top: 0; left: 0;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(124, 92, 255, 0.16), transparent 70%);
  transform: translate(-50%, -50%);
  z-index: 1;
  transition: opacity 0.3s ease;
  will-change: transform;
}

@media (hover: none) {
  .cursor-glow { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #06070d;
  box-shadow: 0 8px 30px -8px rgba(124, 92, 255, 0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(124, 92, 255, 0.75); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); transform: translateY(-2px); }
.btn-small { padding: 0.6em 1.3em; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  transition: padding 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(6, 7, 13, 0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.logo .dot { color: var(--accent-b); }
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  position: relative;
  font-size: 0.92rem;
  color: var(--text-dim);
  transition: color 0.2s ease;
  padding: 4px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--gradient);
  transition: width 0.25s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
}
.burger span {
  width: 100%;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 24px 100px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 40%, black 40%, transparent 80%);
  z-index: 0;
}

.hero-orbs { position: absolute; inset: 0; z-index: 0; }
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: float 16s ease-in-out infinite;
}
.orb-a {
  width: 460px; height: 460px;
  background: var(--accent-a);
  top: -120px; left: -80px;
}
.orb-b {
  width: 380px; height: 380px;
  background: var(--accent-b);
  bottom: -140px; right: -60px;
  animation-delay: -5s;
}
.orb-c {
  width: 280px; height: 280px;
  background: var(--accent-c);
  top: 40%; left: 60%;
  animation-delay: -10s;
  opacity: 0.35;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 30px) scale(0.96); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  text-align: center;
  margin: 0 auto;
}
.hero-content .eyebrow { display: inline-block; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin-bottom: 0.4em;
}
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 560px;
  margin: 0 auto 2em;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  z-index: 2;
}
.scroll-cue span {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--gradient);
  transform: translateX(-50%);
  animation: scrollcue 1.8s ease infinite;
}
@keyframes scrollcue {
  0% { opacity: 1; top: 8px; }
  70% { opacity: 0; top: 22px; }
  100% { opacity: 0; top: 22px; }
}

/* ---------- marquee ---------- */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 18px 0;
  overflow: hidden;
}
.marquee-track {
  display: flex;
  gap: 14px;
  width: max-content;
  animation: scroll-marquee 26s linear infinite;
  font-size: 0.95rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.marquee-track span { white-space: nowrap; }
.marquee-track span:nth-child(2n) { color: var(--accent-b); }
@keyframes scroll-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- sections ---------- */
.section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px 24px;
  position: relative;
  z-index: 1;
}
.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-sub { font-size: 1.02rem; }

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.15s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}
.card:hover {
  border-color: rgba(124, 92, 255, 0.4);
  box-shadow: 0 20px 50px -20px rgba(124, 92, 255, 0.35);
}
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124, 92, 255, 0.12);
  color: var(--accent-b);
  margin-bottom: 20px;
}
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: 0.95rem; margin: 0; }

/* ---------- portfolio ---------- */
.stats-section { padding-top: 100px; }
.portfolio {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 72px;
}
.portfolio-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
a.portfolio-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 92, 255, 0.4);
}
.showcase-dots {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.showcase-dots span {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
}
.showcase-dots span:nth-child(1) { background: #ff5f57; }
.showcase-dots span:nth-child(2) { background: #febc2e; }
.showcase-dots span:nth-child(3) { background: #28c840; }
.portfolio-body { padding: 28px; }
.status-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}
.status-live { background: rgba(40, 200, 64, 0.15); color: #4ade80; }
.status-build { background: rgba(34, 211, 238, 0.15); color: var(--accent-b); }
.portfolio-body h3 { font-size: 1.2rem; }
.portfolio-body p { font-size: 0.92rem; }
.portfolio-link {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-b);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.stat-number {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-suffix {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-b);
}
.stat-suffix.stat-static {
  font-size: clamp(2rem, 4vw, 2.8rem);
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat p { margin-top: 6px; font-size: 0.9rem; }

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: start;
}
.about-points { display: flex; flex-direction: column; gap: 26px; }
.point {
  padding: 20px 22px;
  border-left: 2px solid var(--border);
  transition: border-color 0.3s ease;
}
.point:hover { border-color: var(--accent-b); }
.point h4 { font-size: 0.95rem; color: var(--accent-b); }
.point p { font-size: 0.92rem; margin: 0; }

/* ---------- contact ---------- */
.contact-panel {
  background: linear-gradient(160deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  position: relative;
  overflow: hidden;
}
.contact-panel::before {
  content: "";
  position: absolute;
  width: 340px; height: 340px;
  background: var(--gradient);
  filter: blur(120px);
  opacity: 0.22;
  top: -100px; right: -80px;
  border-radius: 50%;
}
.contact-copy, .contact-form { position: relative; z-index: 1; }
.contact-email {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--accent-b);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.contact-email:hover { border-color: var(--accent-b); }

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.contact-form label { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; color: var(--text-dim); }
.contact-form input, .contact-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-b);
  background: rgba(255,255,255,0.06);
}
.form-note { font-size: 0.85rem; min-height: 1.2em; color: var(--accent-b); margin: 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner p { font-size: 0.85rem; margin: 0; }
.footer-meta { margin-top: 8px; font-size: 0.8rem; }
.footer-right { text-align: right; display: flex; flex-direction: column; gap: 6px; }
.footer-email { font-size: 0.85rem; color: var(--accent-b); }
@media (max-width: 500px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .footer-right { text-align: left; }
}

/* ---------- reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr; }
  .portfolio { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); row-gap: 32px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-panel { grid-template-columns: 1fr; padding: 40px 28px; }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(6,7,13,0.96);
    backdrop-filter: blur(14px);
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }
  .section { padding: 90px 20px; }
}
