body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: #f4f4f4;
  color: #333;
  transition: background 0.3s, color 0.3s;
}

.dark-mode {
  background: #121212;
  color: #f0f0f0;
}

header {
  background: #222;
  color: #fff;
  padding: 20px;
  text-align: center;
  position: relative;
}

.profile-pic {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #fff;
  margin-bottom: 15px;
}

main {
  padding: 20px;
  max-width: 900px;
  margin: auto;
}

section {
  margin-bottom: 40px;
  scroll-margin-top: 80px;
}

h1, h2 {
  color: inherit;
}

footer {
  background: #222;
  color: #ccc;
  text-align: center;
  padding: 15px;
}

a {
  color: #007acc;
}

.project-cards {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.card {
  background: #fff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, background 0.3s ease;
}

.dark-mode .card {
  background: #1f1f1f;
  color: #f0f0f0;
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.1);
}

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

.education-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.education-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}

.dark-mode .education-card {
  background: #1f1f1f;
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.1);
}

.education-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 10px;
}

.education-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0;
}

.education-info h3 {
  margin: 0 0 5px 0;
  font-size: 1.1em;
}

.education-info p {
  margin: 0;
}

.education-dates {
  font-size: 0.9em;
  color: #666;
  margin-top: 4px;
}

.dark-mode .education-dates {
  color: #aaa;
}

.education-details {
  padding-left: 80px;
}

.education-details p {
  margin: 5px 0 10px 0;
}


.tags {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tags span {
  background: #007acc;
  color: #fff;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  font-weight: 500;
}

.dark-mode .tags span {
  background: #3399ff;
}

/* ===== Publications ===== */

.publications-container {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.publication-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s ease, background 0.3s ease;
}

.publication-card:hover {
  transform: translateY(-5px);
}

.dark-mode .publication-card {
  background: #1f1f1f;
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.1);
}

.pub-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.pub-header h3 {
  margin: 0;
  font-size: 1.1em;
  line-height: 1.3;
}

.pub-type {
  flex-shrink: 0;
  background: #ffcc00;
  color: #222;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.pub-authors {
  margin: 0 0 4px 0;
}

.pub-venue {
  margin: 0 0 10px 0;
  font-size: 0.9em;
  color: #666;
  font-style: italic;
}

.dark-mode .pub-venue {
  color: #aaa;
}

.pub-description {
  margin: 0 0 10px 0;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 12px;
}

.pub-links a {
  text-decoration: none;
  font-weight: bold;
}

.pub-links a:hover {
  text-decoration: underline;
}

.pub-links i {
  margin-right: 4px;
}

/* ===== Skills ===== */

.skills-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.skill-category {
  background: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}

.dark-mode .skill-category {
  background: #1f1f1f;
  box-shadow: 0 3px 10px rgba(255,255,255,0.1);
}

.skill-category h4 {
  margin: 0 0 10px 0;
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555;
}

.dark-mode .skill-category h4 {
  color: #aaa;
}

.toggle-container {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
}

#dark-mode-toggle {
  display: none;
}

.toggle {
  width: 60px;
  height: 30px;
  background: #333;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.4s ease;
}

.knob {
  width: 24px;
  height: 24px;
  background: #ffcc00;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: all 0.4s ease;
}

#dark-mode-toggle:checked + .toggle {
  background: #888;
}

#dark-mode-toggle:checked + .toggle .knob {
  transform: translateX(30px);
  background: #f0f0f0;
}

.navbar {
  position: sticky;
  top: 0;
  background: #333;
  padding: 10px 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


.navbar ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.navbar li {
  margin: 0 15px;
}

.navbar a {
  text-decoration: none;
  color: #fff;
  font-weight: bold;
  transition: color 0.3s;
}

.navbar a:hover {
  color: #ffcc00;
}

html {
  scroll-behavior: smooth;
}

#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: #ffcc00;
  width: 0%;
  z-index: 1001;
  transition: width 0.25s ease;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.contact-links a {
  text-decoration: none;
  color: #333;
  background: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  font-weight: bold;
  transition: transform 0.2s, box-shadow 0.2s;
}

.dark-mode .contact-links a {
  background: #1f1f1f;
  color: #f0f0f0;
  box-shadow: 0 3px 10px rgba(255, 255, 255, 0.1);
}

.contact-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.contact-links i {
  margin-right: 8px;
  color: #007acc;
}

@media (max-width: 600px) {
  .pub-header {
    flex-direction: column;
  }

  .pub-type {
    align-self: flex-start;
  }
}