:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f0f4fa;
  --text: #1b2a41;
  --muted: #5d6b82;
  --line: #dbe3ef;
  --primary: #123d7a;
  --primary-2: #1f5fbf;
  --accent: #f2b84b;
  --shadow: 0 12px 30px rgba(17, 36, 74, 0.08);
  --radius: 18px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(92%, var(--max));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 249, 252, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.98rem;
  transition: 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}

.nav-cta {
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff !important;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.menu-btn {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--primary);
  font-size: 1rem;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}

.page-hero,
.hero {
  padding: 20px 0 2px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 38px;
  align-items: start;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #e8f0fb;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 18px;
}

h1.page-title,
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  margin: 0 0 18px;
  color: var(--primary);
}

.hero h1 span,
.highlight {
  color: var(--primary-2);
}

.lead,
.hero p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0 0 24px;
  max-width: 760px;
}

.justify-text {
  text-align: justify;
  line-height: 1.8;
}

.hero-buttons,
.btn-row,
.hero-links,
.cta-actions,
.pub-links,
.project-actions,
.badge-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-buttons {
  margin-bottom: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.2s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: #0e3265;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.chip-link,
.badge {
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  font-weight: 700;
}

.chip-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip-link i {
  font-size: 0.95rem;
}

.chip-link:hover {
  color: var(--primary);
  border-color: #bfd0ea;
}

.hero-card,
.card,
.pub-item,
.project-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card {
  background: linear-gradient(180deg, #ffffff 0%, #f2f6fd 100%);
  border-radius: 28px;
  padding: 28px;
}

.profile-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 22px;
}

.profile-photo {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid #e2ebf8;
  background: #dce7f6;
}

.hero-mini {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.mini-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.mini-card h3 {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 1.35rem;
  line-height: 1.2;
}

.mini-card p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.section {
  padding: 36px 0;
}

.section-title {
  font-size: 2rem;
  margin: 0 0 10px;
  color: var(--primary);
}

.section-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 760px;
}

.grid-2,
.grid-3,
.about-grid,
.project-grid {
  display: grid;
  gap: 22px;
}

.grid-2,
.about-grid {
  grid-template-columns: 1fr 1fr;
}

.grid-3,
.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  border-radius: var(--radius);
  padding: 26px;
}

.card h3,
.project-card h3,
.pub-title {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--primary);
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.muted {
  color: var(--muted);
}

.list-clean,
.timeline,
.interest-list,
.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.interest-list li,
.timeline li {
  position: relative;
  color: var(--muted);
}

.interest-list li {
  padding-left: 18px;
  margin-bottom: 10px;
}

.interest-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute;
  left: 0;
  top: 10px;
}

.timeline li {
  padding-left: 22px;
  margin-bottom: 18px;
  border-left: 2px solid #dfe8f4;
  padding-bottom: 4px;
}

.timeline li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary-2);
  position: absolute;
  left: -6px;
  top: 7px;
}

.timeline strong {
  display: block;
  color: var(--text);
  margin-bottom: 3px;
}

.pub-list {
  display: grid;
  gap: 18px;
}

.pub-item {
  border-radius: 16px;
  padding: 20px;
}

.pub-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.96rem;
}

.pub-links a,
.project-actions a {
  font-weight: 700;
  color: var(--primary-2);
}

.project-card {
  border-radius: 20px;
  padding: 22px;
  transition: 0.2s ease;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-tag {
  display: inline-block;
  padding: 7px 10px;
  background: #eaf2ff;
  color: var(--primary);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.project-card p {
  color: var(--muted);
}

.cta-box {
  background: linear-gradient(135deg, #123d7a 0%, #1c5abb 100%);
  border-radius: 26px;
  color: #fff;
  padding: 34px;
  box-shadow: var(--shadow);
}

.cta-box h3 {
  margin: 0 0 12px;
  font-size: 1.7rem;
  color: #fff;
}

.cta-box p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  max-width: 760px;
}

.cta-actions .btn-primary {
  background: #fff;
  color: var(--primary);
}

.cta-actions .btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
}

.cta-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cta-actions .btn i {
  font-size: 0.95rem;
}

footer {
  padding: 26px 0 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.96rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.skill-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-4px);
}

.skill-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  margin: 0 auto 14px;
  display: block;
}

.skill-card p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.4;
}

.skills-section-title {
  margin-top: 44px;
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 2rem;
}

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.experience-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 22px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.exp-logo-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
}

.exp-logo {
  max-width: 48px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.exp-content {
  min-width: 0;
}

.exp-role {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 1.45rem;
  line-height: 1.25;
}

.exp-company {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.exp-meta,
.exp-location {
  margin: 0 0 6px;
  font-size: 0.96rem;
  color: var(--muted);
}

.exp-list {
  margin: 14px 0 0;
  padding-left: 20px;
}

.exp-list li {
  margin-bottom: 8px;
  line-height: 1.7;
  color: var(--text);
}

.home-updates {
  margin-top: 30px;
}

.home-updates .card h3 {
  margin-bottom: 4px;
}

.home-updates .card .muted {
  margin-top: 0;
  margin-bottom: 8px;
}

/* Publication summary cards */
.publication-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 18px;
  margin-bottom: 12px;
}

.summary-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: #ffffff;
  border: 1px solid #dbe6f5;
  border-radius: 16px;
  color: #0b3b7e;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(15, 45, 90, 0.06);
}

.summary-card strong {
  font-size: 1.15rem;
  color: #0b3b7e;
}

.summary-card span {
  color: #52637a;
  font-weight: 600;
}

.scholar-card {
  background: #0b3b7e;
  color: #ffffff;
}

.scholar-card:hover {
  background: #0f4fa8;
}

.publications-list {
  padding-top: 12px;
}

/* Publication cards */
.pub-card {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.pub-image-wrap {
  width: 100%;
}

.pub-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #eef3fb;
}

.pub-type {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.journal-tag {
  background: #b7791f;
}

.conference-tag {
  background: #15803d;
}

.pub-card-title {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 1.45rem;
  line-height: 1.35;
}

.pub-card-meta {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.98rem;
}

.pub-card-desc {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.75;
}

.doi-btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--primary);
  font-weight: 700;
  transition: 0.2s ease;
}

.doi-btn:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .hero-grid,
  .grid-2,
  .grid-3,
  .about-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    max-width: 560px;
    margin: 0 auto;
  }
}

@media (max-width: 860px) {
  .menu-btn {
    display: inline-flex;
  }

  .nav-links {
    position: absolute;
    top: 74px;
    right: 4%;
    width: min(280px, 92vw);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    display: none;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a,
  .nav-cta {
    display: block;
    width: 100%;
  }

  .nav-cta {
    text-align: center;
  }

  .pub-card {
    grid-template-columns: 1fr;
  }

  .pub-image {
    height: 220px;
  }
}

@media (max-width: 700px) {
  .experience-card {
    grid-template-columns: 1fr;
  }

  .exp-logo-box {
    width: 68px;
    height: 68px;
  }

  .exp-role {
    font-size: 1.2rem;
  }
}

@media (max-width: 560px) {
  .section,
  .page-hero,
  .hero {
    padding: 48px 0;
  }

  .hero h1,
  h1.page-title {
    font-size: 2.1rem;
  }

  .hero-mini {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    width: 180px;
    height: 180px;
  }

  .card,
  .project-card,
  .pub-item,
  .hero-card {
    padding: 20px;
  }

  .pub-card-title {
    font-size: 1.2rem;
  }

  .pub-image {
    height: 190px;
  }
}

/* Projects page spacing */
.projects-section {
  padding-top: 0;
}

.projects-section h1.technical-title {
  margin-top: 54px;
  margin-bottom: 28px;
}

/* Mobile spacing */
@media (max-width: 560px) {
  .projects-section {
    padding-top: 0;
  }

  .projects-section h1.technical-title {
    margin-top: 64px;
    margin-bottom: 24px;
  }
}