/* ============================
   CSS Variables for Themes
============================ */
:root {
  /* Dark theme (default) */
  --bg-primary: #000;
  --bg-secondary: #1a1a1a;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --accent-color: #00f7ff;
  --accent-hover: #aefcff;
  --navbar-accent: #00ff00;
  --border-color: #333;
  --shadow-color: rgba(0, 0, 0, 0.5);
  --card-bg: #1a1a1a;
  --icon-bg: #1e1e1e;
}

[data-theme="light"] {
  /* Light theme */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --text-primary: #333;
  --text-secondary: #666;
  --accent-color: #0033a0;
  --accent-hover: #002266;
  --navbar-accent: #ff8c00;
  --border-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.07);
  --card-bg: #fff;
  --card-border: #e0e0e0;
  --icon-bg: #f8f9fa;
}

/* ============================
   Global Styles
============================ */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ============================
   Theme Toggle Button
============================ */
.nav-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle-fixed {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--bg-secondary);
  border: 2px solid var(--accent-color);
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  transition: all 0.3s ease;
  color: var(--text-primary);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-fixed:hover {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.theme-icon {
  font-size: 1.3rem;
  transition: transform 0.3s ease;
}

.theme-toggle-fixed:hover .theme-icon {
  transform: rotate(15deg);
}

/* Mobile responsive for fixed theme toggle */
@media (max-width: 768px) {
  .theme-toggle-fixed {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    padding: 10px;
  }
  
  .theme-icon {
    font-size: 1.1rem;
  }
}

/* ============================
   Scroll Animations
============================ */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
  opacity: 1;
  transform: translateY(0);
}

[data-aos="fade-up"] {
  transform: translateY(30px);
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

/* ============================
   Navbar
============================ */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  background-color: var(--bg-primary);
  position: fixed;
  top: 0;
  left: 0;
  width: 95%;
  z-index: 1000;
  padding-top: 2.5rem;
  box-shadow: 0 2px 10px var(--shadow-color);
  font-size: large;
  transition: background-color 0.3s ease;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

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

.nav-links li a {
  position: relative;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  font-size: 1.15rem; 
  padding: 5px 0;
  transition: color 0.3s ease;
}

.nav-links li a::after {
  content: '';
  position: absolute;
  height: 2px;
  background-color: var(--navbar-accent);
  width: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-links li a:hover::after {
  width: 100%;
}

.nav-links li a:hover {
  color: var(--accent-color);
}

.menu-icon,
.hamburger {
  display: none;
  font-size: 2rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: color 0.3s ease;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: var(--bg-primary);
    position: absolute;
    top: 70px;
    right: 0;     
    width: 140px;      
    padding: 1rem;
    border-radius: 8px 0 0 8px; 
    z-index: 999;
    transition: background-color 0.3s ease;
  }

  .nav-links.show {
    display: flex;
  }

  .menu-icon,
  .hamburger {
    display: block;
    padding-right: 25px;
  }
}

/* ============================
   Hero Layout
============================ */
.hero-layout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1400px;
  margin: auto;
  padding: 10rem 5% 4rem;
  padding-bottom: 10rem;
}

/* Profile Image */
.hero-left .profile-pic {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 247, 255, 0.4);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Center Section */
.hero-center {
  text-align: center;
  flex: 1;
  min-width: 300px;
}

.greeting {
  letter-spacing: 2px;
  font-size: 1.5rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* Greeting animation */
.fade-in {
  opacity: 1;
  transition: opacity 0.5s ease-in;
}

.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease-out;
}

h1 {
  font-size: 3rem;
  font-weight: 800;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.highlight {
  color: var(--accent-color);
  transition: color 0.3s ease;
}

h2 {
  font-weight: 600;
  font-size: 1.5rem;
  margin-top: 1rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

#changing-title {
  border-right: 2px solid var(--accent-color);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
  min-height: 1.2em;
  font-weight: bold;
  font-size: 1.4rem;
  transition: border-color 0.3s ease;
}

.hero-buttons {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  border: none;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

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

.btn-secondary:hover {
  background-color: var(--text-primary);
  color: var(--bg-primary);
}

.hero-right {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  justify-items: center;
  align-items: center;
}

.icon-box {
  text-align: center;
}

.icon-box img {
  background-color: var(--icon-bg);
  border-radius: 50%;
  width: 90px;
  height: 90px;
  padding: 20px;
  object-fit: contain;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.icon-box img:hover {
  transform: scale(1.1);
}

.icon-box p {
  margin-top: 0.5rem;
  color: var(--accent-color);
  font-weight: bold;
  font-size: 1rem;
  transition: color 0.3s ease;
}

/* ============================
   Hero Responsive Layout
============================ */
@media (max-width: 768px) {
  .hero-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 6rem 5% 3rem;
  }
  .hero-left, .hero-center, .hero-right {
    width: 100%;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 200px;
  }

  .hero-right {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 2rem;
  }
}

/* ============================
   About Section
============================ */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1000px;
  margin: 8rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 0 20px var(--shadow-color);
  border: 1px solid transparent;
}
[data-theme="light"] .about {
  border: 1.5px solid var(--card-border);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.07);
}

.about h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.about p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

/* ============================
   Experience Section
============================ */
.experience {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
}

.experience h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  position: center;
  transition: color 0.3s ease;
}

.experience p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 0 1.5rem;
  transition: color 0.3s ease;
}

#experience h1 {
  font-size: 3rem;
  color: var(--text-primary);
  flex-direction: column;
  text-align: center;
  margin-bottom: 3rem;
  transition: color 0.3s ease;
}

#experience {
  padding: 4rem 2rem;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.experience-card {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px var(--shadow-color);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s, border 0.3s;
  border: 1px solid transparent;
}
[data-theme="light"] .experience-card {
  border: 1.5px solid var(--card-border);
  box-shadow: 0 2px 16px 0 rgba(0,0,0,0.07);
}

.experience-card:hover {
  transform: translateY(-4px);
}

.experience-duration {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  text-align: right;
  transition: color 0.3s ease;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.experience-role {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.experience-company {
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}

.experience-details {
  list-style: none;
  padding: 0;
}

.experience-details li {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 1.05rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.highlight {
  font-weight: bold;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

/* ============================
   Skills Section
============================ */
#skills {
  scroll-margin-top: 80px; 
  background-color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.skills {
  margin-bottom: 80px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem;
}

.skills-section {
  text-align: center;
  padding: 40px 20px;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.skills-section h1 {
  font-size: 2em;
  margin-bottom: 30px;
}

.section-header {
  text-align: center;
  margin-top: 4rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.skills-grid img {
  width: 60px;
  height: 60px;
  transition: transform 0.2s;
}

.skill-category h3 {
  font-size: 1.5rem;
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: center;
  transition: color 0.3s ease;
}

.skill-category ul {
  list-style-type: none;
  padding: 0;
}

.skill-category ul li {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.skills-grid img:hover {
  transform: scale(1.15);
}

/* ============================
   Projects Section
============================ */
.projects {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 900px;
  margin: 6rem auto;
  padding: 2rem;
}

.projects h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
  transition: color 0.3s ease;
}

.projects p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  padding: 0 1.5rem;
  transition: color 0.3s ease;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 2rem;
  padding: 0 1rem;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, background-color 0.3s, box-shadow 0.3s, border 0.3s;
  background: var(--card-bg);
  box-shadow: 0 0 12px var(--shadow-color);
  border: 1px solid transparent;
}
[data-theme="light"] .project-card {
  border: 1.5px solid var(--card-border);
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.07);
}

.project-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  transition: filter 0.3s ease;
  border-radius: 10px;
}

.project-card:hover img {
  filter: brightness(60%);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(77, 240, 255, 0.57);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.project-overlay span {
  background: var(--accent-color);
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: bold;
  font-size: 1.2rem;
  color: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================
   Contact Section
============================ */
.contact-section {
  padding: 60px 20px;
  text-align: center;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-section h2 {
  font-size: 2.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-align: center;
  transition: color 0.3s ease;
}

.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  width: 100%;
  font: 1em sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.contact-form button {
  background-color: var(--accent-color);
  color: var(--bg-primary);
  font-weight: bold;
  padding: 12px;
  border: none;
  border-radius: 50px;
  width: 104%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.contact-form button:hover {
  background-color: var(--accent-hover);
}

/* ============================
   Footer
============================ */
.site-footer {
  text-align: center;
  padding: 1rem;
  font-size: 1.2rem;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================
   Popup Overlay
============================ */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
  max-width: 300px;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
  color: var(--accent-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.popup-content p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.popup-content button {
  background-color: var(--accent-color);
  border: none;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  border-radius: 999px;
  cursor: pointer;
  color: var(--bg-primary);
  transition: background-color 0.3s ease;
}

.popup-content button:hover {
  background-color: var(--accent-hover);
}

/* Theme-based icon switching */
.icon-dark { display: none; }
.icon-default { display: inline; }
[data-theme="light"] .icon-dark { display: inline; }
[data-theme="light"] .icon-default { display: none; }
