:root {
  --bg: #0a0e14;
  --bg-alt: #0f1520;
  --surface: #131a26;
  --surface-border: #223047;
  --text: #e6edf3;
  --text-muted: #93a1b3;
  --accent: #6c5ce7;
  --accent-2: #22d3ee;
  --radius: 14px;
  --max-width: 1120px;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

ul { margin: 0; padding: 0; list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Background decoration */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 0%, black 0%, transparent 70%);
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(circle, rgba(108,92,231,0.25) 0%, rgba(34,211,238,0.08) 45%, transparent 70%);
  z-index: -1;
  pointer-events: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 16px;
}

p { margin: 0 0 16px; color: var(--text-muted); }

.text-gradient {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  background-clip: padding-box;
  color: #0a0e14;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -8px rgba(108,92,231,0.6);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--surface-border);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-small {
  padding: 10px 20px;
  font-size: 0.875rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10,14,20,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* backdrop-filter lives on a pseudo-element (not .site-header itself) because a
   filter/backdrop-filter on an ancestor creates a new containing block for
   position:fixed descendants — which would clip the full-screen mobile .nav
   overlay down to the header's own height instead of the full viewport. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.logo .dot { color: var(--accent-2); }

.nav {
  display: flex;
  gap: 32px;
  margin-left: auto;
  margin-right: 24px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.nav a:hover { color: var(--text); }

.nav-cta { flex-shrink: 0; }

.nav-cta-mobile { display: none; }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--surface-border);
  border-radius: 8px;
  cursor: pointer;
  z-index: 60;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 19px; }
.nav-toggle span:nth-child(3) { top: 24px; }

.nav-toggle.is-active span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { top: 19px; transform: rotate(-45deg); }

/* Hero */
.hero {
  padding: 120px 0 90px;
}

.hero-inner {
  max-width: 760px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.15rem;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* Sections */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.section-tag {
  color: var(--accent-2);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  margin-bottom: 48px;
}

/* Cards (services) */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 16px;
}

.card h3 { margin-bottom: 10px; font-size: 1.2rem; }

.card-list { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }

.card-list li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.process-step:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.process-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0e14;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.process-step h3 { margin-bottom: 10px; font-size: 1.15rem; }
.process-step p { margin: 0; }

.card-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-2);
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project-thumb {
  position: relative;
  display: flex;
  flex-direction: column;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0d0d0d;
}

.browser-chrome {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #171d29;
  border-bottom: 1px solid var(--surface-border);
}

.browser-chrome .dot { width: 9px; height: 9px; border-radius: 50%; }
.browser-chrome .dot.r { background: #ff5f57; }
.browser-chrome .dot.y { background: #febc2e; }
.browser-chrome .dot.g { background: #28c840; }

.browser-url {
  margin-left: 10px;
  font-size: 0.68rem;
  color: var(--text-muted);
  background: #0d1219;
  border: 1px solid var(--surface-border);
  border-radius: 999px;
  padding: 3px 12px;
  flex: 1;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-body { flex: 1; overflow: hidden; }

.browser-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.project-visit {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10,14,20,0.75);
  color: #fff;
  font-weight: 600;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.project-thumb:hover .project-visit { opacity: 1; }

.project-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 12px, transparent 12px 24px);
  border-bottom: 1px dashed var(--surface-border);
  color: var(--text-muted);
  font-weight: 600;
}

.project-body { padding: 28px; }

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-2);
  background: rgba(34,211,238,0.1);
  border: 1px solid rgba(34,211,238,0.2);
  padding: 4px 10px;
  border-radius: 999px;
}

.project-body h3 { font-size: 1.25rem; margin-bottom: 10px; }

.project-link {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--accent-2);
}

.project-card--placeholder { opacity: 0.7; }

/* About */
.about-inner { max-width: 720px; }

.about-stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

.stat-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Contact */
.contact-inner { text-align: center; max-width: 620px; margin: 0 auto; }
.contact-sub { font-size: 1.05rem; }

.contact-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}

.social-links {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 24px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  color: var(--text-muted);
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.social-icon:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-inner a:hover { color: var(--text); }

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive nav */
@media (max-width: 760px) {
  .nav {
    position: fixed;
    inset: 0;
    margin: 0;
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(10, 14, 20, 0.98);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    padding: 14px 24px;
  }

  .nav-cta-mobile {
    display: inline-flex;
    margin-top: 24px;
  }

  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}
