/* ============================================
   Modern Academic Portfolio - Zhu Shaojun
   AI + Civil Engineering Scholar
   ============================================ */

@import url('https://fonts.googleapis.cn/css2?family=Inter:wght@300;400;500;600;700;800&family=Noto+Sans+SC:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0f1a;
  --bg-secondary: #111827;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border-color: rgba(255, 255, 255, 0.08);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --gradient-main: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
  --gradient-subtle: linear-gradient(135deg, rgba(6,182,212,0.1), rgba(59,130,246,0.1));
  --font-sans: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 48px rgba(0,0,0,0.4);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-height: 64px;
}

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  color: #22d3ee;
}

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

::selection {
  background: rgba(6, 182, 212, 0.3);
  color: #fff;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(10, 15, 26, 0.95);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border-color);
}

.lang-switch a {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all var(--transition);
}

.lang-switch a.active-lang {
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.15);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(6,182,212,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(139,92,246,0.08) 0%, transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 4rem;
  width: 100%;
}

.hero-avatar {
  flex-shrink: 0;
}

.hero-avatar img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(6, 182, 212, 0.3);
  box-shadow:
    0 0 30px rgba(6, 182, 212, 0.15),
    0 0 60px rgba(59, 130, 246, 0.1);
  transition: all 0.5s ease;
}

.hero-avatar img:hover {
  border-color: rgba(6, 182, 212, 0.6);
  box-shadow:
    0 0 40px rgba(6, 182, 212, 0.25),
    0 0 80px rgba(59, 130, 246, 0.15);
  transform: scale(1.03);
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-text h1 .gradient-text {
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-text .title {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.hero-text .affiliation {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.hero-text .affiliation a {
  color: var(--text-secondary);
}

.hero-text .affiliation a:hover {
  color: var(--accent-cyan);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 500;
}

.hero-tag i {
  font-size: 0.7rem;
}

.hero-social {
  display: flex;
  gap: 0.75rem;
}

.hero-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all var(--transition);
}

.hero-social a:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-2px);
}

/* --- Stats Bar --- */
.stats-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 2.5rem 0;
}

.stats-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-weight: 500;
}

/* --- Section Base --- */
.section {
  padding: 5rem 0;
  position: relative;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  letter-spacing: -0.02em;
}

.section-header h2 .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gradient-subtle);
  color: var(--accent-cyan);
  font-size: 1.1rem;
}

.section-header .subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: var(--gradient-main);
  border-radius: 2px;
  margin-top: 1rem;
}

/* --- About / Bio --- */
.bio-text {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-secondary);
  text-align: justify;
  max-width: 100%;
}

.bio-text b, .bio-text strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

.bio-text a {
  border-bottom: 1px dashed rgba(6, 182, 212, 0.3);
}

.bio-text a:hover {
  border-bottom-color: var(--accent-cyan);
}

.last-update {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --- Education Timeline --- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent-cyan), var(--accent-purple));
  border-radius: 1px;
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
  padding-left: 1.5rem;
}

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

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-cyan);
  transform: translateX(calc(-50% + 1px));
  z-index: 1;
}

.timeline-item .time {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-cyan);
  margin-bottom: 0.25rem;
}

.timeline-item .place {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}

.timeline-item .degree {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* --- News --- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.news-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.2);
}

.news-badge {
  flex-shrink: 0;
  padding: 0.2rem 0.6rem;
  background: var(--accent-green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-item a {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.news-item a:hover {
  color: var(--accent-cyan);
}

.news-date {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Quick Nav Buttons --- */
.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.quick-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
}

.quick-nav a:hover {
  background: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  transform: translateY(-1px);
}

/* --- Research Cards --- */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.research-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.research-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.research-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(255,255,255,0.02);
}

.research-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.5s ease;
}

.research-card:hover .research-card-img img {
  transform: scale(1.05);
}

.research-card-body {
  padding: 1.25rem;
}

.research-card-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.research-card-body p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

.research-card-body .links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.research-card-body .links a {
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  background: rgba(6, 182, 212, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent-cyan);
  transition: all var(--transition);
}

.research-card-body .links a:hover {
  background: rgba(6, 182, 212, 0.2);
}

/* --- Reports / Presentation --- */
.report-group {
  margin-bottom: 2rem;
}

.report-group h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent-cyan);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.report-group h3::before {
  content: '';
  width: 4px;
  height: 1.2em;
  background: var(--gradient-main);
  border-radius: 2px;
}

.report-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.report-list li {
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.report-list li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.2);
}

.report-list li a {
  font-size: 0.95rem;
}

/* --- Publications --- */
.pub-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pub-list {
  list-style: none;
  counter-reset: pub-counter;
}

.pub-list > li {
  counter-increment: pub-counter;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-secondary);
  text-align: justify;
  transition: all var(--transition);
}

.pub-list > li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.15);
}

.pub-list > li::before {
  content: counter(pub-counter);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pub-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

.pub-list u {
  text-underline-offset: 2px;
}

.pub-list .badge-hot {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  background: var(--accent-green);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  margin-left: 0.25rem;
  vertical-align: middle;
}

/* --- Standards / Specifications --- */
.spec-list {
  list-style: none;
  counter-reset: spec-counter;
}

.spec-list li {
  counter-increment: spec-counter;
  padding: 1rem 1rem 1rem 3.5rem;
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
}

.spec-list li::before {
  content: counter(spec-counter);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.spec-list li strong {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* --- Awards --- */
.awards-list {
  list-style: none;
  counter-reset: award-counter;
}

.awards-list li {
  counter-increment: award-counter;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.5rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.awards-list li::before {
  content: counter(award-counter);
  position: absolute;
  left: 0;
  top: 0.85rem;
  width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- Projects --- */
.project-list {
  list-style: none;
  counter-reset: proj-counter;
}

.project-list li {
  counter-increment: proj-counter;
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  text-align: justify;
  transition: all var(--transition);
}

.project-list li:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.15);
}

.project-list li::before {
  content: counter(proj-counter);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.5rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* --- Reviewer --- */
.reviewer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.reviewer-grid a {
  display: block;
  padding: 0.6rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reviewer-grid a:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
}

/* --- Friend Links --- */
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.friend-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all var(--transition);
}

.friend-links a:hover {
  background: var(--bg-card-hover);
  border-color: rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
}

.friend-links a i {
  color: var(--accent-cyan);
}

/* --- Back to Top --- */
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 2rem;
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  cursor: pointer;
}

.back-top:hover {
  color: var(--accent-cyan);
  border-color: rgba(6, 182, 212, 0.3);
}

/* --- Footer --- */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
}

.footer-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.footer-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  transition: all var(--transition);
}

.footer-social a:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.footer-bottom {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.5rem 2rem 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-muted);
}

.footer-bottom a:hover {
  color: var(--accent-cyan);
}

/* --- Scroll Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* --- Floating Scroll-to-top Button --- */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-main);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  z-index: 999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .research-grid {
    grid-template-columns: 1fr;
  }
  .reviewer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(10, 15, 26, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    gap: 0;
    border-bottom: 1px solid var(--border-color);
    max-height: calc(100vh - var(--nav-height));
    overflow-y: auto;
  }

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

  .nav-links a {
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
  }

  .nav-toggle {
    display: block;
  }

  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
    padding-top: 2rem;
  }

  .hero-text h1 {
    font-size: 2.25rem;
  }

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

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

  .section {
    padding: 3.5rem 0;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .footer-content {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

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

  .pub-list > li {
    padding-left: 2.5rem;
    font-size: 0.85rem;
  }

  .pub-list > li::before {
    width: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-avatar img {
    width: 150px;
    height: 150px;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .stat-number {
    font-size: 2rem;
  }
}

/* === Courseware cards === */
.courseware-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.courseware-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card, rgba(255,255,255,0.04));
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 24px 24px 56px;
  color: inherit;
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
  overflow: hidden;
}
.courseware-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-cyan, #06b6d4), var(--accent-2, #b793ff));
  opacity: 0;
  transition: opacity 200ms;
}
.courseware-card:hover {
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.07);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.4);
  text-decoration: none;
}
.courseware-card:hover::before { opacity: 1; }
.courseware-thumb {
  margin: -24px -24px 16px;
  height: 160px;
  overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.courseware-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.courseware-kicker {
  font-size: 0.78em;
  color: var(--accent-cyan, #06b6d4);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}
.courseware-card h3 {
  font-size: 1.25em;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 12px;
  color: var(--text-primary, #e6edf3);
}
.courseware-card p {
  font-size: 0.94em;
  line-height: 1.65;
  color: var(--text-secondary, #8b949e);
  margin: 0 0 14px;
}
.courseware-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}
.cw-tag {
  font-size: 0.76em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary, #8b949e);
}
.courseware-arrow {
  position: absolute;
  right: 22px;
  bottom: 18px;
  color: var(--accent-cyan, #06b6d4);
  opacity: 0.45;
  font-size: 1.05em;
  transition: transform 200ms ease, opacity 200ms ease;
}
.courseware-card:hover .courseware-arrow {
  opacity: 1;
  transform: translateX(4px);
}
