/* 1. RESET & GLOBAL STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --animation-time-titles: 0.4s;
    --title-gradient-background-first: #000000f8;
    --title-gradient-background-second: #00000000;
}

body {
    scroll-behavior: smooth;
    max-width: 1920px;
    margin: 0 auto;
    padding: 20px;
    font-size: clamp(14px, 1.2vw, 16px);
}

/* 2. Typography */
h1, h2, h3 {
    margin-bottom: 3px;
}

a {
    text-decoration: none;
    color: rgb(216, 219, 30);
}
a:hover {
    text-decoration: underline;
}

/* 3. LAYOUT SECTIONS */
.page {
    display: flex;
    flex-direction: column;
}

.header, .main, .footer {
    margin: 20px 0px 20px 0;
    padding: 1em;
    position: relative;
}

.header {
    font-family: "Pacifico", Arial, Helvetica, sans-serif;
    letter-spacing: 1.1px;
    word-spacing: 4px;
    position: relative;
    min-height: 194px;
    display: flex;
}

.main {
    word-spacing: 4px;
    display: flex;
    flex-direction: column;
    place-items: center;
}

/* 4. COMPONENTS & UI ELEMENTS */
.header::before, .main::before, .footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: local;
    opacity: 0.93;
    filter: blur(1px);
    pointer-events: none;
}

.header::before {
    background-image: url('/img/BackgroundRed.png');
    z-index: -1;
    top: -400%;
    outline: 5px solid #3e1634;
    transition: 
        filter 0.5s ease,
        background-image 0.8s ease;
}
.page:has(.header:hover) .header::before {
    filter: blur(4px);
    background-image: url(/img/BackgroundRedWithoutPeople.png);
}
.header a:link {
    color: rgb(223, 223, 223);
}
.header p::first-letter {
    font-size: 27px;
}
.header p, .header q {
    color: #000;
    font-size: 1.4em;
    text-shadow: 1px 3px #d22395;
    font-weight: bolder;
}
.header a:hover {
    color: #000;
    text-shadow: 1px 3px #d22395;
    text-decoration: underline;
}

.main::after {
    content: "";
    position: absolute;
    inset: 0;
    outline: 5px solid #e3cc93;
    filter: blur(4px);
    pointer-events: none;
}
.main::before {
    content: "";
    position: absolute;
    background-image: url("/img/BackgroundYellow.jpg");
    background-size: cover;
    background-position: center 37%;
    filter: blur(4px);
    z-index: -1;
}

.footer::before {
    background-image: url('/img/BackgroundBlue.jpg');
    z-index: -3;
    background-position: center 65%;
    background-attachment: local;
    filter: blur(1px);
}

.learned-skills strong {
    color: rgb(189, 118, 118);
}
.learned-skills ul {
    padding-left: 25px;
    color: rgb(165, 165, 146);
    text-shadow: 1px 1px rgb(0, 0, 0);
}
.learned-skills h3 {
    padding-top: 20px;
    color: rgb(165, 165, 146);
    text-shadow: 1px 2px rgb(0, 0, 0);
}

.author-block h3 {
    min-height: 1.5em;
    display: block;
    transition: color 0.3s ease,
                font-size 0.3s ease;
}

.page:has(.round-crop-image:hover) .author-block h3 {
    font-size: calc(1.17em - 1px);
    text-shadow: 1px 3px #d22395;
    color: rgb(0, 0, 0);
}
.page:has(.footer:hover) .below-footer {
    opacity: 1;
}

.title-block:hover {
    background-size: 110%;
}
.title-block:hover .title-content-block {
    bottom: 0%;
    backdrop-filter: blur(10px);
    text-shadow: 1px 1px 1px #d22395;
}

.footer::after {
    content: "";
    position: absolute;
    inset: 0;
    outline: 5px solid #2b2a63;
    filter: blur(4px);
    pointer-events: none;
}

#nav-buttons {
    display: flex;
    justify-content: center;
    padding-bottom: 10px;
}

.nav-button {
    font-family: "Caveat Brush", cursive;
    background: #c99e3b;
    border: 2px solid #bababa00;
    border-radius: 30px 60px;
    box-shadow: 5px 5px #0000006c;
    padding: 10px;
    margin-right: 20px;
    transition: 
        box-shadow 0.4s ease,
        background-color 0.5s ease,
        transform 0.3s ease;
    cursor: pointer;
}
.nav-button:hover {
    background: #ffb300;
    transform: translateY(4px);
    box-shadow: 1px 1px #0000006c;
}

/* 5. TABLES */
table {
    border-collapse: collapse;
    text-align: center;
    align-self: center;
}

td, th {
    border: 1px solid #333;
}

/* 6. IMAGES & MEDIA */
.round-crop-image {
    border-radius: 0%;
    transition: border-radius 0.2s ease;
}

.round-crop-image:hover {
    border-radius: 50%;
    border: 2px solid;
    cursor: no-drop;
}

.screenshots-review {
    width: 500px;
}

.gray-emoji {
    filter: saturate(0);
}

.gradient-border {
    border: 3px solid transparent;
    animation: animation-gradient-border 20s ease-in-out infinite;
}

/* 7. HELPER CLASSES */
.footer-link-word {
    color: rgb(1, 118, 196);
    font-size: larger;
}

.author-block {
    display: flex;
    flex-wrap: wrap;
    flex-direction: column;
    position: absolute;
    align-items: center;
    right: 10px;
    min-width: 140px;
    min-height: 180px;
}

.header-deformation {
    animation-name: animation-deformation-header;
    animation-iteration-count: infinite;
    animation-duration: 10s;
    display: inline-block;
}

.header-quotes {
    float: left;
}

.favorite-text {
    overflow: hidden;
    white-space: nowrap;
    text-align: center;
    font-family: "Pacifico", Arial, Helvetica, sans-serif;
    font-size: 2.5em;
    color: #ff0080;
    text-shadow: 
        3px 3px 0 #ffcc00,
        5px 5px 0 rgba(0, 0, 0, 0.1);
}

.pipe {
    font-style: normal;
    animation-name: animation-pipe-main;
    animation-iteration-count: infinite;
    animation-duration: 1s;
    color: #000;
    text-shadow: none;
}

.below-footer {
    background-image: url(/img/YunoGasai.png);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 20%;
    background-size: contain;
    width: 40%;
    min-height: 80px;
    height: 40vh;
    max-height: 70px;
    margin: 0 auto;
    filter: blur(2px);
    opacity: 0;
    transition: opacity var(--animation-time-titles) ease;
}

.titles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: left;
    flex: 100%;
    gap: 5px;
}
.title-block {
    box-sizing: border-box;
    position: relative;
    height: 200px;
    width: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
    background-size: 100%;
    transition: 
        background-size 0.4s cubic-bezier(0.69, 0.16, 0.76, 0.79);
}
.title-content-block {
    font-family: "Pacifico", 'Times New Roman', Times, serif;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: -72%;
    transition:
        bottom var(--animation-time-titles) cubic-bezier(0.42, 0.00, 0.58, 1.00),
        backdrop-filter var(--animation-time-titles) ease,
        text-shadow 0.6s ease;
}
.title-name {
    text-align: center;
    font-size: 2em;
    width: 100%;
    color: #fff;
    text-shadow: 0px 0px 5px #ff00bb;
    background-repeat: repeat-x;
    transition: background-image var(--animation-time-titles) ease;
    height: 28%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.title-genres {
    text-align: center;
    display: inline-block;
    color: #000;
    text-shadow: 0 0 3px rgba(210, 35, 149, 0.8);
    font-weight: 500;
}
.title-description {
    font-family: "Caveat Brush", cursive;
    padding: 5px;
    text-align: center;
    font-size: 1.1em;
}


@keyframes animation-gradient-border {
    0% {
        border-image: linear-gradient(0deg, #ffea00, #ff0080) 1;
    }
    25% {
        border-image: linear-gradient(90deg, #ffea00, #ff0080) 1;
    }
    50% {
        border-image: linear-gradient(180deg, #ffea00, #ff0080) 1;
    }
    75% {
        border-image: linear-gradient(270deg, #ffea00, #ff0080) 1;
    }
    100% {
        border-image: linear-gradient(360deg, #ffea00, #ff0080) 1;
    }
}

@keyframes animation-pipe-main {
    0% {
        color: #000000
    }
    49% {
        color: #000000
    }
    50% {
        color: #00000000
    }
    100% {
        color: #00000000
    }
}

@keyframes animation-deformation-header {
    99% {
        transform: skew(0deg);
    }
    99.61% {
        transform: skew(140deg);
        color: #ff0000;
    }
    99.32% {
        transform: skew(0deg);
        color: #000;
    }
}

@media (max-width: 896px) {
    .titles-container {
        width: 104%;   
    }
    .title-block {
        width: 100%;
        max-width: 100%;
        aspect-ratio: 2 / 1;
        height: auto;
    }
    .title-description {
        font-size: clamp(0.95em, 3.5vw, 1.3em);
        line-height: 1.25;
        overflow-wrap: break-word;
    }
    .header-quotes {
        font-size: 10px;
        max-width: 90%;
        position: absolute;
        bottom: 0;
    }
    .header p, q {
        font-size: 1.2em;
        text-shadow: 1px 2px #d22395;
    }
    .header p::first-letter {
        font-size: 2.0em;
    }
    .author-block {
        display: none;
    }
}

@media (max-width: 320px) {
    body {
        padding: 10px;
    }
    .author-block {
        position: relative;
        margin: 10px auto;
    }
    
    .nav-button {
        margin-right: 10px;
        padding: 8px;
        font-size: 0.9em;
    }
    .favorite-text {
        font-size: 1.8em;
    }
}

/*
1. Reset & Global - Universal styles first
2. Typography - Text-related styles
3 Layout Sections - Main structural components (header, main, footer)
4. Components - Reusable UI elements (buttons, navigation)
5. Tables - Table-specific styles
6. Images & Media - Visual elements
7. Utilities - Helper classes
*/