/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f7f9fc;
  --text: #333;
  --muted: #555;
  --primary: #3f51b5;
  --card-bg: #fff;
  --card-border: #e9edf5;
  --shadow: 0 2px 4px rgba(0,0,0,0.05);
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background-color: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

nav .logo {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

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

nav .nav-links li { margin-left: 1.5rem; }

nav .nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

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

/* Mobile Nav Toggle */
nav .nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

nav .nav-toggle div {
  width: 25px;
  height: 3px;
  background-color: var(--text);
  margin: 4px 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
  padding: 8rem 0 6rem;
  margin-top: 60px; /* offset fixed nav */
  text-align: center;
}

.hero-section h1 { font-size: 2.5rem; margin-bottom: 0.5rem; color: var(--text); }
.hero-section p { font-size: 1.25rem; color: var(--muted); }

/* Section Headings */
section h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: var(--primary);
}

section { padding: 4rem 0; }

/* Utilities */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(63,81,181,0.08);
  border: 1px solid rgba(63,81,181,0.2);
  font-size: 0.75rem;
  font-weight: 500;
}

/* About */
.about-content { display: flex; flex-wrap: wrap; align-items: center; gap: 2rem; }
.about-text { flex: 2; min-width: 250px; }
/* image removed on site, but keep styles harmless */
.about-image { flex: 1; min-width: 200px; text-align: center; }
.about-image img {
  max-width: 250px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Shared card style for consistency */
.skill,
.project-card,
.timeline-content,
#affiliations li {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--card-border);
}

/* Skills */
.skills-grid { display: flex; flex-wrap: wrap; gap: 2rem; }
.skill { flex: 1; min-width: 250px; }
.skill h3 { margin-bottom: 1rem; color: var(--primary); }
.skill ul { list-style: disc; margin-left: 1.5rem; color: var(--muted); }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.project-card h3 { margin-bottom: 0.5rem; color: var(--primary); }
.project-card p { flex-grow: 1; margin-bottom: 1rem; color: var(--muted); }

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary);
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  text-align: center;
  transition: background-color 0.3s ease;
  font-weight: 500;
}

.btn:hover { background-color: #303f9f; }

/* Timeline */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; top: 0; left: 10px; height: 100%; width: 2px; background-color: var(--primary); }
.timeline-item { position: relative; margin-bottom: 2rem; padding-left: 2rem; }
.timeline-date { font-weight: 600; color: var(--primary); margin-bottom: 0.25rem; }

/* Affiliations — now styled as cards in a grid */
#affiliations ul {
  list-style: none;
  padding-left: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

#affiliations li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.4;
}

#affiliations li::before {
  content: '';
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(63,81,181,0.12);
}

/* Footer */
footer { background-color: var(--primary); color: #fff; padding: 1rem 0; text-align: center; }
footer p { margin: 0; font-size: 0.875rem; }

/* Responsive Styles */
@media (max-width: 768px) {
  /* Stack nav links vertically on small screens */
  nav .nav-links {
    position: absolute; top: 60px; left: 0; background-color: var(--card-bg);
    width: 100%; flex-direction: column; align-items: flex-start; padding: 1rem; display: none; border-top: 1px solid #e0e0e0;
  }
  nav.active .nav-links { display: flex; }
  nav .nav-links li { margin: 0 0 1rem 0; }
  nav .nav-toggle { display: flex; }
  .about-content { flex-direction: column; text-align: center; }
  .about-image { order: -1; }
}

/* Transform hamburger icon into an “X” when active */
nav.active .nav-toggle div:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
nav.active .nav-toggle div:nth-child(2) { opacity: 0; }
nav.active .nav-toggle div:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
