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

:root {
    --bg: #0b1020;
    --panel: rgba(15, 23, 42, 0.72);
    --line: rgba(148, 163, 184, 0.2);
    --text: #f8fafc;
    --muted: #94a3b8;
    --accent: #22c55e;
    --accent-strong: #38bdf8;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.16), transparent 28%),
        radial-gradient(circle at 80% 70%, rgba(56, 189, 248, 0.14), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-x: hidden;
}

#non-code-page {
    position: relative;
    width: min(1180px, calc(100% - 36px));
    min-height: 100vh;
    margin: 0 auto;
    padding: clamp(34px, 6vw, 72px) 0;
}

.non-code-intro {
    position: relative;
    z-index: 2;
    max-width: 460px;
    padding: clamp(26px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(16px);
    transition: filter 260ms ease, opacity 260ms ease;
    animation: pageEnter 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.eyebrow {
    color: var(--accent);
    font-family: monospace;
    font-size: 0.92rem;
    font-weight: 800;
    text-transform: uppercase;
}

h1 {
    margin-top: 12px;
    font-family: monospace;
    font-size: clamp(2.8rem, 7vw, 5.8rem);
    line-height: 0.95;
    letter-spacing: 0;
}

.non-code-intro p:last-child {
    margin-top: 18px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

#hobby-gallery {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hobby-card {
    position: absolute;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.62);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
    overflow: hidden;
    cursor: pointer;
    opacity: 1;
    transform-origin: center;
    transition:
        filter 260ms ease,
        opacity 260ms ease,
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 260ms ease,
        z-index 0ms 260ms;
}

.hobby-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hobby-card figcaption {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(2, 6, 23, 0.84);
    color: var(--text);
    backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 260ms ease, transform 260ms ease;
}

.hobby-card figcaption strong,
.hobby-card figcaption span {
    display: block;
}

.hobby-card figcaption strong {
    font-family: monospace;
    font-size: 1rem;
}

.hobby-card figcaption span {
    margin-top: 6px;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.45;
}

#non-code-page:has(.hobby-card:hover) .non-code-intro,
#hobby-gallery:has(.hobby-card:hover) .hobby-card:not(:hover) {
    filter: blur(5px);
    opacity: 0.35;
}

#hobby-gallery:has(.hobby-card:hover) .hobby-card:hover {
    z-index: 10;
    box-shadow: 0 34px 76px rgba(0, 0, 0, 0.52);
    transition:
        filter 260ms ease,
        opacity 260ms ease,
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 260ms ease,
        z-index 0ms;
}

.hobby-card:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

.hobby-guitar {
    top: 17%;
    right: 8%;
    width: 230px;
    height: 324px;
    transform: rotate(-7deg);
    animation: fadeOne 1500ms 180ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 5.8s 1s ease-in-out infinite;
}

.hobby-hollow {
    top: 12%;
    left: 43%;
    width: 300px;
    height: 205px;
    transform: rotate(5deg);
    animation: fadeTwo 1600ms 420ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 6.4s 1.3s ease-in-out infinite reverse;
}

.hobby-thing {
    right: 30%;
    bottom: 10%;
    width: 215px;
    height: 322px;
    transform: rotate(6deg);
    animation: fadeThree 1700ms 680ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 6s 1.5s ease-in-out infinite;
}

.hobby-spider {
    right: 5%;
    bottom: 14%;
    width: 330px;
    height: 230px;
    transform: rotate(-4deg);
    animation: fadeFour 1800ms 900ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 6.8s 1.7s ease-in-out infinite reverse;
}

.hobby-myth {
    left: 5%;
    bottom: 5%;
    width: 330px;
    height: 230px;
    transform: rotate(-4deg);
    animation: fadeFour 1800ms 900ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 6.8s 1.7s ease-in-out infinite reverse;
}

.hobby-book {
    left: -30%;
    bottom: 40%;
    width: 330px;
    height: 450px;
    transform: rotate(-4deg);
    animation: fadeFour 1800ms 900ms cubic-bezier(0.22, 1, 0.36, 1) backwards,
        floatImage 6.8s 1.7s ease-in-out infinite reverse;
}


.hobby-guitar:hover {
    transform: scale(1.22) rotate(2deg);
}

.hobby-myth:hover {
    transform: scale(1.22) rotate(2deg);
}

.hobby-hollow:hover {
    transform: scale(1.2) rotate(-2deg);
}

.hobby-thing:hover {
    transform: scale(1.24) rotate(-2deg);
}

.hobby-spider:hover {
    transform: scale(1.2) rotate(2deg);
}

.hobby-book:hover {
    transform: scale(1.2) rotate(2deg);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(26px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOne {
    from {
        opacity: 0;
        filter: blur(12px);
    }
}

@keyframes fadeTwo {
    from {
        opacity: 0;
        filter: blur(12px);
    }
}

@keyframes fadeThree {
    from {
        opacity: 0;
        filter: blur(12px);
    }
}

@keyframes fadeFour {
    from {
        opacity: 0;
        filter: blur(12px);
    }
}

@keyframes floatImage {
    0%, 100% {
        translate: 0 0;
    }

    50% {
        translate: 0 -14px;
    }
}

@media (max-width: 900px) {
    #non-code-page {
        display: grid;
        gap: 22px;
    }

    #hobby-gallery {
        position: relative;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .hobby-card {
        position: relative;
        inset: auto;
        width: 100%;
        height: 240px;
        transform: rotate(0deg);
    }

    .hobby-guitar:hover,
    .hobby-hollow:hover,
    .hobby-thing:hover,
    .hobby-spider:hover {
        transform: scale(1.04) rotate(1deg);
    }
}

@media (max-width: 560px) {
    #non-code-page {
        width: min(100% - 28px, 1180px);
        padding: 28px 0;
    }

    #hobby-gallery {
        grid-template-columns: 1fr;
    }

    .hobby-card {
        height: 230px;
    }
}
