:root {
    --base: rgb(239, 241, 245);
    --mantle: rgb(230, 233, 239);
    --crust: rgb(220, 224, 232);
    --text: rgb(76, 79, 105);
    --subtext-1: rgb(92, 95, 119);
    --subtext-2: rgb(108, 111, 133);
    --overlay-1: rgb(124, 127, 147);
    --overlay-2: rgb(140, 143, 161);
    --surface-1: rgb(172, 176, 190);
    --surface-2: rgb(188, 192, 204);
    --heading: rgb(30, 102, 245);
    --accent: rgb(220, 138, 120);
    --accent-strong: rgb(254, 100, 11);
    --shadow: rgba(76, 79, 105, 0.12);
}

:root[data-theme="dark"] {
    --base: rgb(30, 30, 46);
    --mantle: rgb(24, 24, 37);
    --crust: rgb(17, 17, 27);
    --text: rgb(205, 214, 244);
    --subtext-1: rgb(186, 194, 222);
    --subtext-2: rgb(166, 173, 200);
    --overlay-1: rgb(127, 132, 156);
    --overlay-2: rgb(147, 153, 178);
    --surface-1: rgb(69, 71, 90);
    --surface-2: rgb(88, 91, 112);
    --heading: rgb(137, 180, 250);
    --accent: rgb(245, 224, 220);
    --accent-strong: rgb(250, 179, 135);
    --shadow: rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light dark;
}

body {
    margin: 0 auto;
    padding: 3.5rem 1.5rem 5rem;
    max-width: 640px;

    font-family: "Verdana", "Helvetica", "Arial", sans-serif;
    font-size: 18px;
    line-height: 1.7;

    background-color: var(--base);
    color: var(--text);

    transition: background-color 0.2s ease, color 0.2s ease;
}

::selection {
    color: var(--base);
    background-color: var(--text);
}

a {
    color: var(--accent);
    text-decoration-color: var(--surface-2);
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent-strong);
    text-decoration-color: currentColor;
}


header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 3rem;
}

img.avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px var(--shadow);
}

h1 {
    font-family: "Times", "Georgia", serif;
    font-weight: normal;
    letter-spacing: 0.5rem;
    font-size: 2.25rem;
    margin: 1.5rem 0 0.5rem;

    padding-left: 0.5rem;
}

header p {
    text-align: center;
    color: var(--subtext-1);
    margin: 0.75rem 0 0;
    max-width: 34rem;
}

header p:first-of-type {
    font-size: 1.05rem;
}


article {
    border-top: 1px solid var(--surface-1);
    padding-top: 2.5rem;
}

article h3 {
    font-family: "Times", "Georgia", serif;
    font-weight: normal;
    color: var(--heading);
    letter-spacing: 0.02rem;
    font-size: 1.5rem;
    margin: 2.75rem 0 0.75rem;
}

article p {
    margin: 0 0 1rem;
}

#follow-me-on-nothing {
    background-color: var(--mantle);
    border: 1px solid var(--surface-1);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    color: var(--subtext-1);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
}


.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 0 0 1.25rem;
}

.gallery img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 6px 18px var(--shadow);
    transition: transform 0.2s ease;
}

.gallery img:hover {
    transform: translateY(-3px);
}

.zelda {
    text-align: center;
    margin-top: 3.5rem;
    color: var(--subtext-1);
}

.zelda img {
    display: block;
    width: 250px;
    max-width: 100%;
    margin: 0 auto 0.75rem;
    border-radius: 20px;
    box-shadow: 0 8px 24px var(--shadow);
}


#theme-toggle {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;

    color: var(--text);
    background-color: var(--mantle);
    border: 1px solid var(--surface-1);
    border-radius: 50%;
    cursor: pointer;

    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

#theme-toggle:hover {
    transform: rotate(-15deg);
    border-color: var(--surface-2);
}

#theme-toggle svg {
    width: 20px;
    height: 20px;
}

#theme-toggle .icon-sun {
    display: none;
}

:root[data-theme="dark"] #theme-toggle .icon-sun {
    display: block;
}

:root[data-theme="dark"] #theme-toggle .icon-moon {
    display: none;
}


@media screen and (max-width: 550px) {
    body {
        padding: 3rem 1.25rem 4rem;
        word-wrap: break-word;
    }

    img.avatar {
        width: 180px;
        height: 180px;
    }

    .gallery img {
        flex: 1 1 40%;
        width: auto;
        height: 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
