/* ========================================
   Design Tokens
   ======================================== */
:root {
  --bg-primary: #FAFAFA;
  --bg-section-alt: #F0F0F0;
  --text-primary: #1A1A2E;
  --text-secondary: #555555;
  --accent: #2563EB;
  --accent-hover: #1D4ED8;
  --border: #E5E7EB;
  --white: #FFFFFF;
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 900px;
  --nav-height: 60px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ========================================
   Navigation
   ======================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}

.nav__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.nav__links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav__links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* ========================================
   Section Containers
   ======================================== */
.section {
  padding: 5rem 1.5rem;
}

.section--alt {
  background-color: var(--bg-section-alt);
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section__title {
  font-size: 1.75rem;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding: 6rem 1.5rem 5rem;
}

.hero__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 3rem;
}

.hero__photo {
  flex-shrink: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--border);
}

.hero__content {
  flex: 1;
}

.hero__name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero__headline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.hero__bio {
  color: var(--text-secondary);
  line-height: 1.8;
}

.hero__links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.hero__links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.hero__links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ========================================
   Timeline (Experience & Education)
   ======================================== */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline__item {
  position: relative;
  margin-bottom: 2.5rem;
}

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

.timeline__item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--white);
  transform: translateX(-4px);
}

.timeline__date {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.timeline__role {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.timeline__org {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.timeline__desc {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
}

.timeline__desc ul {
  list-style: none;
  padding: 0;
}

.timeline__desc li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.4rem;
}

.timeline__desc li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent);
}

/* ========================================
   Publications / Projects Cards
   ======================================== */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}

.card__title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card__meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.card__desc {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.card__link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.88rem;
  font-weight: 500;
}

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

.skills-group__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skills-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-block;
  font-size: 0.82rem;
  padding: 0.3rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
}

/* ========================================
   Services
   ======================================== */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.service-item {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.service-item__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.service-item__desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: 2.5rem 1.5rem;
  text-align: center;
  font-size: 0.88rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
}

.footer a:hover {
  color: var(--white);
}

.footer__links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer__links svg {
  width: 22px;
  height: 22px;
  fill: rgba(255, 255, 255, 0.7);
  transition: fill 0.2s ease;
  vertical-align: middle;
}

.footer__links a:hover svg {
  fill: var(--white);
}

.footer__copy {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
  .hero__inner {
    flex-direction: column;
    text-align: center;
  }

  .hero__name {
    font-size: 2rem;
  }

  .hero__photo {
    width: 140px;
    height: 140px;
  }

  .hero__links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .section {
    padding: 3.5rem 1.25rem;
  }

  .section__title {
    font-size: 1.5rem;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  }

  .nav__links.active {
    display: flex;
  }

  .nav__toggle {
    display: block;
  }

  .timeline {
    padding-left: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4rem 1rem 3rem;
  }

  .hero__name {
    font-size: 1.75rem;
  }

  .hero__headline {
    font-size: 1rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }

  .services-list {
    grid-template-columns: 1fr;
  }
}
