/* === Base Styles === */
body {
  margin: 0;
  font-family: 'Orbitron', sans-serif;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #000;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s ease, color 0.4s ease;
  position: relative;
}

/* Default light theme image */
body[data-theme="light"] {
  background-image: url('assets/images/bg-light.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: #000;
}
/* Dark mode theme image */
body[data-theme="dark"] {
  background-image: url('assets/images/bg-dark.jpg');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  color: #fff;
}

/* Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: rgba(0, 0, 0, 0.35);
  /* Default for light */
  z-index: -1;
  pointer-events: none;
}

/* Dark overlay */
body[data-theme="dark"]::before {
  background: rgba(0, 0, 0, 0.5);
}

html {
  scroll-behavior: smooth;
}

/* === Scroll Progress Bar === */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 5px;
  background: cyan;
  width: 0%;
  z-index: 9999;
  transition: width 0.25s ease;
}

/* === Custom Cursor === */
@media (hover: hover) and (pointer: fine) {
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid white; /* This makes it feel thicker */
    border-radius: 50%;
    pointer-events: none;
    mix-blend-mode: difference;
    z-index: 9999;
    transition: transform 0.1s ease;
  }

  .custom-cursor.click {
    transform: scale(2);
    background: cyan;
  }
}

/* === Loader === */
#loader {
  position: fixed;
  width: 100vw;
  height: 100vh;
  background: #0f0f0f;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid cyan;
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* === Navbar === */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.6);
  /* 60% transparent */
  backdrop-filter: blur(5px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s;
}
/* Light mode */

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links li {
  list-style: none;
  display: inline-block;
  margin: 0 1rem;
  transition: transform 0.3s;
}

.nav-links li:hover {
  transform: scale(1.1);
  color: cyan;
}

.logo {
  /* Give it a little padding to align vertically */
  padding-top: 5px;
}

.logo img {
  height: 35px;
  width: 35px; /* Make it square */
  
  /* This is the fix: */
  background: white; /* Adds a white background */
  border-radius: 50%; /* Makes it a circle */
  padding: 2px; /* Small space between logo and white edge */
  
  transition: transform 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3); /* Adds a subtle glow */
}

.logo img:hover {
  transform: scale(1.1) rotate(5deg);
}

/* === Theme Toggle Button === */
#theme-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: cyan;
  margin-left: 1rem;
  transition: transform 0.2s ease;
}

#theme-toggle:hover {
  transform: rotate(20deg) scale(1.1);
}

/* === Sections === */
.section {
  padding: 4rem 2rem;
  text-align: center;
}

.section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section ul {
  list-style: none;
  padding-left: 0;
}

.section li {
  font-size: 1.1rem;
  margin: 0.5rem 0;
}

.section h3 {
  margin-top: 2rem;
  color: cyan;
}

/* === Hero Section === */
.hero {
  text-align: center;
  padding: 10rem 1rem;
  border-radius: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 1s ease-in-out;
  margin-top: 6rem;
  padding-top: 6rem;
}


/* Dark theme */
@media (prefers-color-scheme: dark) {
  .hero {
    background: rgba(0, 0, 0, 0.2);
    /* 80% transparent */
    color: #fff;
  }
}

/* Light theme */
@media (prefers-color-scheme: light) {
  .hero {
    background: rgba(255, 255, 255, 0.2);
    color: #000 !important;
    /* Force black text in light mode */
  }
}

.hero h1 span {
  color: cyan;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === Parallax Effect === */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* === Forms === */
form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 2rem auto;
  gap: 1rem;
}

form input,
form textarea {
  padding: 1rem;
  border-radius: 10px;
  border: none;
  font-size: 1rem;
}

form button {
  padding: 1rem;
  border: none;
  border-radius: 10px;
  background-color: cyan;
  color: black;
  font-weight: bold;
  cursor: pointer;
}

/* === Buttons === */
.btn {
  padding: 0.8rem 1.5rem;
  background: cyan;
  color: black;
  text-decoration: none;
  border-radius: 10px;
  font-weight: bold;
  transition: 0.3s;
}

.btn:hover {
  background: white;
}

/* === Project Cards === */
.project-card {
  border: none; /* Remove individual border */
  padding: 1rem;
  margin: 1.5rem auto; /* Add some space between project cards */
  background: none; /* Remove individual background */
  max-width: 600px;
  text-align: left; /* Align text left inside the box */
}

/* Add a divider line between project cards */
.project-card:not(:last-child) {
  border-bottom: 1px solid rgba(0, 255, 255, 0.3); /* Faint cyan line */
  padding-bottom: 1.5rem;
}

.project-card a {
  color: cyan;
  text-decoration: underline;
}

/* Style for the new modal trigger button */
.modal-trigger-btn {
  background: none;
  border: none;
  color: cyan;
  text-decoration: underline;
  font-family: 'Orbitron', sans-serif;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  padding-top: 5px;
  transition: color 0.3s;
}

.modal-trigger-btn:hover {
  color: white;
}

body[data-theme="light"] .modal-trigger-btn {
  color: #0000ff;
}

body[data-theme="light"] .modal-trigger-btn:hover {
  color: #000;
}

/* === Footer === */
footer {
  text-align: center;
  padding: 2rem 0;
  background: rgba(0, 0, 0, 0.8);
  color: white !important;
  /* ← Forces white text */
  position: relative;
  bottom: 0;
  width: 100%;
}


/* === Responsive Design === */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    flex-direction: column;
    padding: 0;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .hero {
    padding: 5rem 1rem;
  }

  form {
    width: 90%;
  }
}

body[data-theme="light"] {
  /* background: #ffffff; <-- REMOVED this line, it was breaking your image */
  color: #000000; /* This sets default text to black */
}

/* This rule fixes the Hero section text */
body[data-theme="light"] .hero {
  background: linear-gradient(45deg, #f2f2f2, #ffffff);
  color: #000; /* ADDED this line to make hero text black */
}

body[data-theme="light"] .hero h1 span {
  color: #0000ff;
}

/* This rule fixes the Navbar background and logo */
body[data-theme="light"] .navbar {
  background: rgba(255, 255, 255, 0.9);
}
body[data-theme="light"] .logo {
  color: #111; /* Makes logo black */
}

/* This rule fixes the nav links */
body[data-theme="light"] .nav-links a {
  color: #000; /* Makes nav links black */
}
body[data-theme="light"] .nav-links a:hover {
  color: #0000ff; /* Makes nav links blue on hover */
}

/* This rule fixes the "Download Resume" button */
body[data-theme="light"] .btn {
  background: #000;
  color: #fff;
}

/* This rule fixes the theme toggle icon */
body[data-theme="light"] #theme-toggle {
  color: #000;
}

#certifications {
  padding: 2rem;
}

.certification-card {
  background-color: #f9f9f9;
  color: #222;
  padding: 1.25rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s, color 0.3s;
}

/* Dark mode support */
body.dark-mode .certification-card {
  background-color: #1f1f1f;
  color: #f1f1f1;
}

body.dark-mode .certification-card a {
  color: #89CFF0;
  /* Light blue for visibility */
}


.about-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 2rem;
  text-align: left;
}

.profile-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid cyan;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
  transition: transform 0.3s;
}

.profile-img:hover {
  transform: scale(1.05);
}

.about-text {
  max-width: 500px;
}

.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.nameplate {
  margin-top: 0.5rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: cyan;
  letter-spacing: 1px;
  animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#projects .project-card a {
  color: #00bfff !important;
  /* Sky blue for links */
  text-decoration: underline;
}

/* === Contact Section === */
.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
  flex-wrap: wrap; 
}

.contact-btn {
  /* Use flexbox to align icon and text */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  
  padding: 0.8rem 1.5rem;
  background: transparent;
  color: cyan;
  border: 2px solid cyan;
  text-decoration: none;
  border-radius: 10px;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.contact-btn:hover {
  background: cyan;
  color: black;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
  transform: translateY(-3px);
}

/* New rule for the icon */
.contact-btn i {
  margin-right: 0.5rem; /* Adds space between icon and text */
  font-size: 1.2rem;   /* Makes icon slightly larger */
}

/* === Light Theme Override for Contact === */
body[data-theme="light"] .contact-btn {
  color: #0000ff; 
  border-color: #0000ff;
}

body[data-theme="light"] .contact-btn:hover {
  background: #0000ff;
  color: #ffffff; 
  box-shadow: 0 0 15px rgba(0, 0, 255, 0.5);
}

/* === Generic Section Box === */
.section-box {
  border: 2px solid cyan;
  padding: 2rem;
  border-radius: 10px;
  margin: 1rem auto;
  /* Using rgba for a semi-transparent effect that matches other elements */
  background: rgba(26, 26, 26, 0.8); 
  backdrop-filter: blur(5px);
  max-width: 800px;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.2); /* Adds a subtle glow */
}

/* Make skills list look good inside the box */
.section-box ul {
  text-align: left; /* Aligns list items to the left */
  display: inline-block; /* Centers the list block within the box */
  margin: 0;
}

/* === Light Theme Overrides for Section Box === */
body[data-theme="light"] .section-box {
  background: rgba(255, 255, 255, 0.8); /* Light semi-transparent background */
  border-color: #0000ff; /* Match your light theme accent */
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Make sure skills list text is black in light mode */
body[data-theme="light"] .section-box ul {
  color: #000;
}

/* === Certification List Styles (Theme-Aware) === */

.certification-list {
  list-style-type: none;
  padding: 0;
  margin: 0 auto; /* Center the list block */
  max-width: 500px; /* Constrain width */
}

.cert-item {
  /* Use transparent background to show the section-box */
  background-color: transparent;
  /* Add a faint border to separate items */
  border-bottom: 1px solid rgba(0, 255, 255, 0.3); /* Faint cyan line */
  
  padding: 12px 5px;
  margin-bottom: 8px;
  transition: background-color 0.2s;
  text-align: left;
  /* Text color is now inherited from .section-box */
}

/* Remove border from the last item */
.cert-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.cert-item:hover {
  background-color: rgba(0, 255, 255, 0.1); /* Faint cyan hover */
}

/* This is the hide/show rule */
.certification-list:not(.expanded) .cert-item:nth-child(n+5) {
  display: none;
}

/* --- Button Style (Theme-Aware) --- */
.certs-button {
  /* Use theme colors to match your Contact buttons */
  background-color: transparent;
  color: cyan;
  border: 2px solid cyan;
  
  padding: 10px 15px;
  font-size: 14px;
  font-family: 'Orbitron', sans-serif; /* Match your site font */
  font-weight: bold;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.3s ease;
}

.certs-button:hover {
  background-color: cyan;
  color: black;
  box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* === Light Theme Overrides for Certs === */

body[data-theme="light"] .cert-item {
  border-bottom-color: rgba(0, 0, 255, 0.3); /* Faint blue line */
}

body[data-theme="light"] .cert-item:hover {
  background-color: rgba(0, 0, 255, 0.1); /* Faint blue hover */
}

body[data-theme="light"] .certs-button {
  color: #0000ff;
  border-color: #0000ff;
}

body[data-theme="light"] .certs-button:hover {
  background: #0000ff;
  color: #ffffff;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #1a1a1a; /* Dark track */
}
::-webkit-scrollbar-thumb {
  background: cyan; /* Cyan handle */
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00aaaa; /* Darker cyan on hover */
}

/* === Project Modal Styles === */

#modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000; /* Just below modal, above everything else */
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease;
}

#modal-overlay.active {
  display: block;
  opacity: 1;
}

.project-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #1a1a1a;
  border: 2px solid cyan;
  border-radius: 10px;
  z-index: 1001; /* Above overlay */
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
  display: none; /* Hidden by default */
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-height: 90vh; /* Allow scrolling on tall content */
  overflow-y: auto; /* Add scrollbar if needed */
}

.project-modal.active {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2.5rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s, transform 0.3s;
}

.modal-close-btn:hover {
  color: cyan;
  transform: scale(1.1);
}

.project-modal h2 {
  color: cyan;
  margin-top: 0;
}

.project-modal p {
  line-height: 1.6;
  text-align: left;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.tech-tags span {
  background: rgba(0, 255, 255, 0.1);
  color: cyan;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.modal-links {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* --- Light Mode for Modals --- */
body[data-theme="light"] .project-modal {
  background: #fdfdfd;
  border-color: #0000ff;
  color: #000;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .project-modal h2 {
  color: #0000ff;
}

body[data-theme="light"] .modal-close-btn {
  color: #333;
}
body[data-theme="light"] .modal-close-btn:hover {
  color: #0000ff;
}

body[data-theme="light"] .tech-tags span {
  background: rgba(0, 0, 255, 0.1);
  color: #0000ff;
  border-color: rgba(0, 0, 255, 0.2);
}

/* === Responsive Hamburger Menu === */

.hamburger {
  display: none; /* Hidden on desktop */
  cursor: pointer;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  transition: all 0.3s ease-in-out;
  background-color: white; /* Bar color */
}

/* --- Media Query for Mobile --- */
@media(max-width: 768px) {
  .hamburger {
    display: block; /* Show hamburger on mobile */
  }
  
  body[data-theme="light"] .hamburger .bar {
    background-color: #000; /* Black bars in light mode */
  }

  .nav-links {
    position: fixed;
    left: -100%; /* Start off-screen */
    top: 70px; /* Below the navbar */
    flex-direction: column;
    background: #111;
    width: 100%;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links li {
    display: block; /* Stack links vertically */
    padding: 1rem 0;
  }

  .nav-links.active {
    left: 0; /* Slide menu in */
  }

  /* --- Hamburger "X" Animation --- */
  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* --- Light Mode for Mobile Menu --- */
  body[data-theme="light"] .nav-links {
     background: rgba(255, 255, 255, 0.95);
  }
}