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

:root {
  --bg: #0a0a0b;
  --bg-subtle: #111113;
  --bg-card: #16161a;
  --border: #1e1e24;
  --border-hover: #2a2a32;
  --text: #ededef;
  --text-muted: #8b8b97;
  --text-subtle: #5a5a66;
  --accent: #a78bfa;
  --accent-bright: #c4b5fd;
  --accent-dim: #7c3aed;
  --green: #34d399;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

.text-gradient {
  background: linear-gradient(135deg, var(--accent-bright), var(--pink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--ease);
  border: none;
  white-space: nowrap;
}

.btn-sm { padding: 8px 20px; font-size: 0.85rem; }

.btn-primary {
  background: var(--accent-dim);
  color: #fff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.3);
}
.btn-primary:hover {
  background: var(--accent);
  box-shadow: 0 0 30px rgba(167, 139, 250, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
  background: var(--bg-subtle);
}

.btn-full { width: 100%; justify-content: center; }

/* ─── Navigation ─── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: all 0.3s var(--ease);
}

.nav.scrolled {
  background: rgba(10, 10, 11, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.logo-icon { font-size: 1.4rem; }
.logo-highlight { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}


.nav-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s var(--ease);
  border-radius: 2px;
}

/* ─── Hero ─── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-gradient {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 140%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.12) 0%, rgba(124, 58, 237, 0.04) 40%, transparent 70%);
  pointer-events: none;
}

.grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  padding: 6px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-bright);
  margin-bottom: 32px;
  font-family: var(--mono);
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 64px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-family: var(--mono);
}
.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-subtle);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ─── Sections ─── */
.section {
  padding: 120px 0;
}

.section-header {
  max-width: 640px;
  margin-bottom: 64px;
}

.section-header.center,
.contact .section-header {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.section-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ─── Services ─── */
.services { background: var(--bg); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.35s var(--ease);
}

.service-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(167, 139, 250, 0.08);
  color: var(--accent);
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.service-tags li {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-subtle);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ─── Work ─── */
.work { background: var(--bg-subtle); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.work-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.35s var(--ease);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.work-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.work-card-large {
  grid-column: 1 / -1;
  min-height: 360px;
}

.work-card-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--card-color), transparent 60%);
  opacity: 0.15;
  transition: opacity 0.35s;
}

.work-card:hover .work-card-bg { opacity: 0.25; }

.work-card-content {
  position: relative;
  padding: 32px;
}

.work-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.work-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.work-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 600px;
  margin-bottom: 20px;
}

.work-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-tech span {
  padding: 4px 12px;
  font-size: 0.75rem;
  font-family: var(--mono);
  color: var(--text-subtle);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 6px;
}

/* ─── Tech Strip ─── */
.tech-strip {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.tech-label {
  text-align: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
}

.tech-scroll {
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
}

.tech-track {
  display: flex;
  gap: 32px;
  animation: scroll 30s linear infinite;
  width: max-content;
}

.tech-track span {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-subtle);
  white-space: nowrap;
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── About ─── */
.about { background: var(--bg); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 48px;
}

.value {
  padding-left: 24px;
  border-left: 2px solid var(--accent-dim);
}

.value h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.value p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Contact ─── */
.contact {
  background: var(--bg-subtle);
}

.contact-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-subtle);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.contact-email {
  display: flex;
  justify-content: center;
  width: 100%;
}
.contact-email .btn { font-size: 1.1rem; padding: 16px 40px; letter-spacing: 0.01em; }

/* ─── Footer ─── */
.footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-left p {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-subtle);
  text-align: center;
}

/* ─── Animations ─── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: 1fr; }
  .work-card-large { grid-column: auto; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-values { padding-top: 0; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .mobile-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .hero-stats { flex-direction: column; gap: 20px; }
  .stat-divider { width: 40px; height: 1px; }
  .hero-actions { flex-direction: column; align-items: center; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
