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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #2d3748;
    background: #f7f7fb;
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #4a5aab;
    text-decoration: none;
}

a:hover {
    color: #2d3a7a;
    text-decoration: underline;
}

/* ===== Navigation ===== */
nav {
    background: #fff;
    border-bottom: 1px solid #e2e2ef;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .nav-inner {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

nav .nav-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: #2d3748;
    padding: 0.7rem 0;
    white-space: nowrap;
}

nav .nav-title a {
    color: inherit;
    text-decoration: none;
}

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

nav .nav-links a {
    display: block;
    padding: 0.7rem 0.9rem;
    font-size: 1.15rem;
    color: #5a6072;
    transition: color 0.15s;
    white-space: nowrap;
}

nav .nav-links a:hover,
nav .nav-links a.active {
    color: #4a5aab;
    text-decoration: none;
}

/* ===== Main Content ===== */
.container {
    max-width: 1060px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
}

/* ===== Home Hero ===== */
.hero {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2.5rem;
}

.hero-photo {
    flex-shrink: 0;
}

.hero-photo img {
    width: 180px;
    height: auto;
    border-radius: 8px;
}

.hero-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.15rem;
}

.hero-text .lab-name {
    font-size: 1rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.hero-text p {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.hero-text .bio-links {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.hero-text .bio-links a {
    margin-right: 1rem;
}

/* ===== Section Headings ===== */
h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e2e2ef;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* ===== News List ===== */
.news-list {
    list-style: none;
    padding: 0;
}

.news-list li {
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.93rem;
}

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

.news-badge {
    display: inline-block;
    background: #4a5aab;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    text-transform: uppercase;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* ===== Members Page ===== */
.member-section {
    margin-bottom: 2rem;
}

.member-list {
    list-style: none;
    padding: 0;
    columns: 2;
    column-gap: 2rem;
}

.member-list li {
    padding: 0.3rem 0;
    font-size: 0.95rem;
    break-inside: avoid;
}

.alumni-subsection {
    margin-bottom: 1.5rem;
}

.alumni-subsection h3 {
    font-size: 1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
    color: #5a6072;
}

/* ===== Publications ===== */
.pub-list {
    list-style: none;
    padding: 0;
    counter-reset: pub-counter;
}

.pub-list > li {
    padding: 0.65rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
    line-height: 1.65;
}

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

.pub-venue {
    color: #6b7280;
}

.pub-award {
    display: inline-block;
    background: #d97706;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.3rem;
    vertical-align: middle;
}

.pub-links a {
    font-size: 0.82rem;
    margin-right: 0.5rem;
    color: #4a5aab;
}

/* ===== Projects ===== */
.project-card {
    background: #fff;
    border: 1px solid #e2e2ef;
    border-radius: 8px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}

.project-card .project-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.4rem;
}

.project-card .project-desc {
    font-size: 0.93rem;
    color: #4a5568;
    margin-bottom: 0.75rem;
}

.project-card .project-links {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.project-card .project-links a {
    color: #4a5aab;
    font-weight: 500;
}

.project-card-media {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.project-card-media .project-media {
    flex-shrink: 0;
    width: 450px;
}

.project-card-media .project-media video,
.project-card-media .project-media img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.leaderboard {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.leaderboard th {
    background: #f0f0f8;
    font-weight: 600;
    color: #4a5568;
    text-align: left;
    padding: 0.45rem 0.55rem;
    border-bottom: 2px solid #e2e2ef;
}

.leaderboard td {
    padding: 0.35rem 0.55rem;
    border-bottom: 1px solid #eee;
    color: #2d3748;
}

.leaderboard tbody tr:first-child td {
    font-weight: 600;
    color: #1a202c;
}

.leaderboard tbody tr:hover {
    background: #f7f7fb;
}

.project-card-media .project-body {
    flex: 1;
    min-width: 0;
}

/* ===== Courses ===== */
.course-entry {
    margin-bottom: 1.75rem;
}

.course-entry h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.course-entry ul {
    list-style: none;
    padding: 0;
}

.course-entry li {
    padding: 0.2rem 0;
    font-size: 0.93rem;
}

.course-entry li::before {
    content: "→ ";
    color: #9ca3af;
}

/* ===== Background / Experience ===== */
.experience-entry {
    margin-bottom: 1.75rem;
}

.experience-entry .exp-title {
    font-weight: 600;
    font-size: 1rem;
    color: #1a202c;
}

.experience-entry .exp-period {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 0.35rem;
}

.experience-entry p {
    font-size: 0.93rem;
    margin-top: 0.35rem;
}

.education-list {
    list-style: none;
    padding: 0;
}

.education-list li {
    margin-bottom: 1rem;
}

.education-list .degree {
    font-size: 0.93rem;
    color: #5a6072;
}

/* ===== Experiments ===== */
.experiment-section {
    margin-bottom: 2rem;
}

.experiment-section p {
    font-size: 0.93rem;
    margin-bottom: 0.5rem;
}

.experiment-section .video-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.experiment-section .video-item {
    flex: 1;
    min-width: 280px;
}

.experiment-section .video-item iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
    border-radius: 6px;
}

.experiment-section .video-item p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

.experiment-links {
    list-style: none;
    padding: 0;
}

.experiment-links li {
    padding: 0.25rem 0;
    font-size: 0.93rem;
}

.experiment-links li::before {
    content: "→ ";
    color: #9ca3af;
}

/* ===== Footer ===== */
footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
    border-top: 1px solid #e2e2ef;
    margin-top: auto;
}

/* ===== Responsive ===== */
@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .hero-photo img {
        width: 160px;
    }

    .hero-text .bio-links {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .hero-text .bio-links a {
        margin-right: 0;
    }

    nav .nav-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    nav .nav-links {
        width: 100%;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    nav .nav-links a {
        padding: 0.5rem 0.6rem;
        font-size: 0.85rem;
    }

    .member-list {
        columns: 1;
    }

    .project-card-media {
        flex-direction: column;
    }

    .project-card-media .project-media {
        width: 100%;
    }

    .experiment-section .video-row {
        flex-direction: column;
    }
}
