/* ============================================================
   Meng Lab — Stylesheet
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --navy:        #2a2a2a;
    --navy-mid:    #3a3a3a;
    --navy-light:  #4a4a4a;
    --teal:        #7d3aa5;
    --teal-light:  #9558c7;
    --amber:       #9558c7;
    --white:       #ffffff;
    --gray-50:     #f8fafc;
    --gray-100:    #f1f5f9;
    --gray-200:    #e2e8f0;
    --gray-300:    #cbd5e1;
    --gray-400:    #94a3b8;
    --gray-500:    #64748b;
    --gray-700:    #334155;
    --gray-800:    #1e293b;
    --gray-900:    #0f172a;

    --font-display: 'Raleway', sans-serif;
    --font-body:    'Inter', sans-serif;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md:  0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 12px 40px rgba(0,0,0,.14);
    --shadow-xl:  0 20px 60px rgba(0,0,0,.18);

    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --radius-xl:  32px;

    --nav-h: 68px;
    --transition: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

a { color: var(--navy-mid); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--teal); }

img { max-width: 100%; display: block; }

ul { list-style: none; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 1000;
    transition: background var(--transition), box-shadow var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(42, 42, 42, 0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,.4);
    backdrop-filter: blur(10px);
}

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

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -.5px;
}
.logo-meng { color: var(--white); }
.logo-lab  { color: var(--teal-light); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    color: rgba(255,255,255,.82);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.nav-link:hover {
    color: var(--white);
    background: rgba(255,255,255,.1);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 40%, #333333 70%, #1e1e1e 100%);
    overflow: hidden;
    text-align: center;
}

/* Decorative background elements */
.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hex {
    position: absolute;
    width: 120px;
    height: 138px;
    background: rgba(125, 58, 165, 0.04);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 1px solid rgba(125, 58, 165, 0.08);
    animation: floatHex 8s ease-in-out infinite;
}

.hex-1 { top: 10%; left: 5%;   width: 100px; height: 115px; animation-delay: 0s; }
.hex-2 { top: 60%; left: 3%;   width: 150px; height: 173px; animation-delay: 1.5s; opacity:.6; }
.hex-3 { top: 15%; right: 8%;  width: 180px; height: 207px; animation-delay: 0.8s; }
.hex-4 { top: 70%; right: 5%;  width: 100px; height: 115px; animation-delay: 2.5s; opacity:.7; }
.hex-5 { top: 40%; left: 45%;  width: 60px;  height: 69px;  animation-delay: 1s;   opacity:.4; }

.circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(149, 88, 199, 0.07);
    animation: floatHex 10s ease-in-out infinite;
}
.circle-1 { width: 400px; height: 400px; top: -100px; right: 15%; animation-delay: 3s; }
.circle-2 { width: 250px; height: 250px; bottom: -50px; left: 20%; animation-delay: 1.5s; }

.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

@keyframes floatHex {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-18px) rotate(3deg); }
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 780px;
    padding: 0 24px;
}

/* Editorial eyebrow — hairline + center diamond above welcome */
.hero-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 18px;
}
.hero-eyebrow-line {
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.22);
}
.hero-eyebrow-mark {
    width: 6px;
    height: 6px;
    background: transparent;
    border: 1px solid var(--teal);
    transform: rotate(45deg);
}

.hero-welcome {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px;
}
.hero-title-accent {
    color: #c9b6d6;
    font-weight: 300;
    font-style: italic;
    letter-spacing: -1px;
}

/* Corner ID mark — top-left */
.hero-mark {
    position: absolute;
    top: calc(var(--nav-h) + 32px);
    left: 48px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    color: rgba(255, 255, 255, 0.55);
    padding-left: 14px;
    border-left: 1px solid var(--teal);
}
.hero-mark-no {
    font-family: var(--font-display);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--white);
    text-transform: uppercase;
}
.hero-mark-label {
    font-size: 0.68rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* Vertical spine wordmark on right edge */
.hero-spine {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%) rotate(90deg);
    transform-origin: right center;
    z-index: 3;
    font-family: var(--font-body);
    font-size: 0.68rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.28);
    white-space: nowrap;
    pointer-events: none;
}

/* Hero background icons — Font Awesome fa-dna (left, tilted) + fa-brain (right) */
.hero-art {
    position: absolute;
    top: 50%;
    pointer-events: none;
    z-index: 1;
    color: rgba(255, 255, 255, 0.09);
    line-height: 1;
}
/* DNA — LEFT side, tilted */
.hero-art-dna {
    left: 6%;
    font-size: clamp(300px, 45vw, 620px);
    transform: translateY(-50%) rotate(-22deg);
    transform-origin: center;
    color: rgba(255, 255, 255, 0.08);
}
/* Brain — RIGHT side, upright */
.hero-art-brain {
    right: 6%;
    font-size: clamp(280px, 42vw, 580px);
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.09);
}
@media (max-width: 900px) {
    .hero-art-brain, .hero-art-dna { display: none; }
}

.hero-tagline {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: rgba(255,255,255,.68);
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 32px;
    line-height: 1.9;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.hero-meta span {
    color: rgba(255,255,255,.6);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 7px;
}
.hero-meta i { color: var(--teal-light); }

.hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-scroll-hint {
    position: absolute;
    bottom: 36px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.35);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
    border-color: var(--teal);
}
.btn-primary:hover {
    background: var(--teal-light);
    border-color: var(--teal-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(125,58,165,.35);
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,.35);
}
.btn-ghost:hover {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.6);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--navy-mid);
    border-color: var(--navy-mid);
}
.btn-outline:hover {
    background: var(--navy-mid);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(58,58,58,.2);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1rem;
}

/* ============================================================
   SHARED SECTION STYLES
   ============================================================ */
.section { padding: 96px 0; }

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

.section-tag {
    display: inline-block;
    background: rgba(125,58,165,.1);
    color: var(--teal);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.15;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray-500);
    max-width: 680px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about-section { background: var(--white); }

.about-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 72px;
    align-items: start;
}

/* Left column */
.about-left { display: flex; flex-direction: column; gap: 24px; }

.photo-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.profile-photo {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    display: block;
    filter: grayscale(5%) contrast(1.02);
    transition: transform 0.6s ease;
}
.photo-frame:hover .profile-photo { transform: scale(1.03); }

.photo-accent {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal), var(--navy-mid));
}

.pi-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
}
.pi-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}
.pi-title { color: var(--teal); font-weight: 600; font-size: 0.875rem; margin-bottom: 4px; }
.pi-dept, .pi-inst { color: var(--gray-500); font-size: 0.825rem; line-height: 1.5; }
.pi-divider { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }

.pi-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.pi-links a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    transition: all var(--transition);
}
.pi-links a:hover {
    background: var(--navy-mid);
    border-color: var(--navy-mid);
    color: var(--white);
    transform: translateY(-2px);
}

/* Right column */
.about-right { padding-top: 8px; }

.about-lead {
    font-size: 1.15rem;
    color: var(--gray-700);
    font-weight: 400;
    margin-bottom: 20px;
    line-height: 1.75;
    border-left: 3px solid var(--teal);
    padding-left: 20px;
}

.about-right p {
    color: var(--gray-600);
    margin-bottom: 16px;
    font-size: 0.975rem;
}

/* Stats strip */
.stats-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--gray-200);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 32px 0;
}

.stat-item {
    background: var(--white);
    padding: 20px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy-mid);
    line-height: 1;
}

.stat-label {
    font-size: 0.72rem;
    color: var(--gray-500);
    line-height: 1.3;
    font-weight: 500;
}

/* Education list */
.edu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.edu-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-100);
}

.edu-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--teal), #9558c7);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.edu-text {
    display: flex;
    flex-direction: column;
}
.edu-text strong { font-size: 0.9rem; color: var(--gray-800); font-weight: 600; }
.edu-text span   { font-size: 0.8rem; color: var(--gray-500); }

/* ============================================================
   RESEARCH
   ============================================================ */
.research-section { background: var(--gray-50); }

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

.research-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 32px 32px;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.research-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.rc-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.rc-icon-blue  { background: rgba(125,58,165,.10); color: #7d3aa5; }
.rc-icon-teal  { background: rgba(149,88,199,.12); color: #9558c7; }
.rc-icon-amber { background: rgba(181,134,224,.14); color: #b586e0; }

.research-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.35;
}

.research-card p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.75;
    flex: 1;
}

.rc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.rc-tags span {
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.rc-paper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--gray-400);
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}
.rc-paper i { color: var(--teal); }

/* ============================================================
   NEWS
   ============================================================ */
.news-section { background: var(--white); }

.news-timeline {
    position: relative;
    max-width: 820px;
    margin: 0 auto;
    padding-left: 32px;
}

.news-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--teal), transparent);
}

.news-item {
    position: relative;
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    padding: 20px 0 24px;
    border-bottom: 1px solid var(--gray-100);
    align-items: baseline;
}
.news-item:last-child { border-bottom: none; }

.news-dot {
    position: absolute;
    left: -38px;
    top: 26px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--teal);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 3px rgba(125,58,165,.2);
}

.news-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.7;
    text-align: right;
    padding-right: 8px;
    white-space: nowrap;
}

.news-body {
    font-size: 0.925rem;
    color: var(--gray-600);
    line-height: 1.7;
}
.news-body strong { color: var(--gray-800); }

.news-link {
    color: var(--teal);
    font-weight: 600;
    font-size: 0.85rem;
    margin-left: 6px;
}
.news-link:hover { color: var(--navy-mid); }

.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 8px;
    vertical-align: middle;
}
.badge-new {
    background: rgba(125,58,165,.12);
    color: var(--teal);
}

/* ============================================================
   PUBLICATIONS
   ============================================================ */
.publications-section { background: var(--gray-50); }

.pub-list { max-width: 960px; margin: 0 auto; }

.pub-year-block {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 24px;
    margin-bottom: 40px;
    align-items: start;
}

.pub-year-label {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-300);
    text-align: right;
    padding-top: 14px;
    line-height: 1;
}

.pub-year-review { font-size: 0.7rem; color: var(--gray-400); letter-spacing: 1px; padding-top: 18px; text-transform: uppercase; }

.pub-year-items { display: flex; flex-direction: column; gap: 14px; }

.pub-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 18px;
    align-items: start;
    transition: box-shadow var(--transition), transform var(--transition);
}
.pub-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.pub-featured {
    border-left: 3px solid var(--teal);
}

/* Journal badges */
.pub-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    color: var(--white);
    align-self: start;
    margin-top: 2px;
}

/* High-impact journals → UAlbany purple */
.badge-pnas,
.badge-science,
.badge-nature,
.badge-natcomm,
.badge-cell    { background: var(--teal); }
/* Other journals → dark gray */
.badge-plos,
.badge-bioprot { background: var(--gray-700); }
.badge-review  { background: var(--gray-400); }

.pub-title {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 5px;
    line-height: 1.5;
}

.pub-authors {
    font-size: 0.825rem;
    color: var(--gray-500);
    margin-bottom: 4px;
    line-height: 1.5;
}
.pub-authors strong { color: var(--gray-700); }

.pub-journal {
    font-size: 0.825rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.co-first-label,
.first-author-label {
    background: rgba(125,58,165,.1);
    color: var(--teal);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

.pub-doi {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--teal);
    margin-top: 6px;
}
.pub-doi:hover { color: var(--navy-mid); }

.pub-footer {
    text-align: center;
    margin-top: 48px;
}

/* ============================================================
   TEAM
   ============================================================ */
.team-section { background: var(--white); }

.team-grid {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.team-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    width: 280px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.team-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.team-photo-wrap {
    overflow: hidden;
    height: 260px;
}
.team-photo {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}
.team-card:hover .team-photo { transform: scale(1.06); }

.team-info {
    padding: 24px 20px;
}
.team-info h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 4px;
}
.team-role  { color: var(--teal); font-weight: 600; font-size: 0.85rem; margin-bottom: 3px; }
.team-dept  { color: var(--gray-600); font-size: 0.8rem; }
.team-univ  { color: var(--gray-500); font-size: 0.8rem; margin-bottom: 12px; }
.team-email {
    font-size: 0.8rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 12px;
}
.team-email a { color: var(--gray-500); }
.team-email a:hover { color: var(--teal); }

.team-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}
.team-links a {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.8rem;
    transition: all var(--transition);
}
.team-links a:hover {
    background: var(--navy-mid);
    border-color: var(--navy-mid);
    color: var(--white);
}

.team-recruiting {
    text-align: center;
    padding: 24px 40px;
    background: linear-gradient(135deg, rgba(125,58,165,.05), rgba(58,58,58,.05));
    border: 1px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    max-width: 560px;
    margin: 0 auto;
    font-size: 1rem;
    color: var(--gray-600);
}
.team-recruiting a {
    color: var(--teal);
    font-weight: 600;
}

/* ============================================================
   JOIN US
   ============================================================ */
.join-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    color: var(--white);
}

.join-section .section-tag {
    background: rgba(149,88,199,.15);
    color: var(--teal-light);
}
.join-section .section-title { color: var(--white); }
.join-section .section-subtitle { color: rgba(255,255,255,.7); }

.join-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 56px;
}

.join-card {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: background var(--transition), transform var(--transition);
}
.join-card:hover {
    background: rgba(255,255,255,.1);
    transform: translateY(-4px);
}

.join-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(125,58,165,.2);
    color: var(--teal-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.join-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.join-card p {
    font-size: 0.875rem;
    color: rgba(255,255,255,.65);
    line-height: 1.75;
}

.join-cta {
    text-align: center;
    padding: 40px 0 0;
    border-top: 1px solid rgba(255,255,255,.1);
}
.join-cta p {
    color: rgba(255,255,255,.7);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--gray-900);
    color: rgba(255,255,255,.7);
    padding: 72px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 56px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 14px;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(255,255,255,.5);
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 10px;
}
.footer-social a {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    font-size: 0.875rem;
    transition: all var(--transition);
}
.footer-social a:hover {
    background: var(--teal);
    color: var(--white);
}

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.footer-col p {
    font-size: 0.85rem;
    line-height: 1.8;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    color: rgba(255,255,255,.55);
}
.footer-col p i { color: var(--teal-light); margin-top: 4px; flex-shrink: 0; }
.footer-col p a { color: rgba(255,255,255,.55); }
.footer-col p a:hover { color: var(--teal-light); }

.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,.55);
    transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal-light); }

.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,.3);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px; height: 44px;
    background: var(--navy-mid);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.875rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    opacity: 0;
    pointer-events: none;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}
.back-to-top:hover {
    background: var(--teal);
    transform: translateY(-3px);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 280px 1fr; gap: 48px; }
    .research-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    :root { --nav-h: 60px; }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(42,42,42,.97);
        flex-direction: column;
        padding: 24px 20px;
        gap: 4px;
        transform: translateY(-120%);
        transition: transform var(--transition);
        backdrop-filter: blur(12px);
    }
    .nav-menu.open { transform: translateY(0); }
    .nav-link { padding: 10px 16px; width: 100%; }
    .nav-toggle { display: flex; }

    .section { padding: 72px 0; }
    .container { padding: 0 20px; }

    .about-grid { grid-template-columns: 1fr; }
    .about-left { flex-direction: row; flex-wrap: wrap; }
    .photo-frame { width: 200px; flex-shrink: 0; }
    .pi-card { flex: 1; min-width: 220px; }

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

    .pub-year-block { grid-template-columns: 60px 1fr; gap: 16px; }
    .pub-item { grid-template-columns: 60px 1fr; gap: 14px; }
    .pub-year-label { font-size: 1.1rem; }

    .news-item { grid-template-columns: 70px 1fr; gap: 12px; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }

    .hero-title { letter-spacing: -1px; }
    .hero-meta { flex-direction: column; gap: 10px; }
    .hero-mark, .hero-spine { display: none; }
}

@media (max-width: 540px) {
    .about-left { flex-direction: column; }
    .photo-frame { width: 100%; }
    .footer-grid { grid-template-columns: 1fr; }
    .stats-strip { grid-template-columns: repeat(2, 1fr); }
    .pub-item { grid-template-columns: 1fr; }
    .pub-badge { display: inline-flex; margin-bottom: 8px; }
    .news-item { grid-template-columns: 1fr; gap: 4px; }
    .news-date { text-align: left; padding-right: 0; }
    .pub-year-block { grid-template-columns: 1fr; }
    .pub-year-label { font-size: 0.9rem; color: var(--teal); padding-top: 0; text-align: left; }
}

/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================
   MULTI-PAGE LAYOUT
   ============================================================ */

/* Always-solid navbar for inner pages */
.navbar-solid,
.navbar-solid.scrolled {
    background: rgba(42, 42, 42, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,.45) !important;
}

/* Page entrance animation */
.main-content {
    animation: pageFadeIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Active nav link (set in HTML per page) */
.nav-link.active {
    color: #9558c7 !important;
    background: rgba(149, 88, 199, 0.12) !important;
}

/* ---- Inner Page Banner ---- */
.page-banner {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 55%, #333333 100%);
    padding: calc(var(--nav-h) + 60px) 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}
.page-banner-inner { position: relative; z-index: 1; }

.page-banner-tag {
    display: inline-block;
    background: rgba(149,88,199,.15);
    color: #9558c7;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 50px;
    margin-bottom: 16px;
}
.page-banner-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    line-height: 1.1;
}
.page-banner-sub {
    color: rgba(255,255,255,.55);
    font-size: 0.975rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Home: Research Highlights ---- */
.home-research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.home-research-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: block;
    color: inherit;
    text-decoration: none;
}
.home-research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--teal);
    color: inherit;
}
.home-research-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 14px 0 10px;
    line-height: 1.35;
}
.home-research-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 16px;
}
.home-research-card .card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal);
}

/* ---- Home: News Preview ---- */
.home-news-list { max-width: 820px; margin: 0 auto; }
.home-news-item {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 20px;
    padding: 18px 0;
    border-bottom: 1px solid var(--gray-100);
    align-items: baseline;
}
.home-news-item:last-child { border-bottom: none; }
.home-news-date {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: right;
    padding-right: 8px;
    white-space: nowrap;
}
.home-news-body {
    font-size: 0.9rem;
    color: var(--gray-600);
    line-height: 1.65;
}
.home-news-body strong { color: var(--gray-800); }
.section-footer { text-align: center; margin-top: 40px; }

/* ---- Research Page: Detailed Cards ---- */
.research-detail-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 48px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition);
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
}
.research-detail-card:hover { box-shadow: var(--shadow-lg); }
.research-detail-card h3 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 16px;
    letter-spacing: -.4px;
    line-height: 1.3;
}
.research-detail-card p {
    color: var(--gray-600);
    font-size: 0.925rem;
    line-height: 1.82;
    margin-bottom: 14px;
}
.research-detail-card p:last-child { margin-bottom: 0; }
.research-detail-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: calc(var(--nav-h) + 20px);
}
.research-detail-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 800;
    color: var(--gray-200);
    line-height: 1;
}
.research-detail-icon {
    width: 64px; height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}
.rdi-blue  { background: rgba(125,58,165,.10); color: #7d3aa5; }
.rdi-teal  { background: rgba(149,88,199,.12); color: #9558c7; }
.rdi-amber { background: rgba(181,134,224,.14); color: #b586e0; }

/* Future directions */
.future-box {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
    border-radius: var(--radius-xl);
    padding: 56px 48px;
    margin-top: 48px;
    color: var(--white);
}
.future-box h2 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}
.future-box > p {
    color: rgba(255,255,255,.65);
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: 720px;
    margin-bottom: 32px;
}
.future-goals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.future-goal {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    padding: 24px;
}
.future-goal h4 {
    color: var(--teal-light);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.future-goal p {
    color: rgba(255,255,255,.6);
    font-size: 0.85rem;
    line-height: 1.65;
}

/* ---- Team Page ---- */
.team-pi-block {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 48px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 56px;
    box-shadow: var(--shadow-sm);
    align-items: start;
}
.team-pi-photo-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.team-pi-photo-wrap img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
}
.team-pi-info h2 {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--gray-900);
    letter-spacing: -.5px;
    margin-bottom: 4px;
}
.team-pi-info .pi-role-tag {
    color: var(--teal);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 3px;
}
.team-pi-info .pi-affil-tag {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 24px;
}
.team-pi-info p {
    color: var(--gray-600);
    font-size: 0.925rem;
    line-height: 1.8;
    margin-bottom: 12px;
}
.team-pi-links {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.mentees-section h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}
.mentees-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 48px;
}
.mentees-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 1px solid var(--gray-200);
}
.mentees-table td {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}
.mentees-table tr:last-child td { border-bottom: none; }
.mentees-table tr:hover td { background: var(--gray-50); }
.mentees-table .note { color: var(--teal); font-size: 0.78rem; font-weight: 600; }

/* ---- Join Page ---- */
.join-page-wrap {
    background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 100%);
    min-height: calc(100vh - var(--nav-h));
    padding: 72px 0 80px;
}
.join-page-wrap .section-title { color: var(--white); }
.join-page-wrap .section-subtitle { color: rgba(255,255,255,.65); }
.join-page-wrap .section-tag {
    background: rgba(149,88,199,.15);
    color: var(--teal-light);
}
.join-cta-box {
    text-align: center;
    padding: 48px 40px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-xl);
    margin-top: 56px;
}
.join-cta-box p {
    color: rgba(255,255,255,.7);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 24px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Figure inside research card ---- */
.rc-card-figure {
    width: 100%;
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 12px;
    overflow: hidden;
}
.rc-card-figure img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* ---- Paper Figures Section ---- */
.paper-figures-section {
    margin-top: 56px;
    padding-top: 56px;
    border-top: 1px solid var(--gray-200);
}
.paper-figures-section .section-header {
    margin-bottom: 40px;
}
.paper-figures-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.paper-figure-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}
.paper-figure-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.paper-figure-img {
    background: var(--gray-50);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
}
.paper-figure-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}
.paper-figure-caption {
    padding: 20px 24px 24px;
    border-top: 1px solid var(--gray-100);
}
.paper-figure-caption p {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.65;
    margin-top: 10px;
}
.paper-figure-caption .fig-journal {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 12px;
}

/* ---- UAlbany logo ---- */
.ualbany-logo-img {
    height: 36px;
    width: auto;
    display: block;
    margin-bottom: 12px;
}
.affil-logo-wrap {
    margin-bottom: 16px;
}
.affil-logo-wrap img {
    height: 44px;
    width: auto;
    opacity: 0.75;
    transition: opacity var(--transition);
}
.affil-logo-wrap img:hover { opacity: 1; }

.pi-card .ualbany-logo-small {
    height: 32px;
    width: auto;
    margin-top: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ---- Responsive additions ---- */
@media (max-width: 1024px) {
    .research-detail-card { grid-template-columns: 1fr; gap: 24px; }
    .research-detail-left { position: static; flex-direction: row; align-items: center; }
    .research-detail-number { font-size: 3rem; }
    .home-research-grid { grid-template-columns: 1fr 1fr; }
    .future-goals { grid-template-columns: 1fr 1fr; }
    .team-pi-block { grid-template-columns: 200px 1fr; gap: 32px; }
}

@media (max-width: 768px) {
    .page-banner { padding: calc(var(--nav-h) + 40px) 0 40px; }
    .home-research-grid { grid-template-columns: 1fr; }
    .home-news-item { grid-template-columns: 70px 1fr; gap: 12px; }
    .future-goals { grid-template-columns: 1fr; }
    .team-pi-block { grid-template-columns: 1fr; }
    .team-pi-photo-wrap { width: 180px; }
    .future-box { padding: 36px 28px; }
    .join-cta-box { padding: 36px 24px; }
}

@media (max-width: 540px) {
    .home-news-item { grid-template-columns: 1fr; gap: 4px; }
    .home-news-date { text-align: left; }
    .research-detail-card { padding: 28px 24px; }
}
