/* CSS Variables & Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Professional deep blue palette */
    --primary-color: #020617;      /* deep navy */
    --secondary-color: #1e40af;    /* restrained professional blue */
    --accent-color: #0ea5e9;       /* subtle teal accent */
    --dark-bg: #020617;            /* almost black */
    --light-bg: #f9fafb;           /* soft light background */
    --text-dark: #0f172a;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --header-offset: 50px;
    --research-disease-pill-bg-opacity: 0.14;
    --research-disease-pill-text-opacity: 0.8;
    --research-cluster-bg-opacity: 0.12;
    --research-cluster-border-opacity: 0.18;
    --research-cluster-text-opacity: 0.86;
}

html {
    scroll-padding-top: var(--header-offset);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;

.footer-content {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    text-align: left;
}

.footer-section h4 {
    margin: 0 0 0.5rem;
    color: var(--accent-color);
    font-size: 0.95rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.person-highlight {
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(180deg, rgba(14, 165, 233, 0.18) 0%, rgba(14, 165, 233, 0.08) 100%);
    padding: 0 0.22em;
    border-radius: 0.28rem;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

.person-highlight:hover,
.person-highlight:focus {
    color: var(--primary-color);
    text-decoration: underline;
}
    position: relative;
    background: transparent;
    padding-top: var(--header-offset);
}

body::before {
    content: '';

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../LAB/AI4BNT.png');
    background-size: 60vw auto;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}

body.news-page::before {
    opacity: 0.18;
}

body.contact-page::before {
    opacity: 0.16;
}

/* ============= HEADER & NAVIGATION ============= */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1001;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

nav {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0.05rem 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.nav-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    font-size: 1.05rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 1px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-line1 {
    font-size: 0.95rem;
    font-weight: 600;
}

.logo-line2 {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border-radius: 4px;
    border: none;
}

.logo span {
    background: linear-gradient(135deg, var(--accent-color), #ff6b6b);
    padding: 0.35rem 0.9rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;

#research .research-theme-image-word-full {
    width: 110px;
    height: 110px;
    padding: 0.2rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.1);
}
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin-left: auto;
    white-space: nowrap;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color 0.3s ease;
    cursor: pointer;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Dropdown menu styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, rgba(2, 6, 23, 0.98) 0%, rgba(30, 64, 175, 0.98) 100%);
    color: white;
    min-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    max-height: 85vh;
    overflow-y: auto;
    padding: 1.5rem;
    margin-top: 10px;
}

.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease-out;
}

/* People dropdown specific styles */
#peopleNavDropdown {
    min-width: 220px;
    padding: 0.5rem 0;
}

#peopleNavDropdown.show {
    display: flex;
    flex-direction: column;
}

.people-nav-section a {
    color: white;
    padding: 0.75rem 1.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.people-nav-section a:hover {
    background: rgba(124, 58, 237, 0.2);
    border-left-color: #7c3aed;
    color: #a8e6cf;
}

.dropdown-content.show {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #7c3aed;
    border-bottom: 2px solid rgba(124, 58, 237, 0.3);
    padding-bottom: 0.75rem;
}

.dropdown-section {
    margin-bottom: 1.5rem;
}

.dropdown-section strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #a8e6cf;
}

.dropdown-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
    color: rgba(255, 255, 255, 0.9);
}

.dropdown-section ul {
    list-style: none;
    padding-left: 1rem;
}

.dropdown-section li {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.dropdown-section a {
    color: #7c3aed;
    text-decoration: none;
    border-bottom: 1px solid #7c3aed;
    transition: all 0.3s ease;
}

.dropdown-section a:hover {
    color: #a8e6cf;
    border-bottom: 1px solid #a8e6cf;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: 0.3s;
}

/* ============= HERO SECTION ============= */
.hero {
    /* Clean, subtle hero background */
    background: rgba(255, 255, 255, 0.88);
    color: var(--text-dark);
    padding: 0 1.5rem 50px;
    text-align: center;
    margin-top: 0;
    position: relative;
    overflow: hidden;
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#brainCanvas {
    opacity: 0.6;
    mix-blend-mode: screen;
}

.slider-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    /* White background for the image slider area */
    background: #ffffff;
    overflow: hidden;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    opacity: 0;
    transition: opacity 1s ease;
}

.slider-slide.active {
    opacity: 1;
}

.slider-slide img {
    display: block;
}

.slider-image {
    width: 100%;
    height: 100%;
    /* Show the entire lab image without cutting, on white */
    object-fit: contain;
    background: #ffffff;
}

.slider-slide-split {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

.slider-slide-fit {
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0;
}

.slider-slide-fit .slider-split-image {
    height: calc(100% - 0.7rem);
    width: 33.3333%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

.slider-slide-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 0;
    overflow: hidden;
    font-size: 0;
    line-height: 0;
}

.slider-slide-pair .slider-split-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
    min-width: 0;
}

.slider-slide-pair .slider-split-image:not(:first-child),
.slider-slide-split .slider-split-image:not(:first-child) {
    margin-left: -1px;
}

.slider-slide-split .slider-split-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
    min-width: 0;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    animation: slideInDown 0.8s ease;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero h2 {
    animation: slideInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.storyline-strip {
    padding: 0.7rem 1.2rem 0.25rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.78);
    border-top: 1px solid rgba(255, 255, 255, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    position: relative;
    z-index: 1;
}

.storyline-strip p {
    margin: 0 auto;
    font-family: 'Times New Roman', Times, serif;
    font-size: clamp(1.5rem, 2.2vw, 2.2rem);
    font-weight: 700;
    font-style: italic;
    color: #000000;
    letter-spacing: 0.03em;
    white-space: nowrap;
    line-height: 1.1;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.18), 0 0 20px rgba(239, 68, 68, 0.08);
}

.story-word {
    display: inline-block;
    transition: color 0.55s ease, text-shadow 0.55s ease, transform 0.55s ease;
    color: #000000;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.22), 0 0 16px rgba(239, 68, 68, 0.12);
}

.story-word.active {
    color: #ef4444;
    font-style: italic;
    text-shadow: 0 0 12px rgba(239, 68, 68, 0.85), 0 0 24px rgba(239, 68, 68, 0.55), 0 0 40px rgba(185, 28, 28, 0.28);
    transform: translateY(-1px);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInUp 0.8s ease;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease 0.3s forwards;
    opacity: 0;
}

/* ============= BUTTONS ============= */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* ============= GENERAL SECTIONS ============= */
section {
    padding: 8px 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.88);
    scroll-margin-top: calc(var(--header-offset) + 8px);
}

.section-title {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
    text-align: center;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 0.6rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

/* ============= HOME TEXT / OBJECTIVE SECTION ============= */
#home-text {
    position: relative;
    z-index: 1;
}

#home-text p {
    text-align: justify;
    color: black;
    line-height: 1.7;
}

#home-text .section-title,
#home-text .content-grid {
    position: relative;
    z-index: 1;
}

#home-text .content-grid {
    border-left: 3px solid var(--secondary-color);
    border-right: 3px solid var(--secondary-color);
}

#home-text .content-grid p,
#home-text .content-grid ul {
    text-align: justify;
    color: black;
    line-height: 1.7;
}

/* ============= ABOUT SECTION ============= */
#about {
    background: rgba(249, 250, 251, 0.88);
    position: relative;
    z-index: 1;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    margin: 0.3rem 0;
    background: rgba(249, 250, 251, 0.92);
    border-left: 3px solid var(--secondary-color);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-dark);
}

#news {
    background: transparent;
    padding-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#news .content-grid {
    width: min(92vw, 1000px);
    max-width: 1000px;
    margin: 1rem auto 2rem;
    justify-items: center;
    text-align: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-left: none;
    padding: 1.5rem 2rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
}

#news .content-grid h3 {
    width: 100%;
}

#news .content-grid ul {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding-left: 0;
    list-style-position: inside;
    text-align: left;
}

.content-grid p,
.content-grid ul {
    font-size: 1rem;
    line-height: 1.6;
}

.content-grid ul {
    list-style: disc;
    margin-left: 1.5rem;
}

.content-grid li {
    margin-bottom: 0.5rem;
}

.about-content h3 {
    color: var(--secondary-color);
    margin: 0rem 0 1rem;
    font-size: 1.3rem;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.8;
    text-align: justify;
}

.stat-box {
    background: rgba(255, 255, 255, 0.92);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    margin: 1rem 0;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* ============= RESEARCH SECTION ============= */
#research {
    background: rgba(255, 255, 255, 0.88);
    max-width: 1400px;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

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

.research-card {
    background: linear-gradient(135deg, var(--light-bg) 0%, white 100%);
    border-radius: 10px;
    padding: 2rem;
    border: 2px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out;
}

#research .research-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(249, 250, 251, 0.98) 100%);
    border: 1px solid rgba(30, 64, 175, 0.12);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    padding: 0.95rem 0.75rem 1rem;
}

#research .research-card:hover {
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

#research .research-card:hover .research-icon,
#research .research-card:hover .research-theme-image {
    transform: none;
    animation: none;
}

#research .research-card:hover {
    transform: none;
}

#research .research-theme-clickable {
    cursor: pointer;
}

#research .research-theme-clickable:focus-visible {
    outline: 3px solid rgba(14, 165, 233, 0.35);
    outline-offset: 4px;
}

#research .research-theme-clickable.is-active {
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
    border-color: rgba(14, 165, 233, 0.28);
}

#research .research-card-cta {
    margin-top: 0.6rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: #1d4ed8;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

#research .research-card-cta:hover {
    color: #1e3a8a;
}

#research .research-card-cta:focus-visible {
    outline: 2px solid rgba(29, 78, 216, 0.35);
    outline-offset: 3px;
}

#research .research-theme-card[data-theme="diseases"] {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(219, 234, 254, 0.92) 100%);
    border-color: rgba(59, 130, 246, 0.22);
}

#research .research-theme-card[data-theme="risk"] {
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.98) 0%, rgba(254, 202, 202, 0.92) 100%);
    border-color: rgba(239, 68, 68, 0.22);
}

#research .research-theme-card[data-theme="personalized"] {
    background: linear-gradient(180deg, rgba(236, 253, 245, 0.98) 0%, rgba(209, 250, 229, 0.92) 100%);
    border-color: rgba(16, 185, 129, 0.22);
}

#research .research-theme-visual {
    width: 100%;
    height: 320px;
    margin-bottom: 0.75rem;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.92));
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#research .research-theme-card[data-theme="diseases"] .research-theme-visual {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.96), rgba(15, 23, 42, 0.98));
}

#research .research-theme-card[data-theme="risk"] .research-theme-visual {
    background: linear-gradient(135deg, rgba(219, 158, 158, 0.96), rgba(15, 23, 42, 0.98));
}

#research .research-theme-card[data-theme="personalized"] .research-theme-visual {
    background: linear-gradient(135deg, rgba(107, 167, 150, 0.96), rgba(15, 23, 42, 0.98));
}

#research .research-theme-clickable {
    cursor: pointer;
}

#research .research-theme-clickable:focus-visible {
    outline: 3px solid rgba(124, 58, 237, 0.55);
    outline-offset: 4px;
}

#research .research-theme-diseases .research-theme-visual {
    height: 320px;
    padding: 0.5rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 64, 175, 0.92));
    align-items: center;
    justify-content: center;
}

#research .research-theme-scope {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0.5rem;
    isolation: isolate;
}

#research .research-scope-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    width: auto;
}

#research .research-scope-center img {
    width: 280px;
    height: 280px;
    object-fit: contain;
    opacity: 0.28;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
    margin-bottom: 0;
}

#research .research-scope-center p {
    display: none;
}

#research .research-theme-word {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 0;
    transform-origin: center;
    transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle)));
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #020617;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 0.36rem;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: normal;
    text-align: center;
    max-width: calc(100% - 1.5rem);
    opacity: 1;
    animation: researchWordOrbit 120s ease-in-out infinite;
    animation-delay: calc(var(--i) * 4.5s);
}

#research .research-theme-word span {
    display: block;
}

#research .research-theme-image-word {
    width: 110px;
    height: 110px;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.1);
}

#research .research-theme-image-word img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: inherit;
}

#research .research-theme-word-institute {
    font-size: 0.36rem;
    padding: 0.28rem 0.62rem;
    line-height: 1.1;
    max-width: 150px;
}

#research .research-theme-image-word-bottom-right {
    --angle: 42deg;
    --radius: 114px;
}

#research .word-angle-1 { --angle: -165deg; --radius: 98px; }
#research .word-angle-2 { --angle: -138deg; --radius: 70px; }
#research .word-angle-3 { --angle: -112deg; --radius: 104px; }
#research .word-angle-4 { --angle: -86deg; --radius: 66px; }
#research .word-angle-5 { --angle: -60deg; --radius: 92px; }
#research .word-angle-6 { --angle: -34deg; --radius: 58px; }
#research .word-angle-7 { --angle: -8deg; --radius: 108px; }
#research .word-angle-8 { --angle: 18deg; --radius: 76px; }
#research .word-angle-9 { --angle: 44deg; --radius: 112px; }
#research .word-angle-10 { --angle: 70deg; --radius: 62px; }
#research .word-angle-11 { --angle: 96deg; --radius: 96px; }
#research .word-angle-12 { --angle: 122deg; --radius: 82px; }
#research .word-angle-13 { --angle: 148deg; --radius: 110px; }
#research .word-angle-14 { --angle: 174deg; --radius: 70px; }
#research .word-angle-15 { --angle: -178deg; --radius: 84px; }
#research .word-angle-16 { --angle: -140deg; --radius: 60px; }
#research .word-angle-17 { --angle: -102deg; --radius: 100px; }
#research .word-angle-18 { --angle: -64deg; --radius: 72px; }
#research .word-angle-19 { --angle: -26deg; --radius: 88px; }
#research .word-angle-20 { --angle: 12deg; --radius: 64px; }
#research .word-angle-21 { --angle: 50deg; --radius: 106px; }
#research .word-angle-22 { --angle: 88deg; --radius: 78px; }
#research .word-angle-23 { --angle: 126deg; --radius: 94px; }
#research .word-angle-24 { --angle: 164deg; --radius: 62px; }
#research .word-angle-25 { --angle: -150deg; --radius: 86px; }
#research .word-angle-26 { --angle: -90deg; --radius: 54px; }
#research .word-angle-27 { --angle: -30deg; --radius: 98px; }
#research .word-angle-28 { --angle: 30deg; --radius: 68px; }

#research .word-size-small {
    font-size: 0.42rem;
}

#research .word-size-medium {
    font-size: 0.48rem;
}

#research .word-size-large {
    font-size: 0.54rem;
}

@keyframes researchWordOrbit {
    0% {
        opacity: 0;
        z-index: 0;
        transform: translate(-50%, -50%) scale(0.45);
    }
    6% {
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%) scale(3.4);
    }
    10% {
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1.18);
    }
    42% {
        opacity: 1;
        z-index: 3;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1.18);
    }
    55% {
        opacity: 0.18;
        z-index: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1);
    }
    100% {
        opacity: 0.15;
        z-index: 0;
        transform: translate(-50%, -50%) rotate(var(--angle)) translate(var(--radius)) rotate(calc(-1 * var(--angle))) scale(1);
    }
}

#research .research-theme-diseases .research-theme-visual::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(0, 0, 0, 0.18) 100%);
}

#research .research-disease-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.9rem;
}

#research .research-disease-band {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
}

#research .research-disease-pill {
    min-height: 2.2rem;
    padding: 0.35rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, var(--research-disease-pill-bg-opacity));
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, var(--research-disease-pill-text-opacity));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.58rem;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

#research .research-disease-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

#research .research-disease-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.35));
}

#research .research-theme-visual::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}

#research .research-theme-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.35rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    transition: transform 0.6s ease, filter 0.6s ease;
    animation: researchImageFloat 5.5s ease-in-out infinite;
}

#research .research-theme-risk .research-theme-image {
    animation: researchOrbitZoom 6s ease-in-out infinite;
    transform-origin: center center;
}

#research .research-theme-brain .research-theme-image {
    filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.65)) drop-shadow(0 0 26px rgba(34, 211, 238, 0.35));
    animation: researchNeonPulse 4.5s ease-in-out infinite;
}

#research .research-theme-personalized .research-theme-image {
    animation: researchLabPulse 5.8s ease-in-out infinite;
}

#research .research-theme-risk .research-theme-visual::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.2) 100%);
}

#research .research-theme-risk-svg {
    height: 260px;
    padding: 0.15rem;
}

#research .research-risk-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#research .risk-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    fill: #e0f2fe;
    letter-spacing: 0.05em;
    animation: riskTextGlow 4.2s ease-in-out infinite;
}

#research .risk-label-small {
    font-size: 17px;
}

#research .risk-label-medium {
    font-size: 20px;
}

#research .risk-center-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 56px;
    font-weight: 900;
    fill: #67e8f9;
    letter-spacing: 0.12em;
    animation: riskCenterPulse 4s ease-in-out infinite;
}

#research .risk-center-subtitle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 600;
    fill: #c4b5fd;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

#research .risk-bubble {
    transform-box: fill-box;
    transform-origin: center;
    animation: riskBubblePop 4.8s ease-in-out infinite;
}

#research .bubble-1 { animation-delay: 0s; }
#research .bubble-2 { animation-delay: 0.35s; }
#research .bubble-3 { animation-delay: 0.7s; }
#research .bubble-4 { animation-delay: 1.05s; }
#research .bubble-5 { animation-delay: 1.4s; }
#research .bubble-6 { animation-delay: 1.75s; }
#research .bubble-7 { animation-delay: 2.1s; }

#research .risk-bubble circle {
    filter: drop-shadow(0 0 14px rgba(34, 211, 238, 0.25));
}

#research .research-theme-risk .research-theme-visual {
    background: radial-gradient(circle at center, rgba(248, 113, 113, 0.12), rgba(15, 23, 42, 0.98) 56%, rgba(2, 6, 23, 1) 100%);
    box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.15), 0 0 30px rgba(248, 113, 113, 0.06);
}

#research .research-theme-brain .research-theme-visual {
    background: radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(15, 23, 42, 0.98) 55%, rgba(2, 6, 23, 1) 100%);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.18), 0 0 30px rgba(34, 211, 238, 0.08);
}

#research .research-theme-wordcloud {
    height: 260px;
    padding: 0.15rem;
}

#research .research-theme-risk-svg,
#research .research-theme-personalized-svg {
    height: 260px;
    padding: 0.15rem;
}

#research .research-wordcloud-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#research .research-risk-svg,
#research .research-personalized-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

#research .brain-word {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 800;
    fill: #c4b5fd;
    letter-spacing: 0.04em;
    filter: drop-shadow(0 0 8px rgba(103, 232, 249, 0.45));
    animation: brainWordPulse 4.5s ease-in-out infinite;
}

#research .brain-word.word-small {
    font-size: 26px;
    opacity: 0.82;
}

#research .brain-word.word-medium {
    font-size: 38px;
    opacity: 0.92;
}

#research .brain-word.word-big {
    font-size: 56px;
    fill: #67e8f9;
    opacity: 1;
}

#research .brain-word:nth-child(odd) {
    animation-delay: 0.6s;
}

#research .brain-word:nth-child(3n) {
    animation-delay: 1.2s;
}

#research .personal-center-chip {
    animation: personalChipPulse 4.2s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
}

#research .personal-chip-text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 34px;
    font-weight: 900;
    fill: #0f172a;
    letter-spacing: 0.1em;
}

#research .personal-icon {
    transform-box: fill-box;
    transform-origin: center;
    animation: personalIconFloat 5.4s ease-in-out infinite;
}

#research .icon-brain { animation-delay: 0s; }
#research .icon-code { animation-delay: 0.35s; }
#research .icon-dna { animation-delay: 0.7s; }
#research .icon-mri { animation-delay: 1.05s; }
#research .icon-heart { animation-delay: 1.4s; }
#research .icon-pulse { animation-delay: 1.75s; }

#research .personal-icon-label {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 800;
    fill: #dbeafe;
    letter-spacing: 0.08em;
}

#research .personal-theme-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 30px;
    font-weight: 900;
    fill: #c4b5fd;
    letter-spacing: 0.16em;
}

#research .personal-theme-subtitle {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    font-weight: 700;
    fill: #a7f3d0;
    letter-spacing: 0.12em;
}

#research .research-theme-brain .research-theme-visual::after {
    background:
        radial-gradient(circle at 50% 50%, rgba(34, 211, 238, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(0, 0, 0, 0.18) 100%);
}

#research .research-theme-personalized .research-theme-visual {
    background: radial-gradient(circle at top, rgba(16, 185, 129, 0.16), rgba(15, 23, 42, 0.98) 52%, rgba(2, 6, 23, 1) 100%);
}

#research .research-theme-personalized .research-theme-visual::before {
    content: '';
    position: absolute;
    inset: 14px;
    border-radius: 12px;
    border: 1px solid rgba(16, 185, 129, 0.28);
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.18), inset 0 0 22px rgba(16, 185, 129, 0.08);
    animation: researchFramePulse 4.2s ease-in-out infinite;
    pointer-events: none;
}

#research .research-card:hover .research-theme-image {
    transform: scale(1.03);
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.24));
}

#research .research-card h3 {
    margin-top: 0.35rem;
    font-size: 1.25rem;
}

#research .research-theme-card > h3 {
    color: #12389e;
    font-weight: 800;
    display: block;
    padding: 0.55rem 0.8rem 0.6rem;
    margin: 0.35rem auto 0;
    max-width: 96%;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.24);
    border-left: 4px solid #2563eb;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.94));
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.1);
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    line-height: 1.25;
    letter-spacing: 0;
    transition: color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

#research .research-theme-card[data-theme="diseases"] > h3 {
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.24);
    border-left-color: #2563eb;
    background: linear-gradient(135deg, rgba(239, 246, 255, 1), rgba(219, 234, 254, 0.96));
}

#research .research-theme-card[data-theme="risk"] > h3 {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.22);
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(254, 226, 226, 0.96));
}

#research .research-theme-card[data-theme="personalized"] > h3 {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.22);
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(236, 253, 245, 1), rgba(209, 250, 229, 0.96));
}

#research .research-theme-card > h3::after {
    content: none;
}

#research .research-theme-card:hover > h3,
#research .research-theme-card:focus-within > h3 {
    color: #0d2f86;
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.38);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(224, 242, 254, 0.96));
    box-shadow: 0 14px 28px rgba(30, 64, 175, 0.16);
}

#research .research-theme-card[data-theme="risk"]:hover > h3,
#research .research-theme-card[data-theme="risk"]:focus-within > h3 {
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.38);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(254, 226, 226, 0.96));
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.16);
}

#research .research-theme-card[data-theme="personalized"]:hover > h3,
#research .research-theme-card[data-theme="personalized"]:focus-within > h3 {
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.38);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(209, 250, 229, 0.96));
    box-shadow: 0 14px 28px rgba(16, 185, 129, 0.16);
}

#research .research-card p {
    color: #334155;
}

#research .research-theme-detail {
    margin-top: 0.35rem;
    display: block;
    position: relative;
    z-index: 1;
}

#research .research-theme-detail.is-visible {
    animation: researchThemePop 180ms ease-out;
}

#research .research-theme-detail-main {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(30, 64, 175, 0.12);
    border-radius: 18px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    padding: 1rem 1.05rem;
}

#research .research-theme-detail-kicker {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 800;
    color: #1d4ed8;
    margin-bottom: 0.5rem;
}

#research .research-theme-detail-main h3 {
    color: #12389e;
    display: inline-block;
    margin: 0.2rem 0 0.9rem;
    padding: 0.6rem 0.95rem 0.68rem;
    max-width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-left: 4px solid #2563eb;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(239, 246, 255, 0.94));
    box-shadow: 0 10px 22px rgba(30, 64, 175, 0.1);
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.25;
}

#research .research-theme-detail[data-theme="diseases"] .research-theme-detail-main h3 {
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.22);
    border-left-color: #2563eb;
    background: linear-gradient(135deg, rgba(239, 246, 255, 1), rgba(219, 234, 254, 0.96));
}

#research .research-theme-detail[data-theme="risk"] .research-theme-detail-main h3 {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.22);
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(254, 226, 226, 0.96));
}

#research .research-theme-detail[data-theme="personalized"] .research-theme-detail-main h3 {
    color: #047857;
    border-color: rgba(16, 185, 129, 0.22);
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(236, 253, 245, 1), rgba(209, 250, 229, 0.96));
}

#research .research-theme-detail-main p {
    color: #334155;
    margin-bottom: 0.75rem;
}

#research .research-theme-detail-main h4 {
    margin-top: 1rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    color: #0f172a;
}

#research .research-theme-detail-main ol {
    list-style: decimal;
    padding-left: 1.3rem;
    display: grid;
    gap: 0.65rem;
}

#research .research-theme-detail-main li {
    color: #0f172a;
}

#research .research-theme-detail-main p {
    color: #334155;
    margin-bottom: 0.75rem;
}

#research .research-theme-detail-main a {
    color: #1d4ed8;
    text-decoration: none;
    font-weight: 600;
}

#research .research-theme-detail-main a:hover {
    text-decoration: underline;
}

#research .research-theme-detail:not(.is-visible) {
    display: none;
}

@keyframes researchImageFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.01);
    }
}

@keyframes researchOrbitZoom {
    0%, 100% {
        transform: rotate(-1deg) scale(1);
    }
    25% {
        transform: rotate(0deg) scale(1.06);
    }
    50% {
        transform: rotate(1deg) scale(1.1);
    }
    75% {
        transform: rotate(0deg) scale(1.06);
    }
}

@keyframes researchThemePop {
    from {
        opacity: 0;
        transform: translateY(4px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes researchNeonPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 14px rgba(56, 189, 248, 0.65)) drop-shadow(0 0 26px rgba(34, 211, 238, 0.35));
    }
    50% {
        transform: scale(1.04);
        filter: drop-shadow(0 0 20px rgba(56, 189, 248, 0.9)) drop-shadow(0 0 36px rgba(34, 211, 238, 0.55));
    }
}

@keyframes researchLabPulse {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.06) translateY(-4px);
    }
}

@keyframes researchFramePulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.01);
    }
}

@keyframes personalChipPulse {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 16px rgba(103, 232, 249, 0.35));
    }
    50% {
        transform: scale(1.06);
        filter: drop-shadow(0 0 24px rgba(103, 232, 249, 0.55));
    }
}

@keyframes personalIconFloat {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.03);
    }
}

@keyframes riskBubblePop {
    0%, 100% {
        transform: scale(1) translateY(0);
    }
    25% {
        transform: scale(1.06) translateY(-2px);
    }
    50% {
        transform: scale(1.12) translateY(-4px);
    }
    75% {
        transform: scale(1.04) translateY(-1px);
    }
}

@keyframes riskTextGlow {
    0%, 100% {
        opacity: 0.88;
        filter: drop-shadow(0 0 6px rgba(34, 211, 238, 0.25));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 12px rgba(34, 211, 238, 0.45));
    }
}

@keyframes riskCenterPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes brainWordPulse {
    0%, 100% {
        transform: translateY(0px) scale(1);
    }
    50% {
        transform: translateY(-3px) scale(1.03);
    }
}

.research-card:nth-child(1) {
    animation-delay: 0.1s;
}

.research-card:nth-child(2) {
    animation-delay: 0.2s;
}

.research-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.research-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.research-card:hover::before {
    transform: scaleX(1);
}

.research-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.research-card:hover .research-icon {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.3s ease;
}

.research-icon {
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    display: flex; /* Changed from inline-block to flex */
    justify-content: center; /* Center image horizontally */
    align-items: center; /* Center image vertically */
    animation: iconFloat 3s ease-in-out infinite;
    width: 200px; /* Fixed width for the image container */
    height: 150px; /* Fixed height for the image container */
    overflow: hidden; /* Ensure image stays within bounds */
    margin-left: auto; /* Center the icon itself within the card */
    margin-right: auto; /* Center the icon itself within the card */
}

.research-theme-image {
    width: 100%;
    height: 100%; /* Fill the container height */
    max-width: none; /* Allow the parent container to control max width */
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.research-card:nth-child(1) .research-theme-image {
    animation: brainImagePulse 3s ease-in-out infinite;
}

.research-card:nth-child(2) .research-theme-image {
    animation-delay: 1s;
    animation: brainImageScan 4s ease-in-out infinite;
}

.research-card:nth-child(3) .research-theme-image {
    animation-delay: 2s;
    animation: medicineImageGlow 2.5s ease-in-out infinite;
}

.research-card:hover .research-theme-image {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1);
}

/* ============= SOFTWARE CARDS ============= */
#software .research-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(30, 64, 175, 0.55));
    background-size: 220% 220%;
    animation: softwareCardShift 12s ease-in-out infinite;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px) saturate(120%);
}

#software .research-card::before {
    content: '';
    position: absolute;
    inset: -30%;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.20), transparent 22%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.12), transparent 18%),
        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.10), transparent 20%);
    filter: blur(18px);
    opacity: 0.9;
    animation: softwareGlowFloat 14s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

#software .research-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.10), transparent 40%),
                radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.06), transparent 35%),
                linear-gradient(120deg, rgba(255, 255, 255, 0.04), transparent 45%, rgba(255, 255, 255, 0.05));
    pointer-events: none;
    z-index: 0;
}

#software .research-card > * {
    position: relative;
    z-index: 1;
}

#software .research-card h3,
#software .research-card p,
#software .research-card strong,
#software .research-card em {
    color: #ffffff;
}

#software .research-card a {
    color: #ffffff !important;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.55);
}

#software .software-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 1rem;
    margin-top: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.45);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

#software .software-link:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

#software .research-card:hover {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
}

#software .research-card:nth-child(1) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(29, 78, 216, 0.56) 50%, rgba(6, 182, 212, 0.42) 100%);
}

#software .research-card:nth-child(2) {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.72) 0%, rgba(124, 58, 237, 0.55) 55%, rgba(192, 38, 211, 0.4) 100%);
}

#software .research-card:nth-child(3) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(14, 165, 233, 0.56) 50%, rgba(34, 197, 94, 0.4) 100%);
}

#software .research-card:nth-child(4) {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.72) 0%, rgba(249, 115, 22, 0.54) 50%, rgba(239, 68, 68, 0.4) 100%);
}

#software .research-card:nth-child(5) {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.72) 0%, rgba(20, 184, 166, 0.54) 50%, rgba(59, 130, 246, 0.4) 100%);
}

@keyframes softwareCardShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes softwareGlowFloat {
    0% {
        transform: translate3d(-2%, -2%, 0) scale(1);
    }
    50% {
        transform: translate3d(3%, 2%, 0) scale(1.08);
    }
    100% {
        transform: translate3d(-2%, -2%, 0) scale(1);
    }
}

#software .research-card:nth-child(1) h3,
#software .research-card:nth-child(1) p,
#software .research-card:nth-child(2) h3,
#software .research-card:nth-child(2) p,
#software .research-card:nth-child(3) h3,
#software .research-card:nth-child(3) p,
#software .research-card:nth-child(4) h3,
#software .research-card:nth-child(4) p,
#software .research-card:nth-child(5) h3,
#software .research-card:nth-child(5) p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* Brain Image Animation */
@keyframes brainImagePulse {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1) contrast(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    25% { 
        transform: scale(1.05); 
        filter: brightness(1.1) contrast(1.1);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    }
    50% { 
        transform: scale(1.02); 
        filter: brightness(1.05) contrast(1.05);
        box-shadow: 0 5px 18px rgba(59, 130, 246, 0.2);
    }
    75% { 
        transform: scale(1.08); 
        filter: brightness(1.15) contrast(1.15);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    }
}

/* Brain Scan Animation */
@keyframes brainImageScan {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1) hue-rotate(0deg);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    25% { 
        transform: scale(1.03); 
        filter: brightness(1.2) hue-rotate(10deg);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }
    50% { 
        transform: scale(1.06); 
        filter: brightness(1.1) hue-rotate(-10deg);
        box-shadow: 0 7px 22px rgba(16, 185, 129, 0.4);
    }
    75% { 
        transform: scale(1.04); 
        filter: brightness(1.15) hue-rotate(5deg);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    }
}

/* Medicine Glow Animation */
@keyframes medicineImageGlow {
    0%, 100% { 
        transform: scale(1); 
        filter: brightness(1) saturate(1);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
    20% { 
        transform: scale(1.05); 
        filter: brightness(1.3) saturate(1.3);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
    }
    40% { 
        transform: scale(1.08); 
        filter: brightness(1.5) saturate(1.5);
        box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
    }
    60% { 
        transform: scale(1.06); 
        filter: brightness(1.4) saturate(1.4);
        box-shadow: 0 7px 22px rgba(245, 158, 11, 0.4);
    }
    80% { 
        transform: scale(1.04); 
        filter: brightness(1.2) saturate(1.2);
        box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    }
}

/* Sections are controlled by JS */

.research-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.research-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.toggle-content {
    display: none;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.research-card.active .toggle-content {
    display: block;
    animation: slideDown 0.3s ease;
}

/* ============= PEOPLE / TEAM SECTION ============= */
#people {
    background: white;
}

.team-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    margin-top: -0.5rem;
}

.team-grid::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color), transparent);
    transform: translateX(-50%);
}

.team-member {
    display: block;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    transition: all 0.3s ease;
    text-align: left;
    padding: 1.75rem 2rem;
    position: relative;
}

.team-member:nth-child(odd) {
    margin-left: 0;
}

.team-member:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.team-member:nth-child(even) > * {
    direction: ltr;
}

.team-member:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.pi-member {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    min-height: auto;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    margin: 1rem 0;
}

.pi-member .member-info {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.pi-sidebar {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.pi-slider-wrapper {
    height: 350px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 3px solid rgba(255,255,255,0.8);
    background: #fff;
    margin-top: 0.75rem;
}

.pi-interests {
    background: rgba(255,255,255,0.9);
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.pi-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.pi-slider img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.pi-slider img.active {
    opacity: 1;
}

.member-name {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.member-role {
    display: none;
}

.member-bio {
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 0.2rem;
    text-align: justify;
}

.team-section-header {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-top: 0rem;
    margin-bottom: 0;
    grid-column: 1 / -1;
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.4rem;
}

/* Counteract the gap from the .team-grid specifically after section headers */
.team-section-header + .team-member {
    margin-top: -1rem;
}

/* Counteract the gap before section headers to bring them closer to previous members */
.team-member + .team-section-header {
    margin-top: -0.5rem;
}

/* ============= PROJECTS SECTION ============= */
#projects {
    background: white;
}

.projects-container {
    display: grid;
    gap: 2rem;
}

.project-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.project-item:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.project-item:nth-child(even) {
    grid-template-columns: 1fr 1fr;
    direction: rtl;
}

.project-item:nth-child(even) > * {
    direction: ltr;
}

.project-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.project-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============= PUBLICATIONS SECTION ============= */
#publications {
    background: var(--light-bg);
}

.pub-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.pub-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.8rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    display: flex;
    gap: 0.8rem;
    margin-bottom: 0.3rem;
}

.pub-item.is-clickable {
    cursor: pointer;
}

.pub-item a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: var(--light-bg);
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.pub-item a:hover {
    background: rgba(30, 64, 175, 0.08);
}

.pub-item:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.pub-number {
    font-weight: bold;
    color: var(--secondary-color);
    min-width: 2.5rem;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.pub-content {
    flex: 1;
}

.pub-authors {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
}

.pub-title {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.pub-journal {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
    margin-bottom: 0.2rem;
}

.pub-journal a {
    color: var(--secondary-color);
    text-decoration: underline;
    font-style: italic;
}

.pub-journal a:hover {
    color: var(--accent-color);
}

/* ============= CONTACT & SUBMISSIONS SECTION ============= */
#contact {
    background: transparent;
    color: var(--text-dark);
    padding: 40px 2rem !important;
}

#contact .section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

#contact .section-title::after {
    background: var(--accent-color);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: minmax(460px, 540px) minmax(0, 1fr);
    gap: 2rem;
    max-width: 1120px;
    margin: 0 auto;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
}

#contact .contact-wrapper {
    justify-items: center;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.contact-item {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    align-items: flex-start;
}

.contact-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.contact-text h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.contact-text p {
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 0;
}

.contact-text strong {
    font-weight: 700;
}

#contact .contact-text a {
    color: white;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

#contact .contact-wrapper form {
    width: 100%;
}

#contact .contact-text a:hover {
    color: var(--accent-color);
}

body.contact-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.contact-page #contact {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.contact-page footer {
    margin-top: auto;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Submissions Display */
#submissions {
    background: var(--light-bg);
}

.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.submission-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-color);
    transition: all 0.3s ease;
    position: relative;
}

.submission-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.submission-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--light-bg);
    padding-bottom: 1rem;
}

.submission-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.submission-topic {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.submission-email {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.submission-email a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.submission-email a:hover {
    text-decoration: underline;
}

.submission-github {
    margin-bottom: 1rem;
}

.submission-github a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: var(--light-bg);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.submission-github a:hover {
    background: var(--primary-color);
    color: white;
}

.submission-message {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.submission-time {
    font-size: 0.8rem;
    color: #999;
    text-align: right;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.submission-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.delete-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

/* ============= FOOTER ============= */
footer {
    background: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 0.45rem 1rem 0.22rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.footer-content {
    width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 0.55rem;
    text-align: left;
}

.footer-section h4 {
    margin: 0 0 0.18rem;
    color: var(--accent-color);
    font-size: 12px;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.14rem 0.9rem;
    justify-content: end;
}

.footer-links-section {
    justify-self: end;
    width: max-content;
    max-width: 100%;
    margin-left: auto;
    padding-right: 0.5rem;
}

.footer-title,
.footer-contact h4 {
    margin: 0 0 0.18rem;
    color: var(--accent-color);
    font-size: 12px;
}

.footer-title {
    font-weight: 700;
}

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.footer-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.footer-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 0.04rem;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    font-size: 12px;
    margin-bottom: 0.02rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

.footer-contact p {
    margin: 0 0 0.04rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    line-height: 1.15;
}

.footer-contact strong {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.2rem;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .footer-links-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-brand {
        align-items: center;
    }
}

/* ============= SCROLL TO TOP BUTTON ============= */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.scroll-to-top.show {
    display: flex;
}
