/* ========== CSS Variables ========== */
:root {
  --primary: #1a1a2e;
  --accent: #4a90d9;
  --accent-light: #e8f0fe;
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #e0e0e0;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --nav-height: 60px;
  --max-width: 1000px;
}

/* ========== 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: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  color: #2a6ab9;
}

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

/* ========== Navigation ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.navbar .container {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========== Sections ========== */
section {
  padding: 72px 24px;
}

section:nth-child(even) {
  background: var(--bg-alt);
}

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

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 40px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

/* ========== Hero / Bio ========== */
.hero {
  padding-top: calc(var(--nav-height) + 72px);
  padding-bottom: 72px;
  background: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.hero-sidebar {
  text-align: center;
}

.avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
  font-weight: 700;
  margin: 0 auto 20px;
  letter-spacing: 2px;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-sidebar h1 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.hero-sidebar .title {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.4;
}

.hero-sidebar .affiliation {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text-light);
  font-size: 1.1rem;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.social-links a:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
}

.hero-bio p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 16px;
}

.hero-bio .interests {
  margin-top: 24px;
}

.hero-bio .interests h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.hero-bio .interests ul {
  list-style: none;
  padding: 0;
}

.hero-bio .interests li {
  padding: 3px 0;
  color: var(--text-light);
  font-size: 0.95rem;
}

.hero-bio .interests li::before {
  content: "\2022";
  color: var(--accent);
  margin-right: 8px;
}

/* ========== Education ========== */
.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.edu-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow 0.2s;
}

.edu-card:hover {
  box-shadow: var(--shadow-hover);
}

.edu-card .school {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.edu-card .degree {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 4px;
}

.edu-card .date-gpa {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.edu-card .highlights {
  list-style: none;
  padding: 0;
}

.edu-card .highlights li {
  font-size: 0.9rem;
  color: var(--text-light);
  padding: 3px 0;
}

.edu-card .highlights li::before {
  content: "\2022";
  color: var(--accent);
  margin-right: 8px;
}

/* ========== Experience Timeline ========== */
.timeline {
  position: relative;
  padding-left: 32px;
}

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

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item .role {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.timeline-item .company {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 600;
}

.timeline-item .period {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.timeline-item .summary {
  font-size: 0.92rem;
  color: var(--text-light);
  font-style: italic;
  margin-bottom: 8px;
}

.timeline-item ul {
  padding-left: 18px;
}

.timeline-item li {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.5;
}

/* ========== Publications ========== */
.pub-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.pub-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s;
}

.pub-item:hover {
  box-shadow: var(--shadow-hover);
}

.pub-venue {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.venue-emnlp {
  background: #fde8e8;
  color: #c0392b;
}

.venue-acl {
  background: #e8f5e9;
  color: #27ae60;
}

.venue-iclr {
  background: #ede7f6;
  color: #7b1fa2;
}

.venue-ultrasonics {
  background: #e3f2fd;
  color: #1565c0;
}

.pub-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.pub-authors strong {
  color: var(--text);
}

.pub-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  transition: background 0.2s, color 0.2s;
}

.pub-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ========== Projects ========== */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.project-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: box-shadow 0.2s, transform 0.2s;
}

.project-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.project-card .project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.project-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.3;
}

.project-card h3 a {
  color: var(--primary);
}

.project-card h3 a:hover {
  color: var(--accent);
}

.project-card .project-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  margin-left: 12px;
}

.project-card p {
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.5;
  margin-bottom: 12px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tech-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========== Skills ========== */
.skills-group {
  margin-bottom: 24px;
}

.skills-group:last-child {
  margin-bottom: 0;
}

.skills-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
}

.skill-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill-pill {
  display: inline-block;
  padding: 6px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.88rem;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.skill-pill:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

/* ========== Footer ========== */
.footer {
  background: var(--primary);
  color: #ccc;
  padding: 40px 24px;
  text-align: center;
}

.footer .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer .social-links a {
  background: rgba(255, 255, 255, 0.1);
  color: #ccc;
}

.footer .social-links a:hover {
  background: var(--accent);
  color: #fff;
}

.footer p {
  font-size: 0.85rem;
  color: #888;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-bio {
    text-align: left;
  }

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

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

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px 24px;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 10px 0;
  }

  .nav-toggle {
    display: block;
  }

  .section-title {
    font-size: 1.35rem;
  }

  section {
    padding: 48px 20px;
  }

  .hero {
    padding-top: calc(var(--nav-height) + 48px);
    padding-bottom: 48px;
  }
}

@media (max-width: 480px) {
  .avatar {
    width: 140px;
    height: 140px;
    font-size: 2.5rem;
  }

  .hero-sidebar h1 {
    font-size: 1.3rem;
  }

  .project-card .project-header {
    flex-direction: column;
  }

  .project-card .project-date {
    margin-left: 0;
    margin-top: 4px;
  }
}
