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

:root {
  --bg: #050508;
  --surface: rgba(255,255,255,0.03);
  --border: rgba(255,255,255,0.08);
  --text: #e8e8ed;
  --muted: #8888a0;
  --accent1: #6366f1;
  --accent2: #06b6d4;
  --accent3: #a855f7;
  --gradient: linear-gradient(135deg, var(--accent1), var(--accent2), var(--accent3));
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

html { scroll-behavior: smooth; }

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

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 1;
  opacity: 0.035;
  pointer-events: none;
  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");
}

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 2.5rem;
  backdrop-filter: blur(20px);
  background: rgba(5,5,8,0.7);
  border-bottom: 1px solid var(--border);
}

.logo {
  font-family: var(--mono);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

.nav-cta {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.nav-cta:hover {
  border-color: var(--accent1);
  background: rgba(99,102,241,0.1);
}

main { position: relative; z-index: 2; }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 2.5rem 4rem;
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border: 1px solid rgba(6,182,212,0.3);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent2);
  margin-bottom: 2rem;
  width: fit-content;
  animation: fadeUp 0.8s ease both;
}

.hero-badge::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--accent2);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-title .line {
  display: block;
  animation: fadeUp 0.8s ease both;
}

.hero-title .line:nth-child(2) { animation-delay: 0.15s; }
.hero-title .line:nth-child(3) { animation-delay: 0.3s; }

.typing {
  font-family: var(--mono);
  font-size: clamp(1.2rem, 3vw, 2rem);
  font-weight: 400;
  color: var(--muted);
  -webkit-text-fill-color: var(--muted);
  min-height: 1.2em;
}

.typing::after {
  content: '|';
  animation: blink 1s step-end infinite;
  color: var(--accent2);
}

@keyframes blink { 50% { opacity: 0; } }

.hero-desc {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 540px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.8s 0.45s ease both;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  animation: fadeUp 0.8s 0.6s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s;
}

.btn svg { width: 20px; height: 20px; }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 24px rgba(99,102,241,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99,102,241,0.5);
}

.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: var(--accent2);
  background: rgba(6,182,212,0.08);
  transform: translateY(-2px);
}

.scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  animation: fadeUp 1s 1s ease both;
}

.scroll-line {
  width: 40px;
  height: 1px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent2);
  animation: scrollLine 2s ease infinite;
}

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

.section {
  padding: 6rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent2);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 3rem;
  letter-spacing: -0.02em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.about-text p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.about-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  text-align: center;
  transition: all 0.3s;
}

.stat-card:hover {
  border-color: rgba(99,102,241,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.stat-card:last-child { grid-column: span 2; }

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s;
}

.skill-card:hover {
  border-color: rgba(168,85,247,0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.skill-icon { font-size: 2rem; display: block; margin-bottom: 1rem; }

.skill-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.skill-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-section { padding-bottom: 4rem; }

.contact-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-box::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(99,102,241,0.08), transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(6,182,212,0.06), transparent 50%);
  pointer-events: none;
}

.contact-box h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
}

.contact-box > p {
  color: var(--muted);
  margin-bottom: 2.5rem;
  position: relative;
}

.contact-links {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 2rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.25s;
  min-width: 240px;
}

.contact-link svg { width: 28px; height: 28px; flex-shrink: 0; }

.contact-link div {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.contact-link strong { font-size: 1rem; }
.contact-link span { font-size: 0.85rem; color: var(--muted); }

.contact-link:hover {
  border-color: var(--accent1);
  background: rgba(99,102,241,0.1);
  transform: translateY(-3px);
}

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-mono { font-family: var(--mono); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

@media (max-width: 768px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links { display: none; }
  .hero { padding: 7rem 1.25rem 3rem; }
  .section { padding: 4rem 1.25rem; }
  .about-grid { grid-template-columns: 1fr; }
  .contact-box { padding: 2.5rem 1.5rem; }
  .contact-links { flex-direction: column; align-items: center; }
  .contact-link { width: 100%; max-width: 320px; }
  .scroll-hint { display: none; }
}
