/* ==========================================================
   Rahimly — əllə çəkilmiş, sakit və premium dizayn (woset referansı).
   Boz-ağ kağız, qara titrəyən mürəkkəb xətləri, xətdən azca sürüşmüş düz rəng ləkələri,
   əl yazısı başlıqlar, kiçik təmiz sans yazılar və nazik kontur düymələr.
   ========================================================== */

/* ---------- Rənglər və şriftlər ---------- */
:root {
  --bg: #ebe9e4;            /* kağız */
  --fg: #151515;            /* mürəkkəb */
  --fg-2: #3a3936;
  --muted: #74716b;
  --line: rgba(21, 21, 21, .14);
  --line-strong: rgba(21, 21, 21, .32);
  /* boyalar (referansdakı rəng nöqtələri) */
  --red: #a3283b; --blue: #5b6daf; --plum: #5b3b58; --green: #2e5c48; --yellow: #e8d07a;
  --paint: var(--blue);     /* əsas boya — giriş ekranındakı nöqtələrlə dəyişir */
  --paper: var(--bg);
  --fill-blend: multiply;
  --lw: 1;                  /* xətlərin qalınlığı (sürgü ilə) */
  --overlay: rgba(235, 233, 228, .94);

  --f-hand: "Gloria Hallelujah", "Neucha", "Comic Neue", cursive; /* Neucha — kiril hərfləri üçün */
  --f-sans: "Inter Tight", "Helvetica Neue", system-ui, sans-serif;
  --f-mono: "DM Mono", ui-monospace, Menlo, monospace;
  --f-brand: "Google Sans", "Product Sans", system-ui, sans-serif;

  --max: 1240px;
  --gutter: clamp(16px, 3.4vw, 36px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: light;
}
/* tünd rejim (yalnız düymə ilə): qara kağız, ağ təbaşir xətləri */
:root[data-theme="dark"] {
  --bg: #161615; --fg: #ebe9e4; --fg-2: #cfccc4; --muted: #8f8c85;
  --line: rgba(235, 233, 228, .14); --line-strong: rgba(235, 233, 228, .34);
  --red: #c24456; --blue: #7486c8; --plum: #87608a; --green: #4f8a6e; --yellow: #e8d07a;
  --fill-blend: normal; --overlay: rgba(22, 22, 21, .94);
  color-scheme: dark;
}
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .35s; }

/* ---------- Əsas ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-sans); font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* kağız dənəsi */
body::after { content: ""; position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .06; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .4 0 0 0 0 .38 0 0 0 0 .34 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] body::after { mix-blend-mode: screen; opacity: .035; }
[hidden] { display: none !important; }
/* qeydlərdən başqa heç nə seçilə bilməz */
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.article .prose, .article h1, input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img, svg { -webkit-user-drag: none; }
img { display: block; max-width: 100%; }
svg { display: block; flex: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--yellow); color: #151515; }
:focus-visible { outline: 2px solid var(--paint); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hand { font-family: var(--f-hand); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; line-height: 1.25; }
.hand em { font-style: normal; }
.u { border-bottom: 1px solid currentColor; padding-bottom: 1px; transition: opacity .2s; }
.u:hover { opacity: .55; }

/* ---------- Nav (referans kimi: solda keçidlər, ortada loqo, sağda alətlər) ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, transform .5s var(--ease); }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav.away { transform: translateY(-100%); }
.nav-in { height: 58px; padding: 0 var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; font-size: 13px; }
.nav-links { display: flex; gap: 18px; }
.nav-links a { padding-bottom: 1px; border-bottom: 1px solid transparent; transition: border-color .2s; }
.nav-links a:hover, .nav-links a.active { border-color: currentColor; }
.logo { font-family: var(--f-brand); font-size: 18px; font-weight: 500; letter-spacing: -0.02em; display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
/* loqonun dörd enerji işarəsi — theliming.rahimly.com ilə birə-bir eyni */
.mk { display: inline-block; flex: none; -webkit-mask: url("bolt.png") center / contain no-repeat; mask: url("bolt.png") center / contain no-repeat; }
.brand-bolts { display: inline-flex; align-items: center; gap: 1px; margin: 0 .3em 0 0; }
.brand-bolts .mk { width: 7px; height: 13px; background: #3fae70; }
.brand-bolts .mk:nth-child(1) { rotate: -20deg; }
.brand-bolts .mk:nth-child(2) { width: 6px; height: 11px; rotate: 25deg; }
.brand-bolts .mk:nth-child(3) { width: 8px; height: 15px; }
.brand-bolts .mk:nth-child(4) { width: 6px; height: 11px; rotate: -35deg; }
.logo:hover .mk { animation: charged .5s ease; }
.logo:hover .mk:nth-child(2) { animation-delay: .07s; } .logo:hover .mk:nth-child(3) { animation-delay: .14s; } .logo:hover .mk:nth-child(4) { animation-delay: .21s; }
@keyframes charged { 40% { transform: scale(1.6) rotate(-8deg); } }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.nav-right button, .nav-right a { display: inline-flex; align-items: center; gap: 6px; }
.icon-btn { width: 28px; height: 28px; justify-content: center; border-radius: 50%; transition: background .2s; }
.icon-btn:hover { background: var(--line); }
.lang { display: inline-flex; gap: 2px; }
.lang button { padding: 2px 4px; color: var(--muted); border-bottom: 1px solid transparent; }
.lang button[aria-pressed="true"] { color: var(--fg); border-color: currentColor; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.menu-btn { display: none !important; }
.mobile-menu { position: fixed; inset: 0; z-index: 49; background: var(--bg); display: flex; flex-direction: column; justify-content: center; gap: 4px;
  padding: 0 var(--gutter); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.mobile-menu.open { opacity: 1; pointer-events: auto; }
.mobile-menu a { font-family: var(--f-hand); font-size: 40px; text-transform: uppercase; }

/* ---------- Ayarlar: dişli çarx düyməsi və əllə çəkilmiş panel (dil və tema) ---------- */
.settings-btn { width: 32px; height: 32px; }
.settings-btn .gear { width: 24px; }
.gear-in { transform-box: fill-box; transform-origin: center; transition: transform .6s cubic-bezier(.3, 1.4, .5, 1); }
.settings-btn:hover .gear-in, .settings-btn.open .gear-in { transform: rotate(60deg); }
.settings { position: fixed; z-index: 60; top: 64px; right: var(--gutter); width: min(330px, calc(100vw - 2 * var(--gutter))); padding: 18px 20px 20px; isolation: isolate; }
.settings::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--bg); border: 2px solid var(--fg); border-radius: 10px; filter: url(#r2); }
.settings::after { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--yellow); border-radius: 10px; translate: 7px 6px; opacity: .9; }
.settings-title { margin: 0 0 12px; font-size: 22px; }
.settings .sub-title { margin: 14px 0 8px; }
.settings .pills { gap: 6px; }
.settings .pill { height: 30px; padding: 0 12px; text-transform: none; letter-spacing: 0; font-size: 13px; }
.settings .pill svg { margin-right: 2px; }

/* ---------- Kontur düymələr (referansdakı START OVER / ERASER kimi) ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--fg); font-size: 11.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  transition: background .2s, color .2s, transform .2s var(--ease); }
.pill:hover { background: var(--fg); color: var(--bg); }
.pill:active { transform: translateY(1px); }
.pill.on { background: var(--fg); color: var(--bg); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Əllə çəkilmiş şəkillər ---------- */
.doodle { width: 100%; height: auto; overflow: visible; }
.dl-ink { fill: none; stroke: var(--fg); stroke-width: calc(var(--w, 3) * var(--lw)); stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1; }
.dl-dot, .dl-solid { fill: var(--fg); }
.dl-fill { mix-blend-mode: var(--fill-blend); opacity: 0; transition: opacity .8s var(--ease) .5s; }
.dl-paint { fill: var(--paint); transition: fill .5s var(--ease), opacity .8s var(--ease) .5s; }
.dl-blue { fill: var(--blue); } .dl-green { fill: var(--green); } .dl-yellow { fill: var(--yellow); }
.dl-red { fill: var(--red); } .dl-plum { fill: var(--plum); } .dl-paper { fill: var(--bg); mix-blend-mode: normal; }
.dl-plum-soft { fill: color-mix(in srgb, var(--plum) 22%, transparent); }
.dl-grey { fill: color-mix(in srgb, var(--fg) 42%, var(--bg)); }
.dl-blue-soft { fill: color-mix(in srgb, var(--blue) 16%, transparent); }
.dl-glow { fill: var(--yellow); }
.drawn .dl-glow { opacity: .38; }
.dl-led { fill: var(--yellow); animation: led 2.4s steps(1) infinite; }
@keyframes led { 0%, 60% { opacity: 1; } 70%, 80% { opacity: .15; } 90% { opacity: 1; } }
/* görünəndə: əvvəl xətlər çəkilir, sonra rənglər basılır */
.drawn .dl-ink { animation: draw 1.4s var(--ease) forwards; }
.drawn .dl-ink:nth-of-type(3n+1) { animation-delay: .1s; } .drawn .dl-ink:nth-of-type(3n+2) { animation-delay: .22s; }
.drawn .dl-fill { opacity: .92; }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* xətlər "qaynayır" — əllə çəkilmiş cizgi filmi kimi */
.boil { filter: url(#r1); }
.live .boil, .live.boil { animation: boil .45s steps(1) infinite; }
/* əl yazısı da eyni cür titrəyir */
.hand { filter: url(#r1); }
.hand.live { animation: boil .45s steps(1) infinite; }
@keyframes boil { 0% { filter: url(#r1); } 33% { filter: url(#r2); } 66% { filter: url(#r3); } }
/* səhnədəki kiçik canlı hərəkətlər */
.steam { animation: steam 2.6s ease-in-out infinite alternate; }
@keyframes steam { to { transform: translate(2px, -5px); opacity: .55; } }
.cat { transform-box: fill-box; transform-origin: 50% 100%; animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03, 1.06); } }
/* monitor: sakit vaxt qalxan, xəbərdarlıq gələndə qırmızı üçbucaq; analitik irəli əyilir */
.scr-alert { opacity: 0; transition: opacity .3s; }
.scr-ok { transition: opacity .3s; }
.alert .scr-alert { opacity: 1; animation: flash .5s steps(1) 3; }
.alert .scr-ok { opacity: 0; }
@keyframes flash { 50% { opacity: .2; } }
.cat-tail { transform-box: fill-box; transform-origin: 0 50%; animation: tail 3.6s ease-in-out infinite; }
@keyframes tail { 50% { transform: rotate(-14deg); } }
.plant { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 7s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.5deg); } to { transform: rotate(2deg); } }
.twinkle { animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }
#scene { cursor: pointer; }
/* saat həqiqətən işləyir; pişik xəbərdarlıqda "!" ilə oyanır; ördək yellənir */
.clock-min { transform-box: view-box; transform-origin: 380px 74px; animation: spin 60s linear infinite; }
.clock-hr { transform-box: view-box; transform-origin: 380px 74px; animation: spin 720s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cat-alert { opacity: 0; transition: opacity .2s; }
.alert .cat-alert { opacity: 1; animation: pop .4s cubic-bezier(.3, 1.8, .5, 1); }
.alert .cat-tail { animation-duration: .6s; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }
.a-logs { animation: a-logs 1.8s ease-in-out infinite; }
@keyframes a-logs { 0%, 65% { transform: translateY(0); } 100% { transform: translateY(-10px); } }
.dl-cursor { fill: var(--fg); animation: caret 1s steps(1) infinite; }
.duck { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite alternate; }
/* ---------- İkonların daimi hərəkəti ("a-" sinifləri, doodles.js) ----------
   Hər ikonun öz hərəkəti var; ekrandan çıxanda dayanır (.live olmayanda), görünəndə davam edir. */
.dl-line { fill: none; stroke: var(--fg); stroke-width: calc(var(--w, 3) * var(--lw)); stroke-linecap: round; stroke-linejoin: round; }
.dl-line.faint { opacity: .22; }
[class^="a-"], [class*=" a-"] { transform-box: fill-box; transform-origin: center; animation-delay: var(--dl, 0s); animation-iteration-count: infinite; }
.doodle:not(.live) [class^="a-"], .doodle:not(.live) [class*=" a-"] { animation-play-state: paused; }
.a-blink { animation: a-blink 1.6s ease-in-out infinite; }
@keyframes a-blink { 50% { opacity: .12; } }
.a-rise { animation: a-rise 2.6s ease-out infinite; }
@keyframes a-rise { 0% { transform: translateY(4px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-14px); opacity: 0; } }
.a-drop { animation: a-drop 2.7s ease-in infinite; }
@keyframes a-drop { 0% { transform: translateY(-8px); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(22px); opacity: 0; } 100% { opacity: 0; } }
.a-pulse { animation: a-pulse 1.8s ease-in-out infinite; }
@keyframes a-pulse { 50% { transform: scale(1.12); } }
.a-ring { transform-origin: 50% 0; animation: a-ring 1.4s ease-in-out infinite; }
@keyframes a-ring { 0%, 100% { transform: rotate(-10deg); } 50% { transform: rotate(10deg); } }
.a-beat { stroke-dasharray: .3 .7; animation: a-beat 1.6s linear infinite; }
@keyframes a-beat { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.a-write { stroke-dasharray: 1; animation: a-write 3s ease-in-out infinite; }
@keyframes a-write { 0% { stroke-dashoffset: 1; opacity: 1; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.a-pencil { animation: a-pencil 3s ease-in-out infinite; }
@keyframes a-pencil { 0%, 100% { transform: translate(-26px, 0); } 20% { transform: translate(-18px, -2px); } 40% { transform: translate(-8px, 1px); } 55%, 85% { transform: translate(0, 0); } }
.a-shake { animation: a-shake 3s ease-in-out infinite; }
@keyframes a-shake { 0%, 34%, 56%, 100% { transform: rotate(0); } 38% { transform: rotate(-4deg); } 42% { transform: rotate(4deg); } 46% { transform: rotate(-3deg); } 50% { transform: rotate(2deg); } }
.a-try-l { animation: a-try-l 3s ease-in-out infinite; }
@keyframes a-try-l { 0%, 70%, 100% { transform: translateX(0); } 35% { transform: translateX(16px) rotate(8deg); } }
.a-try-r { animation: a-try-r 3s ease-in-out infinite; }
@keyframes a-try-r { 0%, 70%, 100% { transform: translateX(0); } 35% { transform: translateX(-16px) rotate(-8deg); } }
.a-miss { animation: a-miss 3s steps(1) infinite; }
@keyframes a-miss { 0%, 100% { opacity: 0; } 12%, 30% { opacity: 1; } }
.a-wave { animation: a-wave 2s ease-in-out infinite alternate; }
@keyframes a-wave { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
.a-flow { animation: a-flow 3.3s linear infinite; }
@keyframes a-flow { 0% { transform: translateX(0); opacity: 0; } 15%, 80% { opacity: 1; } 100% { transform: translateX(96px); opacity: 0; } }
.a-scan { animation: a-scan 4s ease-in-out infinite alternate; }
@keyframes a-scan { from { transform: translateX(-26px) rotate(-4deg); } to { transform: translateX(16px) rotate(3deg); } }
.a-bounce { animation: a-bounce 1.8s infinite; }
@keyframes a-bounce { 0%, 100% { transform: translateX(0); animation-timing-function: ease-in; } 45% { transform: translateX(10px) scale(1.1, .85); animation-timing-function: ease-out; } 60% { transform: translateX(4px); } }
.a-bob { animation: a-bob 1.6s ease-in-out infinite alternate; }
@keyframes a-bob { to { transform: translateY(-4px); } }
.a-down { animation: a-down 1.8s ease-in infinite; }
@keyframes a-down { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }
.a-swing { transform-origin: 50% 0; animation: a-swing 1.8s ease-in-out infinite alternate; }
@keyframes a-swing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.a-tick { stroke-dasharray: 1; animation: a-tick 3.2s ease-out infinite; }
@keyframes a-tick { 0% { stroke-dashoffset: 1; opacity: 1; } 28%, 82% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.a-siren { animation: a-siren .7s steps(1) infinite; }
@keyframes a-siren { 50% { opacity: .2; } }
.a-fish { animation: a-fish 2.2s ease-in-out infinite alternate; }
@keyframes a-fish { from { transform: translateY(-3px) rotate(-3deg); } to { transform: translateY(4px) rotate(3deg); } }
.a-swim { animation: a-swim 4s ease-in-out infinite alternate; }
@keyframes a-swim { from { transform: translateX(0); } to { transform: translateX(26px) translateY(-2px); } }
.a-flicker { animation: a-flicker 2.6s infinite; }
@keyframes a-flicker { 0%, 9%, 13%, 58%, 63%, 100% { opacity: 1; transform: scale(1); } 10%, 12% { opacity: .2; } 60% { opacity: .4; transform: scale(1.12); } }
.a-twinkle { animation: a-twinkle 2.4s ease-in-out infinite; }
@keyframes a-twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .6; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }
.a-wobble { transform-origin: 50% 100%; animation: a-wobble 2.6s ease-in-out infinite alternate; }
@keyframes a-wobble { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
.a-sketch { animation: a-sketch 1.8s linear infinite; }
@keyframes a-sketch { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-8px, 4px); } 50% { transform: translate(-3px, 8px); } 75% { transform: translate(-11px, 2px); } }
.a-fly { animation: a-fly 4s ease-in-out infinite; }
@keyframes a-fly { 0%, 100% { transform: translate(0, 0) rotate(0); } 25% { transform: translate(-10px, -8px) rotate(-8deg); } 50% { transform: translate(-4px, 6px) rotate(4deg); } 75% { transform: translate(6px, -4px) rotate(-3deg); } }
.a-trail { stroke-dasharray: .06 .06; animation: a-trail 1.2s linear infinite; }
@keyframes a-trail { to { stroke-dashoffset: -.24; } }
.a-charge { animation: a-charge 4s ease-in-out infinite; }
@keyframes a-charge { 0%, 84%, 100% { transform: scale(1) rotate(0); } 90% { transform: scale(1.18) rotate(-10deg); } 95% { transform: scale(.96) rotate(4deg); } }
/* ---------- Kiçik sürprizlər ---------- */
/* axan ulduz */
.shoot { opacity: 0; transform: translate(70px, 58px); }
.shoot.go { animation: shoot 1s ease-in forwards; }
@keyframes shoot { 0% { transform: translate(70px, 58px); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(236px, 122px); opacity: 0; } }
.dl-shoot { fill: var(--yellow); stroke: var(--fg); stroke-width: 1.2; }
.soon-note { margin: 0; padding: 14px 0; border-top: 1px solid var(--line); font-size: 18px; color: var(--muted); }

/* giriş yazısında "əlaqə" keçidi: altından əllə çəkilmiş xətt */
.caption .cap-link { position: relative; display: inline-block; color: inherit; pointer-events: auto; }
.caption .cap-link .scribble { bottom: -.12em; height: .3em; }
.caption .cap-link:hover { color: var(--paint); }

/* sözün altındakı xətt */
.scribble { position: absolute; left: -2%; bottom: -.18em; width: 104%; height: .34em; overflow: visible; pointer-events: none; }
.scribble path { fill: none; stroke: var(--paint); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.drawn .scribble path { animation: draw 1s var(--ease) .4s forwards; }

.fade { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.fade.in { opacity: 1; transform: none; }

/* ---------- Giriş ekranı: ortada səhnə və əl yazısı, aşağıda üç hissə ---------- */
.stage { position: relative; min-height: max(640px, 100svh); padding: 66px var(--gutter) 22px; display: grid; grid-template-rows: 1fr auto auto; }
.stage-art { position: relative; align-self: center; justify-self: center; width: min(1020px, 100%, calc((100svh - 390px) * 1.915)); }
.caption { position: relative; z-index: 2; margin: 0 0 0 30%; font-size: clamp(18px, 2.2vw, 30px); line-height: 1.35; }
.caption span { display: block; }
.caption span:nth-child(2) { padding-left: 2.6em; }
.caption span:nth-child(3) { padding-left: 4.4em; }
.stage-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 20px; }
.who h1 { margin: 0 0 8px; font-size: 26px; font-weight: 400; letter-spacing: -0.01em; }
.who p { margin: 0 0 14px; max-width: 30ch; font-size: 12.5px; line-height: 1.45; color: var(--fg-2); }
.who a { font-size: 12.5px; }
.paints { justify-self: end; display: flex; align-items: center; gap: 22px; }
.swatches { display: flex; gap: 6px; }
.swatches button { width: 20px; height: 20px; border-radius: 50%; background: var(--c); transition: transform .25s var(--ease); }
.swatches button:hover { transform: scale(1.15); }
.swatches button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--fg); }
/* xətt qalınlığı sürgüsü */
.weight { -webkit-appearance: none; appearance: none; width: 64px; height: 14px; background: transparent; cursor: pointer; }
.weight::-webkit-slider-runnable-track { height: 1.5px; background: var(--fg); }
.weight::-moz-range-track { height: 1.5px; background: var(--fg); }
.weight::-webkit-slider-thumb { -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4.75px; border-radius: 50%; background: var(--green); border: 0; }
.weight::-moz-range-thumb { width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 0; }

/* ---------- Bölmələr ---------- */
section { scroll-margin-top: 70px; }
.section { padding-block: clamp(70px, 10vw, 120px); }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: clamp(26px, 3.4vw, 42px); }
.head p { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* layihələr: çərçivəsiz kağız plitələr */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 36px; }
.tile { display: flex; flex-direction: column; gap: 10px; }
.tile-art { display: grid; place-items: center; aspect-ratio: 5 / 4; border-radius: 6px; background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.tile-art .doodle { width: 44%; transition: transform .6s var(--ease); }
.tile:hover .tile-art .doodle { transform: rotate(-5deg) scale(1.06); }
.tile-meta { font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.tile h3 { margin: 0; font-size: 21px; font-weight: 400; line-height: 1.2; letter-spacing: -0.01em; }
.tile p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-2); }
.tile .pill { align-self: flex-start; margin-top: 4px; }
.tile.hide { display: none; }
.more { margin-top: 44px; display: flex; justify-content: center; }

/* saytlar: əl ilə çəkilmiş çərçivədə şəkil, basan kimi sayta gedir */
.sites { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 36px; }
.site { display: flex; flex-direction: column; gap: 12px; }
.site-shot { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 6px; background: color-mix(in srgb, var(--fg) 3.5%, transparent);
  transition: transform .5s var(--ease); }
.site-shot .doodle { width: 74%; transition: transform .6s var(--ease); }
.site:hover .site-shot .doodle { transform: rotate(-3deg) scale(1.04); }
.site.soon { cursor: default; }
.site.soon .site-body b { color: var(--muted); }
.site-body { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.site-body b { font-size: 19px; font-weight: 400; }
.site-body small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* qeydlər */
.posts { border-top: 1px solid var(--fg); }
.post-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-row time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-row h3 { margin: 0 0 4px; font-size: 20px; font-weight: 400; line-height: 1.25; letter-spacing: -0.01em; }
.post-row p { margin: 0; font-size: 13.5px; color: var(--fg-2); }
.post-row .go { transition: transform .3s var(--ease); }
.post-row:hover h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.post-row:hover .go { transform: translateX(4px); }

/* haqqımda */
.about { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, .8fr); gap: clamp(28px, 4vw, 60px); align-items: start; }
.about-lead { margin: 0 0 16px; font-size: clamp(20px, 2vw, 26px); line-height: 1.35; letter-spacing: -0.01em; }
.about-text p { margin: 0 0 12px; color: var(--fg-2); }
.sub-title { margin: 0 0 12px; font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.about-side .pills { margin-bottom: 34px; }
.about-side .pill { pointer-events: none; }
.timeline div { display: grid; grid-template-columns: 100px 1fr; gap: 2px 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.timeline span:first-child { color: var(--muted); grid-row: span 2; }
.timeline span:last-child { color: var(--muted); font-size: 12.5px; }

/* ziyarətçi sətri: girişin yuxarısında, hər ekran ölçüsündə səliqəli sarılır */
.here { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 10px; margin: 6px auto 0; max-width: 100%;
  font-size: 12px; color: var(--muted); text-align: center; margin-top: clamp(16px, 3vh, 28px); padding-top: 14px; border-top: 1px solid var(--line); }
#here-pin .doodle { width: 11px; }
/* sancaq tərpənmir: nə yellənir, nə də xətləri titrəyir */
.doodle-pin .boil { animation: none !important; }
.here-label { font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.here b { font-size: clamp(16px, 1.9vw, 21px); color: var(--fg); letter-spacing: .02em; text-transform: none; overflow-wrap: anywhere; }
.here b::after { content: ""; display: inline-block; width: .4em; height: .85em; margin-left: 3px; vertical-align: -1px; background: var(--paint); animation: caret 1s steps(1) infinite; }
.here.done b::after { display: none; }
.here-meta:empty { display: none; }
.here-meta::before { content: "·"; margin-right: 10px; }
@keyframes caret { 50% { opacity: 0; } }
@media (max-width: 480px) {
  .here { font-size: 11px; gap: 2px 8px; }
  .here b { flex-basis: 100%; order: 3; }
  .here-meta { order: 4; }
  #you-country::before { content: none; }
}
.a-pinsway { transform-origin: 50% 94%; animation: a-pinsway 2.6s ease-in-out infinite alternate; }
@keyframes a-pinsway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
.a-hop { animation: a-hop 2.2s ease-in-out infinite; }
@keyframes a-hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }
.a-ripple { animation: a-ripple 2.2s ease-out infinite; }
@keyframes a-ripple { 0% { transform: scale(.6); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }

/* əlaqə */
.contact { text-align: center; padding-block: clamp(80px, 11vw, 140px); }
.contact .doodle-mail { width: min(220px, 56vw); margin: 0 auto 26px; }
.contact h2 { margin: 0 auto; max-width: 18ch; font-size: clamp(28px, 4vw, 52px); }
.contact p { margin: 12px auto 0; max-width: 34em; color: var(--fg-2); font-size: 14px; }
.mail { position: relative; display: inline-block; margin-top: 26px; font-size: clamp(20px, 2.4vw, 28px); }

/* footer */
.footer { padding: 26px 0 78px; border-top: 1px solid var(--line); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer a:hover { color: var(--fg); }

/* ---------- Axtarış ---------- */
.search { position: fixed; inset: 0; z-index: 110; background: var(--overlay); display: flex; justify-content: center; padding: 12vh var(--gutter) 24px;
  opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); }
.search.open { opacity: 1; pointer-events: auto; }
.search-box { width: min(620px, 100%); }
.search-back { margin-bottom: 18px; }
.search-input { width: 100%; height: 56px; border: 0; border-bottom: 1.5px solid var(--fg); outline: 0; padding: 0 2px; font-family: var(--f-hand); font-size: 24px;
  color: var(--fg); background: transparent; }
.search-results { margin-top: 14px; display: grid; max-height: 60vh; overflow: auto; }
.result { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.result:hover, .result.sel { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.result b { display: block; font-weight: 400; font-size: 16px; }
.result small { color: var(--muted); font-size: 12.5px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-family: var(--f-hand); }

/* ---------- Geri düyməsi ---------- */
.back-fab { position: fixed; z-index: 45; left: var(--gutter); top: 70px; background: var(--bg); transition: top .5s var(--ease), opacity .3s, transform .3s var(--ease), background .2s, color .2s; }
.nav.away ~ .back-fab { top: 14px; }
.back-fab.top { top: auto !important; bottom: 20px; left: auto; right: var(--gutter); }
.back-fab.top[hidden] { display: inline-flex !important; opacity: 0; pointer-events: none; transform: translateY(10px); }

/* ---------- Alt səhifələr ---------- */
.page-head { padding-top: 140px; padding-bottom: 46px; display: grid; grid-template-columns: minmax(0, 1fr) 200px; align-items: end; gap: 24px; }
.page-head h1 { margin: 0; font-size: clamp(34px, 5vw, 64px); }
.page-head p { margin: 14px 0 0; max-width: 40em; color: var(--fg-2); font-size: 14.5px; }
.page-head .doodle { width: 170px; justify-self: end; }
.page-body { padding-bottom: 110px; }
.page-body > .pills { margin-bottom: 40px; }

.project { max-width: 760px; margin: 0 auto; padding: 130px var(--gutter) 100px; }
.project-art { width: 140px; margin-bottom: 20px; }
.project-meta { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.project h1 { margin: 10px 0 0; font-size: clamp(30px, 4.4vw, 52px); }
.project-lead { margin: 18px 0 0; font-size: 17px; line-height: 1.6; color: var(--fg-2); }
.project-stack { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-bottom: 30px; border-bottom: 1px solid var(--fg); }
.project-stack > span { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.project-stack .pill { pointer-events: none; }
.next-project { display: flex; align-items: center; gap: 18px; margin-top: 64px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.next-project .doodle { width: 60px; }
.next-project small { display: block; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.next-project b { font-size: 21px; font-weight: 400; }
.next-project .go { margin-left: auto; transition: transform .3s var(--ease); }
.next-project:hover .go { transform: translateX(4px); }

.article { max-width: 720px; margin: 0 auto; padding: 130px var(--gutter) 100px; }
.article .post-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.article h1 { margin: 14px 0 0; font-size: clamp(30px, 4.4vw, 52px); }
.prose { margin-top: 40px; font-size: 16.5px; line-height: 1.75; color: var(--fg-2); }
.prose p { margin: 0 0 1.25em; }
.prose h2 { margin: 1.8em 0 .5em; font-family: var(--f-hand); font-weight: 400; text-transform: uppercase; letter-spacing: .03em; font-size: 22px; color: var(--fg); }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.25em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--paint); }
.prose blockquote { margin: 1.8em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--paint); font-family: var(--f-hand); font-size: 21px; line-height: 1.45; color: var(--fg); }
.prose code { font-family: var(--f-mono); font-size: .85em; background: color-mix(in srgb, var(--fg) 6%, transparent); padding: 2px 6px; border-radius: 4px; }
.prose pre { background: color-mix(in srgb, var(--fg) 5%, transparent); border-radius: 6px; padding: 18px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; font-size: 13.5px; }
.prose a { border-bottom: 1px solid currentColor; }
.article-foot { margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--fg); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--paint); z-index: 60; width: 0; }

/* ---------- Ölçülər ---------- */
@media (max-width: 1080px) {
  .stage-foot { grid-template-columns: 1fr auto; }
  .who { grid-column: 1 / -1; }
  .who p { max-width: 44ch; }
}
@media (max-width: 980px) {
  .tiles, .sites { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 160px minmax(0, 1fr); }
  .about-side { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .nav-in { grid-template-columns: auto 1fr; }
  .nav-links, .nav-contact { display: none !important; }
  .menu-btn { display: inline-flex !important; }
  .stage { padding-top: 64px; }
  .caption { position: static; margin: 26px 0 0; font-size: 21px; }
  .caption span:nth-child(n) { padding-left: 0; }
  .stage-art .doodle-scene { margin-top: 10px; }
  .stage-foot { grid-template-columns: 1fr; gap: 22px; }
  .stage-foot .pills { order: 3; }
  .paints { justify-self: start; }
  .tiles, .sites { grid-template-columns: 1fr; }
  .post-row { grid-template-columns: 1fr; gap: 4px; }
  .post-row .go { display: none; }
  .about { grid-template-columns: 1fr; }
  .about .doodle-mug { width: 150px; }
  .page-head { grid-template-columns: 1fr; padding-top: 120px; }
  .page-head .doodle { display: none; }
  .project, .article { padding-top: 116px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .fade { opacity: 1; transform: none; }
  .dl-ink, .scribble path { stroke-dashoffset: 0; }
  .dl-fill { opacity: .92; }
  .dl-line { stroke-dasharray: none !important; }
}
