:root {
  /* Light Theme */
  --background: #cde6f3;
  --foreground: #475569;
  --card: #98c9cba0;
  --card-foreground: #164e63;
  --primary: #164e63;
  --primary-foreground: #ffffff;
  --secondary: #d97706;
  --secondary-foreground: #ffffff;
  --muted: #f9fafb;
  --muted-foreground: #475569;
  --accent: #d97706;
  --border: #e5e7eb;
  --input: #f9fafb;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);

  /* Toggle specific */
  --toggle-width: 60px;
  --toggle-height: 30px;
  --knob-size: 26px;
  --track-light: var(--card);
  --track-dark: #243447; /* used when dark */
  --knob-bg-light: #ffffff;
  --knob-bg-dark: #ffffff; /* keep white knob for contrast like images */
  --track-border: var(--border);
}

/* Dark theme variables */
[data-theme="dark"] {
  --background: #0f172a;
  --foreground: #e2e8f0;
  --card: #1e293b;
  --card-foreground: #e2e8f0;
  --primary: #0ea5e9;
  --primary-foreground: #ffffff;
  --secondary: #f59e0b;
  --secondary-foreground: #ffffff;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #f59e0b;
  --border: #334155;
  --input: #1e293b;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);

  /* toggle specific override */
  --track-light: #334155;
}

/* navbar dark background tweak (keeps your rule) */
[data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95) !important;
}

/* Theme Toggle (track) */
.theme-toggle {
  --w: var(--toggle-width);
  --h: var(--toggle-height);
  position: relative;
  width: var(--w);
  height: var(--h);
  padding: 2px;                       /* small padding so knob fits */
  border-radius: 999px;
  border: 1px solid var(--track-border);
  background: var(--track-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  cursor: pointer;
  transition: background 300ms ease, transform 160ms ease;
  overflow: visible;
}

/* hover scale effect (keeps your hover) */
.theme-toggle:hover {
  transform: scale(1.03);
}

/* faint sun/moon at edges */
.theme-toggle .sun-icon,
.theme-toggle .moon-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
  transition: opacity 220ms ease;
  user-select: none;
  line-height: 1;
}

/* left sun, right moon */
.theme-toggle .sun-icon { left: 8px; }
.theme-toggle .moon-icon { right: 8px; }

/* reduced opacity of 'inactive' icons */
[data-theme="dark"] .sun-icon { opacity: 0.25; }
[data-theme="light"] .sun-icon { opacity: 1; }

[data-theme="light"] .moon-icon { opacity: 0.25; }
[data-theme="dark"] .moon-icon { opacity: 1; }

/* the knob */
.toggle-knob {
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translate(0, -50%);
  width: var(--knob-size);
  height: var(--knob-size);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--knob-bg-light);
  box-shadow: 0 2px 6px var(--shadow);
  transition: transform 300ms cubic-bezier(.2,.9,.3,1), background 200ms ease, box-shadow 200ms ease;
}

/* knob icon (emoji) */
.knob-icon {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  width: 100%;
  text-align: center;
  transform: translateY(0);
  transition: transform 180ms ease, opacity 180ms ease;
}

/* when dark theme is active: move knob to right */
[data-theme="dark"] .toggle-knob {
  transform: translate(calc(var(--w) - var(--knob-size) - 4px), -50%);
  /* optionally darken the track */
  background: var(--track-light);
}

/* Optionally add a subtle inner ring in dark mode (like the moon outline) */
[data-theme="dark"] .toggle-knob {
  box-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

/* Accessibility focus styles */
.theme-toggle:focus {
  outline: 3px solid rgba(21, 128, 61, 0.12);
  outline-offset: 3px;
}

/* Keep older rules for mobile menu etc. */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

/* small adjustments for very small screens (optional) */
@media (max-width:420px){
  :root { --toggle-width: 54px; --toggle-height: 28px; --knob-size: 24px; }
  .theme-toggle .sun-icon, .theme-toggle .moon-icon { font-size: 12px; }
  .knob-icon { font-size: 13px; }
}




/* CSS Variables for Theme Switching */
/* Light Theme */
/* :root {
  
  --background: #cde6f3;
  --foreground: #475569;
  --card: #75b7bba0;
  --card-foreground: #164e63;
  --primary: #164e63;
  --primary-foreground: #ffffff;
  --secondary: #d97706;
  --secondary-foreground: #ffffff;
  --muted: #f9fafb;
  --muted-foreground: #475569;
  --accent: #d97706;
  --border: #e5e7eb;
  --input: #f9fafb;
  --shadow: rgba(0, 0, 0, 0.1);
  --shadow-hover: rgba(0, 0, 0, 0.15);
} */

/* Dark Theme */

/* [data-theme="dark"] {
  
  --background: #0f172a;
  --foreground: #e2e8f0;
  --card: #1e293b;
  --card-foreground: #e2e8f0;
  --primary: #0ea5e9;
  --primary-foreground: #ffffff;
  --secondary: #f59e0b;
  --secondary-foreground: #ffffff;
  --muted: #334155;
  --muted-foreground: #94a3b8;
  --accent: #f59e0b;
  --border: #334155;
  --input: #1e293b;
  --shadow: rgba(0, 0, 0, 0.3);
  --shadow-hover: rgba(0, 0, 0, 0.4);
} */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(156, 191, 212, 0.95) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s ease;
}

/* [data-theme="dark"] .navbar {
  background: rgba(15, 23, 42, 0.95) !important;
} */

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Theme Toggle */
/* .theme-toggle {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  position: relative;
  width: 60px;
  height: 30px;
}

.theme-toggle:hover {
  transform: scale(1.05);
}

.sun-icon, .moon-icon {
  font-size: 0.9rem;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] .sun-icon {
  opacity: 0.3;
}

[data-theme="light"] .moon-icon,
:root .moon-icon {
  opacity: 0.3;
} */

/* Mobile Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--foreground);
  margin: 3px 0;
  transition: 0.3s;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 70px;
  position: relative;
  overflow: hidden;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.highlight {
  color: var(--primary);
  position: relative;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 15px rgba(22, 78, 99, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(22, 78, 99, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-2px);
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.floating-card {
  background: var(--card);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 20px 40px var(--shadow);
  animation: float 6s ease-in-out infinite;
  border: 1px solid var(--border);
}

.profile-image {
  width: 250px;
  height: 300px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  position: relative;
}

.profile-image::after {
  /* content: '👨‍💻'; */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 4rem;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-arrow {
  width: 2px;
  height: 30px;
  background: var(--primary);
  position: relative;
}

.scroll-arrow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -5px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid var(--primary);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--foreground);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

/* About Section */
.about {
  background: var(--muted);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  align-items: start;
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: var(--background);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.skill-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px var(--shadow-hover);
}

.skill-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.skill-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--foreground);
}

.skill-card p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.skill-bar {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 3px;
  width: 0;
  transition: width 1s ease-in-out;
}

/* Projects Section */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--card);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-hover);
}

.project-image {
  height: 200px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  position: relative;
  overflow: hidden;
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 1rem;
}

.project-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid white;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.project-link:hover {
  background: white;
  color: var(--primary);
}

.project-content {
  padding: 2rem;
}

.project-content h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--card-foreground);
}

.project-content p {
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  text-align: justify;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 0.25rem 0.75rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
}

/* Contact Section */
.contact {
  background: var(--muted);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.contact-info p {
  color: var(--muted-foreground);
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--muted-foreground);
}

.contact-icon {
  font-size: 1.2rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.social-link:hover {
  color: var(--accent);
}

/* Contact Form */
.contact-form {
  background: var(--background);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px var(--shadow);
  border: 1px solid var(--border);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input);
  color: var(--foreground);
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 78, 99, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Footer */
.footer {
  background: var(--card);
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer p {
  color: var(--muted-foreground);
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary);
  color: var(--primary-foreground);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--shadow-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--background);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px var(--shadow);
    padding: 2rem 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-title {
    padding-top: 25px;
    font-size: 2.5rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 200px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .nav-container {
    padding: 0 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.6s ease;
}

.slide-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.6s ease;
}

.slide-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Certificates Section */
.certificates {
  background: var(--muted);
  padding: 5rem 0;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.certificate-card {
  background: var(--card);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 10px 30px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border);
}

.certificate-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px var(--shadow-hover);
}

.certificate-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--card-foreground);
}

.certificate-card p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.certificate-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary);
  border-radius: 25px;
  transition: all 0.3s ease;
  display: inline-block;
}

.certificate-link:hover {
  background: var(--primary);
  color: var(--primary-foreground);
}

/* Responsive Design */
@media (max-width: 768px) {
  .certificates-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .certificate-card {
    padding: 1.5rem;
  }

  .certificate-card h3 {
    font-size: 1.2rem;
  }

  .certificate-link {
    padding: 0.5rem 0.75rem;
  }
}