:root {
    color-scheme: light;
    --background: #f4faff;
    --paper: #fff;
    --ink: #1b3148;
    --muted: #4a6075;
    --blue: #386d98;
    --line: #d7e2ec;
    --sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --serif: "Songti SC", "Noto Serif CJK SC", "STZhongsong", "SimSun", serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font: 1rem/1.7 var(--sans);
}

h1, h2, h3, p, figure {
    margin: 0;
}

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

a {
    color: inherit;
}

a:focus-visible {
    outline: 3px solid #236c8a;
    outline-offset: 4px;
}

.container {
    width: min(75rem, calc(100% - 4rem));
    margin-inline: auto;
}

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}

.masthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 5.25rem;
    padding-block: .75rem;
}

.school-logo {
    width: clamp(11rem, 26vw, 17.5rem);
    height: auto;
    min-width: 0;
}

.masthead a {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .75rem;
    color: var(--blue);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.masthead a:hover {
    text-decoration: underline;
    text-underline-offset: .3em;
}

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    margin-top: 2rem;
    overflow: hidden;
    border-radius: 1.125rem;
    background: #c5e8ff;
}

.hero-copy {
    padding: clamp(2rem, 4vw, 3.75rem);
}

.term {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem .8rem;
    color: #225886;
    font-size: .875rem;
    font-weight: 600;
}

.term span {
    padding-left: .8rem;
    border-left: 1px solid #78aed4;
}

.hero h1 {
    margin-top: 1.2rem;
    font: 700 clamp(2.35rem, 4.35vw, 4.1rem)/1.17 var(--serif);
    letter-spacing: .025em;
}

.hero-summary {
    max-width: 32em;
    margin-top: 1.35rem;
    color: #294b65;
    font-size: .975rem;
    line-height: 1.9;
}

.hero-photo {
    align-self: center;
    margin: 1.25rem clamp(1.25rem, 3vw, 2.75rem) 1.25rem 0;
}

.hero-photo img {
    width: 100%;
    height: auto;
    border-radius: .5rem;
}

.showcase {
    margin-block: clamp(2.5rem, 4.5vw, 4.25rem);
    scroll-margin-top: 1.5rem;
}

.section-heading {
    margin-bottom: 1.35rem;
    font: 700 clamp(1.6rem, 3vw, 2.25rem)/1.3 var(--serif);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.9rem, 2vw, 1.5rem);
}

.work-card {
    display: flex;
}

.work-card a {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: .8rem;
    background: var(--paper);
    text-decoration: none;
}

.work-card a:hover,
.work-card a:focus-visible {
    border-color: #739bbc;
}

.work-cover {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 2.25;
    overflow: hidden;
    border-radius: calc(.8rem - 1px) calc(.8rem - 1px) 0 0;
}

.work-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.craft-cover {
    background: #696252;
}

.luxun-cover {
    background: #303230;
}

.luxun-cover img {
    object-position: center 40%;
}

.hydrogen-cover {
    background: #dce9ef;
    color: #24576b;
}

.hydrogen-molecule {
    display: flex;
    align-items: center;
    transform: rotate(-16deg);
}

.hydrogen-molecule::before {
    position: absolute;
    z-index: -1;
    inset: 50% 18%;
    height: .55rem;
    background: #6b98a8;
    transform: translateY(-50%);
    content: "";
}

.hydrogen-molecule span {
    display: grid;
    place-items: center;
    width: clamp(3.2rem, 5vw, 4.5rem);
    aspect-ratio: 1;
    margin-inline: .4rem;
    border: 1px solid #6b98a8;
    border-radius: 50%;
    background: #edf5f8;
    font: 600 1.5rem/1 var(--sans);
}

.hydrogen-formula {
    position: absolute;
    right: 1rem;
    bottom: .55rem;
    font-size: .95rem;
    font-weight: 600;
}

.work-copy {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.15rem 1.25rem 1rem;
}

.work-place {
    color: var(--blue);
    font-size: .8rem;
    font-weight: 600;
}

.work-copy h3 {
    margin-top: .35rem;
    font-size: clamp(1.15rem, 1.85vw, 1.4rem);
    line-height: 1.4;
}

.work-description {
    margin-block: .65rem 1.05rem;
    color: var(--muted);
    font-size: .9rem;
}

.work-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-top: auto;
    padding-top: .7rem;
    border-top: 1px solid var(--line);
    color: var(--blue);
    font-size: .875rem;
    font-weight: 600;
}

.work-arrow {
    display: grid;
    place-items: center;
    width: 1.8rem;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #e9f1f8;
    font: 1.05rem/1 system-ui, sans-serif;
}

.work-card a:is(:hover, :focus-visible) .work-arrow {
    background: var(--blue);
    color: #fff;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .3rem 1rem;
    padding-block: 1.2rem 1.6rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: .8rem;
}

@media (max-width: 56rem) {
    .work-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 44rem) {
    .container {
        width: calc(100% - 2rem);
    }

    .masthead {
        min-height: 4.25rem;
    }

    .masthead a {
        padding-inline: .25rem;
    }

    .hero,
    .work-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        margin-top: 1rem;
    }

    .hero-copy {
        padding: 1.65rem 1.4rem 1.5rem;
    }

    .term {
        gap: .2rem .45rem;
        font-size: .75rem;
    }

    .term span {
        padding-left: .45rem;
    }

    .hero h1 {
        margin-top: 1rem;
        font-size: clamp(1.95rem, 8.2vw, 3rem);
    }

    .hero-summary {
        margin-top: .9rem;
        font-size: .9rem;
    }

    .hero-photo {
        margin: 0 1.4rem 1.25rem;
    }
}

@media (max-width: 24rem) {
    .term span {
        padding-left: 0;
        border-left: 0;
    }
}
