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

:root {
  --bg:        #09090b;
  --bg-card:   #111113;
  --bg-dim:    #0c0c0e;
  --surface:   #18181b;
  --border:    #27272a;
  --border-hi: #3f3f46;
  --text:      #fafafa;
  --text-2:    #a1a1aa;
  --text-3:    #71717a;
  --accent:    #6d5cff;
  --accent-hi: #8577ff;
  --green:     #22c55e;
  --gradient:  linear-gradient(135deg, #6d5cff, #a855f7, #ec4899);
  --font:      'Inter', system-ui, -apple-system, sans-serif;
  --radius:    12px;
  --radius-sm: 8px;
  --max-w:     1200px;
  --nav-h:     64px;
}

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

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

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(9,9,11,.8);
  backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  transition: background .3s;
}
.nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.nav-logo-img { height: 32px; width: auto; }
.footer-logo-img { height: 28px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 14px; color: var(--text-2); }
.nav-links a:hover { color: var(--text); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 28px; height: 20px; position: relative;
}
.nav-toggle span {
  display: block; width: 100%; height: 2px; background: var(--text);
  position: absolute; left: 0; transition: all .3s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 9px; }
.nav-toggle span:nth-child(3) { top: 18px; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative; min-height: 80vh; display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 24px 80px; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  position: absolute; top: -20%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px; border-radius: 50%;
  background: radial-gradient(circle, rgba(109,92,255,.15) 0%, transparent 70%);
  filter: blur(60px);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(39,39,42,.3) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39,39,42,.3) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 70%);
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; text-align: center; }

.hero h1 {
  font-size: clamp(36px, 6vw, 64px); font-weight: 800;
  line-height: 1.1; letter-spacing: -0.03em;
  animation: fadeInUp .6s ease-out;
}
.gradient { background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.hero-sub {
  margin-top: 24px; font-size: 18px; color: var(--text-2); max-width: 560px;
  margin-left: auto; margin-right: auto;
  animation: fadeInUp .6s ease-out .1s both;
}

/* ── Sections ─────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-dim); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-2); margin-top: 12px; font-size: 16px; }

/* ── Projects ─────────────────────────────────────── */
.projects-grid {
  margin-top: 56px; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.project-card {
  display: block; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  transition: border-color .2s, transform .2s;
}
.project-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.project-icon {
  width: 52px; height: 52px; border-radius: 12px;
  background: rgba(109,92,255,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.project-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.project-card p { font-size: 15px; color: var(--text-2); line-height: 1.6; }
.project-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 20px; font-size: 14px; font-weight: 500; color: var(--accent);
}
.project-link svg { transition: transform .2s; }
.project-card:hover .project-link svg { transform: translateX(3px); }

/* ── Contact ──────────────────────────────────────── */
.contact-card {
  margin-top: 48px; text-align: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 48px;
}
.contact-email {
  font-size: 24px; font-weight: 700; color: var(--accent);
  transition: color .2s;
}
.contact-email:hover { color: var(--accent-hi); }

/* ── Footer ───────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.footer-links { display: flex; gap: 24px; font-size: 13px; color: var(--text-3); }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 13px; color: var(--text-3); }

/* ── Animations ───────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll reveal ────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease-out, transform .6s ease-out;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: var(--nav-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 24px; gap: 16px;
  }
  .nav-toggle { display: block; }
  .projects-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
}
