/* ===== RESET & VARIABLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Light mode variables */
  --bg-body: #f9fafc;
  --bg-container: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --border-light: #e2e8f0;
  --card-bg: #f8fafc;
  --skill-bg: #f1f5f9;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --toggle-bg: #e2e8f0;
  --toggle-text: #1e293b;
}

/* Dark mode variables */
body.dark-mode {
  --bg-body: #0f172a;
  --bg-container: #1e293b;
  --text-primary: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border-light: #334155;
  --card-bg: #0f172a;
  --skill-bg: #334155;
  --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  --toggle-bg: #334155;
  --toggle-text: #f1f5f9;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  padding: 2rem 1.5rem;
  transition: background-color 0.3s, color 0.3s;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  background: var(--bg-container);
  border-radius: 2rem;
  box-shadow: var(--shadow);
  padding: 2.5rem;
  transition: background-color 0.3s;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 2rem;
}

#darkModeToggle {
  background: var(--toggle-bg);
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--toggle-text);
  transition: background-color 0.2s;
}

#darkModeToggle:hover {
  background: var(--accent);
  color: white;
}

/* ===== PROFILE HEADER ===== */
.profile-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.avatar {
  width: 150px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--accent);
}

.header-info h1 {
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
  color: var(--text-primary);
}

.header-info .title {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.header-organization {
  font-size: 1.0rem;
  font-weight: 500;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-organization::before {
  content: '\f0b1';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1rem;
  opacity: 0.8;
  margin-right: 0.25rem;
}

/* ===== RESEARCH PUBLICATIONS ===== */
.subsection {
  margin: 2rem 0 1.5rem 0;
}

.subsection:last-child {
  margin-bottom: 0;
}

.subsection-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dashed var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.subsection-title i {
  color: var(--accent);
  font-size: 1.2rem;
}

.publication-list {
  list-style-type: decimal;
  padding-left: 2rem;  /* Increased from 1.5rem to shift bullets right */
  margin: 0.5rem 0 1rem 0;
  color: var(--text-secondary);
}

.publication-list li {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
  padding-left: 0.8rem;  /* Added extra padding inside each list item */
}

.publication-list li::marker {
  color: var(--accent);
  font-weight: 600;
}

/* If you want even more control over bullet position */
.publication-list.alternate {
  list-style-position: outside; /* Default - bullets outside the content flow */
  padding-left: 2.5rem; /* Adjust this value to move bullets right */
}

/* Alternative: Use inside positioning with custom padding */
.publication-list.inside-bullets {
  list-style-position: inside;
  padding-left: 0;
}

.publication-list.inside-bullets li {
  padding-left: 1.5rem; /* Creates space after the bullet */
  text-indent: -1.5rem; /* Hanging indent for wrapped lines */
}

/* Style for links in publications */
.publication-list li a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

.publication-list li a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Style for separate DOI/PDF links */
.pub-link {
  font-size: 0.85rem;
  font-weight: 500;
  margin-left: 0.25rem;
}

.pub-link:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .publication-list {
    padding-left: 1.8rem; /* Slightly less on mobile but still shifted */
  }
  
  .publication-list li {
    font-size: 0.9rem;
    padding-left: 0.5rem;
  }
  
  .subsection-title {
    font-size: 1.2rem;
  }
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.contact-links a {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
  transition: color 0.2s;
}

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

/* ===== SECTION STYLES ===== */
.section {
  margin: 2.5rem 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
}

.section-title i {
  color: var(--accent);
  font-size: 1.6rem;
}

.about-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===== EXPERIENCE & EDUCATION CARDS ===== */
.card {
  margin-bottom: 1.8rem;
}

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

.card-header h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
}

.company, .institution {
  font-weight: 500;
  color: var(--accent);
}

.date {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.description {
  margin-top: 0.5rem;
  padding-left: 1.2rem;
  color: var(--text-secondary);
}

.description li {
  margin-bottom: 0.4rem;
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}

.skill-item {
  background: var(--skill-bg);
  padding: 0.8rem 1.2rem;
  border-radius: 2rem;
  text-align: center;
  font-weight: 500;
  color: var(--text-primary);
  transition: all 0.2s;
  cursor: default;
}

.skill-item:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
}

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 1.2rem;
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}

.project-card:hover {
  transform: scale(1.02);
  border-color: var(--accent);
  box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.1);
}

.project-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.project-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

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

.tag {
  background: var(--skill-bg);
  padding: 0.2rem 0.8rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
}

/* ===== FOOTER ===== */
.footer {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 700px) {
  body {
    padding: 1rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-links {
    justify-content: center;
  }
  
  .card-header {
    flex-direction: column;
    gap: 0.3rem;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .header-info h1 {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-links {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
}
