/* Concept: "In your hand". Near-black room, cedar-green light, a real phone at the centre. */
:root {
  color-scheme: dark;
  --bg: #07090a;
  --bg-2: #0d1211;
  --bg-rgb: 7 9 10;
  --ink: #e9f0eb;
  --ink-rgb: 233 240 235;
  --muted: #8f9a93;
  --line: rgb(var(--ink-rgb) / 0.12);
  --accent: #5ee39a;          /* the green of the AS mark, lifted to glow on black */
  --accent-deep: #157a3c;
  --accent-ink: #04140a;
  --glow: 94 227 154;
  --panel: 13 18 17;
  --panel-2: 18 26 23;
  --deep: 21 122 60;
  --scrim: 3 6 5;
  --thumb: #1d3b2b;
  --track: #15241c;
  --shadow: 0 0 0;

  --m: clamp(18px, 3vw, 48px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);
  --mono: "Geist Mono", ui-monospace, Consolas, monospace;
}
/* Light: daylight on the same cedar green. Chosen by the switch, or by the system when never touched. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6f2;
  --bg-2: #e7ede8;
  --bg-rgb: 243 246 242;
  --ink: #0c1611;
  --ink-rgb: 12 22 17;
  --muted: #56645b;
  --accent: #127a3c;
  --accent-deep: #0d5c2c;
  --accent-ink: #ffffff;
  --glow: 18 122 60;
  --panel: 255 255 255;
  --panel-2: 255 255 255;
  --deep: 94 227 154;
  --scrim: 20 30 25;
  --thumb: #b6cbbd;
  --track: #d5e1d8;
  --shadow: 30 50 40;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Geist", system-ui, sans-serif; font-size: 17px; line-height: 1.6;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; }
::selection { background: var(--accent); color: var(--accent-ink); }

/* Scrollbar: a slim dark-green pill on the page's own black, lighting up when you grab it.
   Chrome, Edge and Safari use the ::-webkit rules; Firefox gets the standard thin bar in the same colours. */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--thumb); background-clip: padding-box; border-radius: 99px; border: 3px solid transparent; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }
::-webkit-scrollbar-thumb:active { background: var(--accent); }
::-webkit-scrollbar-corner { background: transparent; }
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: var(--thumb) transparent; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.kicker { font-family: var(--mono); font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section-title { font-size: clamp(44px, 6.4vw, 104px); font-weight: 600; line-height: 0.95; letter-spacing: -0.04em; }
.section-title span { color: var(--accent); }

/* ── Atmosphere: two slow lights and a cursor that glows ── */
.glow { position: fixed; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.glow--a { width: 46vw; height: 46vw; left: -18vw; top: -22vw; background: radial-gradient(circle, rgb(var(--deep) / 0.65), transparent 65%); animation: drift-a 18s ease-in-out infinite alternate; }
.glow--b { width: 40vw; height: 60vw; right: -24vw; top: 30vh; background: radial-gradient(circle, rgb(var(--glow) / 0.35), transparent 65%); animation: drift-b 22s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(8vw, 10vh) scale(1.1); } }
@keyframes drift-b { to { transform: translate(-6vw, -14vh) scale(0.9); } }

/* One pointer only: where the custom cursor runs, the system one is hidden.
   It comes back over text fields (for the caret) and inside dialogs (they sit above everything). */
html.has-cursor, html.has-cursor * { cursor: none !important; }
html.has-cursor input, html.has-cursor textarea { cursor: text !important; }
html.has-cursor:has(dialog[open]), html.has-cursor:has(dialog[open]) * { cursor: auto !important; }
html.has-cursor:has(dialog[open]) button, html.has-cursor:has(dialog[open]) li { cursor: pointer !important; }

.cursor {
  position: fixed; z-index: 90; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: var(--accent); pointer-events: none; mix-blend-mode: difference;
  box-shadow: 0 0 30px 8px rgb(var(--glow) / 0.35);
  opacity: 0;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), opacity .2s;
}
.cursor.is-on { opacity: 1; }
.cursor.is-big { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-hidden { opacity: 0 !important; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

.phone3d { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; }

/* ── Loader ── */
.loader { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; align-content: center; gap: 18px; }
.loader__mark { font-size: 64px; font-weight: 700; letter-spacing: -0.06em; color: var(--accent); }
.loader__count { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.loader__bar { width: 160px; height: 2px; background: var(--line); overflow: hidden; }
.loader__bar i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
html:not(.js) .loader { display: none; }

/* ── Navigation and rails ── */
.nav {
  position: fixed; z-index: 50; top: 0; left: 0; right: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--m); font-size: 14px; font-weight: 500;
  transition: background-color .4s, padding .4s var(--ease-out), backdrop-filter .4s;
}
.nav.is-solid { background: rgb(var(--bg-rgb) / 0.72); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding-block: 14px; }
.nav__mark { font-weight: 700; font-size: 18px; letter-spacing: -0.04em; justify-self: start; }
.nav__email { font-size: 14px; color: var(--muted); }
.nav__links { justify-self: end; display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); text-transform: uppercase; letter-spacing: 0.06em; font-size: 13px; }
.nav__k { display: flex; gap: 4px; color: var(--muted); }
.roll { display: inline-grid; overflow: hidden; height: 1.6em; line-height: 1.6em; vertical-align: middle; }
.roll > span { grid-area: 1 / 1; transition: transform .45s var(--ease-out); }
.roll > span + span { transform: translateY(100%); color: var(--accent); }
@media (hover: hover) and (pointer: fine) {
  a:hover > .roll > span:first-child, button:hover > .roll > span:first-child { transform: translateY(-100%); }
  a:hover > .roll > span + span, button:hover > .roll > span + span { transform: translateY(0); }
}
.rail { position: fixed; z-index: 40; bottom: 28px; color: var(--muted); transition: color .2s, opacity .4s, transform .4s var(--ease-out); }
.rails-off .rail { opacity: 0; pointer-events: none; }
.rails-off .rail--left { transform: translateX(-12px); }
.rails-off .rail--right { transform: translateX(12px); }
.rail--left { left: var(--m); display: flex; flex-direction: column; gap: 22px; }
.rail--left a { display: grid; place-items: center; width: 20px; height: 20px; transition: color .2s, transform .2s var(--ease-out); }
.rail--right { right: var(--m); writing-mode: vertical-rl; font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
@media (hover: hover) and (pointer: fine) { .rail--left a:hover { color: var(--accent); transform: translateY(-3px); } .rail--right:hover { color: var(--accent); } }
.ico { display: block; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; }

main { position: relative; z-index: 3; overflow-x: clip; }   /* slide-ins start off to the side; never widen the page */

/* ── 1 Hero ── */
.hero { position: relative; height: 100svh; min-height: 600px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 calc(var(--m) + 40px); }
.hero__hi { font-size: clamp(16px, 1.4vw, 22px); color: var(--accent); margin-bottom: 10px; font-weight: 500; }
.hero__name { font-weight: 700; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.92; font-size: clamp(30px, 3.9vw, 80px); white-space: nowrap; }
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: block; }
.hero__right { justify-self: end; text-align: right; text-transform: uppercase; }
.hero__role-a { font-size: clamp(22px, 2.2vw, 36px); font-weight: 400; color: var(--muted); letter-spacing: 0.02em; }
.hero__role-b { font-size: clamp(30px, 3.9vw, 80px); font-weight: 700; letter-spacing: -0.045em; line-height: 0.95; }
.swap { display: inline-grid; height: 1.05em; overflow: hidden; vertical-align: bottom; }
.swap > span { grid-area: 1 / 1; display: block; }
.js .swap > span:not(:first-child) { opacity: 0; }
html:not(.js) .swap > span:not(:first-child) { display: none; }
.hero__role-b .swap { color: transparent; -webkit-text-stroke: 1.5px var(--accent); }
.hero__scroll { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.hero__scroll i { width: 1px; height: 40px; background: linear-gradient(var(--accent), transparent); animation: scroll-cue 1.8s var(--ease-io) infinite; transform-origin: top; }
@keyframes scroll-cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ── 2 About ── */
.about { min-height: 130svh; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 calc(var(--m) + 40px); }
.about__body { grid-column: 2; max-width: 620px; }
.about__body .kicker { margin-bottom: 22px; }
.about__text { font-size: clamp(22px, 2vw, 32px); line-height: 1.35; font-weight: 500; letter-spacing: -0.015em; }
.about__facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line); }
.about__facts dt { font-size: clamp(36px, 3.6vw, 56px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--accent); }
.about__facts dd { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 8px; }

/* ── 3 What I do ── */
.do { min-height: 130svh; display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 40px; padding: 16vh calc(var(--m) + 40px) 10vh; }
.do__title { font-size: clamp(56px, 7.4vw, 140px); font-weight: 700; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.88; }
.do__title span { display: block; }
.do__title span + span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); padding-left: 0.4em; }
.do__cards { display: flex; flex-direction: column; gap: 22px; width: 100%; max-width: 640px; justify-self: end; }
.card { position: relative; padding: 30px 30px 26px; background: rgb(var(--panel) / 0.72); backdrop-filter: blur(6px); outline: none; transition: background .3s; }
.card__corner { position: absolute; width: 16px; height: 16px; border: 2px solid var(--accent); transition: transform .4s var(--ease-out); }
.card__corner.tl { left: 0; top: 0; border-right: 0; border-bottom: 0; }
.card__corner.tr { right: 0; top: 0; border-left: 0; border-bottom: 0; }
.card__corner.bl { left: 0; bottom: 0; border-right: 0; border-top: 0; }
.card__corner.br { right: 0; bottom: 0; border-left: 0; border-top: 0; }
.card h3 { font-size: clamp(24px, 2.2vw, 34px); font-weight: 600; text-transform: uppercase; letter-spacing: -0.02em; line-height: 1.1; }
.card__sub { color: var(--muted); margin-top: 6px; }
.card__more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease-out); }
.card__more > div { overflow: hidden; }
.card__more p:first-child { margin-top: 18px; }
.card__label { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin-top: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tags li { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; }
.card:hover .card__more, .card:focus-within .card__more, .card:focus .card__more, .card.is-open .card__more { grid-template-rows: 1fr; }
.card:hover, .card:focus { background: rgb(var(--panel-2) / 0.9); }
.card:hover .tl, .card:focus .tl { transform: translate(-6px, -6px); }
.card:hover .tr, .card:focus .tr { transform: translate(6px, -6px); }
.card:hover .bl, .card:focus .bl { transform: translate(-6px, 6px); }
.card:hover .br, .card:focus .br { transform: translate(6px, 6px); }

/* ── 4 Journey ── */
.journey { padding: 18vh calc(var(--m) + 40px) 10vh; }
.journey .section-title { margin-bottom: 9vh; }
.journey__list { position: relative; }
.journey__line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--line); transform: translateX(-50%); }
.journey__line i { position: absolute; inset: 0; background: linear-gradient(var(--accent-deep), var(--accent)); transform-origin: top; transform: scaleY(0); }
.journey__dot { position: absolute; left: 50%; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 22px 6px rgb(var(--glow) / 0.6); }
.step { display: grid; grid-template-columns: 1fr 120px 1fr; column-gap: 48px; align-items: start; padding: 34px 0; }
.step > div { text-align: right; padding-right: 30px; }
.step h3 { font-size: clamp(22px, 2.2vw, 34px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.step > div p { color: var(--accent); font-size: 15px; margin-top: 6px; }
.step b { position: relative; z-index: 1; text-align: center; font-size: clamp(30px, 3.2vw, 52px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; background: var(--bg); padding: 4px 0; }
.step b[data-confirm] { color: var(--muted); }
.step > p { color: var(--muted); padding-left: 30px; max-width: 420px; }

/* ── 5 Work: pinned, sideways ── */
.work__pin { height: 100svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding-top: 64px; }
.work__title { padding: 0 calc(var(--m) + 40px); margin-bottom: 4vh; font-size: clamp(40px, min(6.4vw, 11vh), 104px); }
.work__track { display: flex; width: max-content; padding-left: calc(var(--m) + 40px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.work__progress {
  display: flex; align-items: center; gap: 18px;
  padding: clamp(14px, 2.4vh, 26px) calc(var(--m) + 40px) 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.work__count b { color: var(--ink); font-weight: 500; }
.work__bar { flex: 0 1 280px; height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; }
.work__bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; box-shadow: 0 0 12px rgb(var(--glow) / .6); }
.work__hint { transition: opacity .3s; }
.work__hint span { display: inline-block; animation: nudge 1.6s var(--ease-io) infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }
.proj { width: min(560px, 82vw); padding: clamp(20px, 3.4vh, 36px) 40px clamp(22px, 3.6vh, 40px); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.proj__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.proj__head b { font-size: clamp(48px, 4.6vw, 72px); font-weight: 600; letter-spacing: -0.05em; line-height: 0.9; }
.proj__head > div { text-align: right; }
.proj__head h3 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.proj__head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.proj__label { margin-top: clamp(12px, 2.4vh, 26px); font-weight: 500; font-size: 18px; }
.proj__tools { color: var(--muted); font-size: 15px; margin-top: 4px; min-height: 3.2em; }
.proj__visual { margin-top: clamp(14px, 2.4vh, 26px); height: clamp(160px, 32vh, 320px); position: relative; display: block; overflow: hidden; background: var(--bg-2); border-radius: 14px; }
.proj__visual--fan img { position: absolute; bottom: -40px; width: 150px; border-radius: 14px; box-shadow: 0 20px 50px rgb(var(--shadow) / .55); transition: transform .6s var(--ease-out); }
.proj__visual--fan img:nth-child(1) { left: 50%; transform: translateX(-140%) rotate(-9deg); }
.proj__visual--fan img:nth-child(2) { left: 50%; transform: translateX(-50%) translateY(-24px); z-index: 1; }
.proj__visual--fan img:nth-child(3) { left: 50%; transform: translateX(40%) rotate(9deg); }
@media (hover: hover) and (pointer: fine) {
  .proj__visual--fan:hover img:nth-child(1) { transform: translateX(-165%) rotate(-14deg) translateY(-10px); }
  .proj__visual--fan:hover img:nth-child(2) { transform: translateX(-50%) translateY(-50px); }
  .proj__visual--fan:hover img:nth-child(3) { transform: translateX(65%) rotate(14deg) translateY(-10px); }
}
.proj__visual--code { padding: 26px 28px; }
.proj__visual--code pre { margin: 0; font: 14px/1.7 var(--mono); white-space: pre; color: var(--ink); }
.c { color: var(--muted); } .k { color: #ff8fa3; } .f { color: var(--accent); } .t { color: #7cc4ff; }
.proj--more { justify-content: center; align-items: flex-start; gap: 14px; border-right: 0; }
.proj--more h3 { font-size: clamp(30px, 2.8vw, 44px); font-weight: 600; letter-spacing: -0.03em; }
.proj--more p { color: var(--muted); }
.btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 10px; padding: 14px 24px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 600; transition: transform .15s var(--ease-out), box-shadow .3s; }
.btn:active { transform: scale(.96); }
@media (hover: hover) and (pointer: fine) { .btn:hover { box-shadow: 0 0 40px rgb(var(--glow) / .45); } }

/* ── 6 Screens ── */
.screens { padding: 22vh calc(var(--m) + 40px) 10vh; }
.screens__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.screens__head > p { color: var(--muted); max-width: 34ch; }
.screens__search { margin-top: 6vh; display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; padding: 18px 26px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 16px; }
.screens__prompt { font-family: var(--mono); color: var(--accent); font-size: 26px; }
.screens__search input { flex: 1 1 280px; min-width: 0; background: none; border: 0; color: var(--ink); font: 500 clamp(24px, 2.6vw, 40px)/1.2 "Geist", sans-serif; letter-spacing: -0.02em; caret-color: var(--accent); }
.screens__search input:focus { outline: none; }
.screens__search input::-webkit-search-cancel-button { display: none; }
.screens__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.screens__chips button { font-size: 13px; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); transition: color .2s, border-color .2s, transform .15s; }
.screens__chips button:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .screens__chips button:hover { color: var(--ink); border-color: var(--accent); } }
.screens__count { margin: 26px 0 18px; color: var(--muted); font-size: 15px; }
.screens__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 200px)); gap: 18px; justify-content: start; }
.screens__grid button { display: block; width: 100%; text-align: left; cursor: zoom-in; }
.screens__grid img { width: 100%; aspect-ratio: 9 / 20; object-fit: cover; border-radius: 14px; background: var(--bg-2); transition: transform .5s var(--ease-out), box-shadow .3s; }
.screens__grid span { display: block; margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.screens__grid strong { display: block; color: var(--ink); font-weight: 500; }
@media (hover: hover) and (pointer: fine) { .screens__grid button:hover img { transform: translateY(-8px); box-shadow: 0 24px 50px rgb(var(--shadow) / .6), 0 0 0 1px rgb(var(--glow) / .5); } }

/* ── 7 Tech wall ── */
.tech { padding: 18vh 0 14vh; overflow-x: clip; }
.tech__title { text-align: center; font-size: clamp(56px, 9vw, 160px); font-weight: 700; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.9; color: transparent; -webkit-text-stroke: 1.5px rgb(var(--ink-rgb) / .35); }
.tech__stage { perspective: 1200px; margin-top: clamp(-60px, -3vw, -20px); padding-bottom: 40px; }
.tech__wall { --tile: clamp(96px, 7vw, 140px); display: grid; grid-template-columns: repeat(8, var(--tile)); gap: clamp(10px, 1vw, 18px); justify-content: center; transform-style: preserve-3d; transform: rotateX(20deg); transform-origin: 50% 0; }
.tech__wall li {
  height: var(--tile); display: grid; place-items: center; align-content: center; gap: 10px;
  background: rgb(var(--panel) / .85); border: 1px solid var(--line); border-radius: 16px;
  font-size: 12px; color: var(--muted);
  transition: transform .35s var(--ease-out), color .25s, border-color .25s, box-shadow .35s;
}
.tech__wall .ico { width: calc(var(--tile) * 0.3); height: calc(var(--tile) * 0.3); color: var(--ink); transition: color .25s; }
@media (hover: hover) and (pointer: fine) {
  .tech__wall li:hover { transform: translateZ(40px); color: var(--ink); border-color: var(--accent); box-shadow: 0 0 40px rgb(var(--glow) / .25); }
  .tech__wall li:hover .ico { color: var(--accent); }
}

/* ── 8 Contact ── */
.contact { position: relative; padding: 20vh calc(var(--m) + 40px) 40px; background: linear-gradient(transparent, rgb(var(--deep) / .16)); }
.contact__name { font-size: clamp(48px, 8vw, 140px); font-weight: 700; text-transform: uppercase; letter-spacing: -0.05em; line-height: 0.9; }
.contact__name span { display: block; }
.contact__name span + span { color: var(--accent); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 9vh; }
.contact__info { display: grid; gap: 30px; align-content: start; }
.contact__info .kicker { margin-bottom: 6px; color: var(--muted); }
.contact__info p:not(.kicker), .contact__info a, .contact__copy { font-size: clamp(18px, 1.5vw, 24px); }
.contact__copy { display: inline-flex; align-items: center; gap: 12px; }
.contact__copy span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; padding: 4px 9px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); transition: color .2s, border-color .2s; }
@media (hover: hover) and (pointer: fine) { .contact__copy:hover span { color: var(--accent); border-color: var(--accent); } }
.contact__social li a { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: clamp(22px, 2vw, 32px); font-weight: 500; letter-spacing: -0.02em; transition: color .25s, padding .35s var(--ease-out); }
.contact__social li a span { transition: transform .35s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .contact__social li a:hover { color: var(--accent); padding-left: 14px; } .contact__social li a:hover span { transform: rotate(45deg); } }
.foot { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 16vh; color: var(--muted); font-size: 14px; }
.foot b { color: var(--ink); font-weight: 500; }

/* ── Dialogs, toast ── */
dialog { border: 0; padding: 0; color: var(--ink); }
dialog::backdrop { background: rgb(var(--scrim) / .78); backdrop-filter: blur(6px); }
dialog[open] { animation: pop .3s var(--ease-out); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.palette { width: min(560px, 92vw); margin-top: 16vh; background: var(--bg-2); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 40px 100px rgb(var(--shadow) / .6); }
.palette__input { width: 100%; padding: 20px 22px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: 400 18px/1.2 "Geist", sans-serif; }
.palette__input:focus { outline: none; }
.palette__list { max-height: 50vh; overflow: auto; padding: 8px; }
.palette__list li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.palette__list li small { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.palette__list li[aria-selected="true"] { background: rgb(var(--glow) / .12); color: var(--accent); }
.palette__hint { padding: 12px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; display: flex; gap: 6px; align-items: center; }
.viewer { background: transparent; max-height: 96svh; }
.viewer__img { height: min(80svh, 860px); width: auto; aspect-ratio: 9 / 20; border-radius: 22px; margin: 0 auto; box-shadow: 0 30px 90px rgb(var(--shadow) / .7); }
.viewer__bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; }
.viewer__bar button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg-2); }
.viewer__bar form { margin: 0; }
.viewer__caption { font-size: 14px; color: var(--muted); min-width: 220px; text-align: center; }
.toast { position: fixed; z-index: 120; left: 50%; bottom: 30px; transform: translate(-50%, 30px); opacity: 0; padding: 12px 20px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; pointer-events: none; transition: transform .4s var(--ease-out), opacity .3s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }

/* ── Tablet ── */
@media (max-width: 1100px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav__email { display: none; }
  .tech__wall { grid-template-columns: repeat(6, var(--tile)); }
  .screens__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ── Phone: its own composition ── */
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  body { font-size: 16px; }
  .nav { grid-template-columns: 1fr auto; padding: 16px 18px; }
  .nav__email { display: none; }
  .nav__links { gap: 16px; font-size: 12px; }
  .nav__k { display: none; }
  .rail { display: none; }
  .hero { grid-template-columns: 1fr; align-content: space-between; padding: 92px 20px 80px; }
  .hero__name { font-size: min(10.2vw, 84px); }
  .hero__right { justify-self: start; text-align: left; }
  .hero__scroll { display: none; }
  .hero__role-b { font-size: min(10.2vw, 84px); }
  .about, .do { grid-template-columns: 1fr; padding: 12vh 20px; min-height: 0; }
  .about__body { grid-column: 1; }
  .about__facts { gap: 12px; }
  .do__title { padding-top: 0; }
  .journey { padding: 12vh 20px; }
  .journey__line { left: 10px; }
  .step { grid-template-columns: 1fr; padding: 22px 0 22px 34px; gap: 6px; }
  .step > div { text-align: left; padding: 0; order: 2; }
  .step b { text-align: left; order: 1; background: none; font-size: 26px; }
  .step > p { padding: 0; order: 3; }
  .work__title, .work__track { padding-left: 20px; }
  .work__progress { padding-left: 20px; padding-right: 20px; }
  .proj { padding: 26px 22px 28px; }
  .proj__visual { height: 240px; }
  .screens { padding: 14vh 20px 8vh; }
  .screens__search { padding: 14px 16px; }
  .screens__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tech__wall { --tile: clamp(64px, 18vw, 96px); grid-template-columns: repeat(4, var(--tile)); gap: 10px; transform: rotateX(14deg); }
  .tech__wall li { font-size: 10px; gap: 6px; border-radius: 12px; }
  .contact { padding: 14vh 20px 30px; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .glow, .hero__scroll i, .work__hint span { animation: none; }
  .card__more { transition: none; }
}

/* Portrait tablets: the stacked layout, with room for more columns */
@media (min-width: 600px) and (max-width: 1100px) and (orientation: portrait) {
  .hero { padding: 120px 48px 110px; }
  .about, .do, .journey, .screens, .contact { padding-left: 48px; padding-right: 48px; }
  .work__title, .work__track, .work__progress { padding-left: 48px; }
  .tech__wall { --tile: 92px; grid-template-columns: repeat(6, var(--tile)); }
  .screens__grid { grid-template-columns: repeat(3, 1fr); }
  .about__text { font-size: 28px; }
}

/* ══════════ Added for the real site ══════════ */

/* Page changes cross-fade; the theme switch grows a circle instead (see common.js). */
@view-transition { navigation: auto; }
.is-theming::view-transition-old(root), .is-theming::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.is-theming::view-transition-old(root) { z-index: 1; }
.is-theming::view-transition-new(root) { z-index: 2; }

/* The reactive background: sparks on a canvas, behind everything */
.sky { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
:root[data-theme="light"] .glow { opacity: 0.35; }
:root[data-theme="light"] .cursor { mix-blend-mode: normal; box-shadow: 0 0 24px 6px rgb(var(--glow) / 0.25); }
:root[data-theme="light"] .hero__role-b .swap { -webkit-text-stroke-width: 1.2px; }

/* Theme switch: a moon that opens into a sun */
.theme { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); color: var(--ink); transition: border-color .3s, color .3s; }
.theme svg { width: 20px; height: 20px; overflow: visible; }
.theme__core { fill: currentColor; transition: r .6s var(--ease-out); }
.theme__bite { transition: cx .6s var(--ease-out), cy .6s var(--ease-out); }
.theme__rays { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; fill: none; transform-origin: 12px 12px; transform: rotate(-90deg) scale(0); opacity: 0; transition: transform .6s var(--ease-out), opacity .3s; }
[data-theme="light"] .theme__core { r: 4.6px; }
[data-theme="light"] .theme__bite { cx: 30px; cy: -6px; }
[data-theme="light"] .theme__rays { transform: none; opacity: 1; }
@media (hover: hover) and (pointer: fine) { .theme:hover { border-color: var(--accent); color: var(--accent); } }

/* Hero line for recruiters */
.hero__sub { margin-top: 22px; max-width: 34ch; color: var(--muted); font-size: clamp(14px, 1.05vw, 17px); line-height: 1.5; }

/* About: the photo frame waits for a photo */
.about__top { display: flex; align-items: center; gap: 20px; margin-bottom: 22px; }
.about__top .kicker { margin: 0; }
.photo { position: relative; width: 72px; height: 72px; display: grid; place-items: center; background: rgb(var(--panel) / .7); font-weight: 700; font-size: 22px; letter-spacing: -0.05em; color: var(--accent); }
.photo img { position: absolute; inset: 6px; width: calc(100% - 12px); height: calc(100% - 12px); object-fit: cover; }
.photo .card__corner { width: 12px; height: 12px; }

.tags li.tags__small, .tech__wall li.is-small { opacity: .62; }

/* How I build */
.build { position: relative; padding: 18vh calc(var(--m) + 40px) 8vh; }
.build__steps { list-style: none; padding: 0; margin: 8vh 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(20px, 3vw, 48px); }
.build__steps b { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font: 500 15px var(--mono); background: var(--bg); }
.build__steps h3 { font-size: clamp(22px, 1.9vw, 30px); font-weight: 600; letter-spacing: -0.02em; margin-top: 22px; }
.build__steps p { color: var(--muted); margin-top: 10px; max-width: 32ch; }
.build__steps li:last-child b { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 30px rgb(var(--glow) / .45); }
.build__line { height: 2px; background: var(--line); margin-top: 6vh; overflow: hidden; }
.build__line i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); transform: scaleX(0); transform-origin: 0 50%; }
html:not(.js) .build__line i { transform: none; }
.build__quote { margin-top: 6vh; max-width: 26ch; font-size: clamp(28px, 3.4vw, 56px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }

/* Work cards: a line of text, tools, screens, links */
.proj__desc { margin-top: clamp(12px, 2.2vh, 22px); font-size: 16px; line-height: 1.5; min-height: 4.5em; }
.proj__tools { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; min-height: 0; margin-top: 10px; }
.proj__visual { height: clamp(130px, 27vh, 300px); }
.proj__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: clamp(12px, 2vh, 20px); font-size: 14px; font-weight: 500; }
.proj__links a { display: inline-flex; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line); transition: color .2s, border-color .2s; }
.proj__links a span { transition: transform .3s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .proj__links a:hover { color: var(--accent); border-color: var(--accent); } .proj__links a:hover span { transform: translateX(3px); } }
.badge { display: inline-block; vertical-align: middle; margin-left: 8px; padding: 3px 8px; border: 1px solid var(--accent); border-radius: 99px; color: var(--accent); font: 500 10px/1.2 var(--mono); letter-spacing: .1em; text-transform: uppercase; font-style: normal; }
.proj--small { gap: 0; }
.proj--small h3 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 600; letter-spacing: -0.03em; }
.mini { margin-top: clamp(14px, 2.6vh, 28px); padding-top: clamp(14px, 2.6vh, 24px); border-top: 1px solid var(--line); }
.mini h4 { margin: 0; font-size: 19px; font-weight: 600; }
.mini__tools { font: 12px var(--mono); color: var(--accent); margin-top: 4px; }
.mini p:not(.mini__tools) { color: var(--muted); font-size: 15px; margin-top: 8px; }
.mini a { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--line); }
html:not(.js) .work__pin { height: auto; overflow-x: auto; }
html:not(.js) .work__progress { display: none; }

/* Screens: computer shots take three columns */
.screens__grid li.is-wide { grid-column: span 3; }
.screens__grid li.is-wide img { aspect-ratio: 16 / 10; }
.viewer--wide .viewer__img { width: min(92vw, 1280px); height: auto; aspect-ratio: 16 / 10; border-radius: 14px; }
.viewer__img { background: var(--bg-2); }

.contact__lead { margin-top: 28px; max-width: 40ch; font-size: clamp(18px, 1.6vw, 24px); color: var(--muted); }

/* ══════════ Inner pages: case studies, downloads, writing ══════════ */
.page main { padding-top: 120px; }
.wrap { padding-inline: calc(var(--m) + 40px); }
.back { display: inline-flex; gap: 8px; font: 500 13px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.back:hover { color: var(--accent); }
.cs__hero { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; min-height: calc(100svh - 120px); padding-bottom: 6vh; }
.cs__hero .kicker { margin-top: 34px; }
.cs__title { font-size: clamp(56px, 9vw, 160px); font-weight: 700; letter-spacing: -0.055em; line-height: 0.9; text-transform: uppercase; margin-top: 14px; }
.cs__line { margin-top: 24px; max-width: 30ch; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; }
.cs__status { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; color: var(--muted); font-size: 15px; }
.cs__status::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgb(var(--glow) / .8); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.cs__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.cs__links .btn { margin-top: 0; }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
@media (hover: hover) and (pointer: fine) { .btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; } }
.cs__fan { position: relative; height: min(70svh, 640px); }
.cs__fan img { position: absolute; top: 50%; left: 50%; width: min(15vw, 230px); border-radius: 22px; box-shadow: 0 30px 70px rgb(var(--shadow) / .5), 0 0 0 1px var(--line); }
.cs__fan img:nth-child(1) { transform: translate(-125%, -46%) rotate(-8deg); }
.cs__fan img:nth-child(2) { transform: translate(-50%, -54%); z-index: 1; }
.cs__fan img:nth-child(3) { transform: translate(25%, -46%) rotate(8deg); }
.cs__facts { display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cs__facts div { padding: 28px 24px 26px 0; }
.cs__facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.cs__facts dt { font-size: clamp(30px, 3vw, 48px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--accent); }
.cs__facts dd { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.cs__block { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; padding-block: 14vh 0; }
.cs__block h2 { font-size: clamp(32px, 3.6vw, 60px); font-weight: 600; letter-spacing: -0.035em; line-height: 1; }
.cs__block h2 span { color: var(--accent); }
.cs__text { max-width: 64ch; }
.cs__text p { font-size: clamp(17px, 1.25vw, 19px); }
.cs__text p + p { margin-top: 1em; }
.cs__text ul:not(.tags) { margin-top: 1em; display: grid; gap: 10px; }
.cs__text ul:not(.tags) li { padding-left: 22px; position: relative; color: var(--muted); }
.cs__text ul:not(.tags) li::before { content: ""; position: absolute; left: 0; top: .7em; width: 10px; height: 2px; background: var(--accent); }
.cs__text ul:not(.tags) li b { color: var(--ink); font-weight: 600; }
.cs__text .tags { margin-top: 22px; }
.cs__shots { margin-top: 14vh; display: flex; gap: 22px; overflow-x: auto; padding: 10px calc(var(--m) + 40px) 26px; scroll-snap-type: x mandatory; scroll-padding-inline: calc(var(--m) + 40px); }
.shot { flex: none; margin: 0; width: clamp(200px, 19vw, 280px); scroll-snap-align: start; }
.shot--wide { width: clamp(320px, 52vw, 780px); }
.shot button { display: block; width: 100%; cursor: zoom-in; }
.shot img { width: 100%; border-radius: 18px; background: var(--bg-2); box-shadow: 0 0 0 1px var(--line); transition: transform .5s var(--ease-out), box-shadow .3s; }
.shot--wide img { border-radius: 12px; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); line-height: 1.4; }
@media (hover: hover) and (pointer: fine) { .shot button:hover img { transform: translateY(-8px); box-shadow: 0 24px 50px rgb(var(--shadow) / .45), 0 0 0 1px rgb(var(--glow) / .6); } }
.stories { display: grid; counter-reset: s; }
.story { padding: 30px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 60px 1fr; gap: 10px 20px; }
.story::before { counter-increment: s; content: counter(s, decimal-leading-zero); font: 500 14px var(--mono); color: var(--accent); padding-top: 6px; }
.story h3 { font-size: clamp(20px, 1.7vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.story p { grid-column: 2; color: var(--muted); }
.story p b { color: var(--ink); font-weight: 500; }
.stands { padding: 30px 32px; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: rgb(var(--panel) / .6); border-radius: 4px 14px 14px 4px; }
.cs__next { display: block; margin-top: 18vh; padding-block: 9vh 8vh; border-top: 1px solid var(--line); }
.cs__next small { display: block; font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.cs__next strong { display: flex; align-items: center; gap: .3em; font-size: clamp(52px, 9vw, 160px); font-weight: 700; letter-spacing: -0.055em; line-height: 1; text-transform: uppercase; transition: color .3s; }
.cs__next strong span { transition: transform .5s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .cs__next:hover strong { color: var(--accent); } .cs__next:hover strong span { transform: translateX(.2em) rotate(-45deg); } }
.page .foot { margin-top: 0; padding-block: 30px 40px; border-top: 1px solid var(--line); }

/* Download page */
.dl__head { padding-bottom: 8vh; }
.dl__head p:not(.kicker) { margin-top: 22px; max-width: 46ch; color: var(--muted); font-size: clamp(17px, 1.3vw, 20px); }
.dl__list { display: grid; gap: 22px; }
.app { display: grid; grid-template-columns: auto 1fr auto; gap: 26px 32px; align-items: start; padding: 32px; border: 1px solid var(--line); border-radius: 22px; background: rgb(var(--panel) / .72); backdrop-filter: blur(8px); scroll-margin-top: 110px; transition: border-color .4s, box-shadow .4s; }
.app:target { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 0 60px rgb(var(--glow) / .15); }
.app__icon { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px rgb(var(--shadow) / .35); }
.app h2 { font-size: clamp(26px, 2.4vw, 36px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; }
.app__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font: 13px var(--mono); color: var(--muted); }
.app__desc { margin-top: 12px; color: var(--muted); max-width: 56ch; }
.app__get { display: grid; justify-items: center; gap: 12px; }
.app__get .btn { margin-top: 0; }
.app__qr { width: 132px; height: 132px; padding: 8px; background: #fff; border-radius: 14px; }
.app__qr svg { display: block; width: 100%; height: 100%; }
.app__qr-note { font-size: 12px; color: var(--muted); }
.app details { grid-column: 2 / -1; border-top: 1px solid var(--line); padding-top: 16px; }
.app summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 10px; }
.app summary::-webkit-details-marker { display: none; }
.app summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; font: 14px var(--mono); color: var(--accent); transition: transform .3s var(--ease-out); }
.app details[open] summary::before { transform: rotate(45deg); }
.app__notes { margin-top: 14px; display: grid; gap: 18px; }
.app__notes h3 { font: 500 13px var(--mono); color: var(--accent); }
.app__notes ul { margin-top: 6px; display: grid; gap: 4px; }
.app__notes li { color: var(--muted); padding-left: 18px; position: relative; }
.app__notes li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }
.app--soon .btn { pointer-events: none; opacity: .5; }
.howto { margin-top: 12vh; display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; }
.howto h2 { font-size: clamp(28px, 3vw, 48px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.howto ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: h; }
.howto li { padding-left: 46px; position: relative; color: var(--muted); }
.howto li::before { counter-increment: h; content: counter(h); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; color: var(--accent); font: 500 13px var(--mono); }
.howto li b { color: var(--ink); font-weight: 500; }

/* Writing */
.posts { display: grid; border-top: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 140px 1fr auto; gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.posts time { font: 13px var(--mono); color: var(--muted); }
.posts h2 { font-size: clamp(22px, 2vw, 30px); font-weight: 600; letter-spacing: -0.02em; }
.empty { padding: 40px 0; color: var(--muted); }
.prose { max-width: 68ch; }
.prose p, .prose li { font-size: 18px; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 30px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2em; }
.prose code { font-family: var(--mono); font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--bg-2); }

/* ── New parts on tablets and phones ── */
@media (max-width: 1100px) {
  .build__steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .cs__facts { grid-template-columns: repeat(3, 1fr); }
  .cs__facts div:nth-child(4) { padding-left: 0; border-left: 0; }
  .cs__facts div:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 760px), (max-width: 1100px) and (orientation: portrait) {
  .theme { width: 32px; height: 32px; }
  .hero__sub { font-size: 14px; margin-top: 14px; }
  .build { padding: 12vh 20px 6vh; }
  .build__steps { grid-template-columns: 1fr; gap: 34px; margin-top: 5vh; }
  .build__line { display: none; }
  .proj__desc { min-height: 0; font-size: 15px; }
  .screens__grid li.is-wide { grid-column: span 2; }
  .wrap { padding-inline: 20px; }
  .page main { padding-top: 96px; }
  .cs__hero { grid-template-columns: 1fr; min-height: 0; gap: 20px; }
  .cs__fan { height: 360px; }
  .cs__fan img { width: 150px; border-radius: 16px; }
  .cs__facts { grid-template-columns: repeat(2, 1fr); }
  .cs__facts div, .cs__facts div + div { padding: 20px 14px 18px 0; border-left: 0; border-top: 0; }
  .cs__facts div:nth-child(even) { padding-left: 14px; border-left: 1px solid var(--line); }
  .cs__facts div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .cs__block { grid-template-columns: 1fr; gap: 18px; padding-top: 10vh; }
  .cs__shots { padding-inline: 20px; scroll-padding-inline: 20px; margin-top: 10vh; }
  .shot { width: 62vw; }
  .shot--wide { width: 86vw; }
  .story { grid-template-columns: 1fr; }
  .story p { grid-column: 1; }
  .stands { padding: 22px 20px; }
  .app { grid-template-columns: auto 1fr; padding: 22px; gap: 18px; }
  .app__icon { width: 64px; height: 64px; border-radius: 16px; }
  .app__get { grid-column: 1 / -1; justify-items: stretch; }
  .app__get .btn { justify-content: center; }
  .app__qr, .app__qr-note { display: none; }
  .app details { grid-column: 1 / -1; }
  .howto { grid-template-columns: 1fr; }
  .posts a { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .work__pin { height: auto; overflow-x: auto; }
  .work__progress { display: none; }
  .cs__status::before { animation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}

/* Touch screens: no hover, so the skill cards show everything; links get thumb-sized targets. */
@media (hover: none), (pointer: coarse) {
  .card__more { grid-template-rows: 1fr; }
  .card .card__corner { transform: none !important; }
  .nav__links a { padding-block: 12px; }
  .proj__links a, .mini a { padding-block: 10px 6px; }
  .back { padding-block: 10px; }
}
.screens__grid { grid-auto-flow: dense; }
@media (max-width: 760px) { .work__hint { display: none; } .work__bar { flex: 1; } }
