:root {
  --bg-primary: #faf8f3;       
  --bg-secondary: #ffffff;     
  --text-primary: #11182b;     
  --text-secondary: #525b72;  
  --text-muted: #8a92a6;    
  --border-color: #e6e2d6;

  --accent-primary: #1b2f6b;
  --accent-color: var(--accent-primary);
  --accent-hover: #142450;
  --accent-amber: #f2a900;
  --accent-amber-dark: #c98300;
  --accent-teal: #0e7c7b;

  --dark-bg-primary: #121212;
  --dark-bg-secondary: #1e1e1e;
  --dark-text-primary: #e0e0e0;
  --dark-text-secondary: #b0b0b0;
  --dark-accent-color: #4ecdc4;
  --dark-accent-hover: #45b7aa;

  --font-family-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-family-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-family-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
}

body.dark-mode {
  background-color: var(--dark-bg-primary);
  color: var(--dark-text-primary);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  z-index: 9999;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus { top: 6px; }

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease-out);
}

.header.scrolled {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
}

.header.header-hidden {
  transform: translateY(-100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-mode .header {
  background-color: var(--dark-bg-secondary);
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.05);
}

.logo-container { display: flex; align-items: center; gap: 1rem; }

.logo {
  height: 70px;
  margin: 10px 0 10px 10px;
  border-radius: 0;
  object-fit: cover;
}

.vertical-line { width: 3px; height: 60px; background-color: #313131; }

.lab-name {
  font-family: var(--font-family-display);
  font-size: 1.3rem;
  font-weight: 700;
}

.navigation ul { display: flex; list-style: none; gap: 2rem; }

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.3rem;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-amber);
  transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }
.nav-link:hover { color: var(--accent-primary); }
.dark-mode .nav-link { color: var(--dark-text-secondary); }
.dark-mode .nav-link:hover { color: var(--dark-accent-color); }

.publications-section {
  padding: 4.5rem 5% 5rem;
  background-color: var(--bg-secondary);
  background-image: radial-gradient(circle at 18px 18px, rgba(27,47,107,0.04) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
}

.dark-mode .publications-section {
  background-color: var(--dark-bg-primary);
  background-image: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-family-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-teal);
  font-weight: 500;
  margin-bottom: 1rem;
  width: 100%;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-amber);
  position: relative;
  flex-shrink: 0;
}
.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid var(--accent-amber);
  animation: pulseRing 1.8s var(--ease-out) infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  font-family: var(--font-family-display);
  color: var(--text-primary);
}

.section-header h2 {
  font-size: 2.1rem;
  font-weight: 700;
}

.dark-mode .section-header { color: var(--dark-text-primary); }

.section-divider {
  height: 3px;
  width: 70px;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-teal));
  margin: 1.25rem auto 0;
  border-radius: var(--radius-full);
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 950px;
  margin: 0 auto;
}

.publication-item {
  display: flex;
  gap: 2rem;
  padding: 1.75rem 2rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.dark-mode .publication-item {
  background-color: var(--dark-bg-secondary);
  border-color: rgba(255,255,255,0.08);
}

.publication-item:hover {
  transform: translateX(8px);
  box-shadow: 0 14px 30px rgba(27,47,107,0.1);
  border-color: rgba(27,47,107,0.18);
}

.dark-mode .publication-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.pub-year {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  font-family: var(--font-family-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent-primary);
}

.dark-mode .pub-year {
  background: var(--dark-accent-color);
  color: #11182b;
}

.pub-details { flex: 1; }

.pub-details h4 {
  font-family: var(--font-family-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
}
.dark-mode .pub-details h4 { color: var(--dark-text-primary); }

.pub-authors {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}
.dark-mode .pub-authors { color: var(--dark-text-secondary); }

.pub-venue {
  display: inline-block;
  font-family: var(--font-family-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--accent-teal);
  background: rgba(14,124,123,0.1);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin: 0 0.75rem 0.75rem 0;
}
.dark-mode .pub-venue {
  color: var(--dark-accent-color);
  background: rgba(78,205,196,0.12);
}

.pub-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  position: relative;
  margin-left: 0.25rem;
}
.dark-mode .pub-link { color: var(--dark-accent-color); }

.pub-link i {
  font-size: 0.75rem;
  transition: transform 0.25s var(--ease-out);
}
.pub-link:hover i { transform: translateX(3px); }

.pub-link::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent-amber);
  transition: width 0.3s ease;
}
.dark-mode .pub-link::after { background-color: var(--dark-accent-color); }
.pub-link:hover::after { width: calc(100% - 1rem); }

@media (max-width: 600px) {
  .publication-item { flex-direction: column; gap: 1rem; padding: 1.5rem; }
  .pub-year { width: auto; height: auto; padding: 4px 14px; flex-direction: row; }
}

.theme-toggle { position: relative; width: 100px; height: 50px; }

.theme-switch-label {
  position: absolute;
  width: 100%;
  height: 50px;
  background-color: var(--dark-bg-primary);
  border-radius: 25px;
  cursor: pointer;
  border: 3px solid var(--dark-bg-primary);
}

.theme-switch { position: absolute; display: none; }

.slider {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 25px;
  transition: 0.3s;
}

.theme-switch:checked ~ .slider { background-color: var(--bg-primary); }

.slider::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  box-shadow: inset 12px -4px 0px 0px var(--bg-primary);
  background-color: var(--dark-bg-primary);
  transition: 0.3s;
}

.theme-switch:checked ~ .slider::before {
  transform: translateX(50px);
  background-color: var(--dark-bg-primary);
  box-shadow: none;
}

.footer {
  background-color: var(--text-primary);
  color: white;
  padding: 3rem 5% 1rem;
}
.dark-mode .footer { background-color: var(--dark-bg-secondary); }

.footer-button {
  text-decoration: none;
  color: white;
  padding: 0.5rem 1rem;
  border: 1px solid white;
  border-radius: 5px;
  transition: all 0.3s ease;
}
.footer-button:hover { background-color: rgba(255, 255, 255, 0.1); }

.two-column-list { display: flex; gap: 2rem; }
.two-column-list ul { padding-left: 0; margin-top: 0; }

.footer-content {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-logo {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-img {
  height: 100px;
  border-radius: 10px;
  margin-bottom: 1rem;
  object-fit: cover;
}

.footer-logo p { font-size: 1.1rem; font-weight: 500; }

.footer-links {
  flex: 2;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}

.footer-col h4 { font-size: 1.2rem; margin-bottom: 1.2rem; position: relative; }

.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  height: 2px;
  width: 40px;
  background-color: var(--accent-amber);
}
.dark-mode .footer-col h4::after { background-color: var(--dark-accent-color); }

.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a { color: var(--dark-text-secondary); text-decoration: none; transition: all 0.3s ease; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
}

.university-affiliation { margin-top: 0.5rem; font-size: 0.9rem; color: var(--dark-text-secondary); }

@media screen and (max-width: 768px) {
  .header, .hero-section, .about-content, .project-slider {
    flex-direction: column;
    text-align: center;
  }

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

  .footer-logo {
    margin-bottom: 2rem;
    align-items: center;
    text-align: center;
  }

  .footer-links { flex-direction: column; gap: 2rem; }
  .footer-col { text-align: center; }
  .footer-col h4::after { left: 50%; transform: translateX(-50%); }
}
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent-primary, #007bff);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  z-index: 9999;
  transition: top 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.skip-link:focus {
  top: 6px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: #ffffff;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid #dee2e6;
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.header.scrolled {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.header.header-hidden {
  transform: translateY(-100%);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo {
  height: 70px;
  margin-left: 10px;
  margin-top: 10px;
  margin-bottom: 10px;
  border-radius: 0%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0, 0, 0.2, 1);
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.05);
}

.vertical-line {
  width: 3px;
  height: 60px;
  background-color: #313131;
}

.lab-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-primary, #007bff), var(--accent-secondary, #6c757d));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary, #495057);
  font-weight: 500;
  position: relative;
  padding-bottom: 0.3rem;
  transition: all 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-primary, #007bff);
  transition: width 0.3s cubic-bezier(0, 0, 0.2, 1);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link:hover {
  color: var(--accent-primary, #007bff);
}

.nav-link.active {
  color: var(--accent-primary, #007bff);
}

.nav-link.active::after {
  width: 100%;
}

@media (max-width: 480px) {
  .header {
    padding: 0.75rem 1rem;
  }
  
  .logo {
    height: 50px;
  }
  
  .lab-name {
    font-size: 1.1rem;
  }
  
  .navigation ul {
    gap: 1rem;
  }
  
  .nav-link {
    font-size: 0.9rem;
  }
}

@media (min-width: 481px) and (max-width: 768px) {
  .header {
    padding: 0.875rem 1.5rem;
  }
  
  .navigation ul {
    gap: 1.5rem;
  }
}

@media (max-width: 576px) {
  .navigation ul {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  .nav-link {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .nav-link:hover {
    transform: none;
  }
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .logo,
  .nav-link,
  .nav-link::after,
  .nav-link::before {
    transition-duration: 0.01ms !important;
  }
}

:root {
  --cursor-color: #a020f0; 
  --cursor-dot-size: 18px; 
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-ready {
    cursor: none !important;
  }
  body.custom-cursor-ready * {
    cursor: none !important;
  }

  #cursor-dot,
  #cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 99999;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
  }

  body.custom-cursor-ready #cursor-dot,
  body.custom-cursor-ready #cursor-ring {
    opacity: 1;
  }

  #cursor-dot {
    width: var(--cursor-dot-size);
    height: var(--cursor-dot-size);
    background: var(--cursor-color);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
    transition: background 0.2s ease, width 0.2s ease, height 0.2s ease;
  }

  #cursor-ring {
    width: 34px;
    height: 34px;
    border: 1.5px solid var(--cursor-color);
    opacity: 0.55;
    transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.25s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background 0.25s ease;
  }

  body.cursor-hover #cursor-ring {
    width: 52px;
    height: 52px;
    background: color-mix(in srgb, var(--cursor-color) 15%, transparent);
    border-color: var(--cursor-color);
  }

  body.cursor-hover #cursor-dot {
    background: var(--cursor-color);
  }

  body.cursor-active #cursor-ring {
    width: 26px;
    height: 26px;
  }
}

@media (hover: none), (pointer: coarse) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  #cursor-dot,
  #cursor-ring {
    display: none;
  }
  body.custom-cursor-ready,
  body.custom-cursor-ready * {
    cursor: auto !important;
  }
}
.publications-section {
  padding: 4.5rem 5% 5rem;
  background-color: var(--bg-primary);
  background-image: radial-gradient(circle at 18px 18px, rgba(27,47,107,0.05) 1.5px, transparent 1.5px);
  background-size: 36px 36px;
}

.dark-mode .publications-section {
  background-color: var(--dark-bg-primary);
  background-image: none;
}

.publication-item {
  position: relative;
  display: block;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-amber);
  border-radius: var(--radius-2xl);
  padding: 2rem 2.25rem;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}

.dark-mode .publication-item {
  background-color: var(--dark-bg-secondary);
  border-color: rgba(255,255,255,0.08);
  border-left-color: var(--dark-accent-color);
}

.publication-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 36px rgba(27,47,107,0.1);
  border-left-color: var(--accent-teal);
}

.dark-mode .publication-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.pub-tag {
  display: inline-block;
  font-family: var(--font-family-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  font-weight: 500;
  color: var(--accent-teal);
  background: rgba(14,124,123,0.1);
  padding: 3px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.dark-mode .pub-tag {
  color: var(--dark-accent-color);
  background: rgba(78,205,196,0.12);
}

.pub-details { flex: none; }
#a.section-header h2 {
  display: inline-block;
  background: linear-gradient(90deg, #f2a900, #0e7c7b);
  background-size: 100% 3px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  padding-bottom: 5px;
}
.pub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.pub-journal {
  font-family: var(--font-family-mono);
  font-size: 0.8rem;
  color: var(--accent-teal);
  font-style: normal;
  font-weight: 500;
}

.dark-mode .pub-journal {
  color: var(--dark-accent-color);
}