/* Yamaç Uslu — site styles */
/* Layout: a contact sheet. Every photo keeps its own proportions and stands on its row's baseline,
   a wide-tracked bold name with a stacked lowercase menu beside it. */
:root {
    --paper: #FFFFFF;     /* the gallery wall */
    --ink: #000000;
    --muted: #A6A6A6;
    --tile: #F2F2F2;      /* empty print while a photo loads */
    --line: #EBEBEB;
    --mat: #FFFFFF;       /* passe-partout around each print */
    --edge: rgba(0, 0, 0, .07);
    --shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 14px 28px -14px rgba(0, 0, 0, .28);
    --shadow-lift: 0 2px 2px rgba(0, 0, 0, .05), 0 26px 44px -18px rgba(0, 0, 0, .34);
    --matw: clamp(2.5px, .375vw, 7px);   /* mat width: half of the original */
    --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --ease: cubic-bezier(.16, 1, .3, 1);
    --ease-io: cubic-bezier(.65, 0, .25, 1);
    --gutter: clamp(22px, 5.5vw, 104px);   /* wider margins and gaps: photos a little smaller, more air between them */
    --gap: clamp(20px, 4.2vw, 76px);
    --cols: 2;
    color-scheme: light;
}
/* Black mode: a dark exhibition room, white-matted prints */
:root[data-theme="dark"] {
    --paper: #0E0E0E; --ink: #F4F4F4; --muted: #6E6E6E; --tile: #1E1E1E; --line: #222222;
    --mat: #F6F6F4; --edge: rgba(0, 0, 0, .4);
    --shadow: 0 1px 1px rgba(0, 0, 0, .5), 0 16px 32px -14px rgba(0, 0, 0, .9);
    --shadow-lift: 0 2px 2px rgba(0, 0, 0, .5), 0 30px 50px -18px rgba(0, 0, 0, 1);
    color-scheme: dark;
}
@media (min-width: 700px)  { :root { --cols: 4; } }
@media (min-width: 1100px) { :root { --cols: 9; --gap: clamp(14px, 1.7vw, 34px); } }   /* 9 per row: tighter gaps so the photos stay readable */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
    background: var(--paper); color: var(--ink);
    font: 700 13px/1.25 var(--font);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;   /* older Safari */
    overflow-x: clip;
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
    transition: background-color .6s ease, color .6s ease;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
a, button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }   /* no tap delay / grey flash on iPhone */
img { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-user-drag: none; }
.is-locked body { overflow: hidden; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Header ---------- */
.head {
    position: sticky; top: 0; z-index: 10; background: var(--paper); transition: background-color .6s ease, border-color .4s;
    display: flex; align-items: center; gap: clamp(20px, 4vw, 72px);
    padding: max(env(safe-area-inset-top, 0px), clamp(18px, 3vw, 48px)) var(--gutter) clamp(18px, 2.9vw, 48px);   /* bar is 1/4 thinner than before */
    border-bottom: 1px solid transparent;
}
.head.is-scrolled { border-bottom-color: var(--line); }
.name {
    font-size: clamp(22px, 3.3vw, 52px); line-height: .9; letter-spacing: .2em;
    text-transform: uppercase; white-space: nowrap; margin: 0; margin-right: -.2em;
}
.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; text-transform: lowercase; font-size: 15px; }
.menu a, .menu button { display: inline-flex; align-items: flex-start; gap: 3px; color: var(--ink); transition: color .3s; }
.menu a:hover, .menu button:hover { color: var(--muted); }
.menu [aria-current="page"], .menu [aria-expanded="true"] { color: var(--muted); }
.menu sup { font-size: 9px; line-height: 1; padding-top: 1px; font-variant-numeric: tabular-nums; }
.controls { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 26px; font-size: 15px; }
.density { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.density span { margin-right: 2px; }
.density button { color: var(--muted); min-width: 12px; font-variant-numeric: tabular-nums; transition: color .3s; }
.density button:hover, .density button[aria-pressed="true"] { color: var(--ink); }
html:not(.js) .controls { display: none; }

/* ---------- Grid ---------- */
/* Masonry: columns of prints in their original proportions, packed without gaps */
.sheet {
    list-style: none; margin: 0; padding: clamp(12px, 2vw, 28px) var(--gutter) clamp(64px, 8vw, 140px);
    columns: var(--cols); column-gap: var(--gap);
}
.sheet li[data-cat] { break-inside: avoid; margin-bottom: var(--gap); }
/* With JS, columns are built explicitly so the reading order runs left to right */
.sheet.is-masonry { columns: auto; display: flex; align-items: flex-start; gap: var(--gap); }
.col { flex: 1 1 0; min-width: 0; will-change: transform; }   /* columns start at uneven heights and float slowly up and down */
.col-list { list-style: none; margin: 0; padding: 0; }
/* Each photo sits in a thin white mat with a soft shadow, like a print on the wall (no hover movement) */
.tile {
    display: block; padding: var(--matw); background: var(--mat);
    box-shadow: var(--shadow); outline: 1px solid var(--edge); outline-offset: -1px;
    transition: background-color .6s ease;
}
.tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.tile picture { display: block; overflow: hidden; background: var(--tile); }
.tile img {
    display: block; width: 100%; height: auto;   /* original proportions, never cropped */
}
/* Photos appear at full strength straight away (no faded "develop" effect) */
.tile.is-lifted img { opacity: 0 !important; transition: none !important; }
/* Phone with 1 photo per row: photos run the full width of the screen (100%) */
.one-up .sheet { padding-left: 0; padding-right: 0; }
.one-up .tile { padding: 0; box-shadow: none; outline: 0; }
.one-up .label { padding: 0 var(--gutter); }
.is-locked .sheet li[data-cat]:hover > .tile, .is-locked .sheet li[data-cat]:hover > .tile img { transform: none; transition: none; }
/* Wall label, as beside a print in an exhibition */
.label { margin: 10px 0 0; font-size: 11px; line-height: 1.3; display: grid; }
.label span { color: var(--muted); }
.label .no { font-variant-numeric: tabular-nums; margin-bottom: 1px; }   /* exhibition number */
.empty { padding: 12vh var(--gutter); margin: 0; color: var(--muted); }


/* Smooth morph when the density or category changes (View Transitions where supported) */
::view-transition-group(*) { animation-duration: .7s; animation-timing-function: var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation: none; }
.sheet.is-fading { opacity: 0; transition: opacity .3s; }

/* ---------- Footer ---------- */
.foot {
    display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 0 var(--gutter) max(env(safe-area-inset-bottom, 0px), clamp(20px, 3vw, 40px));
    color: var(--muted);
}
.foot a { color: var(--ink); }
.foot a:hover { color: var(--muted); }

.m-icons { display: none; }
.m-icon { display: grid; place-items: center; width: 40px; height: 40px; color: var(--ink); transition: opacity .3s; }
.m-icon svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.m-icon:active, .m-icon[aria-expanded="true"] { opacity: .5; }

/* Phone header: name with two icons on the first line, categories on the second,
   grid and mode settings on the third, spread across the full width */
@media (max-width: 699px) {
    .head {
        display: grid; grid-template-columns: 1fr auto; align-items: center;
        grid-template-areas: "name icons" "menu menu" "controls controls"; row-gap: 14px; column-gap: 8px;
    }
    .name { grid-area: name; font-size: clamp(22px, 7.4vw, 34px); }
    .m-icons { grid-area: icons; display: flex; gap: 2px; margin-right: -9px; }
    .menu { grid-area: menu; gap: 6px 20px; font-size: 15px; }
    .menu .desk-only { display: none; }
    .controls { grid-area: controls; margin-left: 0; display: flex; flex-wrap: nowrap; justify-content: space-between; font-size: 14px; gap: 6px 16px; }
}

/* ---------- Overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 30; background: var(--paper); visibility: hidden; opacity: 0; transition: opacity .45s ease, visibility 0s linear .45s; }
.overlay.is-open { visibility: visible; opacity: 1; transition: opacity .45s ease; }

/* Info */
.info { overflow-y: auto; }
.info .head { position: static; }
.info-body {
    display: grid; gap: clamp(32px, 4vw, 56px); align-content: start;
    padding: clamp(24px, 5vw, 80px) var(--gutter) clamp(48px, 6vw, 96px);
}
.lede { margin: 0; font-size: clamp(24px, 3vw, 44px); line-height: 1.08; letter-spacing: -.02em; max-width: 18ch; }
.contact { display: grid; gap: 16px; justify-items: start; font-size: 15px; }
.contact p { margin: 0; }
.send { display: inline-block; padding: 13px 22px; background: var(--ink); color: var(--paper); font-size: 14px; transition: opacity .3s; }
.send:hover { opacity: .75; }
.handle a { color: var(--muted); }
.handle a:hover { color: var(--ink); }

/* Lightbox */
.lb { z-index: 40; background: none; opacity: 1; transition: none; }
.lb.is-open { transition: none; }
.lb-bg { position: absolute; inset: 0; background: var(--paper); opacity: 0; transition: background-color .8s ease; }
.lb.is-open .lb-bg { opacity: 1; }
.lb-img {
    position: fixed; display: block; object-fit: cover; max-width: none; background: var(--tile);
    transition: opacity .25s ease;   /* opens and closes instantly; only the next/previous swap fades */
    cursor: pointer;
}
.lb-img.is-fading { opacity: 0; }
/* Controls float over the full-screen photo; difference blending keeps them readable on any image */
.lb-ui { position: absolute; z-index: 2; opacity: 0; margin: 0; color: #fff; mix-blend-mode: difference; }
.lb.is-open .lb-ui { opacity: 1; }
.lb-count { top: max(env(safe-area-inset-top, 0px), clamp(20px, 3vw, 44px)); left: var(--gutter); font-variant-numeric: tabular-nums; }
.lb-cap { bottom: max(env(safe-area-inset-bottom, 0px), clamp(20px, 3vw, 40px)); left: var(--gutter); right: calc(var(--gutter) + 110px); }
.lb-share { bottom: max(env(safe-area-inset-bottom, 0px), clamp(20px, 3vw, 40px)); right: var(--gutter); padding: 4px 0; }
.lb-share:hover { opacity: .5; }
/* one-time keyboard hint */
.lb-hint {
    position: absolute; z-index: 3; left: 50%; bottom: clamp(56px, 7vw, 96px); transform: translate(-50%, 8px);
    padding: 9px 14px; background: var(--ink); color: var(--paper); font-size: 12px; white-space: nowrap;
    opacity: 0; transition: opacity .5s ease, transform .5s var(--ease); pointer-events: none;
}
.lb-hint.is-on { opacity: 1; transform: translate(-50%, 0); }
.lb-hint kbd { font: inherit; border: 1px solid currentColor; padding: 0 4px; margin: 0 2px; }

/* Colour hanging: the button shows it is on */
.density .is-busy { animation: blink .6s steps(2) infinite; }
.is-flowing .sheet li[data-cat] { pointer-events: none; }
@keyframes blink { 50% { opacity: .3; } }

.name a { -webkit-touch-callout: none; }

/* "cheese": camera flash */
.flash { position: fixed; inset: 0; z-index: 70; background: #fff; opacity: 0; pointer-events: none; }
.flash.is-pop { animation: flash 1.1s ease-out forwards; }
@keyframes flash { 0% { opacity: 1; } 18% { opacity: 1; } 100% { opacity: 0; } }
.snapped .app { animation: fade 2.4s ease-out; }
@keyframes fade { 0% { filter: grayscale(.6) brightness(1.15) contrast(.9); } 100% { filter: none; } }
/* After the flash an instant print comes out of the top edge of the screen, as if the screen were the camera's slot.
   It slides straight down in short pushes (no swinging), then develops; "got you" appears on the right. */
.pol { position: fixed; inset: 0; z-index: 72; background: rgba(0, 0, 0, .18); cursor: pointer; transition: opacity .5s; }
.pol[hidden] { display: none; }
.pol::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 7px; z-index: 2; background: #000; box-shadow: 0 2px 8px rgba(0,0,0,.45); }   /* the slot */
.pol figure {
    position: absolute; left: 50%; top: 0; margin: 0;
    --pw: min(92vw, 640px, calc(85vh - 30px)); width: var(--pw); padding: calc(var(--pw) * .045) calc(var(--pw) * .045) calc(var(--pw) * .19); background: #FBFAF6;
    box-shadow: 0 3px 6px rgba(0,0,0,.15), 0 30px 60px -20px rgba(0,0,0,.55);
    transform: translate(-50%, -100%);
}
.pol img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #222; }
.pol .got { position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%); margin: 0; color: #fff; font-size: clamp(34px, 6vw, 96px); line-height: .9; letter-spacing: -.02em; text-shadow: 0 2px 20px rgba(0,0,0,.35); opacity: 0; transition: opacity .6s; }
.pol.is-drop .got { opacity: 1; transition-delay: 1.55s; }
@media (max-width: 699px) { .pol .got { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 28px); transform: none; } }
.pol.is-drop figure { animation: polIn 1.55s linear forwards; }
/* like a real instant print, the picture develops slowly after it has come out */
.pol img { filter: brightness(1.9) contrast(.35) saturate(0) sepia(.3); opacity: .35; }
.pol.is-drop img { animation: polDev 1.8s ease-out 1.5s forwards; }
@keyframes polDev { to { filter: none; opacity: 1; } }
.pol.is-leave { opacity: 0; }
.pol.is-leave figure { animation: polOut .9s cubic-bezier(.5, 0, .75, 0) forwards; }
/* the printer pushes the print out in short steps */
@keyframes polIn {
    0%   { transform: translate(-50%, -100%); }
    18%  { transform: translate(-50%, -76%); }
    25%  { transform: translate(-50%, -76%); }
    45%  { transform: translate(-50%, -50%); }
    52%  { transform: translate(-50%, -50%); }
    72%  { transform: translate(-50%, -24%); }
    79%  { transform: translate(-50%, -24%); }
    100% { transform: translate(-50%, 28px); }
}
@keyframes polOut { from { transform: translate(-50%, 28px); } to { transform: translate(-50%, 110vh); } }

/* End of the roll: frame counter, then the sheet rewinds to the top */
.rewind { position: fixed; inset: 0; z-index: 65; display: grid; place-content: center; justify-items: center; gap: 10px; background: color-mix(in srgb, var(--paper) 82%, transparent); color: var(--ink); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.rewind.is-on { opacity: 1; visibility: visible; transition: opacity .3s; }
.rewind b { font-size: clamp(64px, 14vw, 200px); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.rewind span { font-size: 15px; color: var(--muted); }
.is-rewinding .sheet { filter: blur(3px); }

/* Full moon: a small pale moon in black mode on full-moon nights */
.moon { position: fixed; right: var(--gutter); bottom: 22px; z-index: 12; width: 16px; height: 16px; border-radius: 50%; background: #F2EEDF; box-shadow: 0 0 14px 3px rgba(255, 248, 225, .28); opacity: .55; transition: opacity .3s; }
.moon[hidden], :root:not([data-theme="dark"]) .moon { display: none; }
.moon span { position: absolute; right: 26px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-size: 12px; font-weight: 700; color: var(--ink); opacity: 0; transition: opacity .3s; pointer-events: none; }
.moon:hover, .moon:focus-visible, .moon.is-on { opacity: 1; }
.moon:hover span, .moon:focus-visible span, .moon.is-on span { opacity: 1; }

/* Breakout (desktop): the bricks are the photographs */
.game { z-index: 45; background: var(--paper); }
.game canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; -webkit-user-select: none; user-select: none; }
.gm-back { position: absolute; z-index: 2; top: clamp(8px, 2.2vw, 32px); right: calc(var(--gutter) + 44px); height: 44px; padding: 0 12px; font-weight: 700; font-size: 15px; color: var(--ink); transition: opacity .3s; }
.gm-back:hover { opacity: .55; }
.is-game .gm-back { cursor: pointer !important; }
/* easter egg hint at the bottom edge */
.egg { position: fixed; left: 50%; bottom: 18px; z-index: 40; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; padding: 10px 14px; background: var(--paper); color: var(--ink); font-weight: 700; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.egg i { display: block; width: 120px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.egg.is-ready span::after { content: " \2014 let go"; }
.gm-close { position: absolute; z-index: 2; top: clamp(8px, 2.2vw, 32px); right: calc(var(--gutter) - 12px); color: var(--ink); }
.is-game .cursor { display: none; }
.is-game .game, .is-game .game * { cursor: none !important; }
.is-game .gm-close { cursor: pointer !important; }

/* Category curtain: a band of ink sweeps up with the category name, the sheet changes behind it */
.curtain {
    position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none;
    background: var(--ink); color: var(--paper); transform: translateY(100%); visibility: hidden;
}
.curtain span { font-size: clamp(48px, 12vw, 210px); letter-spacing: .2em; margin-right: -.2em; text-transform: uppercase; line-height: 1; }
.curtain.is-run { visibility: visible; animation: curtain 1.2s cubic-bezier(.76, 0, .24, 1) forwards; }
.curtain.is-run span { animation: curtainWord 1.2s cubic-bezier(.76, 0, .24, 1) forwards; }
@keyframes curtain { 0% { transform: translateY(100%); } 40%, 58% { transform: translateY(0); } 100% { transform: translateY(-100%); } }
@keyframes curtainWord { 0% { transform: translateY(80%); opacity: 0; } 40%, 58% { transform: none; opacity: 1; } 100% { transform: translateY(-80%); opacity: 0; } }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; transition: opacity .3s; }
.icon-btn:hover { opacity: .45; }
.icon-btn svg { fill: none; stroke: currentColor; stroke-width: 1.25; }
.lb-close { top: max(env(safe-area-inset-top, 0px), clamp(8px, 2.2vw, 32px)); right: calc(var(--gutter) - 12px); }
.lb-prev, .lb-next { top: 50%; margin-top: -22px; }
.lb-prev { left: calc(var(--gutter) - 14px); }
.lb-next { right: calc(var(--gutter) - 14px); }
@media (max-width: 699px) { .lb-prev, .lb-next { display: none; } }

/* ---------- Cursor: one plain dot ----------
   It sits exactly on the mouse, never changes size and never trails behind.
   Difference blending keeps it black on the white wall and white on the black wall. */
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input, .has-cursor textarea { cursor: text !important; }
.cursor {
    position: fixed; left: 0; top: 0; z-index: 100; width: 10px; height: 10px; margin: -5px 0 0 -5px;
    border-radius: 50%; background: #fff; pointer-events: none;
    mix-blend-mode: difference; opacity: 0; will-change: transform;
}
.cursor.is-visible { opacity: 1; }

/* end of site.css */
