/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --border: #1e1e2e;
  --text: #e4e4ef;
  --text-muted: #8888a0;
  --accent: #6c63ff;
  --accent-glow: rgba(108, 99, 255, 0.15);
  --gradient-1: #6c63ff;
  --gradient-2: #3b82f6;
  --gradient-3: #06b6d4;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Film grain overlay ───────────────────────────────────────────────────── */
.grain {
  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='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.8);
  border-bottom: 1px solid var(--border);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--gradient-1), var(--gradient-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem 4rem;
  gap: 4rem;
}

.hero-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.125rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 480px;
}

/* ── Hero visual ──────────────────────────────────────────────────────────── */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.circuit {
  width: 80%;
  height: 80%;
  color: var(--accent);
  opacity: 0.4;
  animation: rotate 60s linear infinite;
}

@keyframes rotate { to { transform: rotate(360deg); } }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: drift 8s ease-in-out infinite alternate;
}

.orb-1 {
  width: 200px; height: 200px;
  background: var(--gradient-1);
  opacity: 0.12;
  top: 15%; left: 20%;
}

.orb-2 {
  width: 160px; height: 160px;
  background: var(--gradient-2);
  opacity: 0.10;
  bottom: 20%; right: 15%;
  animation-delay: -3s;
}

.orb-3 {
  width: 120px; height: 120px;
  background: var(--gradient-3);
  opacity: 0.08;
  top: 50%; left: 50%;
  animation-delay: -5s;
}

@keyframes drift {
  to { transform: translate(30px, -20px) scale(1.1); }
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
section { padding: 6rem 2rem; }

.section-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 4rem;
}

.section-label span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section-label h2 {
  font-size: 1.75rem;
  font-weight: 700;
  position: sticky;
  top: 5rem;
}

.section-body p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  max-width: 600px;
}

/* ── Tags ─────────────────────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.tag {
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--surface);
  transition: border-color 0.2s, color 0.2s;
}

.tag:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

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

/* ── Contact ──────────────────────────────────────────────────────────────── */
.contact-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.contact-link:hover { border-color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Scroll animations ────────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 8rem;
  }

  .hero-visual {
    max-width: 300px;
    margin: 0 auto;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-label h2 { position: static; }

  .nav-links { gap: 1.25rem; }
}
