:root {
  --primary: #1565c0;
  --primary-dark: #0d47a1;
  --text: #212121;
  --text-secondary: #424242;
  --text-muted: #757575;
  --bg: #fafafa;
  --surface: #ffffff;
  --border: #e0e0e0;
  --navbar-height: 60px;
  --max-width: min(92vw, 880px);
  --page-padding: clamp(1.25rem, 3vw, 2.5rem);
  --sans: "Roboto", system-ui, -apple-system, sans-serif;
  --slab: "Roboto Slab", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--navbar-height) + 1rem);
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navbar */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

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

.navbar-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
}

.navbar-brand:hover {
  color: var(--primary);
  text-decoration: none;
}

.navbar-links {
  display: flex;
  gap: 1.5rem;
}

.navbar-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* Page */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--navbar-height) + 2.5rem) var(--page-padding) 4rem;
}

.home-section {
  margin-bottom: 3.5rem;
}

.home-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-family: var(--slab);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
}

/* Profile */

.profile {
  text-align: center;
  margin-bottom: 2.5rem;
}

.profile-name {
  font-family: var(--slab);
  font-size: 2.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.profile-role {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.profile-affiliation {
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

.about-main p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.about-main p:last-child {
  margin-bottom: 0;
}

.about-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
}

.sidebar-block + .sidebar-block {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.sidebar-block h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.sidebar-block ul {
  list-style: none;
}

.sidebar-block li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
}

.education-list li {
  line-height: 1.5;
}

.education-list span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Experience */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.exp-item {
  display: flex;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow 0.15s;
}

.exp-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.exp-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.exp-body h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.exp-org {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.15rem;
}

.exp-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.exp-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Publications */

.publication-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.publication-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.25rem;
  transition: box-shadow 0.15s;
}

.publication-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pub-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
  margin-bottom: 0.5rem;
}

.pub-meta {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.pub-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
}

.publication-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--primary);
  border-radius: 3px;
  transition: background 0.15s, color 0.15s;
}

.publication-links a:hover {
  background: var(--primary);
  color: #fff;
  text-decoration: none;
}

/* Projects */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.25rem, 2vw, 2rem);
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.15s, transform 0.15s;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.project-banner {
  height: 6px;
}

.banner-purple { background: #7b1fa2; }
.banner-blue   { background: #1565c0; }
.banner-teal   { background: #00838f; }
.banner-orange { background: #ef6c00; }
.banner-indigo { background: #3949ab; }
.banner-green  { background: #2e7d32; }

.project-content {
  padding: 1.25rem;
}

.project-content h3 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.project-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

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

.project-tags span {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary);
  background: rgba(21, 101, 192, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 2rem var(--page-padding);
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* Responsive */

@media (min-width: 1024px) {
  :root {
    --max-width: min(90vw, 1040px);
  }
}

@media (min-width: 1280px) {
  :root {
    --max-width: min(88vw, 1200px);
  }

  .about-grid {
    grid-template-columns: 1fr minmax(240px, 320px);
  }
}

@media (min-width: 1600px) {
  :root {
    --max-width: min(85vw, 1400px);
  }
}

@media (min-width: 1920px) {
  :root {
    --max-width: min(82vw, 1600px);
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-sidebar {
    order: -1;
  }

  .profile-name {
    font-size: 2.1rem;
  }

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

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 0.85rem;
  }

  .navbar-links {
    gap: 1rem;
  }

  .navbar-links a {
    font-size: 0.8rem;
  }

  .exp-item {
    flex-direction: column;
    gap: 0.75rem;
  }
}
