:root {
    color-scheme: light;
    --text: #1e293b;
    --secondary: #64748b;
    --link: #3564a0;
    --border: #e2e8f0;
}

body {
    font-family: system-ui;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: #fff;
    max-width: 960px;
    margin: 40px 24px;
}

.layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

aside {
    position: sticky;
    top: 48px;
}

main {
    border-left: 1px solid var(--border);
    padding-left: 48px;
    min-width: 0;
}

h1 {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.2;
    margin: 0 0 12px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.4px;
    margin: 0 0 16px;
}

p {
    margin: 0 0 16px;
}

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

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.subtitle {
    color: var(--secondary);
    font-size: 15px;
}

.name-chinese {
    margin: 20px 0;
}

nav {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 20px 0;
    margin: 24px 0;
}

nav a {
    display: block;
    color: var(--secondary);
    font-size: 15px;
    padding: 5px 0;
}

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

section + section {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    margin-top: 28px;
}

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

.software li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 7px 0;
}

.description {
    color: var(--secondary);
    font-size: 14px;
    text-align: right;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

figure {
    margin: 0;
}

figure img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
}

figcaption {
    color: var(--secondary);
    font-size: 13px;
    margin-top: 8px;
}

.haiku {
    margin-top: 28px;
    font-size: 14px;
}

code {
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.social img {
    display: block;
    width: 24px;
}

address {
    font-size: 13px;
    font-style: normal;
    overflow-wrap: anywhere;
    margin-top: 16px;
}

@media (max-width: 700px) {
    body {
        margin: 24px 16px;
    }

    .layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    aside {
        position: static;
    }

    main {
        border-left: 0;
        border-top: 1px solid var(--border);
        padding-left: 0;
        padding-top: 32px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 20px;
    }
}

@media (max-width: 400px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}
