/* Home page */
.home-page {
    max-width: none;
}

/* Shared width for home content sections */
:root {
    --home-content-width: 1000px;
}

/* Hero */
.home-hero {
    width: 100%;
    max-width: var(--home-content-width);
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 72px;
    padding-top: 0px;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;
}

/* Hero title */
.home-hero-title {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;

    font-size: 56px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: -0.05em;
    color: #02cafc;

    text-align: center;
    text-wrap: balance;
}

/* #02cafc -> #00B0F0 */
/* Intro text */
.home-intro {
    width: 100%;
    max-width: 820px;
    margin: 10px auto 0 auto;

    font-size: 22px;
    line-height: 1.55;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #222;

    text-align: center;
}

.home-intro p {
    margin: 0 0 1em 0;
}

.home-intro p:last-child {
    margin-bottom: 0;
}

.home-intro a {
    color: #02cafc;
    text-decoration: none;
}

.home-intro a:hover {
    opacity: 0.6;
}

/* Common section */
.home-section {
    width: 100%;
    max-width: var(--home-content-width);
    margin-top: 56px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 14px;
    border-top: 1px solid #e5e5e5;

    box-sizing: border-box;
    text-align: left;
}

.home-section:first-of-type {
    margin-top: 40px;
}

.home-section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 24px;

    margin-bottom: 28px;
}

.home-section-header h2 {
    margin: 0;

    font-size: 30px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: #000;
}

.home-section-header a {
    color: #02cafc;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 400;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.home-section-header a:hover {
    opacity: 0.6;
}

/* Featured Projects */
.home-project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    column-gap: 16px;
    row-gap: 60px;

    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-project-card {
    margin: 0;
    padding: 0;
}

.home-project-card a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.home-project-card a:hover,
.home-project-card a:focus {
    opacity: 0.6;
}

/* Featured project image: fixed 5:3 ratio */
.home-project-image {
    width: 100%;
    aspect-ratio: 5 / 3;
    margin: 0;
    overflow: hidden;
    background-color: #f2f2f2;
}

.home-project-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-project-card h3 {
    display: block;
    margin: 6px 0 0 0;

    font-size: 18px;
    line-height: 1.25;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.03em;
    text-align: center;
}

.home-project-card p {
    display: -webkit-box;
    margin: 0;

    font-size: 16px;
    line-height: 1.35;
    font-weight: 400;
    color: #555;
    letter-spacing: -0.02em;

    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Selected Publications */
.home-publication-list {
    display: flex;
    flex-direction: column;
    gap: 15px;

    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-publication-item {
    max-width: 980px;
}

.home-publication-item h3 {
    margin: 0;

    font-size: 20px;
    line-height: 1.45;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #111;
}

.home-publication-item h3 a {
    color: #111;
    text-decoration: none;
}

.home-publication-item h3 a:hover {
    color: #02cafc;
}

.home-publication-authors {
    margin: 6px 0 0 0;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #555;
}

.home-publication-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0;

    margin: 6px 0 0 0;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #02cafc;
}

.home-publication-meta span + span::before {
    content: ", ";
    color: #02cafc;
}

.home-publication-recognition {
    margin: 4px 0 0 0;

    font-size: 18px;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: #02cafc;
}

/* Latest News */
.home-news-list {
    display: flex;
    flex-direction: column;
    gap: 0;

    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-news-item {
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: none;
}

.home-news-item a {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    column-gap: 20px;
    align-items: baseline;

    width: 100%;
    padding: 0 0 14px 0;
    margin-bottom: 0px;
    box-sizing: border-box;

    color: inherit;
    text-decoration: none;
}

.home-news-item time {
    font-size: 20px;
    line-height: 1.35;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #555;

    white-space: nowrap;
}

.home-news-text {
    margin: 0;

    font-size: 20px;
    line-height: 1.45;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: #111;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-news-title {
    font-weight: 700;
}

.home-news-description::before {
    content: " · ";
}

.home-news-item a:hover .home-news-text,
.home-news-item a:focus .home-news-text {
    color: #02cafc;
}

/* Responsive */
@media screen and (max-width: 960px) {
    .home-hero,
    .home-section {
        width: 100%;
        max-width: var(--home-content-width);
    }

    .home-hero-title {
        max-width: 780px;
        font-size: 46px;
    }

    .home-intro {
        max-width: 720px;
    }

    .home-project-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 24px;
    }
}

@media screen and (max-width: 640px) {
    .home-hero {
        margin-bottom: 10px;
    }

    .home-hero-title {
        max-width: none;
        font-size: 38px;
        line-height: 1.12;
    }

    .home-intro {
        max-width: none;
        margin-top: 0px;

        font-size: 18px;
        line-height: 1.45;
    }

    .home-section {
        margin-top: 36px;
        padding-top: 28px;
    }

    .home-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 14px;
    }

    .home-section-header h2 {
        font-size: 26px;
    }

    .home-project-grid {
        grid-template-columns: 1fr;
        row-gap: 22px;
    }

    .home-publication-item h3,
    .home-news-item time,
    .home-news-text {
        font-size: 18px;
    }

    .home-publication-authors,
    .home-publication-meta,
    .home-publication-recognition {
        font-size: 18px;
    }

    /* Latest News: mobile portrait */
    .home-news-list {
        gap: 22px;
    }

    .home-news-item a {
        display: block;
        padding: 0;
        margin-bottom: 0;
        text-align: left;
    }

    .home-news-item time {
        display: block;
        margin-bottom: 4px;

        line-height: 1.35;
        font-weight: 400;
        letter-spacing: -0.02em;
        color: #555;

        white-space: nowrap;
    }

    .home-news-text {
        display: -webkit-box;
        margin: 0;

        line-height: 1.35;
        font-weight: 400;
        letter-spacing: -0.02em;
        color: #111;

        white-space: normal;
        overflow: hidden;
        text-overflow: clip;

        line-clamp: 3;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    .home-news-title {
        font-weight: 700;
    }

    .home-news-description::before {
        content: " · ";
    }
}
