* {
    box-sizing: border-box;
}

:root {
    --link-color: #1772d1;
    --link-hover: #f09227;
    --text-color: #222;
    --muted-color: #666;
    --border-color: #e4e7eb;
    --soft-bg: #f8f9fa;
    --globe-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18'/%3E%3Cpath d='M12 3a15 15 0 0 1 0 18a15 15 0 0 1 0-18'/%3E%3C/svg%3E");
}

html {
    scroll-behavior: smooth;
}

body {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 30px 38px;
    color: var(--text-color);
    background: #fff;
    font-family: 'Lato', Verdana, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.58;
}

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

a:hover,
a:focus {
    color: var(--link-hover);
}

header {
    padding: 8px 0 22px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    width: 100%;
}

.lab-identity {
    min-width: 0;
}

h1 {
    margin: 0 0 4px;
    font-size: 2.15rem;
    line-height: 1.15;
}

.affiliation {
    margin: 0;
    color: var(--muted-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.site-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    padding-top: 8px;
    margin-left: auto;
    white-space: nowrap;
}

.site-nav a {
    color: var(--muted-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.site-nav a:hover {
    color: var(--link-color);
}

.header-intro {
    margin-top: 14px;
}

.intro {
    max-width: 830px;
    margin: 6px 0;
    color: #444;
}

section {
    padding: 24px 0;
    border-top: 1px solid #eee;
}

h2 {
    margin: 0 0 16px;
    font-size: 1.45rem;
    line-height: 1.3;
}

h3 {
    line-height: 1.35;
}


/* Research */

.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.research-card {
    padding: 17px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #fff;
}

.research-card h3 {
    margin: 0 0 9px;
    font-size: 1.05rem;
}

.research-card p {
    margin: 0;
    color: var(--muted-color);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tags span,
.badge {
    display: inline-block;
    padding: 3px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--soft-bg);
    color: #666;
    font-size: 0.78rem;
    line-height: 1.4;
}


/* Members */

.member-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    column-gap: 30px;
    row-gap: 5px;
}

.member {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 1px 0;
}

.member-name {
    font-weight: 400;
}

.member-name a {
    color: inherit;
}

.member-name a:hover,
.member-name a:focus {
    color: var(--link-hover);
}

.member-name a::after {
    content: "";
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    margin-left: 4px;
    vertical-align: -0.05em;
    background-color: var(--link-color);
    opacity: 0.85;
    -webkit-mask: var(--globe-icon) center / contain no-repeat;
    mask: var(--globe-icon) center / contain no-repeat;
}

.member-name a:hover::after,
.member-name a:focus::after {
    background-color: var(--link-hover);
}

.member-role {
    color: var(--muted-color);
    font-size: 0.82rem;
    white-space: nowrap;
}


/* Projects */

.section-intro {
    margin: -7px 0 16px;
    color: var(--muted-color);
}

.project-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.project-thread {
    padding: 17px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    background: #fff;
}

.thread-title {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.4;
}

.thread-desc {
    margin-top: 4px;
    color: var(--muted-color);
}

.work-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 11px;
}

.work-tag {
    display: inline-block;
    padding: 4px 9px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--soft-bg);
    color: var(--link-color);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.work-tag:hover {
    border-color: #c9d9eb;
}


/* Publications */

.section-link {
    font-size: 0.9rem;
    font-weight: 400;
}

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

.pub-list li {
    padding: 14px 0;
    border-top: 1px solid #eee;
}

.pub-list li:last-child {
    border-bottom: 1px solid #eee;
}

.pub-title {
    font-weight: 600;
    line-height: 1.5;
}

.pub-title a {
    color: var(--text-color);
}

.pub-title a:hover {
    color: var(--link-color);
}

.pub-meta {
    margin-top: 4px;
    color: var(--muted-color);
    line-height: 1.55;
}


/* Join */

.join-box {
    padding: 17px 18px;
    border-left: 4px solid var(--link-color);
    border-radius: 0 6px 6px 0;
    background: #f0f7ff;
}

.join-box h3 {
    margin: 0 0 7px;
    color: #0056b3;
    font-size: 1.1rem;
}

.join-box p {
    margin: 0;
    color: #444;
}


/* Posts */

.back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.9rem;
}

.post-list {
    margin: 0;
    padding: 0;
}

.post-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 20px;
    padding: 18px 0;
    border-top: 1px solid #eee;
}

.post-item:last-child {
    border-bottom: 1px solid #eee;
}

.post-date {
    color: var(--muted-color);
    font-size: 0.85rem;
}

.post-item h3 {
    margin: 0 0 5px;
    font-size: 1.05rem;
}

.post-item h3 a {
    color: var(--text-color);
}

.post-item h3 a:hover {
    color: var(--link-color);
}

.post-item p {
    margin: 0;
    color: var(--muted-color);
}


/* Article */

.post-header {
    padding-bottom: 28px;
}

.post-header h1 {
    max-width: 820px;
    margin-bottom: 10px;
    font-size: 2.15rem;
    line-height: 1.25;
}

.post-meta {
    color: var(--muted-color);
    font-size: 0.9rem;
}

.post-content {
    max-width: 760px;
}

.post-content h2 {
    margin-top: 38px;
    margin-bottom: 12px;
}

.post-content h3 {
    margin-top: 28px;
    margin-bottom: 9px;
    font-size: 1.12rem;
}

.post-content p {
    margin: 0 0 18px;
    line-height: 1.85;
}

.post-content ul,
.post-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 7px;
}

.post-content .note {
    margin: 24px 0;
    padding: 15px 18px;
    border-left: 3px solid var(--link-color);
    background: var(--soft-bg);
    color: #555;
}


/* Footer */

footer {
    margin-top: 27px;
    padding-top: 12px;
    border-top: 1px solid #eaeaea;
    color: #888;
    font-size: 0.84rem;
}

footer a {
    color: #666;
}


/* Mobile */

@media (max-width: 760px) {
    body {
        padding: 28px 20px 38px;
    }

    .research-grid,
    .project-list {
        grid-template-columns: 1fr;
    }

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

    .post-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 600px) {
    .header-top {
        gap: 14px;
    }

    .site-nav {
        gap: 12px;
        padding-top: 6px;
    }

    .site-nav a {
        font-size: 0.84rem;
    }
}

@media (max-width: 480px) {
    .header-top {
        display: block;
    }

    .site-nav {
        justify-content: flex-start;
        margin: 9px 0 0;
        padding-top: 0;
    }

    .header-intro {
        margin-top: 13px;
    }

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

    .post-header h1 {
        font-size: 1.8rem;
    }
}
