/* ================================================================
   GLOBAL THEME
   Design tokens for colors, spacing, radii, shadows, transitions
================================================================ */

:root {

  /* ----- Core background colors ----- */
  --bg: #05070a;
  /* near black base */
  --bg-alt: #0b0f16;
  /* dark blue-grey for panels */

  /* ----- Card surfaces ----- */
  --card-bg: rgba(27, 12, 28, 0.8);
  --card-alt-bg: rgba(27, 12, 28, 0.8);

  /* ----- Accent palette (derived from your Asset colors) ----- */
  --accent: #cf4d49;
  /* coral red */
  --accent-soft: #cd85ae;
  /* soft mauve */
  --accent-warm: #cd9ab8;
  /* warm teal */

  /* ----- Text colors ----- */
  --text: #f7f7f8;
  /* main text */
  --text-soft: #cfd3de;
  /* softer text */
  --muted: #8b92a3;
  /* muted UI grey */

  /* ----- Borders, radii, shadows ----- */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --radius-lg: 20px;
  --radius-xl: 32px;
  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.6);

  /* ----- Animation speeds ----- */
  --transition-fast: 0.22s ease;
  --transition-med: 0.35s ease;
}


/* ================================================================
   RESET / BASE
   Ensure consistent browser behavior
================================================================ */

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

html,
body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  /* nice smooth scroll */
}


/* ================================================================
   BACKGROUND + SCROLL-BLUR EFFECT (Desktop)
   The background image is applied twice:
   1) body: sharp version
   2) body::before: blurred version that fades in on scroll
================================================================ */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Image path relative to assets/css/ */
  background: url("../img/Asset 3.png") top center / cover no-repeat fixed;

  /* Fallback for very small screens or slow browsers */
  background-color: #000;

  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
}

/* Overlay used for the blur */
body::before {
  content: "";
  position: fixed;
  /* scrolls independently (desktop only) */
  inset: 0;

  background: url("../img/Asset 3.png") top center / cover no-repeat fixed;

  filter: blur(0px);
  /* initially sharp */
  opacity: 0;
  /* invisible at top */
  transition: opacity 0.5s ease, filter 0.5s ease;

  pointer-events: none;
  /* do not block clicks */
  z-index: -1;
  /* behind all content */
}

/* When scrolling, JS adds class="blur-bg" to <body> */
body.blur-bg::before {
  opacity: 1;
  /* show overlay */
  filter: blur(22px);
  /* heavy blur */
  background-color: rgba(0, 0, 0, 0.65);
  /* darken background */
}


/* ================================================================
   LAYOUT HELPERS
================================================================ */

.container {
  width: 100%;
  max-width: 1120px;
  /* main site width */
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 80px 0;
}

.section-alt {
  /* opaque-ish background that hides background image */
  background: linear-gradient(135deg,
      rgba(91, 42, 95, 0.8),
      rgba(12, 5, 8, 0.8));
  position: relative;
}


/* ================================================================
   HEADER + LOGO + NAVIGATION
================================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  /* frosted navbar */
  background: linear-gradient(to bottom,
      rgba(27, 12, 28, 0.8),
      rgba(12, 5, 8, 0.8)),
      transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

/* Logo + text block */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Your lab icon */
.logo-img {
  height: 32px;
  width: auto;
  object-fit: contain;
}

/* Lab name & subtitle */
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-title {
  font-size: 20px;
  font-weight: 650;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--muted);
}


/* ----- Navigation links ----- */

.main-nav {
  display: flex;
  gap: 18px;
  align-items: center;
}

.main-nav a {
  font-size: 14px;
  text-decoration: none;
  color: var(--text-soft);
  padding: 6px 8px;
  border-radius: 999px;
  transition: color var(--transition-fast),
    background var(--transition-fast),
    transform var(--transition-fast);
}

.main-nav a:hover {
  color: var(--accent-soft);
  background: rgba(216, 206, 230, 0.08);
  transform: translateY(-1px);
}


/* ----- Mobile nav hamburger icon ----- */

.nav-toggle {
  display: none;
  /* only shown below 880px */
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(27, 12, 28, 0.8);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 16px;
  height: 2px;
  background: var(--text);
  border-radius: 999px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}


/* ================================================================
   HERO SECTION
================================================================ */

.hero {
  padding: 72px 0 40px;
  min-height: 80vh;
  /* big top section */
  display: flex;
  align-items: flex-end;
  /* push text downwards */
}

/* Make hero extra-wide */
.hero .container {
  max-width: 1400px;
  width: 100%;
}

/* Hero inner alignment */
.hero-inner {
  width: 100%;
  display: flex;
  justify-content: center;
  padding-bottom: 0vh;
}

/* Hero text block */
.hero-text {
  max-width: 1400px;
  /* wide title */
  margin: 0 auto;
  text-align: center;
}

/* Hero title */
.hero-text h1 {
  font-size: 36px;
  line-height: 1.15;
  margin: 0 0 18px;
}

/* Hero paragraphs */
.hero-text p {
  margin: 0 0 14px;
  color: var(--text-soft);
}

/* Left-accent line for highlight text */
.hero-highlight {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--accent-soft);
  font-size: 15px;
}

/* Hero buttons aligned center */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
  text-align: center;
}


/* ----- Hero buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 14px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--transition-med),
    color var(--transition-med),
    transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn.primary {
  background: linear-gradient(135deg, #9f82bc, #6c236b);
  color: #120311;
  box-shadow: 0 3px 3px rgba(217, 172, 208, 0.5);
}

.btn.ghost {
  background: transparent;
  color: var(--accent-soft);
  border-color: rgba(216, 206, 230, 0.4);
}


/* ================================================================
   SECTION HEADERS
================================================================ */

.section-header {
  max-width: 640px;
  margin-bottom: 36px;
}


/* ================================================================
   RESEARCH SECTION
================================================================ */

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

.research-card {
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  padding: 20px 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-fast),
    box-shadow var(--transition-fast),
    border-color var(--transition-fast);
}


/* ================================================================
   TEAM SECTION
================================================================ */

.team-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.4fr);
  gap: 24px;
}

.team-card {
  border-radius: var(--radius-lg);
  background: rgba(13, 4, 11, 0.95);
  border: 1px solid var(--border-subtle);
  padding: 20px 18px;
  box-shadow: var(--shadow-soft);
}

.team-pi {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  /* photo + text */
  gap: 20px;
}

.pi-photo {
  width: 120px;
  /* adjust PI image size */
  height: auto;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}


/* ================================================================
   PUBLICATIONS
================================================================ */

/* Publication list spacing */
.pub-list {
  gap: 8px;           /* was 22px */
}

.pub-item {
  padding: 1px 0;      /* tighter spacing */
}

/* Authors: darker shade */
.pub-authors {
  color: #a0a6b3;      /* darker, less muted grey */
}

/* Journal name: accent coral red */
.pub-journal {
  color: #cf4d49;
  font-weight: 500;    /* optional, makes it stand out more */
}


/* ================================================================
   NEWS
================================================================ */

.news-timeline {
  padding-left: 16px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  gap: 20px;
}


/* ================================================================
   JOIN SECTION
================================================================ */

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


/* ================================================================
   CONTACT SECTION
================================================================ */

/* Cards inside contact grid */
.contact-card {
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  background: rgba(14, 6, 16, 0.95);
  border: 1px solid var(--border-subtle);
  font-size: 14px;
}

/* Notes under email/location */
.contact-note {
  font-size: 13px;
  color: var(--muted);
}

/* ---------- SOCIAL BUTTONS CONTAINER ---------- */
.social-buttons {
  display: flex;
  flex-direction: column;
  /* stack vertically */
  gap: 14px;
  margin-top: 14px;
}

/* ---------- BASE BUTTON STYLE ---------- */
.social-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  /* space between icon and text */
  padding: 10px 16px;
  border-radius: 999px;
  /* pill shape */
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

/* ---------- ICON IMAGES ---------- */
.social-icon-img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ---------- PLATFORM COLORS ---------- */

/* Twitter / X */
.social-twitter {
  background: rgba(29, 161, 242, 0.12);
  color: #1da1f2;
  border-color: rgba(29, 161, 242, 0.25);
}

.social-twitter:hover {
  background: rgba(29, 161, 242, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(29, 161, 242, 0.25);
}

/* Bluesky */
.social-bluesky {
  background: rgba(0, 133, 255, 0.12);
  color: #0085ff;
  border-color: rgba(0, 133, 255, 0.25);
}

.social-bluesky:hover {
  background: rgba(0, 133, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 133, 255, 0.25);
}

/* LinkedIn */
.social-linkedin {
  background: rgba(40, 103, 178, 0.12);
  color: #2867b2;
  border-color: rgba(40, 103, 178, 0.25);
}

.social-linkedin:hover {
  background: rgba(40, 103, 178, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(40, 103, 178, 0.25);
}


/* ================================================================
   FOOTER
================================================================ */

.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px 0 20px;
  background: rgba(27, 12, 28, 0.8);
}


/* ================================================================
   SCROLL REVEAL ANIMATIONS
================================================================ */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ================================================================
   RESPONSIVE (Mobile & Tablet)
================================================================ */

/* ----- Tablet & small laptops (max-width: 880px) ----- */

@media (max-width: 880px) {

  /* Background on tablets/phones
     - keep Asset 3 visible
     - no crazy fixed/blur issues
  */
  body {
    background: #000000;
  }

  body::before {
    position: fixed;
    /* ok on modern phones */
    inset: 0;
    background: url("../img/Asset 3.png") center top / 200% auto no-repeat;
    opacity: 0.85;
    /* very visible on front page */
    filter: none;
    /* sharp at top */
  }

  body.blur-bg::before {
    filter: blur(8px);
    /* lighter blur than desktop */
    opacity: 0.9;
  }

  /* Hero layout on smaller screens */
  .hero {
    min-height: 80vh;
    padding-top: 72px;
    padding-bottom: 24px;
    align-items: center;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 30px;
  }

  /* Team - stack everything vertically */
  .team-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .team-pi {
    grid-template-columns: minmax(0, 1fr);
  }

  /* Contact cards - slightly tighter padding */
  .contact-card {
    padding: 16px 14px;
  }

  /* Social buttons - full width feel, easy to tap */
  .social-buttons {
    align-items: stretch;
  }

  .social-btn {
    justify-content: flex-start;
  }

  /* Mobile navigation menu */
  .site-header {
    backdrop-filter: blur(14px);
  }

  .main-nav {
    position: absolute;
    inset: 56px 16px auto 16px;
    padding: 10px 14px;
    border-radius: var(--radius-lg);
    background: rgba(27, 12, 28, 0.8);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
    display: none;
    flex-direction: column;
    gap: 8px;
  }

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

  .nav-toggle {
    display: inline-flex;
  }
}


/* ----- Phones (max-width: 600px) ----- */

@media (max-width: 600px) {

  .hero {
    padding-top: 68px;
    padding-bottom: 20px;
    min-height: 70vh;
  }

  .hero-text h1 {
    font-size: 26px;
  }

  .section {
    padding: 60px 0;
  }

  /* Slightly smaller social buttons on very small phones */
  .social-buttons {
    gap: 12px;
  }

  .social-btn {
    font-size: 13px;
    padding: 9px 14px;
  }
}