/* Inter font
Copyright (c) 2016 The Inter Project Authors
Licensed under the SIL Open Font License, Version 1.1.
See: assets/fonts/LICENSE-Inter.txt */

@property --x-gradient {
    syntax: "<length>";
    inherits: true;
    initial-value: 0px;
}
@property --y-gradient {
    syntax: "<length>";
    inherits: true;
    initial-value: 0px;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --bg-color: #10172e;
    --bg-gradient: #1c4bd726;
    --bg-active-changer: white;
    --text-color: #e2e8f0;
    --text-h-color: #cbd6ee;
    --x-gradient: 0px;
    --y-gradient: 0px;
    --safe-padding-right: 0px;
    --transition-400: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-100: 100ms cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-std: 6px;
    --border-form-radius: 8px;
    --padding-form: 0.5rem;
}

:root .light {
    --bg-color: #eaeffb;
    --bg-gradient: white;
    --bg-active-changer: #999999;
    --text-color: #1f1912;
    --text-h-color: #372d14;
}

:root .vanilla {
    --bg-color: #f0e8d5;
    --bg-gradient: #ffffff;
    --bg-active-changer: #c7c2b6;
    --text-color: #1d170f;
    --text-h-color: #342911;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: none;
    color: var(--text-color);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    display: flex;
    flex-direction: column;
    padding: 1rem;

    &::before {
        content: "";
        position: fixed;
        inset: 0;
        pointer-events: none;
        z-index: -1;
        background-color: var(--bg-color);
        background-image: radial-gradient(
            600px at var(--x-gradient) var(--y-gradient),
            var(--bg-gradient),
            transparent 80%
        );
    }
}

a {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

hgroup {
    color: var(--text-color);
    transition: color var(--transition-400);
    &:hover {
        color: var(--text-h-color);
    }
}

h1 {
    font-size: 3rem;
    line-height: 3rem;
    font-weight: 700;
    letter-spacing: -1.2px;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

h2 {
    font-size: 1.15rem;
    line-height: 1.75rem;
    font-weight: 578;
    letter-spacing: -0.5px;
    position: relative;
}

h5 {
    font-weight: 500;
    color: var(--text-h-color);
}

body > div:nth-child(2) {
    display: flex;
    justify-content: space-between;
}

header {
    margin-bottom: 2rem;
}

header > div {
    margin-top: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

header img {
    border-radius: 100%;
    aspect-ratio: 1/1;
    width: 100%;
    object-fit: cover;
    object-position: center;
    border-color: var(--text-h-color);
    border-width: 4.5px;
    border-style: solid;
}

header button {
    color: var(--text-h-color);
    background-color: inherit;
    border-color: var(--text-h-color);
    border-width: 1.5px;
    border-style: solid;
    padding-inline: 0.3rem;
    padding-block: 0.2rem;
    border-radius: 6px;
    margin-right: 0.3rem;
    margin-top: 0.6rem;
    cursor: pointer;
}

header button:disabled {
    background: color-mix(
        in srgb,
        var(--bg-color) 80%,
        var(--bg-active-changer) 30%
    );
    cursor: auto;
}

header > div > div:nth-child(1) {
    max-width: 145px;
}

header > div:nth-child(4) {
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--text-h-color);
    margin-top: 3rem;
    margin-bottom: 2rem;
}

header > div:nth-child(2) > div:nth-child(2) {
    height: 100%;
    font-style: italic;
    color: var(--text-color);
    transition: color var(--transition-400);
    &:hover {
        color: var(--text-h-color);
    }
}

nav {
    position: fixed;
    bottom: 0;
    right: 1rem;
    max-height: 100%;
    z-index: 10000;
    display: none;
    padding-bottom: 1rem;
}

nav:not(#nav-lg) div {
    aspect-ratio: 1/1;
    width: 60px;
    max-height: 16vh;
    max-width: 16vh;
    border: var(--text-h-color) 0px solid;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-block: 0.5rem;
    transition: transform var(--transition-100);

    &:active {
        transform: scale(1.1);
    }
}

main h2 {
    padding-top: 4rem;
}

main h3 {
    font-weight: 350;
}

main h4 {
    font-weight: 250;
    margin-top: 0.8rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-h-color);
}

main > section > hgroup {
    padding-top: 4rem;
}

main p {
    line-height: 1.625rem;
    color: var(--text-h-color);
    font-weight: 250;
    word-spacing: -1px;
    padding-top: 0.5rem;
    text-align: justify;
    hyphens: auto;
}

main .horizontal-bulleted-list {
    margin-top: 2rem;
}

footer {
    min-height: 370px;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer div {
    max-width: 75%;
    color: var(--text-h-color);
    font-weight: 250;
    text-align: center;
    cursor: default;
}

.safe-padding {
    padding-right: var(--safe-padding-right, 0px);
}

.horizontal-bulleted-list {
    display: flex;
    gap: 1.5rem;
    justify-content: start;
    align-items: start;
    font-weight: 250;
    flex-direction: column;
}

.horizontal-bulleted-list > div {
    height: 100%;
}

.horizontal-bulleted-list ul {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.horizontal-bulleted-list ul > li {
    display: flex;
    color: var(--text-h-color);

    &::before {
        content: "";
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        background-color: currentColor;
        mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2024%2024%27%3E%3Cpath%20d%3D%27M8.59%2016.59%2013.17%2012%208.59%207.41%2010%206l6%206-6%206-1.41-1.41z%27/%3E%3C/svg%3E")
            no-repeat center / contain;
        padding-right: 0.3rem;
    }
}

.horizontal-bulleted-list ul > li span {
    font-weight: 700;
    color: var(--text-color);
}

div.horizontal-bulleted-list > h2 {
    padding-top: 2rem;
}

#theme-selector {
    display: block;
    margin-top: 0;
    margin-right: auto;
    width: fit-content;
}

#theme-selector span {
    display: none;
}

#theme-selector div {
    text-align: center;
    margin-top: 1rem;
    margin-right: 0.3rem;
    font-size: 0.9rem;
}

#nav-lg {
    display: none;
}

nav#nav-lg div {
    border: none;
    border-radius: 0;
    transition: transform var(--transition-100);
    transform: none;
}

:is(#me, #contact-me) > div:nth-child(1) {
    display: none;
}

:is(#me, #contact-me) > div:nth-child(1) img {
    width: 130px;
}

#me-q h3 {
    margin-top: 2.5rem;
    margin-bottom: 0.5rem;
}

#me-q p {
    margin-bottom: 0.5rem;
}

#me-q > div:nth-child(2) > p {
    hyphens: auto;
}

#contact-me {
    legend {
        padding-top: 1rem;
        padding-bottom: 0.7rem;
    }

    article {
        margin-inline: auto;
        > h2,
        > p {
            text-align: center;
        }
        .small-left {
            text-align: left;
        }
    }

    form,
    fieldset,
    div {
        min-width: 0;
        max-width: 391px;
    }

    form {
        margin-inline: auto;
    }

    legend {
        text-align: center;
    }

    div {
        padding-block: 0.4rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    input,
    select,
    option {
        line-height: 2rem;
        border-radius: var(--border-form-radius);
        height: 2rem;
        font-weight: 700;
        padding-inline: var(--padding-form);
    }

    input,
    select {
        border: var(--text-color) 1px solid;
    }

    option {
        border: 0;
    }

    textarea {
        border-radius: var(--border-form-radius);
        padding: var(--padding-form);
    }

    button {
        border-radius: var(--border-form-radius);
        height: 2rem;
        background-color: var(--bg-color);
        color: var(--text-color);
        border: 1px solid var(--text-h-color);
        cursor: pointer;
    }

    #result {
        text-align: center;
        display: none;
    }
    #top-result {
        text-align: center;
        background-color: rgb(0 255 139 / 43%);
        border-radius: var(--border-form-radius);
        border-color: rgba(10, 54, 34, 1);
        border-width: 2px;
        border-style: solid;
        height: 3rem;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: 700;
        display: none;
    }
}

#btm-sentinel {
    height: 1px;
}

nav:not(#nav-lg) #back-to-top {
    border: 0;
    aspect-ratio: unset;
    padding-top: 0.3rem;
    transition: opacity var(--transition-400);
    display: none;
    opacity: 0;
}

nav:not(#nav-lg) #back-to-top.viewd {
    display: flex;
}

nav:not(#nav-lg) #back-to-top.viewo {
    opacity: 1;
}

#footer-lg {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    nav:not(#nav-lg) div:hover {
        transform: scale(1.1);
    }
}

@media screen and (min-height: 300px) {
    nav:not(#nav-lg) div {
        border: var(--text-h-color) 2px solid;
    }
}

@media screen and (min-width: 300px) {
    #contact-me article {
        .small-left {
            text-align: center;
        }
    }
}

@media screen and (min-width: 335px) {
    nav {
        display: block;
    }

    header img {
        min-width: 120px;
    }
}

@media screen and (min-width: 425px) {
    .horizontal-bulleted-list {
        flex-direction: row;
    }
    main .horizontal-bulleted-list {
        flex-direction: column;
    }
}

@media screen and (min-width: 576px) {
    body {
        padding-inline: 2rem;
    }
}

@media screen and (min-width: 630px) {
    main p {
        hyphens: manual;
    }
}

@media screen and (min-width: 992px) {
    nav {
        display: none;
    }

    nav#nav-lg {
        display: flex;
        flex-direction: column;
        justify-content: space-evenly;
        flex-grow: 1;
        color: var(--text-h-color);
        font-weight: 500;
        text-transform: uppercase;
        font-size: 0.85rem;
        padding-bottom: 0;

        a {
            display: inline-flex;
            align-items: center;
            color: color-mix(in srgb, var(--text-h-color) 35%, transparent);

            &::before {
                content: "";
                height: 1px;
                width: 2rem;
                background: color-mix(
                    in srgb,
                    var(--text-h-color) 35%,
                    transparent
                );
                margin-right: 0.5rem;
                transition:
                    width 0.3s ease,
                    background-color 0.2s ease;
            }
            &::after {
                content: "";
                height: 1px;
                width: 0rem;
                background: color-mix(
                    in srgb,
                    var(--text-h-color) 35%,
                    transparent
                );
                margin-left: 0.5rem;
                transition:
                    width 0.3s ease,
                    background-color 0.2s ease;
            }

            &:hover,
            &:focus-visible,
            &.is-active {
                color: var(--text-color);

                &::before {
                    width: 4rem;
                    background: var(--text-color);
                }
                &::after {
                    width: 4rem;
                    background: var(--text-color);
                }
            }
        }
    }

    main p {
        hyphens: auto;
    }

    .horizontal-bulleted-list > ul > li:nth-child(2) > div {
        text-align: justify;
        hyphens: auto;
    }

    #btm-sentinel {
        display: none;
    }

    #nav-lg {
        display: block;
        position: static;
    }

    #container {
        display: flex;
        flex-direction: row;
        gap: 5.5rem;
        position: relative;
        align-items: flex-start;
        max-width: 1200px;
        margin-inline: auto;
        padding-inline: 4.5rem;
    }

    #container header {
        position: sticky;
        top: 1rem;
        width: 50%;
        flex-shrink: 0;
        height: 92vh;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }

    #container > header > div:nth-child(2) > div:nth-child(2) {
        display: flex;
        align-items: center;
    }

    #container > div {
        margin-top: 1.5rem;
    }

    #theme-selector {
        margin-left: auto;
        margin-right: 0;
    }

    #theme-selector span {
        font-size: 0.7rem;
        display: block;
        margin-top: 0.3rem;
        text-align: center;
        margin-right: 0.3rem;
    }

    #theme-selector div {
        display: none;
    }

    :is(#me, #contact-me) > div:nth-child(1) {
        display: flex;
        justify-content: center;
    }

    #contact-me > div > a {
        margin-inline: auto;
    }

    #contact-me article {
        width: 355px;
    }

    footer {
        min-height: auto;
        padding-block: 5rem;
    }

    #footer-sm {
        display: none;
    }

    #footer-lg {
        display: flex;
        height: 40vh;
    }
}

@media screen and (min-width: 992px) and (max-height: 795px) {
    header > div {
        margin-top: 2rem;
    }
}

@media screen and (min-width: 1050px) {
    #contact-me article {
        width: 391px;
    }
}

@media screen and (min-width: 1200px) {
    #container {
        gap: 4.5rem;
    }
    main p {
        hyphens: manual;
    }
}
