/* heylark.dev home page (2026-11 redesign). Writing pages keep landing.css. */
:root {
  --bg: #0b0c0a;
  --panel: rgba(16, 18, 13, 0.38);
  --khaki: #a9a77c;
  --khaki-dim: #4a4a32;
  --turq: #5EE6D0;
  --teal: #0F7C78;
  --burg: #6B1A2A;
  --red: #e2565b;
  --bone: #EDE7DA;
  --ink-2: #cfc9bc;
  --ink-3: #8e8a7f;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ui: "Inter", system-ui, sans-serif;
  --name: "Pirata One", serif;
  --notch: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body { background: var(--bg); color: var(--bone); font-family: var(--ui); overflow-x: clip; }
img, video { display: block; }
a { color: inherit; }

/* ═════════ background: one fixed layer for the whole page, no seam ═════════ */
.bgfx { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.bgfx .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; will-change: transform; }
.bgfx .b1 { width: 70vmax; height: 70vmax; left: -25vmax; bottom: -30vmax; background: #6B1A2A; animation: drift1 38s ease-in-out infinite alternate; }
.bgfx .b2 { width: 60vmax; height: 60vmax; right: -22vmax; top: -24vmax; background: #0F7C78; opacity: 0.42; animation: drift2 46s ease-in-out infinite alternate; }
.bgfx .b3 { width: 40vmax; height: 40vmax; left: 40%; top: 45%; background: #4a4a32; opacity: 0.35; animation: drift3 52s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(18vw, -22vh) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-20vw, 26vh) scale(0.9); } }
@keyframes drift3 { to { transform: translate(-30vw, -30vh) scale(1.2); } }
.bgfx .grain { position: absolute; inset: -50%; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(4) infinite; }
@keyframes grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -1%); } }
.bgfx .vig { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(0,0,0,0.55) 100%); }
@keyframes spin { to { rotate: 360deg; } }

.dust { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ═════════ labels, pulses ═════════ */
.lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--khaki); }
.lbl::before { content: "[ "; color: var(--ink-3); }
.lbl::after { content: " ]"; color: var(--ink-3); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--turq); box-shadow: 0 0 10px var(--turq); margin-right: 0.5em; vertical-align: 1px; animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.tick { color: var(--turq); margin-right: 0.4em; }

/* ═════════ nav ═════════ */
nav { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 32px; transition: background .3s, backdrop-filter .3s; }
nav.solid { background: rgba(11,12,10,0.6); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(74,74,50,0.5); }
.logo { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.logo img { width: 26px; height: 26px; }
.logo-text { font-family: var(--mono); font-size: 0.95rem; font-weight: 600; }
.logo-text .d { color: var(--turq); }
.logo-text .cur { color: var(--turq); animation: pulse 1s steps(1) infinite; }
.logo-status { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--ink-3); text-transform: uppercase; }
.tabs { display: flex; gap: 22px; }
.tabs a { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); text-decoration: none; }
.tabs a:hover { color: var(--turq); }
nav { gap: 22px; }
.tabs { margin-left: auto; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-cv { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-decoration: none; color: #08100f; background: var(--turq); padding: 7px 12px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); box-shadow: 0 0 18px rgba(94,230,208,0.4); }
.nav-cv:hover { background: #8ff3e3; }
/* language switch + CV language picker */
.lang-sw { display: flex; font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; border: 1px solid var(--khaki-dim); }
.lang-sw a { padding: 6px 8px; color: var(--ink-3); text-decoration: none; transition: color .2s, background .2s; }
.lang-sw a + a { border-left: 1px solid var(--khaki-dim); }
.lang-sw a:hover { color: var(--turq); }
.lang-sw a[aria-current] { color: var(--turq); background: rgba(15,124,120,0.22); }
.cv-pick { position: relative; }
.cv-pick > summary { list-style: none; cursor: pointer; display: block; user-select: none; }
.cv-pick > summary::-webkit-details-marker { display: none; }
.cv-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 150px; display: flex; flex-direction: column; background: rgba(11,12,10,0.95);
  border: 1px solid var(--khaki-dim); backdrop-filter: blur(12px); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.cv-menu a { display: flex; justify-content: space-between; gap: 14px; padding: 11px 14px; font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--bone); text-decoration: none; }
.cv-menu a + a { border-top: 1px solid rgba(74,74,50,0.6); }
.cv-menu a span { color: var(--ink-3); }
.cv-menu a:hover { background: rgba(15,124,120,0.35); color: var(--turq); }
.burger { display: none; width: 36px; height: 36px; background: none; border: 1px solid var(--khaki-dim); cursor: pointer; position: relative; }
.burger span { position: absolute; left: 9px; right: 9px; height: 2px; background: var(--bone); transition: transform .25s, top .25s; }
.burger span:nth-child(1) { top: 13px; } .burger span:nth-child(2) { top: 21px; }
nav.open .burger span:nth-child(1) { top: 17px; transform: rotate(45deg); }
nav.open .burger span:nth-child(2) { top: 17px; transform: rotate(-45deg); }

/* ═════════ HERO: the sigil covers the visor; wipe it and you see me ═════════ */
.hero { height: 125vh; position: relative; }   /* short: the circle dissolves quickly and the next section comes right in, no long empty stretch */
.stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.bg-sigil { position: absolute; left: 50%; top: 45%; width: 150vh; height: 150vh; max-width: none; translate: -50% -50%;
  opacity: calc(0.07 * clamp(0, (1 - var(--p, 0)) / 0.45, 1));   /* fades out before the sticky stage scrolls away, so its edge never cuts the sigil */
  animation: spin 140s linear infinite; filter: drop-shadow(0 0 30px rgba(94,230,208,0.25)); pointer-events: none; }
.name {
  position: absolute; left: 50%; bottom: -0.16em; translate: -50% calc(var(--p, 0) * -10vh);
  font-family: var(--name); font-size: clamp(6.5rem, 25vw, 26rem); line-height: 1; letter-spacing: 0.01em;
  color: var(--bone); white-space: nowrap; z-index: 1; text-shadow: 0 0 60px rgba(94,230,208,0.2);
  opacity: calc(1 - var(--p, 0) * 2);
}
.visor-wrap {
  --d: min(64vh, 46vw);
  position: absolute; left: 50%; top: 45%; width: var(--d); height: var(--d);
  translate: -50% -50%; z-index: 2;
  scale: var(--vs, 1); opacity: var(--vo, 1); filter: blur(var(--vb, 0px));
}
.visor { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: #0c0e0d; touch-action: pan-y; cursor: crosshair;
  box-shadow: 0 0 0 1px rgba(94,230,208,0.4), 0 0 90px rgba(15,124,120,0.5), 0 0 160px rgba(107,26,42,0.35); }
/* the face: a head-and-shoulders crop of the full-height portrait */
.visor .me { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 47% 34%; scale: 1.45; transform-origin: 47% 38%; }
.visor canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.visor .glass { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(120deg, transparent 38%, rgba(255,255,255,0.07) 45%, transparent 52%),
    radial-gradient(circle at 50% 50%, transparent 66%, rgba(15,124,120,0.3) 100%); }
.typed { position: absolute; left: 32px; top: 45%; translate: 0 -50%; z-index: 3;
  font-family: var(--mono); font-size: 0.95rem; color: var(--red); letter-spacing: 0.06em; white-space: nowrap; opacity: calc(1 - var(--p, 0) * 3); }
.typed::before { content: "> "; color: var(--ink-3); }
.caret { display: inline-block; width: 0.55em; height: 1.05em; vertical-align: -0.15em; margin-left: 3px; background: var(--red); animation: pulse 1s steps(1) infinite; }
.corner { position: absolute; z-index: 4; opacity: calc(1 - var(--p, 0) * 3); white-space: nowrap; }
.tl { top: 80px; left: 32px; } .tr { top: 84px; right: 32px; }
.role { font-family: var(--ui); font-weight: 700; font-size: clamp(0.95rem, 1.3vw, 1.2rem); letter-spacing: 0.04em; text-transform: uppercase; color: var(--bone);
  padding-left: 14px; border-left: 2px solid var(--turq); text-shadow: 0 0 18px rgba(94,230,208,0.35); }
.hint { position: absolute; left: 50%; top: calc(45% + var(--hd) / 2 + 16px); translate: -50% 0; z-index: 4;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--ink-3); text-transform: uppercase; opacity: calc(0.9 - var(--p, 0) * 4); }
.hint .t { display: none; }
@media (hover: none) { .hint .m { display: none; } .hint .t { display: inline; } }

/* ═════════ sections ═════════ */
.sec { position: relative; padding: 10vh 6vw; }
.big { font-family: var(--ui); font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.9;
  font-size: clamp(2.4rem, 6.4vw, 6.4rem); }
.sec-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); align-items: end; margin-bottom: 6vh; gap: 2rem; position: relative; }
/* the dust slot floats level with the headline and takes no height, so sections carry no empty band above the headline */
@media (min-width: 861px) {
  .sec-top .slot { position: absolute; grid-column: 2; grid-row: 1; left: 0; right: 0; top: 50%; translate: 0 -50%; }
}
.sec-top .big { margin-top: 2.4vh; }
.slot { height: 30vh; }
.tagline { margin-top: 1.6rem; max-width: 58ch; font-size: 1.06rem; line-height: 1.65; color: var(--ink-2); }
.tagline strong { color: var(--bone); }

/* movement shared by all cards: idle float on the wrapper, scroll and cursor tilt on the card */
.card-zone .float { animation: float 6s ease-in-out infinite; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.tilt { transform: perspective(1000px) rotateX(calc(var(--sx, 0deg) + var(--rx, 0deg))) rotateY(var(--ry, 0deg)); transition: transform 0.3s ease-out; }

/* notched outline panel */
.panel { position: relative; background: var(--panel); isolation: isolate; clip-path: var(--notch); }
.panel::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--khaki-dim);
  clip-path: polygon(evenodd, 0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%,
    0 0, 1px 1px, 1px calc(100% - 1px), calc(100% - 1px) calc(100% - 1px), calc(100% - 1px) calc(22px + 0.4px), calc(100% - 22px - 0.4px) 1px, 1px 1px); }
.panel::after { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: linear-gradient(160deg, rgba(15,124,120,0.3), rgba(107,26,42,0.3));
  transform: scaleX(0); transform-origin: left; transition: transform 0.45s cubic-bezier(.2,.7,.2,1); }
.panel:hover::after, .panel.seen::after { transform: scaleX(1); }
.status { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--turq); text-transform: uppercase; }
.nda { color: var(--khaki); }
.stack-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-tags span { font-family: var(--mono); font-size: 11px; color: var(--khaki); border: 1px solid var(--khaki-dim); padding: 3px 8px; }

/* ═════════ ABOUT ═════════ */
.about { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 5vw; align-items: start; }
.about h1 { margin-top: 2.4vh; }
.reloc { margin-top: 1.6rem; display: flex; gap: 0.9rem; flex-wrap: wrap; align-items: center; color: var(--ink-2); font-size: 0.98rem; }
.pill { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--turq); border: 1px solid rgba(94,230,208,0.4); padding: 5px 10px; white-space: nowrap; }
.proof { margin-top: 2.6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.proof b { display: block; font-weight: 800; font-size: clamp(2rem, 3.4vw, 3rem); letter-spacing: -0.03em; }
.proof b + span { display: block; margin-top: 0.3rem; font-size: 0.86rem; color: var(--ink-3); line-height: 1.45; }

.card-zone { position: sticky; top: 10vh; height: 82vh; display: grid; place-items: center; }
.holo-wrap { width: min(100%, 330px); filter: drop-shadow(0 0 28px rgba(94,230,208,0.35)) drop-shadow(0 30px 60px rgba(107,26,42,0.55)); }
.holo { position: relative; width: 100%; aspect-ratio: 1 / 2; padding: 9px;
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px));
  background: linear-gradient(160deg, #3a8f86, #0f2a24 35%, #2a0e18 70%, #8c2b3a); }
.holo img { width: 100%; height: 100%; object-fit: cover;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.holo .sheen { position: absolute; inset: 9px; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(115deg, transparent 30%, rgba(94,230,208,0.22) 44%, rgba(217,126,201,0.16) 52%, rgba(226,86,91,0.12) 58%, transparent 68%);
  background-size: 260% 100%; background-position: var(--sh, 50%) 0;
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px)); }
.holo .foil { position: absolute; top: 22px; left: 22px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--khaki); text-transform: uppercase; }
.holo .rank { position: absolute; top: 18px; right: 46px; font-family: var(--ui); font-weight: 900; font-size: 1.3rem; color: var(--turq); text-shadow: 0 0 14px var(--turq); }
.holo .cap { position: absolute; left: 24px; right: 24px; bottom: 22px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.holo .cap .n { font-family: var(--name); font-size: 1.5rem; }
.holo .cap em { font-style: normal; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--red); text-transform: uppercase; }

/* ═════════ WORK ═════════ */
.cases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.4rem; }
.cases > .float:nth-child(-n+2) { grid-column: span 3; }
.cases > .float { grid-column: span 2; }
.case, .term { backdrop-filter: blur(3px); }
.case { padding: 1.8rem 1.6rem; display: flex; flex-direction: column; gap: 1rem; height: 100%; }
.case h3 { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1.05; text-transform: uppercase; margin-top: 0.5rem; }
.case-sub { margin-top: 0.4rem; color: var(--khaki); font-size: 0.9rem; }
.case dl { display: grid; grid-template-columns: auto 1fr; gap: 0.55rem 1rem; }
.case dt { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.case dd { color: var(--ink-2); font-size: 0.92rem; line-height: 1.55; }
.case dd.result { color: var(--turq); }
.case-link { margin-top: auto; font-family: var(--mono); font-size: 0.82rem; color: var(--turq); text-decoration: none; }
.case-link:hover { text-decoration: underline; }

.more { margin-top: 3rem; }
.more > summary { cursor: pointer; list-style: none; font-family: var(--mono); font-size: 0.95rem; color: var(--bone); padding: 1rem 0; border-top: 1px solid var(--khaki-dim); border-bottom: 1px solid var(--khaki-dim); }
.more > summary::-webkit-details-marker { display: none; }
.more > summary .dim { color: var(--ink-3); }
.more-grid { margin-top: 1.6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.mini { padding: 1.4rem 1.3rem; display: flex; flex-direction: column; gap: 0.7rem; height: 100%; }
.mini h3 { font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1.15; margin-top: 0.4rem; }
.mini .sum { color: var(--ink-2); font-size: 0.9rem; line-height: 1.5; }
.mini details summary { cursor: pointer; font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--turq); list-style: none; margin-top: auto; }
.mini details summary::-webkit-details-marker { display: none; }
.mini details[open] summary { margin-bottom: 0.8rem; }
.mini details p { color: var(--ink-2); font-size: 0.86rem; line-height: 1.55; margin-bottom: 0.8rem; }
.mini details a { display: inline-block; margin-top: 0.8rem; font-family: var(--mono); font-size: 0.8rem; color: var(--turq); text-decoration: none; }

/* ═════════ EVALS ═════════ */
.evals-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.eval { padding: 1.7rem 1.5rem; height: 100%; }
.eval-k { font-weight: 800; font-size: 1.1rem; text-transform: uppercase; letter-spacing: -0.01em; }
.eval ul { margin-top: 1.1rem; list-style: none; display: grid; gap: 0.7rem; }
.eval li { color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; padding-left: 1.1rem; position: relative; }
.eval li::before { content: "→"; position: absolute; left: 0; color: var(--ink-3); }
.note { margin-top: 2rem; color: var(--ink-3); font-size: 0.92rem; }
.note a { color: var(--turq); text-decoration: none; }
.note a:hover { text-decoration: underline; }

/* ═════════ EXPERIENCE ═════════ */
.timeline { list-style: none; border-left: 1px solid var(--khaki-dim); margin-left: 6px; max-width: 900px; }
.timeline li { position: relative; padding: 0 0 2.2rem 2rem; display: grid; grid-template-columns: 9rem 1fr; gap: 1.5rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 11px; height: 11px; border-radius: 50%; background: var(--bg); border: 2px solid var(--turq); box-shadow: 0 0 10px var(--turq); }
.timeline .when { font-family: var(--mono); font-size: 0.85rem; color: var(--khaki); padding-top: 2px; }
.timeline .what { color: var(--ink-2); line-height: 1.6; }
.timeline .what strong { color: var(--bone); }
.learn { max-width: 70ch; color: var(--ink-2); line-height: 1.65; margin-top: 1rem; }

/* ═════════ terminals ═════════ */
.term { max-width: 860px; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--khaki-dim); }
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.term-dot.r { background: #c0282e; } .term-dot.y { background: #a9a77c; } .term-dot.g { background: #5EE6D0; }
.term-title { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.term-body { padding: 18px 20px 22px; font-family: var(--mono); font-size: 0.88rem; line-height: 1.9; color: var(--ink-2); }
.term-body .ok { color: var(--turq); display: inline-block; width: 1.5em; text-indent: 0; }
.term-body .ln:has(> .ok:first-child) { padding-left: 1.5em; text-indent: -1.5em; text-wrap: pretty; }
.term-body .cmd { color: var(--bone); background: rgba(94,230,208,0.1); padding: 0 4px; }
.term-body .dim { color: var(--ink-3); }
.term-body.logistics .ln { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; }
.term-body .k { color: var(--khaki); }
.term-body .p { color: var(--turq); }
.term-body .caret { background: var(--turq); }

/* ═════════ BEYOND ═════════ */
.beyond-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 4vw; align-items: stretch; }
.beyond-grid > .float { align-self: start; }
.beyond-list { display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; }
.beyond-item { display: grid; grid-template-columns: 2rem 1fr; gap: 0.8rem; align-items: baseline; }
.beyond-item .glyph { color: var(--turq); font-size: 1.3rem; text-shadow: 0 0 10px var(--turq); }
.beyond-item p { color: var(--ink-2); line-height: 1.6; }
.beyond-item strong { color: var(--bone); }
.story { padding: 9px; aspect-ratio: 9 / 16; max-height: 78vh; margin-left: auto; width: min(100%, 360px); }
.story video { width: 100%; height: 100%; object-fit: cover; }
.story .story-label { position: absolute; top: 18px; left: 18px; z-index: 2; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--bone); text-transform: uppercase; text-shadow: 0 0 8px #000; }
.photolog { margin-top: 8vh; }
.polaroids { margin-top: 2rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.polaroid { max-width: 300px; margin: 0 auto; padding: 8px 8px 10px; background: linear-gradient(165deg, #1E2327 0%, #101310 100%);
  border: 1.5px solid var(--khaki-dim); border-radius: 8px; box-shadow: inset 0 1px 0 rgba(232,226,214,0.04), 0 18px 40px -20px rgba(0,0,0,0.95); rotate: var(--rot, 0deg); }
.polaroid:hover { border-color: var(--teal); }
.polaroid .img { border-radius: 5px; }
.polaroid .img { aspect-ratio: 1; overflow: hidden; }
.polaroid img { width: 100%; height: 100%; object-fit: cover; }
.polaroid .cap { font-size: 0.86rem; color: var(--ink-2); padding: 0.6rem 0.25rem 0.05rem; text-transform: lowercase; }
.polaroid .cap::before { content: "▚ "; color: var(--teal); }

/* ═════════ CONTACT ═════════ */
.contact .eyebrow-row { display: flex; align-items: center; }
.btns { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.btn { font-family: var(--mono); font-size: 0.85rem; text-decoration: none; padding: 0.8rem 1.2rem; border: 1px solid var(--khaki-dim); color: var(--bone); background: rgba(20,22,16,0.6);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); transition: background .2s, color .2s; }
.btn:hover { background: rgba(15,124,120,0.35); color: var(--turq); }
.btn.primary { background: var(--turq); color: #08100f; border-color: var(--turq); font-weight: 600; }
.btn.primary:hover { background: #8ff3e3; color: #08100f; }
.cv-split { display: inline-flex; align-items: stretch; font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: #08100f; background: var(--turq);
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
.cv-split-l { padding: 0.8rem 1rem 0.8rem 1.2rem; }
.cv-split a { padding: 0.8rem 1rem; text-decoration: none; border-left: 1px solid rgba(8,16,15,0.35); transition: background .2s; }
.cv-split a:last-child { padding-right: 1.3rem; }
.cv-split a:hover { background: #8ff3e3; }
.foot-note { margin-top: 8vh; padding-top: 2rem; border-top: 1px solid var(--khaki-dim); color: var(--ink-3); font-size: 0.9rem; }
.foot-note .fn-name { font-family: var(--name); font-size: 1.2rem; color: var(--bone); }
.foot-note .d { color: var(--turq); }
.quote { margin-top: 0.8rem; font-family: var(--name); font-size: 1.2rem; color: var(--ink-2); letter-spacing: 0.02em; line-height: 1.35; }
@media (min-width: 1300px) { .quote { white-space: nowrap; } }
/* Russian footer quote: Pirata One has no Cyrillic, so the brand mono carries it */
.quote.quote-ru { font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0; white-space: normal; }

.bbox { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 50; opacity: 0;
  transition: left .28s cubic-bezier(.2,.8,.2,1), top .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1), height .28s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.bbox.on { opacity: 1; }
.bbox i { position: absolute; width: 16px; height: 16px; border: 2px solid var(--turq); filter: drop-shadow(0 0 6px var(--turq)); }
.bbox i:nth-child(1) { left: -8px; top: -8px; border-right: 0; border-bottom: 0; }
.bbox i:nth-child(2) { right: -8px; top: -8px; border-left: 0; border-bottom: 0; }
.bbox i:nth-child(3) { left: -8px; bottom: -8px; border-right: 0; border-top: 0; }
.bbox i:nth-child(4) { right: -8px; bottom: -8px; border-left: 0; border-top: 0; }

@media (max-width: 1100px) {
  .cases > .float, .cases > .float:nth-child(-n+2) { grid-column: span 3; }
  .more-grid, .evals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  nav { padding: 12px 16px; }
  .tabs { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; margin: 0;
    background: rgba(11,12,10,0.94); border-bottom: 1px solid var(--khaki-dim); padding: 6px 16px 14px; }
  .tabs a { padding: 14px 0; font-size: 14px; border-bottom: 1px solid rgba(74,74,50,0.5); }
  nav.open { background: rgba(11,12,10,0.94); }
  nav.open .tabs { display: flex; }
  .burger { display: block; }
  .nav-right { gap: 8px; }
  .lang-sw a { padding: 6px 7px; }
  .visor-wrap { --d: min(84vw, 54vh); top: 46%; }
  .typed { left: 16px; top: 126px; translate: 0 0; }
  .tl { left: 16px; top: 68px; right: 16px; white-space: normal; } .tr { left: 16px; right: auto; top: 98px; }
  .sec { padding: 10vh 16px; }
  .about, .beyond-grid { grid-template-columns: 1fr; }
  .about .txt { display: contents; }
  .about .head { order: 1; } .card-zone { order: 2; position: relative; top: 0; height: auto; padding: 6vh 0; } .about .rest { order: 3; }
  .holo-wrap { width: min(72vw, 300px); }
  .proof { gap: 0.9rem; }
  .proof b { font-size: 1.7rem; }
  .proof b + span { font-size: 0.74rem; }
  .sec-top { grid-template-columns: 1fr; margin-bottom: 4vh; }
  .sec-top .slot { height: 24vh; order: -1; }
  .cases, .more-grid, .evals-grid, .polaroids { grid-template-columns: 1fr; }
  .cases > .float, .cases > .float:nth-child(-n+2) { grid-column: auto; }
  .case dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .case dd { margin-bottom: 0.6rem; }
  .timeline li { grid-template-columns: 1fr; gap: 0.3rem; }
  .term-body.logistics .ln { grid-template-columns: 1fr; gap: 0; margin-bottom: 0.4rem; }
  .story { margin: 4vh auto 0; }
  .bbox { display: none; }
  .case, .term { backdrop-filter: none; }
  .panel { background: rgba(16, 18, 13, 0.55); }
  .bgfx .grain { animation: none; }
  .bgfx .blob { filter: blur(60px); }
}
@media (prefers-reduced-motion: reduce) {
  .float, .bgfx .blob, .bgfx .grain { animation: none; }
}

/* skip link, visible only on keyboard focus */
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--turq); color: #08100f; padding: 8px 12px; font-family: var(--mono); }
.skip:focus { left: 8px; }
/* latest writing block, filled by the build when an article is published */
#writing .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--khaki); }
#writing .view-title { font-weight: 900; text-transform: uppercase; letter-spacing: -0.045em; line-height: 0.9; font-size: clamp(2.4rem, 6.4vw, 6.4rem); margin: 2.4vh 0 4vh; }
#writing .post-list a { color: var(--bone); }
#writing .projects-note a { color: var(--turq); }

/* ═════════ entrance animations ═════════ */
/* headlines: words rise out of a mask, one after another */
.big .wm { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.big .wi { display: inline-block; transform: translateY(105%); transition: transform 0.8s cubic-bezier(.2,.75,.2,1); transition-delay: calc(var(--wi) * 55ms); }
.big.in .wi { transform: none; }
/* terminals: each line types in, the next one after it */
.term .ln { clip-path: inset(0 100% 0 0); }
.term.in .ln { animation: typeln 0.55s steps(28, end) forwards; animation-delay: calc(0.2s + var(--li) * 0.42s); }
@keyframes typeln { to { clip-path: inset(0 0 0 0); } }
/* timeline: the line draws with the scroll, the dots light up as it reaches them */
.timeline { border-left: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: var(--khaki-dim); }
.timeline::after { content: ""; position: absolute; left: -1px; top: 0; width: 2px; height: calc(var(--tl, 0) * 100%); background: var(--turq); box-shadow: 0 0 10px var(--turq); }
.timeline li::before { border-color: var(--khaki-dim); box-shadow: none; transition: border-color .3s, box-shadow .3s, background .3s; z-index: 1; }
.timeline li.lit::before { border-color: var(--turq); background: var(--turq); box-shadow: 0 0 12px var(--turq); }
.timeline li .what { opacity: 0.45; transition: opacity .4s; }
.timeline li.lit .what { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .big .wi { transform: none; transition: none; }
  .term .ln { clip-path: none; animation: none; }
  .timeline li .what { opacity: 1; }
}

/* ═════════ photo log: a polaroid opens full-size over a dark backdrop ═════════ */
.polaroid[role="button"] { cursor: zoom-in; }
.polaroid[role="button"]:focus-visible { outline: 2px solid var(--turq); outline-offset: 4px; }
.polaroid .img { position: relative; }
.polaroid .img::after { content: "⤢"; position: absolute; right: 8px; top: 8px; width: 26px; height: 26px; display: grid; place-items: center;
  font: 600 14px/1 var(--mono); color: var(--turq); background: rgba(8,13,12,0.72); border: 1px solid rgba(94,230,208,0.45); border-radius: 4px;
  opacity: 0; transition: opacity .2s; pointer-events: none; }
.polaroid:hover .img::after, .polaroid:focus-visible .img::after { opacity: 1; }
@media (hover: none) { .polaroid .img::after { opacity: 0.85; } }

html.lb-lock { overflow: hidden; }
html.lb-lock body { padding-right: var(--sbw, 0px); }
.lb { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; touch-action: none; overscroll-behavior: contain;
  padding: max(64px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: rgba(5,6,6,0.9); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: zoom-out; }
.lb[hidden] { display: none; }
.lb-fig { display: flex; flex-direction: column; align-items: center; max-width: 100%; will-change: transform; }
.lb-img { display: block; max-width: min(100%, 1600px); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto;
  border: 1.5px solid var(--khaki-dim); border-radius: 6px; background: #10141a; user-select: none; -webkit-user-drag: none;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.95), 0 0 40px -18px rgba(94,230,208,0.45); }
.lb-cap { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.86rem; color: var(--ink-2); text-transform: lowercase; text-align: center; }
.lb-cap::before { content: "▚ "; color: var(--turq); }
.lb-count { position: absolute; left: max(18px, env(safe-area-inset-left)); top: max(22px, env(safe-area-inset-top)); font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--khaki); }
.lb button { position: absolute; display: grid; place-items: center; font: 400 22px/1 var(--mono); color: var(--bone); cursor: pointer;
  background: rgba(20,22,16,0.7); border: 1px solid var(--khaki-dim); clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.lb button:hover { background: rgba(15,124,120,0.35); color: var(--turq); }
.lb button:focus-visible { outline: 2px solid var(--turq); outline-offset: 2px; }
.lb-x { right: max(16px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); width: 44px; height: 44px; font-size: 26px; }
.lb-nav { top: 50%; translate: 0 -50%; width: 44px; height: 64px; font-size: 28px; }
.lb-nav.prev { left: max(16px, env(safe-area-inset-left)); }
.lb-nav.next { right: max(16px, env(safe-area-inset-right)); }
@media (min-width: 861px) { .lb { padding-left: 84px; padding-right: 84px; } }
@media (max-width: 860px) {
  .lb-nav { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); translate: none; height: 44px; }
  .lb { padding-bottom: max(72px, env(safe-area-inset-bottom)); }
  .lb-img { max-height: calc(100vh - 190px); max-height: calc(100dvh - 190px); }
}

/* ═════════ contact: the sigil seals the page at the end, right of the quote — a small mark, not a block ═════════ */
.contact { padding-bottom: 6vh; }
.sign-off { margin-top: 6vh; padding-top: 1.4rem; border-top: 1px solid var(--khaki-dim); display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.sign-off .sign-text { min-width: 0; }
.sign-off .foot-note { margin-top: 0; padding-top: 0; border-top: 0; }
.seal { flex: none; position: relative; width: clamp(64px, 5.5vw, 88px); aspect-ratio: 1; }
.seal::before { content: ""; position: absolute; inset: -18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(107,26,42,0.45), rgba(15,124,120,0.14) 60%, transparent 100%); filter: blur(8px); }
.seal img { width: 100%; height: 100%; opacity: 0.85; animation: spin 140s linear infinite;
  filter: drop-shadow(0 0 6px rgba(94,230,208,0.4)) drop-shadow(0 0 16px rgba(192,40,46,0.22)); }
@media (max-width: 860px) { .sign-off { align-items: flex-end; gap: 1.2rem; } .seal { width: 56px; } }
@media (prefers-reduced-motion: reduce) { .seal img { animation: none; } }

/* ═════════ WRITING ═════════ */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 1.4rem; max-width: 1180px; }
.post { display: flex; flex-direction: column; gap: 0.9rem; height: 100%; padding: 1.8rem 1.6rem; color: inherit; text-decoration: none; }
.post .post-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--khaki); }
.post h3 { font-weight: 800; font-size: 1.45rem; letter-spacing: -0.03em; line-height: 1.05; text-transform: uppercase; }
.post .post-d { color: var(--ink-2); font-size: 0.95rem; line-height: 1.55; }
.post .post-go { margin-top: auto; font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--turq); }
.post:hover .post-go { text-decoration: underline; }

/* narrow phones: logo, EN/RU, CV and the burger stay in one row */
@media (max-width: 400px) {
  nav { gap: 10px; }
  .nav-right { gap: 6px; }
  .lang-sw a { padding: 6px 5px; }
  .nav-cv { padding: 7px 9px; }
}
@media (max-width: 345px) {
  .logo-text { font-size: 0.82rem; }
  .logo-status { font-size: 9px; letter-spacing: 0.1em; }
}
