/* --- DARK THEME (DEFAULT) --- */
:root {
  --bg: #03040b;
  --accent: #00f2ff;
  --accent-glow: rgba(0, 242, 255, 0.4);
  --purple: #6a00ff;
  --text: #f5f7ff;
  --muted: #a4a9c3;
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.08);
  --success: #2fd39c;
  --shadow: rgba(0, 0, 0, 0.4);
  --intro-text: #ffffff;
  --tag-bg: rgba(0,0,0,0.2);
  --hover-bg: rgba(255,255,255,0.05);
}

/* --- LIGHT THEME --- */
[data-theme="light"] {
  --bg: #eaf0f6;
  --accent: #0066cc;
  --accent-glow: rgba(0, 102, 204, 0.3);
  --purple: #8b5cf6;
  --text: #0f172a;
  --muted: #475569;
  --glass-bg: rgba(255, 255, 255, 0.40); 
  --glass-border: rgba(255, 255, 255, 0.6); 
  --success: #059669;
  --shadow: rgba(0, 0, 0, 0.06);
  --intro-text: #0f172a;
  --tag-bg: rgba(255, 255, 255, 0.5);
  --hover-bg: rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  transition: color 0.3s ease;
}

.glass, .nav, .btn, .skill-card, .project-card, .timeline-card {
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s;
}
/* FIX: Strict overflow controls prevent horizontal mobile wobble */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: color 0.3s ease;
}

.glass, .nav, .btn, .skill-card, .project-card, .timeline-card {
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, transform 0.3s;
}


/* --- THEME WIPE OVERLAY --- */
#theme-overlay {
  position: fixed;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  transform: scale(0);
  z-index: 9999;
  pointer-events: none;
  transition: transform 0.7s cubic-bezier(0.86, 0, 0.07, 1), opacity 0.5s ease;
  opacity: 0;
}

/* --- BACKGROUND GLOWING ORBS --- */
.bg-orbs {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.5;
  animation: float 20s infinite alternate ease-in-out;
}
.orb-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--accent); }
.orb-2 { bottom: -10%; right: -10%; width: 60vw; height: 60vw; background: var(--purple); animation-delay: -5s; }
.orb-3 { top: 40%; left: 60%; width: 40vw; height: 40vw; background: #0033ff; animation-delay: -10s; }

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(100px, 80px) scale(1.2); }
}

/* --- GLASSMORPHISM UTILITY --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: 0 20px 50px var(--shadow), inset 0 1px 0 var(--glass-border);
  border-radius: 24px;
}

/* Typography */
h1, h2, h3 { font-weight: 700; letter-spacing: -0.02em; }
h2 span { background: linear-gradient(135deg, var(--accent), var(--intro-text)); -webkit-background-clip: text; color: transparent; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }

/* --- LAYOUT --- */
main { width: 100%; position: relative; z-index: 10; }
section { position: relative; min-height: 100vh; padding: 120px clamp(20px, 8vw, 96px); display: flex; align-items: center; justify-content: center; }
.section-inner { width: 100%; max-width: 1200px; margin: 0 auto; z-index: 2; }

/* --- INTRO ZOOM SEQUENCE --- */
#intro-sequence {
  height: 100vh; width: 100vw; display: flex; align-items: center; justify-content: center;
  background-color: transparent; z-index: 2000; position: relative;
}
.intro-content { text-align: center; display: flex; flex-direction: column; align-items: center; transform-origin: center center; }
.intro-name {
  font-size: clamp(3rem, 7vw, 7rem); font-weight: 800; line-height: 1.1;
  background: linear-gradient(135deg, var(--intro-text), var(--accent));
  -webkit-background-clip: text; color: transparent; margin-bottom: 10px; white-space: nowrap;
}
.intro-role { font-size: clamp(1rem, 2vw, 1.8rem); color: var(--accent); letter-spacing: 0.3em; text-transform: uppercase; font-weight: 600; }

/* --- NAVBAR --- */
.nav {
  position: fixed; top: -100px; left: 50%; transform: translateX(-50%);
  width: min(1120px, 90%); padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  z-index: 100; opacity: 0;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; color: var(--text);}
.nav-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent-glow); }
.nav-links { display: flex; gap: 16px; font-size: 13px; font-weight: 600; align-items: center;}
.nav-link { padding: 8px 16px; border-radius: 999px; border: 1px solid transparent; color: var(--muted); transition: 0.3s; }
.nav-link:hover { color: var(--text); background: var(--hover-bg); }
.nav-link.primary { border-color: rgba(0, 242, 255, 0.4); color: var(--accent); background: rgba(0, 242, 255, 0.05); }
.nav-link.primary:hover { background: var(--accent); color: var(--bg); box-shadow: 0 0 20px var(--accent-glow); }

/* Theme Toggle Button & Animation */
#theme-toggle {
  background: none; border: none; cursor: pointer; font-size: 1.4rem;
  padding: 5px 10px; outline: none; transition: transform 0.3s;
}
#theme-toggle:hover { transform: scale(1.15); }

.theme-btn-spin {
  animation: spin-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes spin-pop {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.4) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

/* --- HERO --- */
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 24px; }
.hero-kicker span { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 16px rgba(47,211,156,0.8); }
.hero-title { font-size: clamp(40px, 5vw, 56px); line-height: 1.1; margin-bottom: 20px; }
.hero-subtitle { font-size: 16px; max-width: 520px; margin-bottom: 32px; color: var(--muted); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; margin-bottom: 40px; }
.hero-meta span { padding: 8px 14px; border-radius: 999px; }

.btn { padding: 12px 28px; border-radius: 999px; font-size: 15px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); box-shadow: 0 0 30px var(--accent-glow); transform: translateY(-2px); color: var(--bg);}
.btn-ghost { color: var(--text); border-color: var(--glass-border); }
.btn-ghost:hover { background: var(--hover-bg); transform: translateY(-2px); }

/* Portrait */
.hero-portrait-card { padding: 20px; position: relative; }
.portrait-inner { border-radius: 16px; overflow: hidden; position: relative; border: 1px solid var(--glass-border); aspect-ratio: 4/5; }
.portrait-inner img { width: 100%; height: 100%; object-fit: cover; }
.portrait-gradient { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 50%); }
.portrait-caption { position: absolute; bottom: 20px; left: 20px; right: 20px; color: #fff;}
.floating-pill { position: absolute; padding: 10px 20px; border-radius: 999px; font-size: 12px; font-weight: 600; z-index: 10; color: var(--text);}
.floating-pill span { color: var(--accent); }

/* --- TIMELINE --- */
.timeline-grid { display: grid; grid-template-columns: 0.5fr 1.5fr; gap: 60px; }
.section-heading { font-size: 40px; margin-bottom: 16px; }
.section-tagline { font-size: 16px; color: var(--muted); max-width: 400px; }
.timeline { position: relative; padding-left: 30px; border-left: 2px solid var(--glass-border); }
.timeline-progress { position: absolute; left: -2px; top: 0; width: 2px; background: var(--accent); height: 0%; box-shadow: 0 0 10px var(--accent); }
.timeline-item { position: relative; margin-bottom: 40px; padding-left: 20px; }
.timeline-dot { position: absolute; left: -37px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); z-index: 2; transition: 0.3s; }
.timeline-item.active .timeline-dot { background: var(--accent); box-shadow: 0 0 20px var(--accent-glow); }
.timeline-card { padding: 24px; }
.timeline-card:hover { transform: translateX(10px); background: var(--hover-bg); }
.badge { padding: 4px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; border-radius: 999px; background: rgba(0, 102, 204, 0.1); border: 1px solid rgba(0, 102, 204, 0.3); color: var(--accent); }

/* --- SKILLS / SYSTEM ARCHITECTURE (FIXED ALIGNMENT) --- */
.skills-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); 
  gap: 24px; 
  margin-top: 40px; 
  align-items: stretch; /* 🛑 Forces all cards in a row to be equal height */
}

.skill-card { 
  padding: 30px 25px; 
  display: flex;
  flex-direction: column;
  height: 100%; /* 🛑 Makes the glass background stretch to fill the space */
}
.skill-card:hover { transform: translateY(-10px); }

.skill-title { 
  font-size: 0.85rem; 
  color: var(--text); 
  margin-bottom: 20px; 
  letter-spacing: 1px; 
  text-transform: uppercase; 
  font-weight: 700;
}

.skill-tags { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 12px; 
}

/* 🛑 Fixed Text Pills */
.skill-tag { 
  display: inline-flex; 
  align-items: center; 
  justify-content: center; 
  background: var(--tag-bg); 
  border: 1px solid var(--glass-border-dark); 
  color: var(--text); 
  font-size: 0.8rem; 
  padding: 8px 16px; 
  border-radius: 999px; 
  font-weight: 500;
  box-shadow: inset 1px 1px 2px rgba(255, 255, 255, 0.05), 0 2px 4px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}
.skill-tag:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* --- PROJECTS --- */
.projects-section { height: 100vh; overflow: hidden; display: flex; align-items: center; }
.projects-wrapper { display: flex; gap: 40px; padding: 0 5vw; width: max-content; align-items: center; }

.project-intro-slide {
  width: 90vw;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-card { width: 600px; padding: 40px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; }
.project-card:hover { border-color: rgba(0, 242, 255, 0.4); box-shadow: 0 30px 60px var(--shadow), 0 0 40px var(--accent-glow); }
.project-title { font-size: 28px; margin: 10px 0; }
.project-points { margin-left: 20px; margin-top: 20px; color: var(--muted); }
.project-points li { margin-bottom: 8px; }

/* --- CONTACT --- */
.contact-wrap { max-width: 800px; margin: 0 auto; text-align: center; padding: 60px; }
.contact-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 40px; }
.contact-item { padding: 12px 24px; border-radius: 999px; font-size: 14px; font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid, .timeline-grid { grid-template-columns: 1fr; }
  .hero-portrait-card { max-width: 400px; margin: 0 auto; }
  .nav-links a { display: none; } 
  .projects-wrapper { flex-direction: column; width: 100%; padding: 0; }
  .project-card { width: 100%; }
  .project-intro-slide { width: 100%; margin-bottom: 40px; }
  .projects-section { height: auto; padding: 100px 20px; overflow: visible; }
  .intro-name { font-size: 2.5rem; white-space: normal; }

}



