/* --- CSS VARIABLES --- */
:root {
  /* LIGHT MODE (Default) - Clean, SaaS, Professional */
  --bg-primary: #F8FAFC;
  --bg-secondary: #F1F5F9;
  --surface: #FFFFFF;
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;
  --accent: #2563EB; /* Trustworthy Royal Blue */
  --accent-hover: #1D4ED8;
  --border: #E2E8F0;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --nav-bg: rgba(255, 255, 255, 0.85);
}

[data-theme="dark"] {
  /* DARK MODE - Sleek IDE style */
  --bg-primary: #0B1120;
  --bg-secondary: #0F172A;
  --surface: #1E293B;
  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent: #3B82F6; 
  --accent-hover: #60A5FA;
  --border: #334155;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
  --nav-bg: rgba(11, 17, 32, 0.85);
}

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, strong {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.2;
}

/* Code & Data Font */
.nav-logo, .section-label, .badge, .tag, .stat-number, .skill-title {
  font-family: 'Fira Code', monospace;
}

/* --- LAYOUT UTILITIES --- */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 6rem 0;
}

.bg-alt {
  position: relative;
}
.bg-alt::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background-color: var(--bg-secondary);
  z-index: -1;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

/* --- COMPONENTS --- */

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn-primary {
  background-color: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
}
.btn-primary:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--text-primary);
  background-color: var(--bg-secondary);
}

/* Badges & Tags */
.badge, .tag {
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.badge.blue { color: #2563EB; background: rgba(37, 99, 235, 0.1); border-color: rgba(37, 99, 235, 0.2); }
.badge.amber { color: #D97706; background: rgba(217, 119, 6, 0.1); border-color: rgba(217, 119, 6, 0.2); }
[data-theme="dark"] .badge.blue { color: #60A5FA; }
[data-theme="dark"] .badge.amber { color: #FBBF24; }

/* --- NAVIGATION --- */
nav {
  position: fixed;
  top: 0; width: 100%;
  background: var(--nav-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  z-index: 100;
  transition: background-color 0.3s ease;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

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

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover {
  color: var(--accent);
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background 0.2s;
}
.theme-toggle:hover {
  background: var(--bg-secondary);
  color: var(--accent);
}

[data-theme="dark"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun { display: none; }

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}
.hamburger, .hamburger::before, .hamburger::after {
  display: block; width: 20px; height: 2px;
  background: var(--text-primary);
  position: relative; transition: 0.3s;
}
.hamburger::before { content: ''; top: -6px; }
.hamburger::after { content: ''; top: 6px; }

/* --- HERO SECTION --- */
.hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 4rem;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 4.5rem);
  letter-spacing: -0.03em;
  margin: 1rem 0;
}

.accent-text {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.cta-row {
  display: flex;
  gap: 1rem;
}

/* --- ABOUT SECTION --- */
.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
}

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

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-number {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* --- EDUCATION SECTION --- */
.edu-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.status {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}
.status-complete { background: rgba(16, 185, 129, 0.1); color: #059669; }
.status-progress { background: rgba(59, 130, 246, 0.1); color: #2563EB; }

.edu-school {
  color: var(--accent);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* --- SKILLS SECTION --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.skill-list {
  list-style: none;
  margin-top: 1.5rem;
}

.skill-list li {
  margin-bottom: 1.2rem;
  font-size: 0.9rem;
}

.skill-list span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--text-primary);
  font-weight: 500;
}

.bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  width: 0; /* Animated via JS */
  transition: width 1s ease-out;
}

/* --- PROJECTS SECTION --- */
.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.featured {
  grid-column: 1 / -1;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.project-title {
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.project-bullets {
  margin-top: 1rem;
  padding-left: 1.2rem;
  font-size: 0.9rem;
}
.project-bullets li {
  margin-bottom: 0.5rem;
}

/* --- CONTACT SECTION --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-intro {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.2s;
  background: var(--surface);
}
.contact-link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.alignment-card h3 {
  margin-bottom: 1.5rem;
  color: var(--accent);
}

.checklist {
  list-style: none;
}
.checklist li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.checklist li:last-child {
  border-bottom: none;
}

/* --- FOOTER --- */
footer {
  text-align: center;
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 6rem;
  background: var(--bg-secondary);
}
.footer-logo {
  font-family: 'Fira Code', monospace;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.footer-content p {
  font-size: 0.85rem;
}

/* --- ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease-out;
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
  .about-grid, .edu-cards, .skills-grid, .projects-grid, .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero h1 { font-size: 2.5rem; }
  section { padding: 4rem 0; }
}