/* ===== Tokens ===== */
:root {
  --bg: #0a0b0f;
  --bg-2: #0f1118;
  --surface: #14161f;
  --surface-2: #191c28;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8eaf0;
  --muted: #9aa0b0;
  --faint: #6b7180;
  --accent: #6ee7ff;
  --accent-2: #a78bfa;
  --grad: linear-gradient(120deg, #6ee7ff 0%, #a78bfa 60%, #f0abfc 100%);
  --radius: 16px;
  --maxw: 1120px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }

/* ===== Background FX ===== */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  opacity: 0.5;
}
.bg-glow {
  position: fixed; z-index: -1;
  top: -20%; left: 50%; transform: translateX(-50%);
  width: 900px; height: 700px;
  background: radial-gradient(circle at 30% 30%, rgba(110,231,255,0.18), transparent 60%),
              radial-gradient(circle at 70% 40%, rgba(167,139,250,0.18), transparent 60%);
  filter: blur(20px);
  pointer-events: none;
}

/* ===== Nav ===== */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto;
  padding: 18px 24px;
  backdrop-filter: blur(12px);
}
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(10,11,15,0.6);
  border-bottom: 1px solid var(--border);
  opacity: 0; transition: opacity 0.3s;
}
.nav.scrolled::before { opacity: 1; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; }
.brand .dot { color: var(--accent); }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.4rem; cursor: pointer; }

/* ===== Layout ===== */
main { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }
.section-head { margin-bottom: 48px; }
.tag {
  display: inline-block; font-family: var(--font-head); font-size: 0.82rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

/* ===== Hero ===== */
.hero { min-height: 88vh; display: flex; align-items: center; padding: 60px 0; }
.hero-inner { max-width: 820px; }
.eyebrow {
  font-family: var(--font-head); color: var(--accent); font-size: 0.9rem;
  letter-spacing: 0.14em; text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 6vw, 4.2rem); font-weight: 700; margin-bottom: 22px; }
.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 620px; margin-bottom: 34px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 60px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s; cursor: pointer;
}
.btn-primary { background: var(--grad); color: #0a0b0f; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(110,231,255,0.25); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); }

.stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat .num { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat .label { color: var(--faint); font-size: 0.88rem; }

/* ===== About ===== */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); margin-bottom: 18px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }
.about-facts { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.about-facts li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px;
}
.about-facts li span { color: var(--accent); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-head); }

/* ===== Projects ===== */
.projects { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.card {
  padding: 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); transition: transform 0.25s, border-color 0.25s, background 0.25s;
  position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius);
  background: var(--grad); opacity: 0; transition: opacity 0.25s; z-index: -1;
  filter: blur(30px);
}
.card:hover { transform: translateY(-4px); border-color: rgba(110,231,255,0.4); background: var(--surface-2); }
.card:hover::after { opacity: 0.08; }
.card-top { display: flex; gap: 8px; margin-bottom: 18px; }
.chip {
  font-size: 0.72rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
  background: rgba(110,231,255,0.1); color: var(--accent); border: 1px solid rgba(110,231,255,0.2);
}
.card h3 { font-size: 1.35rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; }
.card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 22px; color: var(--faint); font-size: 0.85rem;
}
.card .arrow { font-size: 1.2rem; transition: transform 0.2s; color: var(--accent); }
.card:hover .arrow { transform: translate(4px, -4px); }

/* ===== Skills ===== */
.skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.skill-group h4 { color: var(--accent-2); font-size: 1rem; margin-bottom: 16px; }
.skill-group ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.skill-group li {
  color: var(--muted); font-size: 0.95rem; padding-left: 18px; position: relative;
}
.skill-group li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); }

/* ===== Contact ===== */
.contact { text-align: center; }
.contact-inner { max-width: 620px; margin: 0 auto; }
.contact h2 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.contact p { color: var(--muted); margin-bottom: 30px; font-size: 1.1rem; }
.contact-links { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border); text-align: center;
  padding: 30px 24px; color: var(--faint); font-size: 0.9rem; margin-top: 40px;
}

/* ===== Reveal animation ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ===== Responsive ===== */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .menu-btn { display: block; }
  .about-grid { grid-template-columns: 1fr; }
  .projects { grid-template-columns: 1fr; }
  .skills { grid-template-columns: repeat(2, 1fr); }
  .stats { gap: 28px; }
  .section { padding: 70px 0; }
}
@media (max-width: 480px) {
  .skills { grid-template-columns: 1fr; }
  .stat .num { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
