:root {
  --bg: #0b0d12;
  --bg-alt: #11141b;
  --card: #151924;
  --line: #232838;
  --text: #e8eaf0;
  --muted: #9aa1b2;
  --accent: #6ee7b7;
  --accent-2: #60a5fa;
  --radius: 14px;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Space Grotesk", var(--font);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { width: min(1120px, 90%); margin: 0 auto; }

/* Scroll progress */
.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 100;
}

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

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  background: var(--accent);
  color: #06110c;
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }
.btn-small { padding: 8px 18px; font-size: .9rem; }
.btn-large { padding: 18px 40px; font-size: 1.05rem; }

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}
#bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(circle at 75% 30%, rgba(96,165,250,.15), transparent 45%),
              radial-gradient(circle at 15% 80%, rgba(110,231,183,.10), transparent 40%);
}
.hero-content { position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .85rem; color: var(--muted); margin-bottom: 28px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(110,231,183,.6); }
  70% { box-shadow: 0 0 0 10px rgba(110,231,183,0); }
  100% { box-shadow: 0 0 0 0 rgba(110,231,183,0); }
}
h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 24px;
}
.typed {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cursor { color: var(--accent); animation: blink 1s steps(1) infinite; font-weight: 400; }
@keyframes blink { 50% { opacity: 0; } }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 64px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; max-width: 760px; border-top: 1px solid var(--line); padding-top: 32px; }
.stats strong { display: block; font-family: var(--display); font-size: 2.6rem; color: var(--text); line-height: 1; }
.stats strong::after { content: "+"; color: var(--accent); }
.stats div:nth-child(n+2) strong::after { content: ""; }
.stats span { color: var(--muted); font-size: .9rem; }

/* Sections */
.section { padding: 120px 0; }
.section-alt { background: var(--bg-alt); }
.section-tag { color: var(--accent); font-size: .85rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 12px; }
h2 { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; margin-bottom: 56px; }
h3 { font-family: var(--display); font-size: 1.3rem; margin-bottom: 10px; }
h4 { font-family: var(--display); font-size: 1.1rem; }

/* Services */
.grid.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  overflow: hidden;
  transition: transform .3s, border-color .3s;
}
.card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .3s;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(110,231,183,.10), transparent 40%);
}
.card:hover { transform: translateY(-4px); border-color: #2f3650; }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); font-size: .95rem; position: relative; }
.card h3 { position: relative; }
.icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(110,231,183,.1); color: var(--accent);
  font-family: var(--display); font-weight: 700; margin-bottom: 24px; position: relative;
}

/* Projects */
.projects { display: grid; gap: 28px; }
.project {
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: border-color .3s, transform .3s;
}
.project:nth-child(even) .project-visual { order: 2; }
.project:hover { border-color: #2f3650; transform: translateY(-4px); }
.project-visual {
  min-height: 280px; display: grid; place-items: center; position: relative; overflow: hidden;
}
.project-visual span {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem);
  color: rgba(255,255,255,.92); position: relative; z-index: 1; text-align: center; padding: 0 20px;
  transition: transform .5s;
}
.project:hover .project-visual span { transform: scale(1.06); }
.project-visual::after {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(from 0deg, transparent, rgba(255,255,255,.12), transparent 30%);
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.v1 { background: linear-gradient(135deg, #3b2f63, #7b5ea7); }
.v2 { background: linear-gradient(135deg, #0f3b5f, #2a7ab8); }
.v3 { background: linear-gradient(135deg, #0d4a42, #2c9a7f); }
.project-body { padding: 44px; display: flex; flex-direction: column; justify-content: center; }
.project-meta { color: var(--accent); font-size: .85rem; margin-bottom: 8px; }
.project-body h3 { font-size: 1.8rem; }
.project-body p:not(.project-meta) { color: var(--muted); margin-bottom: 24px; }
.project-link { font-weight: 600; transition: letter-spacing .3s; }
.project:hover .project-link { letter-spacing: .04em; color: var(--accent); }

/* Skills */
.skills { display: grid; gap: 0; }
.skill-row {
  display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.skill-row:first-child { border-top: 1px solid var(--line); }
.skill-row ul { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-row li {
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  font-size: .9rem; color: var(--muted); transition: all .2s;
}
.skill-row li:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }

/* Process */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.process li {
  padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
}
.process span { font-family: var(--display); color: var(--accent); font-weight: 700; display: block; margin-bottom: 14px; }
.process h4 { margin-bottom: 6px; }
.process p { color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { text-align: center; }
.contact-inner { max-width: 760px; }
.contact h2 { margin-bottom: 16px; }
.contact .lead { margin: 0 auto 48px; }
.contact-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 48px; }
.contact-item {
  padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card);
  font-weight: 500; transition: border-color .2s; word-break: break-word;
}
a.contact-item:hover { border-color: var(--accent); }
.contact-item small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; margin-bottom: 4px; }

.footer { border-top: 1px solid var(--line); padding: 32px 0; text-align: center; color: var(--muted); font-size: .9rem; }

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 900px) {
  .grid.services, .process { grid-template-columns: repeat(2, 1fr); }
  .project { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-visual { order: 0; }
  .project-visual { min-height: 200px; }
  .project-body { padding: 32px; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: fixed; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 24px; padding: 32px;
    background: rgba(11,13,18,.97); border-bottom: 1px solid var(--line);
    transform: translateY(-120%); transition: transform .35s ease;
  }
  .nav-links.open { transform: none; }
  .grid.services, .process, .contact-links, .stats { grid-template-columns: 1fr; }
  .stats { gap: 20px; }
  .skill-row { grid-template-columns: 1fr; gap: 12px; }
  .section { padding: 88px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
