/* =========================
   FONTS
========================= */
@font-face {
    font-family: 'pix';
    src: url('../fonts/retro.ttf') format('truetype');
}

@font-face {
    font-family: 'ret';
    src: url('../fonts/Pixeled.ttf') format('truetype');
}

/* =========================
   RESET
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --nav-height: 51px;
    --page-gutter: clamp(14px, 4vw, 40px);
    --section-padding-block: clamp(24px, 7vh, 80px);
    --content-width: min(100%, 1200px);
    --panel-height: calc(100svh - var(--nav-height));
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
    scroll-snap-type: none;
}

body {
    position: relative;
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: url("../IMG/night.png") no-repeat center center fixed;
    background-size: cover;
    font-size: 16px;
    overflow-x: hidden;
    color: white;
    min-width: 280px;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(10, 16, 28, 0.64);
    pointer-events: none;
    z-index: 0;
}

body > * {
    position: relative;
    z-index: 1;
}

body.section-mode {
    height: 100svh;
    overflow: hidden;
}

/* =========================
   HEADER & NAVIGATION
========================= */
header {
    background: #fff;
    text-align: center;
    padding: 10px 0;
}

nav {
    font-family: 'pix', sans-serif;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    background: rgba(20, 20, 20, 0.96);
    border-bottom: 2px solid rgba(67, 211, 255, 0.82);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.7), 0 0 0 6px rgba(67, 211, 255, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-inline: clamp(12px, 3vw, 34px);
    z-index: 1000;
    letter-spacing: 0.04em;
}

.nav-logo {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 6px 0;
    border: 2px solid transparent;
    margin-left: 5%;
}

.nav-logo img {
    display: block;
    width: clamp(94px, 14.9vw, 160px);
    height: auto;
    image-rendering: pixelated;
}

.nav-links {
    display: flex;
    justify-content: flex-end;
    align-items: stretch;
    flex-wrap: wrap;
    gap: clamp(6px, 0.6vw, 10px);
}

.nav-links a {
    color: #f4e3bf;
    text-decoration: none;
    padding: clamp(10px, 1.6vw, 15px) clamp(10px, 2.7vw, 25px);
    border: 2px solid rgba(255, 212, 172, 0.55);
    background: rgba(255, 255, 255, 0.04);
    font-size: clamp(0.62rem, 1.15vw, 1rem);
    line-height: 1.2;
    text-transform: uppercase;
    text-align: center;
    transition: 0.2s ease;
    overflow-wrap: anywhere;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
    border-radius: 0;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-inline: 1px;
}

.nav-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: clamp(74px, 9vw, 110px);
}

.nav-btn img {
    width: clamp(20px, 2.3vw, 28px);
    height: auto;
    image-rendering: pixelated;
    display: block;
}

.nav-btn span {
    display: block;
    font-size: clamp(0.42rem, 0.8vw, 0.7rem);
    line-height: 1.1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-links a:hover:not(.nav-active),
.nav-links a:focus-visible:not(.nav-active) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 212, 172, 0.85);
    color: #f3ba00;
}

.nav-links a.nav-active {
    background: #d9b76e;
    border: 2px solid rgba(255, 212, 172, 0.9);
    color: #1f1f1f;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18), 0 0 0 2px rgba(255, 212, 172, 0.18);
}

/* =========================
   SECTIONS
========================= */
section {
    width: var(--content-width);
    height: var(--panel-height);
    min-height: calc(100vh - var(--nav-height));
    padding: var(--section-padding-block) var(--page-gutter);
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'pix', sans-serif;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden auto;
    scrollbar-gutter: stable;
}

body.section-mode section {
    position: fixed;
    top: var(--nav-height);
    left: 50%;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

body.section-mode section.section-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%);
    z-index: 2;
}

body.section-mode section.section-before {
    transform: translateX(-50%) translateX(-16%);
}

body.section-mode section.section-after {
    transform: translateX(-50%) translateX(16%);
}

/* =========================
   HEADINGS
========================= */
h1 {
    text-align: center;
    color: gold;
    font-size: clamp(1.75rem, 7vw, 3.25rem);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

h2 {
    position: static;
    top: auto;
    z-index: 1;
    text-align: center;
    font-size: clamp(1.25rem, 5vw, 2.5rem);
    color: #333;
    margin-bottom: clamp(28px, 6vh, 56px);
    padding-block: 4px;
    overflow-wrap: anywhere;
}

p {
    font-size: clamp(0.82rem, 2vw, 1.125rem);
    margin-bottom: clamp(10px, 2.5vh, 20px);
    overflow-wrap: anywhere;
}

#info p,
#info #pinf {
    text-align: left;
}

/* =========================
   INFO SECTION
========================= */
#info {
    background: rgba(18, 26, 38, 0.72);
    border: 2px solid rgba(103, 175, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: var(--section-padding-block) var(--page-gutter);
    align-items: center;
    text-align: center;
}

#ih2 {
    color: white;
    text-shadow: 2px 2px 4px rgba(255, 212, 172, 0.7);
    text-align: center;
    width: 100%;
}

#pinf {
    color: rgb(255, 212, 172);
    text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
    width: min(78ch, 100%);
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

/* =========================
   SKILLS
========================= */
#skills {
    background: rgba(18, 26, 38, 0.72);
    border: 2px solid rgba(103, 175, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #fff;
    padding: var(--section-padding-block) var(--page-gutter);
    align-items: center;
    text-align: center;
}

.skill-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(12px, 4vw, 24px);
    width: 100%;
}

.skill-item {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(76px, 16vw, 140px);
    aspect-ratio: 1;
    outline: none;
}

.skill-item img {
    width: clamp(56px, 14vw, 120px);
    height: auto;
    image-rendering: pixelated;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.skill-item span {
    position: absolute;
    left: 50%;
    bottom: -34px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.82);
    border: 2px solid rgba(255, 212, 172, 0.9);
    color: rgb(255, 212, 172);
    font-size: clamp(0.65rem, 1.3vw, 0.9rem);
    line-height: 1.2;
    padding: 7px 10px;
    pointer-events: none;
    text-shadow: none;
    transform: translate(-50%, 8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.skill-item:hover img,
.skill-item:focus-visible img {
    transform: scale(1.18) translateY(-4px);
}

.skill-item:hover span,
.skill-item:focus-visible span {
    opacity: 1;
    transform: translate(-50%, 0);
}

#pskill {
    font-size: clamp(14px, 2vw, 18px);
    color: rgb(255, 212, 172);
    text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
    text-align: center;
}

.skill-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: clamp(120px, 30vh, 220px);
    margin-top: clamp(16px, 4vh, 32px);
    padding: clamp(12px, 3vh, 20px);
}

#skill-name {
    font-family: 'pix', sans-serif;
    font-size: clamp(1.2rem, 5vw, 2rem);
    color: rgb(255, 212, 172);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    text-align: center;
    margin: 0 0 16px 0;
    min-height: 1.2em;
    line-height: 1.2;
    transition: opacity 0.3s ease;
    opacity: 0;
    order: 1;
}

#skill-name:not(:empty) {
    opacity: 1;
}

#skill-meaning {
    font-family: 'pix', sans-serif;
    font-size: clamp(0.7rem, 2vw, 1rem);
    color: rgba(255, 212, 172, 0.85);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    text-align: center;
    margin: 0;
    line-height: 1.5;
    max-width: 90%;
    transition: opacity 0.3s ease;
    opacity: 0;
    order: 2;
}

#skill-meaning:not(:empty) {
    opacity: 1;
}


/* =========================
   CONTACT
========================= */
#contact {
    background: rgba(18, 26, 38, 0.72);
    border: 2px solid rgba(103, 175, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: var(--section-padding-block) var(--page-gutter);
    align-items: center;
    text-align: center;
}

.contact-intro {
    margin: 0 auto 24px;
    max-width: 760px;
    font-family: 'pix', sans-serif;
    font-size: clamp(0.75rem, 1.3vw, 1.2rem);
    color: #f4e3bf;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
}

.contact-section {
    display: grid;
    grid-template-columns: repeat(4, minmax(104px, 128px));
    justify-content: center;
    justify-items: center;
    align-items: center;
    gap: clamp(18px, 4vw, 34px);
    margin-inline: auto;
    max-width: 760px;
    width: 100%;
}

.contact-item {
    position: relative;
    display: grid;
    place-items: center;
    width: clamp(104px, 12vw, 128px);
    min-height: clamp(112px, 16vw, 150px);
    text-decoration: none;
    outline: none;
}

.contact-item img {
    width: clamp(76px, 9vw, 104px);
    height: clamp(76px, 9vw, 104px);
    object-fit: contain;
    image-rendering: pixelated;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.contact-item span {
    position: absolute;
    left: 50%;
    bottom: -30px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.82);
    border: 2px solid rgba(255, 255, 255, 0.75);
    color: white;
    font-size: clamp(0.7rem, 1.25vw, 0.95rem);
    line-height: 1.2;
    padding: 7px 10px;
    pointer-events: none;
    transform: translate(-50%, 8px);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.contact-item:hover img,
.contact-item:focus-visible img {
    transform: scale(1.18) translateY(-5px);
}

.contact-item:hover span,
.contact-item:focus-visible span {
    opacity: 1;
    transform: translate(-50%, 0);
}
/* =========================
   CREATIONS
========================= */
#creations {
    background: rgba(18, 26, 38, 0.72);
    border: 2px solid rgba(103, 175, 255, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: var(--section-padding-block) var(--page-gutter);
    text-align: center;
    align-items: center;
}

.creations-layout {
    display: grid;
    gap: clamp(18px, 4vh, 34px);
    width: 100%;
    max-width: 1050px;
}

.artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2.8vw, 28px);
    width: 100%;
    max-width: 1000px;
    align-items: stretch;
}

.artwork-card {
    background: rgba(12, 12, 12, 0.78);
    border: 2px solid rgba(172, 147, 98, 0.9);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.artwork-media {
    position: relative;
    background: #111;
    overflow: hidden;
}

.artwork-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.18);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.artwork-media > img {
    display: block;
    width: 100%;
    height: clamp(170px, 28vh, 300px);
    object-fit: cover;
    transition: filter 0.25s ease, transform 0.25s ease;
}

.artwork-card-tall .artwork-media > img {
    object-position: center top;
}

.artwork-card:hover .artwork-media > img,
.artwork-card:focus-within .artwork-media > img {
    filter: brightness(1.2);
    transform: none;
}

.artwork-card:hover .artwork-media::after,
.artwork-card:focus-within .artwork-media::after {
    opacity: 1;
}

.fullscreen-button,
.exit-fullscreen-button {
    position: absolute;
    z-index: 2;
    border: 2px solid rgba(255, 212, 172, 0.95);
    background: rgba(0, 0, 0, 0.78);
    cursor: pointer;
    width: 48px;
    height: 48px;
    padding: 8px;
    opacity: 0;
    display: grid;
    place-items: center;
    transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.fullscreen-button {
    right: 12px;
    bottom: 12px;
    transform: translateY(8px);
}

.exit-fullscreen-button {
    right: 18px;
    top: 18px;
    display: none;
    transform: translateY(-8px);
}

.fullscreen-button img,
.exit-fullscreen-button img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.artwork-card:hover .fullscreen-button,
.artwork-card:focus-within .fullscreen-button {
    opacity: 1;
    transform: translateY(0);
}

.fullscreen-button:hover,
.fullscreen-button:focus-visible,
.exit-fullscreen-button:hover,
.exit-fullscreen-button:focus-visible {
    background: #AC9362;
    outline: none;
}

.artwork-media:fullscreen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #050505;
}

.artwork-media:fullscreen > img {
    width: auto;
    height: auto;
    max-width: 96vw;
    max-height: 96vh;
    object-fit: contain;
    transform: none;
    filter: none;
}

.artwork-media:fullscreen .fullscreen-button {
    display: none;
}

.artwork-media:fullscreen .exit-fullscreen-button {
    display: grid;
    opacity: 1;
    transform: translateY(0);
}

.artwork-card figcaption {
    color: rgb(255, 212, 172);
    background: rgba(0, 0, 0, 0.6);
    border-top: 2px solid rgba(172, 147, 98, 0.75);
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    line-height: 1.4;
    padding: clamp(10px, 2vw, 14px);
    text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
    text-align: center;
}

.code-creation {
    background: rgba(12, 12, 12, 0.78);
    border: 2px solid rgba(172, 147, 98, 0.9);
    padding: clamp(14px, 2.5vw, 22px);
    text-align: left;
}

.code-creation h3 {
    color: rgb(255, 212, 172);
    font-size: clamp(1rem, 2vw, 1.35rem);
    margin-bottom: 14px;
    text-align: center;
}

.code-creation-content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(180px, 0.9fr);
    gap: clamp(12px, 2.5vw, 20px);
    align-items: stretch;
}

.code-creation pre,
.screenshot-placeholder {
    min-height: clamp(150px, 22vh, 230px);
}

.code-creation pre {
    background: #080808;
    border: 2px solid rgba(255, 212, 172, 0.35);
    color: #f3ba00;
    font-family: Consolas, "Courier New", monospace;
    font-size: clamp(0.72rem, 1.25vw, 0.95rem);
    line-height: 1.5;
    margin: 0;
    overflow: auto;
    padding: 14px;
    white-space: pre;
}

.screenshot-placeholder {
    border: 2px dashed rgba(255, 212, 172, 0.65);
    color: rgba(255, 212, 172, 0.85);
    display: grid;
    font-size: clamp(0.8rem, 1.4vw, 1rem);
    place-items: center;
    text-align: center;
}
/* =========================
   FOOTER
========================= */
footer {
    background: rgba(0, 0, 0, 0.9);
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    padding: 15px 0;
    scroll-snap-align: end;
}

body.section-mode footer {
    display: none;
}

/* =========================
   RESPONSIVE BREAKPOINTS
========================= */

/* Tablets */
@media (max-width: 992px) {
    nav {
        padding-inline: 14px;
    }

    .nav-links a {
        padding: 12px 18px;
    }

    .artwork-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .artwork-card-wide {
        grid-column: 1 / -1;
    }

    .code-creation-content {
        grid-template-columns: 1fr;
    }

    .contact-section {
        grid-template-columns: repeat(2, minmax(104px, 128px));
        max-width: 420px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    body {
        background-image: url("../IMG/moonriver.png");
        background-position: center center;
        background-size: cover;
        min-height: 100svh;
    }

    body::before {
        background: rgba(17, 17, 17, 0.42);
    }

    nav {
        position: fixed;
        top: auto;
        left: 50%;
        right: auto;
        bottom: max(10px, env(safe-area-inset-bottom));
        transform: translateX(-50%);
        width: min(88vw, 390px);
        height: auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 8px;
        padding: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
        z-index: 1100;
        min-height: 0;
        image-rendering: pixelated;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav.nav-hidden {
        transform: translateX(-50%);
        top: auto;
        bottom: max(10px, env(safe-area-inset-bottom));
    }

    .nav-logo {
        display: none;
    }

    .nav-links {
        flex: 1 1 auto;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 6px;
        min-width: 0;
        padding: 0 2px;
    }

    .nav-links a {
        flex: 1 1 0;
        min-width: 0;
        width: auto;
        text-align: center;
        background: rgba(20, 20, 20, 0.96);
        border: 2px solid rgba(255, 212, 172, 0.55);
        border-radius: 0;
        padding: 10px 6px;
        font-size: clamp(9.5px, 2.9vw, 12px);
        line-height: 1.1;
        white-space: nowrap;
        letter-spacing: 0.08em;
        color: #f4e3bf;
        transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
        font-family: 'pix', sans-serif;
        box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }

    .nav-btn {
        min-width: 0;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .nav-btn img {
        width: clamp(18px, 5vw, 24px);
    }

    .nav-btn span {
        font-size: clamp(7px, 2.2vw, 10px);
    }

    .nav-links a:active {
        transform: scale(0.96);
    }

    .nav-links a:hover,
    .nav-links a.nav-active {
        background: rgba(217, 183, 110, 0.96);
        border-color: rgba(255, 212, 172, 0.9);
        color: #1e1e1e;
        box-shadow: inset 0 0 0 2px rgba(0,0,0,0.18), 0 0 0 2px rgba(255, 212, 172, 0.2);
    }

    section {
        width: min(94vw, 560px);
        height: auto;
        min-height: calc(100svh - var(--nav-height));
        justify-content: flex-start;
        padding: 28px 12px 100px;
        margin: 0 auto;
    }

    #info,
    #skills,
    #contact,
    #creations {
        background: rgba(30, 30, 30, 0.52);
        border-radius: 8px;
    }

    #info,
    #skills,
    #contact,
    #creations,
    .creations-layout {
        width: 100%;
    }

    #info {
        align-items: center;
        gap: 12px;
    }

    #ih2 {
        margin-bottom: 10px;
    }

    #pinf {
        width: 100%;
        max-width: 100%;
        font-size: clamp(0.8rem, 3vw, 1rem);
        line-height: 1.6;
        margin: 0 0 10px;
    }

    .artwork-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 380px;
    }

    .contact-section {
        grid-template-columns: repeat(2, minmax(92px, 112px));
        gap: 28px 18px;
        max-width: 320px;
    }

    .contact-item {
        width: clamp(92px, 28vw, 112px);
        min-height: 104px;
    }

    .contact-item img {
        width: clamp(62px, 20vw, 86px);
        height: clamp(62px, 20vw, 86px);
    }

    .contact-item span {
        bottom: -24px;
        font-size: 0.7rem;
        padding: 6px 8px;
    }

    .skill-icons {
        display: grid;
        grid-template-columns: repeat(2, minmax(92px, 112px));
        justify-content: center;
        justify-items: center;
        align-items: center;
        gap: 28px 18px;
        width: 100%;
        max-width: 320px;
    }

    .skill-item {
        position: relative;
        display: grid;
        place-items: center;
        width: clamp(92px, 28vw, 112px);
        min-height: 104px;
        padding: 0;
        background: transparent;
        border: none;
        text-align: center;
        outline: none;
    }

    .skill-item img {
        width: clamp(62px, 20vw, 86px);
        height: clamp(62px, 20vw, 86px);
        object-fit: contain;
        image-rendering: pixelated;
        justify-self: center;
        transform: none;
        display: block;
        transition: filter 0.2s ease, transform 0.2s ease;
    }

    .skill-item span {
        position: absolute;
        left: 50%;
        bottom: -24px;
        z-index: 2;
        background: rgba(0, 0, 0, 0.82);
        border: 2px solid rgba(255, 212, 172, 0.9);
        color: rgb(255, 212, 172);
        font-size: 0.7rem;
        line-height: 1.2;
        padding: 6px 8px;
        pointer-events: none;
        transform: translate(-50%, 8px);
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        white-space: nowrap;
        text-align: center;
    }

    .skill-item:hover img,
    .skill-item:focus-visible img,
    .skill-item:focus img {
        transform: scale(1.1) translateY(-3px);
    }

    .skill-item:hover span,
    .skill-item:focus-visible span,
    .skill-item:focus span {
        opacity: 1;
        transform: translate(-50%, 0);
    }

    .skill-display {
        height: clamp(100px, 25vh, 160px);
        margin-top: 12px;
    }

    #skill-name {
        font-size: clamp(1rem, 4.5vw, 1.5rem);
    }

    #creations {
        justify-content: flex-start;
    }

    #creations h2 {
        margin-bottom: 16px;
    }

    .creations-layout {
        gap: 14px;
    }

    .artwork-media > img {
        height: clamp(115px, 22vh, 165px);
    }

    .artwork-card-tall .artwork-media > img {
        object-position: center 18%;
    }

    .artwork-card:hover .artwork-media > img,
    .artwork-card:focus-within .artwork-media > img {
        filter: none;
        transform: none;
    }

    .artwork-card:hover .artwork-media::after,
    .artwork-card:focus-within .artwork-media::after {
        opacity: 0;
    }

    .fullscreen-button {
        right: 8px;
        bottom: 8px;
        width: 42px;
        height: 42px;
        padding: 7px;
        opacity: 1;
        transform: none;
    }

    .exit-fullscreen-button {
        right: 12px;
        top: 12px;
        width: 42px;
        height: 42px;
        padding: 7px;
    }

    .artwork-card figcaption {
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .code-creation {
        padding: 12px;
    }

    .code-creation h3 {
        margin-bottom: 10px;
    }

    .code-creation-content {
        gap: 10px;
    }

    .code-creation pre,
    .screenshot-placeholder {
        min-height: 120px;
    }

    .code-creation pre {
        font-size: 0.7rem;
        padding: 10px;
    }

    body.section-mode section {
        left: 50%;
        right: auto;
        width: min(94vw, 560px);
        max-width: 560px;
        height: calc(100svh - 70px);
        min-height: 0;
        opacity: 0;
        pointer-events: none;
        transform: translateX(-50%);
        top: 8px;
        padding-bottom: 92px;
    }

    body.section-mode section.section-active {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%);
        z-index: 2;
    }

    body.section-mode section.section-before {
        transform: translateX(-50%) translateX(-16%);
    }

    body.section-mode section.section-after {
        transform: translateX(-50%) translateX(16%);
    }

    h1 {
        font-size: 2rem;
    }

}

@media (max-height: 620px) {
    :root {
        --section-padding-block: clamp(16px, 4vh, 32px);
    }

    .nav-links a {
        padding-block: 8px;
    }

    h2 {
        margin-bottom: 10px;
    }

    p {
        margin-bottom: 10px;
    }

    .skill-item img {
        width: clamp(48px, 12vh, 92px);
    }

    .artwork-media > img {
        height: clamp(130px, 24vh, 210px);
    }
}

@media (max-width: 600px) and (max-height: 700px) {
    #creations h2 {
        margin-bottom: 10px;
    }

    .artwork-grid {
        gap: 9px;
    }

    .artwork-media > img {
        height: clamp(88px, 18vh, 128px);
    }

    .fullscreen-button,
    .exit-fullscreen-button {
        width: 36px;
        height: 36px;
        padding: 6px;
    }

    .artwork-card figcaption {
        font-size: 0.72rem;
        padding: 6px 8px;
    }

    .code-creation pre,
    .screenshot-placeholder {
        min-height: 92px;
    }
}
