:root {
    --paper: #ffffff;
    --ink:   #000000;
    --lime:  #c6ff00;
    --stone: #e6e6e6;
    --moss:  #1f7a3f;

    --font: "Barlow", "Helvetica Neue", Arial, sans-serif;
    --rail: clamp(4.25rem, 13vw, 7rem); /* width of the vertical name on the right */
}

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

html {
    background: var(--paper);
    color: var(--ink);
}

body {
    margin: 0;
    padding-right: var(--rail);
    font: 500 1rem/1.3 var(--font);
    overflow-x: hidden;
}

a { color: var(--moss); }

:focus-visible {
    outline: 3px solid var(--moss);
    outline-offset: 3px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ---------- Vertical name and links on the right edge ---------- */

site-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--rail);
    z-index: 10;
}

site-nav ul {
    writing-mode: vertical-rl;
    list-style: none;
    margin: 0;
    padding: 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

site-nav a {
    color: var(--ink);
    text-decoration: none;
    font-size: 1.125rem;
}

site-nav .mark a {
    font-size: calc(var(--rail) * 0.68);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.01em;
}

site-nav li:not(.mark) a[aria-current="page"],
site-nav a:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

/* ---------- Page content ---------- */

content-switcher {
    display: block;
    max-width: 42rem;
    margin: 0 auto;
    padding: 0 1.25rem 5rem;
}
content-switcher:focus { outline: none; }

h1 {
    margin: 2rem 0 0.75rem;
    font-size: clamp(3.5rem, 15vw, 7.5rem);
    font-weight: 500;
    line-height: 0.9;
    letter-spacing: -0.02em;
}

h2 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
}

p { margin: 0 0 1rem; }

.intro {
    max-width: 28ch;
    margin-bottom: 4rem;
    font-size: 1.25rem;
}

.status { color: var(--moss); }

/* Devlog entries */
.entries > * {
    padding-top: 1rem;
    border-top: 2px solid var(--ink);
    margin-bottom: 3.5rem;
}

/* ---------- Front page poster ---------- */

.poster {
    position: relative;
    aspect-ratio: 600 / 850; /* grows taller if the games need more room */
    margin: 0 -1.25rem;
    padding: 46% 1.25rem 2rem;
}

.poster-art {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    aspect-ratio: 600 / 850; /* explicit size, so every browser gives it height */
    overflow: hidden;
    z-index: 0;
}
.poster-art .sun  { fill: var(--lime); }
.poster-art path  { fill: none; }
.poster-art text  { font: 500 170px var(--font); fill: var(--ink); }

.poster .games { position: relative; z-index: 1; width: 55%; }

/* ---------- Game entries: tilted title, grey picture, sideways link ---------- */

.game {
    position: relative;
    isolation: isolate;
    padding-left: 2.5rem;
    margin-bottom: 5rem;
}

.game .shot {
    position: absolute;
    top: -2.75rem;
    left: 4.5rem;
    width: 8.5rem;
    aspect-ratio: 1;
    background: var(--stone);
    transform: rotate(15deg);
    z-index: -1;
}
.game + .game .shot { transform: rotate(30deg); }

.game h2 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
    white-space: nowrap;
    transform: rotate(25deg);
    transform-origin: 0 50%;
}

.game p {
    max-width: 16rem;
    font-size: 0.9375rem;
    line-height: 1.2;
}

/* Keeps the first lines of text out from under the tilted title */
.game .wedge {
    float: right;
    width: 100%;
    height: 8rem; /* slope matches the 25° title */
    shape-outside: polygon(0 0, 100% 0, 100% 100%);
}

.game-link {
    position: absolute;
    top: 3rem;
    left: 0;
    writing-mode: vertical-rl;
    text-decoration: none;
}
.game-link:hover { text-decoration: underline; }

/* ---------- Phones: show the whole poster first, games underneath ---------- */

@media (max-width: 34rem) {
    .poster { aspect-ratio: auto; padding-top: 152%; }
    .poster .games { width: 100%; }
}

/* ---------- Wide screens: let the letters run past the poster's edges ---------- */

@media (min-width: 50rem) {
    .poster-art { overflow: visible; }
}
