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

:root {
    --primary-color: #F5E5DB;
    --secondary-color: #161515;
    --accent-color: #F5514E;
    --font-family: Anonymous Pro;
    --font-size-base: 18px;
    --transition-time: 0.2s;
    --border-radius: 8px;
}

html {
    font-size: var(--font-size-base);
    /* 1rem = 16px */
    font-family: var(--font-family);
    font-weight: 400;
    height: 100%;
    width: 100%;
    line-height: 1.1rem;
}

body {
    overflow: hidden;
    height: 100%;
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

h1,
h2,
h3 {
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

img {
    object-fit: cover;
    -webkit-tap-highlight-color: transparent;
    /* removes the blue overlay on iOS */
    -webkit-user-select: none;
    /* optional: prevents text selection on tap */
    user-select: none;
    touch-action: manipulation;
    /* optional: improves touch behavior */
}

/* Remove blue overlay on all touchable elements */

hr {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-color);
    border: none;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

a:hover {
    color: var(--primary-color);
    transition: all var(--transition-time) ease;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

@media (max-width: 1230px) {
    .text-right {
        text-align: center;
    }

    .text-left {
        text-align: center;
    }
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--transition-time) ease;
    margin-top: 1rem;
    font-size: 1rem;
    font-family: var(--font-family);
    text-align: center;

}

.button:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

#slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: translateY(100%);
    transition: transform 1s ease;
    z-index: 0;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    overflow: hidden;
    padding: 1rem;
}



.slide.active {
    transform: translateY(0%);
    z-index: 2;
}

.pixel-art {
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    /* fallback */
}

.scroll-indicator {
    cursor: pointer;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity var(--transition-time) ease;
    z-index: 998;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    /* space between arrow and text */
}

/* Arrow styling */
.scroll-indicator .arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Down arrow rotation */
.scroll-down .arrow {
    transform: rotate(45deg);
}

/* Up arrow rotation */
.scroll-up .arrow {
    transform: rotate(-135deg);
}

/* Text styling */
.scroll-indicator .scroll-text {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Positioning */
.scroll-down {
    bottom: 0.75rem;
}

.scroll-up {
    top: 3.75rem;
    /* below header */
}

/* visible state */
.scroll-indicator.visible {
    opacity: 1;
}

/* #region Header */
header {
    position: fixed;
    /* stays on top */
    top: 0;
    left: 0;
    width: 100%;

    background-color: var(--secondary-color);
    color: var(--primary-color);

    display: flex;
    justify-content: space-between;
    align-items: center;

    height: 3rem;
    padding: 1rem;

    z-index: 999;
    /* ensures it's above slides */
}

header a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 400;
}


header a:hover {
    color: var(--accent-color);
    transition: all var(--transition-time) ease;
}

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.nav a {
    color: var(--primary-color);
}

.nav a.active {
    text-decoration: underline;
}

.contact-in-menu {
    display: none;
}

.contact-out-menu {
    display: block;
}

.burger {
    display: none;
    /* hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1000;
}

.burger span {
    display: block;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

/* Show burger only on small screens */
@media (max-width: 1230px) {
    .nav {
        position: fixed;
        top: 3rem;
        /* below header */
        left: 0;
        width: 50%;
        height: calc(100% - 3rem);
        background-color: var(--secondary-color);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        padding-top: 2rem;
        transform: translateX(200%);
        transition: transform 0.3s ease;
    }

    .nav a {
        width: 100%;
        text-align: center;
    }

    .nav.active {
        transform: translateX(100%);
    }

    .burger {
        display: flex;
    }

    .contact-out-menu {
        display: none;
    }

    .contact-in-menu {
        display: block;
    }
}

/* #endregion Header */
/* #region Hero */
.bg-wrap {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    z-index: -1;
}

.bg-wrap canvas {
    position: absolute;
    left: -10px;
    top: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
}

#hero {
    width: 100%;
    height: 100%;

    transform: translateY(0%);
    background-color: var(--accent-color);
    /* first slide visible immediately */
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#hero img {
    width: 100%;
    max-width: 1000px;
}

/* #endregion Hero */
/* #region Next*/
#next-to-each-other {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#next-to-each-other .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    height: 100%
}

@media (max-width: 1230px) {
    #next-to-each-other .container {
        flex-direction: column;
        /* stack vertically */
        text-align: center;
    }

    #next-to-each-other .container.reverse-on-phone {
        flex-direction: column-reverse;
        /* stack vertically */
    }

    #next-to-each-other img {
        width: 40%;
        /* make image bigger on mobile */
        max-width: 200px;
    }
}

#next-to-each-other .text {
    max-width: 600px;
    height: auto;
}


#next-to-each-other h2 {
    margin-bottom: 1rem;
}

#next-to-each-other img {
    width: 15%;
    min-width: 150px;
}

#next-to-each-other-with-img-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
    width: 100%;
}

#next-to-each-other-with-img-title .container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    gap: 2rem;
}

#next-to-each-other-with-img-title .container img {
    width: 480px;
    max-width: 100%;
    transform: translateY(-35%);
}

#next-to-each-other-with-img-title .container .text {
    max-width: 600px;
}


@media (max-width: 1230px) {

    #next-to-each-other-with-img-title .container {
        flex-direction: column;
        gap: 2rem;
    }

    #next-to-each-other-with-img-title .container img {
        transform: translateY(0);
    }

    #next-to-each-other-with-img-title .container.reverse-on-phone {
        flex-direction: column-reverse;
    }

}

.skill-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    text-align: left;
    padding-left: 1rem;
}

/* #endregion Next */
/* #region Games */
#games {

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

#games .list {
    width: 60%;
    /* 70% of parent width */
    aspect-ratio: 70 / 45;
    /* width : height = 70:45 → height = ~64% of width */
    max-width: 600px;
    max-height: 338px;
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#games .list img {
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: var(--border-radius);
}

#games .list li {
    list-style-type: none;

    width: 100%;
    height: 100%;
    opacity: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: var(--border-radius);
    background: #9C89B8;
    transition: transform 0.4s, opacity 0.4s;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* Old Edge */
    user-select: none;
    /* Modern browsers */
    touch-action: manipulation;
}

#games .list .act {
    opacity: 1;
}

#games .list .prev,
#games .list .next {
    cursor: pointer;
    opacity: 0.25;
}

#games .list .prev {
    transform: translateX(-150%) scale(.85);
}

#games .list .next {
    transform: translateX(50%) scale(.85);
}

#games .list .hide {
    transform: translateX(-200%) scale(.6);
}

#games .list .new-next {
    transform: translateX(100%) scale(.6);
}

#games .list .hide,
#games .list .new-next {
    opacity: 0;
    transition: opacity var(--transition-time), transform var(--transition-time);
}

#games .swipe {
    width: 70%;
    /* 70% of parent width */
    aspect-ratio: 70 / 45;
    /* width : height = 70:45 → height = ~64% of width */
    max-width: 600px;
    max-height: 338px;
    position: absolute;
    border-radius: var(--border-radius);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.game-info {
    width: 100%;
    padding: 1rem;
    position: absolute;
    padding-top: 2rem;
    text-align: center;
    top: calc(40% + min(338px, 45vw) / 2);
    left: 50%;
    transform: translateX(-50%);
}

#games .title {
    position: absolute;
    text-align: center;
    top: calc((50% - min(338px, 45vw) / 2) / 2);
    left: 50%;
    transform: translate(-50%, -50%);
}

.game-info h3 {
    margin-bottom: 1rem;
}

/* #endregion Games */

/* #region Footer */
.footer-slide {
    height: 25%;
    width: 100%;
    /* only 25% of screen */
    top: auto;
    bottom: 0;
    padding: 0;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 2rem;

    /* start hidden below */
    transform: translateY(100%);
}

@media (max-width: 1230px) {
    .footer-slide {
        height: 50%;
        flex-direction: column;
        gap: 2rem;
    }
}

.footer-slide .column {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-slide h3 {
    margin-bottom: 0.5rem;
}

.footer-slide a {
    color: var(--primary-color);
}

.footer-slide a:hover {
    color: var(--accent-color);
}

/* #endregion Footer */