html, body {
    background-color: var(--bg-color);
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 18px;
    --vh: 1vh;
    overflow-x: hidden;
    position: relative;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-weight: 500;
    overflow-x: hidden;
}

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

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

video { pointer-events: none; }
video::-webkit-media-controls { display: none; }

#loading-cover {
    background-color: var(--bg-color);
    z-index: 1500;
    position: fixed;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
}

#theme-switcher {
    z-index: 1000;
    position: fixed;
    bottom: var(--pad-b);
    right: var(--pad-b);
    width: 64px; height: 64px;
    border-radius: 50%;
    -moz-box-shadow: 5px 5px 20px -7px var(--shadow-color);
    -webkit-box-shadow: 5px 5px 20px -7px var(--shadow-color);
    box-shadow: 5px 5px 20px -7px var(--shadow-color);
    transform: scale(1);
    transition: all 0.25s ease-out;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
}
body.scrolled #theme-switcher {
    opacity: 1;
    pointer-events: initial;
}
#theme-switcher:hover {
    transform: scale(1.05);
}
#theme-switcher::before {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    content: '';
    background-color: var(--text-color);
    width: 48px; height: 48px;
    display: inline-block;
    mask-type: alpha;
}
body[theme="light"] #theme-switcher {
    background-color: var(--light-color);
}
body[theme="dark"] #theme-switcher {
    background-color: var(--tertiary-color--darker);
}
body[theme="light"] #theme-switcher::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="m17.75 4.09l-2.53 1.94l.91 3.06l-2.63-1.81l-2.63 1.81l.91-3.06l-2.53-1.94L12.44 4l1.06-3l1.06 3zm3.5 6.91l-1.64 1.25l.59 1.98l-1.7-1.17l-1.7 1.17l.59-1.98L15.75 11l2.06-.05L18.5 9l.69 1.95zm-2.28 4.95c.83-.08 1.72 1.1 1.19 1.85c-.32.45-.66.87-1.08 1.27C15.17 23 8.84 23 4.94 19.07c-3.91-3.9-3.91-10.24 0-14.14c.4-.4.82-.76 1.27-1.08c.75-.53 1.93.36 1.85 1.19c-.27 2.86.69 5.83 2.89 8.02a9.96 9.96 0 0 0 8.02 2.89m-1.64 2.02a12.08 12.08 0 0 1-7.8-3.47c-2.17-2.19-3.33-5-3.49-7.82c-2.81 3.14-2.7 7.96.31 10.98c3.02 3.01 7.84 3.12 10.98.31"/></svg>');
}
body[theme="dark"] #theme-switcher::before {
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="currentColor" d="M12 7a5 5 0 0 1 5 5a5 5 0 0 1-5 5a5 5 0 0 1-5-5a5 5 0 0 1 5-5m0 2a3 3 0 0 0-3 3a3 3 0 0 0 3 3a3 3 0 0 0 3-3a3 3 0 0 0-3-3m0-7l2.39 3.42C13.65 5.15 12.84 5 12 5s-1.65.15-2.39.42zM3.34 7l4.16-.35A7.2 7.2 0 0 0 5.94 8.5c-.44.74-.69 1.5-.83 2.29zm.02 10l1.76-3.77a7.13 7.13 0 0 0 2.38 4.14zM20.65 7l-1.77 3.79a7.02 7.02 0 0 0-2.38-4.15zm-.01 10l-4.14.36c.59-.51 1.12-1.14 1.54-1.86c.42-.73.69-1.5.83-2.29zM12 22l-2.41-3.44c.74.27 1.55.44 2.41.44c.82 0 1.63-.17 2.37-.44z"/></svg>');
}

#drawing-gamedev {
    left: calc(-0.5 * var(--pad-h));
    transform: rotate(-15deg);
}
#drawing-writing {
    right: calc(-1 * var(--pad-h));
    transform: rotate(7deg);
}
#drawing-teach {
    left: calc(-0.5 * var(--pad-h));
    transform: rotate(-10deg);
}
#drawing-shaders {
    right: calc(-0.5 * var(--pad-h));
    transform: rotate(12deg);
}

/* ============
   HEADER
 ============== */
#header {
    height: var(--header-h);
    width: calc(100vw - 2 * var(--pad-m));
    padding: var(--pad-m);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
}
#header::before {
    opacity: 0;
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--bg-color);
    transition: opacity 0.25s;
    -moz-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    -webkit-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    box-shadow: 0 -10px 40px -10px var(--shadow-color);
}
body.scrolled #header::before {
    opacity: 1;
}

#brand-identity {
    width: 15vw;
}

#brand-identity img {
    height: var(--header-h);
    width: auto;
    border-radius: 8px;
}

#socials {
    display: flex;
    justify-content: end;
    column-gap: 0.75rem;
    margin-right: var(--pad-s);
}
#socials > * {
    color: var(--text-color);
}
body[theme="light"] #socials > *:hover {
    color: var(--secondary-color);
}
body[theme="dark"] #socials > *:hover {
    color: var(--primary-color);
}

/* Mobiles / Tablets */
@media (max-width: 992px) {
    #nav-links {
        display: none;
    }
}

/* Desktops */
@media (min-width: 992px) {
    #nav-links {
        display: flex;
        column-gap: 1rem;
        align-items: center;
    }

    #socials {
        width: 15vw;
    }
}

/* ============
   BANNER
 ============== */
@keyframes fade-in {
    from { opacity: 0 }
    to { opacity: 1 }
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary-color); }
}

#banner {
    height: 100vh;
    overflow: hidden;
    position: relative;
}

#banner-text {
    width: 0;
    text-align: center;
    transform: translateY(-10%);
    transition: margin-left 1s ease-in-out;
    font-weight: 700;
    margin-left: 0;

    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
@media (prefers-reduced-motion: no-preference) {
    #banner-text.active {
        animation: 
            typing 0.5s steps(16, end) forwards,
            blink-caret .75s step-end infinite;
    }
}
@media (prefers-reduced-motion: reduce) {
    #banner-text {
        width: fit-content;
        transition: opacity 0.5s;
        opacity: 0;
    }
    #banner-text.active {
        opacity: 1;
    }
}

/* Mobiles / Tablets */
@media (max-width: 992px) {
    #banner-text,
    #banner-info {
        display: none;
    }

    #banner-info-mobile {
        font-size: 32px;
        position: absolute;
        top: 0; left: 0;
        width: calc(100% - 2 * var(--pad-b));
        height: calc(100% - 2 * var(--pad-b));
        display: grid;
        place-items: center;
        text-align: center;
        padding: var(--pad-b);
    }

    #banner-info-mobile > div {
        display: flex;
        flex-direction: column;
        row-gap: 1rem;
        align-items: center;
    }

    #banner-info-mobile #mobile-icon-wrapper {
        --size: 60vw;
        position: relative;
        width: var(--size);
        height: var(--size);
    }

    #banner-info-mobile svg {
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        fill: url(#svg-gradient) var(--primary-color);
        transition: opacity 0.5s;
    }
    #banner-info-mobile svg.active {
        opacity: 1;
    }
}

/* Desktops */
@media (min-width: 992px) {
    #banner-text {
        font-size: 12rem;
    }

    #banner-info {
        font-size: 22px;
        position: absolute;
        left: var(--pad-b);
        bottom: var(--pad-b);
        right: var(--pad-b);
        display: flex;
        justify-content: space-between;
    }

    #banner-info > div {
        max-width: 20vw;
    }

    #banner-info-mobile {
        display: none;
    }
}

/* ============
   CONTENT
 ============== */
#content {
    --column-width: 1200px;
    --margin: calc(var(--header-h) + var(--pad-m));
    padding-top: var(--margin);
    padding-bottom: var(--pad-h);
    background-color: var(--bg-color);
    -moz-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    -webkit-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    box-shadow: 0 -10px 40px -10px var(--shadow-color);
}

.max-width {
    max-width: var(--column-width);
    margin: 0 auto;
}

/* ABOUT
   ------------- */
#about .section-content ul {
    list-style-type: none;
    padding-left: 0;
}

#about .section-content li {
    --info-w: 40%;
    font-size: 18px;
    position: relative;
}

/* Mobiles / Tablets */
@media (max-width: 992px) {
    #about #stats { display: none; }

    #about .section-content li {
        display: flex;
        flex-direction: column;
        row-gap: 1rem;
        align-items: center;
    }

    #about .skill-title {
        font-size: 3em;
    }
    #about .section-content .skill-title-wrapper {
        justify-content: center;
    }

    #about .skill-cta {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        row-gap: 1rem;
        text-align: center;
    }

    #about .skill-display img {
        border-radius: var(--pad-s);
        width: 100%;
        height: auto;
        object-fit: cover;
        object-position: center;
    }
}

/* Desktops */
@media (min-width: 992px) {
    #about #stats ul {
        list-style-type: none;
        padding-left: 0;
        display: flex;
        justify-content: space-around;
        margin-bottom: calc(1.5 * var(--pad-h));
    }

    #about .stat {
        width: 15vw;
        display: grid;
        place-items: center;
        padding: calc(1.5 * var(--pad-m));
    }

    #about #stats ul li {
        text-align: center;
        margin-top: -1rem;
    }

    #about .stat-value {
        font-size: 4.5rem;
        line-height: 1.1;
    }

    #about .stat-label {
        font-size: 1.2rem;
        text-transform: uppercase;
    }

    #about .section-content li {
        display: grid;
        column-gap: 4rem;
        align-items: start;
    }
    #about .section-content li:nth-child(odd) {
        grid-template-columns: var(--info-w) 1fr;
        margin-right: calc(-1.5 * var(--pad-h));
    }
    #about .section-content li:nth-child(even) {
        grid-template-columns: 1fr var(--info-w);
        margin-left: calc(-1.5 * var(--pad-h));
    }

    #about .skill-title {
        font-size: 4em;
        margin: 0;
    }
    #about .section-content li:nth-child(even) .skill-title-wrapper {
        justify-content: end;
    }

    #about .skill-cta {
        display: flex;
        justify-content: center;
        align-items: center;
        column-gap: 1rem;
    }

    #about .skill-display img {
        border-radius: var(--pad-s);
        position: absolute;
        top: 0; left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }
}

#about .section-content li:not(:last-child) {
    margin-bottom: 3rem;
}

#about .skill-title-wrapper {
    display: flex;
    column-gap: 0.5rem;
}

#about .skill-cta:not(:last-child) {
    margin-bottom: 1rem;
}

#about .skill-display {
    border-radius: var(--pad-s);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border-color);
    position: relative;
    height: 100%;
}

.about-extra {
    margin-top: 3rem;
}

/* PROJECTS
   ------------- */
/* Mobiles / Tablets */
@media (max-width: 992px) {
    #projects .section-content {
        display: flex;
        flex-direction: column;
        row-gap: var(--pad-m);
    }

    #projects .item {
        position: relative;
        aspect-ratio: 1 / 1;
        border-radius: var(--pad-s);
        overflow: hidden;
    }

    #projects .item .bg {
        top: calc(-1 * var(--pad-s)) !important;
    }
    #projects .item:before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        background: -webkit-linear-gradient(-90deg, transparent 60%, var(--bg-color) 90%);
        z-index: 1;
    }
}

/* Desktops */
@media (min-width: 992px) {
    #projects .section-content {
        height: calc(10 * var(--column-width) / 16 - var(--margin));
        position: relative;
    }

    #projects .item {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        border-radius: var(--pad-s);
        display: grid;
        place-items: center;
    }
}

#projects .item .bg,
#projects .item .overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: var(--pad-s);
}

#projects .item {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border-color);
}

#projects .item .bg {
    object-fit: cover;
    object-position: center;
}

#projects .item .overlay {
    background-color: var(--overlay-color);
}

#projects .item .info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    row-gap: 1rem;
    z-index: 1;
}
#projects .item .info:before {
    --m: calc(-1 * var(--pad-b));
    content: '';
    position: absolute;
    left: 0;
    top: var(--m);
    width: 100%;
    height: calc(100% - var(--m));
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 75%, transparent);
    z-index: -1;
}

#projects .item .category {
    background-color: var(--primary-color);
    color: var(--dark-color);
    border-radius: 1024px;
    font-weight: 600;
    padding: var(--pad-s) var(--pad-m);
    font-size: 0.85rem;
    text-transform: uppercase;
    user-select: none;
}

#projects .item .project-title {
    color: var(--light-color);
    font-family: "BebasNeue";
    line-height: 1;
}

/* Mobiles / Tablets */
@media (max-width: 992px) {
    #projects .item .info {
        position: absolute;
        bottom: 0; left: 0;
        width: calc(100% - 2 * var(--pad-m));
        border-radius: 0 0 var(--pad-s) var(--pad-s);
        padding: var(--pad-m);
    }

    #projects .item .project-title {
        font-size: 2.5rem;
    }

    #projects .item .cta {
        position: absolute;
        width: max-content;
        text-align: center;
        top: var(--pad-s);
        left: 50%;
        z-index: 2;
        transform: translateX(-50%);
    }
}

/* Desktops */
@media (min-width: 992px) {
    #projects .item .info {
        position: absolute;
        bottom: 0; left: 0;
        width: calc(100% - 2 * var(--pad-h));
        border-radius: 0 0 var(--pad-s) var(--pad-s);
        padding: var(--pad-m) var(--pad-h) var(--pad-b) var(--pad-h);
    }
    #projects .item .info:before {
        --m: calc(-1 * var(--pad-b));
        content: '';
        position: absolute;
        left: 0;
        top: var(--m);
        width: 100%;
        height: calc(100% - var(--m));
        background: linear-gradient(0deg, rgba(0,0,0,0.5) 75%, transparent);
        z-index: -1;
    }

    #projects .project-title-wrapper {
        display: flex;
        column-gap: var(--pad-b);
        align-items: center;
        margin-top: var(--pad-m);
    }

    #projects .item .project-title {
        font-size: 4.5rem;
    }
}

#projects .item .project-content {
    color: var(--light-color);
    font-size: 1.05rem;
    line-height: 1.25;
}
#projects .item .project-content:not(:last-child) {
    margin-bottom: var(--pad-m);
}

/* ============
   FOOTER
 ============== */
#footer {
    position: relative;
    z-index: 800;
    background-color: var(--bg-color);
    color: var(--text-color);
    height: calc(0.5 * var(--header-h));
    padding: var(--pad-m);
    -moz-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    -webkit-box-shadow: 0 -10px 40px -10px var(--shadow-color);
    box-shadow: 0 -10px 40px -10px var(--shadow-color);
    display: grid;
    place-items: center;
}
