/* © 2026 Emir Miraç Gezer. All rights reserved. Unauthorised copying, modification or reuse of this code, design or content is prohibited (see /LICENSE). */
/* =====================================================================
   styles.css — one stylesheet for every page. Sections, in order:

     Tokens ............ colours, fonts, dark/light theme variables
     Base .............. reset, body, selection, focus
     Header bar ........ top navigation, language switch, mobile menu
     Headline .......... greeting pill, rotating word, lede, buttons
     Sections .......... generic section / page-head spacing
     Announcement board  the rotating board on the home page
     Shared bits ....... chips, image overlay
     Projects page ..... filters, list + preview stage
     About page
     GitHub page
     Case study dialog . full-screen project detail
     Reveal / transitions
     Responsive ........ breakpoints for the pages above
     Home page ......... one-screen layout (board + motto + profile)

   Colours live in the :root / html[data-theme="light"] blocks at the top.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --surface2: #1c1c1f;
  --ink: #f2f1ec;
  --mute: #8b8b92;
  --line: rgba(242, 241, 236, 0.12);
  --accent: #f2f1ec;
  --on-accent: #0b0b0c;
  --art-0: #212126;
  --art-1: #f2f1ec;
  --art-2: #8b8b92;
  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --foot-h: 3rem; /* footer height: also used to size the one-screen home page */
  --display: "Geist", system-ui, sans-serif;
  --sans: "Geist", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  color-scheme: dark;
}
html[data-theme="light"] {
  --bg: #f5f4f0;
  --surface: #ffffff;
  --surface2: #ecebe6;
  --ink: #2b2b2b;   /* soft charcoal instead of near-black: easier on the eyes on a light page */
  --mute: #6c6c72;
  --line: rgba(43, 43, 43, 0.12);
  --accent: #2b2b2b;
  --on-accent: #ffffff;
  --art-0: #e8e6df;
  --art-1: #2b2b2b;
  --art-2: #6c6c72;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.lock, html.navopen { overflow: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.05rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; transition: background 0.4s, color 0.4s; }
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.mono { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; }

/* emphasis = accent colour, nothing more */
em { font-style: normal; color: var(--accent); }
/* words picked out inside page titles keep the title colour (white on dark, black on light) */
h1 em, h2 em, h3 em { color: inherit; }

.skip { position: fixed; left: 1rem; top: -4rem; z-index: 200; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 99px; }
.skip:focus { top: 1rem; }

/* ---------- Header bar (top, full width, centered nav) ---------- */
.dock { view-transition-name: dock; position: fixed; z-index: 70; inset: 0 0 auto 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0.65rem var(--pad); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: transform 0.5s var(--ease); }
.dock.hide { transform: translateY(-101%); }
.dock-side { display: flex; align-items: center; gap: 1rem; min-width: 0; }
/* wordmark: emir (light) gezer (bold) .com (small); follows the theme colour like the rest of the header */
.logo { display: inline-flex; align-items: baseline; font-family: "Sora", var(--sans); font-size: 1.3rem; letter-spacing: -0.02em; line-height: 1; color: var(--ink); white-space: nowrap; transition: opacity 0.2s; }
.logo:hover { opacity: 0.75; }
.lg-a { font-weight: 300; }
.lg-b { font-weight: 700; }
.lg-c { font-weight: 400; font-size: 0.65em; }
.dock-links { position: relative; display: flex; align-items: center; gap: clamp(0.1rem, 0.6vw, 0.4rem); }
.dock-links a { position: relative; z-index: 1; padding: 0.45rem 1rem; font-weight: 500; font-size: 0.95rem; color: var(--mute); white-space: nowrap; transition: color 0.3s, background-color 0.3s; }
.dock-links a:hover, .dock-links a.on { color: var(--ink); }
/* the active page is underlined by one thin line that slides from link to link and changes width to match the text (set in main.js);
   links you hover get a faint preview of the same line. bottom: 0.2rem = just under the text. */
.dock-pill { position: absolute; left: 0; bottom: 0.2rem; z-index: 0; height: 1.5px; border-radius: 2px; background: var(--ink); pointer-events: none; transition: transform 0.55s var(--spring), width 0.55s var(--spring); }
@media (min-width: 641px) {
  .dock-links a::after { content: ""; position: absolute; left: 1rem; right: 1rem; bottom: 0.2rem; height: 1.5px; border-radius: 2px; background: var(--ink); opacity: 0.28; transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); pointer-events: none; }
  .dock-links a:hover:not(.on)::after { transform: scaleX(1); }
}
.dock-tools { justify-self: end; display: flex; align-items: center; gap: 0.2rem; }
.dock-btn { display: inline-flex; align-items: center; justify-content: center; height: 2.3rem; min-width: 2.3rem; padding: 0 0.6rem; border-radius: 99px; color: var(--mute); transition: color 0.2s, background 0.2s; }
.dock-btn:hover { color: var(--ink); background: var(--surface2); }
/* language switch: segmented control with a sliding thumb */
.lang-switch { position: relative; display: inline-grid; grid-template-columns: 1fr 1fr; height: 2.2rem; padding: 2px; margin-right: 0.35rem; border: 1px solid var(--line); border-radius: 99px; font: 500 0.74rem var(--mono); letter-spacing: 0.05em; cursor: pointer; transition: border-color 0.2s; }
.lang-switch:hover { border-color: var(--ink); }
.ls-opt { position: relative; z-index: 1; display: grid; place-items: center; width: 2.15rem; color: var(--mute); transition: color 0.3s; }
.ls-opt.cur { color: var(--bg); }
.ls-thumb { position: absolute; top: 2px; bottom: 2px; left: 2px; width: calc(50% - 2px); border-radius: 99px; background: var(--ink); transition: transform 0.45s var(--spring); }
.lang-switch[data-lang="tr"] .ls-thumb { transform: translateX(100%); }

/* mobile menu button (hidden on desktop) */
.dock-burger { display: none; align-items: center; gap: 0.7rem; height: 2.3rem; padding: 0 0.2rem; font-weight: 500; }
.dock-burger .bl { position: relative; width: 1.2rem; height: 0.8rem; }
.dock-burger .bl i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform 0.4s var(--spring), top 0.3s, bottom 0.3s; }
.dock-burger .bl i:first-child { top: 0; }
.dock-burger .bl i:last-child { bottom: 0; }
.dock.open .bl i:first-child { top: calc(50% - 1px); transform: rotate(45deg); }
.dock.open .bl i:last-child { bottom: calc(50% - 1px); transform: rotate(-45deg); }
.bt-close { display: none; }
.dock.open .bt-menu { display: none; }
.dock.open .bt-close { display: inline; }
/* notification bell + dropdown panel (built by main.js into .dock-tools) */
.notif { position: relative; display: inline-flex; }
.bell { position: relative; }
.bell.ring svg { transform-origin: 50% 2px; animation: np-ring 1.2s ease-in-out 0.9s 1; }
@keyframes np-ring { 0%, 100% { transform: rotate(0); } 12% { transform: rotate(14deg); } 28% { transform: rotate(-12deg); } 44% { transform: rotate(9deg); } 60% { transform: rotate(-6deg); } 76% { transform: rotate(3deg); } }
.bell-dot { position: absolute; top: 0.18rem; right: 0.05rem; min-width: 1rem; height: 1rem; padding: 0 0.28rem; border-radius: 99px; background: var(--accent); color: var(--on-accent); font: 600 0.58rem/1rem var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-panel { position: absolute; z-index: 80; top: calc(100% + 0.8rem); right: -2.5rem; width: min(24rem, calc(100vw - 2rem)); max-height: min(32rem, 72dvh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent; border: 1px solid var(--line); border-radius: 1.3rem; background: var(--surface); box-shadow: 0 28px 70px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2); transform-origin: calc(100% - 3.2rem) 0; animation: np-in 0.24s var(--ease); }
@keyframes np-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }
.np-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; padding: 0.95rem 1.1rem 0.8rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.np-head b { font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; }
.np-count { padding: 0.18rem 0.6rem; border-radius: 99px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--ink); font: 500 0.64rem var(--mono); letter-spacing: 0.05em; text-transform: uppercase; }
.np-grp { margin: 0.85rem 1.1rem 0.15rem; color: var(--mute); font: 500 0.63rem var(--mono); letter-spacing: 0.09em; text-transform: uppercase; }
.np-list { list-style: none; margin: 0; padding: 0.35rem; display: grid; gap: 0.15rem; }
.np-list li { animation: np-row 0.32s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
@keyframes np-row { from { opacity: 0; transform: translateY(6px); } }
.np-i { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 0.8rem; padding: 0.75rem 0.8rem; border-radius: 0.95rem; transition: background 0.2s; }
a.np-i:hover { background: var(--surface2); }
.np-i.is-new { background: color-mix(in srgb, var(--accent) 7%, transparent); }
a.np-i.is-new:hover { background: color-mix(in srgb, var(--accent) 13%, transparent); }
.np-ic { position: relative; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 0.7rem; background: var(--surface2); color: var(--mute); transition: color 0.2s, background 0.2s; }
.is-new .np-ic { color: var(--ink); background: color-mix(in srgb, var(--accent) 18%, var(--surface2)); }
.is-new .np-ic::after { content: ""; position: absolute; top: -0.15rem; right: -0.15rem; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.np-body { display: grid; gap: 0.15rem; min-width: 0; }
.np-t { font-weight: 500; font-size: 0.92rem; line-height: 1.3; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.np-x { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--mute); font-size: 0.82rem; line-height: 1.45; }
.np-d { margin-top: 0.1rem; color: color-mix(in srgb, var(--mute) 85%, transparent); font: 500 0.68rem var(--mono); letter-spacing: 0.02em; }
.np-go { align-self: center; color: var(--mute); font-size: 0.9rem; opacity: 0; transform: translate(-3px, 3px); transition: opacity 0.25s, transform 0.3s var(--spring), color 0.2s; }
a.np-i:hover .np-go { opacity: 1; transform: none; color: var(--ink); }
.np-empty { display: grid; justify-items: center; gap: 0.8rem; padding: 2.4rem 1rem 2.6rem; color: var(--mute); font-size: 0.9rem; text-align: center; }
.np-empty b { font-weight: 400; }
.np-ic.big { width: 3.2rem; height: 3.2rem; border-radius: 50%; }
@media (prefers-reduced-motion: reduce) { .notif-panel, .np-list li, .bell.ring svg { animation: none; } }
@media (max-width: 400px) { .logo { font-size: 1.1rem; } .dock-side { gap: 0.4rem; } }
@media (max-width: 340px) { .lg-c { display: none; } }
@media (max-width: 640px) { .dock .dock-burger .bt-menu, .dock .dock-burger .bt-close { display: none !important; } .dock-burger { order: -1; padding: 0 0.3rem; } }   /* phones: icon-only menu button on the left, the logo to its right */
@media (max-width: 640px) { .notif { position: static; } .notif-panel { left: var(--pad); right: var(--pad); width: auto; top: calc(100% + 0.4rem); } }
.dock-btn.theme svg { transition: transform 0.6s var(--spring); }
.dock-btn.theme:hover svg { transform: rotate(180deg); }

/* ---------- Headline: greeting pill, rotating word, lede, buttons ---------- */
.hello { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1.6rem; padding: 0.45rem 1rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: 0.92rem; }
.hello::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); animation: pulse 2.2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.6rem transparent; } }
.headline { margin: 0; max-width: 17ch; font-family: var(--display); font-weight: 500; font-size: clamp(2.6rem, 7.4vw, 7.2rem); line-height: 1.1; letter-spacing: -0.035em; text-wrap: balance; }
.swap { position: relative; display: inline-block; vertical-align: top; height: 1.1em; overflow: hidden; border-radius: 0.22em; color: var(--on-accent); background: var(--accent); transition: width 0.6s var(--spring); }
.swap .w { position: absolute; left: 0; top: 0; padding: 0 0.22em; white-space: nowrap; transform: translateY(105%); transition: transform 0.6s var(--spring); }
.swap .w.on { transform: none; }
.swap .w.out { transform: translateY(-105%); }
.lede { max-width: 34rem; margin: 1.8rem 0 0; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--mute); }

.btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1.5rem; border-radius: 99px; font-weight: 500; border: 1.5px solid transparent; transition: transform 0.4s var(--spring), background 0.25s, color 0.25s, border-color 0.25s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); color: var(--on-accent); }
.btn.ghost { border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); }


/* ---------- Sections ---------- */
section { padding: clamp(4rem, 9vw, 8rem) var(--pad) 0; }
.solo { padding-top: 7.3rem !important; }
.about.solo { padding-bottom: clamp(3rem, 8vw, 6rem); }
.sec-head { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.sec-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 5vw, 4.4rem); letter-spacing: -0.04em; line-height: 1.08; }
.page-head { padding: 7.2rem var(--pad) 0; }
.page-head .sec-title { font-size: clamp(2.4rem, 7.5vw, 6.6rem); }

/* ---------- Announcement board ---------- */
.pano { position: relative; isolation: isolate; height: 100%; border-radius: clamp(1.3rem, 2.6vw, 2rem); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.pn-slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s 0.3s; will-change: opacity; }
.pn-slide.on { opacity: 1; visibility: visible; transition-delay: 0s; }
.pn-bg { position: absolute; inset: -4%; filter: blur(10px); opacity: 0.8; }
.pn-bg > * { width: 100%; height: 100%; object-fit: cover; display: block; }
/* light theme: the picture must not be washed out. It keeps full strength and the pale shade only gets strong where the text sits (the lower part). */
html[data-theme="light"] .pn-bg { opacity: 1; }
/* the top of the picture is the darkest part: a pale veil there (first layer) keeps it from looking harsh */
html[data-theme="light"] .pn-shade { background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 46%, transparent) 0%, color-mix(in srgb, var(--bg) 22%, transparent) 38%, transparent 62%), linear-gradient(to top, color-mix(in srgb, var(--bg) 94%, transparent) 0%, color-mix(in srgb, var(--bg) 82%, transparent) 30%, color-mix(in srgb, var(--bg) 28%, transparent) 54%, color-mix(in srgb, var(--bg) 0%, transparent) 82%); }
.pn-shade { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 96%, transparent) 10%, color-mix(in srgb, var(--bg) 62%, transparent) 50%, color-mix(in srgb, var(--bg) 22%, transparent)); }
.pn-pin { position: absolute; top: 1.1rem; left: 1.1rem; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.38rem 0.9rem 0.38rem 0.75rem; overflow: visible; border-radius: 99px; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 500 0.72rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; opacity: 0; transform: scale(0.7); transform-origin: left center; }
.pn-slide.on .pn-pin { animation: pn-pop 0.6s var(--spring) 0.2s both; }
.pn-slide[style*="--pn-badge"] .pn-pin { overflow: hidden; background: var(--pn-badge); color: var(--pn-on-badge); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.pn-pin::before { content: ""; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: currentColor; animation: pn-ping 1.8s ease-out infinite; }
.pn-pin::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(100deg, transparent 38%, color-mix(in srgb, var(--ink) 18%, transparent) 50%, transparent 62%); background-size: 280% 100%; background-position: 160% 0; animation: pn-glint 4.6s ease-in-out 1s infinite; }
.pn-slide[style*="--pn-badge"] .pn-pin::after { inset: 0; border-radius: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%); background-size: auto; background-position: 0 0; transform: translateX(-130%); animation: pn-shine 2.8s ease-in-out infinite; }
@keyframes pn-pop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes pn-ping { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 0.6rem transparent; } }
@keyframes pn-glint { 0%, 60% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .pn-pin::before, .pn-pin::after { animation: none; } }
@keyframes pn-shine { 0%, 50% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
.pn-date { position: absolute; top: 1.1rem; right: 1.1rem; padding: 0.35rem 0.8rem; border-radius: 0.7rem; background: color-mix(in srgb, var(--bg) 88%, transparent); border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); color: var(--ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pn-copy { position: absolute; left: clamp(1.2rem, 3vw, 2.4rem); right: clamp(1.2rem, 3vw, 2.4rem); bottom: 5.4rem; max-width: 52rem; opacity: 0; transform: translateY(16px); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease); }
.pn-slide.on .pn-copy { opacity: 1; transform: none; transition-delay: 0.05s; }
.pn-copy h2 { margin: 0 0 0.6rem; font-weight: 500; font-size: clamp(1.6rem, 3.6vw, 3rem); letter-spacing: -0.035em; line-height: 1.08; }
.pn-copy p { margin: 0; max-width: 46rem; color: color-mix(in srgb, var(--ink) 74%, transparent); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pn-bar { position: absolute; left: clamp(1.2rem, 3vw, 2.4rem); right: clamp(1.2rem, 3vw, 2.4rem); bottom: 1.1rem; display: flex; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pn-dots { display: flex; gap: 0.2rem; }
.pn-dot { width: 1.7rem; height: 1.6rem; display: grid; align-items: center; transition: width 0.5s var(--ease); }
.pn-dot.on { width: 3.4rem; }
.pn-dot i { display: block; position: relative; overflow: hidden; height: 3px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 22%, transparent); }
.pn-dot i::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; }
.pn-dot.done i::after { transform: scaleX(1); }
.pn-dot.on i::after { transform: scaleX(var(--p, 0)); }
.pano.static .pn-dot.on i::after { transform: scaleX(1); }
.pn-count { color: color-mix(in srgb, var(--ink) 70%, transparent); white-space: nowrap; }
.pn-ctrl { margin-left: auto; display: flex; gap: 0.4rem; }
.pn-ctrl button { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: color-mix(in srgb, var(--bg) 82%, transparent); display: grid; place-items: center; font-size: 1.2rem; line-height: 1; transition: border-color 0.2s, background 0.2s; }
.pn-ctrl button:hover { border-color: var(--ink); }
.pn-toggle .i-play, .pano.paused .pn-toggle .i-pause { display: none; }
.pano.paused .pn-toggle .i-play { display: block; }
.pn-cta { display: inline-flex; gap: 0.5rem; padding: 0.7rem 1.3rem; border-radius: 99px; background: var(--pn-btn, var(--ink)); color: var(--pn-on-btn, var(--bg)); font-weight: 500; white-space: nowrap; transition: transform 0.4s var(--spring); }
.pn-cta:hover { transform: translateY(-2px); }

/* ---------- Shared bits: art overlay, chips ---------- */
.layer .art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips span { font: 500 0.7rem var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding: 0.3rem 0.7rem; border-radius: 99px; border: 1px solid var(--line); color: var(--mute); }

/* ---------- Projects: showcase ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pj-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.4rem; margin-top: 1.6rem; }
.fchip { padding: 0.45rem 1.05rem; border-radius: 99px; border: 1px solid var(--line); font-weight: 500; font-size: 0.88rem; color: var(--mute); transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease); }
.fchip:hover { border-color: var(--ink); color: var(--ink); }
.fchip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.showcase { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(1.5rem, 3vw, 2.5rem) var(--pad) 4rem; align-items: start; }
.glow { position: absolute; z-index: -1; right: -12%; top: 4%; width: min(55vw, 760px); aspect-ratio: 1; border-radius: 50%; background: var(--accent); filter: blur(140px); opacity: 0.1; pointer-events: none; }

.plist { list-style: none; margin: 0; padding: 0 1rem 0 0; max-height: min(76vh, 42rem); overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--mt, 0px), #000 calc(100% - var(--mb, 0px)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--mt, 0px), #000 calc(100% - var(--mb, 0px)), transparent 100%); }
.plist::-webkit-scrollbar { width: 6px; }
.plist::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
.plist::-webkit-scrollbar-thumb:hover { background: var(--mute); }
.plist li { border-top: 1px solid var(--line); }
.plist li:last-child { border-bottom: 1px solid var(--line); }
.pitem { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr) 3rem; align-items: center; gap: 1rem; padding: clamp(0.9rem, 1.8vw, 1.5rem) 0; opacity: 0.35; transition: opacity 0.4s, transform 0.6s var(--spring); }
.pitem .n { font: 500 0.74rem var(--mono); color: var(--mute); }
.pitem .t { display: block; font-family: var(--display); font-weight: 500; font-size: clamp(1.8rem, 4.2vw, 4rem); letter-spacing: -0.045em; line-height: 1.05; overflow-wrap: anywhere; }
.pitem .k { display: block; margin-top: 0.4rem; font: 500 0.72rem var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--mute); }
.pitem .arr { width: 3rem; height: 3rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font-size: 1.2rem; scale: 0; rotate: -90deg; transition: scale 0.5s var(--spring), rotate 0.6s var(--spring); }
.pitem .th { display: none; }
.plist li.active .pitem, .plist li:hover .pitem { opacity: 1; }
.plist li.active .pitem { transform: translateX(0.8rem); }
.plist li.active .arr { scale: 1; rotate: 0deg; }

.stage-wrap { position: sticky; top: 6rem; perspective: 1400px; }
.stage { position: relative; height: min(76vh, 42rem); border-radius: 1.8rem; transition: transform 0.5s var(--ease); cursor: pointer; will-change: transform; }
.layer { position: absolute; inset: 0; z-index: 0; border-radius: 1.8rem; background: var(--surface); border: 1px solid var(--line); padding: 0.8rem; display: flex; flex-direction: column; gap: 1rem; visibility: hidden; overflow: hidden; }
.layer.prev { visibility: visible; z-index: 1; }
.layer.on { visibility: visible; z-index: 2; animation: wipe 0.8s var(--ease); }
@keyframes wipe { from { clip-path: inset(100% 0 0 0 round 1.8rem); } to { clip-path: inset(0 0 0 0 round 1.8rem); } }
.layer .art { position: relative; flex: 1; min-height: 0; border-radius: 1.2rem; overflow: hidden; }
.layer .art .sl, .case-art .sl { position: absolute; inset: 0; opacity: 0; transition: opacity 0.7s ease; }
.layer .art .sl.on, .case-art .sl.on { opacity: 1; }
.layer .art .sl > *, .case-art .sl > * { width: 100%; height: 100%; display: block; object-fit: cover; }
.layer .art .sl > img, .case-art .sl > img { object-fit: contain; background: var(--surface2); }
.layer .art .sl.has-bg > img, .case-art .sl.has-bg > img { position: relative; z-index: 1; background: transparent; }
.sl.has-bg::before { content: ""; position: absolute; inset: -10%; background: var(--bgimg) center / cover no-repeat; filter: blur(24px) saturate(1.3); opacity: 0.75; } /* uploaded pictures fit inside the box, uncropped */
.layer .sl-dots, .case-art .sl-dots { position: absolute; left: 50%; bottom: 0.8rem; translate: -50% 0; display: flex; gap: 0.3rem; padding: 0.4rem 0.65rem; border-radius: 99px; background: color-mix(in srgb, var(--bg) 70%, transparent); z-index: 2; }
.layer .sl-dots i, .case-art .sl-dots i { width: 1rem; height: 0.25rem; border-radius: 99px; background: color-mix(in srgb, var(--ink) 30%, transparent); transition: width 0.4s var(--ease), background 0.3s; }
.layer .sl-dots i.on, .case-art .sl-dots i.on { width: 1.8rem; background: var(--ink); }
.layer .info { padding: 0 0.7rem 0.6rem; display: grid; gap: 0.7rem; }
.layer h3 { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 2rem); letter-spacing: -0.04em; line-height: 1; }
.layer .sum { margin: 0; color: var(--mute); max-width: 32rem; }
.layer .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.layer .open { font-weight: 500; font-size: 0.92rem; }

/* ---------- About page ---------- */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(0.7rem, 1.3vw, 1rem); }
.tile { border-radius: clamp(1.2rem, 2.2vw, 1.8rem); padding: clamp(1.2rem, 2.2vw, 1.8rem); background: var(--surface); border: 1px solid var(--line); min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 1.2rem; transition: border-color 0.3s, transform 0.5s var(--spring); }
.tile:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); transform: translateY(-4px); }
.tile .lbl { margin: 0; color: var(--mute); }
.t-about { grid-column: span 12; justify-content: flex-start; gap: 1.6rem; padding: clamp(1.5rem, 3.5vw, 3rem); }
.t-about .about-text { display: flex; flex-direction: column; gap: 1.2rem; max-width: 62rem; }
.t-about p:not(.lbl) { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.35; letter-spacing: -0.03em; }

/* ---------- GitHub page ---------- */
.gh { padding-bottom: clamp(3rem, 6vw, 5rem) !important; }
.gh-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr); gap: clamp(1.2rem, 3vw, 3rem); align-items: start; }
.gh-card { position: sticky; top: 6rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; padding: clamp(1.4rem, 2.5vw, 2rem); border-radius: clamp(1.3rem, 2.4vw, 1.8rem); background: var(--surface); border: 1px solid var(--line); }
.gh-avatar { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.gh-card h2 { margin: 0.3rem 0 0; font-weight: 500; font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -0.03em; line-height: 1.1; }
.gh-bio { margin: 0; color: var(--mute); }
.gh-meta { margin: 0; color: var(--mute); }
.gh-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; width: 100%; margin: 0.6rem 0; }
.gh-stats div { padding: 0.9rem 1rem; border-radius: 1rem; border: 1px solid var(--line); display: flex; flex-direction: column-reverse; gap: 0.2rem; }
.gh-stats dd { margin: 0; font-weight: 500; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1; }
.gh-stats dt { color: var(--mute); }
.gh-note { margin: 0; color: var(--mute); }
.gh-repos .lbl { margin: 0 0 1rem; color: var(--mute); }
.repo { display: grid; grid-template-columns: minmax(0, 1fr) auto 2rem; align-items: center; gap: 1.2rem; padding: 1.2rem 0.4rem; border-top: 1px solid var(--line); transition: padding 0.5s var(--spring), background 0.3s; }
.repo:last-child { border-bottom: 1px solid var(--line); }
.repo:hover { padding-left: 1rem; padding-right: 1rem; background: var(--surface); }
.repo .rmain { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.repo b { font-weight: 500; font-size: clamp(1.1rem, 1.8vw, 1.5rem); letter-spacing: -0.03em; overflow-wrap: anywhere; }
.repo .rmain span { color: var(--mute); font-size: 0.95rem; }
.repo .rmeta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem 1rem; color: var(--mute); text-align: right; }
.repo .lang { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ink); }
.repo .lang i { width: 0.55rem; height: 0.55rem; border-radius: 50%; }
.repo .arr { justify-self: end; color: var(--accent); font-size: 1.2rem; opacity: 0; transform: translate(-6px, 6px); transition: opacity 0.4s var(--spring), transform 0.4s var(--spring); }
.repo:hover .arr { opacity: 1; transform: none; }

.foot { display: flex; align-items: center; justify-content: center; height: var(--foot-h); padding: 0 var(--pad); text-align: center; color: var(--mute); font-size: 0.8rem; margin-top: clamp(2rem, 5vw, 3.5rem); border-top: 1px solid color-mix(in srgb, var(--line) 45%, transparent); }
.foot p { margin: 0; }

/* ---------- Case study dialog ---------- */
.case { position: fixed; inset: 0; margin: 0; padding: 0; border: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.case[open] { animation: sheet 0.7s var(--ease); }
@keyframes sheet { from { transform: translateY(8%); opacity: 0; } to { transform: none; opacity: 1; } }
.case::backdrop { background: transparent; }
.case-bar { position: sticky; top: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; padding: 0.9rem var(--pad); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.case-bar .mono { color: var(--mute); }
.case-close { border: 1px solid var(--line); border-radius: 99px; padding: 0.55rem 1.1rem; font-weight: 500; transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease); }
.case-close:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.case-body { padding: clamp(1.2rem, 3vw, 2.2rem) var(--pad) clamp(2rem, 5vw, 4rem); max-width: 1400px; margin: 0 auto; }
.case-head { margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.case-kicker { display: inline-block; margin: 0 0 0.9rem; padding: 0.35rem 0.85rem; border-radius: 99px; border: 1px solid var(--line); color: var(--mute); }
.case-title { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(2.3rem, 5.4vw, 5rem); line-height: 1.02; letter-spacing: -0.045em; overflow-wrap: anywhere; }
/* above the fold: info on the left, pictures on the right */
.case-main { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
.case-info { display: grid; gap: clamp(1.1rem, 2vw, 1.6rem); min-width: 0; }
.case-lead { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(1.25rem, 2.1vw, 1.9rem); line-height: 1.25; letter-spacing: -0.03em; }
.case-links { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.case-links a { display: inline-flex; gap: 0.5rem; padding: 0.8rem 1.4rem; border-radius: 99px; font-weight: 500; background: var(--ink); color: var(--bg); transition: color 0.3s var(--ease), background-color 0.3s var(--ease), border-color 0.3s var(--ease); }
.case-links a:nth-child(n+2) { background: none; color: var(--ink); border: 1.5px solid var(--line); }
.case-links a:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.case-links a::after { content: "↗"; }
.case-meta { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.case-meta div { padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); min-width: 0; }
.case-meta dt { font: 500 0.68rem var(--mono); text-transform: uppercase; color: var(--mute); margin-bottom: 0.25rem; }
.case-meta dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.case-text { display: grid; gap: 1rem; }
.case-text p { margin: 0; font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; max-width: 60ch; color: var(--mute); }
.case-media { position: sticky; top: 4.8rem; min-width: 0; }
.case-art { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: clamp(1.2rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
@media (min-width: 901px) { .case-art { aspect-ratio: auto; height: min(36rem, calc(100dvh - 14.5rem)); } }
.case-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: clamp(2.5rem, 6vw, 5rem); }
.case-nav a { padding: 1.3rem 1.5rem; border-radius: 1.4rem; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 0.4rem; transition: border-color 0.3s, transform 0.4s var(--spring); }
.case-nav a:last-child { text-align: right; align-items: flex-end; }
.case-nav a:hover { border-color: var(--ink); transform: translateY(-3px); }
.case-nav small { font: 500 0.72rem var(--mono); text-transform: uppercase; color: var(--mute); }
.case-nav b { font-family: var(--display); font-weight: 500; font-size: clamp(1.2rem, 3vw, 2.2rem); letter-spacing: -0.035em; line-height: 1.1; }

/* ---------- Reveal ---------- */
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: var(--d, 0ms); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- Page transitions (cross-document) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.25s ease both vt-out; }
::view-transition-new(root) { animation: 0.45s var(--ease) both vt-in; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .showcase { grid-template-columns: 1fr; }
  .stage-wrap, .glow { display: none; }
  .plist { max-height: min(34rem, 72svh); padding-right: 0.6rem; }
  .pitem { grid-template-columns: 4.6rem minmax(0, 1fr); opacity: 1; }
  .pitem .n, .pitem .arr { display: none; }
  .pitem .th { order: -1; display: block; width: 4.6rem; aspect-ratio: 1; border-radius: 1rem; overflow: hidden; }
  .pitem .th > * { width: 100%; height: 100%; display: block; object-fit: cover; }
  .pitem .t .upd-pin.on-title { margin-left: 0.6rem; padding: 0.18rem 0.55rem; gap: 0.3rem; font-size: 0.62rem; letter-spacing: 0.05em; vertical-align: middle; position: relative; top: -0.12em; }
  .pitem .t .upd-pin.on-title:empty { padding: 0.28rem; }
  .pitem .t { font-size: clamp(1.5rem, 6vw, 2.2rem); }
  .plist li.active .pitem { transform: none; }
  .gh-grid { grid-template-columns: 1fr; }
  .gh-card { position: static; }
  .repo { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .repo .rmeta { justify-content: flex-start; text-align: left; }
  .repo .arr { display: none; }
  .case-main { grid-template-columns: 1fr; }
  .case-media { order: -1; position: static; }
}
@media (max-width: 640px) {
  .pn-dots, .pn-count { display: none; }
  .pn-copy { bottom: 5.2rem; }
  .pn-cta { padding: 0.65rem 1.1rem; }
  .dock { grid-template-columns: 1fr auto; padding: 0.55rem var(--pad); }
  .dock-burger { display: inline-flex; }
  .dock-links { position: absolute; top: 100%; left: 0; right: 0; height: calc(100dvh - 3.7rem); flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 0.8rem var(--pad) 2rem; background: var(--bg); overflow-y: auto; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.3s, transform 0.4s var(--ease), visibility 0s 0.3s; }
  .dock.open .dock-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .dock-links a { display: flex; justify-content: space-between; align-items: center; padding: 0.85rem 0; border-bottom: 1px solid var(--line); font-size: clamp(1.8rem, 9vw, 2.6rem); letter-spacing: -0.04em; }
  .dock-links a.on::after { content: ""; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--accent); }
  .dock-pill { display: none; }
  .solo, .page-head { padding-top: 6.4rem !important; }
  .case-nav { grid-template-columns: 1fr; }
  .case-nav a:last-child { text-align: left; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
  .js .rv { opacity: 1; transform: none; }
}

/* ---------- Home page: one-screen layout ---------- */
.h2 { display: flex; flex-direction: column; gap: 0.9rem; height: calc(100svh - var(--foot-h)); min-height: 38rem; padding: 4.7rem var(--pad) 0.8rem; }
body[data-page="home"] .foot { margin-top: 0; }

.h2-grid { flex: 1; min-height: 0; display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.h2-board { min-height: 0; }
.h2-board .pano { height: 100%; }
/* the right column keeps its content together: any extra height goes above and below it in equal parts (auto margins never overflow, unlike centring) */
.h2-side { min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(1rem, 2.4vh, 2rem); }
.h2-side > :first-child { margin-top: auto; }
.h2-side > :last-child { margin-bottom: auto; }
.h2-side-bottom { display: flex; flex-direction: column; gap: 0.7rem; }

/* open typographic block: no card, the page itself is the canvas */
.h2-motto, section.h2-motto { padding: 0.2rem 0.3rem 0.4rem; display: flex; flex-direction: column; gap: 0.8rem; container-type: inline-size; }
/* the greeting (with the name) is the page headline: big type, no pill. Sized from the column width. */
.h2-motto .hello { align-self: stretch; display: block; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; max-width: none; font-family: var(--display); font-weight: 500; font-size: clamp(2rem, 9.6cqi, 4.3rem); line-height: 1.08; letter-spacing: -0.04em; text-wrap: balance; }
.h2-motto .hello .nm { display: block; white-space: nowrap; }
.h2-motto .hello::before { display: none; }
.h2-motto .lede { margin: 0; font-size: 1rem; max-width: 32rem; }

.h2-card, section.h2-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1.4rem; padding: 0.9rem 1rem; min-width: 0; overflow: hidden; }
.h2-profile { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; align-items: center; }
.h2-avatar { grid-row: 1 / span 2; width: 4.6rem; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface2); display: grid; place-items: center; border: 1px solid var(--line); }
.h2-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h2-avatar span { font-weight: 500; font-size: 1.4rem; letter-spacing: -0.04em; color: var(--mute); }
.h2-id { grid-column: 2; align-self: end; }
.h2-profile h2 { margin: 0; font-weight: 500; font-size: 1.3rem; letter-spacing: -0.035em; line-height: 1.15; }
.h2-role { margin: 0.1rem 0 0; color: var(--mute); font-size: 0.9rem; }
.h2-social { grid-column: 2; align-self: start; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.h2-social a { padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: 99px; font-size: 0.8rem; font-weight: 500; transition: border-color 0.2s; }
.h2-social a::after { content: " ↗"; color: var(--mute); }
.h2-social a:hover { border-color: var(--ink); }
.h2-social a.cv { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.h2-social a.cv::after { content: " ↓"; color: inherit; }
.h2-social a.cv:hover { filter: brightness(1.08); }

.h2-feat, section.h2-feat { flex: 1; max-height: 5.6rem; min-height: 0; padding: 0 0.3rem; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.h2-feat .h2-lbl { margin: 0; }
.h2-feat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; flex: none; }
.h2-dots { display: flex; gap: 0.3rem; }
.h2-dots button { width: 1.1rem; height: 0.25rem; padding: 0; border-radius: 99px; background: var(--line); transition: background 0.3s, width 0.4s var(--ease); }
.h2-dots button.on { width: 1.9rem; background: var(--ink); }
.h2-slider { position: relative; flex: none; height: 3.5rem; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.h2-slider .h2-slide { position: absolute; inset: 0; border: 0; padding: 0 0.1rem; opacity: 0; transform: translateX(105%); transition: transform 0.7s var(--ease), opacity 0.5s; }
.h2-slider .h2-slide.on { opacity: 1; transform: none; }
.h2-slider .h2-slide.out { opacity: 0; transform: translateX(-105%); }
.h2-slider .h2-slide:hover { padding-left: 0.1rem; }
.h2-row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-top: 1px solid var(--line); transition: padding 0.4s var(--spring); }
.h2-row .n { color: var(--mute); font-size: 0.68rem; }
.h2-row b { display: block; font-weight: 500; font-size: 1.15rem; letter-spacing: -0.03em; line-height: 1.2; transition: color 0.2s; }
.h2-row small { display: block; color: var(--mute); font-size: 0.78rem; }
.h2-row .go { color: var(--mute); transition: color 0.2s, transform 0.3s var(--spring); }
.h2-row:hover { padding-left: 0.5rem; }
.h2-row:hover b, .h2-row:hover .go { color: var(--accent); }
.h2-row:hover .go { transform: translate(2px, -2px); }
.h2-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.h2-tile { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.2rem; min-width: 0; transition: border-color 0.3s, transform 0.4s var(--spring); }
.h2-tile:hover { border-color: var(--ink); transform: translateY(-3px); }
.h2-tile .ic { width: 2rem; height: 2rem; flex: none; border-radius: 0.65rem; background: var(--surface2); display: grid; place-items: center; color: var(--mute); font-size: 0.9rem; }
.h2-tile b { display: block; font-weight: 500; line-height: 1.2; }
.h2-tile small { display: block; color: var(--mute); font-size: 0.62rem; }
.h2-tile .go { margin-left: auto; color: var(--mute); transition: color 0.2s, transform 0.3s var(--spring); }
.h2-tile:hover .go { color: var(--accent); transform: translate(2px, -2px); }
/* Mirus Studio signature under the intro paragraph (no box, no background): label + logo + arrow */
/* Mirus Studio card (under the profile card, the column's gap spaces it): logo, two lines of text, an arrow in a circle. Lifts and sweeps a glint on hover. */
.h2-studio, .h2-tile { min-height: 3.75rem; }   /* the Mirus card and the tiles under it share one height */
.h2-studio { position: relative; align-self: stretch; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem; padding: 0.7rem 0.9rem 0.7rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 1.2rem; overflow: hidden; color: var(--ink); cursor: pointer; transition: border-color 0.3s, transform 0.4s var(--spring); }
.h2-studio::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 38%, color-mix(in srgb, var(--ink) 12%, transparent) 50%, transparent 62%); background-size: 280% 100%; background-position: 160% 0; }
.h2-studio:hover { border-color: var(--ink); transform: translateY(-3px); }
.h2-studio:hover::after { animation: st-glint 0.9s var(--ease) 1; }
@keyframes st-glint { from { background-position: 160% 0; } to { background-position: -60% 0; } }
/* the logo is two layers: the lettering and the crown, so the crown can sway by itself (the PNGs are split at the crown, see assets/img/mirus-*) */
.h2-studio .st-logos { min-width: 0; }
.h2-studio .st-mark { --mh: 1.7rem; position: relative; display: block; height: var(--mh); width: calc(var(--mh) * 480 / 174); opacity: 0.95; }   /* an explicit width: the card's auto column must not size itself from the picture's natural 480px */
.h2-studio .st-base { display: block; width: 100%; height: 100%; }
.h2-studio .st-hop { position: absolute; inset: 0; animation: st-hop 5.6s ease-out infinite; }   /* the I (with the crown on it) hops now and then */
.h2-studio .st-i { position: absolute; left: 27.71%; top: 31.61%; width: 12.71%; height: 66.67%; }
@keyframes st-hop { 0%, 76%, 100% { transform: translateY(0); } 81% { transform: translateY(-11%); } 86% { transform: translateY(0); } 90% { transform: translateY(-4%); } 94% { transform: translateY(0); } }
.h2-studio .st-crown { position: absolute; left: 27.92%; top: 0; width: 14.375%; height: 31.61%; transform-origin: 50% 94%; animation: st-sway 3.6s ease-in-out infinite; }
@keyframes st-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg) translateY(-1px); } }
.h2-studio .st-light { display: none; }
html[data-theme="light"] .h2-studio .st-dark { display: none; }
html[data-theme="light"] .h2-studio .st-light { display: block; }   /* the light-theme logo is already a soft charcoal (#2b2b2b, the same as the text), see assets/img/mirus-*-light.png */
.h2-studio .st-txt { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; padding-left: 0.9rem; border-left: 1px solid var(--line); }   /* a thin divider between the logo and the text */
.h2-studio .st-t { font-weight: 500; font-size: 1.05rem; letter-spacing: -0.03em; line-height: 1.1; }
.h2-studio .st-s { color: var(--mute); font-size: 0.62rem; line-height: 1.2; }   /* same small mono caps as the "see all" line of the tiles below */
.h2-studio .go { color: var(--mute); transition: color 0.2s, transform 0.3s var(--spring); }   /* the same plain arrow as the tiles below */
.h2-studio:hover .go { color: var(--accent); transform: translate(2px, -2px); }
@media (min-width: 1101px) and (max-height: 860px) { .h2-studio .st-mark { --mh: 1.4rem; } }   /* short screens: a more compact card */
@media (prefers-reduced-motion: reduce) { .h2-studio:hover::after, .h2-studio .st-crown, .h2-studio .st-hop { animation: none; } }

@media (max-width: 1100px) {
  .h2 { height: auto; min-height: 0; padding-bottom: 1rem; }
  .h2-grid { display: flex; flex: none; flex-direction: column; }
  .h2-side, .h2-side-bottom { display: contents; }
  .h2-motto { order: 1; }
  .h2-board { order: 2; height: 28rem; flex: none; }
  .h2-feat { order: 3; padding: 0; }
  .h2-profile { order: 4; }
  .h2-studio { order: 4; }
  .h2-tiles { order: 5; }
  .h2-grid > *, .h2-side > * { flex: none; }
}
@media (max-width: 640px) { .h2-tile .ic { display: none; } .h2-tile small { white-space: nowrap; } .h2 { padding-top: 4.8rem; } .h2-motto .hello { font-size: clamp(1.8rem, 8.2vw, 2.5rem); } }


/* ---------- GitHub: contribution grid ---------- */
.gh-heat { margin-bottom: clamp(1rem, 2.5vw, 1.6rem); padding: 1rem 1.2rem; border-radius: clamp(1.2rem, 2.4vw, 1.6rem); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 0.7rem; }
.gh-heat:empty { display: none; }
.heat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.4rem 1rem; flex-wrap: wrap; }
.heat-top p { margin: 0; color: var(--mute); }
.heat-top p b { color: var(--ink); font-weight: 500; font-size: 1.5rem; letter-spacing: -0.03em; margin-right: 0.3rem; }
.heat-scroll { overflow-x: auto; scrollbar-width: none; }
.heat-scroll::-webkit-scrollbar { display: none; }
.heat { min-width: 42rem; }
.heat-months { display: grid; grid-template-columns: repeat(53, 1fr); gap: 3px; margin-bottom: 0.35rem; font: 500 0.66rem var(--mono); color: var(--mute); text-transform: uppercase; }
.heat-grid { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.heat-grid i, .heat-legend i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--surface2); }
.heat-grid i.l1, .heat-legend i.l1 { background: color-mix(in srgb, var(--accent) 28%, var(--surface2)); }
.heat-grid i.l2, .heat-legend i.l2 { background: color-mix(in srgb, var(--accent) 52%, var(--surface2)); }
.heat-grid i.l3, .heat-legend i.l3 { background: color-mix(in srgb, var(--accent) 76%, var(--surface2)); }
.heat-grid i.l4, .heat-legend i.l4 { background: var(--accent); }
.heat-grid i:hover { outline: 1px solid var(--ink); }
.heat-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; color: var(--mute); font-size: 0.66rem; text-transform: uppercase; }
.heat-legend i { width: 0.75rem; }
.heat-legend i:first-of-type { margin-left: 0.4rem; }
.heat-legend i:last-of-type { margin-right: 0.4rem; }


/* GitHub: profile + contribution grid stacked in the left column, same width, compact */
.gh-left { position: sticky; top: 6rem; display: grid; gap: 0.9rem; min-width: 0; }
.gh-left .gh-card { position: static; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0.5rem 0.9rem; padding: 1rem 1.2rem; border-radius: 1.4rem; }
.gh-left .gh-avatar { grid-row: 1 / span 2; width: 3.8rem; height: 3.8rem; }
.gh-left .gh-card h2 { margin: 0; font-size: 1.2rem; align-self: end; grid-column: 2; grid-row: 1; }
.gh-left .gh-meta { align-self: start; grid-column: 2; grid-row: 2; }
.gh-left .gh-bio { grid-column: 1 / -1; grid-row: 3; font-size: 0.9rem; }
.gh-left .gh-stats { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; margin: 0.2rem 0; }
.gh-left .gh-stats div { padding: 0.55rem 0.6rem; border-radius: 0.8rem; min-width: 0; }
.gh-left .gh-stats dd { font-size: 1.25rem; }
.gh-left .gh-stats dt { font-size: 0.56rem; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.gh-left .btn { grid-column: 1 / -1; justify-self: start; }
.gh-left .gh-heat { margin: 0; padding: 1rem 1.2rem; }
.gh-left .heat { min-width: 0; }
.gh-left .heat-grid, .gh-left .heat-months { gap: 2px; }
.gh-left .heat-months { grid-template-columns: repeat(26, 1fr); }
.gh-left .heat-top p b { font-size: 1.3rem; }
@media (max-width: 900px) { .gh-left { position: static; } }


/* ---------- 404 ---------- */
body[data-page="notfound"] .foot { margin-top: 0; }
.nf { min-height: calc(100svh - var(--foot-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 1rem; padding: 6rem var(--pad) 3rem; }
.nf-code { margin: 0; font-family: var(--display); font-weight: 500; font-size: clamp(7rem, 26vw, 20rem); line-height: 0.85; letter-spacing: -0.06em; color: var(--ink); }
.nf-code span { color: var(--accent); display: inline-block; animation: nf-float 5s ease-in-out infinite; }
.nf-title { margin: 0.6rem 0 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.7rem, 4vw, 3rem); letter-spacing: -0.04em; line-height: 1.1; }
.nf-title em { font-style: normal; color: inherit; }
.nf-text { margin: 0; color: var(--mute); max-width: 28rem; }
.nf-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1rem; }
@keyframes nf-float { 50% { transform: translateY(-0.06em); } }
@media (prefers-reduced-motion: reduce) { .nf-code span { animation: none; } }


/* detail view: previous / next picture */
.case-arr { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); color: var(--ink); backdrop-filter: blur(8px); font-size: 1.1rem; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.3s, background 0.25s, color 0.25s, border-color 0.25s; }
.case-arr.prev { left: 0.8rem; } .case-arr.next { right: 0.8rem; }
.case-art:hover .case-arr, .case-arr:focus-visible { opacity: 1; }
.case-arr:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
@media (hover: none) { .case-arr { opacity: 1; width: 2.4rem; height: 2.4rem; } }

/* footer sticks to the bottom of the screen even on short pages (About, mobile) */
body { min-height: 100dvh; display: flex; flex-direction: column; }
body > main { flex: 1 0 auto; }


/* ---------- About: journey timeline + toolbox ---------- */
.t-time, .t-edu { grid-column: span 6; align-self: start; justify-content: flex-start; gap: 1.6rem; }
.t-time.wide, .t-edu.wide { grid-column: span 12; }
.t-time:hover, .t-edu:hover { transform: none; }
.bento.even .t-time, .bento.even .t-edu { align-self: stretch; }   /* same number of entries: equal-height cards */
.tl { list-style: none; margin: 0; padding: 0 0 0 1.6rem; position: relative; display: grid; gap: 1.8rem; }
.tl::before { content: ""; position: absolute; left: 0.31rem; top: 0.5rem; bottom: 0.5rem; width: 1px; background: linear-gradient(to bottom, var(--accent), var(--line) 70%); }
.tl-item { position: relative; display: grid; gap: 0.2rem; }
.tl-dot { position: absolute; left: -1.6rem; top: 0.35rem; width: 0.65rem; height: 0.65rem; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); transition: border-color 0.3s, background 0.3s, box-shadow 0.3s; }
.tl-item:first-child .tl-dot, .tl-item:hover .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.tl-head { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.tl-period { color: var(--mute); font-size: 0.78rem; text-transform: uppercase; }
.tl-item h3 { margin: 0.2rem 0 0; font-family: var(--display); font-weight: 500; font-size: clamp(1.15rem, 1.9vw, 1.6rem); letter-spacing: -0.035em; line-height: 1.15; }
.tl-place { margin: 0; color: var(--accent); font-weight: 500; font-size: 0.95rem; }
/* About page timeline (education / experience): neutral, follows the site accent. */
.tl-scroll .tl::before { background: linear-gradient(to bottom, var(--accent), var(--line) 70%); }
.tl-scroll .tl-item:first-child .tl-dot, .tl-scroll .tl-item:hover .tl-dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); }
.tl-scroll .tl-place { color: var(--accent); }
.tl-note { margin: 0.2rem 0 0; color: var(--mute); max-width: 36rem; font-size: 0.95rem; line-height: 1.5; }
@media (max-width: 900px) { .t-time, .t-edu, .t-time.wide, .t-edu.wide { grid-column: span 12; } }




/* ---------- About: proof photos on the timeline + viewer ---------- */
.tl-pics { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.7rem; }
.tl-pic { width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 0.6rem; overflow: hidden; border: 1px solid var(--line); background: var(--surface2); cursor: zoom-in; transition: border-color 0.25s, transform 0.4s var(--spring); }
.tl-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tl-pic:hover, .tl-pic:focus-visible { border-color: var(--accent); transform: translateY(-2px) scale(1.06); }
.lb { border: 0; padding: 0; margin: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--ink); }
.lb[open] { display: grid; place-items: center; animation: lb-in 0.3s var(--ease); }
.lb::backdrop { background: transparent; }
.lb-stage { display: grid; place-items: center; }
.lb-stage > * { animation: lb-in 0.25s var(--ease); cursor: default; border-radius: 1.2rem; border: 1px solid var(--line); background: var(--surface); }
.lb-stage > img { max-width: min(92vw, 1200px); max-height: 82dvh; object-fit: contain; }
.lb-stage > svg { display: block; width: min(92vw, 1000px); max-height: 82dvh; aspect-ratio: 4 / 3; }
.lb-x, .lb-nav { position: absolute; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.2rem; display: grid; place-items: center; cursor: pointer; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.lb-x { top: 1rem; right: 1rem; font-size: 1.5rem; line-height: 1; }
.lb-nav { top: 50%; translate: 0 -50%; }
.lb-nav.prev { left: 1rem; } .lb-nav.next { right: 1rem; }
.lb-x:hover, .lb-nav:hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.lb.single .lb-nav { display: none; }
.lb-count { position: absolute; bottom: 1.2rem; left: 50%; translate: -50% 0; color: var(--mute); font-size: 0.8rem; }
@keyframes lb-in { from { opacity: 0; } }

/* photos sit on the title line, at the right end */
.tl-titlerow { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; flex-wrap: wrap; min-height: 2.5rem; }
.tl-titlerow .tl-pics { margin-top: 0; flex-wrap: nowrap; }


/* timelines: more than two entries scroll inside the card (height is set in JS) */
.tl-scroll { padding: 6px 8px; margin: -6px -8px; }
.tl-scroll.scrolls { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior: contain; }
.tl-scroll.scrolls.more { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 2.2rem), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 2.2rem), transparent); }
.tl-scroll::-webkit-scrollbar { width: 5px; }
.tl-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }

/* announcements with their own picture: a blurred cover layer fills the card (no empty bands) and a second blurred layer shows the whole picture on top */
.pn-bg.fit > * { object-fit: contain; }


/* ---------- project updates: card badge + version notes ---------- */
.upd-pin { position: relative; overflow: hidden; gap: 0.4rem; display: inline-flex; align-items: center; margin-left: 0.55rem; padding: 0.08rem 0.55rem; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 500 0.62rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; vertical-align: middle; white-space: nowrap; }
.upd-pin.on-art { position: absolute; top: 0.8rem; left: 0.8rem; z-index: 3; margin: 0; padding: 0.28rem 0.7rem; background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-size: 0.7rem; letter-spacing: 0.1em; box-shadow: 0 6px 22px color-mix(in srgb, var(--accent) 38%, transparent); }
.case-upd { display: grid; gap: 0.9rem; padding-top: 0.6rem; }
.case-upd > h3 { margin: 0; color: var(--mute); font-weight: 500; font-size: 0.78rem; text-transform: uppercase; }
.case-upd .tl { gap: 1.2rem; }
.case-upd .tl-item h3 { font-size: 1.05rem; margin-top: 0.1rem; }
.upd-list .extra { display: none; }
.upd-list.open .extra { display: grid; }
.upd-more { justify-self: start; padding: 0.45rem 1rem; border: 1px solid var(--line); border-radius: 99px; font-weight: 500; font-size: 0.85rem; color: var(--mute); transition: color 0.2s, border-color 0.2s; }
.upd-more:hover { color: var(--ink); border-color: var(--ink); }

/* the badge says "new": a pinging dot, a light sweep and a pop-in when its card becomes the active one */
.upd-pin::before { content: ""; width: 0.38rem; height: 0.38rem; border-radius: 50%; background: currentColor; animation: pn-ping 1.8s ease-out infinite; }
.upd-pin::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%); transform: translateX(-130%); animation: pn-shine 3s ease-in-out infinite; pointer-events: none; }
/* home "Featured work": the version chip matches the NEW badge on the announcement card (glass chip, pulsing dot, faint glint) */
.h2-row .upd-pin { overflow: visible; padding: 0.14rem 0.65rem 0.14rem 0.55rem; gap: 0.45rem; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); background: color-mix(in srgb, var(--bg) 88%, transparent); color: var(--ink); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); font: 500 0.64rem var(--mono); letter-spacing: 0.1em; }
.h2-row .upd-pin::after { border-radius: inherit; transform: none; background: linear-gradient(100deg, transparent 38%, color-mix(in srgb, var(--ink) 18%, transparent) 50%, transparent 62%); background-size: 280% 100%; background-position: 160% 0; animation: pn-glint 4.6s ease-in-out 1s infinite; }
@media (prefers-reduced-motion: reduce) { .h2-row .upd-pin::before, .h2-row .upd-pin::after { animation: none; } }
.layer.on .upd-pin.on-art { animation: pn-pop 0.6s var(--spring) 0.25s both; }
@media (prefers-reduced-motion: reduce) { .upd-pin::before, .upd-pin::after, .layer.on .upd-pin.on-art { animation: none; } }

/* several bullet points inside one version */
.upd-items { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.upd-items li { position: relative; padding-left: 1.1rem; color: var(--mute); font-size: 0.95rem; line-height: 1.5; }
.upd-items li::before { content: ""; position: absolute; left: 0.1rem; top: 0.62em; width: 0.38rem; height: 0.38rem; border-radius: 50%; background: var(--accent); }
.upd-items li.more { display: none; }
.upd-items.open li.more { display: block; }
.upd-sub { justify-self: start; margin-top: 0.5rem; padding: 0.2rem 0.7rem; border: 1px solid var(--line); border-radius: 99px; font: 500 0.7rem var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--mute); transition: color 0.2s, border-color 0.2s; }
.upd-sub:hover { color: var(--accent); border-color: var(--accent); }

/* update list: only the newest version is open; older ones fold into one line */
.upd-toggle { display: flex; align-items: baseline; gap: 0.8rem; width: 100%; padding: 0.1rem 0; text-align: left; cursor: pointer; color: var(--ink); }
.upd-toggle .upd-ver { font-family: var(--display); font-weight: 500; font-size: 1.1rem; letter-spacing: -0.03em; }
.upd-toggle .tl-period { color: var(--mute); font-size: 0.74rem; text-transform: uppercase; }
.upd-chev { margin-left: auto; color: var(--mute); font-size: 1.2rem; line-height: 1; transition: transform 0.25s var(--ease), color 0.2s; }
.tl-item.open .upd-chev { transform: rotate(90deg); color: var(--accent); }
.tl-item.flat .upd-toggle { cursor: default; }
.upd-toggle:hover .upd-ver { color: var(--accent); }
.tl-item.flat .upd-toggle:hover .upd-ver { color: inherit; }
.upd-detail { display: none; gap: 0.3rem; padding-top: 0.2rem; }
.tl-item.open .upd-detail { display: grid; }


/* ---------- Projects: search + sort ---------- */
.pj-tools { display: flex; align-items: center; flex-wrap: nowrap; gap: 0.5rem; margin-left: auto; }
.pj-search { display: flex; align-items: center; gap: 0.55rem; height: 2.5rem; width: 15rem; padding: 0 0.85rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--mute); cursor: text; transition: border-color 0.25s, width 0.4s var(--ease), color 0.25s; }
.pj-search:focus-within { width: 18rem; border-color: var(--accent); color: var(--ink); }
.pj-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font: inherit; font-size: 0.9rem; }
.pj-search input::placeholder { color: var(--mute); }
.pj-search input::-webkit-search-cancel-button { display: none; }
.pj-clear { width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--mute); font-size: 1rem; line-height: 1; transition: background 0.2s, color 0.2s; }
.pj-clear:hover { background: var(--accent); color: var(--on-accent); }
.pj-sort { position: relative; }
.pj-sortbtn { display: inline-flex; align-items: center; gap: 0.5rem; height: 2.5rem; padding: 0 0.85rem 0 1.05rem; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); font-size: 0.88rem; transition: border-color 0.25s; }
.pj-sortbtn:hover, .pj-sort.open .pj-sortbtn { border-color: var(--ink); }
.pj-sortbtn .lbl { color: var(--mute); }
.pj-sortbtn b { font-weight: 500; }
.pj-sortbtn svg { color: var(--mute); transition: transform 0.3s var(--ease); }
.pj-sort.open .pj-sortbtn svg { transform: rotate(180deg); }
.pj-menu { position: absolute; z-index: 40; right: 0; top: calc(100% + 0.45rem); min-width: 13.5rem; margin: 0; padding: 0.35rem; list-style: none; border: 1px solid var(--line); border-radius: 1.1rem; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top right; transition: opacity 0.2s, transform 0.3s var(--spring), visibility 0s 0.2s; }
.pj-sort.open .pj-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.pj-menu li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.8rem; border-radius: 0.75rem; font-size: 0.9rem; cursor: pointer; transition: background 0.15s; }
.pj-menu li:hover { background: var(--surface2); }
.pj-menu li .ck { opacity: 0; color: var(--accent); font-size: 0.85rem; }
.pj-menu li[aria-selected="true"] { color: var(--accent); }
.pj-menu li[aria-selected="true"] .ck { opacity: 1; }
.pj-count { color: var(--mute); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0 0.3rem; white-space: nowrap; }
.pj-empty { list-style: none; padding: 2.4rem 0; display: grid; justify-items: start; gap: 1rem; border-top: 1px solid var(--line); }
.pj-empty p { margin: 0; color: var(--mute); }
@media (max-width: 900px) { .pj-tools { margin-left: 0; width: 100%; flex-wrap: wrap; } .pj-search, .pj-search:focus-within { flex: 1; width: auto; } .pj-count { order: 3; width: 100%; padding: 0; } .pj-menu { right: auto; left: 0; transform-origin: top left; } }

/* home "featured work": wide screens show the full badge under the name, phones show a compact "● v1.7" next to the name */
.h2-row b .upd-pin { display: none; margin-left: 0.5rem; padding: 0.12rem 0.45rem; gap: 0.28rem; font-size: 0.56rem; letter-spacing: 0.05em; vertical-align: middle; position: relative; top: -0.08em; }
.h2-row b .upd-pin:empty { padding: 0.24rem; }
@media (max-width: 640px) { .h2-row b .upd-pin { display: inline-flex; } .h2-row small .upd-pin { display: none; } }

/* "● UPDATED v1.7": the version is plain text, no chip */
.upd-chip { font-style: normal; color: inherit; letter-spacing: 0.04em; text-transform: none; }
.pj-count:empty { display: none; }

/* project detail: hint that the picture opens full screen */
.case-zoom { position: absolute; z-index: 2; top: 0.8rem; right: 0.8rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(8px); color: var(--ink); font-size: 1rem; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.case-art { cursor: zoom-in; }
.case-art:hover .case-zoom, .case-art:focus-visible .case-zoom { opacity: 1; }
.case-art:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: none) { .case-zoom { opacity: 1; } }

/* per project (panel: "Görsellerin kartta gösterimi" = Doldur): the picture fills the card and may be cropped */
.layer .art.fit-cover .sl > img, .case-art.fit-cover .sl > img { object-fit: cover; }

/* fit "auto" (panel): in the project page the box follows the picture's shape instead of the fixed 4:3 */
.case-art.fit-auto { --maxh: 70dvh; --r: 1.333; height: auto; aspect-ratio: var(--r); }
@media (min-width: 901px) { .case-art.fit-auto { --maxh: min(36rem, calc(100dvh - 14.5rem)); width: min(100%, calc(var(--maxh) * var(--r))); margin-inline: auto; } }
@media (max-width: 900px) { .case-art.fit-auto { max-height: var(--maxh); } }

/* project card cover with words: blurred, darkened picture + title and text, like an announcement */
.layer .art .cv { position: relative; overflow: hidden; background: var(--surface2); }
.cv-bg { position: absolute; inset: -6%; filter: blur(7px); opacity: 0.85; }
.cv-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-shade { position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in srgb, var(--bg) 94%, transparent) 6%, color-mix(in srgb, var(--bg) 58%, transparent) 46%, color-mix(in srgb, var(--bg) 18%, transparent)); }
.cv-copy { position: absolute; left: clamp(1.1rem, 3vw, 1.8rem); right: clamp(1.1rem, 3vw, 1.8rem); bottom: 3.3rem; }
.cv-copy h4 { margin: 0 0 0.45rem; font-weight: 500; font-size: clamp(1.25rem, 2.3vw, 1.9rem); letter-spacing: -0.035em; line-height: 1.1; }
.cv-copy p { margin: 0; max-width: 40rem; color: color-mix(in srgb, var(--ink) 74%, transparent); font-size: 0.95rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* per-project colour: the element sets --pc (and --pc-on, the text colour on top of it); everything inside that uses the accent follows */
.has-pc { --accent: var(--pc); --on-accent: var(--pc-on); }
html[data-theme="light"] .has-pc { --accent: color-mix(in srgb, var(--pc) 80%, #000); }
