/* ANATOMY OF A WORLD
   Main stylesheet
*/

* {
    box-sizing: border-box;
}

html {
    background: #000;
}

body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #e8e8e8;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    line-height: 1.65;
}

a {
    color: #d8d8d8;
    text-decoration: none;
    transition: color 160ms ease, text-decoration-color 160ms ease;
}

a:hover,
a:focus {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site {
    width: min(1100px, calc(100% - 48px));
    margin: 0 auto;
    padding: 34px 0 80px;
}

.site-title {
    display: inline-block;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.site-title:hover,
.site-title:focus {
    text-decoration: none;
    opacity: 0.72;
}

nav {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 7px 20px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.88rem;
}

nav a {
    color: #aaa;
}

nav a:hover,
nav a:focus {
    color: #fff;
}

main {
    width: min(800px, 100%);
    margin: 90px auto 0;
}

.hero-image {
    display: block;
    width: 100%;
    max-height: 75vh;
    object-fit: contain;
    margin: 0 auto;
}

.quote {
    max-width: 650px;
    margin: 28px auto 0;
    padding: 0 20px;
    text-align: center;
    color: #c7c7c7;
    font-size: 1.05rem;
    font-style: italic;
}

.quote cite {
    display: block;
    margin-top: 9px;
    color: #888;
    font-size: 0.85rem;
    font-style: normal;
}

.page {
    margin-top: 75px;
    max-width: 760px;
}

.page h1 {
    margin: 0 0 30px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.6rem;
    font-weight: 500;
}

.page p {
    margin: 0 0 1.2em;
}

.page a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================
   FAVORITES: FILM STACK
   ========================= */

.favorites-page {
    width: 100%;
    max-width: none;
    margin-top: 75px;
}

.favorites-page h1 {
    margin-bottom: 30px;
}

.favorites-intro {
    margin: 0;
}

/*
   The posters are arranged horizontally.
   The filenames 01–10 are only position labels, NOT rankings.

   Every poster has the same vertical position.
   The tiny horizontal overlap creates the depth effect.
*/

.film-stack-wrap {
    width: 100%;
    margin-top: 24px;
    overflow: visible;
}

.film-stack {
    position: relative;
    width: 100%;
    height: 390px;
}

.film {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 165px;
    height: 248px;
    transform: translate(-50%, -50%) translateX(var(--x));
    transition:
        transform 280ms cubic-bezier(.2, .75, .25, 1),
        filter 280ms ease;
    z-index: var(--z);
}

.film img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #444;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}

.film-info {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 18px 14px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.94),
        rgba(0, 0, 0, 0.18) 65%,
        transparent
    );
    opacity: 0;
    transition: opacity 200ms ease;
}

.film-title {
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.film-director,
.film-year {
    color: #ccc;
    font-size: 13px;
    line-height: 1.35;
}

.film:hover {
    z-index: 100 !important;
    transform:
        translate(-50%, -50%)
        translateX(var(--x))
        translateY(-18px)
        scale(1.28);
    filter: brightness(1.08);
}

.film:hover .film-info {
    opacity: 1;
}

/* Same Y position for every poster: no arch. */
.film:nth-child(1)  { --x: -495px; --z: 1; }
.film:nth-child(2)  { --x: -385px; --z: 2; }
.film:nth-child(3)  { --x: -275px; --z: 3; }
.film:nth-child(4)  { --x: -165px; --z: 4; }
.film:nth-child(5)  { --x: -55px;  --z: 5; }
.film:nth-child(6)  { --x: 55px;   --z: 6; }
.film:nth-child(7)  { --x: 165px;  --z: 7; }
.film:nth-child(8)  { --x: 275px;  --z: 8; }
.film:nth-child(9)  { --x: 385px;  --z: 9; }
.film:nth-child(10) { --x: 495px;  --z: 10; }

.favorites-games {
    margin-top: 58px;
}

.favorites-note {
    margin: 0;
    text-align: center;
    color: #999;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
}

.divider {
    margin-top: 45px;
    border: 0;
    border-top: 1px solid #222;
}

.back-top {
    display: block;
    width: fit-content;
    margin: 25px auto 0;
    color: #888;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
}

.back-top:hover {
    color: #fff;
}

@media (max-width: 1000px) {
    .film-stack-wrap {
        overflow-x: auto;
        overflow-y: visible;
        padding: 0 30px 25px;
    }

    .film-stack {
        width: 1000px;
        min-width: 1000px;
    }
}

@media (max-width: 600px) {
    .site {
        width: min(100% - 30px, 1100px);
        padding-top: 24px;
    }

    nav {
        gap: 5px 15px;
    }

    main {
        margin-top: 60px;
    }

    .page {
        margin-top: 55px;
    }

    .favorites-page {
        margin-top: 55px;
    }

    .film-stack {
        width: 850px;
        min-width: 850px;
    }

    .film {
        width: 145px;
        height: 218px;
    }

    .film:nth-child(1)  { --x: -400px; }
    .film:nth-child(2)  { --x: -310px; }
    .film:nth-child(3)  { --x: -220px; }
    .film:nth-child(4)  { --x: -130px; }
    .film:nth-child(5)  { --x: -40px; }
    .film:nth-child(6)  { --x: 40px; }
    .film:nth-child(7)  { --x: 130px; }
    .film:nth-child(8)  { --x: 220px; }
    .film:nth-child(9)  { --x: 310px; }
    .film:nth-child(10) { --x: 400px; }
}


/* =========================
   ABOUT
   ========================= */

.about-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 46px;
    align-items: start;
}

.about-profile {
    text-align: center;
}

.about-avatar {
    width: 150px;
    height: 150px;
    margin: 0 auto 18px;
    border: 1px solid #444;
    border-radius: 50%;
    object-fit: cover;
    background: #111;
}

.about-name {
    margin: 0;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.15rem;
    font-weight: 500;
}

.about-handle {
    margin: 3px 0 0;
    color: #777;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
}

.about-copy p {
    margin: 0 0 1.2em;
}

.currently {
    margin-top: 42px;
}

.currently h2 {
    margin: 0 0 18px;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.currently-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid #222;
    background: #222;
}

.currently-item {
    min-height: 92px;
    padding: 15px 17px;
    background: #000;
}

.currently-label {
    display: block;
    margin-bottom: 6px;
    color: #777;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.currently-item strong {
    color: #ddd;
    font-weight: normal;
}

@media (max-width: 700px) {
    .about-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .about-profile {
        text-align: left;
        display: grid;
        grid-template-columns: 90px 1fr;
        column-gap: 18px;
        align-items: center;
    }

    .about-avatar {
        width: 90px;
        height: 90px;
        grid-row: span 2;
        margin: 0;
    }

    .currently-grid {
        grid-template-columns: 1fr;
    }
}
