:root {
    color-scheme: light;
    --paper: #f7f7fb;
    --ink: #211d31;
    --muted: #5a546d;
    --accent: #583b8f;
    --line: #c9c4d9;
    --ice: #e0ecfa;
    --violet: #7557ac;
    --sans: "Hiragino Sans", "Yu Gothic", Meiryo, system-ui, sans-serif;
    --frame: min(1120px, calc(100% - clamp(32px, 9vw, 144px)));
}

:root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #191724;
    --ink: #f0edf7;
    --muted: #c1b9d1;
    --accent: #d3bcff;
    --line: #58506a;
    --ice: #302b45;
    --violet: #ad93df;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 15px/1.85 var(--sans);
}

a { color: var(--accent); text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; }
button { font: inherit; }

.header-content {
    width: var(--frame);
    min-height: 72px;
    margin-inline: auto;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: clamp(24px, 4vw, 56px);
    border-bottom: 1px solid var(--line);
}

.site-name {
    color: var(--ink);
    font: 680 18px/1.2 system-ui, sans-serif;
    letter-spacing: -.04em;
    text-decoration: none;
    white-space: nowrap;
}

.site-header nav ul {
    display: flex;
    gap: clamp(16px, 2.4vw, 34px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--muted);
    text-decoration: none;
    font: 550 13px/1.4 system-ui, sans-serif;
}

.site-header nav a { position: relative; }
.site-header nav a[aria-current="page"] { color: var(--accent); }
.site-header nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 4px;
    left: 0;
    width: 5px;
    height: 5px;
    margin-inline: auto;
    border-radius: 50%;
    background: var(--violet);
}

.site-header a:hover { color: var(--accent); }
.social-links {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-inline-start: 14px;
    border-inline-start: 1px solid var(--line);
    white-space: nowrap;
}
.social-links a {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--ink);
}
.social-links a:is(:hover, :focus-visible) { background: var(--ice); color: var(--accent); }
.social-icon { position: relative; display: block; width: 18px; height: 18px; }
.social-icon::before, .social-icon::after { content: ""; position: absolute; }
.social-icon--x::before, .social-icon--x::after {
    inset: 0;
    background: currentColor;
}
.social-icon--x::before { clip-path: polygon(4% 0, 27% 0, 96% 100%, 73% 100%); }
.social-icon--x::after { clip-path: polygon(82% 0, 94% 0, 17% 100%, 5% 100%); }
.social-icon--instagram { border: 1.7px solid currentColor; border-radius: 5px; }
.social-icon--instagram::before { inset: 3.5px; border: 1.6px solid currentColor; border-radius: 50%; }
.social-icon--instagram::after { top: 2px; right: 2px; width: 2px; height: 2px; border-radius: 50%; background: currentColor; }

.theme-toggle:not([hidden]) {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    font: 400 21px/1 system-ui, sans-serif;
}
.theme-toggle:is(:hover, :focus-visible) { background: var(--ice); }
.theme-toggle .theme-sun,
:root[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-sun { display: inline; }

main {
    flex: 1;
    width: var(--frame);
    margin: clamp(24px, 4.6vw, 64px) auto clamp(48px, 7vw, 92px);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

h2 { font: 700 clamp(18px, 2.2vw, 25px)/1.45 var(--sans); }
footer {
    width: var(--frame);
    margin-inline: auto;
    padding-block: 18px 30px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
}
footer p { margin: 0; }

.menu-toggle { display: none; }

@media (max-width: 720px) {
    .header-content {
        grid-template-columns: minmax(0, 1fr) auto auto;
        min-height: auto;
        padding-top: 4px;
        column-gap: clamp(4px, 2vw, 12px);
    }
    .site-header nav { grid-column: 1 / -1; grid-row: 2; }
    .site-header nav ul { justify-content: space-between; gap: 8px; }
    .social-links { grid-column: 2; grid-row: 1; gap: 2px; padding: 0; border: 0; }

    .has-menu .menu-toggle {
        grid-column: 3;
        grid-row: 1;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--ink);
        cursor: pointer;
    }
    .menu-toggle:is(:hover, :focus-visible, [aria-expanded="true"]) { background: var(--ice); }
    .menu-toggle span {
        position: relative;
        width: 18px;
        height: 2px;
        border-radius: 1px;
        background: currentColor;
    }
    .menu-toggle span::before, .menu-toggle span::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background: currentColor;
    }
    .menu-toggle span::before { transform: translateY(-5px); }
    .menu-toggle span::after { transform: translateY(5px); }
    .menu-toggle[aria-expanded="true"] span { background: transparent; }
    .menu-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
    .menu-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }

    .has-menu .menu-toggle[aria-expanded="false"] + nav { display: none; }
    .has-menu nav { border-top: 1px solid var(--line); }
    .has-menu nav ul { display: block; padding-block: 4px; }
    .has-menu nav a { display: flex; padding-inline: 10px; }
    .has-menu nav a[aria-current="page"] { background: var(--ice); }
    .has-menu nav a[aria-current="page"]::after { inset: auto 10px auto auto; }
}

@media (prefers-reduced-motion: no-preference) {
    .site-header a { transition: color 180ms ease; }

    .profile-details { animation: profile-arrive 520ms cubic-bezier(.2, .75, .25, 1) both; }

    @supports (animation-timeline: view()) {
        main img:not(.profile-photo img), .profile-photo {
            animation: image-entry linear both;
            animation-timeline: view();
            animation-range: entry 0% entry 65%;
        }
    }
}

@keyframes image-entry {
    from { opacity: .82; transform: translateY(9px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes profile-arrive {
    from { opacity: .55; transform: translateX(14px); }
    to { opacity: 1; transform: translateX(0); }
}

