:root {
  /* Dark theme (default) */
  --background: #0a1026;
  --card-bg: #171f3a;
  --navbar-bg: #131b2c;
  --primary: #a259ec;
  --accent: #ffd600;
  --accent2: #19a7ce;
  --label-blue: #2d6cdf;
  --label-green: #16c79a;
  --label-orange: #ffb86c;
  --label-purple: #a259ec;
  --progress-blue: #3ca3f7;
  --progress-green: #16c79a;
  --progress-yellow: #ffd600;
  --progress-orange: #ffb86c;
  --progress-purple: #a259ec;
  --text-main: #fff;
  --text-muted: #b0b8c1;
  --border-radius: 22px;
  --box-shadow: 0 8px 32px 0 rgba(31,38,135,0.10);
  --switch-bg: #22223b;
  --switch-icon: #ffd600;
}

body.light-mode {
  background: linear-gradient(110deg, #eaf4fb 75%, #d8f5ff 98%);
  --card-bg: #fff;
  --navbar-bg: rgba(247,247,255,0.96);
  --primary: #7c3aed;
  --accent: #ffd600;
  --accent2: #19a7ce;
  --text-main: #383d56;
  --text-muted: #7b87a8;
  --border-radius: 22px;
  --box-shadow: 0 8px 32px 0 rgba(31,38,135,0.06);
}

/* General */
body {
  background: var(--background);
  color: var(--text-main);
  margin: 0;
  font-family: 'Poppins', Arial, sans-serif;
  transition: background 0.25s, color 0.25s;
}
.container {
  width: 92%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Navbar */
.navbar {
  background: var(--navbar-bg);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  z-index: 1000;
  top: 0; left: 0;
  transition: background 0.25s;
}
.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 62px;
}
.logo {
  font-size: 1.5rem;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.3px;
}
.desktop-logo {
  display: block;
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  list-style: none;
}
.nav-links li a {
  display: flex;
  align-items: center;
  gap: 0.7em;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.12rem;
  padding: 0;
  background: transparent;
  color: #b0b8c1;
  border: none;
  border-radius: 18px;
  transition: 
    color 0.18s,
    background 0.23s cubic-bezier(.77,0,.18,1),
    box-shadow 0.23s cubic-bezier(.77,0,.18,1),
    transform 0.15s cubic-bezier(.77,0,.18,1);
  position: relative;
  min-width: 106px;
  min-height: 50px;
  justify-content: center;
}
.nav-links li a.active,
.nav-links li a:hover {
  background: linear-gradient(120deg, #3a8dde 60%, #19c6e7 100%);
  color: #fff;
  box-shadow: 0 3px 18px 0 rgba(25,167,206,0.08);
  transform: scale(1.03);
}
.nav-links li a.active::after,
.nav-links li a:hover::after {
  content: "";
  display: block;
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 10px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.47);
  z-index: 2;
  animation: navactivebar 0.29s cubic-bezier(.77,0,.18,1);
}
.nav-links li a:not(.active):not(:hover)::after {
  display: none;
}

/* @keyframes navactivebar {
  from { width: 0; opacity: 0; }
  to   { width: 100%; opacity: 1; }
} */

/* Hamburger */
.mobile-nav-toggle {
  background: none;
  border: none;
  font-size: 2.2rem;
  color: var(--accent);
  cursor: pointer;
  display: none;
  margin-right: 1.3rem;
  z-index: 1020;
}

/* Sidebar (Mobile) */
.sidebar {
  position: fixed;
  top: 0;
  left: -270px;
  width: 250px;
  height: 100vh;
  background: var(--card-bg);
  box-shadow: 2px 0 16px rgba(31,38,135,0.12);
  z-index: 2000;
  transition: left 0.28s cubic-bezier(.54,0,.36,1);
  display: flex;
  flex-direction: column;
  padding-top: 1.2rem;
}
.sidebar.open {
  left: 0;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.2rem;
}
.close-btn {
  font-size: 2.1rem;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
}
.sidebar-links {
  list-style: none;
  padding: 2.2rem 1.2rem 0 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.sidebar-links li a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 1.14rem;
  font-weight: 500;
  transition: color 0.22s;
  border-radius: 7px;
  padding: 4px 0;
}
.sidebar-links li a:hover {
  color: var(--accent);
}
.sidebar-overlay {
  display: none;
  position: fixed;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(31,38,135,0.17);
  z-index: 1500;
  transition: opacity 0.2s;
}
.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* --- Theme Toggle Switch --- */
.theme-switch {
  margin-left: 1.2rem;
  margin-right: 0.4rem;
  display: flex;
  align-items: center;
  user-select: none;
}

.theme-switch input[type="checkbox"] {
  display: none;
}

.theme-slider {
  width: 52px;
  height: 28px;
  background: linear-gradient(120deg, #eaf4fb 60%, #aee2ff 100%);
  border-radius: 22px;
  box-shadow: 0 2px 14px #19a7ce22;
  position: relative;
  cursor: pointer;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  transition: background 0.27s, border 0.19s;
}

body.light-mode .theme-slider {
  background: linear-gradient(120deg, #eaf4fb 60%, #aee2ff 100%);
  border: 2px solid #aee2ff;
  box-shadow: 0 2px 14px #7c3aed22;
}
body:not(.light-mode) .theme-slider {
  background: linear-gradient(120deg, #232b4a 60%, #3a8dde 100%);
  border: 2px solid #a259ec88;
}
.theme-slider::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd600 70%, #fff 100%);
  box-shadow: 0 2px 10px #ffd60044, 0 1px 8px #7c3aed33;
  transition: left 0.27s cubic-bezier(.77,0,.18,1), background 0.22s;
  z-index: 1;
}

body.light-mode .theme-slider::before {
  background: linear-gradient(135deg, #ffd600 60%, #fff 100%);
  box-shadow: 0 2px 8px rgba(255,214,0,0.20);
}

.theme-switch input[type="checkbox"]:checked + .theme-slider::before {
  left: 27px;
  background: linear-gradient(135deg, #7c3aed 0%, #ffd600 100%);
  box-shadow: 0 2px 8px rgba(162,89,236,0.12);
}

.theme-slider .bx {
  position: absolute;
  top: 4px;
  font-size: 1.1em;
  color: #fff;
  pointer-events: none;
  opacity: 0.8;
  transition: color 0.2s;
}
.theme-slider .bx-moon { left: 8px; color: #ffe066; }
.theme-slider .bx-sun { right: 8px; color: #ffd600; }

body.light-mode .theme-slider .bx-moon {
  color: #b0b8c1;
  opacity: 0.7;
}
body.light-mode .theme-slider .bx-sun {
  color: #ffd600;
  opacity: 1;
}

/* Hero */
.hero {
  background: linear-gradient(120deg, #0e165a 0%, #171f3a 100%);
  color: var(--text-main);
  text-align: center;
  min-height: 90vh;
  display: flex;
  align-items: center;
  margin-top: 62px;
}
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.18rem;
}
.profile-img {
  width: 145px;
  height: 145px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--accent);
  margin-bottom: 1rem;
  background: var(--card-bg);
}
.highlight {
  color: var(--primary);
  font-weight: 700;
}
.subtitle {
  font-size: 1.12rem;
  margin-bottom: 1.1rem;
  color: var(--accent);
  opacity: 0.94;
}
.social-links {
  display: flex;
  gap: 1.1rem;
  justify-content: center;
  margin-bottom: 1.2rem;
}
.social-links a {
  color: var(--accent2);
  background: var(--card-bg);
  border-radius: 50%;
  padding: 0.47rem;
  font-size: 1.25rem;
  box-shadow: 0 2px 6px rgba(20,108,148,0.05);
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}
.social-links a:hover {
  background: var(--accent2);
  color: var(--background);
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--background);
  padding: 0.8rem 2.1rem;
  border: none;
  border-radius: 24px;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(25,167,206,0.10);
  transition: background 0.2s, color 0.2s;
  margin: 1.1rem 0;
}
.btn:hover {
  background: var(--primary);
  color: var(--accent);
}

/* Section/Card (unified glassy card for about, skills, contact) */
.section,
.skills-section-card,
.contact-section-card {
  background: rgba(58, 141, 222, 0.10);
  border-radius: var(--border-radius);
  box-shadow: 0 8px 32px 0 rgba(25,167,206,0.15), 0 2px 32px 0 rgba(162,89,236,0.11);
  border: 1.8px solid rgba(162,89,236,0.18);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  padding: 2.2rem 1.7rem;
  margin: 2rem 0;
  transition:
    box-shadow 0.22s cubic-bezier(.77,0,.18,1),
    background 0.22s cubic-bezier(.77,0,.18,1),
    border 0.22s cubic-bezier(.77,0,.18,1),
    transform 0.17s cubic-bezier(.77,0,.18,1);
  position: relative;
  z-index: 1;
}
.section:hover,
.skills-section-card:hover,
.contact-section-card:hover {
  background: linear-gradient(120deg, rgba(58, 141, 222, 0.13) 75%, rgba(25,198,231,0.14) 100%);
  border: 2px solid var(--accent2);
  box-shadow: 0 12px 44px 0 rgba(25,167,206,0.21), 0 2px 44px 0 rgba(162,89,236,0.13);
  transform: translateY(-6px) scale(1.018);
  z-index: 2;
}
.section h2,
.skills-section-card h2,
.contact-section-card h2 {
  text-align: center;
  color: var(--primary);
  margin-bottom: 1.4rem;
}

/* --- About Card Styling inside glassy card --- */
.about-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 2.5rem;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  margin-bottom: 1.5rem;
  margin-top: 1.2rem;
}

.about-card-photo {
  flex: 0 0 160px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.about-img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
  background: var(--card-bg);
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.about-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-title {
  font-size: 1.7rem;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.about-highlight {
  color: var(--accent);
}

.about-description {
  font-size: 1.13rem;
  color: var(--text-main);
  margin-bottom: 0.8rem;
  line-height: 1.7;
}

.about-info-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.7rem 0;
  color: var(--text-muted);
  font-size: 1.06rem;
}

.about-info-list li {
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-info-list i {
  color: var(--accent2);
  font-size: 1.2em;
}

.about-tags {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.about-tag {
  background: var(--accent2);
  color: #fff;
  border-radius: 7px;
  padding: 0.36em 1.1em;
  font-size: 1.02em;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(25,167,206,0.09);
  transition: background 0.2s, color 0.18s;
}
.about-tag-exp { background: var(--label-blue); }
.about-tag-proj { background: var(--label-purple); }
.about-tag-support { background: var(--label-green); }
.about-tag:hover {
  background: var(--primary);
  color: var(--accent);
}

.about-education {
  margin-top: 1.3rem;
  background: linear-gradient(100deg, rgba(25,167,206,0.13) 0%, rgba(162,89,236,0.11) 100%);
  border-radius: 15px;
  padding: 1.2rem 1.3rem 1.2rem 1.3rem;
  box-shadow: 0 2px 11px rgba(25,167,206,0.09);
}

.about-education h4 {
  margin: 0 0 0.7em 0;
  color: var(--primary);
  font-size: 1.19em;
  letter-spacing: 0.03em;
  font-weight: 600;
  text-shadow: 0 1px 9px rgba(162,89,236,0.10);
}

.about-education ul {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--text-main);
  font-size: 1.07em;
}

.about-education li {
  margin-bottom: 0.55em;
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  position: relative;
  padding-left: 1.4em;
}
.about-education li::before {
  content: "";
  display: block;
  position: absolute;
  left: 0.2em;
  top: 0.5em;
  width: 0.7em;
  height: 0.7em;
  background: linear-gradient(135deg, var(--primary) 60%, var(--accent2) 100%);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(162,89,236,0.09);
}
.about-education span {
  color: var(--accent2);
  font-weight: 500;
}

@media (max-width: 800px) {
  .about-education {
    padding: 0.8rem 0.7rem;
  }
}

/* Skills */
.skills-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.6rem;
}
.skill {
  margin-bottom: 1.2rem;
}
.skill span {
  font-weight: 500;
  color: var(--accent);
  font-size: 1.12rem;
}
.skill-bar {
  background: rgba(162, 89, 236, 0.10);
  border-radius: 9px;
  height: 15px;
  width: 100%;
  margin-top: 0.47rem;
  overflow: hidden;
  box-shadow: 0 3px 15px rgba(162,89,236,0.10);
}
.skill-level {
  background: linear-gradient(90deg, var(--accent), var(--primary));
  height: 100%;
  width: 0;
  border-radius: 9px;
  transition: width 1.1s cubic-bezier(.77,0,.18,1);
}

/* Projects */
.projects .project-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 2.2rem 3.5rem;
  justify-items: start;
  align-items: flex-start;
  width: 80%;
  margin: 0 auto;
  padding-bottom: 0;
  overflow-x: unset;
  scroll-behavior: unset;
}
.project-card {
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(20,108,148,0.08);
  padding: 1.4rem 1.2rem 1.3rem 1.2rem;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  transition: 
    box-shadow 0.22s cubic-bezier(.77,0,.18,1),
    transform 0.18s cubic-bezier(.77,0,.18,1),
    background 0.22s;
  border: 2px solid transparent;
}
.project-card:hover {
  transform: translateY(-7px) scale(1.03);
  box-shadow: 0 8px 28px 0 rgba(25,167,206,0.19), 0 2px 32px 0 rgba(162,89,236,0.13);
  border: 2px solid var(--accent);
  background: linear-gradient(120deg, var(--card-bg) 80%, rgba(255,214,0,0.07) 100%);
  z-index: 2;
}
.project-card h3 {
  color: var(--accent);
  font-size: 1.25rem;
  font-weight: 500;
  margin-bottom: 0.18rem;
  letter-spacing: 0.02em;
}

.project-card a {
  color: var(--primary);
  background: none;
  font-weight: 600;
  text-decoration: underline;
  align-self: flex-start;
  padding: 0;
  border-radius: 0;
  margin-top: 0.12rem;
  transition: color 0.18s;
  font-size: 1rem;
  box-shadow: none;
}

.project-card a:hover {
  color: var(--accent);
  background: none;
  text-decoration: underline;
}

/* Contact Form Styling */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: 440px;
  margin: 0 auto 1.5rem auto;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.contact-form input, .contact-form textarea {
  padding: 1.1rem;
  border: 1.6px solid rgba(162,89,236,0.20);
  border-radius: 16px;
  background: rgba(25, 30, 55, 0.31);
  color: var(--text-main);
  font-size: 1.11rem;
  font-family: inherit;
  transition: border 0.22s, background 0.22s;
}
body.light-mode .contact-form input,
body.light-mode .contact-form textarea {
  background: #f1f4fa;
  color: var(--text-main);
}
.contact-form input:focus, .contact-form textarea:focus {
  border: 1.7px solid var(--accent2);
  background: rgba(58, 141, 222, 0.12);
  outline: none;
}
.contact-form textarea {
  resize: vertical;
}

.contact-form button,
.contact-form input[type="submit"] {
  background: var(--accent);
  color: var(--card-bg);
  font-weight: 700;
  font-size: 1.18rem;
  border: none;
  border-radius: 30px;
  margin-top: 0.8rem;
  padding: 0.96rem 0;
  box-shadow: 0 2px 8px rgba(255,214,0,0.06);
  transition: background 0.22s, color 0.18s, transform 0.14s;
  cursor: pointer;
}
.contact-form button:hover,
.contact-form input[type="submit"]:hover {
  background: var(--primary);
  color: var(--accent);
  transform: scale(1.03);
}

/* Contact Info */
.contact-info {
  text-align: center;
  color: var(--text-muted);
  margin-top: 1.2rem;
  background: none;
  box-shadow: none;
  border: none;
  font-size: 1.09rem;
}
.contact-info i {
  color: var(--accent);
  margin-right: 0.4rem;
  font-size: 1.23em;
}

/* Footer */
footer {
  background: var(--navbar-bg);
  color: var(--text-main);
  padding: 1.2rem 0;
  text-align: center;
}
.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  align-items: center;
}
.footer-content div a {
  color: var(--accent2);
  margin: 0 0.45rem;
  font-size: 1.45rem;
  transition: color 0.2s;
}
.footer-content div a:hover {
  color: var(--accent);
}

/* Responsive */
@media (max-width: 1100px) {
  .container { max-width: 98vw; }
  .projects .project-cards {
    gap: 1.2rem;
  }
  .project-card {
    min-width: 260px;
    max-width: 320px;
    flex: 1 1 260px;
  }
}
@media (max-width: 900px) {
  .nav-links, .desktop-logo {
    display: none;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .projects .project-cards {
    grid-template-columns: 1fr;
    width: 98%;
    gap: 1.2rem 0;
  }
  .section,
  .skills-section-card,
  .contact-section-card {
    padding: 1.2rem 0.7rem;
    margin: 1.1rem 0;
  }
  .about-card-photo {
    flex: 0 0 100px;
  }
  .about-img {
    width: 80px;
    height: 80px;
  }
}
  .about-content, .about-extra {
    flex-direction: column;
    align-items: flex-start;
  }
  .about-extra {
    gap: 1.1rem;
  }
  .projects .project-cards {
    flex-direction: column;
    align-items: center;
  }

@media (max-width: 700px) {
  .hero-content h1 {
    font-size: 1.23rem;
  }
  .section,
  .skills-section-card,
  .contact-section-card {
    padding: 1.05rem 0.22rem;
  }
  .projects .project-cards {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding-bottom: 8px;
  }
  .project-card {
    min-width: 85vw;
    max-width: 95vw;
    flex: 0 0 auto;
  }
}