/* Variables & Reset */
:root {
    --primary-color: #2563eb;
    /* Modern Blue */
    --secondary-color: #1e293b;
    /* Slate Dark */
    --accent-color: #3b82f6;
    --text-color: #334155;
    --light-text: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    --white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--white);
}

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

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 10px auto 0;
}

.section-desc {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 50px;
    color: var(--light-text);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 2px solid var(--primary-color);
}

.btn.primary:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn.secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn.secondary:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

.btn.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    /* Adjust based on logo aspect ratio */
    width: auto;
    display: block;
}

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

.nav-link {
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding-top: 150px;
    padding-bottom: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.highlight {
    color: var(--primary-color);
}

.subtitle {
    display: block;
    font-weight: 600;
    color: var(--light-text);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--light-text);
    margin-bottom: 30px;
    max-width: 500px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.hero-image-container {
    display: flex;
    justify-content: center;
}

.hero-image-placeholder {
    width: 400px;
    height: 400px;
    background-color: #cbd5e1;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }

    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

.hero-main-image {
    max-width: 100%;
    height: auto;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
}

/* About Section */
.about-lead {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.2rem;
}

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

.lead {
    font-size: 1.2rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.education-timeline {
    margin-top: 40px;
}

.timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    margin-bottom: 20px;
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.year {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 600;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: flex-start;
}

.profile-image-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 0px;
    /* Increased from 20px */
}

.profile-img {
    width: 250px;
    height: 300px;
    border-radius: 50%;
    /* Circular */
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-md);
}

.stat-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

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

.stat-card .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .label {
    color: var(--light-text);
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.research-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.research-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    height: 200px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card-content p {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.text-link {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.text-link:hover {
    gap: 10px;
}

/* Teaching Section */
.teaching-content {
    max-width: 800px;
    margin: 0 auto;
}

.course-card {
    background: var(--bg-light);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
}

.course-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.semester {
    background: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Contact Section */
.contact-wrapper {
    background: rgba(255, 255, 255, 0.05);
    padding: 50px;
    border-radius: 20px;
    max-width: 700px;
    margin: 0 auto;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.info-item h4 {
    color: var(--white);
    margin-bottom: 5px;
}

.info-item p {
    color: #94a3b8;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--white);
    font-family: var(--font-main);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background: #020617;
    color: #94a3b8;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: #94a3b8;
    font-size: 1.2rem;
}

.social-links a:hover {
    color: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        box-shadow: var(--shadow-md);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: var(--transition);
    }

    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    .hamburger {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-text p {
        margin: 0 auto 30px;
    }

    .cta-buttons {
        justify-content: center;
    }

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

    .member-categories {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .grants-preview {
        grid-template-columns: 1fr;
    }

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

/* Sub-Page Styles */
.page-hero {
    padding-top: 150px;
    padding-bottom: 60px;
    background: var(--white);
    color: var(--text-color);
    text-align: center;
}

.page-hero h1 {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-hero p {
    color: var(--light-text);
    font-size: 1.2rem;
}

.research-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 80px;
    align-items: center;
}

.intro-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.intro-text p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.img-placeholder.large {
    height: 300px;
    width: 100%;
    background-color: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--light-text);
    border-radius: 10px;
}

.paper-list {
    max-width: 900px;
    margin: 0 auto;
}

.paper-item {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.paper-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.authors {
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.abstract {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-weight: 500;
}

@media (max-width: 768px) {
    .research-intro {
        grid-template-columns: 1fr;
    }

    .paper-item {
        flex-direction: column;
    }

    .paper-action {
        margin-top: 15px;
    }
}

/* Members Page Styles */
.member-categories {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 40px;
}

.member-category {
    margin-bottom: 0;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.category-title {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    display: block;
    width: 100%;
    text-align: center;
}

.member-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.3s ease;
}

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

.member-photo-placeholder {
    height: 180px;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: #cbd5e1;
}

.member-photo-container {
    height: 180px;
    width: 100%;
    overflow: hidden;
}

.member-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.member-card.recruiting {
    border: 2px dashed var(--border-color);
    background: var(--bg-light);
}

.member-card.recruiting:hover {
    border-color: var(--primary-color);
    background: var(--white);
}

.member-card.recruiting .member-photo-placeholder {
    background-color: transparent;
    color: var(--primary-color);
    opacity: 0.6;
}

.member-info {
    padding: 20px;
}

.member-info h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--text-color);
}

.member-info .role {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
    font-weight: 500;
}

.member-info .email {
    color: var(--light-text);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.member-info .name-en {
    display: block;
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--light-text);
    margin-top: 2px;
}

.member-info .research {
    color: var(--text-color);
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.member-info .github-link {
    margin-top: 8px;
    font-size: 0.85rem;
}

.member-info .github-link a {
    color: var(--light-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.member-info .github-link a:hover {
    color: var(--primary-color);
}

/* Placeholder card (Alumni "Coming Soon") */
.member-card.placeholder-card {
    border: 2px dashed var(--border-color);
    background: var(--bg-light);
    opacity: 0.85;
}

.member-card.placeholder-card .member-photo-placeholder {
    background-color: transparent;
    color: var(--light-text);
    opacity: 0.6;
}

.member-card.placeholder-card .member-info h3 {
    color: var(--light-text);
}

/* Category description (e.g. Collaborators intro) */
.category-desc {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-top: -10px;
    margin-bottom: 20px;
    line-height: 1.55;
}

/* Collaborators grid */
.collaborator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 20px;
}

.collaborator-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    padding: 20px 22px;
    transition: var(--transition);
}

.collaborator-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-left-color: var(--accent-color);
}

.collaborator-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.collaborator-card h4 a {
    color: var(--secondary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.collaborator-card h4 a:hover {
    color: var(--primary-color);
}

.collaborator-card h4 a i {
    font-size: 0.75rem;
    color: var(--light-text);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.collaborator-card h4 a:hover i {
    opacity: 1;
    color: var(--primary-color);
}

.collaborator-affiliation {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.collaborator-institution {
    color: var(--light-text);
    font-size: 0.88rem;
    font-style: italic;
}

/* ===== News Page ===== */
.news-container {
    max-width: 900px;
}

.news-preview {
    max-width: 900px;
    margin: 0 auto;
}

/* ===== Resources Marquee (Homepage) ===== */
.resources-marquee {
    overflow: hidden;
    position: relative;
    margin-top: 30px;
    padding: 10px 0;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

.resources-marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    width: 340px;
    height: 220px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    display: block;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.marquee-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-md);
}

.marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 12px)); }
}

/* ===== Join CTA inside Contact section ===== */
.join-cta-banner {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(59, 130, 246, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px 40px;
    margin-bottom: 40px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: center;
    backdrop-filter: blur(6px);
}

.join-cta-text h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.join-cta-text p {
    color: #cbd5e1;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.join-cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.join-cta-actions .btn i {
    margin-right: 6px;
}

.btn.secondary.on-dark {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn.secondary.on-dark:hover {
    background-color: var(--white);
    color: var(--secondary-color);
    border-color: var(--white);
}

@media (max-width: 768px) {
    .marquee-item {
        width: 260px;
        height: 170px;
    }

    .join-cta-banner {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 28px 24px;
    }

    .join-cta-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.news-year {
    margin-bottom: 60px;
}

.news-year:last-child {
    margin-bottom: 0;
}

.news-year-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

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

.news-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px dashed var(--border-color);
    line-height: 1.65;
    color: var(--text-color);
}

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

.news-date {
    flex-shrink: 0;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 100px;
    padding-top: 2px;
}

.news-text {
    flex: 1;
    font-size: 0.98rem;
}

.news-text strong {
    color: var(--secondary-color);
}

.news-link {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    margin-left: 4px;
    white-space: nowrap;
}

.news-link:hover {
    text-decoration: underline;
}

/* ===== Resources Page ===== */
.resource-section {
    max-width: 1000px;
    margin: 0 auto 60px;
}

.resource-section:last-child {
    margin-bottom: 0;
}

.resource-section-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.resource-section-title i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 1.5rem;
}

.resource-section-desc {
    color: var(--light-text);
    font-size: 1rem;
    margin-bottom: 24px;
}

.resource-empty {
    background: var(--bg-light);
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 30px;
    text-align: center;
    color: var(--light-text);
}

.resource-empty i {
    font-size: 3rem;
    color: var(--border-color);
    margin-bottom: 16px;
    display: block;
}

.resource-empty p {
    font-size: 1rem;
    font-style: italic;
}

/* Photo gallery (Resources page) */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.photo-card {
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 0;
    transition: var(--transition);
}

.photo-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.photo-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

.photo-card figcaption {
    padding: 18px 20px;
}

.photo-card figcaption h4 {
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin-bottom: 4px;
}

.photo-date {
    color: var(--light-text);
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        gap: 4px;
    }

    .news-date {
        min-width: auto;
    }

    .resource-empty {
        padding: 40px 20px;
    }
}

/* ----------------------------------- */
/* Members Album Grid CSS              */
/* ----------------------------------- */

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.album-frame {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    padding: 40px 20px;
    align-items: center;
}

.album-frame:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.album-collage {
    position: relative;
    width: 140px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 25px;
}

.collage-item {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-light);
    color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-sm);
    position: absolute;
    transition: transform 0.3s ease;
}

.album-frame:hover .collage-item {
    transform: scale(1.1);
}

.collage-item:not(.overlap):not(.overlap-2) {
    transform: translateX(-25px) translateY(10px);
    z-index: 1;
}

.collage-item.overlap {
    transform: translateX(25px) translateY(10px);
    z-index: 2;
    background-color: var(--primary-color);
    color: var(--white);
}

.collage-item.overlap-2 {
    transform: translateY(-20px);
    z-index: 3;
    background-color: var(--secondary-color);
    color: var(--white);
    width: 70px;
    height: 70px;
    font-size: 28px;
}

.album-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0 10%;
}

.album-title h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.icon-arrow {
    color: var(--primary-color);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.album-frame:hover .icon-arrow {
    transform: translateX(5px);
}

/* Recruitment Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    border-top: 5px solid var(--primary-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--light-text);
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 15px 0 5px;
}

.modal-body p, .modal-body ul {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
    margin-top: 0;
}

.modal-body ul {
    padding-left: 20px;
}

.modal-footer {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-footer .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

.modal-dismiss {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 0.85rem;
    color: var(--light-text);
    cursor: pointer;
}

.modal-dismiss input {
    margin-right: 5px;
}

/* ===== Grants & Projects Page ===== */
.grant-section {
    max-width: 1000px;
    margin: 0 auto 80px;
}

.grant-section-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.grant-section-completed .grant-section-title {
    border-bottom-color: var(--light-text);
    color: var(--light-text);
}

.grant-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.grant-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Cards with actual image use vertical layout (banner on top) */
.grant-card-has-image {
    display: block;
}

.grant-card-has-image .grant-image {
    width: 100%;
    min-height: auto;
    background: var(--bg-light);
    padding: 0;
}

.grant-card-has-image .grant-image img {
    width: 100%;
    height: auto;
    display: block;
}

.grant-image {
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.grant-image-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.grant-abbr {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.grant-image-meta {
    font-size: 0.85rem;
    opacity: 0.85;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Per-project gradient placeholders */
.grant-bg-startup {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.grant-bg-kmdf {
    background: linear-gradient(135deg, #db2777 0%, #7c2d92 100%);
}

.grant-bg-innocore {
    background: linear-gradient(135deg, #0d9488 0%, #115e59 100%);
}

.grant-content {
    padding: 28px 30px 28px 0;
}

.grant-card-has-image .grant-content {
    padding: 24px 30px 28px;
}

.grant-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.role-badge,
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.role-pi {
    background: var(--primary-color);
    color: var(--white);
}

.role-copi {
    background: #3b82f6;
    color: var(--white);
}

.role-researcher {
    background: var(--bg-light);
    color: var(--secondary-color);
    border: 1px solid var(--border-color);
}

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

.status-completed {
    background: #f1f5f9;
    color: var(--light-text);
}

.grant-content h3 {
    font-size: 1.2rem;
    line-height: 1.4;
    color: var(--secondary-color);
    margin-bottom: 6px;
}

.grant-subtitle {
    color: var(--light-text);
    font-size: 0.95rem;
    font-style: italic;
    margin-bottom: 14px;
}

.grant-meta {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.grant-meta li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.92rem;
    color: var(--text-color);
}

.grant-meta li i {
    color: var(--primary-color);
    width: 16px;
    margin-top: 4px;
    text-align: center;
}

.grant-meta strong {
    color: var(--secondary-color);
}

.grant-empty {
    text-align: center;
    color: var(--light-text);
    font-style: italic;
    padding: 40px 0;
}

/* Grants Preview (index.html section) */
.grants-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.grant-preview-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.grant-preview-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.grant-preview-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.grant-preview-card h3 {
    font-size: 1.05rem;
    line-height: 1.45;
    color: var(--secondary-color);
    margin-bottom: 14px;
    flex-grow: 1;
}

.grant-preview-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--light-text);
    margin-bottom: 6px;
}

.grant-preview-meta i {
    color: var(--primary-color);
    width: 14px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== Joining Page ===== */
.join-container {
    max-width: 900px;
}

.join-section {
    margin-bottom: 70px;
}

.join-section:last-child {
    margin-bottom: 0;
}

.join-section-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: inline-block;
}

.join-section-title i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 1.5rem;
}

.join-section-desc {
    color: var(--light-text);
    margin-bottom: 24px;
    font-size: 1.05rem;
}

.join-lead {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 18px;
}

.join-lead-kr {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--light-text);
}

/* Openings grid */
.openings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.opening-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    transition: var(--transition);
}

.opening-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.opening-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(59, 130, 246, 0.08) 100%);
}

.opening-card i {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.opening-card h3 {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.opening-desc {
    color: var(--text-color);
    font-size: 0.92rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

.opening-meta {
    color: var(--light-text);
    font-size: 0.85rem;
}

/* What we look for */
.lookfor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.lookfor-item {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    padding: 22px 24px;
}

.lookfor-item h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.lookfor-item p {
    color: var(--text-color);
    font-size: 0.92rem;
    line-height: 1.55;
}

.join-note {
    margin-top: 24px;
    padding: 16px 20px;
    background: rgba(37, 99, 235, 0.06);
    border-radius: 10px;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.join-note i {
    color: var(--primary-color);
    margin-right: 8px;
}

/* Explore cards */
.explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.explore-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.explore-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.explore-card i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 14px;
}

.explore-card h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.explore-card p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 14px;
    flex-grow: 1;
}

.explore-arrow {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

/* How to Apply steps */
.steps {
    margin-top: 24px;
}

.step-item {
    display: flex;
    gap: 24px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    font-family: var(--font-heading);
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-content h3 {
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 8px;
}

.step-content p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 14px;
}

.step-content a {
    color: var(--primary-color);
    font-weight: 500;
}

.step-content a:hover {
    text-decoration: underline;
}

.step-content .btn {
    margin-top: 6px;
}

/* FAQ */
.faq-list {
    margin-top: 24px;
}

.faq-item {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 16px;
}

.faq-item h3 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.faq-item h3::before {
    content: "Q. ";
    color: var(--primary-color);
    font-weight: 700;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.65;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.faq-item p:last-child {
    margin-bottom: 0;
}

.faq-kr {
    color: var(--light-text);
    font-size: 0.9rem !important;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

/* CTA */
.join-cta {
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 50px 40px;
    border-radius: 20px;
}

.join-cta h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
}

.join-cta p {
    color: var(--text-color);
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.cta-row {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-row .btn i {
    margin-right: 6px;
}

@media (max-width: 768px) {
    .openings-grid,
    .lookfor-grid,
    .explore-grid {
        grid-template-columns: 1fr;
    }

    .step-item {
        gap: 16px;
    }

    .join-cta {
        padding: 36px 24px;
    }
}

@media (max-width: 768px) {
    .grant-card {
        grid-template-columns: 1fr;
    }

    .grant-image {
        min-height: 140px;
    }

    .grant-content {
        padding: 24px;
    }
}