:root {
    --primary-color: #1a1a1a;
    --accent-teal: #57e0e0;
    --accent-red: #ff3b3b;
    --accent-gray: #666666;
    --text-main: #333;
    --text-light: #666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #eee;
}

.site-header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Consistent header padding across all pages */

/* Unified header alignment across all layouts */

.site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Logo on the left */
    gap: 12px;
    white-space: nowrap;
    height: 100%;
}

.site-logo {
    width: 35px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

@media (max-width: 768px) {
    .site-logo {
        width: 30px;
    }
}

.site-nav {
    display: flex;
    align-items: center;
}

.site-nav .trigger {
    display: flex;
    gap: 30px;
}

.page-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
}

.page-link:hover {
    color: var(--accent-blue);
}

.nav-trigger,
.menu-icon {
    display: none;
}

/* Hero Section */
.hero {
    padding: 120px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    text-align: center;
    margin-bottom: 60px;
}

.hero-vibrant {
    background: #020617;
    color: white;
    padding: 180px 0;
    position: relative;
    overflow: hidden;
}

.hero-vibrant::before,
.hero-vibrant::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    z-index: 0;
}

.hero-vibrant::before {
    background: radial-gradient(circle, var(--accent-teal) 0%, transparent 70%);
    top: -200px;
    left: -100px;
    animation: drift 15s ease-in-out infinite alternate;
}

.hero-vibrant::after {
    background: radial-gradient(circle, var(--accent-red) 0%, transparent 70%);
    bottom: -200px;
    right: -100px;
    animation: drift 20s ease-in-out infinite alternate-reverse;
}

.site-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle at 50% 50%, rgba(87, 224, 224, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

@keyframes drift {
    from {
        transform: translate(0, 0) scale(1);
    }

    to {
        transform: translate(150px, 80px) scale(1.2);
    }
}

.hero-brain {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    z-index: 1;
    opacity: 0.2;
    pointer-events: none;
}

.brain-node {
    fill: var(--accent-teal);
    animation: pulse-node 4s infinite ease-in-out;
}

.brain-node:nth-child(even) {
    fill: var(--accent-red);
}

.brain-line {
    stroke: var(--white);
    stroke-width: 0.5;
    opacity: 0.3;
    stroke-dasharray: 100;
    animation: flow-line 10s infinite linear;
}

@keyframes pulse-node {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.5);
    }
}

@keyframes flow-line {
    from {
        stroke-dashoffset: 200;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.hero-vibrant .wrapper {
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.5rem;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto;
}

/* Research Themes */
.theme-card {
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.theme-card:hover {
    transform: translateY(-5px);
}

.theme-icon {
    margin-bottom: 20px;
    color: var(--primary-color);
    display: flex;
    justify-content: center;
}

.theme-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Sections */
section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
}

/* Consistent section padding across all pages */

/* Unified footer spacing across all layouts */

h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: -1px;
}

/* Horizontal Gallery */
.horizontal-gallery {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 40px;
    padding: 20px 40px;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

@media (max-width: 768px) {
    .horizontal-gallery {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 30px !important;
        overflow-x: hidden !important;
        display: block !important;
    }
}

.horizontal-gallery::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.project-card-overlay {
    flex: 0 0 400px;
    position: relative;
    height: 600px;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
}

@media (max-width: 768px) {
    .project-card-overlay {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: auto !important;
        min-height: 400px;
        margin-bottom: 20px;
    }
}

@media (max-height: 650px) {
    .project-card-overlay {
        height: 320px;
        flex: 0 0 340px;
        /* Wider to allow more text room */
    }

    .project-overlay-content {
        padding: 15px;
        justify-content: center;
        /* Center to prevent top/bottom clipping */
    }

    .project-card-overlay .project-title {
        font-size: 1.1rem;
        margin-bottom: 4px;
        line-height: 1.2;
    }

    .project-card-overlay p {
        font-size: 0.8rem;
        line-height: 1.2;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        /* Truncate after 3 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .project-tags {
        margin-bottom: 8px;
        gap: 4px;
    }

    .tag {
        padding: 2px 6px;
        font-size: 0.6rem;
    }

    .project-link {
        font-size: 0.8rem;
    }
}

.project-card-overlay .project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.6s;
}

@media (max-width: 768px) {
    .project-card-overlay .project-image {
        opacity: 0.5;
    }
}

.project-card-overlay:hover .project-image {
    transform: scale(1.1);
    opacity: 0.4;
}

.project-overlay-content {
    position: absolute;
    inset: 0;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
    color: white;
    z-index: 2;
}

.project-card-overlay .project-title {
    font-size: 2rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.project-card-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 90%;
}

.project-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid white;
    padding-bottom: 2px;
    transition: opacity 0.3s;
}

.project-link:hover {
    opacity: 0.7;
}

.project-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.tag {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

/* Team */
.team-section h3 {
    margin: 40px 0 20px;
    font-size: 1.8rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.team-card {
    text-align: center;
}

.team-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    background: #f0f0f0;
    border: solid;
    border-color: grey;
    border-width: 2px;
}

.team-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.team-role {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.team-email-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid grey;
}

.team-email-icon:hover {
    background: #dee2e6;
    color: #000;
}

@media (max-width: 768px) {
    .team-head-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
        gap: 20px !important;
        display: flex !important;
    }

    .team-head-image {
        width: 150px !important;
        height: 150px !important;
        margin: 0 auto !important;
    }

    .team-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* Publications */
.pub-year {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--accent-blue);
}

.pub-list {
    list-style: none;
}

.pub-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.pub-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
}

.pub-authors {
    color: var(--text-light);
}

/* Footer */
.site-footer {
    padding: 40px 0;
    background: var(--white);
    margin-top: 5px;
    border-top: 1px solid #eee;
}

.footer-sitemap {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-sitemap a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-sitemap a:hover {
    color: var(--accent-blue);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
}

.footer-socials a {
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    text-decoration: none;
}

.footer-socials a:hover {
    color: var(--accent-teal);
    transform: translateY(-3px);
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-brain {
        width: 400px;
        height: 400px;
    }
}

.responsive-grid {
    display: grid;
    gap: 40px;
}

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

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .responsive-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .site-header .wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .site-nav {
        float: none;
    }

    .site-nav .trigger {
        display: flex;
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-link {
        font-size: 0.85rem;
    }

    .hero-vibrant {
        padding: 100px 0;
    }

    .hero-vibrant h1 {
        font-size: 2.8rem;
    }

    .hero-vibrant p {
        font-size: 1.2rem;
    }

    .hero-brain {
        width: 300px;
        height: 300px;
    }

    .theme-card {
        padding: 10px;
    }

    .footer-sitemap,
    .footer-socials {
        flex-wrap: wrap;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero-vibrant h1 {
        font-size: 2.2rem;
    }

    .project-card-overlay .project-title {
        font-size: 1.5rem;
    }

    .project-card-overlay p {
        font-size: 1rem;
    }

    .project-overlay-content {
        padding: 25px;
    }
}

/* Tribute / Summary Page Styles */
.summary-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 80px;
    text-align: left;
}

.summary-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.summary-header h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    letter-spacing: -1px;
    color: var(--primary-color);
}

.summary-header p.role {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--accent-teal);
    margin-bottom: 20px;
}

.summary-header p.bio {
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .summary-header {
        flex-direction: column;
        text-align: center;
    }
}

.kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin: 40px 0 20px;
}

.kpi-card {
    background: transparent;
    border: none;
    padding: 20px 10px;
    text-align: center;
}

.kpi-number {
    font-size: 3.2rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 10px;
    line-height: 1;
    letter-spacing: -1px;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.highlight-quote {
    text-align: center;
    max-width: 800px;
    margin: 80px auto;
}

.highlight-quote h2 {
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1.3;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    margin-bottom: 15px;
}

.highlight-quote span {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.award-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: transform 0.2s ease;
}

.award-card:hover {
    transform: translateY(-3px);
}

.award-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .two-column-layout {
        grid-template-columns: 1fr;
    }
}

.service-box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.service-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4rem;
    color: var(--primary-color);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.clean-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.clean-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.clean-list li:last-child {
    border-bottom: none;
}

.assoc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.assoc-item svg {
    color: var(--accent-teal);
    flex-shrink: 0;
}

.section-title {
    font-size: 2rem;
    margin-top: 60px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

/* Student grid styles from old code */
.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.student-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #eaeaea;
}

.student-status {
    font-size: 0.75rem;
    background: #e2e8f0;
    color: #475569;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.student-status.current {
    background: #dcfce7;
    color: #166534;
}