/* CSS Variables for Theming */
:root {
  --primary-color: #007bff;
  --secondary-color: #ff9800;
  --background-color: #f4f7fc;
  --surface-color: #ffffff;
  --text-color: #333;
  --text-muted-color: #666;
  --header-bg: #ffffff;
  --header-text: #333;
  --footer-bg: #222;
  --border-color: #007bff;
}

body.dark-mode {
  --primary-color: #0099ff;
  --secondary-color: #ffb74d;
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --text-color: #e0e0e0;
  --text-muted-color: #a0a0a0;
  --header-bg: #1e1e1e;
  --header-text: #e0e0e0;
  --footer-bg: #1a1a1a;
  --border-color: #0099ff;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background: linear-gradient(300deg, #a0c4ff, #c2d8ff, #e6f0ff);
  background-size: 180% 180%;
  animation: gradient-animation 18s ease infinite;
  transition: background-color 0.4s, color 0.4s;
}

body.dark-mode {
  background: linear-gradient(300deg, #0d1b2a, #1b263b, #2a3d53);
  background-size: 180% 180%;
  animation: gradient-animation 18s ease infinite;
}

@keyframes gradient-animation {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 1rem 0;
  /* REMOVED sticky positioning */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background-color 0.4s;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: auto;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: var(--primary-color);
}

nav a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: bold;
  position: relative;
  transition: color 0.3s;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary-color);
  transition: width 0.3s ease-out;
}

nav a:hover {
  color: var(--primary-color);
}

nav a:hover::after {
  width: 100%;
}

section {
  padding: 4rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

body.dark-mode section {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

#about, #contact {
    text-align: center;
}

h2 {
  margin-bottom: 2rem;
  color: var(--primary-color);
  text-align: center;
  font-size: 2.5rem;
}

/* All Cards Styling */
.education-item, .experience-item, .project-item, .certificate-item {
  background-color: var(--surface-color);
  margin-bottom: 20px;
  padding: 20px;
  border-left: 4px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-item:hover, .experience-item:hover, .project-item:hover, .certificate-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.education-item h3, .experience-item h3, .project-item h3, .certificate-item h3 {
  margin: 0 0 5px;
  color: var(--text-color);
}

.education-item p, .experience-item p, .project-item p, .certificate-item p {
  margin: 4px 0;
  color: var(--text-muted-color);
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #fff;
  text-decoration: none;

  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
  transform: scale(1.05);
}

.skills-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.skills-list li {
  background: var(--surface-color);
  padding: 0.7rem 1.5rem;
  border-radius: 20px;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.skills-list li:hover {
    transform: translateY(-3px);
}

.skill-category h3 {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-muted-color);
}

footer {
  background: var(--footer-bg);
  color: #fff;
  text-align: center;
  padding: 2rem 1rem;
}

.social-links a {
  color: var(--header-text);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.social-links a:hover {
  color: var(--primary-color);
}


/* --- NEW Icon Theme Switcher Styles --- */
.theme-switch-wrapper {
  display: flex;
  align-items: center;
}
.theme-switch {
  display: inline-block;
  cursor: pointer;
}
.theme-switch input {
  display: none; /* Hide the actual checkbox */
}
.theme-icon-container {
  width: 24px;
  height: 24px;
  position: relative;
  color: var(--header-text);
}
.sun-icon, .moon-icon {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Light mode (default) */
.moon-icon {
  opacity: 0;
  transform: scale(0);
}
.sun-icon {
  opacity: 1;
  transform: scale(1);
}

/* Dark mode */
body.dark-mode .sun-icon {
  opacity: 0;
  transform: scale(0);
}
body.dark-mode .moon-icon {
  opacity: 1;
  transform: scale(1);
}