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

html {
    height: 100%;
    font-family: "Oxanium", serif;
    font-optical-sizing: auto;
    font-style: normal;
    overflow: hidden;
}

body {
    background-color: #000;
    color: #ff1a1a;
    font-family: 'Oxanium', sans-serif;
    line-height: 1.55;
    text-shadow:
        0 0 1px rgba(255, 0, 0, 1),
        0 0 2px rgba(255, 0, 0, 0.9);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 4px,
            rgba(255, 0, 0, 0.05) 4px,
            rgba(255, 0, 0, 0.05) 8px);
    background-repeat: repeat;
    background-position: center;
    background-size: cover;
    image-rendering: pixelated;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    height: 100dvh;
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: clamp(1.2rem, 3vw, 2.8rem);
    overflow: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(0deg,
            rgba(255, 0, 0, 0) 0px,
            rgba(255, 0, 0, 0) 2px,
            rgba(255, 0, 0, 0.18) 3px,
            rgba(255, 0, 0, 0.18) 4px);
    mix-blend-mode: screen;
    opacity: 0.23;
    pointer-events: none;
    animation: scanlines 4s linear infinite;
    -webkit-mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.65) 12%,
            rgba(0, 0, 0, 0.92) 35%,
            rgba(0, 0, 0, 0.92) 65%,
            rgba(0, 0, 0, 0.65) 88%,
            transparent 100%);
    mask-image: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.65) 12%,
            rgba(0, 0, 0, 0.92) 35%,
            rgba(0, 0, 0, 0.92) 65%,
            rgba(0, 0, 0, 0.65) 88%,
            transparent 100%);
}

body::after {
    content: "";
    position: fixed;
    bottom: -58vh;
    left: -40vw;
    width: 186vw;
    height: 128vh;
    background:
        linear-gradient(180deg,
            rgba(255, 30, 30, 0.24) 0%,
            rgba(200, 15, 15, 0.14) 28%,
            rgba(120, 8, 8, 0.09) 52%,
            rgba(55, 0, 0, 0.05) 76%,
            rgba(25, 0, 0, 0.03) 100%),
        repeating-linear-gradient(rgba(255, 26, 26, 0.05) 0px,
            rgba(255, 26, 26, 0.05) 18px,
            rgba(255, 26, 26, 0.18) 19px,
            rgba(255, 26, 26, 0.18) 20px),
        repeating-linear-gradient(90deg,
            rgba(255, 22, 22, 0.04) 0px,
            rgba(255, 22, 22, 0.04) 56px,
            rgba(255, 10, 10, 0.18) 57px,
            rgba(255, 10, 10, 0.18) 58px);
    transform: perspective(740px) rotateX(68deg) scaleX(1.1);
    transform-origin: top center;
    opacity: 0.54;
    filter: drop-shadow(0 -12px 22px rgba(255, 0, 0, 0.22));
    -webkit-mask-image: linear-gradient(to top,
            transparent 0%,
            rgba(0, 0, 0, 0.7) 30%,
            rgba(0, 0, 0, 0.95) 55%,
            rgba(0, 0, 0, 0.6) 78%,
            transparent 100%);
    mask-image: linear-gradient(to top,
            transparent 0%,
            rgba(0, 0, 0, 0.7) 30%,
            rgba(0, 0, 0, 0.95) 55%,
            rgba(0, 0, 0, 0.6) 78%,
            transparent 100%);
    pointer-events: none;
    animation: horizonFade 9s ease-in-out infinite;
}

body[data-bg-loaded="webp"] {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        url('assets/background.webp'),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 4px,
            rgba(255, 0, 0, 0.05) 4px,
            rgba(255, 0, 0, 0.05) 8px);
}

body[data-bg-loaded="gif"] {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        url('assets/background.gif'),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 4px,
            rgba(255, 0, 0, 0.05) 4px,
            rgba(255, 0, 0, 0.05) 8px);
}

body[data-bg-loaded="true"] {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)),
        url('assets/background.gif'),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 4px,
            rgba(255, 0, 0, 0.05) 4px,
            rgba(255, 0, 0, 0.05) 8px);
}

@keyframes horizonFade {

    0%,
    100% {
        opacity: 0.62;
        transform: perspective(740px) rotateX(68deg) scaleX(1.08) translateY(0px);
    }

    45% {
        opacity: 0.78;
        transform: perspective(760px) rotateX(69deg) scaleX(1.14) translateY(-6px);
    }

    70% {
        opacity: 0.7;
        transform: perspective(720px) rotateX(67deg) scaleX(1.12) translateY(5px);
    }
}

.vb-frame {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.6rem, 2.2vw, 1.6rem);
}

.title {
    margin: 0;
    text-align: center;
    font-size: clamp(1.9rem, 5.4vw, 3.1rem);
    letter-spacing: 0.18em;
    text-shadow:
        0 0 8px rgba(255, 0, 0, 0.65),
        2px 0 14px rgba(255, 0, 0, 0.45),
        -2px 0 14px rgba(255, 0, 0, 0.45);
    animation: pulse 3.4s ease-in-out infinite;
}

.container {
    width: min(88vw, 820px);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2.4vw, 1.8rem);
    max-height: calc(100dvh - clamp(4.6rem, 9vw, 6rem));
    overflow: hidden;
}

section {
    position: relative;
    background-color: rgba(0, 0, 0, 0.46);
    border: 1px solid rgba(255, 0, 0, 0.38);
    padding: clamp(0.82rem, 2.3vw, 1.4rem);
    border-radius: 12px;
    backdrop-filter: blur(2px);
    overflow: hidden;
}

section::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(255, 0, 0, 0.45);
    box-shadow:
        0 0 14px rgba(255, 0, 0, 0.55),
        0 0 32px rgba(255, 0, 0, 0.24);
    opacity: 0.68;
    pointer-events: none;
}

section::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 0, 0.76), transparent);
    opacity: 0.85;
    filter: blur(0.4px);
}

h1,
h2,
h3 {
    position: relative;
    text-transform: uppercase;
    border-bottom: 2px solid #ff1a1a;
    text-shadow:
        0 0 2px rgba(255, 0, 0, 1),
        0 0 4px rgba(255, 0, 0, 0.9),
        0 0 6px rgba(255, 0, 0, 0.8),
        0 0 8px rgba(255, 0, 0, 0.7),
        4px 0 12px rgba(255, 0, 0, 0.35),
        -4px 0 12px rgba(255, 0, 0, 0.35);
    margin-top: 0;
    letter-spacing: 0.1em;
}

p {
    margin: 0 0 0.78rem;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: clamp(0.75rem, 2.4vw, 1.2rem);
    margin-top: 1.4rem;
}

.link-card {
    border: 1px solid #ff1a1a;
    padding: 12px;
    background: linear-gradient(135deg, rgba(20, 0, 0, 0.55), rgba(60, 0, 0, 0.15));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% -10%, rgba(255, 0, 0, 0.35), transparent 60%);
    opacity: 0.42;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.link-card:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.45);
    cursor: pointer;
}

.link-card:hover::before {
    opacity: 0.75;
}

.link-card h3 {
    margin: 0;
    font-size: 0.9em;
    border-bottom: none;
}

.link-card svg {
    width: clamp(1.05rem, 3.4vw, 1.35rem);
    height: clamp(1.05rem, 3.4vw, 1.35rem);
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.55));
}

.skills-lang-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: clamp(0.9rem, 2.1vw, 1.5rem);
    margin-top: 1rem;
    flex-wrap: wrap;
}

.skills-section {
    flex: 1 1 280px;
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 1.5vw, 0.9rem);
}

.skills-section h3 {
    margin: 0;
    font-size: clamp(1.05rem, 3vw, 1.25rem);
    text-shadow: 0 0 6px rgba(255, 0, 0, 0.6);
}

.lang-grid {
    display: grid;
    gap: clamp(0.5rem, 1.7vw, 0.85rem);
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    justify-items: flex-start;
}

.skills-section:last-child .lang-grid {
    grid-template-columns: minmax(0, 1fr);
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: clamp(0.95rem, 2.3vw, 1.05rem);
    padding: 0.12rem 0.22rem;
    letter-spacing: 0.06em;
}

.lang-item svg {
    width: clamp(1.05rem, 2.8vw, 1.32rem);
    height: clamp(1.05rem, 2.8vw, 1.32rem);
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.7));
}

.lang-item .skill-icon {
    display: block;
    height: clamp(0.88rem, 2.2vw, 1.12rem);
    width: auto;
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.7));
    flex-shrink: 0;
}

.lang-item .skill-icon--go {
    height: clamp(1.18rem, 3.3vw, 1.52rem);
}

@media (max-height: 820px) {
    body {
        padding: clamp(0.9rem, 2.6vw, 2rem);
    }

    .container {
        gap: clamp(0.8rem, 2.1vw, 1.4rem);
        max-height: calc(100dvh - clamp(3.3rem, 7vw, 4.8rem));
    }

    section {
        padding: clamp(0.65rem, 2vw, 1.1rem);
    }

    .title {
        font-size: clamp(1.7rem, 4.3vw, 2.5rem);
    }
}

@media (max-height: 720px) {
    body {
        padding: clamp(0.7rem, 2.1vw, 1.6rem);
    }

    .container {
        max-height: calc(100dvh - clamp(2.8rem, 6vw, 4rem));
    }
}

@media (max-width: 768px) {
    body {
        align-items: center;
        justify-content: center;
        padding: clamp(0.65rem, 4.2vw, 1.1rem);
        min-height: 100dvh;
    }

    .vb-frame {
        width: min(92vw, 500px);
        gap: clamp(0.5rem, 3vw, 0.82rem);
    }

    .title {
        font-size: clamp(1.45rem, 6.5vw, 2.1rem);
        letter-spacing: 0.12em;
        margin-bottom: clamp(0.15rem, 1.6vw, 0.32rem);
    }

    .container {
        width: 100%;
        gap: clamp(0.45rem, 2.6vw, 0.75rem);
        max-height: calc(100dvh - clamp(2.7rem, 11vw, 3.8rem));
    }

    section {
        padding: clamp(0.48rem, 2.6vw, 0.78rem);
    }

    .skills-lang-container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: clamp(0.35rem, 2.2vw, 0.6rem);
    }

    .skills-section {
        gap: clamp(0.3rem, 2.1vw, 0.5rem);
    }

    .lang-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: clamp(0.28rem, 2vw, 0.5rem);
    }

    .skills-section:last-child .lang-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }

    .lang-item {
        font-size: clamp(0.8rem, 3vw, 0.95rem);
        padding: 0.06rem 0.16rem;
    }

    .lang-item .skill-icon {
        height: clamp(0.78rem, 3.2vw, 1rem);
    }

    .lang-item .skill-icon--go {
        height: clamp(1.05rem, 4.6vw, 1.34rem);
    }

    p {
        font-size: clamp(0.78rem, 2.9vw, 0.92rem);
        line-height: 1.32;
        margin-bottom: clamp(0.28rem, 2vw, 0.48rem);
    }

    h2 {
        font-size: clamp(1rem, 4.4vw, 1.3rem);
    }

    h3 {
        font-size: clamp(0.88rem, 3.6vw, 1.08rem);
    }

    .links-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: clamp(0.32rem, 2.3vw, 0.6rem);
    }

    .link-card {
        padding: clamp(0.52rem, 2.6vw, 0.7rem);
        gap: clamp(0.28rem, 2.2vw, 0.48rem);
    }

    .link-card h3 {
        font-size: clamp(0.75rem, 3vw, 0.9rem);
    }

    .link-card svg {
        width: clamp(0.95rem, 3.5vw, 1.2rem);
        height: clamp(0.95rem, 3.5vw, 1.2rem);
    }

    body::after {
        bottom: -36vh;
        height: 54vh;
        opacity: 0.4;
    }
}

@media (max-width: 520px) {
    .skills-lang-container {
        grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
    }
}

@keyframes scanlines {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(4px);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.9;
        text-shadow:
            0 0 6px rgba(255, 0, 0, 0.55),
            2px 0 12px rgba(255, 0, 0, 0.35),
            -2px 0 12px rgba(255, 0, 0, 0.35);
    }

    50% {
        opacity: 1;
        text-shadow:
            0 0 12px rgba(255, 0, 0, 0.75),
            2px 0 18px rgba(255, 0, 0, 0.45),
            -2px 0 18px rgba(255, 0, 0, 0.45);
    }
}