/* Project pages: each project is a "level", same look as the level select screen */

@property --a1 { syntax: '<color>'; inherits: true; initial-value: #22c1ff; }
@property --a2 { syntax: '<color>'; inherits: true; initial-value: #a94dff; }

:root {
    --ink: #070708;
    --bone: #ece9e4;
    --muted: rgba(236, 233, 228, 0.55);
    --dim: rgba(236, 233, 228, 0.22);
    --faint: rgba(236, 233, 228, 0.12);
    --font-primary: 'DM Serif Display', serif;
    --font-secondary: 'Jost', sans-serif;
    --flood: linear-gradient(135deg, #22c1ff 0%, #6a5cff 28%, #a94dff 52%, #ff4fa3 78%, #ff7a5c 100%);
    --flood-loop: linear-gradient(90deg,
        #22c1ff 0%, #6a5cff 18%, #a94dff 36%,
        #ff4fa3 54%, #ff7a5c 72%, #a94dff 86%, #22c1ff 100%);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --wide: 1240px;
}

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

body {
    background: var(--ink);
    color: var(--bone);
    font-family: var(--font-secondary);
    font-weight: 300;
    font-size: 1.05rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; }
img, video { display: block; max-width: 100%; }

/* ---- Light and grain, same as the select screen ---- */
.ambient {
    position: fixed;
    inset: -20%;
    z-index: -2;
    background:
        radial-gradient(36% 40% at 78% 14%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 70%),
        radial-gradient(32% 38% at 90% 80%, color-mix(in srgb, var(--a2) 20%, transparent), transparent 72%),
        radial-gradient(30% 34% at 6% 60%, color-mix(in srgb, var(--a2) 10%, transparent), transparent 70%);
    filter: blur(20px);
    animation: breathe 14s ease-in-out infinite alternate;
}

@keyframes breathe {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(-3%, 2%, 0) scale(1.06); }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0.07;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
    0%   { background-position:   0% 50%; }
    100% { background-position: 200% 50%; }
}

.glow {
    background-image: var(--flood-loop);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    animation: drift 6s linear infinite;
}

.wrap {
    max-width: var(--wide);
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 3.4rem);
}

/* ---- Top bar ---- */
.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: clamp(1.2rem, 2.6vw, 2.2rem);
    font-size: 0.72rem;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--muted);
}

.top a { text-decoration: none; transition: color 0.3s ease; }
.top a:hover { color: #ffffff; }
.top__name { color: #ffffff; font-weight: 400; }
.top nav { display: flex; gap: clamp(1rem, 3vw, 2.4rem); }

/* ---- Small labels used everywhere ---- */
.label {
    display: block;
    font-size: 0.64rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
}

/* ---- Level header ---- */
.head {
    padding: clamp(3rem, 8vh, 5.5rem) 0 clamp(1.6rem, 4vh, 2.6rem);
    position: relative;
}

.head__num {
    position: absolute;
    right: -0.04em;
    top: 0.1em;
    z-index: -1;
    font-weight: 900;
    font-size: clamp(8rem, 22vw, 19rem);
    line-height: 1;
    letter-spacing: -0.04em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(236, 233, 228, 0.13);
    pointer-events: none;
}

.head__kicker { margin-bottom: 1rem; }
.head__kicker b { color: #ffffff; font-weight: 400; }

.head__title {
    font-weight: 900;
    font-size: clamp(2.8rem, 8.4vw, 7.4rem);
    letter-spacing: -0.015em;
    line-height: 0.95;
    text-transform: uppercase;
    margin-bottom: 1.4rem;
}

.head__pitch {
    font-family: var(--font-primary);
    font-size: clamp(1.3rem, 2.4vw, 1.95rem);
    line-height: 1.3;
    max-width: 30ch;
}

/* ---- Quick read: everything a recruiter needs in ten seconds ---- */
.quick {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border-top: 1px solid var(--faint);
    border-bottom: 1px solid var(--faint);
    margin-top: clamp(1.6rem, 4vh, 2.6rem);
}

.quick > div {
    padding: 1.1rem 1.2rem 1.1rem 0;
}

.quick > div + div {
    padding-left: 1.2rem;
    border-left: 1px solid var(--faint);
}

.quick dd {
    margin-top: 0.35rem;
    line-height: 1.4;
    color: #ffffff;
    font-weight: 400;
}

/* ---- Big numbers ---- */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.4rem clamp(2rem, 5vw, 4.4rem);
    padding: clamp(1.6rem, 4vh, 2.4rem) 0;
}

.stat__value {
    display: block;
    font-family: var(--font-primary);
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    line-height: 1;
    margin-bottom: 0.45rem;
}

/* ---- Main picture or video ---- */
.hero {
    position: relative;
    margin: clamp(0.6rem, 2vh, 1.4rem) 0 0;
    background: #0e0e14;
    box-shadow:
        0 50px 110px -40px color-mix(in srgb, var(--a1) 55%, transparent),
        0 0 0 1px rgba(236, 233, 228, 0.1);
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background-image: var(--flood-loop);
    background-size: 200% 100%;
    animation: drift 6s linear infinite;
}

.hero img { width: 100%; height: auto; }

/* a tall game capture stands in the middle, on its own colour */
.hero--tall {
    display: flex;
    justify-content: center;
    padding: clamp(1.4rem, 4vw, 3rem) 0;
    background: color-mix(in srgb, var(--a2) 18%, #0e0e14);
}

.hero--tall img { width: auto; max-height: min(72vh, 620px); }

.hero--video { aspect-ratio: 16 / 9; }
.hero--video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* no pictures yet: the cover gradient with the name */
.hero--flood {
    aspect-ratio: 16 / 7;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--flood);
    background-size: 220% 220%;
    animation: floodshift 13s ease-in-out infinite;
}

.hero--flood span {
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 4.6rem);
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: #ffffff;
}

@keyframes floodshift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* ---- Sections: label on the left, content on the right ---- */
.block {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: clamp(1rem, 4vw, 4rem);
    padding: clamp(3rem, 8vh, 5rem) 0 0;
}

.block__title {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 0.5rem;
}

.block__title b {
    display: block;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: 2.4rem;
    letter-spacing: 0;
    line-height: 1;
    color: var(--dim);
    margin-bottom: 0.6rem;
}

.lead {
    font-family: var(--font-primary);
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    line-height: 1.4;
    max-width: 36ch;
}

.lead + p, .block p + p { margin-top: 1rem; }
.block p { max-width: 62ch; }
.block p strong { color: #ffffff; font-weight: 400; }

/* ---- Creative / Tech: the two sides of every project ---- */
.sides {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--faint);
    border: 1px solid var(--faint);
}

.side {
    background: rgba(10, 10, 12, 0.88);
    padding: clamp(1.3rem, 2.6vw, 2rem);
}

.side h3 {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 1.1rem;
}

.side h3::before {
    content: "";
    width: 22px;
    height: 3px;
    background-image: var(--flood-loop);
    background-size: 200% 100%;
    animation: drift 6s linear infinite;
}

.side ul { list-style: none; }

.side li {
    position: relative;
    padding: 0.65rem 0 0.65rem 1.3rem;
    border-top: 1px solid var(--faint);
    line-height: 1.55;
}

.side li:first-child { border-top: 0; padding-top: 0; }
.side li:first-child::before { top: 0.05rem; }

.side li::before {
    content: "\25B8";
    position: absolute;
    left: 0;
    top: 0.7rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.side li b { color: #ffffff; font-weight: 400; }

/* ---- Process steps ---- */
.steps { list-style: none; counter-reset: step; }
.label + .steps { margin-top: 1.4rem; }

.step {
    padding: 0 0 clamp(2rem, 5vh, 3rem);
}

.step + .step {
    border-top: 1px solid var(--faint);
    padding-top: clamp(1.6rem, 4vh, 2.4rem);
}

.step h3 {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-family: var(--font-primary);
    font-weight: 400;
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    line-height: 1.2;
    margin-bottom: 0.7rem;
}

.step h3::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    font-family: var(--font-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    color: var(--muted);
}

.step p { max-width: 62ch; }

.shot {
    margin-top: 1.4rem;
    background: #0e0e14;
    box-shadow: 0 0 0 1px rgba(236, 233, 228, 0.08);
}

.shot img { width: 100%; height: auto; }

/* small or tall pictures sit in a calm frame instead of stretching */
.shot--fit {
    display: flex;
    justify-content: center;
    padding: clamp(1rem, 3vw, 2rem);
}

.shot--fit img { width: auto; max-width: 100%; max-height: 520px; }

.shot--light { background: #f4f1ec; }

.shot--pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--faint);
}

.shot--pair img { height: 100%; object-fit: cover; }

.shot--pair.shot--fit-each { background: transparent; box-shadow: none; gap: 1rem; }
.shot--pair.shot--fit-each img { object-fit: contain; max-height: 520px; margin: 0 auto; width: auto; }

.caption {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* ---- Results ---- */
.wins { list-style: none; }

.wins li {
    padding: 0.75rem 0;
    border-top: 1px solid var(--faint);
}

.wins li:last-child { border-bottom: 1px solid var(--faint); }
.wins b { color: #ffffff; font-weight: 400; }

/* ---- Play it ---- */
.playit {
    display: flex;
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2.4rem);
    padding: clamp(1.2rem, 2.6vw, 1.8rem);
    border: 1px solid var(--faint);
    background: rgba(10, 10, 12, 0.7);
}

.playit img {
    width: 140px;
    background: #ffffff;
    padding: 6px;
    flex: 0 0 auto;
}

.playit p { margin: 0; }
.playit .lead { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 0.4rem; }

.go {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.74rem;
    font-weight: 400;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid rgba(236, 233, 228, 0.35);
    transition: border-color 0.3s ease, gap 0.4s var(--ease);
}

.go:hover { border-color: #ffffff; gap: 1.1rem; }

/* parts she still has to fill */
.todo {
    border: 1px dashed rgba(236, 233, 228, 0.35);
    color: var(--muted);
    padding: 1rem 1.2rem;
    font-size: 0.95rem;
}

.todo + .todo { margin-top: 0.8rem; }

/* ---- Next level ---- */
.next {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 2rem;
    align-items: end;
    margin-top: clamp(4rem, 10vh, 7rem);
    padding: clamp(1.6rem, 4vh, 2.6rem) 0;
    border-top: 1px solid var(--faint);
}

.next__prev { align-self: center; }

.next__to {
    justify-self: end;
    text-align: right;
    text-decoration: none;
}

.next__name {
    display: block;
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: -0.015em;
    line-height: 0.95;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.3s ease;
    margin-top: 0.5rem;
}

.next__to:hover .next__name {
    background-image: var(--flood-loop);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: drift 6s linear infinite;
}

.bar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.2rem 0 clamp(1.4rem, 3vw, 2.2rem);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
}

.bar__keys { display: flex; gap: 1.6rem; }

.key {
    display: inline-block;
    min-width: 1.7em;
    padding: 0.05em 0.4em;
    border: 1px solid rgba(236, 233, 228, 0.3);
    border-radius: 3px;
    text-align: center;
    letter-spacing: 0;
    font-size: 0.66rem;
    color: var(--bone);
    margin-right: 0.4rem;
}

/* ---- Locked level ---- */
.lock {
    border: 1px solid var(--faint);
    background: rgba(10, 10, 12, 0.85);
    padding: clamp(1.6rem, 4vw, 2.6rem);
}

.lock p { color: var(--muted); }

.lock form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.lock input {
    flex: 1 1 220px;
    background: transparent;
    border: 1px solid rgba(236, 233, 228, 0.3);
    color: var(--bone);
    font: inherit;
    padding: 0.7rem 0.9rem;
}

.lock input:focus { outline: none; border-color: var(--bone); }

.lock button {
    font: inherit;
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #ffffff;
    border: 0;
    padding: 0.7rem 1.4rem;
    cursor: pointer;
    background: var(--flood);
    background-size: 220% 220%;
    animation: floodshift 13s ease-in-out infinite;
}

.lock__error {
    display: none;
    width: 100%;
    color: #ff7a8a !important;
    margin: 0.2rem 0 0;
}

.lock.is-wrong .lock__error { display: block; }

.lock-ico {
    display: inline-block;
    width: 0.62em;
    height: 0.7em;
    vertical-align: 0.02em;
    margin-left: 0.25em;
}

/* ---- Small screens ---- */
@media (max-width: 820px) {
    .top { letter-spacing: 0.16em; font-size: 0.66rem; }
    .top nav { gap: 1rem; }
    .top__about { display: none; }

    .quick { grid-template-columns: 1fr 1fr; }
    .quick > div, .quick > div + div { padding: 0.9rem 0.8rem 0.9rem 0; border-left: 0; }
    .quick > div:nth-child(even) { padding-left: 0.8rem; border-left: 1px solid var(--faint); }
    .quick > div:nth-child(n+3) { border-top: 1px solid var(--faint); }

    .block { grid-template-columns: 1fr; gap: 1rem; }
    .block__title b { font-size: 1.8rem; }

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

    .playit { flex-direction: column; align-items: flex-start; }

    .next { grid-template-columns: 1fr; }
    .next__to { justify-self: start; text-align: left; }

    .bar__keys { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* "to add" notes inside the Creative / Tech lists */
.side li .todo { display: block; margin: 0.2rem 0; }

/* ---- Back button, always in the corner ---- */
.back-float {
    position: fixed;
    left: clamp(0.8rem, 2vw, 1.6rem);
    bottom: clamp(0.8rem, 2vw, 1.6rem);
    z-index: 40;
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.9rem 0.55rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
    background: rgba(12, 12, 14, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(236, 233, 228, 0.16);
    border-radius: 999px;
    transition: border-color 0.3s ease, gap 0.4s var(--ease);
}

.back-float .key { margin-right: 0; }
.back-float:hover { border-color: rgba(236, 233, 228, 0.5); gap: 1rem; }

@media (max-width: 820px) {
    .back-float .key { display: none; }
    .back-float { padding: 0.6rem 1rem; }
}

/* room at the very bottom so the back button never covers the footer */
.bar { padding-bottom: 5.2rem; }

/* gameplay video as the main picture */
.hero video { width: 100%; height: auto; display: block; }
.shot video { width: 100%; height: auto; display: block; }

/* hides a few stray pixel rows at the bottom of a clip */
.shot--trim { aspect-ratio: 16 / 9; overflow: hidden; }
.shot--trim video { height: 100%; object-fit: cover; object-position: top; }
