/* =========================================
   1. Design Token & Themes
   ========================================= */
:root {
  /* 基础参数 */
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-md: 16px;
  --radius-full: 999px;
  --container-width: 1024px;
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --ease-standard: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-base: 480ms;
  
  /* [Light Mode] 默认日间模式变量 */
  --bg-body: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.8);
  --bg-hover: #f1f5f9;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-invert: #ffffff;
  
  --primary: #2563eb;       /* 核心蓝 */
  --primary-glow: rgba(37, 99, 235, 0.2);
  
  --border-light: rgba(0, 0, 0, 0.06);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  --gradient-title: linear-gradient(135deg, #0f172a 0%, #3b82f6 100%);
  --decoration-blob: #e2e8f0;
}

/* [Dark Mode] 深色模式变量覆盖 */
[data-theme="dark"] {
  --bg-body: #1b1b1d;       /* 纯净中性暗背景 */
  --bg-card: #242526;       /* 轻微抬升层级 */
  --bg-glass: rgba(27, 27, 29, 0.82);
  --bg-hover: #2d2f31;
  
  --text-main: #e8e9ea;
  --text-muted: #b0b3b8;
  
  --primary: #78a8f8;
  --primary-glow: rgba(120, 168, 248, 0.24);
  
  --border-light: rgba(227, 227, 227, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.32);
  --shadow-card: 0 8px 20px rgba(0, 0, 0, 0.22);
  --shadow-hover: 0 12px 28px rgba(0, 0, 0, 0.30);
  
  --gradient-title: linear-gradient(135deg, #f1f2f4 0%, #9abcf2 100%);
  --decoration-blob: #2a2c2e;
}

/* =========================================
   2. Global Reset & Layout
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  width: 100%;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.6;
  /* 关键：平滑过渡背景色和文字颜色 */
  transition: background-color 0.4s ease, color 0.4s ease;
  max-width: 100%;
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

/* 新增：全局图片约束，防止图片撑破布局 */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { text-decoration: none; color: inherit; transition: var(--transition-base); }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section-padding { padding: 64px 0; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.column { flex-direction: column; }

/* 滚动条美化 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 4px; opacity: 0.5; }

/* =========================================
   3. Navigation (Glassmorphism)
   ========================================= */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.nav-container {
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--primary);
}

.nav-actions { display: flex; align-items: center; gap: 24px; }

.nav-links { display: flex; gap: 18px; }
.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-fast) var(--ease-standard);
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

.nav-controls { display: flex; align-items: center; gap: 12px; }

/* 按钮通用样式 */
.control-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard), transform var(--duration-fast) var(--ease-standard);
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

/* 主题切换按钮特殊处理 */
.theme-toggle {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.theme-toggle i {
  position: absolute;
  transition: transform 420ms var(--ease-emphasis), opacity 320ms var(--ease-standard);
}

/* 图标切换动画逻辑 */
[data-theme="light"] .moon-icon { transform: translateY(20px) rotate(90deg); opacity: 0; }
[data-theme="light"] .sun-icon { transform: translateY(0) rotate(0); opacity: 1; }
[data-theme="dark"] .sun-icon { transform: translateY(-20px) rotate(-90deg); opacity: 0; }
[data-theme="dark"] .moon-icon { transform: translateY(0) rotate(0); opacity: 1; }

/* =========================================
   4. Hero Section / Intro
   ========================================= */
.intro {
  padding: 84px 0 44px;
  position: relative;
  text-align: center;
}

/* 背景装饰球 */
.bg-decoration {
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--decoration-blob) 0%, transparent 70%);
  opacity: 0.5;
  z-index: -1;
  pointer-events: none;
}

.avatar-container {
  position: relative;
  margin-bottom: 18px;
  opacity: 0;
  animation: intro-fade-up 620ms var(--ease-emphasis) 120ms forwards;
}

.avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  position: relative;
  z-index: 2;
  flex-shrink: 0; /* 防止头像被挤压 */
}

.avatar-glow {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--primary);
  filter: blur(25px);
  opacity: 0.4;
  z-index: 1;
  transform: scale(0.9);
  transition: opacity 0.3s;
}
.avatar-container:hover .avatar-glow { opacity: 0.7; }

.gradient-text {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-main);
  letter-spacing: -1px;
  opacity: 0;
  animation: intro-fade-up 620ms var(--ease-emphasis) 210ms forwards;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
  opacity: 0;
  animation: intro-fade-up 620ms var(--ease-emphasis) 300ms forwards;
}

.intro-contact-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
  opacity: 0;
  animation: intro-fade-up 620ms var(--ease-emphasis) 390ms forwards;
}

.intro-contact-link {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: var(--bg-card);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}

.intro-contact-link i {
  font-size: 1.1rem;
}

.intro-contact-link:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* =========================================
   5. Projects Grid & Detail Images
   ========================================= */
h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-main);
  position: relative;
  display: inline-block;
  width: 100%;
}
/* 标题下划线 */
h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--primary);
  margin: 12px auto 0;
  border-radius: 2px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
  /* 解决 Safari 下圆角溢出问题 */
  transform: translateZ(0); 
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--primary-glow);
}

/* 首页项目卡片缩略图 - 优化适配 */
.project-thumbnail {
  width: 100%;
  height: 220px;           /* 调整高度，显示更佳 */
  object-fit: cover;       /* 填满容器，防止拉伸 */
  object-position: center; /* 居中裁剪 */
  border-bottom: 1px solid var(--border-light);
  transition: transform var(--duration-base) var(--ease-standard);
  background-color: var(--bg-hover);
}

.card:hover .project-thumbnail { transform: scale(1.02); }

.project-thumbnail-wrapper { overflow: hidden; }

.project-info { padding: 24px; }

.project-info h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.project-info p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-link {
  font-weight: 600;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.project-link::after { content: '→'; transition: transform 0.2s; }
.project-link:hover::after { transform: translateX(4px); }

/* 子页面：详情大图样式 (新增) */
.project-detail-card { padding: 40px; }

.project-detail-desc {
  max-width: 800px;
  margin: 30px auto;
  line-height: 1.8;
  color: var(--text-muted);
}

.project-img {
  display: block;
  width: 100%;             /* 强制宽度撑满容器 */
  max-width: 100%;         /* 防止超出父容器 */
  height: auto;            /* 高度自动，保持比例 */
  object-fit: contain;     /* 保证图片内容完整显示 */
  border-radius: var(--radius-md);
  margin: 32px auto;       /* 上下增加间距 */
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-light);
}

/* =========================================
   6. Documents & Buttons
   ========================================= */
.publish-links-wrapper { text-align: center; margin-top: 40px; }

.publish-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  background: var(--bg-card);
  padding: 12px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.publish-link {
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 500;
  color: var(--text-muted);
  transition: transform var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), background-color var(--duration-fast) var(--ease-standard);
  display: flex;
  align-items: center;
  gap: 8px;
}

.publish-link:hover {
  background: var(--bg-hover);
  color: var(--primary);
  transform: translateY(-1px);
}

@keyframes intro-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================
   7. Footer
   ========================================= */

footer {
  text-align: center;
  padding: 30px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  background: var(--bg-body);
}

/* =========================================
   8. Mobile Responsive
   ========================================= */
@media (max-width: 768px) {
  .nav-links { display: none; } /* 暂时简化手机端 */
  .container { padding: 0 16px; }
  
  .section-padding { padding: 48px 0; }
  .intro { padding-top: 56px; }
  .gradient-text { font-size: 2.2rem; }
  .nav-actions { gap: 12px; }
  .nav-controls { gap: 8px; }
  .control-btn { padding: 6px 10px; }
  .logo { font-size: 1.1rem; }
  .project-detail-card { padding: 24px 18px; }

  /* 手机端图片适配 */
  .avatar {
    width: 120px;
    height: 120px;
  }
  .project-thumbnail {
    height: 180px;
  }
  .project-img {
    margin: 20px auto;
    border-radius: 8px;
  }
  
  .publish-links {
    flex-direction: column;
    border-radius: var(--radius-md);
    width: 100%;
  }
  
  .intro-contact-links {
    gap: 10px;
    margin-top: 18px;
  }

  .timeline-container {
    padding-left: 24px;
  }

  .timeline-dot {
    left: -28px;
  }
}


/* Paste this AFTER your existing CSS */

/* =========================================
   9. Open Source Section (New)
   ========================================= */
.opensource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 20px;
}

.os-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--duration-base) var(--ease-standard), box-shadow var(--duration-base) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.os-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}

.os-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

.os-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

.os-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.os-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.os-tag {
  font-size: 0.75rem;
  padding: 4px 10px;
  background: var(--bg-hover);
  color: var(--text-muted);
  border-radius: 20px;
}

.os-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.os-btn {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}
.os-btn:hover { text-decoration: underline; }

/* =========================================
   10. Timeline Section (New)
   ========================================= */
.timeline-container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 30px;
}

/* Vertical Line */
.timeline-container::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
}

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

.timeline-dot {
  position: absolute;
  left: -35px; /* Adjust based on padding */
  top: 5px;
  width: 12px;
  height: 12px;
  background: var(--bg-body);
  border: 2px solid var(--primary);
  border-radius: 50%;
  z-index: 1;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
}

.timeline-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-main);
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* =========================================
   11. Tech Stack Section (New)
   ========================================= */
.skills-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  gap: 24px;
}

.skill-category h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  color: var(--text-main);
  border-left: 3px solid var(--primary);
  padding-left: 12px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-badge {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard), border-color var(--duration-fast) var(--ease-standard);
}

.skill-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  filter: blur(2px);
  transition: opacity var(--duration-base) var(--ease-standard), transform var(--duration-base) var(--ease-standard), filter var(--duration-base) var(--ease-standard);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  .avatar-container,
  .gradient-text,
  .subtitle,
  .intro-contact-links {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

/* 修复主题切换按钮的点击响应 */
.theme-toggle {
  cursor: pointer;
  z-index: 10; /* 提高层级 */
  /* 确保按钮有足够空间容纳图标 */
  width: 40px; 
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 防止图标拦截鼠标事件，确保点击穿透到 button */
.theme-toggle i {
  pointer-events: none; 
}

/* 确保导航栏层级够高 */
nav {
  z-index: 1000;
}

/* ... Previous CSS ... */

/* =========================================
   12. Project Tags (New)
   ========================================= */
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px; /* Space between tags and 'View Details' link */
  margin-top: -12px;   /* Pull closer to description */
}

.project-tag {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: var(--bg-hover);
  color: var(--primary);
  border-radius: 4px;
  font-weight: 500;
  border: 1px solid var(--border-light);
}

/* Adjust paragraph margin in project info to accommodate tags */
.project-info p {
  margin-bottom: 16px; 
}

/* =========================================
   PI + STUDENTS Academic Style Patch
   （只影响这两个模块）
   ========================================= */

/* ========= PI 卡片学术风 ========= */
.pi-card {
  padding: 28px 24px;
  border-radius: 14px;
}

.pi-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.pi-card .student-role {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* PI 标签更克制 */
.pi-card .project-tags {
  margin-top: 12px;
  gap: 6px;
}

.pi-card .project-tag {
  font-size: 11px;
  padding: 3px 10px;
  background: var(--bg-hover);
  color: var(--primary);
  border-radius: 6px;
}

/* ========= Students 学术卡片风 ========= */
.projects-grid .card {
  padding: 14px;
  text-align: center;
}

/* ⭐ 头像缩小（核心改动） */
.projects-grid .project-thumbnail {
  width: 88px;
  height: 88px;
  border-radius: 12px;
  object-fit: cover;
  margin: 14px auto 8px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

/* hover 轻微学术动画 */
.projects-grid .card:hover .project-thumbnail {
  transform: scale(1.04);
}

/* name 更学术 */
.projects-grid .project-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 2px;
}

/* role 弱化 */
.projects-grid .student-role {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* description 更紧凑 */
.projects-grid .project-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* tags 更像 paper style */
.projects-grid .project-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.projects-grid .project-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-hover);
  color: var(--primary);
  border: 1px solid var(--border-light);
}

/* link 更克制 */
.projects-grid .project-link {
  font-size: 12px;
  margin-top: 10px;
  display: inline-block;
  opacity: 0.9;
}

.projects-grid .project-link:hover {
  opacity: 1;
}

/* =========================================
   HERO IMAGE
   ========================================= */

.hero-banner {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      rgba(0,0,0,0.45),
      rgba(0,0,0,0.55)
    );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-content h1 {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 18px;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 760px;
  opacity: 0.92;
}

/* =========================================
   PI SECTION
   ========================================= */

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

.pi-avatar {
  width: 240px;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.pi-title {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.pi-links a {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--primary);
  background: var(--bg-card);
  font-size: 0.88rem;
  font-weight: 600;
}

.pi-links a:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.pi-affiliation-note {
  margin-bottom: 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pi-right p {
  margin-bottom: 18px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* =========================================
   RESEARCH VISION
   ========================================= */

.research-section {
  padding-top: 24px;
}

.research-intro {
  max-width: 850px;
  margin: 0 auto 34px;
  text-align: center;
}

.research-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.research-card {
  position: relative;
  min-height: 220px;
  padding: 26px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.research-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  opacity: 0.82;
}

.research-index {
  margin-bottom: 24px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
}

.research-card h3 {
  margin-bottom: 14px;
  color: var(--text-main);
  font-size: 1.15rem;
  line-height: 1.35;
}

.research-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

/* =========================================
   PUBLICATION LIST
   ========================================= */

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

.pub-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.7;
}

.pub-index {
  color: var(--primary);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pub-content {
  min-width: 0;
}

.pub-title {
  font-weight: 600;
  color: var(--text-main);
}

.pub-title-link {
  color: inherit;
  text-decoration: none;
}

.pub-title-link:hover {
  color: var(--primary);
}

.pub-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pub-venue {
  color: var(--primary);
  font-weight: 500;
}

.pub-link {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.pub-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-hover);
}

.pub-year {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* =========================================
   GROUP
   ========================================= */

.group-category {
  margin-bottom: 56px;
}

.group-category h3 {
  margin-bottom: 24px;
  border-left: 4px solid var(--primary);
  padding-left: 14px;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 22px;
}

.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 22px;
}

.member-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.member-role {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.member-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* =========================================
   Academic Block
   ========================================= */

.academic-block h3 {
  margin-top: 40px;
  margin-bottom: 16px;
}

.academic-list {
  padding-left: 18px;
}

.academic-list li {
  margin-bottom: 12px;
  line-height: 1.8;
  color: var(--text-muted);
}

/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 768px) {

  .hero-content h1 {
    font-size: 2.4rem;
  }

  .pi-wrapper {
    grid-template-columns: 1fr;
  }

  .pi-avatar {
    width: 100%;
    max-width: 260px;
  }

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

  .research-intro {
    text-align: left;
  }

  .pub-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

}

/* =========================================================
   ADVANCED HERO
   ========================================================= */

.hero-banner {
  position: relative;
  height: clamp(640px, 82vh, 820px);
  min-height: 640px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background:
    #111827;
}

.hero-banner::before {
  content: '';
  position: absolute;
  inset: -28px;
  z-index: 0;
  background:
    url('../images/hero-collage-01.jpg')
    center / cover
    no-repeat;
  filter:
    blur(22px)
    saturate(1.05)
    brightness(0.68);
  transform: scale(1.08);
}

.hero-collage {
  position: absolute;
  top: 50%;
  right: clamp(24px, 7vw, 148px);
  bottom: auto;
  left: auto;

  width: min(44vw, 620px);
  height: min(64vh, 620px);

  z-index: 3;
  display: grid;
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  grid-auto-flow: dense;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.16);
  opacity: 0.88;
  filter:
    drop-shadow(0 24px 80px rgba(0,0,0,0.38));
  transform:
    translateY(-50%);
}

.hero-collage-item {
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255,255,255,0.08);
}

.hero-collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-collage-item:nth-child(6n + 1) {
  grid-column: span 3;
  grid-row: span 2;
}

.hero-collage-item:nth-child(6n + 2) {
  grid-column: span 3;
  grid-row: span 3;
}

.hero-collage-item:nth-child(6n + 3) {
  grid-column: span 2;
  grid-row: span 2;
}

.hero-collage-item:nth-child(6n + 4) {
  grid-column: span 2;
  grid-row: span 2;
}

.hero-collage-item:nth-child(6n + 5) {
  grid-column: span 2;
  grid-row: span 2;
}

.hero-collage-item:nth-child(n + 7) {
  grid-column: span 2;
  grid-row: span 2;
}

/* =========================================================
   OVERLAY
   ========================================================= */

.hero-overlay {

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at 46% 58%,
      rgba(0,0,0,0.12) 0%,
      rgba(0,0,0,0.18) 34%,
      rgba(0,0,0,0.45) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0,0,0,0.26) 0%,
      rgba(0,0,0,0.58) 100%
    );

  z-index: 2;
}

/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero-content {

  position: relative;
  z-index: 5;

  color: white;

  max-width: var(--container-width);
  justify-content: flex-end;
  padding-bottom: clamp(76px, 12vh, 128px);
}

.hero-badge {

  display: inline-flex;

  align-items: center;

  gap: 8px;

  padding: 8px 18px;

  border-radius: 999px;

  background:
    rgba(255,255,255,0.08);

  backdrop-filter: blur(10px);

  border:
    1px solid rgba(255,255,255,0.12);

  font-size: 0.9rem;

  margin-bottom: 24px;

  animation:
    fadeUp 1s ease forwards;
}

.hero-content h1 {

  font-size: 4rem;

  font-weight: 800;

  line-height: 1.05;

  margin-bottom: 24px;

  letter-spacing: -2px;

  animation:
    fadeUp 1s ease 0.15s forwards;

  opacity: 0;
}

.hero-content p {

  font-size: 1.12rem;

  line-height: 1.8;

  color:
    rgba(255,255,255,0.88);

  max-width: 560px;

  animation:
    fadeUp 1s ease 0.3s forwards;

  opacity: 0;
}

/* =========================================================
   FLOATING KEYWORDS
   ========================================================= */

.floating-keywords {

  position: absolute;

  inset: 0;

  z-index: 3;

  pointer-events: none;
}

.floating-keywords span {

  position: absolute;

  padding:
    10px 18px;

  border-radius: 999px;

  font-size: 0.82rem;

  color:
    rgba(255,255,255,0.92);

  background:
    rgba(255,255,255,0.08);

  border:
    1px solid rgba(255,255,255,0.10);

  backdrop-filter: blur(10px);

  animation:
    floatSlow 8s ease-in-out infinite;
}

/* keyword positions */

.floating-keywords span:nth-child(1) {
  top: 18%;
  left: 10%;
}

.floating-keywords span:nth-child(2) {
  top: 26%;
  right: 14%;
}

.floating-keywords span:nth-child(3) {
  top: 48%;
  left: 6%;
}

.floating-keywords span:nth-child(4) {
  top: 62%;
  right: 10%;
}

.floating-keywords span:nth-child(5) {
  bottom: 4%;
  left: 18%;
}

.floating-keywords span:nth-child(6) {
  top: 14%;
  left: 40%;
}

.floating-keywords span:nth-child(7) {
  bottom: 22%;
  right: 24%;
}

.floating-keywords span:nth-child(8) {
  top: 56%;
  right: 36%;
}

/* animation delays */

.floating-keywords span:nth-child(2) {
  animation-delay: 1s;
}

.floating-keywords span:nth-child(3) {
  animation-delay: 2s;
}

.floating-keywords span:nth-child(4) {
  animation-delay: 3s;
}

.floating-keywords span:nth-child(5) {
  animation-delay: 4s;
}

.floating-keywords span:nth-child(6) {
  animation-delay: 2.5s;
}

.floating-keywords span:nth-child(7) {
  animation-delay: 1.5s;
}

.floating-keywords span:nth-child(8) {
  animation-delay: 3.5s;
}

/* =========================================================
   PARTICLES
   ========================================================= */

.particles {

  position: absolute;
  inset: 0;

  z-index: 2;

  overflow: hidden;
}

.particle {

  position: absolute;

  width: 4px;
  height: 4px;

  border-radius: 50%;

  background:
    rgba(255,255,255,0.55);

  box-shadow:
    0 0 12px rgba(255,255,255,0.6);
}

/* particle positions */

.particle:nth-child(1) {
  top: 12%;
  left: 18%;
  animation: particleMove 10s linear infinite;
}

.particle:nth-child(2) {
  top: 34%;
  left: 72%;
  animation: particleMove 16s linear infinite;
}

.particle:nth-child(3) {
  top: 68%;
  left: 22%;
  animation: particleMove 13s linear infinite;
}

.particle:nth-child(4) {
  top: 78%;
  left: 82%;
  animation: particleMove 18s linear infinite;
}

.particle:nth-child(5) {
  top: 42%;
  left: 44%;
  animation: particleMove 11s linear infinite;
}

.particle:nth-child(6) {
  top: 20%;
  left: 54%;
  animation: particleMove 15s linear infinite;
}

.particle:nth-child(7) {
  top: 58%;
  left: 64%;
  animation: particleMove 12s linear infinite;
}

.particle:nth-child(8) {
  top: 80%;
  left: 40%;
  animation: particleMove 20s linear infinite;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes floatSlow {

  0% {
    transform:
      translateY(0px)
      translateX(0px);
  }

  50% {
    transform:
      translateY(-12px)
      translateX(8px);
  }

  100% {
    transform:
      translateY(0px)
      translateX(0px);
  }

}

@keyframes particleMove {

  0% {
    transform:
      translateY(0px)
      scale(1);

    opacity: 0.25;
  }

  50% {
    transform:
      translateY(-40px)
      scale(1.8);

    opacity: 1;
  }

  100% {
    transform:
      translateY(-80px)
      scale(1);

    opacity: 0;
  }

}

@keyframes heroSlowZoom {

  from {
    transform:
      scale(1.03);
  }

  to {
    transform:
      scale(1.09);
  }

}

@keyframes fadeUp {

  from {

    opacity: 0;

    transform:
      translateY(30px);
  }

  to {

    opacity: 1;

    transform:
      translateY(0);
  }

}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .hero-banner {

    min-height: 620px;
    height: calc(100vh - 64px);

    padding:
      0 0 64px;
  }

  .hero-collage {
    top: 8px;
    left: 0;
    right: auto;
    width: 100%;
    height: 58vh;
    transform: none;
    gap: 6px;
    padding: 6px;
  }

  .hero-content {
    padding-bottom: 36px;
  }

  .hero-content h1 {

    font-size: 3rem;
  }

  .hero-content p {

    font-size: 1.05rem;
  }

  .floating-keywords span {

    font-size: 0.72rem;

    padding:
      8px 12px;
  }

  .floating-keywords span:nth-child(n+4) {
    display: none;
  }

  .floating-keywords span:nth-child(1) {
    top: 18%;
    left: 8%;
  }

  .floating-keywords span:nth-child(2) {
    top: 22%;
    right: 10%;
  }

  .floating-keywords span:nth-child(3) {
    top: 50%;
    left: 8%;
  }

}


/* =========================================================
   RECRUITMENT SECTION
   ========================================================= */

#recruitment {
  scroll-margin-top: 78px;
}

.nav-links .nav-recruitment {
  padding: 5px 11px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

.nav-links .nav-recruitment::after {
  display: none;
}

.nav-links .nav-recruitment:hover,
.nav-links .nav-recruitment.active {
  color: var(--text-invert);
  background: var(--primary);
}

.recruitment-section {
  position: relative;
  padding: 44px 0 32px;
  background:
    radial-gradient(circle at 12% 18%, var(--primary-glow), transparent 28%),
    var(--bg-body);
}

.recruitment-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--primary-glow);
  border-radius: 24px;
  background:
    linear-gradient(145deg, var(--bg-card) 0%, var(--bg-body) 100%);
  box-shadow:
    0 28px 72px -42px var(--primary),
    var(--shadow-card);
}

.recruitment-glow {
  position: absolute;
  top: -180px;
  right: -140px;
  z-index: -1;
  width: 440px;
  height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-glow) 0%, transparent 68%);
  pointer-events: none;
}

.recruitment-topline,
.recruitment-heading,
.recruitment-position-meta,
.recruitment-footer,
.recruitment-footer-actions {
  display: flex;
  align-items: center;
}

.recruitment-topline {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.recruitment-badge,
.recruitment-status,
.recruitment-audience {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  white-space: nowrap;
}

.recruitment-badge {
  gap: 8px;
  padding: 7px 13px;
  color: var(--primary);
  background: var(--bg-hover);
  border: 1px solid var(--primary-glow);
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.recruitment-status {
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.recruitment-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
  animation: recruitment-pulse 2.4s ease-in-out infinite;
}

.recruitment-heading {
  justify-content: space-between;
  align-items: flex-end;
  gap: 34px;
  margin-bottom: 30px;
}

.recruitment-eyebrow {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.recruitment-heading h2 {
  width: auto;
  margin: 0 0 10px;
  text-align: left;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.recruitment-heading h2::after {
  display: none;
}

.recruitment-lead {
  max-width: 690px;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.8;
}

.recruitment-primary-link,
.recruitment-email,
.recruitment-research-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  font-weight: 700;
  transition:
    transform var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard),
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard);
}

.recruitment-primary-link {
  flex: 0 0 auto;
  padding: 12px 18px;
  color: var(--text-invert);
  background: var(--primary);
  border: 1px solid var(--primary);
  box-shadow: 0 12px 24px -16px var(--primary);
}

.recruitment-primary-link:hover,
.recruitment-email:hover {
  transform: translateY(-2px);
}

.recruitment-positions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 36px;
}

.recruitment-position {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 17px;
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition:
    transform var(--duration-base) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-base) var(--ease-standard);
}

.recruitment-position:hover {
  transform: translateY(-3px);
  border-color: var(--primary-glow);
  box-shadow: var(--shadow-hover);
}

.recruitment-position-icon,
.recruitment-support-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--bg-hover);
  border: 1px solid var(--primary-glow);
}

.recruitment-position-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 1.05rem;
}

.recruitment-position-content {
  min-width: 0;
}

.recruitment-position-meta {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.recruitment-count {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 850;
  line-height: 1;
}

.recruitment-count small {
  margin-left: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.recruitment-audience {
  padding: 4px 9px;
  color: var(--text-muted);
  background: var(--bg-hover);
  border: 1px solid var(--border-light);
  font-size: 0.72rem;
  font-weight: 650;
}

.recruitment-position h3 {
  margin-bottom: 6px;
  color: var(--text-main);
  font-size: 1.08rem;
}

.recruitment-position p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.recruitment-support {
  margin-bottom: 20px;
  padding: 28px 0 30px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.recruitment-subheading h3,
.recruitment-fit-heading h3,
.recruitment-footer h3 {
  color: var(--text-main);
  font-size: 1.22rem;
}

.recruitment-subheading h3 {
  margin-bottom: 18px;
}

.recruitment-support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.recruitment-support-item {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg-body);
}

.recruitment-support-icon {
  width: 38px;
  height: 38px;
  margin-bottom: 15px;
  border-radius: 11px;
  font-size: 0.94rem;
}

.recruitment-support-item h4 {
  margin-bottom: 7px;
  color: var(--text-main);
  font-size: 0.98rem;
}

.recruitment-support-item p {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.7;
}

.recruitment-fit {
  margin-top: 28px;
  padding: 26px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--bg-hover);
}

.recruitment-fit-heading {
  margin-bottom: 18px;
}

.recruitment-fit-heading h3 {
  margin-bottom: 5px;
}

.recruitment-fit-heading p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.recruitment-mentoring {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 21px;
  padding: 13px 15px;
  border-left: 3px solid var(--primary);
  border-radius: 0 10px 10px 0;
  color: var(--text-main);
  background: var(--bg-card);
  font-size: 0.9rem;
  line-height: 1.7;
}

.recruitment-mentoring i {
  margin-top: 5px;
  color: var(--primary);
}

.recruitment-quality-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.recruitment-quality {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  min-width: 0;
}

.recruitment-quality-index {
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 850;
  letter-spacing: 0.05em;
}

.recruitment-quality h4 {
  margin-bottom: 4px;
  color: var(--text-main);
  font-size: 0.94rem;
}

.recruitment-quality p {
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.recruitment-requirements {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.recruitment-requirements h4 {
  margin-bottom: 12px;
  color: var(--text-main);
  font-size: 0.96rem;
}

.recruitment-requirements ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
}

.recruitment-requirements li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.recruitment-requirements li i {
  margin-top: 5px;
  color: #22c55e;
  font-size: 0.72rem;
}

.recruitment-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.65;
}

.recruitment-note i {
  margin-top: 4px;
  color: var(--primary);
}

.recruitment-footer {
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-top: 26px;
  padding-top: 25px;
  border-top: 1px solid var(--border-light);
}

.recruitment-footer h3 {
  margin-bottom: 6px;
}

.recruitment-footer p {
  color: var(--text-main);
  font-size: 0.94rem;
  font-weight: 600;
}

.recruitment-footer small {
  display: block;
  max-width: 610px;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.6;
}

.recruitment-footer-actions {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.recruitment-email {
  padding: 10px 15px;
  color: var(--text-invert);
  background: var(--primary);
  border: 1px solid var(--primary);
  font-size: 0.84rem;
}

.recruitment-research-link {
  padding: 10px 14px;
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary-glow);
  font-size: 0.84rem;
}

.recruitment-research-link:hover {
  color: var(--text-invert);
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.recruitment-primary-link:focus-visible,
.recruitment-email:focus-visible,
.recruitment-research-link:focus-visible,
.nav-links .nav-recruitment:focus-visible {
  outline: 3px solid var(--primary-glow);
  outline-offset: 3px;
}

@keyframes recruitment-pulse {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.92);
  }

  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@media (max-width: 900px) {
  .recruitment-heading,
  .recruitment-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .recruitment-support-grid,
  .recruitment-quality-grid {
    grid-template-columns: 1fr;
  }

  .recruitment-support-item {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
  }

  .recruitment-support-icon {
    grid-row: span 2;
    margin-bottom: 0;
  }

  .recruitment-support-item h4 {
    align-self: end;
  }

  .recruitment-footer-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .recruitment-section {
    padding: 26px 0 18px;
  }

  .recruitment-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .recruitment-topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .recruitment-heading {
    gap: 20px;
  }

  .recruitment-heading h2 {
    font-size: 2.1rem;
  }

  .recruitment-primary-link {
    width: 100%;
  }

  .recruitment-positions,
  .recruitment-requirements ul {
    grid-template-columns: 1fr;
  }

  .recruitment-position {
    grid-template-columns: 1fr;
    padding: 19px;
  }

  .recruitment-position-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .recruitment-support-item {
    display: block;
  }

  .recruitment-support-icon {
    margin-bottom: 13px;
  }

  .recruitment-fit {
    padding: 21px 17px;
  }

  .recruitment-footer-actions,
  .recruitment-email,
  .recruitment-research-link {
    width: 100%;
  }

  .recruitment-email span {
    overflow-wrap: anywhere;
  }
}

@media (prefers-reduced-motion: reduce) {
  .recruitment-status-dot {
    animation: none;
  }
}
