@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #06060e;
  --bg-secondary: #0c0c1a;
  --bg-card: rgba(255,255,255,0.03);
  --bg-glass: rgba(255,255,255,0.05);
  --accent: #26fffd;
  --accent-purple: #a855f7;
  --accent-glow: rgba(38,255,253,0.15);
  --text-primary: #f0f0f5;
  --text-secondary: rgba(240,240,245,0.7);
  --text-muted: rgba(240,240,245,0.4);
  --border: rgba(255,255,255,0.08);
  --button-text: #06060e;
  --button-bg: linear-gradient(135deg, var(--accent), var(--accent-purple));
  --font-primary: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --font-heading: 'Space Grotesk', sans-serif;
}

body.light {
  --bg-primary: #f6f7fb;
  --bg-secondary: #eff2fb;
  --bg-card: rgba(255,255,255,0.92);
  --bg-glass: rgba(255,255,255,0.7);
  --accent: #0f62ff;
  --accent-purple: #7c3aed;
  --accent-glow: rgba(15,98,255,0.15);
  --text-primary: #0f172a;
  --text-secondary: rgba(15,23,42,0.75);
  --text-muted: rgba(15,23,42,0.55);
  --border: rgba(15,23,42,0.12);
  --button-text: #06060e;
  --button-bg: linear-gradient(135deg, var(--accent), var(--accent-purple));
}

body.light .navbar {
  background: rgba(255,255,255,0.88);
  border-color: rgba(15,23,42,0.12);
}

body.light .nav-links {
  background: rgba(255,255,255,0.96);
}

body.light .nav-links a {
  color: var(--text-secondary);
}

body.light .nav-links.open a {
  color: var(--text-primary);
}

body.light .mobile-menu-btn span {
  background: var(--text-primary);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.theme-toggle {
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
  min-width: 120px;
  text-align: center;
  border-radius: 14px;
  padding: 10px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.18);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.1);
}

body.light .theme-toggle {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid rgba(15,23,42,0.12);
  box-shadow: none;
}

body.light .theme-toggle:hover {
  background: rgba(255,255,255,0.95);
}

body.light .navbar {
  background: rgba(255,255,255,0.88);
  border-color: rgba(15,23,42,0.12);
}

body.light .nav-links {
  background: rgba(255,255,255,0.96);
}

body.light .nav-links a {
  color: var(--text-secondary);
}

body.light .nav-links.open a {
  color: var(--text-primary);
}

body.light .mobile-menu-btn span {
  background: var(--text-primary);
}

body.light .hero {
  background: linear-gradient(135deg, #f8fbff 0%, #eef3ff 100%);
}

body.light .hero::before {
  background: radial-gradient(circle at 30% 40%, rgba(15,98,255,0.08) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(124,58,237,0.06) 0%, transparent 50%);
}

body.light .btn-primary {
  color: #fff;
  box-shadow: 0 12px 32px rgba(15, 98, 255, 0.25);
}

body.light .btn-primary:hover {
  box-shadow: 0 18px 48px rgba(15, 98, 255, 0.3);
}

body.light .btn-secondary {
  background: rgba(255,255,255,0.88);
  color: var(--text-primary);
  border-color: rgba(15,23,42,0.12);
}

body.light .btn-secondary:hover {
  background: rgba(255,255,255,0.98);
}

a { color: var(--accent); text-decoration: none; transition: opacity 0.3s; }
a:hover { opacity: 0.8; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 16px 40px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(6,6,14,0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.nav-logo {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  color: var(--text-secondary); font-size: 14px; font-weight: 500;
  letter-spacing: 0.5px; text-transform: uppercase; position: relative;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); opacity: 1; }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 2px;
  background: var(--accent); transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 10px 24px; border-radius: 8px; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #06060e; border: none; cursor: pointer; text-transform: uppercase;
  letter-spacing: 0.5px; transition: transform 0.3s, box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 8px 30px var(--accent-glow); }

.mobile-menu-btn {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.mobile-menu-btn span {
  display: block; width: 24px; height: 2px; background: var(--text-primary);
  transition: all 0.3s;
}
.mobile-menu-btn.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.mobile-menu-btn.active span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ===== HERO ===== */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 120px 40px 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(38,255,253,0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(168,85,247,0.04) 0%, transparent 50%);
  animation: heroGlow 15s ease-in-out infinite alternate;
}
@keyframes heroGlow {
  0% { transform: translate(0,0) scale(1); }
  100% { transform: translate(-5%,3%) scale(1.1); }
}
.hero-content { position: relative; z-index: 1; max-width: 900px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 20px; border-radius: 50px; font-size: 13px; font-weight: 500;
  background: var(--bg-glass); border: 1px solid var(--border);
  color: var(--accent); margin-bottom: 24px; letter-spacing: 1px;
}
.hero-badge .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.hero-name {
  font-family: var(--font-heading); font-size: clamp(3rem,8vw,6rem);
  font-weight: 900; letter-spacing: -2px; line-height: 1.05; margin-bottom: 20px;
}
.hero-name .gradient {
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-tagline {
  font-size: clamp(1rem,2vw,1.25rem); color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 40px; line-height: 1.8;
}
.hero-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  padding: 16px 36px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  color: #06060e; border: none; cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px var(--accent-glow); }
.btn-secondary {
  padding: 16px 36px; border-radius: 12px; font-size: 15px; font-weight: 600;
  background: var(--bg-glass); color: var(--text-primary);
  border: 1px solid var(--border); cursor: pointer; transition: all 0.3s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); transform: translateY(-3px); }
.hero-scroll {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 12px; animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ===== SECTIONS ===== */
.section { padding: 100px 40px; max-width: 1200px; margin: 0 auto; }
.section-label {
  font-family: var(--font-mono); font-size: 13px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 3px; margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-heading); font-size: clamp(2rem,4vw,3rem);
  font-weight: 800; margin-bottom: 20px; letter-spacing: -1px;
}
.section-desc {
  color: var(--text-secondary); max-width: 600px; font-size: 1.05rem; margin-bottom: 48px;
}

/* ===== ABOUT ===== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-image-wrap {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, #0c0c1a 0%, #1a0a2e 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  aspect-ratio: 4/5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.about-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  border-radius: 0;
  border: none;
  box-shadow: none;
}
.about-image-wrap::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6, 6, 14, 0.18), transparent 45%);
  pointer-events: none;
}
.about-stats {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 32px;
}
.stat {
  text-align: center; padding: 20px 12px; border-radius: 12px;
  background: var(--bg-glass); border: 1px solid var(--border);
}
.stat-number {
  font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }

/* ===== SKILLS ===== */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.skill-card {
  padding: 32px; border-radius: 16px; background: var(--bg-card);
  border: 1px solid var(--border); transition: all 0.4s;
}
.skill-card:hover { transform: translateY(-4px); border-color: rgba(38,255,253,0.2); background: rgba(255,255,255,0.05); }
.skill-icon { font-size: 2rem; margin-bottom: 16px; }
.skill-title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 700; margin-bottom: 12px; }
.skill-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-tag {
  padding: 5px 14px; border-radius: 50px; font-size: 12px; font-weight: 500;
  background: var(--bg-glass); border: 1px solid var(--border); color: var(--text-secondary);
}

/* ===== EXPERIENCE ===== */
.timeline { position: relative; padding-left: 40px; }
.timeline::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-purple), transparent);
}
.timeline-item { position: relative; margin-bottom: 48px; }
.timeline-item::before {
  content: ''; position: absolute; left: -46px; top: 8px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg-primary); border: 3px solid var(--accent);
}
.timeline-date {
  font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 8px;
}
.timeline-role { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 700; margin-bottom: 4px; }
.timeline-company { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; }
.timeline-points { list-style: none; }
.timeline-points li {
  position: relative; padding-left: 20px; margin-bottom: 10px;
  color: var(--text-secondary); font-size: 0.95rem;
}
.timeline-points li::before {
  content: '▸'; position: absolute; left: 0; color: var(--accent);
}

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px,1fr)); gap: 28px; }
.project-card {
  border-radius: 16px; overflow: hidden; background: var(--bg-card);
  border: 1px solid var(--border); transition: all 0.4s;
}
.project-card:hover { transform: translateY(-6px); border-color: rgba(38,255,253,0.2); }
.project-image { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-bottom: 1px solid var(--border); }
.project-body { padding: 24px; }
.project-title { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; }
.project-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 16px; line-height: 1.6; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; }
.project-tech span {
  padding: 4px 12px; border-radius: 50px; font-size: 11px; font-weight: 500;
  background: var(--accent-glow); color: var(--accent); border: 1px solid rgba(38,255,253,0.15);
}

/* ===== 3D WORLD CTA ===== */
.world-cta {
  position: relative; padding: 80px 40px; margin: 60px auto; max-width: 1200px;
  border-radius: 24px; overflow: hidden; text-align: center;
  background: linear-gradient(135deg, rgba(38,255,253,0.08), rgba(168,85,247,0.08));
  border: 1px solid rgba(38,255,253,0.15);
}
.world-cta::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(38,255,253,0.1), transparent 70%);
  animation: ctaGlow 4s ease-in-out infinite alternate;
}
@keyframes ctaGlow { 0% { opacity: 0.5; } 100% { opacity: 1; } }
.world-cta-content { position: relative; z-index: 1; }
.world-cta-emoji { font-size: 3rem; margin-bottom: 20px; }
.world-cta h2 {
  font-family: var(--font-heading); font-size: clamp(1.8rem,4vw,2.5rem);
  font-weight: 800; margin-bottom: 16px;
}
.world-cta p { color: var(--text-secondary); max-width: 500px; margin: 0 auto 32px; font-size: 1.05rem; }

/* ===== CONTACT ===== */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; }
.contact-card {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 28px 20px; border-radius: 16px; background: var(--bg-card);
  border: 1px solid var(--border); transition: all 0.3s; text-align: center;
}
.contact-card:hover { border-color: rgba(38,255,253,0.2); transform: translateY(-4px); }
.contact-icon { font-size: 1.6rem; }
.contact-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.contact-value { font-size: 0.95rem; color: var(--text-primary); word-break: break-all; }

/* ===== FOOTER ===== */
.footer {
  text-align: center; padding: 40px 20px; border-top: 1px solid var(--border);
  color: var(--text-muted); font-size: 14px; margin-top: 60px;
}

/* ===== INTRO SPLASH ===== */
#intro-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
#intro-splash.fade-out {
  opacity: 0;
  transform: scale(1.05);
}
.splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.splash-name {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 900;
  color: var(--text-primary);
  letter-spacing: -3px;
  opacity: 0;
  animation: splashReveal 0.8s 0.3s ease forwards;
}
.splash-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.splash-line {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-purple));
  animation: splashLine 0.6s 0.8s ease forwards;
}
.splash-tagline {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0;
  animation: splashReveal 0.6s 1.2s ease forwards;
}
@keyframes splashReveal {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes splashLine {
  from { width: 0; }
  to { width: 120px; }
}

/* ===== 3D HERO CONTAINER ===== */
#hero-3d-container {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}
#hero-3d-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-image-wrap { max-width: 400px; margin: 0 auto; }
  .projects-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .navbar { padding: 14px 20px; }
  .nav-links { 
    display: none; position: fixed; top: 60px; left: 0; width: 100%;
    flex-direction: column; gap: 0; background: rgba(6,6,14,0.95);
    backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 24px; border-bottom: 1px solid var(--border); }
  .nav-links a::after { display: none; }
  .mobile-menu-btn { display: flex; }
  .nav-cta { display: none; }
  .hero { padding: 100px 20px 60px; }
  .section { padding: 60px 20px; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn-primary, .btn-secondary { width: 100%; max-width: 300px; justify-content: center; }
  .about-stats { grid-template-columns: repeat(3,1fr); gap: 10px; }
  .stat { padding: 14px 8px; }
  .stat-number { font-size: 1.4rem; }
  .world-cta { margin: 40px 20px; padding: 50px 24px; border-radius: 16px; }
  .timeline { padding-left: 28px; }
  .timeline-item::before { left: -34px; width: 12px; height: 12px; }
  .skills-grid { grid-template-columns: 1fr; }
  #hero-3d-container { opacity: 0.2; }
}
