:root {
    /* Spacing & Radius */
    --margin: 8px;
    --margin-far: 16px;
    --padding: 12px;
    --radius: 12px;
    --radius-sm: 8px;

    /* Colors */
    --background-color: #141414;
    --text-color: #e8e8e8;
    --primary: #454545;
    --border: #343434;
    --hover: #161616;

    /* Font Sizes */
    --font-xl: 80px;
    --font-lg: 50px;
    --font-md: 24px;
    --font-sm: 20px;

    --font-xl-mobile: 52px;
    --font-md-mobile: 16px;
    --font-sm-mobile: 16px;
}

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

html, body {
    height: 100%;
    overflow-y: auto;
    font-family: 'Rubik', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

h1 {
    font-size: var(--font-xl);
    font-weight: 700;
    margin: 0;
}

h2 {
    font-size: var(--font-lg);
    font-weight: 700;
    margin: 0;
}

p {
    font-size: var(--font-md);
    font-weight: 300;
    margin: 0;
    color: #bbb;
}

/* Modern Button-Like Links */
a {
    display: inline-block;
    width: 100%;
    text-align: center;

    font-size: var(--font-sm);
    font-weight: 400;
    text-decoration: none;

    color: var(--text-color);
    background-color: var(--primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;

    cursor: pointer;

    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
}

a:hover {
    background-color: var(--hover);
    transform: translateY(-1px);
}

/* Page Transitions */
.page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page.active {
    opacity: 1;
    pointer-events: auto; /* Only the active page is interactable */
    z-index: 1;
}

/* Section Title */
.head-line {
    text-align: center;
}

/* Intro Section */
#home {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: var(--margin-far);
}

/* Link Group */
#links {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 240px;
    gap: var(--margin);
}

/* Social Buttons */
#socials {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--margin-far);
}

#socials-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--margin);
    width: 15%;
}

#socials-container a {
    padding: 10px 16px;
    flex-grow: 1;
    min-width: 120px;
}

#projects {
    min-height: 100vh;          /* at least full viewport height */
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: var(--margin-far);
    padding: 1rem;
}

#home-link {
    display: none; /* hide the link | show only on mobile */
    margin: 0;
    width: fit-content;
    text-align: center;
    margin-top: var(--margin);
}


/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: var(--font-xl-mobile);
    }

    p {
        font-size: var(--font-md-mobile);
    }

    a {
        font-size: var(--font-sm-mobile);
        border-radius: var(--radius-sm);
    }

    #links {
        width: 30%;
    }

    #links a {
        padding: 8px;
    }

    #home-link {
        display: block;
    }
}


#games {
    width: 100%;
    max-width: 1000px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--margin-far);
    box-sizing: border-box;
    padding: 1rem;
}

#games iframe {
    width: 200px
}