/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #2980b9;
    --primary-light: #3498db;
    --primary-dark: #1c6ea4;
    --accent-blue: #2c3e50;
    --text-dark: #2c3e50;
    --text-light: #546E7A;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    --gradient-light: linear-gradient(135deg, var(--primary-light), var(--primary-blue));
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #f8fafc;
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.98);
    padding: 1rem 5%;
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar.scroll-down {
    transform: translateY(-100%);
}

.navbar.scroll-up {
    transform: translateY(0);
    background-color: rgba(255, 255, 255, 0.98);
}

.logo h1 {
    font-size: 1.8rem;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

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

.logo p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

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

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, 
        var(--primary-blue) 0%,
        rgba(41, 128, 185, 0.8) 30%,
        rgba(41, 128, 185, 0.4) 60%,
        rgba(41, 128, 185, 0) 100%
    );
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 0 1rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at top right,
        rgba(52, 152, 219, 0.2) 0%,
        rgba(41, 128, 185, 0.1) 40%,
        transparent 70%
    );
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content p {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.3s forwards;
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    opacity: 0;
    animation: fadeIn 1s ease 1s forwards;
}

.scroll-indicator span {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.8;
}

.scroll-indicator i {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Sections */
section {
    padding: 5rem 5%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

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

section h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

section:hover h2::after {
    width: 100px;
}

/* Research Grid */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
    padding: 0 1rem;
}

.research-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.research-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue);
    background-color: rgba(41, 128, 185, 0.02);
}

.research-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.research-card h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.research-card h3 a:hover {
    color: var(--primary-blue);
}

.research-card p {
    color: var(--text-light);
    margin-bottom: 2rem;
    transition: color 0.3s ease;
}

.research-card:hover p {
    color: var(--text-dark);
}

.research-link.subtle {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.research-card:hover .research-link.subtle {
    opacity: 0.8;
    color: var(--primary-blue);
    transform: translateX(2px);
}

.research-link {
    display: inline-flex;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--primary-blue);
    border-radius: 4px;
    transition: all 0.3s ease;
    background: transparent;
}

.research-link:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateX(3px);
}

.research-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.research-link:hover i {
    transform: translateX(2px);
}

/* Research Section Header */
.research h2 {
    margin-bottom: 1rem;
}

.research h2::after {
    width: 100px;
}

/* Team Section Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    padding: 1rem;
    perspective: 1000px;
    max-width: 1600px;
    margin: 0 auto;
}

.team-card-wrapper {
    perspective: 1000px;
    min-height: 300px;
    position: relative;
    height: auto;
    margin-bottom: 2rem;
}

.team-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(33, 150, 243, 0.1);
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 300px;
    transform-origin: center;
}

.team-card-wrapper:hover .team-card {
    transform: rotateY(180deg);
}

.team-card-front,
.team-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    overflow: hidden;
    transform-origin: center;
    display: flex;
    background: #fff;
}

.team-card-front {
    flex-direction: row;
    height: 100%;
}

.team-card-back {
    transform: rotateY(180deg);
    padding: 2rem;
    flex-direction: column;
}

.team-card-image {
    width: 300px;
    min-width: 300px;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.team-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.team-card-front-content,
.team-card-back {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-card h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-role {
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.team-bio {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.team-bio-short {
    margin-bottom: 1rem;
}

.team-bio-full {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.team-links {
    display: flex;
    gap: 1rem;
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.team-links a {
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
}

.team-links a:hover {
    background-color: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Publications */
.publications-list {
    max-width: 900px;
    margin: 0 auto;
}

.publication-item {
    background: transparent;
    padding: 2.5rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(41, 128, 185, 0.15);
    transition: all 0.3s ease;
    position: relative;
}

.publication-item:last-child {
    border-bottom: none;
}

.publication-item:hover {
    background-color: rgba(41, 128, 185, 0.02);
}

.publication-item h3 {
    color: var(--text-dark);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.publication-item:hover h3 {
    color: var(--primary-blue);
}

.publication-item h3 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.publication-item:hover h3 a {
    color: var(--primary-blue);
}

.publication-item .authors {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    padding-left: 1rem;
    border-left: 2px solid rgba(41, 128, 185, 0.2);
}

.publication-item .journal {
    color: var(--primary-blue);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 500;
}

.publication-item .description {
    color: var(--text-light);
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.publication-image {
    margin: 1.5rem 0;
    text-align: center;
}

.publication-image.right {
    float: right;
    margin: 0 0 1.5rem 1.5rem;
    max-width: 50%;
}

.publication-figure {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.publication-figure:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.publication-item:hover .description {
    color: var(--text-dark);
}

/* Publications Section Header */
.publications h2 {
    margin-bottom: 3rem;
}

.publications h2::after {
    width: 100px;
}

.publications-list h3 {
    color: var(--primary-blue);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-blue);
}

.publications-list h3:first-child {
    margin-top: 0;
}

/* Contact Section */
.contact-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(33, 150, 243, 0.1);
    transition: transform 0.3s ease;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.contact-info p {
    margin: 0.5rem 0;
    transition: color 0.3s ease;
}

.contact-info:hover p {
    color: var(--primary-blue);
}

/* Footer */
footer {
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.2));
    animation: gradientShift 10s ease infinite;
}

/* Leadership Section */
.leadership {
    padding: 4rem 2rem;
    background-color: #f8f9fa;
}

.leadership h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 1200px) {
    .leadership-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.leadership-card {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    padding: 1.5rem;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.leadership-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.leadership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #e65100, #ff8f00);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leadership-card:hover::before {
    opacity: 1;
}

.leadership-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.leadership-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.leadership-card:hover .leadership-image {
    transform: scale(1.05);
}

.leadership-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.leadership-title-group {
    flex-grow: 1;
    padding-top: 0.5rem;
}

.leadership-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
    transition: color 0.3s ease;
}

.leadership-card:hover .leadership-content h3 {
    color: #e65100;
}

.leadership-role {
    color: #666;
    font-weight: 500;
    margin: 0;
    font-size: 0.95rem;
}

.leadership-description {
    margin: 0 0 1.5rem 0;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

.leadership-links {
    display: flex;
    gap: 1.2rem;
    margin-top: auto;
}

.leadership-links a {
    color: #888;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.leadership-links a:hover {
    color: #e65100;
    transform: translateY(-2px);
}

/* Research detail page styles */
.research-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 2rem 2rem 2rem;
}

.research-detail h1 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 2.5rem;
}

.research-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.research-overview {
    margin-bottom: 4rem;
}

.research-publications {
    margin-bottom: 4rem;
}

.research-impact {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(52, 152, 219, 0.2);
}

.research-impact h2 {
    margin-bottom: 1.5rem;
}

.research-impact > p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-dark);
}

.research-impact ul {
    list-style-type: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

.research-impact li {
    margin-bottom: 0;
    padding: 1.2rem 1.5rem 1.2rem 2.5rem;
    position: relative;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.1);
    line-height: 1.5;
    font-size: 1.05rem;
}

.research-impact li:hover {
    transform: translateX(5px);
    background: #fff;
    border-color: rgba(52, 152, 219, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.research-impact li:before {
    content: "→";
    color: var(--primary-blue);
    position: absolute;
    left: 1rem;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.research-impact li:hover:before {
    transform: translateX(3px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 5%;
    }

    .hamburger {
        display: block;
        order: 1;
        position: relative;
        z-index: 1001;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .logo {
        display: none;
    }

    .ccf-logo {
        order: 2;
        margin: 0 auto;
    }

    .ccf-logo img {
        height: 28px;
        margin: 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 2rem;
        gap: 1.5rem;
        transition: left 0.3s ease;
        backdrop-filter: blur(10px);
        order: 3;
        z-index: 1000;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        width: 100%;
        display: block;
        padding: 0.5rem 0;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

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

    section {
        padding: 3rem 1rem;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0.5rem;
    }

    .team-card-wrapper {
        min-height: auto;
        margin-bottom: 1.5rem;
    }

    .team-card {
        min-height: auto;
        height: auto;
    }

    .team-card-front {
        flex-direction: column;
    }

    .team-card-image {
        width: 100%;
        height: 250px;
        min-width: 100%;
    }

    .team-card-front-content,
    .team-card-back {
        padding: 1.25rem;
        position: relative;
        height: auto;
    }

    .team-card-back {
        position: relative;
        transform: none;
        padding-top: 1.5rem;
    }

    .team-card-wrapper:hover .team-card {
        transform: none;
    }

    .team-links {
        position: relative;
        top: 0;
        right: 0;
        margin-top: 1rem;
        justify-content: flex-start;
    }

    .publication-item {
        padding: 2rem 0;
    }

    .publication-item h3 {
        font-size: 1.2rem;
    }

    .research-grid {
        gap: 1.5rem;
        padding: 0;
    }

    .research-card {
        padding: 2rem;
    }

    .research-card h3 {
        font-size: 1.3rem;
    }

    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .leadership-image {
        height: 250px;
    }
}

.ccf-logo {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

@media (max-width: 900px) {
    .ccf-logo {
        margin-left: 0.5rem;
    }
    .ccf-logo img {
        height: 36px !important;
    }
}

.c4kc-support {
    text-align: center;
    margin: 2rem 0 0 0;
}
.c4kc-support img {
    height: 64px;
    max-width: 90vw;
}
.c4kc-support div {
    font-size: 1.1rem;
    color: #e65100;
    margin-top: 0.5rem;
    font-weight: 600;
} 