:root {
    --bg: #1f2330;
    --text: #e8edf4;
    --muted: #9aa8bb;
    --line: #3a4960;
    --gold: #f2c14e;
    --pixel: 'Pixelify Sans', ui-monospace, monospace;
    --body: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.75;
    overflow-x: hidden;
}

a { color: var(--gold); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

#container { max-width: 980px; margin: 0 auto; padding: 0 24px; }

h1, h2 { font-family: var(--pixel); font-weight: 600; margin: 0; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1.15; margin-bottom: 20px; }
h2 { font-size: 2rem; margin-bottom: 28px; }

/* intro */
#firstPage {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 56px;
    align-items: center;
    padding: 88px 0 80px;
}
#personalPhoto {
    display: block;
    width: 240px;
    height: 240px;
    object-fit: cover;
    border: 2px solid var(--line);
    box-shadow: 8px 8px 0 var(--gold);
}
#infoContent p { max-width: 62ch; margin: 0 0 1em; }

/* sections */
section { padding: 64px 0; border-top: 2px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 32px 24px; }
.title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 10px; }
.title a { font-size: .9rem; }
.video iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 2px solid var(--line); background: #141b26; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 2px solid var(--line);
    position: relative;
    transition: transform .25s ease, box-shadow .25s ease;
}
.gallery img:hover {
    transform: scale(1.8);
    z-index: 5;
    border-color: var(--gold);
    box-shadow: 0 12px 32px rgba(0, 0, 0, .5);
}
.gallery img:nth-child(4n + 1) { transform-origin: left center; }
.gallery img:nth-child(4n) { transform-origin: right center; }

footer { padding: 32px 0 56px; border-top: 2px solid var(--line); color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
    #firstPage { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 48px; }
    .gallery { grid-template-columns: 1fr 1fr; }
    .gallery img:nth-child(n) { transform-origin: center; }
    .gallery img:nth-child(odd) { transform-origin: left center; }
    .gallery img:nth-child(even) { transform-origin: right center; }
    .gallery img:hover { transform: scale(1.4); }
}

@media (prefers-reduced-motion: reduce) {
    .gallery img { transition: none; }
}