@font-face {
    font-family: Minecraft;
    src: url("./fonts/Minecraft.woff2") format("woff2");
    font-display: swap;
}

:root {
    --sidebar-width: 20%;
    --banner-height: 60vh;
    --accent: #c86432;
    --orange: #ffa500;
    --charcoal: #323232;
    font-family: Montserrat, Arial, sans-serif;
}

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

[hidden] {
    display: none !important;
}

html {
    scroll-behavior: smooth;
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    color: #111;
    background: #fff;
}

body:has(dialog[open]) {
    overflow: hidden;
}

button {
    font: inherit;
}

button, summary {
    cursor: pointer;
}

a {
    color: #94451f;
    text-underline-offset: .17em;
}

:focus-visible {
    outline: 3px solid #db783f;
    outline-offset: 4px;
}

main:focus {
    outline: none;
}

li {
    padding-bottom: .2em;
}

.skip-link {
    position: fixed;
    z-index: 20;
    top: .75rem;
    left: .75rem;
    padding: .55rem .8rem;
    background: white;
}

.skip-link:not(:focus) {
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.ui-icon {
    width: 1em;
    height: 1em;
    vertical-align: -.12em;
    flex: none;
    color: #fff;
}

#sidebar {
    position: fixed;
    z-index: 2;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    overflow-y: auto;
    color: white;
    background: var(--charcoal) url("./img/sidebar_background.webp");
    box-shadow: 4px 0 10px #0006;
    scrollbar-width: none;
}

#sidebar {
    display: flex;
    flex-direction: column;
}

#sidebar > .socials,
#sidebar > .sidebar-bottom {
    flex-shrink: 0;
}

#sidebar > .sidebar-bottom {
    margin-top: auto;
}

#sidebar .socials {
    padding: 1rem 0;
}

.avatar {
    text-align: center;
    margin: 1rem 2rem 0;
    padding-bottom: 1rem;
}

.avatar img {
    width: 50%;
    height: auto;
    border-radius: 20%;
}

.info-block {
    padding: 1rem;
}

.info-block h1 {
    color: white;
    font-size: 1.667rem;
    text-align: center;
    line-height: 1;
    padding-bottom: .25em;
}

.info-title {
    color: #a6b0b9;
    font-size: 1.083rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 1em;
    padding: .5em 0 1em;
}

.sidebar-bottom {
    padding: .2rem .8rem;
    color: white;
    font-size: .8rem;
    text-align: center;
}

.sidebar-bottom a {
    color: inherit;
}

.info-social .ui-icon:hover {
    color: #ffac76;
}

.info-social img.ui-icon:hover {
    filter: brightness(0) saturate(100%) invert(79%) sepia(39%) saturate(1046%) hue-rotate(320deg) brightness(103%) contrast(101%);
}

.info-social {
    display: flex;
    justify-content: center;
    padding: .75em 0;
}

.info-social-icon {
    position: relative;
    flex: 1;
    max-width: 3rem;
    text-align: center;
    font-size: 1.5rem;
}

.info-social-icon > :is(a, button) {
    display: inline-grid;
    place-items: center;
    width: 100%;
    min-height: 2.75rem;
    color: inherit;
    text-decoration: none;
    border: 0;
    background: none;
    padding: 0;
}

.tooltip {
    display: none;
    position: absolute;
    z-index: 3;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 10rem;
    border-radius: .35rem;
    background: #171717;
    padding: .35rem .5rem;
    color: white;
    font-size: .8rem;
    pointer-events: none;
}

.info-social-icon:focus-within .tooltip, .info-social-icon:hover .tooltip, .tooltip[data-announced] {
    display: block;
}

.icon-discord {
    --icon-mask: url("./img/logos/discord_mark_white.svg");
}

#sidebar :is(.icon-github, .icon-discord) {
    display: inline-block;
    background-color: currentColor;
    mask: var(--icon-mask) center / contain no-repeat;
}

#sidebar .info-social .ui-icon:hover {
    color: #ffac76;
}

#sidebar .ui-icon.icon-github {
    mask: url("./img/logos/github_mark_white.svg") center / contain no-repeat;
}

.info-social-icon > :is(a, button):hover,
.info-link-name > :is(a, button):hover {
    color: #ffac76;
}

.info-link {
    display: flex;
    align-items: center;
    min-height: 3.55rem;
    padding: .75em 0;
}

.info-link-icon {
    font-size: 1.2rem;
    width: 1.75em;
    text-align: center;
}

.info-link-name {
    margin-left: 1rem;
    font-weight: 500;
}

.info-link-name > :is(a, button) {
    font-size: 1.083rem;
    color: inherit;
    text-decoration: none;
    text-align: left;
    background: none;
    border: 0;
    padding: 0;
}

.submenu {
    margin-left: 2rem;
    padding-left: .75rem;
    border-left: 1px solid #fff8;
}

.submenu .info-link {
    min-height: 2.6rem;
    padding: .5rem 0;
}

#sidebar .info-link {
    position: relative;
    isolation: isolate;
}

#sidebar .info-link:has(a[aria-current="location"])::before {
    content: "";
    position: absolute;
    inset: .4rem 0;
    z-index: -1;
    background: rgb(255 172 118 / 12%);
    box-shadow: inset 3px 0 #ffac76;
    border-radius: 0 .35rem .35rem 0;
    pointer-events: none;
}

#sidebar a[aria-current="location"] {
    color: #ffac76;
}

#sidebar .info-link:has(.info-link-name > :is(a, button):hover) .ui-icon,
#sidebar .info-link:has(.info-link-name > :is(a, button):focus-visible) .ui-icon,
#sidebar .info-link:has(a[aria-current="location"]) .ui-icon {
    color: #ffac76;
}

#sidebar .ui-icon {
    transition: color 160ms ease;
}

#sidebar .info-link-name > :is(a, button) {
    transition: color 160ms ease;
}

.slideshow-bg {
    position: fixed;
    z-index: -1;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: var(--banner-height);
    overflow: hidden;
    background: #d8dae0;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

body:has(.slideshow-bg) {
    background: transparent;
}

body:has(.slideshow-bg) > main {
    position: relative;
    margin-top: var(--banner-height);
    margin-left: var(--sidebar-width);
    background: white;
}

.container-wave, .container-footer-wave {
    background-size: 100vw auto;
    background-repeat: no-repeat;
    background-position: left top;
    height: 2.5rem;
}

.container-wave {
    background-image: url("./img/header_wave.svg");
    transform: translateY(-100%);
}

.container-footer-wave {
    background-image: url("./img/footer_wave.svg");
}

.container-footer {
    background: var(--charcoal);
    height: 6.25rem;
}

.container section {
    padding: 3.125rem;
}

.container section > h3 {
    font-size: 1rem;
}

.container section > p {
    max-inline-size: 105ch;
    line-height: 1.55;
}

.container-title {
    position: relative;
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    margin: .67em 0;
}

.container-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 10%;
    width: 80%;
    height: 2.5px;
    background: var(--accent);
}

.minecraft-wordmark {
    font-family: Minecraft, Montserrat, sans-serif;
    font-size: .75em;
}

.experience-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0 1.25rem;
}

.experience-column {
    counter-reset: experience;
}

.experience-item {
    position: relative;
    isolation: isolate;
    counter-increment: experience;
    margin-inline-start: .4rem;
    padding-inline-start: 1.4rem;
    padding-block-end: 1.75rem;
    background: linear-gradient(#ecd3c1, #ecd3c1) left top / 2px 100% no-repeat;
}

.experience-item:last-child {
    padding-block-end: 0;
    background-size: 2px .65rem;
}

.experience-item::after {
    content: "";
    position: absolute;
    top: .65rem;
    left: 1px;
    transform: translate(-50%, -50%);
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px white;
    pointer-events: none;
}

.experience-item::before {
    content: "#" counter(experience);
    position: absolute;
    top: 0.1em;
    right: 0.1em;
    z-index: -1;
    font-style: italic;
    font-size: clamp(10rem, 15vw, 15rem);
    font-weight: 800;
    line-height: 1;
    color: rgb(200 100 50 / 9%);
    pointer-events: none;
    user-select: none;
}

.experience-column .experience-title {
    font-size: 1.625rem;
    margin: 1.25rem 0;
}

.experience-item h4 {
    font-size: 1rem;
    margin: 0 0 1em;
}

.role-date {
    display: inline-block;
    margin: 0;
    padding: .3rem;
    font-weight: 600;
    background: rgba(255, 85, 0, 0.4);;
}

.previous-date {
    margin: 1.25rem 0 0;
    padding: .3rem;
    font-size: .8rem;
}

.experience-item li {
    padding-right: .65rem;
}

.project-examples {
    display: flex;
    align-items: stretch;
    gap: .65rem;
    padding: .35rem .35rem 1.25rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    --project-edge-fade: 8px;
    mask-image: linear-gradient(to right, transparent, #000 var(--project-edge-fade), #000 calc(100% - var(--project-edge-fade)), transparent),
    linear-gradient(#000, #000);
    mask-size: 100% 100%, 100% .9rem;
    mask-position: center, bottom;
    mask-repeat: no-repeat;
}

.project-example {
    position: relative;
    flex: 0 0 12.5rem;
    min-height: 10.9rem;
    padding-bottom: .5rem;
    background: #f0f0f0;
    box-shadow: 5px 5px 5px #0008;
    text-align: center;
    transition: transform .1s ease;
}

.project-example:hover {
    transform: translateY(-4px);
}

.project-example > img {
    display: block;
    width: 100%;
    height: 6.55rem;
    object-fit: cover;
}

.project-example p {
    min-height: 1.25rem;
    margin: 0 .3rem;
}

.project-example :is(.icon,.icon-L) {
    position: absolute;
    top: .3rem;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--badge) center/contain no-repeat;
}

.project-example .icon {
    right: .3rem;
}

.project-example .icon-L {
    left: .3rem;
}

.project-row-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-block: 1rem .5rem;
}

.project-row-toolbar h3 {
    margin: 0;
    font-size: 1rem;
}

.project-row-controls {
    display: flex;
    gap: .4rem;
}

.project-row-controls button {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 1px solid #ecd3c1;
    border-radius: 50%;
    background: #fff;
    color: #94451f;
    font-size: 1.5rem;
    line-height: 1;
}

.project-row-controls button:not(:disabled):hover {
    background: #f8ede5;
}

.project-row-controls button:disabled {
    opacity: .4;
    cursor: default;
}

.project-example a.more::after {
    content: "";
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.badge-rblx {
    --badge: url("./img/logos/rblx_mark.webp");
}

.badge-mc {
    --badge: url("./img/logos/mc_mark.svg");
}

.badge-disc {
    --badge: url("./img/logos/discord_mark_white.svg");
    background-color: #5865f2 !important;
    border-radius: 60%;
    background-size: 70% !important;
    background-position: center !important;
}

.badge-ts {
    --badge: url("./img/logos/ts_mark.svg");
}

.badge-html {
    --badge: url("./img/logos/html_mark.svg");
}

.badge-php {
    --badge: url("./img/logos/php_mark.svg");
}

.badge-cassandra {
    --badge: url("./img/logos/cassandra_mark.svg");
}

.badge-github {
    --badge: url("./img/logos/github_mark.svg");
}

.more {
    display: inline-block;
    margin-top: .6rem;
    width: 60%;
    padding: .18rem .5rem;
    border-radius: 100px;
    background: var(--orange);
    box-shadow: 0 5px #0001;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1.125rem;
    font-weight: 650;
}

a.more:hover {
    background: #f77325;
}

.more.unavailable {
    background: #757575;
}

.standalone {
    width: min(70rem, 100%);
    margin: auto;
    padding: 1rem;
}

.project-back {
    display: inline-block;
    margin-bottom: .75rem;
}

.project-loading {
    padding: 1rem 1.5rem;
}

.repository-list {
    list-style: none;
    padding: 0;
    max-inline-size: 105ch;
}

.repository-entry {
    position: relative;
    isolation: isolate;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.repository-entry h3,
.repository-entry p {
    margin: 0;
}

.repository-entry p {
    margin-top: .2rem;
    line-height: 1.5;
}

.repository-entry a {
    font-weight: 650;
}

.repository-commits {
    list-style: none;
    margin: .9rem 0 0 .4rem;
    padding: 0;
}

.repository-commits > li {
    position: relative;
    padding: 0 0 .85rem 1.25rem;
    background: linear-gradient(#ecd3c1, #ecd3c1) left top / 2px 100% no-repeat;
}

.repository-commits > li:last-child {
    padding-bottom: 0;
    background-size: 2px .6rem;
}

.repository-commits > li::before {
    content: "";
    position: absolute;
    top: .6rem;
    left: 1px;
    transform: translate(-50%, -50%);
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px white;
}

.repository-commits > li a {
    font-style: italic;
    text-decoration: none;
}

.repository-commits {
    counter-reset: contribution;
}

.repository-commits > li {
    counter-increment: contribution;
    isolation: isolate;
}

.repository-commits > li::after {
    content: "#" counter(contribution);
    position: absolute;
    inset-block-start: -.1em;
    inset-inline-end: .15em;
    z-index: -1;
    color: rgb(200 100 50 / 9%);
    font-size: 3.5rem;
    font-style: italic;
    font-weight: 800;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

dialog {
    max-height: 90dvh;
    max-width: calc(100% - 1.5rem);
    padding: 0;
    border: 0;
    color: #222;
    background: white;
    box-shadow: 0 0 80px #0004;
}

dialog::backdrop {
    background: #0002;
}

.project-dialog {
    width: 70%;
    height: 70%;
}

.dialog-tools {
    position: sticky;
    top: 0;
    z-index: 1;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    padding: .2rem .55rem;
    background: #fffe;
}

.dialog-tools button {
    display: grid;
    place-items: center;
    min-width: 2.5rem;
    min-height: 2.5rem;
    background: transparent;
    border: 0;
    color: #777;
    font-size: 1.4rem;
}

.dialog-tools button:hover {
    color: #222;
    background: #f1f1f1;
}

.project-popup-topbar-container {
    text-align: center;
    padding: .65rem 1rem 1.2rem;
}

.project-popup-topbar-container h1 {
    font-size: clamp(1.65rem, 4vw, 2.5rem);
    margin: .25em 0;
}

.project-popup-topbar-container p {
    margin: .6rem 0;
    color: #53596a;
}

.tags {
    display: flex;
    gap: .45rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tags span {
    border: 1px solid #b2b7be;
    padding: .17rem .48rem;
    border-radius: .35rem;
    font-size: .875rem;
}

.project-popup-mid {
    margin: 0 clamp(1.25rem, 6vw, 5rem) .65rem;
    border-top: 2px solid #f5f5f5;
}

.project-popup-mid-desc {
    display: flow-root;
    padding-block: 1.5rem;
    border-bottom: 2px solid #f5f5f5;
    color: #4e576f;
    line-height: 1.55;
}

.project-popup-mid-desc img, .project-popup-mid-desc video {
    display: block;
    max-width: 100%;
    height: auto;
    margin-block: .55rem;
}

.image-wrapper {
    width: 47%;
    margin-bottom: .85rem;
}

.image-wrapper.right {
    float: right;
    margin-left: 1.35rem;
}

.image-wrapper.left {
    float: left;
    margin-right: 1.35rem;
}

.image-wrapper.xl {
    width: 58%;
}

.image-caption {
    font-size: .85rem;
}

.video-link {
    display: block;
    margin-bottom: .55rem;
}

a.video-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: #202124;
    color: #fff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
}

a.video-link::before {
    content: "";
    width: 3.5rem;
    height: 2.4rem;
    border-radius: 0.55rem;
    clip-path: none;
    background: #c81919 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9 5v14l11-7z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 1.5rem;
}

a.video-link:is(:hover, :focus-visible) {
    background-color: #303136;
    color: #fff;
}

.youtube-player {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 0.5rem;
}

.access {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.25rem clamp(1.25rem, 6vw, 5rem);
    padding: .8rem 1rem;
    background: #f6f6f6;
}

.access img {
    width: 2.5rem;
}

.access h3 {
    margin: 0 0 .2rem;
    font-size: 1rem;
}

.lightbox {
    width: min(70rem, 95vw);
}

.lightbox::backdrop {
    background: #000b;
}

.lightbox img {
    display: block;
    margin: auto;
    max-width: 100%;
    max-height: 72dvh;
    object-fit: contain;
}

.lightbox figcaption {
    padding: .65rem 1rem;
    text-align: center;
}

.lightbox figure {
    margin: 0;
}

.inventory-demo {
    margin-block: .75rem;
}

.small-button {
    padding: .45rem .7rem;
    background: #f4ede7;
    color: #222;
    border: 1px solid #cfa185;
    border-radius: .25rem;
}

.inventory-board {
    position: relative;
    max-width: 28rem;
    padding: .8rem;
    background: #c6c6c6;
    border-radius: .4rem;
    color: #151515;
    border: 3px solid #eee;
    box-shadow: 0 3px 0 #777;
}

.inventory-board h3 {
    margin: 0 0 .6rem;
    font-family: Minecraft, sans-serif;
    font-size: 1rem;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 2px;
}

.inventory-grid > * {
    display: grid;
    place-items: center;
    position: relative;
    min-width: 0;
    aspect-ratio: 1;
    padding: 0;
    background: #8b8b8b;
    border: 2px inset #e6e6e6;
}

.inventory-grid > :has(> img):is(:hover, :focus-visible)::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgb(255 255 255 / 22%);
    pointer-events: none;
}

.inventory-grid img {
    width: 90%;
    height: 90%;
    margin: 0;
    image-rendering: pixelated;
}

.inventory-grid img[src$="_stained_glass_pane.png"] {
    width: 100%;
    height: 100%;
}

.inventory-grid small {
    position: absolute;
    bottom: 0;
    right: 1px;
    color: #fff;
    font-weight: bold;
    text-shadow: 1px 1px #000;
}

.inventory-info {
    min-height: 3rem;
    white-space: pre-line;
}

.inventory-tooltip {
    position: absolute;
    z-index: 2;
    width: max-content;
    padding: 0.35rem 0.5rem;
    border: 2px solid #391174;
    background: #100010f5;
    color: #fff;
    font: 0.875rem/1.35 Minecraft, monospace;
    text-shadow: 1px 1px #000;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    pointer-events: none;
}

.inventory-tooltip > div {
    min-height: 1.35em;
}

.floating-actions > * {
    position: fixed;
    z-index: 3;
    bottom: 1.25rem;
    display: grid;
    place-items: center;
    width: 3.125rem;
    height: 3.125rem;
    border: 0;
    border-radius: 50%;
    color: #241500;
    background: var(--orange);
    font-size: 1.125rem;
}

.floating-actions > *:hover {
    background: #f77325;
}

#mobileMenu {
    left: 1.25rem;
    display: none;
}

#back-to-top {
    right: 1.25rem;
    visibility: hidden;
}

#back-to-top.show {
    visibility: visible;
}

@media (max-width: 1150px) {
    :root {
        --sidebar-width: 0px;
    }

    .js #sidebar {
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform .25s ease, visibility .25s;
    }

    .js #sidebar.mobileOpen {
        visibility: visible;
        transform: none;
    }

    #sidebar {
        width: min(15.625rem, 85vw);
        padding-bottom: 4.75rem;
    }

    html:not(.js) #sidebar {
        position: relative;
        width: 100%;
    }

    .js #mobileMenu {
        display: grid;
    }

    .container section {
        padding-inline: clamp(.75rem, 2vw, 1.75rem);
    }

    .experience-container {
        grid-template-columns: 1fr;
        padding-inline: .6rem;
    }

    .project-dialog {
        width: 88%;
    }
}

@media (max-width: 650px) {
    .project-dialog {
        width: calc(100% - 1rem);
        height: 88dvh;
    }

    .image-wrapper:is(.left,.right,.xl) {
        float: none;
        width: 100%;
        margin-inline: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        transition: none !important;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .project-dialog[open] {
        animation: project-open 300ms ease-out both;
    }
}

@keyframes project-open {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .standalone:has(> #project-content) {
        animation: project-page-enter 220ms ease-out both;
    }
}

@keyframes project-page-enter {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    body:has(.slideshow-bg) > #main-page {
        animation: portfolio-enter 180ms ease-out both;
    }
}

@keyframes portfolio-enter {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}
