:root {
  --bg: #ffffff;
  --surface: #f8f9fa;
  --text: #1a1a1a;
  --text-muted: #374151;
  --accent: #2563eb;
  --accent-light: #3b82f6;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.home-main {
  background: var(--surface);
}

.home-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%);
  border-bottom: 1px solid var(--border);
}

.home-hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px 32px;
}

.home-hero .hero {
  margin-bottom: 0;
}

.home-content {
  padding-top: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hero {
  margin-bottom: 60px;
}

.hero-card {
  display: flex;
  gap: 32px;
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 32px;
  color: white;
  flex-shrink: 0;
  overflow: hidden;
}

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

.eyebrow {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}

h1 {
  font-size: 32px;
  margin-bottom: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.lead {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.hero-actions a {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: white;
}

.hero-actions a.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.hero-actions a:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.hero-actions a.primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
}

.hero-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stat {
  padding: 24px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: center;
}

.stat h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat p {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 24px;
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
}

#content {
  display: grid;
  gap: 24px;
}

#content .card {
  margin-bottom: 0;
}

.card > p:last-child,
.card > ul:last-child,
.card > ol:last-child {
  margin-bottom: 0;
}

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

.card hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

.card h3 {
  font-size: 18px;
  margin: 20px 0 8px;
  font-weight: 600;
  color: var(--text);
}

.section-text {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
}

.card p,
.card ul,
.card ol {
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.7;
}

.card ul,
.card ol {
  padding-left: 24px;
}

.card li {
  margin-bottom: 8px;
}

.section-note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.timeline li {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.timeline-year {
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
  text-transform: uppercase;
}

.timeline-content {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.news-toggle {
  margin-top: 16px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: white;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.news-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.news-collapsed .timeline li:nth-child(n + 6) {
  display: none;
}

.publication-list {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.publication-item {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.publication-item h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.4;
}

.publication-authors,
.publication-venue {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.publication-links {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.experience-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.experience-item {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.experience-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.experience-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.experience-details {
  font-size: 13px;
  color: var(--text-muted);
}

.contact-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.contact-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.contact-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.card a:hover {
  text-decoration: underline;
}

.card code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--text);
}

.card pre {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 16px 0;
}

.card pre code {
  background: none;
  padding: 0;
}

#projectList {
  margin-top: 24px;
}

.project-list {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.project-card {
  padding: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

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

.project-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-title:hover {
  color: var(--accent);
}

.project-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.project-summary {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.project-links {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.project-links a {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(37, 99, 235, 0.2);
  background: rgba(37, 99, 235, 0.08);
}

.project-links a:hover {
  text-decoration: none;
  background: rgba(37, 99, 235, 0.16);
}

.project-detail {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}

.project-detail:hover {
  text-decoration: underline;
}

/* ============================================
   PROJECT PAGE - SIMPLE & CLEAN
   ============================================ */

.project-main {
  background: var(--surface);
}

.project-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 60%);
  border-bottom: 1px solid var(--border);
}

.project-hero-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 32px 40px;
}

.project-hero-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.project-eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 48px;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.project-article {
  /* Nothing fancy, just content */
}

.project-page-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.project-meta-line {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-weight: 500;
}

.project-links-wrapper {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.project-links-wrapper a {
  padding: 8px 16px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s;
}

.project-links-wrapper a:hover {
  background: var(--accent-light);
}

.project-content-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 32px 120px;
}

.project-content-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.project-content-wrapper {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.project-content-wrapper h2 {
  font-size: 28px;
  font-weight: 700;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.3;
  color: var(--text);
}

.project-content-wrapper h2:first-child {
  margin-top: 0;
}

.project-content-wrapper h3 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 36px;
  margin-bottom: 12px;
  color: var(--text);
}

.project-content-wrapper p {
  margin-bottom: 20px;
}

.project-content-wrapper ul,
.project-content-wrapper ol {
  margin-bottom: 20px;
  padding-left: 28px;
}

.project-content-wrapper li {
  margin-bottom: 8px;
}

.project-content-wrapper a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.project-content-wrapper a:hover {
  text-decoration: underline;
}

.project-content-wrapper img {
  max-width: 100%;
  height: auto;
  margin: 32px 0;
  border-radius: 8px;
}

.project-content-wrapper code {
  background: var(--surface);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
  color: var(--accent);
}

.project-content-wrapper pre {
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 24px 0;
}

.project-content-wrapper pre code {
  background: none;
  padding: 0;
  color: var(--text);
}

.project-content-wrapper blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-muted);
}

.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px 20px;
  }

  .brand {
    font-size: 16px;
  }

  .nav {
    gap: 16px;
  }

  .nav a {
    font-size: 13px;
  }

  .container {
    padding: 24px 16px 60px;
  }

  .home-hero-inner {
    padding: 32px 16px 24px;
  }

  .hero-card {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px;
  }

  .avatar {
    width: 100px;
    height: 100px;
    font-size: 28px;
  }

  h1 {
    font-size: 26px;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

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

  .project-hero-inner {
    padding: 32px 20px 28px;
  }

  .project-hero-card {
    padding: 24px;
  }

  .project-content-section {
    padding: 24px 20px 80px;
  }

  .project-content-card {
    padding: 24px;
  }

  .project-page-title {
    font-size: 28px;
  }

  .project-content-wrapper {
    font-size: 16px;
  }

  .project-content-wrapper h2 {
    font-size: 24px;
  }

  .project-content-wrapper h3 {
    font-size: 20px;
  }

  .timeline li {
    grid-template-columns: 1fr;
  }
}
