:root {
    --bg: #FFFFFF;
    --fg: #000000;
    --bg-card: #FFFFFF;
    --bg-media: #EFEFEF;
    --border: #868686;
    --muted: #5f5f5f;
    --accent: #000000;
    --maxw: 820px;
}

::selection {
    background-color: var(--accent);
    color: var(--bg);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    color: var(--fg);
    background: var(--bg);
    font-family: 'Inter', "Noto Sans JP", "Hiragino Sans", sans-serif;
    line-height: 1.7;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--fg);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1px;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--bg);
    background-color: var(--accent);
    border-bottom: 1px solid var(--accent);
}

.wrap {
    max-width: var(--maxw);
    margin-inline: auto;
    padding-inline: 24px;
}

main {
    padding-bottom: 80px;
    margin-top: 40px;
}

h1,
h2,
h3,
h4 {
    color: var(--accent);
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.25;
    margin: 60px 0 30px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.5rem;
    letter-spacing: -0.01em;
    margin: 48px 0 24px;
    scroll-margin-top: 32px;
    border-bottom: 1px solid var(--border);
}

h3 {
    font-size: 1.3rem;
    margin: 24px 0 12px;
}

h4 {
    font-size: 1.15rem;
    margin: 24px 0 12px;
}

p,
ul,
dl {
    margin-top: 0;
    margin-bottom: 16px;
}

.profile {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 32px;
    margin-bottom: 24px;
}

.profile dt {
    font-weight: 400;
    color: var(--muted);
}

.profile dd {
    margin: 0;
    color: var(--fg);
}

ul {
    padding-left: 1.4em;
}

li {
    margin: 6px 0;
    color: var(--muted);
}

li strong {
    color: var(--fg);
    font-weight: 500;
}

img,
video {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    margin: 16px 0;
    background: var(--bg-media);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 24px;
    margin-top: 24px;
}

.card-grid.large {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.card {
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card>p:first-child {
    margin: 0;
    line-height: 0;
    font-size: 0;
}

.card img,
.card video {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    margin: 0;
    border-radius: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-media);
}

.card>p:not(:first-child) {
    padding: 0 24px;
    margin: 0 0 0.2rem 0;
    line-height: 1.6;
    color: var(--muted);
    font-size: 0.95rem;
}

.card>p:nth-child(2) {
    padding-top: 20px;
}

.card>p:last-child {
    padding-bottom: 20px;
    margin-top: auto;
    margin-bottom: 0;
}

.card>p:nth-child(2):last-child {
    margin-top: 12px;
}

.card>p:not(:first-child) strong {
    color: var(--accent);
    font-weight: 500;
    font-size: 1.0rem;
}

.card p br {
    display: block;
    content: "";
    margin-bottom: 12px;
}

footer {
    border-top: 1px solid var(--border);
    padding: 32px 0 64px;
    margin-top: 48px;
    color: var(--muted);
    font-size: 0.9rem;
}

footer .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
}

footer a {
    border-bottom: none;
}

footer a:hover {
    color: var(--bg);
    background-color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
    :focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 3px;
        transition: outline-offset .12s ease;
    }

    a {
        transition: all .2s ease;
    }
}