/* Layout: one hairline-ruled frame with a sticky header. The hero's line field flows around the name; a fitted condensed title, a warped "since 2024" grid, services that filter the work, a showcase in each project's own colour above a filterable index, and a contact form. Each project has its own page (proje.php). Duotone per surface, inverted with one switch. */
:root {
  --ultramarine: #2B2BD9;
  --paper: #ECEAE2;
  --bg: var(--ultramarine);
  --fg: var(--paper);
  --rule: rgba(236, 234, 226, .38);
  --soft: rgba(236, 234, 226, .78);
  --veil: rgba(12, 12, 20, .62);
  --display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Newsreader", Georgia, "Times New Roman", serif;
  --code: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --tap: 44px;
  color-scheme: dark;
}
:root.inv {
  --bg: var(--paper);
  --fg: var(--ultramarine);
  --rule: color-mix(in srgb, var(--ultramarine) 34%, transparent);
  --soft: color-mix(in srgb, var(--ultramarine) 82%, transparent);
  --veil: rgba(236, 234, 226, .7);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-behavior: smooth; }
html.locked { overflow: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 16px;
  transition: background-color .35s ease, color .35s ease;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
::selection { background: var(--fg); color: var(--bg); }
button { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.frame { border: 1px solid var(--fg); max-width: 1440px; margin: 0 auto; }
section.block, .since { scroll-margin-top: 90px; }

/* ---------- header (sticky) ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--bg); display: grid; grid-template-columns: auto 1fr auto auto; border-bottom: 1px solid var(--fg); transition: background-color .35s ease; }
.top > * { border-right: 1px solid var(--rule); }
.top > *:last-child { border-right: 0; }
.mark { display: grid; place-items: center; padding: 10px 18px; font-family: var(--display); font-weight: 900; font-size: 2.1rem; line-height: .8; letter-spacing: -.02em; text-decoration: none; }
.mark span { display: block; transform: scaleY(1.25); }
.nav { display: flex; align-items: stretch; }
.nav a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 10px 14px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .06em; border-right: 1px solid var(--rule); }
.nav a:last-child { border-right: 0; }
.nav a:hover, .nav a[aria-current="true"] { background: var(--fg); color: var(--bg); }
.tools { display: flex; }
.tools button { appearance: none; border: 0; background: none; cursor: pointer; min-width: var(--tap); font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .06em; padding: 10px 16px; border-right: 1px solid var(--rule); }
.tools button:last-child { border-right: 0; }
.tools button:hover { background: var(--fg); color: var(--bg); }
.dot { display: inline-block; width: 1em; height: 1em; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); vertical-align: -.15em; }
.status { display: grid; font-size: .92rem; line-height: 1.25; }
.status p, .status a { margin: 0; padding: 6px 16px; min-height: var(--tap); display: flex; align-items: center; }
.status > * + * { border-top: 1px solid var(--rule); }
.status a { text-decoration: underline; text-underline-offset: 3px; }
.status a:hover { background: var(--fg); color: var(--bg); }
.live { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 8px; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.clock { font-variant-numeric: tabular-nums; margin-left: .3em; }

/* ---------- hero ---------- */
.hero { position: relative; height: clamp(300px, 36vw, 500px); border-bottom: 1px solid var(--fg); overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-cta { position: absolute; left: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 10px; }
.badge { position: absolute; right: clamp(14px, 3vw, 40px); bottom: clamp(14px, 3vw, 40px); width: clamp(96px, 12vw, 140px); aspect-ratio: 1; max-width: 100%; border-radius: 50%; background: var(--bg); border: 1px solid var(--fg); display: grid; place-items: center; text-decoration: none; }
.badge svg { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 28s linear infinite; }
.badge text { font-family: var(--display); font-weight: 700; font-size: 11.5px; letter-spacing: .14em; fill: var(--fg); }
.badge b { font-family: var(--display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 900; line-height: 1; }
.badge:hover { background: var(--fg); color: var(--bg); }
.badge:hover text { fill: var(--bg); }
@keyframes spin { to { transform: rotate(360deg); } }

.title { padding: 14px 16px 8px; border-bottom: 1px solid var(--fg); overflow: hidden; }
.title h1 { margin: 0; font-family: var(--display); font-weight: 900; line-height: .84; letter-spacing: -.01em; }
.title .line { display: block; overflow: hidden; }
.title .fit { display: block; width: max-content; white-space: nowrap; font-size: 15vw; padding-block: .12em .03em; animation: rise 1.1s cubic-bezier(.2, .8, .15, 1) both; }
.title .line + .line .fit { animation-delay: .12s; }
.title .plus { display: inline-block; font-weight: 500; transform: translateY(-.06em); padding: 0 .08em; }
@keyframes rise { from { transform: translateY(102%); } }

/* ---------- buttons ---------- */
.btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap); background: var(--fg); color: var(--bg); border: 1px solid var(--fg); font-family: var(--display); font-weight: 700; font-size: 1.1rem; letter-spacing: .05em; padding: 6px 22px; border-radius: 999px; text-decoration: none; }
.btn:hover { background: var(--bg); color: var(--fg); }
.btn.ghost { background: var(--bg); color: var(--fg); }
.btn.ghost:hover { background: var(--fg); color: var(--bg); }
.btn:disabled { opacity: .55; cursor: progress; }

/* ---------- ticker ---------- */
.ticker { border-bottom: 1px solid var(--fg); overflow: hidden; white-space: nowrap; font-family: var(--code); font-size: .72rem; padding: 7px 0; color: var(--soft); }
.ticker div { display: inline-block; animation: run 60s linear infinite; }
@keyframes run { to { transform: translateX(-50%); } }

/* ---------- since ---------- */
.since { position: relative; height: clamp(280px, 40vw, 540px); border-bottom: 1px solid var(--fg); overflow: hidden; }
.since canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.since-stats { position: absolute; left: 16px; top: 16px; margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.15rem, 2vw, 1.6rem); letter-spacing: .03em; background: var(--bg); padding: 2px 10px; }
.since-copy { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 24px; }
.since h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(3.6rem, 13vw, 12rem); line-height: .82; background: var(--bg); padding: 0 .06em; }
.since-copy p { margin: 0; max-width: 30ch; font-style: italic; font-size: clamp(1.05rem, 1.6vw, 1.3rem); background: var(--bg); padding: 4px 8px; }

/* ---------- section heads ---------- */
section.block { border-bottom: 1px solid var(--fg); }
.block-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 10px 16px; padding: 18px 16px 12px; border-bottom: 1px solid var(--rule); }
.block-head h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2.6rem, 7vw, 5.5rem); line-height: .9; }
.block-head p { margin: 0; font-style: italic; color: var(--soft); }

/* about */
.about { display: grid; grid-template-columns: 1.1fr 1fr; }
.about > div { padding: 22px 16px 26px; min-width: 0; }
.about > div + div { border-left: 1px solid var(--rule); }
.about > div:first-child { display: grid; align-content: start; gap: 28px; }
.portrait { margin: 0; width: min(100%, 340px); background: var(--fg); padding: 8px; border-radius: 6px; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.lede { margin: 0; font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 3.6vw, 3.1rem); line-height: 1.02; text-wrap: balance; max-width: 18ch; }
.about-text { max-width: 58ch; margin: 0 0 20px; }
.spec { margin: 0; display: grid; grid-template-columns: max-content 1fr; border-top: 1px solid var(--rule); }
.spec dt, .spec dd { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.spec dt { padding-right: 22px; font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 1.02rem; }
.spec dd { min-width: 0; }
.spec dd span { display: block; }

/* services */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.service { padding: 20px 16px 24px; border-right: 1px solid var(--rule); display: grid; align-content: start; gap: 12px; color: inherit; text-decoration: none; }
a.service { transition: background-color .25s ease, color .25s ease; }
a.service:hover { background: var(--fg); color: var(--bg); }
a.service:hover p { color: var(--bg); }
.service:last-child { border-right: 0; }
.service svg { width: 54px; height: 54px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.service h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: .95; }
.service p { margin: 0; font-size: 1rem; color: var(--soft); max-width: 34ch; }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { appearance: none; cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap); background: none; border: 1px solid var(--fg); border-radius: 999px; padding: 4px 18px; font-family: var(--display); font-weight: 700; font-size: 1.05rem; letter-spacing: .05em; }
.chip[aria-pressed="true"], .chip:hover { background: var(--fg); color: var(--bg); }

/* work index */
.work { list-style: none; margin: 0; padding: 0; }
.work li { border-bottom: 1px solid var(--rule); }
.work li:last-child { border-bottom: 0; }
.row { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1.25fr) minmax(0, 1fr) 300px; gap: 8px 24px; align-items: center; padding: 16px; text-decoration: none; transition: background-color .25s ease, color .25s ease; }
.row { cursor: pointer; }
.row:hover, .row:focus-within { background: var(--fg); color: var(--bg); }
.row:hover .pill, .row:focus-within .pill { border-color: var(--bg); }
.row-open { color: inherit; text-decoration: none; }
.row-open::after { content: ""; position: absolute; inset: 0; }
.row-open:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.ext { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); padding: 4px 16px; border: 1px solid currentColor; border-radius: 999px; font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: .04em; text-decoration: none; white-space: nowrap; color: inherit; }
.ext:hover, .ext:focus-visible { background: var(--bg); color: var(--fg); border-color: var(--bg); }
.row h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5.2vw, 4.4rem); line-height: .9; text-wrap: balance; }
.kind { display: block; margin-top: 6px; font-family: var(--display); font-weight: 500; font-size: 1rem; letter-spacing: .05em; opacity: .85; }
.row p { margin: 0; max-width: 52ch; font-size: 1rem; }
.side { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.pill { display: inline-block; border: 1px solid var(--fg); border-radius: 999px; padding: 2px 12px; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .05em; white-space: nowrap; }
.pill.on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: .1em; }
.open { width: var(--tap); height: var(--tap); border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-size: 1.6rem; font-weight: 500; line-height: 1; transition: transform .3s ease; flex: none; }
.row:hover .open { transform: rotate(90deg); }

/* thumbnails: phone frame for apps, browser frame for sites */
.thumb { justify-self: center; position: relative; display: grid; place-items: center; overflow: hidden; border: 1.5px solid currentColor; font-family: var(--display); font-weight: 900; line-height: 1; }
.thumb[data-kind="mobile"] { width: 46px; height: 82px; border-radius: 10px; font-size: 1.05rem; }
.thumb[data-kind="mobile"]::after { content: ""; position: absolute; top: 5px; left: 50%; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: currentColor; }
.thumb[data-kind="web"] { width: 96px; height: 64px; border-radius: 4px; border-top-width: 11px; font-size: 1.2rem; }
.thumb::before { content: ""; position: absolute; inset: 0; opacity: .32; }
.thumb[data-p="lines"]::before { background: repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 6px); }
.thumb[data-p="rings"]::before { background: repeating-radial-gradient(circle at 70% 30%, currentColor 0 1px, transparent 1px 7px); }
.thumb[data-p="grid"]::before { background: repeating-linear-gradient(0deg, currentColor 0 1px, transparent 1px 12px), repeating-linear-gradient(90deg, currentColor 0 1px, transparent 1px 12px); }
.thumb[data-p="diag"]::before { background: repeating-linear-gradient(135deg, currentColor 0 1px, transparent 1px 7px); }
.thumb[data-p="dots"]::before { background: radial-gradient(currentColor 1px, transparent 1.3px) 0 0 / 8px 8px; }
.thumb b { position: relative; background: inherit; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.thumb.has-img::before, .thumb.has-img::after { display: none; }
.thumb.app-icon { justify-self: center; width: 64px; height: 64px; border: 0; border-radius: 16px; box-shadow: 0 0 0 1.5px currentColor; background: var(--fg); }
.thumb.app-icon::before, .thumb.app-icon::after { display: none; }
.thumb.app-icon img { inset: auto; left: 50%; top: 50%; height: auto; max-width: none; object-fit: fill; }
.thumb.has-img[data-kind="mobile"] { width: 44px; height: 92px; border-width: 3px; border-radius: 9px; }
.thumb.has-img[data-kind="web"] { width: 96px; height: 64px; }

/* device frames around real screenshots */
.phone { position: relative; background: var(--fg); border-radius: 26px; padding: 16px 7px 7px; max-width: 100%; }
.phone::before { content: ""; position: absolute; top: 6px; left: 50%; width: 30px; height: 4px; margin-left: -15px; border-radius: 2px; background: var(--bg); opacity: .5; }
.phone img { display: block; width: 100%; height: auto; aspect-ratio: 560 / 1206; object-fit: cover; object-position: top; border-radius: 18px; box-shadow: 0 0 0 1px rgba(20, 18, 60, .14); }
.browser { background: var(--fg); border-radius: 8px; overflow: hidden; max-width: 100%; }
.browser .bar { display: flex; align-items: center; gap: 5px; padding: 7px 10px; color: var(--bg); font-family: var(--code); font-size: .7rem; min-width: 0; }
.browser .bar i { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; flex: none; }
.browser .bar span { margin-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser img { display: block; width: 100%; height: auto; }
.peek .phone { width: 170px; }
.peek .browser { width: 360px; }

/* project covers (placeholders until real images arrive) */
.cover { position: relative; overflow: hidden; background: var(--fg); color: var(--bg); display: grid; align-content: end; padding: 14px; aspect-ratio: 4 / 3; max-width: 100%; }
.cover::before { content: ""; position: absolute; inset: 0; opacity: .3; }
.cover[data-p="lines"]::before { background: repeating-linear-gradient(90deg, var(--bg) 0 1px, transparent 1px 9px); }
.cover[data-p="rings"]::before { background: repeating-radial-gradient(circle at 70% 30%, var(--bg) 0 1px, transparent 1px 12px); }
.cover[data-p="grid"]::before { background: repeating-linear-gradient(0deg, var(--bg) 0 1px, transparent 1px 22px), repeating-linear-gradient(90deg, var(--bg) 0 1px, transparent 1px 22px); }
.cover[data-p="diag"]::before { background: repeating-linear-gradient(135deg, var(--bg) 0 1px, transparent 1px 10px); }
.cover[data-p="dots"]::before { background: radial-gradient(var(--bg) 1.3px, transparent 1.6px) 0 0 / 14px 14px; }
.cover strong { position: relative; font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 5vw, 4rem); line-height: .85; text-wrap: balance; }
.cover small { position: relative; font-family: var(--display); font-weight: 700; letter-spacing: .06em; font-size: .9rem; margin-top: 6px; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.peek { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 20; opacity: 0; transform: translate(-50%, -50%) scale(.9); transition: opacity .2s ease, transform .2s ease; }
.peek.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.peek .cover { width: 260px; border: 1px solid var(--bg); box-shadow: 0 0 0 1px var(--fg); }
.peek .cover strong { font-size: 2.6rem; }

/* ---------- project sheet ---------- */
.sheet-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--fg); }
.sheet-top .meta { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 16px; min-width: 0; }
.sheet-top button, .sheet-top a { appearance: none; display: grid; place-items: center; background: none; border: 0; border-left: 1px solid var(--rule); cursor: pointer; min-width: 52px; min-height: 52px; padding: 0 14px; font-family: var(--display); font-weight: 700; font-size: 1.3rem; text-decoration: none; }
.sheet-top button:hover, .sheet-top a:hover { background: var(--fg); color: var(--bg); }
.sheet-top .x { font-size: 1.5rem; font-weight: 500; }
.sheet h1 { margin: 0; padding: 18px 16px 14px; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 9vw, 7.5rem); line-height: .85; border-bottom: 1px solid var(--rule); text-wrap: balance; }
.sheet-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.gal-col { border-right: 1px solid var(--rule); min-width: 0; }
.gallery { padding: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; min-width: 0; }
.gallery figure { margin: 0; display: grid; align-content: start; gap: 6px; min-width: 0; }
.gallery figure:first-child { grid-column: 1 / -1; }
.gallery figure:first-child .cover { aspect-ratio: 16 / 9; }
.gallery figure:first-child .cover strong { font-size: clamp(2.6rem, 7vw, 6rem); }
.gallery figcaption { font-size: .9rem; font-style: italic; color: var(--soft); }
.gallery.apps { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding-bottom: 20px; }
.gallery.apps figure { flex: 0 0 clamp(150px, 15vw, 200px); scroll-snap-align: start; }
.shot { appearance: none; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: left; }
.shot:hover .phone, .shot:hover .browser { outline: 2px solid var(--fg); outline-offset: 3px; }
.gallery-hint { margin: 0; padding: 0 16px 16px; font-size: .9rem; font-style: italic; color: var(--soft); }

/* ---------- lightbox ---------- */
dialog.lb { width: min(1280px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; border: 1px solid var(--fg); background: var(--bg); color: var(--fg); overflow: hidden; }
dialog.lb::backdrop { background: var(--veil); backdrop-filter: blur(4px); }
dialog.lb[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.lb-stage { display: grid; place-items: center; padding: 16px; min-height: 0; overflow: auto; }
.lb-stage img { display: block; max-width: 100%; max-height: calc(100vh - 140px); width: auto; height: auto; }
.lb-stage .phone-lg { background: var(--fg); border-radius: 30px; padding: 18px 8px 8px; }
.lb-stage .phone-lg img { border-radius: 22px; max-height: calc(100vh - 180px); }
.lb-count { font-variant-numeric: tabular-nums; color: var(--soft); }
.sheet-side { padding: 16px; display: grid; align-content: start; gap: 18px; min-width: 0; }
.sheet-side .spec { grid-template-columns: max-content 1fr; }
.sheet-links { display: flex; flex-wrap: wrap; gap: 10px; }
.sheet-links a { display: inline-flex; align-items: center; min-height: var(--tap); border: 1px solid var(--fg); border-radius: 999px; padding: 4px 18px; text-decoration: none; font-family: var(--display); font-weight: 700; letter-spacing: .04em; word-break: break-all; }
.sheet-links a:hover { background: var(--fg); color: var(--bg); }
.sheet-body { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); border-top: 1px solid var(--rule); }
.sheet-body > div { padding: 18px 16px 24px; min-width: 0; }
.sheet-body > div + div { border-left: 1px solid var(--rule); }
.story { display: grid; gap: 22px; }
.story section { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 4px 18px; }
.sheet-body .story-h { margin: 0 0 10px; font-family: var(--display); font-weight: 900; font-size: 1.6rem; line-height: 1; }
.story .story-h { margin: 0; padding-top: .15em; }
.sheet-body p { margin: 0; max-width: 62ch; font-size: 1.1rem; }
.feats { list-style: none; margin: 0; padding: 0; }
.feats li { padding: 8px 0 8px 22px; border-bottom: 1px solid var(--rule); position: relative; }
.feats li::before { content: "✦"; position: absolute; left: 0; top: 8px; font-size: .8rem; }
.sheet-next { color: var(--fg); background: var(--bg); text-decoration: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 16px; border: 0; border-top: 1px solid var(--fg); cursor: pointer; text-align: left; }
.sheet-next span { font-style: italic; color: var(--soft); }
.sheet-next b { font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 5vw, 3.6rem); line-height: .9; }
.sheet-next:hover { background: var(--fg); color: var(--bg); }
.sheet-next:hover span { color: var(--bg); }

/* ---------- contact ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.contact > div { padding: 22px 16px 28px; min-width: 0; }
.contact > div + div { border-left: 1px solid var(--rule); }
.contact h2 { margin: 0 0 18px; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 8vw, 7rem); line-height: .86; text-wrap: balance; }
.contact-lede { margin: 0 0 22px; max-width: 40ch; }
.mail { display: block; width: fit-content; max-width: 100%; font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 2rem); word-break: break-all; margin-bottom: 10px; text-underline-offset: .15em; text-decoration-thickness: 1px; }
.mail:hover { text-decoration-thickness: 2px; }
.links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 18px; }
.links a { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); text-decoration: none; }
.links a span { text-decoration: underline; text-underline-offset: 4px; }
.links a:hover span { text-decoration-thickness: 2px; }
.links svg { width: 18px; height: 18px; flex: none; fill: currentColor; }

form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label, fieldset legend { font-family: var(--display); font-weight: 700; letter-spacing: .05em; font-size: 1.05rem; padding: 0; }
.req { margin-left: .15em; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
input, textarea { width: 100%; min-height: var(--tap); font: inherit; font-size: 1.05rem; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--fg); padding: 8px 2px; border-radius: 0; }
textarea { min-height: 140px; resize: vertical; border: 1px solid var(--fg); padding: 10px; }
input::placeholder, textarea::placeholder { color: var(--soft); opacity: 1; }
input:focus-visible, textarea:focus-visible { outline: none; background: var(--rule); }
input[aria-invalid="true"] { border-bottom-width: 3px; }
textarea[aria-invalid="true"] { border-width: 3px; }
.field-err { margin: 0; font-size: .98rem; font-style: italic; }
.field-err::before { content: "! "; font-style: normal; font-family: var(--display); font-weight: 900; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topics input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.topics label { cursor: pointer; display: inline-flex; align-items: center; min-height: var(--tap); border: 1px solid var(--fg); border-radius: 999px; padding: 4px 16px; font-family: var(--display); font-weight: 700; letter-spacing: .04em; }
.topics input:checked + label { background: var(--fg); color: var(--bg); }
.topics input:focus-visible + label { outline: 2px solid var(--fg); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.form-note { margin: 0; font-size: .92rem; color: var(--soft); }
.form-msg { margin: 0; font-style: italic; flex-basis: 100%; }
.form-msg:empty { display: none; }

footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 20px; padding: 4px 16px; font-size: .9rem; color: var(--soft); }
footer a { display: inline-flex; align-items: center; min-height: var(--tap); padding-inline: 4px; text-underline-offset: 3px; }

/* ---------- surfaces: a section can flip, a project can bring its own colour ---------- */
.on-paper { --bg: var(--paper); --fg: var(--ultramarine); --rule: color-mix(in srgb, var(--ultramarine) 34%, transparent); --soft: color-mix(in srgb, var(--ultramarine) 82%, transparent); background: var(--bg); color: var(--fg); transition: background-color .35s ease, color .35s ease; }
:root.inv .on-paper { --bg: var(--ultramarine); --fg: var(--paper); --rule: rgba(236, 234, 226, .38); --soft: rgba(236, 234, 226, .78); }
.renkli { --bg: var(--renk); --fg: var(--paper); --rule: rgba(236, 234, 226, .38); --soft: rgba(236, 234, 226, .82); background: var(--bg); color: var(--fg); }
:root.inv .renkli { --bg: var(--paper); --fg: var(--renk); --rule: color-mix(in srgb, var(--renk) 34%, transparent); --soft: color-mix(in srgb, var(--renk) 82%, transparent); }

/* ---------- first screen ---------- */
.hero-open { display: none; flex: 0 0 100%; align-items: center; min-height: var(--tap); padding: 2px 12px; background: var(--bg); text-underline-offset: 3px; }
@media (min-width: 901px) {
  .title h1 { display: flex; }
  .title .line { flex: none; }
  .title .line + .line .fit { padding-left: .22em; }
}

/* ---------- services as a way into the work ---------- */
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.proof .thumb.app-icon { width: 36px; height: 36px; border-radius: 9px; justify-self: auto; }
.proof .thumb.has-img[data-kind="web"] { width: 54px; height: 36px; border-top-width: 6px; justify-self: auto; }

/* ---------- showcase ---------- */
.feature { --h: clamp(480px, 46vw, 660px); position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-top: 1px solid var(--fg); overflow: hidden; }
.feature-text { position: relative; display: grid; align-content: space-between; gap: 28px; padding: 22px 16px; min-width: 0; }
.feature h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(3.2rem, 7.4vw, 7.4rem); line-height: .86; text-wrap: balance; }
.feature-link { color: inherit; text-decoration: none; }
.feature-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.feature-link:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.feature .kind { margin-top: 12px; }
.feature p { margin: 0 0 18px; max-width: 42ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.4; }
.feature-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.feature .ext { z-index: 2; }
.feature:hover .btn { background: var(--bg); color: var(--fg); }
.stage { position: relative; height: var(--h); min-width: 0; overflow: hidden; }
.stage.phones { display: flex; justify-content: center; gap: clamp(12px, 1.6vw, 24px); padding-top: 40px; }
.stage .phone { flex: 0 0 clamp(150px, 16.5vw, 236px); align-self: flex-start; transition: transform .5s cubic-bezier(.2, .8, .15, 1); }
.stage.phones .phone:nth-child(1) { margin-top: 76px; }
.stage.phones .phone:nth-child(3) { margin-top: 148px; }
.feature:hover .stage.phones .phone { transform: translateY(-14px); }
.stage .browser { position: absolute; transition: transform .5s cubic-bezier(.2, .8, .15, 1); }
.stage.sites .browser:nth-child(1) { left: 0; top: 36px; width: 86%; }
.stage.sites .browser:nth-child(2) { right: 16px; bottom: 24px; width: 42%; box-shadow: 0 0 0 1px var(--bg), 0 0 0 2px var(--fg); }
.feature:hover .stage.sites .browser:nth-child(2) { transform: translateY(-12px); }

/* Ethem: the title runs the full width over one wide screen */
.feature:nth-child(2) { grid-template-columns: 1fr; }
.feature:nth-child(2) .feature-text { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: end; gap: 12px 24px; }
.feature:nth-child(2) .stage { height: clamp(340px, 38vw, 540px); }
.feature:nth-child(2) .stage.sites .browser:nth-child(1) { left: 16px; top: 0; width: 76%; }
.feature:nth-child(2) .stage.sites .browser:nth-child(2) { width: 34%; }
/* PomoDo: one large phone between two smaller ones */
.feature:nth-child(3) .stage.phones { align-items: center; padding-top: 0; }
.feature:nth-child(3) .stage.phones .phone { align-self: center; margin-top: 0; flex-basis: clamp(120px, 12.5vw, 180px); }
.feature:nth-child(3) .stage.phones .phone:nth-child(2) { flex-basis: clamp(170px, 19vw, 276px); }
/* Zambak: picture first */
.feature:nth-child(4) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature:nth-child(4) .stage { order: -1; }
.feature:nth-child(4) .stage.sites .browser:nth-child(1) { left: auto; right: 0; }
.feature:nth-child(4) .stage.sites .browser:nth-child(2) { right: auto; left: 16px; }

.more-head { border-top: 1px solid var(--fg); border-bottom: 1px solid var(--rule); padding: 18px 16px 12px; }
.more-head h3 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2rem, 4vw, 3.2rem); line-height: .9; }

/* ---------- AI assistants: the list of bots beside a sample conversation; the chosen bot joins the paper stage like a folder tab ---------- */
.ai { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); border-bottom: 1px solid var(--rule); }
.ai-tabs { display: flex; flex-direction: column; min-width: 0; }
.ai-tabs [role="tab"] { appearance: none; display: grid; gap: 6px; width: 100%; min-height: var(--tap); text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 16px; cursor: pointer; transition: background-color .25s ease, color .25s ease; }
.ai-tabs [role="tab"]:last-child { border-bottom: 0; }
.ai-tabs b { font-family: var(--display); font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 3.1rem); line-height: .9; }
.ai-tabs span { font-size: 1rem; color: var(--soft); }
.ai-tabs [role="tab"]:hover, .ai-tabs [aria-selected="true"] { background: var(--fg); color: var(--bg); }
.ai-tabs [role="tab"]:hover span, .ai-tabs [aria-selected="true"] span { color: var(--bg); }
.ai-tabs [role="tab"]:focus-visible { outline: 2px solid currentColor; outline-offset: -6px; }
.ai-stage { min-width: 0; padding: 20px clamp(16px, 3vw, 40px) 28px; }
.ai-panel { display: grid; gap: 18px; max-width: 660px; }
.ai-channel { margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); font-family: var(--display); font-weight: 700; letter-spacing: .04em; font-size: 1.02rem; }
.ai-channel span + span { font-family: var(--body); font-weight: 400; font-style: italic; letter-spacing: 0; color: var(--soft); }
.chat { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; min-height: 290px; }
.chat li { max-width: 82%; padding: 10px 14px; font-size: 1.02rem; line-height: 1.4; border: 1px solid var(--fg); }
.chat .in { align-self: flex-start; border-radius: 18px 18px 18px 4px; }
.chat .out { align-self: flex-end; background: var(--fg); color: var(--bg); border-radius: 18px 18px 4px 18px; }
.chat .sys { align-self: center; max-width: 100%; border: 0; border-block: 1px solid var(--rule); border-radius: 0; padding: 6px 4px; font-size: .94rem; font-style: italic; color: var(--soft); }
.chat .voice { display: grid; grid-template-columns: auto auto; justify-content: start; align-items: center; gap: 6px 10px; }
.chat .wave { width: 128px; height: 22px; background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 22' preserveAspectRatio='none'%3E%3Cpath d='M0 9L10 6L20 8L30 2L40 7L50 4L60 9L70 1L80 6L90 4L100 8L110 5L128 9V13L110 17L100 14L90 18L80 16L70 21L60 13L50 18L40 15L30 20L20 14L10 16L0 13Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 22' preserveAspectRatio='none'%3E%3Cpath d='M0 9L10 6L20 8L30 2L40 7L50 4L60 9L70 1L80 6L90 4L100 8L110 5L128 9V13L110 17L100 14L90 18L80 16L70 21L60 13L50 18L40 15L30 20L20 14L10 16L0 13Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; }
.chat .len { font-variant-numeric: tabular-nums; font-size: .92rem; }
.chat .voice small { grid-column: 1 / -1; font-size: .94rem; font-style: italic; }
.chat .drafts { display: flex; gap: 6px; margin-top: 10px; }
.chat .drafts i { flex: 1; aspect-ratio: 4 / 5; display: grid; align-items: end; padding: 6px 8px; border: 1px solid var(--bg); border-radius: 6px; background: var(--bg); color: var(--fg); font-style: normal; font-family: var(--display); font-weight: 900; font-size: 1.4rem; line-height: 1; }
.chat .drafts i:nth-child(2) { background: transparent; color: var(--bg); }
.chat .drafts i:nth-child(3) { background: repeating-linear-gradient(135deg, var(--bg) 0 1px, transparent 1px 7px); color: var(--bg); }
.ai.anim .chat li { opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.ai.anim .chat li.on { opacity: 1; transform: none; }
.ai-desc { margin: 0; max-width: 58ch; }
.ai-more { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.ai-more > div { padding: 22px 16px 28px; min-width: 0; }
.ai-more > div + div { border-left: 1px solid var(--rule); }
.ai-more h3 { margin: 0 0 14px; font-family: var(--display); font-weight: 900; font-size: clamp(1.7rem, 2.6vw, 2.3rem); line-height: .95; }
.steps { list-style: none; margin: 0 0 18px; padding: 0; counter-reset: adim; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.steps li { counter-increment: adim; position: relative; display: grid; align-content: start; gap: 4px; padding: 12px 0 14px 40px; border-top: 1px solid var(--rule); }
.steps li::before { content: counter(adim); position: absolute; left: 0; top: 10px; font-family: var(--display); font-weight: 900; font-size: 2rem; line-height: 1; }
.steps b { font-family: var(--display); font-weight: 700; letter-spacing: .03em; font-size: 1.15rem; line-height: 1.1; }
.steps span { font-size: 1rem; color: var(--soft); }
.ai-rule { margin: 0 0 18px; max-width: 60ch; font-style: italic; }
@media (max-width: 900px) {
  .ai, .ai-more { grid-template-columns: 1fr; }
  .ai-more > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .ai-tabs { flex-direction: row; gap: 8px; overflow-x: auto; padding: 12px 16px; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
  .ai-tabs [role="tab"], .ai-tabs [role="tab"]:last-child { flex: none; width: auto; align-items: center; padding: 4px 16px; border: 1px solid var(--fg); border-radius: 999px; }
  .ai-tabs b { font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; line-height: 1; }
  .ai-tabs span { display: none; }
  .chat { min-height: 0; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .chat li { max-width: 92%; }
}

/* ---------- project page ---------- */
main.sheet .sheet-top { position: static; }
main.sheet .sheet-grid { border-top: 1px solid var(--rule); }
main.sheet .sheet-top a:first-of-type { margin-left: auto; }
.lede-page { margin: 0; padding: 18px 16px 22px; font-family: var(--body); font-size: clamp(1.25rem, 2.3vw, 1.9rem); line-height: 1.3; max-width: 44ch; box-sizing: content-box; }
.page-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; padding: 28px 16px; border-top: 1px solid var(--fg); }
.page-cta h2 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(2.2rem, 5vw, 4rem); line-height: .9; text-wrap: balance; }
.lost { padding: 28px 16px 40px; display: grid; gap: 18px; justify-items: start; }
.lost h1 { margin: 0; font-family: var(--display); font-weight: 900; font-size: clamp(3rem, 9vw, 7.5rem); line-height: .85; }
.lost p { margin: 0; }
@media (min-width: 901px) {
  .sheet-side { position: sticky; top: 104px; align-self: start; }
}
@media (max-width: 900px) {
  .feature, .feature:nth-child(2), .feature:nth-child(4) { grid-template-columns: 1fr; }
  .feature:nth-child(2) .feature-text { grid-template-columns: 1fr; }
  .feature:nth-child(4) .stage { order: 0; }
  .feature h3 { font-size: clamp(3.2rem, 15vw, 6rem); }
  .stage, .feature:nth-child(2) .stage { height: clamp(340px, 88vw, 520px); }
  .stage .phone { flex-basis: clamp(136px, 40vw, 210px); }
  .feature:nth-child(3) .stage.phones .phone { flex-basis: clamp(104px, 28vw, 160px); }
  .feature:nth-child(3) .stage.phones .phone:nth-child(2) { flex-basis: clamp(150px, 42vw, 230px); }
  .stage.phones .phone:nth-child(1) { margin-top: 44px; }
  .stage.phones .phone:nth-child(3) { margin-top: 88px; }
  .stage.sites .browser:nth-child(1), .feature:nth-child(2) .stage.sites .browser:nth-child(1), .feature:nth-child(4) .stage.sites .browser:nth-child(1) { left: 16px; right: auto; top: 0; width: 118%; }
  .stage.sites .browser:nth-child(2), .feature:nth-child(2) .stage.sites .browser:nth-child(2), .feature:nth-child(4) .stage.sites .browser:nth-child(2) { left: auto; right: 16px; bottom: 16px; width: 62%; }
}
@media (max-width: 560px) {
  .proof { grid-column: 2; }
  .feature-foot .pill.on { display: none; }
}

/* ---------- touch screens ---------- */

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:nth-child(2) { border-right: 0; }
  .service:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
}
@media (max-width: 900px) {
  section.block, .since { scroll-margin-top: 96px; }
  .top { grid-template-columns: auto 1fr auto; }
  .status { grid-column: 1 / -1; border-top: 1px solid var(--rule); border-right: 0; grid-template-columns: 1fr 1fr; }
  .status > * + * { border-top: 0; border-left: 1px solid var(--rule); }
  .top.stuck .status { display: none; }
  .about, .contact, .sheet-grid, .sheet-body { grid-template-columns: 1fr; }
  .about > div + div, .contact > div + div, .sheet-body > div + div { border-left: 0; border-top: 1px solid var(--rule); }
  .gal-col { border-right: 0; border-bottom: 1px solid var(--rule); }
  .gallery { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 86%; overflow-x: auto; scroll-snap-type: x mandatory; }
  .gallery figure { scroll-snap-align: start; }
  .gallery.apps figure { flex-basis: clamp(150px, 46vw, 210px); }
  .gallery figure:first-child { grid-column: auto; }
  .gallery:has(figure:only-child) { grid-auto-columns: 100%; }
  .row { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 16px; }
  .row .thumb { grid-row: 1 / span 2; align-self: start; }
  .row p { grid-column: 2 / -1; grid-row: 2; }
  .side { grid-row: 1; grid-column: 3; }
  .thumb[data-kind="mobile"] { width: 38px; height: 68px; font-size: .9rem; }
  .thumb[data-kind="web"] { width: 72px; height: 50px; font-size: 1rem; border-top-width: 9px; }
  .story section { grid-template-columns: 1fr; }
  .thumb.has-img[data-kind="web"] { width: 72px; height: 48px; }
  .thumb.has-img[data-kind="mobile"] { width: 38px; height: 80px; }
  .thumb.app-icon { width: 52px; height: 52px; border-radius: 13px; }
}
@media (max-width: 560px) {
  .top { grid-template-columns: auto 1fr; }
  .nav { grid-column: 1 / -1; order: 3; border-top: 1px solid var(--rule); border-right: 0; }
  /* four links share the row by the length of their names, so none wraps */
  .nav a { flex: 1 1 auto; padding-inline: 8px; white-space: nowrap; letter-spacing: .03em; }
  .tools { justify-content: flex-end; border-right: 0; }
  .status { display: none; }
  .hero-open { display: inline-flex; }
  .hero { height: 440px; }
  .hero-cta { right: 16px; }
  .badge { display: none; }
  .hero-cta .btn { font-size: 1rem; padding-inline: 16px; }
  .services { grid-template-columns: 1fr; }
  .service { border-right: 0; border-bottom: 1px solid var(--rule); grid-template-columns: 40px minmax(0, 1fr); gap: 2px 14px; padding: 14px 16px; }
  .service:last-child { border-bottom: 0; }
  .service svg { width: 40px; height: 40px; grid-row: span 2; }
  .service h3 { font-size: 1.5rem; }
  .service p { font-size: .95rem; }
  .spec, .sheet-side .spec { grid-template-columns: 5.6rem minmax(0, 1fr); font-size: .97rem; }
  .spec dt { padding-right: 10px; font-size: .95rem; }
  .two { grid-template-columns: 1fr; }
  /* live projects already show a "visit" link; keep the pill for the ones that are not out yet */
  .side .pill.on { display: none; }
  .row > div:nth-child(2) { grid-column: 2 / -1; }
  .row .side { grid-row: 3; grid-column: 2 / -1; justify-content: flex-start; gap: 10px; }
  .row .thumb { grid-row: 1 / span 3; }
  .row h3 { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ticker div, .live, .badge svg, .title .fit { animation: none; }
  body, .row, .open, .peek, .top, .on-paper, .stage .phone, .stage .browser, .ai-tabs [role="tab"] { transition: none; }
}
