/* ===========================
   CSS VARIABLES — DARK THEME
   =========================== */
:root {
  --bg: #080d1a;
  --bg2: #0d1426;
  --surface: rgba(255, 255, 255, 0.04);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-hover: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-border-hover: rgba(37, 99, 235, 0.45);
  --accent: #2563eb;
  --accent2: #60a5fa;
  --accent-rgb: 37, 99, 235;
  --text: #f0f4ff;
  --text2: #8b9dc3;
  --text3: #4d6080;
  --nav-bg: rgba(8, 13, 26, 0.8);
  --shadow: rgba(0, 0, 0, 0.4);
}

.light-theme {
  --bg: #f0f4ff;
  --bg2: #e8edf8;
  --glass: rgba(255, 255, 255, 0.7);
  --glass-hover: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(37, 99, 235, 0.15);
  --glass-border-hover: rgba(37, 99, 235, 0.5);
  --text: #0d1426;
  --text2: #3d5080;
  --text3: #8b9dc3;
  --nav-bg: rgba(240, 244, 255, 0.85);
  --shadow: rgba(37, 99, 235, 0.1);
}


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

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
strong { font-weight: 500; color: var(--text); }

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
}

section {
  padding: 30px 0;
}


.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
.orb1 { width: 600px; height: 600px; background: #2563eb; top: -200px; right: -150px; }
.orb2 { width: 500px; height: 500px; background: #1d4ed8; bottom: 50px; left: -200px; }
.light-theme .bg-orb { opacity: 0.08; }


nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.3s, border-color 0.3s;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.5px;
  color: var(--text);
}
.nav-logo span { color: var(--accent2); }

.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent2);
  border-radius: 2px;
  transition: width 0.25s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text2);
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.theme-toggle:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  width: 38px; height: 38px;
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
  transition: border-color 0.2s;
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--text2);
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


.section-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 8px;
}
h2 {
  font-family: 'Syne', sans-serif;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 12px;
}
.divider {
  width: 40px; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  margin-bottom: 36px;
}


.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 22px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s, transform 0.25s, background 0.25s;
}
.glass-card:hover {
  border-color: var(--glass-border-hover);
  background: var(--glass-hover);
  transform: translateY(-3px);
}


.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  gap: 60px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 100px 32px 80px;
}

.hero-text { flex: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 13px;
  color: var(--accent2);
  margin-bottom: 24px;
  font-weight: 500;
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.4); }
}

h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2.5px;
  margin-bottom: 20px;
  color: var(--text);
}
.grad {
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.light-theme .grad {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--accent) 60%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  color: var(--text2);
  font-size: 17px;
  max-width: 420px;
  padding-bottom: 40px ;
  margin-bottom: 56px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-btns {
  display: flex;
  gap: 24px;
  margin: 20px 0 40px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'DM Sans', sans-serif;
}
.grad {
  background: linear-gradient(135deg, #fff 0%, var(--accent2) 50%, #93c5fd 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.light-theme .grad {
  background: linear-gradient(135deg, #1e3a8a 0%, var(--accent) 60%, #1d4ed8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--glass);
  color: var(--text);
  border: 1px solid var(--glass-border);
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
  font-family: 'DM Sans', sans-serif;
}
.btn-ghost:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  transform: translateY(-2px);
}
.btn-primary:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}


.hero-img {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero-img-ring {
  width: 200px; height: 200px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #93c5fd);
  padding: 3px;
  box-shadow: 0 0 50px rgba(37, 99, 235, 0.3);
}
.hero-img-ring img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg2);
}
.hero-social {
  display: flex;
  gap: 10px;
}
.social-pill {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--text2);
  transition: all 0.2s;
}
.social-pill:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  transform: translateY(-3px);
}


#about { position: relative; z-index: 1; }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
}
.card-icon {
  font-size: 20px;
  color: var(--accent2);
  margin-bottom: 10px;
}
.card-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.card-val {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.about-bio {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.85;
  font-weight: 300;
  max-width: 680px;
}


#stack { position: relative; z-index: 1; }

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 14px;
}
.stack-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: default;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.stack-card:hover {
  border-color: var(--glass-border-hover);
  background: rgba(37, 99, 235, 0.08);
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}
.stack-card img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(37, 99, 235, 0.2));
  transition: filter 0.2s;
}
.stack-card:hover img {
  filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.4));
}
.light-theme .stack-card img {
  filter: none;
}
.stack-card span {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  letter-spacing: 0.3px;
}


#projects { position: relative; z-index: 1; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}
.project-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.project-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-5px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.project-card:hover::before { opacity: 1; }

.proj-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}
.proj-icon {
  width: 42px; height: 42px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--accent2);
}
.proj-icon-link {
  color: var(--text3);
  font-size: 16px;
  transition: color 0.2s, transform 0.2s;
}
.proj-icon-link:hover {
  color: var(--accent2);
  transform: translateY(-2px);
}
.proj-title {
  font-family: 'Syne', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.proj-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.65;
  margin-bottom: 18px;
  font-weight: 300;
}
.proj-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.tag {
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--accent2);
  font-size: 11px;
  padding: 3px 11px;
  border-radius: 20px;
  font-weight: 500;
}


#formation { position: relative; z-index: 1; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}
.timeline-item {
  display: flex;
  gap: 22px;
  padding-bottom: 36px;
  position: relative;
}
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 19px; top: 42px; bottom: 0;
  width: 1px;
  background: var(--glass-border);
}
.timeline-dot {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
  position: relative;
  z-index: 1;
}
.timeline-content { flex: 1; }
.tl-inst {
  font-size: 12px;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.tl-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.tl-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
  font-weight: 300;
}
.tl-badge {
  display: inline-block;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.22);
  color: var(--accent2);
  font-size: 11px;
  padding: 3px 12px;
  border-radius: 20px;
  margin-top: 12px;
  font-weight: 500;
}


#contact { position: relative; z-index: 1; }

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 18px 22px;
  transition: all 0.25s;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.contact-link:hover {
  border-color: var(--glass-border-hover);
  transform: translateX(6px);
  background: var(--glass-hover);
}
.contact-link-icon {
  width: 44px; height: 44px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent2);
  flex-shrink: 0;
}
.contact-link-info {
  flex: 1;
}
.contact-link-info small {
  display: block;
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 2px;
}
.contact-link-info span {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.contact-arrow {
  color: var(--text3);
  font-size: 13px;
  transition: transform 0.2s, color 0.2s;
}
.contact-link:hover .contact-arrow {
  transform: translateX(4px);
  color: var(--accent2);
}


footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--glass-border);
  padding: 28px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text3);
  font-size: 13px;
}


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


@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 64px; left: 0; right: 0;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid var(--glass-border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 16px 32px;
    border-bottom: 1px solid var(--glass-border);
  }
  .nav-links a::after { display: none; }
  .hamburger { display: flex; }

  .hero {
    flex-direction: column-reverse;
    text-align: center;
    padding-top: 120px;
    min-height: auto;
    gap: 36px;
  }
  .hero-sub { margin: 0 auto 32px; }
  .hero-btns { justify-content: center; }
  .hero-img { width: 100%; align-items: center; }

  .about-grid { grid-template-columns: 1fr 1fr; }
  .stack-grid { grid-template-columns: repeat(3, 1fr); }
  .projects-grid { grid-template-columns: 1fr; }

  h2 { font-size: 26px; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  .about-grid { grid-template-columns: 1fr; }
  .stack-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { letter-spacing: -1.5px; }
}
