/* Muhammad Arobi — portfolio styles.
   Fonts: Geist and Geist Mono (SIL Open Font License 1.1, see ../fonts/OFL.txt). */
@font-face { font-family: 'Geist'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/geist.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('../fonts/geist-mono.woff2') format('woff2'); }

/* ---------- Tokens ---------- */
@property --lens-radius { syntax: '<length>'; inherits: true; initial-value: 0px; }
@property --print { syntax: '<percentage>'; inherits: true; initial-value: 0%; }

:root {
  --paper: #f8f7f3;
  --white: #fffefa;
  --ink: #20211e;
  --muted: #5e605a;
  --line: #d9d9d0;
  --accent: #f4522b;
  --surface-hover: #eae9e2;
  --control-line: #b5b7ad;
  --glass: #f8f7f3f2;
  --action-hover: #383934;
  --focus: #a93616;
  --on-deep: #f8f7f3;
  --shadow-card: 0 1px 2px #20211e14, 0 22px 44px -24px #5b2a1866;
  --shadow-float: 0 2px 6px #20211e14, 0 24px 48px -20px #20211e4d;
  --mono: 'Geist Mono', ui-monospace, Consolas, monospace;
  --sans: 'Geist', Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header: 73px;
  --pad: clamp(22px, 5.6vw, 84px);
  --pixel-cross: polygon(42.86% 0, 57.14% 0, 57.14% 28.57%, 71.43% 28.57%, 71.43% 42.86%, 100% 42.86%, 100% 57.14%, 71.43% 57.14%, 71.43% 71.43%, 57.14% 71.43%, 57.14% 100%, 42.86% 100%, 42.86% 71.43%, 28.57% 71.43%, 28.57% 57.14%, 0 57.14%, 0 42.86%, 28.57% 42.86%, 28.57% 28.57%, 42.86% 28.57%);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #171a18;
  --white: #202420;
  --ink: #f3f1e8;
  --muted: #bdc2b7;
  --line: #3b413a;
  --accent: #ff895f;
  --surface-hover: #30362f;
  --control-line: #656d62;
  --glass: #171a18f2;
  --action-hover: #e0ded3;
  --focus: #ffae81;
  --shadow-card: 0 1px 2px #0006, 0 22px 44px -24px #000c;
  --shadow-float: 0 2px 6px #0006, 0 24px 48px -20px #000b;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 22px); scrollbar-gutter: stable; scrollbar-color: var(--control-line) var(--paper); }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; caret-color: var(--accent); }
html.i18n-pending body { visibility: hidden; }
h1, h2, h3, h4, p, figure, dl, dd, ol, ul { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, a, select, summary, label { -webkit-tap-highlight-color: transparent; }
/* width/height attributes reserve space; height: auto keeps the drawn aspect ratio when CSS sets only a width. */
img { display: block; max-width: 100%; height: auto; }
button:disabled { opacity: .35; cursor: default; }
[hidden] { display: none !important; }
::selection { background: #ffc6af; color: #20211e; }
:root[data-theme=dark] ::selection { background: #7d3b25; color: #fff3ea; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
/* Headings that only receive programmatic focus (dialog titles, case sections) need no ring. */
:is(h2, h3)[tabindex="-1"]:focus { outline: none; }
.showroom :focus-visible, .viewer :focus-visible, .film-dialog :focus-visible { outline-color: #ff9a76; }
time, .film-time, .metric dd, #view-count, .step-no, .section-note { font-variant-numeric: tabular-nums; }
.wrap { width: min(calc(100% - var(--pad) * 2), 1240px); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) { width: 1px; height: 1px; overflow: hidden; position: absolute; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 20; inset: 8px auto auto 8px; background: var(--ink); color: var(--paper); padding: 12px 20px; border-radius: 8px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.noscript-note { padding: 18px 0; color: var(--muted); }

.button, .text-action, .icon-btn, .copy-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.button { min-height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent; font-size: 14px; line-height: 1.15; font-weight: 590; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.button .icon, .text-action .icon { transition: transform .25s var(--ease-out); }
.button-ink { color: var(--paper); background: var(--ink); }
.button-ink:hover { background: var(--action-hover); }
.button-line { color: inherit; background: transparent; border-color: currentColor; }
.text-action { min-height: 44px; font-weight: 570; font-size: 14px; }
.text-action:hover { text-decoration: underline; }
.icon-btn { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; transition: background .2s; }
.icon-btn:hover { background: var(--surface-hover); }
.small-label { font: 550 12.5px/1.4 var(--sans); }

.section { padding-block: clamp(56px, 6.4vw, 100px); }
.section h2, .contact h2 { font-weight: 600; font-size: clamp(40px, 4.6vw, 64px); letter-spacing: -.04em; line-height: 1.04; }
.section h2 > span, .contact h2 > span, .period { color: var(--accent); }
.section-line { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(26px, 3vw, 38px); }
.section-heading { display: grid; gap: 14px; min-width: 0; }
.section-lede { color: var(--muted); font-size: clamp(15px, 1.1vw, 17px); max-width: 52ch; }
.section-note { display: flex; align-items: center; gap: 10px; color: #cdcec4; font: 480 12px/1.5 var(--mono); }
.section-note i { width: 9px; height: 9px; background: #ff896b; clip-path: var(--pixel-cross); }

/* ---------- Header ---------- */
.masthead { position: sticky; top: 0; z-index: 6; background: var(--glass); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.reading-progress { position: absolute; top: 0; left: 0; height: 2px; width: 100%; pointer-events: none; transform: scaleX(0); transform-origin: left; background: var(--accent); }
.nav-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 12px; height: var(--header); }
.brand { justify-self: start; display: inline-flex; align-items: center; width: clamp(106px, 9vw, 120px); }
.brand-logo { display: block; width: 100%; height: auto; }
.brand-logo-dark, :root[data-theme=dark] .brand-logo-light { display: none; }
:root[data-theme=dark] .brand-logo-dark { display: block; }
.main-nav, .header-actions { display: flex; align-items: center; }
.main-nav { position: relative; gap: clamp(18px, 2.4vw, 40px); }
.main-nav a { position: relative; font-size: 14px; font-weight: 520; color: var(--muted); padding: 10px 0; transition: color .2s; }
.main-nav a::after { content: ''; position: absolute; bottom: 4px; left: 0; height: 2px; width: 100%; background: var(--control-line); transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out); }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--ink); }
.main-nav a:not([aria-current]):hover::after { transform: scaleX(1); }
.nav-indicator { position: absolute; left: 0; bottom: 4px; height: 2px; width: var(--ind-w, 0px); background: var(--accent); transform: translateX(var(--ind-x, 0px)); opacity: 0; pointer-events: none; transition: transform .5s var(--ease-out), width .5s var(--ease-out), opacity .25s; }
.main-nav[data-active] .nav-indicator { opacity: 1; }
.main-nav:not(.is-ready) a[aria-current]::after { transform: scaleX(1); background: var(--accent); }
.header-actions { justify-self: end; gap: 8px; }
.header-contact { min-height: 39px; padding: 0 16px; border-color: var(--control-line); }
.header-contact:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.contact-short, .header-contact .contact-compact { display: none; }

.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; }
.lang-switch button { min-width: 36px; height: 32px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 12px/1 var(--sans); letter-spacing: .02em; transition: background .2s, color .2s; }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button[aria-pressed=true] { background: var(--ink); color: var(--paper); }

.theme-control, .theme-toggle, .theme-auto { display: flex; align-items: center; }
.theme-control { flex: none; }
.theme-toggle, .theme-auto { justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 999px; background: transparent; outline-offset: 0; }
.theme-toggle-face { display: grid; place-items: center; width: 38px; height: 38px; overflow: hidden; border: 1px solid var(--control-line); border-radius: 50%; color: var(--ink); transition: background-color .2s, border-color .2s, transform .15s; }
.theme-toggle-face .icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity .18s, transform .3s var(--ease-out); }
.theme-moon { opacity: 0; transform: translateY(5px) rotate(-25deg) scale(.8); }
:root[data-theme=dark] .theme-sun { opacity: 0; transform: translateY(-5px) rotate(25deg) scale(.8); }
:root[data-theme=dark] .theme-moon { opacity: 1; transform: none; }
.theme-toggle:active .theme-toggle-face { transform: scale(.92); }
.theme-auto { color: var(--muted); font: 550 12px/1 var(--mono); }
.theme-auto span { position: relative; }
.theme-auto span::after { content: ''; position: absolute; inset: auto 0 -4px; border-bottom: 1px solid currentColor; opacity: 0; transform: scaleX(.4); transition: opacity .18s, transform .18s; }
.theme-auto[aria-pressed=true] { color: var(--ink); }
.theme-auto[aria-pressed=true] span::after { opacity: 1; transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .theme-toggle:hover .theme-toggle-face { background: var(--surface-hover); border-color: var(--muted); }
  .theme-auto:hover { color: var(--ink); }
}
.menu-toggle { display: none; }

/* Mobile menu sheet */
.menu-sheet { position: fixed; inset: var(--header) 0 0; z-index: 5; display: flex; flex-direction: column; gap: 22px; padding: 10px var(--pad) calc(26px + env(safe-area-inset-bottom)); background: var(--paper); overflow-y: auto; overscroll-behavior: contain; transition: opacity .3s var(--ease-out), transform .4s var(--ease-out); }
@starting-style { .menu-sheet { opacity: 0; transform: translateY(-10px); } }
.menu-links { display: flex; flex-direction: column; }
.menu-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; border-bottom: 1px solid var(--line); font-size: clamp(26px, 7.4vw, 34px); font-weight: 600; letter-spacing: -.04em; transition: opacity .45s var(--ease-out) calc(var(--i) * 35ms), transform .55s var(--ease-out) calc(var(--i) * 35ms), color .2s; }
@starting-style { .menu-links a { opacity: 0; transform: translateY(12px); } }
.menu-links a .icon { width: 20px; height: 20px; color: var(--muted); }
.menu-links a[aria-current] { color: var(--accent); }
.menu-controls { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.menu-controls .lang-switch button { min-width: 54px; height: 44px; font-size: 14px; }
.menu-cta { width: 100%; min-height: 54px; font-size: 15px; }
html.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.08fr .92fr; align-items: center; gap: clamp(32px, 5.6vw, 84px); padding-block: clamp(36px, 4.8vw, 72px) clamp(36px, 4.2vw, 66px); }
.hero-copy { min-width: 0; container-type: inline-size; }
.availability { display: inline-flex; gap: 10px; align-items: center; color: #3e5a43; font: 550 13px/1.4 var(--sans); }
.status-dot { flex: none; width: 8px; height: 8px; background: #3f8a52; box-shadow: 0 0 0 3px #3f8a5226; }
.hero-name, .hero-skeleton-name { margin: 18px 0 20px -.05em; font-size: clamp(64px, 7.4vw, 96px); font-weight: 620; line-height: .92; letter-spacing: -.04em; }
.hero-name .line { display: block; overflow: hidden; padding: 0 .06em .08em; margin: 0 -.06em -.08em; }
.hero-name .line > span { display: inline-block; }
.hero-name .period { margin-left: .01em; }
/* One-word name set in capitals: sized to its column (the hero copy is a size container). */
.hero .hero-name, .hero .hero-skeleton-name { font-size: min(136px, 24cqw); font-weight: 660; letter-spacing: -.015em; }
.hero .hero-name { margin-bottom: 14px; text-transform: uppercase; }
.hero-skeleton-name .skeleton-block { width: 92%; }
.hero-fullname { margin-bottom: 12px; color: var(--muted); font: 560 13px/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.hero-role { font-size: clamp(19px, 1.65vw, 25px); font-weight: 560; letter-spacing: -.03em; line-height: 1.22; }
.hero-role span { color: #66675f; font-weight: 420; }
.hero-intro { color: var(--muted); font-size: clamp(15px, 1.14vw, 17px); max-width: 43ch; line-height: 1.56; margin-top: 12px; }
.hero-actions, .contact-actions { display: flex; align-items: center; gap: 25px; margin-top: 28px; flex-wrap: wrap; }

.portrait-card { position: relative; width: 100%; border: 1px solid #30312c; border-radius: 14px; overflow: hidden; background: #242622; box-shadow: var(--shadow-card); isolation: isolate; }
.portrait-stage { position: relative; aspect-ratio: 1.32; background: #fa724b; overflow: hidden; isolation: isolate; container-type: inline-size; }
.poster-grid { position: absolute; inset: 0; background-image: linear-gradient(to right, #7f291522 1px, transparent 1px), linear-gradient(to bottom, #7f291522 1px, transparent 1px); background-size: 9% 11%; opacity: .8; }
.poster-sun, .poster-orbit { position: absolute; aspect-ratio: 1; border-radius: 50%; pointer-events: none; }
.poster-sun { width: 76%; left: 12%; top: 14%; background: #ffac7b; }
.poster-orbit { border: 1px solid #8d452c7a; }
.orbit-out { width: 110%; left: -5%; top: -13%; }
.orbit-in { width: 91%; left: 4.5%; top: 2%; }
.portrait-layer { position: absolute; inset: 0; mask-image: radial-gradient(circle 38cqw at 50% calc(14% + 38cqw), black 99.65%, transparent 100%), linear-gradient(to bottom, black 49%, transparent 49%); }
.portrait-reveal {
  --lens-x: 50%; --lens-y: 44%; --lens-size: clamp(40px, 13cqw, 74px); --lens-radius: 0px;
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 0;
  background: transparent; cursor: crosshair; touch-action: pan-y pinch-zoom; user-select: none; -webkit-touch-callout: none;
  transition: --lens-radius .32s var(--ease-out);
}
.portrait-reveal[data-lens] { --lens-radius: var(--lens-size); }
.portrait-reveal:focus-visible { outline: 3px solid #fff6df; outline-offset: -5px; }
.portrait-reveal > span { pointer-events: none; }
.portrait-reveal[data-lens=touch] { touch-action: pinch-zoom; }
.portrait-base, .portrait-window { position: absolute; inset: 0; }
.portrait-window { clip-path: circle(var(--lens-radius) at var(--lens-x) var(--lens-y)); }
.portrait-window, .portrait-lens-edge { visibility: hidden; transition: visibility 0s linear .32s; }
.portrait-reveal[data-lens] :is(.portrait-window, .portrait-lens-edge) { visibility: visible; transition-delay: 0s; }
.portrait-reveal[data-lens] .portrait-base {
  mask-image: radial-gradient(circle at var(--lens-x) var(--lens-y), transparent calc(var(--lens-radius) - .5px), black calc(var(--lens-radius) + .5px));
}
.portrait-person { position: absolute; top: -4%; left: 11.5%; width: 77%; aspect-ratio: 3 / 4; }
.portrait-person img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* While a new portrait prints, the previous one stays underneath (an overprint, never a blank frame). */
.portrait-person .portrait-art { z-index: 1; }
.portrait-reveal[data-prev=kemeja] .portrait-art[data-look=kemeja], .portrait-reveal[data-prev=jas] .portrait-art[data-look=jas] { display: block; z-index: 0; }
.portrait-reveal[data-outfit=jas] [data-look=kemeja], .portrait-reveal[data-outfit=kemeja] [data-look=jas] { display: none; }
/* The drawings place the facial features slightly differently from each source photograph. */
.portrait-photo { transform-origin: 50% 0; }
.portrait-photo[data-look=jas] { transform: translate(.28%, 1.80%) scale(1.039, 1.024); }
.portrait-photo[data-look=kemeja] { transform: translate(.15%, 1.71%) scale(1.040, 1.003); }
.portrait-lens-edge {
  position: absolute; left: var(--lens-x); top: var(--lens-y); transform: translate(-50%, -50%);
  width: calc(2 * var(--lens-radius)); height: calc(2 * var(--lens-radius)); border-radius: 50%;
  border: 1px solid #fff3d9dc; box-shadow: 0 0 0 1px #35231cb3;
  background: linear-gradient(#fff3d9, #fff3d9) top center / 3px 5px, linear-gradient(#fff3d9, #fff3d9) bottom center / 3px 5px,
              linear-gradient(#fff3d9, #fff3d9) center left / 5px 3px, linear-gradient(#fff3d9, #fff3d9) center right / 5px 3px;
  background-repeat: no-repeat;
}
.print-head { position: absolute; z-index: 2; left: 0; right: 0; top: calc(100% - var(--print)); height: 3px; margin-top: -3px; background: #3b2219; opacity: 0; pointer-events: none; }
.portrait-hint { position: absolute; right: 15px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #77482f69; border-radius: 20px; background: #ffebd9eb; color: #44291f; font: 550 12px/1.3 var(--sans); transition: opacity .25s; }
.portrait-reveal[data-lens] .portrait-hint { opacity: 0; }
.portrait-hint .icon { width: 16px; height: 16px; }
.hint-touch { display: none; }
@media (hover: none) {
  .hint-pointer { display: none; }
  .hint-touch { display: inline; }
}
.print-texture { pointer-events: none; position: absolute; inset: 0; opacity: .105; background-image: radial-gradient(#68351f 0.65px, transparent .8px); background-size: 3px 3px; mix-blend-mode: multiply; }
.frame-corners { position: absolute; inset: 13px; pointer-events: none; }
.frame-corners i { position: absolute; width: 9px; height: 9px; border-color: #44291f; border-style: solid; border-width: 0; opacity: .75; }
.frame-corners i:nth-child(1) { top: 0; left: 0; border-width: 1px 0 0 1px; }
.frame-corners i:nth-child(2) { top: 0; right: 0; border-width: 1px 1px 0 0; }
.frame-corners i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 1px 1px; }
.frame-corners i:nth-child(4) { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.portrait-index { position: absolute; top: 23px; left: 24px; display: flex; align-items: center; gap: 6px; color: #3e281e; font: 600 11px/1.4 var(--mono); letter-spacing: .05em; pointer-events: none; }
.portrait-index i { width: 6px; height: 6px; background: currentColor; }
.portrait-index b { font-weight: inherit; }
.portrait-change { position: absolute; top: 20px; right: 20px; display: grid; place-items: center; width: 35px; height: 35px; color: #37261e; border: 1px solid #58332388; background: #ffae8680; border-radius: 50%; transition: background .2s; }
.portrait-change::before { content: ''; position: absolute; inset: -5px; }
.portrait-change:hover { background: #ffd5b9; }
.portrait-meta { display: flex; align-items: center; justify-content: space-between; min-height: 43px; padding: 9px 18px; gap: 12px; background: #242622; color: #f5f4ec; font: 520 12px/1.4 var(--sans); }
.portrait-meta span { display: inline-flex; align-items: center; gap: 7px; }
.portrait-meta .icon { color: #ff8966; width: 14px; height: 14px; }
.portrait-meta time { color: #d7d8cc; font: 500 12px/1.4 var(--mono); letter-spacing: .04em; }

/* The poster prints itself once: the one authored moment of the page. */
@keyframes rise-in { from { transform: translateY(104%); } }
@keyframes copy-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes poster-sun { from { opacity: 0; transform: scale(.82); } }
@keyframes poster-orbit { from { opacity: 0; transform: rotate(-14deg) scale(.94); } }
@keyframes corners-in { from { opacity: 0; transform: scale(1.05); } }
@keyframes print-a { from { --print: 100%; } to { --print: 0%; } }
@keyframes print-b { from { --print: 100%; } to { --print: 0%; } }
@keyframes print-c { from { --print: 100%; } to { --print: 0%; } }
@keyframes print-head { 0%, 94% { opacity: .85; } 100% { opacity: 0; } }
.can-animate .hero[aria-busy=false] .hero-name .line > span { animation: rise-in .95s var(--ease-out) both; }
.can-animate .hero[aria-busy=false] .hero-name .line + .line > span { animation-delay: .07s; }
.can-animate .hero[aria-busy=false] .availability { animation: copy-in .7s var(--ease-out) both; }
.can-animate .hero[aria-busy=false] .hero-fullname { animation: copy-in .8s var(--ease-out) .1s both; }
.can-animate .hero[aria-busy=false] .hero-role { animation: copy-in .8s var(--ease-out) .16s both; }
.can-animate .hero[aria-busy=false] .hero-intro { animation: copy-in .8s var(--ease-out) .24s both; }
.can-animate .hero[aria-busy=false] .hero-actions { animation: copy-in .8s var(--ease-out) .32s both; }
.can-animate .hero[aria-busy=false] .poster-grid { animation: fade-in .8s ease-out both; }
.can-animate .hero[aria-busy=false] .poster-sun { animation: poster-sun .9s var(--ease-out) both; }
.can-animate .hero[aria-busy=false] .orbit-out { animation: poster-orbit 1.1s var(--ease-out) .05s both; }
.can-animate .hero[aria-busy=false] .orbit-in { animation: poster-orbit 1.1s var(--ease-out) .12s both; }
.can-animate .hero[aria-busy=false] .frame-corners { animation: corners-in .7s var(--ease-out) 1.15s both; }
.can-animate .hero[aria-busy=false] :is(.portrait-index, .portrait-change, .portrait-hint) { animation: fade-in .5s ease-out 1.25s both; }
.can-animate .hero[aria-busy=false] .portrait-reveal[data-print=a] .portrait-base .portrait-art,
.can-animate .portrait-reveal:is([data-print=b], [data-print=c]) .portrait-base .portrait-art { -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--print)) no-repeat; mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--print)) no-repeat; }
.can-animate .portrait-reveal[data-prev=kemeja] .portrait-art[data-look=kemeja], .can-animate .portrait-reveal[data-prev=jas] .portrait-art[data-look=jas] { -webkit-mask: none; mask: none; }
.can-animate .hero[aria-busy=false] .portrait-reveal[data-print=a] .portrait-base .portrait-person { animation: print-a 1s steps(16, end) .3s both; }
.can-animate .hero[aria-busy=false] .portrait-reveal[data-print=a] .print-head { animation: print-head 1s linear .3s both; }
.can-animate .portrait-reveal[data-print=b] .portrait-base .portrait-person { animation: print-b .8s steps(14, end) both; }
.can-animate .portrait-reveal[data-print=b] .print-head { animation: print-head .8s linear both; }
.can-animate .portrait-reveal[data-print=c] .portrait-base .portrait-person { animation: print-c .8s steps(14, end) both; }
.can-animate .portrait-reveal[data-print=c] .print-head { animation: print-head .8s linear both; }
html:not(.can-animate) .hero[aria-busy=false] > :is(.hero-copy, .portrait-card) { animation: fade-in .3s ease-out; }

/* ---------- Proof ---------- */
.proof { border-block: 1px solid var(--line); display: grid; grid-template-columns: 1.11fr .82fr 1fr 1.13fr; align-items: center; padding: 21px 0; }
.proof-source { display: flex; align-items: center; gap: 12px; width: fit-content; }
.proof-source small, .proof-source strong { display: block; }
.proof-source small { font: 500 12.5px/1.4 var(--sans); color: var(--muted); }
.proof-source strong { margin-top: 2px; font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.proof-source strong .icon { width: 12px; height: 12px; transition: transform .25s var(--ease-out); }
.proof-source:hover strong { color: #a5361c; }
.proof-source:hover strong .icon { transform: translate(2px, -2px); }
.proof-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--line); border-radius: 10px; }
.proof-icon .icon { width: 20px; height: 20px; }
.metric { padding-left: clamp(19px, 3.5vw, 55px); display: flex; flex-direction: column-reverse; border-left: 1px solid var(--line); }
.metric dt { font-size: 12.5px; color: var(--muted); }
.metric dd { font-weight: 580; letter-spacing: -.04em; font-size: clamp(27px, 2.25vw, 35px); line-height: 1.12; font-variant-numeric: lining-nums tabular-nums; }
.metric dd span { font-size: .68em; letter-spacing: -.02em; margin-left: .04em; }

/* ---------- Projects ---------- */
.filters { position: relative; flex: none; display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 30px; }
.filter-thumb { position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--thumb-w, 0px); transform: translateX(var(--thumb-x, 0px)); border-radius: 22px; background: var(--ink); opacity: 0; transition: transform .45s var(--ease-out), width .45s var(--ease-out); }
.filters.is-ready .filter-thumb { opacity: 1; }
.filters button { position: relative; z-index: 1; border: 0; border-radius: 22px; min-height: 36px; padding: 7px 15px; font-size: 13px; font-weight: 540; background: transparent; transition: color .25s, background .2s; }
.filters button:hover { background: var(--surface-hover); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.filters.is-ready button[aria-pressed="true"] { background: transparent; }
.project-grid { display: grid; grid-template-columns: minmax(0,1.32fr) repeat(2,minmax(0,1fr)); gap: clamp(18px,2vw,30px); align-items: stretch; }
.project-card { min-width: 0; display: flex; flex-direction: column; }
.film-cover { display: block; position: relative; isolation: isolate; overflow: hidden; container-type: inline-size; border-radius: 14px; color: var(--poster-ink); background: var(--poster-base); box-shadow: inset 0 0 0 1px #0002; }
.cover-kss { --poster-base: #152e4d; --poster-ink: #f2f6fc; --poster-accent: #a9ccff; --strip: #142a44; --seam: #a9ccff36; }
.cover-kas { --poster-base: #c5e4d1; --poster-ink: #153f33; --poster-accent: #174b3a; --strip: #b2d7c1; --seam: #28685240; }
.cover-kopi { --poster-base: #2d1c14; --poster-ink: #fff0da; --poster-accent: #f0bb7c; --strip: #2b1a13; --seam: #edba8540; }
.cover-picture { --headline-size: clamp(25px,10cqw,39px); display: block; position: relative; overflow: hidden; isolation: isolate; height: clamp(208px,20vw,278px); }
.cover-kss .cover-picture {
  --headline-size: clamp(29px,9.1cqw,46px);
  background: linear-gradient(90deg,#abcfff12 1px,transparent 1px), linear-gradient(#abcfff12 1px,transparent 1px),
              linear-gradient(155deg, #183451 38%, #23446f 100%);
  background-size: 23px 23px,23px 23px,100% 100%;
}
.cover-kas .cover-picture { background: linear-gradient(130deg,#d9ebd8 0,#c1e1cd 50%,#8fc2ad 100%); }
.cover-kas .cover-picture::before, .cover-kopi .cover-picture::before {
  content: ''; position: absolute; width: 101%; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%;
  pointer-events: none; color: #367e6440; right: -47%; top: -47%;
  box-shadow: 0 0 0 13px #0000,0 0 0 14px currentColor,0 0 0 30px #0000,0 0 0 31px currentColor;
}
.cover-kopi .cover-picture { background: radial-gradient(ellipse at 84% 55%,#70462e 0,#42291c 46%,#271a14 90%); }
.cover-kopi .cover-picture::before { width: 77%; right: auto; left: -44%; top: 57%; color: #e7ac713b; }
.cover-headline { position: absolute; top: 9%; left: 6.5%; z-index: 1; font-size: var(--headline-size); line-height: .99; font-weight: 630; letter-spacing: -.04em; text-align: left; }
.cover-headline em { font-style: normal; color: var(--poster-accent); }
.cover-object { position: absolute; display: block; transition: transform .45s var(--ease-out); }
.report-form { width: 76%; left: 6%; top: 60%; border-radius: 5px; transform: rotate(-5deg); box-shadow: 0 9px 18px #0000004d; }
.report-slip { width: 23%; right: 7%; top: max(44%,calc(9% + 2 * var(--headline-size) + 16px)); border-radius: 2px; transform: rotate(9deg); box-shadow: 0 10px 17px #00000066; }
.cash-phone { width: 48%; max-width: 172px; right: 10%; top: max(39%,calc(9% + 2 * var(--headline-size) + 15px)); border-radius: 12% / 6%; transform: rotate(8deg); box-shadow: 0 13px 22px #0000003d; }
.coffee-print { width: 47%; max-width: 175px; right: 12.5%; top: max(42%,calc(9% + 2 * var(--headline-size) + 17px)); aspect-ratio: 4/4.65; isolation: isolate; transform: rotate(9deg); }
.coffee-print::before, .coffee-print::after, .coffee-print img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 8%; }
.coffee-print::before, .coffee-print::after { content: ''; background: #d2c4b2; transform: translate(-6%,3%) rotate(-16deg); box-shadow: 0 4px 10px #1c110b30; }
.coffee-print::after { background: #eae1d6; transform: translate(-3%,1%) rotate(-8deg); }
.coffee-print img { z-index: 1; object-fit: cover; box-shadow: 0 5px 12px #1c110b38; }
.cover-transport { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 6.5%; background: var(--strip); border-top: 1px solid var(--seam); }
.cover-watch { display: inline-flex; align-items: center; gap: 9px; font-size: .875rem; font-weight: 590; }
.play-disc { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--strip); background: var(--poster-ink); transition: transform .25s var(--ease-out); }
.play-disc .icon { width: 15px; height: 15px; }
.film-time { font: 520 .79rem/1.2 var(--mono); letter-spacing: .025em; }
.project-info { display: flex; flex-direction: column; align-items: flex-start; flex: 1; border-radius: 6px; padding: 16px 1px 0; }
.project-meta { color: var(--muted); font: 550 13px/1.4 var(--sans); }
.project-info h3 { margin: 4px 0 7px; font-size: clamp(23px,2vw,30px); font-weight: 600; letter-spacing: -.04em; line-height: 1.14; }
.project-info > p:not(.project-meta) { color: var(--muted); font-size: .96rem; line-height: 1.52; }
.tech-tags { display: flex; list-style: none; flex-wrap: wrap; gap: 6px; padding: 0; margin-top: 14px; }
.tech-tags li { color: var(--muted); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; font: 520 12px/1.4 var(--sans); }
.project-info .tech-tags { margin-top: auto; padding-top: 14px; }
.study-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 13px; font-size: .875rem; font-weight: 600; }
.study-link .icon { width: 15px; height: 15px; transition: transform .25s var(--ease-out); }
@media (hover:hover) and (pointer:fine) {
  .button:hover .icon:last-child { transform: translate(2px,-2px); }
  .hero-actions .button:hover .icon { transform: translate(2px,2px); }
  .film-cover:hover .report-form { transform: translateY(-5px) rotate(-3deg); }
  .film-cover:hover .report-slip { transform: translateY(-4px) rotate(6deg); }
  .film-cover:hover .cash-phone, .film-cover:hover .coffee-print { transform: translateY(-6px) rotate(5deg); }
  .film-cover:hover .play-disc { transform: scale(1.12); }
  .project-info:hover .study-link { text-decoration: underline; text-underline-offset: 4px; }
  .project-info:hover .study-link .icon { transform: translateX(3px); }
}

/* ---------- Film dialog ---------- */
.case-watch { min-height: 44px; padding-inline: 16px; gap: 8px; background: var(--ink); color: var(--paper); }
.case-watch:hover { background: var(--action-hover); }
.case-watch .film-time { border-left: 1px solid currentColor; padding-left: 9px; margin-left: 2px; font-size: .75rem; }
.film-dialog {
  --film-accent: #a9ccff; --film-glow: #344759; --film-width: 1120px; --sidebar-width: 31%;
  color-scheme: dark;
  width: min(var(--film-width),calc(100% - 36px)); max-width: none; max-height: 93vh; max-height: 93dvh;
  overflow: auto; overscroll-behavior: contain; border: 1px solid #4c514b; border-radius: 16px;
  background: #20231f; color: #f8f6ee; box-shadow: 0 24px 85px #10130e66;
}
.film-dialog[data-format=portrait] { --film-width: 860px; --sidebar-width: 42%; }
.film-dialog[data-project=kas] { --film-accent: #a9d9bd; --film-glow: #355449; --phone-glass: linear-gradient(#e1f5e9,#ebf5ef); --home-indicator: #34453c; }
.film-dialog[data-project=kopi] { --film-accent: #eebd85; --film-glow: #584030; --phone-glass: #110c09; --home-indicator: #ddd2c5; }
.film-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px clamp(16px,2vw,26px); border-bottom: 1px solid #41453d; background: #20231f; }
.film-heading { display: flex; align-items: center; gap: 13px; min-width: 0; }
.film-mark { display: grid; place-items: center; width: 41px; height: 41px; flex: none; border: 1px solid #5d6357; border-radius: 10px; color: var(--film-accent); }
.film-mark .icon { width: 22px; height: 22px; }
.film-label { color: #c4c7bb; font: 550 12.5px/1.4 var(--sans); }
.film-header h2 { margin-top: 2px; font-size: clamp(1.25rem,2.3vw,1.85rem); line-height: 1.07; font-weight: 580; letter-spacing: -.04em; }
.film-header .icon-btn { flex: none; width: 44px; height: 44px; color: #f8f6ee; border-color: #5d6357; }
.film-header .icon-btn:hover { background: #353a32; }
.film-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(244px,var(--sidebar-width)); }
.film-stage { display: grid; place-items: center; align-content: center; min-width: 0; padding: clamp(22px,3.2vw,46px) clamp(12px,2vw,30px); background: linear-gradient(180deg, color-mix(in srgb, var(--film-glow) 62%, #111512), #111512 82%); }
.film-device { position: relative; container-type: inline-size; width: min(100%,116vh); width: min(100%,116dvh); }
.device-shell, .device-screen, .device-base { position: relative; }
.device-screen video { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; background: #080a0a; }
.device-shell::before, .device-shell::after, .device-screen::before, .device-screen::after, .device-base { pointer-events: none; }
/* MacBook bezel and hinge around the full 16:9 picture. */
[data-format=landscape] .device-shell {
  width: 90%; margin-inline: auto; padding: 1.95cqw 1.1cqw 1.7cqw;
  border: 1px solid #9ba4a9; border-radius: 2.25cqw 2.25cqw .8cqw .8cqw;
  background: linear-gradient(165deg,#292d30,#0c0e10 23%,#151719 85%,#2a2e30);
  box-shadow: inset 0 0 0 1px #4d5458, inset 0 0 0 3px #141719, 0 1.4cqw 3cqw #05090b59;
}
[data-format=landscape] .device-shell::before { content: ''; position: absolute; top: .69cqw; left: 50%; transform: translateX(-50%); width: .65cqw; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 42% 35%,#7995ac,#273541 32%,#080a0c 70%); }
[data-format=landscape] .device-shell::after { content: ''; position: absolute; bottom: 0; left: 17%; right: 17%; height: .45cqw; border-radius: 1cqw 1cqw 0 0; background: #080a0b; }
.device-base { display: block; height: 1.65cqw; border-radius: .25cqw .25cqw 6% 6% / .25cqw .25cqw 95% 95%; background: linear-gradient(90deg,#51595d,#d9dfe1 4%,#939b9e 14%,#b4bbbf 48%,#929a9e 86%,#d4dade 96%,#51585c); box-shadow: inset 0 1px #eef3f6, inset 0 -.5cqw .35cqw #494f52, 0 .9cqw 1.3cqw -.5cqw #000b; }
.device-base::before { content: ''; display: block; width: 15%; height: 45%; margin-inline: auto; border-radius: 0 0 1cqw 1cqw; background: linear-gradient(90deg,#70787d,#aab2b6 16%,#aab2b6 84%,#70787d); }
/* iPhone glass keeps the island and home indicator outside the 9:16 film. */
[data-format=portrait] .film-device { width: min(100%,292px,33vh); width: min(100%,292px,33dvh); }
[data-format=portrait] .device-shell { padding: 1.2cqw; border-radius: 16cqw; background: linear-gradient(112deg,#d7dcde,#647074 17%,#aab2b6 34%,#475156 57%,#c5cdd0 86%,#717b7e); box-shadow: inset 0 0 0 1px #c9d0d077, 0 2.7cqw 5cqw #0006, 0 7cqw 10cqw -5cqw #0009; }
[data-format=portrait] .device-shell::before, [data-format=portrait] .device-shell::after { content: ''; position: absolute; width: 1.1cqw; border-radius: .65cqw; background: linear-gradient(90deg,#b5bec1,#596366); }
[data-format=portrait] .device-shell::before { left: -.75cqw; top: 25%; height: 7%; box-shadow: 0 17cqw #838d90; }
[data-format=portrait] .device-shell::after { right: -.75cqw; top: 32%; height: 12%; }
[data-format=portrait] .device-screen { padding-block: 15.5cqw 12cqw; border: 1.85cqw solid #080a0b; border-radius: 15cqw; background: var(--phone-glass); box-shadow: 0 0 0 1px #262c2e; }
[data-format=portrait] .device-screen::before { content: ''; position: absolute; width: 25cqw; height: 6.5cqw; top: 3.25cqw; left: 50%; transform: translateX(-50%); border-radius: 9cqw; background: radial-gradient(circle at 83% 50%, #526277 0%, #1e2832 4%, #080a0b 8%); box-shadow: 0 0 0 1px #ffffff12; }
[data-format=portrait] .device-screen::after { content: ''; position: absolute; width: 30cqw; height: 1.25cqw; bottom: 2.65cqw; left: 35%; border-radius: 3cqw; background: var(--home-indicator); }
[data-format=portrait] .device-screen video { aspect-ratio: 9/16; }
[data-format=portrait] .device-base { display: none; }
.film-dialog .device-screen video:fullscreen { width: 100%; height: 100%; aspect-ratio: auto; background: #000; }
.film-sidebar { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding: clamp(20px,2.3vw,30px); border-left: 1px solid #41453d; }
.film-kind { color: var(--film-accent); font: 560 13px/1.45 var(--sans); }
.film-sidebar > h3 { margin-top: 9px; font-size: clamp(1.25rem,1.8vw,1.65rem); line-height: 1.13; letter-spacing: -.035em; font-weight: 580; }
.film-summary { margin-top: 10px; font-size: 1rem; line-height: 1.6; color: #d5d9d0; }
.film-study { min-height: 44px; display: inline-flex; align-items: center; gap: 7px; color: var(--film-accent); font-size: .875rem; font-weight: 600; }
.film-study:hover, .film-error a:hover { text-decoration: underline; }
.film-related { width: 100%; margin-top: auto; padding-top: 18px; }
.film-related h3 { margin: 0 0 3px; border-top: 1px solid #484c43; padding-top: 14px; font-size: .85rem; font-weight: 560; color: #cdcec3; }
.film-related a { display: flex; align-items: center; gap: 11px; min-height: 50px; padding: 6px 4px; border-radius: 6px; font-size: .91rem; font-weight: 560; line-height: 1.2; transition: background .2s; }
.film-related a:hover { background: #30352d; }
.film-related a > .icon { margin-left: auto; width: 15px; color: #c9ccbf; }
.film-thumb { display: block; flex: none; width: 48px; height: 34px; border-radius: 4px; overflow: hidden; }
.film-thumb img { width: 100%; height: 100%; object-fit: cover; }
.film-thumb[data-project=kas] img { object-position: 50% 48%; }
.film-thumb[data-project=kopi] img { object-position: 50% 76%; }
.film-error { margin: 12px; font-size: .94rem; text-align: center; }
.film-error a { color: var(--film-accent); text-decoration: underline; }
@media (min-width: 701px) and (min-height: 541px) {
  [data-format=portrait] .film-sidebar { justify-content: center; }
  [data-format=portrait] .film-related { margin-top: clamp(8px,2.3vh,24px); }
}
@media (min-width: 601px) {
  .project-grid[data-view=web] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-grid[data-view=android] { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (min-width: 601px) and (max-width: 900px) {
  .project-grid, .project-grid[data-view=android] { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .project-grid[data-view=semua] .project-card[data-project=kss] { grid-column: 1/-1; }
  .project-grid[data-view=semua] .cover-kss .cover-headline { top: 18%; font-size: clamp(34px,6cqw,48px); }
  .project-grid[data-view=semua] .report-form { width: 53%; left: 40%; top: 55%; }
  .project-grid[data-view=semua] .report-slip { width: 16%; top: 14%; right: 10%; }
}
@media (max-width: 700px) {
  .film-dialog { width: calc(100% - 16px); max-height: 95vh; max-height: 95dvh; border-radius: 12px; }
  .film-header { padding: 11px 15px; }
  .film-heading { gap: 10px; }
  .film-mark { width: 34px; height: 34px; border-radius: 8px; }
  .film-layout { grid-template-columns: minmax(0,1fr); }
  .film-stage { padding: 20px 12px; }
  [data-format=portrait] .film-device { width: min(100%,62vw,28vh); width: min(100%,62vw,28dvh); }
  .film-sidebar { border-left: 0; border-top: 1px solid #41453d; }
  .film-related { padding-top: 7px; }
}
@media (max-width: 600px) {
  .cover-picture { height: clamp(190px,56vw,270px); }
  .cover-kas .cover-picture, .cover-kopi .cover-picture { --headline-size: clamp(28px,9.4cqw,40px); }
  .film-cover { border-radius: 12px; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .film-dialog { max-height: 96dvh; }
  .film-header { padding-block: 7px; }
  .film-layout { grid-template-columns: minmax(0,1fr) minmax(210px,34%); }
  .film-stage { align-content: start; padding: 16px 12px; }
  [data-format=portrait] .film-device { width: min(100%,32vh); width: min(100%,32dvh); }
  .film-sidebar { padding: 16px 18px; border-left: 1px solid #41453d; border-top: 0; }
}

/* ---------- Presentation showroom ---------- */
.showroom { background: #232521; color: var(--on-deep); }
.showroom-grid { display: grid; grid-template-columns: 1.44fr 1fr; gap: clamp(30px, 4.5vw, 68px); align-items: start; }
.deck-preview { min-width: 0; }
.deck-open { display: block; position: relative; width: 100%; background: #171816; padding: 0; color: white; border: 1px solid #53534a; border-radius: 12px; overflow: hidden; }
.deck-open img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; transition: transform .5s var(--ease-out); }
.deck-open:hover img { transform: scale(1.015); }
.deck-expand { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; display: grid; place-items: center; color: white; background: #1c1d1acc; border: 1px solid #ffffff4a; border-radius: 50%; }
.deck-caption { display: flex; justify-content: space-between; align-items: center; margin-top: 21px; gap: 13px; }
.deck-caption .small-label, .viewer .small-label { color: #ff9e7e; }
.deck-caption h3 { font-weight: 560; letter-spacing: -.035em; font-size: clamp(21px,2.2vw,32px); line-height: 1.17; margin-top: 4px; }
.button-on-dark { background: transparent; color: var(--on-deep); border-color: #686b60; padding: 0 16px; min-height: 42px; font-size: 13px; }
.button-on-dark:hover { background: var(--on-deep); color: #20211e; }
.deck-desc { font-size: 14px; color: #cacbc0; max-width: 58ch; margin-top: 11px; }
.deck-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; list-style: none; padding: 0; margin-top: 20px; }
.deck-strip:empty { display: none; }
.deck-frame { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid #ffffff24; border-radius: 6px; background: #171816; }
.deck-frame img { width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; transition: transform .4s var(--ease-out); }
.deck-frame:hover img { transform: scale(1.05); }
.deck-frame span { position: absolute; left: 5px; bottom: 5px; padding: 2px 5px; border-radius: 3px; background: #121311d9; color: #f1f1e8; font: 520 12px/1.2 var(--mono); }
.deck-list-head { display: flex; align-items: center; justify-content: space-between; color: #cacbbf; font: 550 13px/1.5 var(--sans); padding: 1px 12px 13px; border-bottom: 1px solid #505249; }
.deck-list { max-height: clamp(300px, 30vw, 460px); overflow-y: auto; padding-right: 5px; scrollbar-color: #75786b #2a2c27; scrollbar-width: thin; }
.deck-option { display: flex; align-items: center; text-align: left; gap: 13px; width: 100%; padding: 13px 12px; background: transparent; color: #f1f1e8; border: 0; border-bottom: 1px solid #484a42; border-radius: 0; transition: background .2s; }
.deck-option img { width: 56px; height: 32px; border-radius: 3px; object-fit: cover; border: 1px solid #ffffff24; }
.deck-option > span { flex: 1; font-size: 14px; font-weight: 520; line-height: 1.3; }
.deck-option small { display: block; margin-top: 3px; color: #c4c5b9; font: 500 12px/1.3 var(--mono); }
.deck-option .icon { width: 15px; height: 15px; color: #a7a89c; transition: transform .25s var(--ease-out), color .2s; }
.deck-option:hover { background: #2f322b; }
.deck-option:hover .icon { transform: translate(2px, -2px); }
.deck-option[aria-pressed=true] { background: #393d33; }
.deck-option[aria-pressed=true] .icon { color: #ff9e7e; }
.deck-option[aria-pressed=true] small { color: #ffc2ab; }
.deck-option:focus-visible { outline-offset: -3px; }

/* ---------- Skills ---------- */
.skills { border-top: 1px solid var(--line); }
.skills > .wrap > h2 { margin-bottom: clamp(22px, 3vw, 34px); }
.skill-mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.skill-logo { display: block; width: 22px; height: 22px; }
.skill-mark-php .skill-logo { width: 27px; }
.skill-mark-mysql { color: #00546b; }
.skill-mark-canva { color: #087b83; }
:root[data-theme=dark] .skill-mark-mysql { color: #8dc8da; }
:root[data-theme=dark] .skill-mark-canva { color: #52ccd2; }
.skills-stack { border-top: 1px solid var(--line); }
.skills-row { display: grid; grid-template-columns: minmax(174px, .85fr) minmax(0, 3.15fr); gap: 12px clamp(16px, 3vw, 42px); align-items: center; padding-block: clamp(17px, 2vw, 24px); border-bottom: 1px solid var(--line); }
.skills-row h3 { font-size: clamp(18px, 1.7vw, 22px); line-height: 1.25; font-weight: 600; letter-spacing: -.03em; }
.skills-disciplines { margin-top: 5px; color: var(--muted); font-size: .875rem; }
.skills-example { display: inline-flex; align-items: center; min-height: 32px; font-size: .875rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--control-line); }
.skills-example:hover { color: var(--ink); text-decoration-color: var(--accent); }
.skills-tools { display: flex; flex-wrap: wrap; gap: 10px 18px; list-style: none; padding: 0; }
.skills-tools li { display: flex; align-items: center; gap: 8px; font-size: .875rem; font-weight: 570; line-height: 1.3; }
.skills-meta { display: grid; grid-template-columns: 1.4fr 1fr; gap: 17px 32px; margin-top: 24px; }
.skills-meta h3 { font-size: 1rem; font-weight: 610; letter-spacing: -.02em; }
.skills-meta p { margin-top: 4px; color: var(--muted); font-size: .9375rem; }
@media (max-width: 760px) {
  .skills-row { grid-template-columns: 1fr; }
}
@media (max-width: 530px) {
  .skills-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .skills-meta { grid-template-columns: 1fr; }
}

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: .94fr 1.06fr; gap: clamp(40px, 6vw, 84px) clamp(36px, 8vw, 126px); align-items: start; }
.about-lead { font-size: clamp(20px, 1.65vw, 26px); line-height: 1.35; letter-spacing: -.03em; margin: 22px 0 13px; }
.about-body { color: var(--muted); max-width: 51ch; }
.about-copy .text-action { margin-top: 14px; }
.about-timeline h3, .process > h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.about-timeline { border-top: 1px solid var(--line); padding-top: 18px; }
.timeline { list-style: none; padding: 16px 4px 0 6px; }
.timeline li { position: relative; border-left: 1px solid var(--line); padding-left: 20px; padding-bottom: 18px; }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 5px; width: 7px; height: 7px; background: #9b9c90; border-radius: 50%; }
.timeline li:first-child::before { left: -6px; top: 3px; width: 11px; height: 11px; border-radius: 0; background: var(--accent); clip-path: var(--pixel-cross); }
.timeline time { display: block; color: var(--muted); font: 510 12px/1.5 var(--mono); }
.timeline strong { display: block; font-weight: 590; font-size: 15.5px; margin-block: 3px; }
.timeline p { color: var(--muted); font-size: 14.5px; }
.process { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: 22px; }
.process-steps { list-style: none; padding: 0; margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.process-steps li { position: relative; padding: 22px 32px 0 0; border-top: 2px solid var(--line); }
.process-steps li::before { content: ''; position: absolute; top: -7px; left: 0; width: 12px; height: 12px; background: var(--accent); clip-path: var(--pixel-cross); }
.step-no { display: block; margin-bottom: 10px; font: 520 12px/1 var(--mono); color: var(--muted); }
.process-steps strong { display: block; margin-bottom: 7px; font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.03em; }
.process-steps p { color: var(--muted); font-size: 15px; max-width: 36ch; }

/* ---------- Certificates ---------- */
.credentials { border-top: 1px solid var(--line); }
.credential-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: clamp(16px,2vw,28px); }
.credential-card { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); overflow: hidden; min-width: 0; border: 1px solid var(--line); background: var(--white); border-radius: 14px; }
.credential-art { --doc-ground: #dbe8dc; --doc-light: #eef5ee; position: relative; isolation: isolate; display: grid; place-items: center; min-height: 182px; padding: 16px; overflow: hidden; background: radial-gradient(120% 95% at 22% 8%, var(--doc-light) 0%, var(--doc-ground) 62%); }
.credential-art.trust { --doc-ground: #d9e4ef; --doc-light: #edf3f9; }
.credential-art img { width: 100%; max-width: 340px; height: auto; aspect-ratio: 1.414 / 1; object-fit: contain; background: white; border: 1px solid #292b221c; box-shadow: 0 2px 4px #283e361f, 0 12px 22px -12px #283e3666; transform: rotate(-3deg); transition: transform .35s var(--ease-out); }
.credential-art.trust img { transform: rotate(3deg); box-shadow: 0 2px 0 #d9dcd8, 0 4px 0 #fcfcf8, 0 14px 22px -12px #293b5266; }
.credential-art:hover img { transform: rotate(0) scale(1.035); }
.credential-info { display: flex; align-items: flex-start; flex-direction: column; padding: clamp(16px,1.7vw,24px); }
.credential-info time { font: 500 12px/1.45 var(--mono); color: var(--muted); }
.credential-info h3 { margin: 6px 0 3px; font-size: clamp(22px,1.9vw,30px); font-weight: 590; line-height: 1.1; letter-spacing: -.04em; }
.credential-issuer { font-size: 14px; line-height: 1.45; }
.credential-detail { margin: 7px 0 13px; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.credential-links { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; margin-top: auto; }
.credential-links a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; font-size: 13px; font-weight: 570; }
.credential-links a:hover { text-decoration: underline; }
.credential-links a[download] { color: var(--muted); }

/* ---------- Contact and project brief ---------- */
.contact { padding-bottom: 30px; }
.contact-panel { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(28px, 4vw, 64px); align-items: start; border-radius: 16px; background: #fd7850; padding: clamp(28px, 4.7vw, 70px); }
.contact-copy { position: relative; z-index: 1; align-self: stretch; display: flex; flex-direction: column; }
.contact-copy .contact-direct-label { margin-top: auto; padding-top: clamp(24px, 3vw, 40px); }
.contact h2 > span { color: #fff5df; }
.contact-copy > p:not(.contact-direct-label) { max-width: 46ch; margin-top: 14px; color: #3f2a22; font-size: clamp(15px, 1.15vw, 17px); }
.contact-direct-label { margin-top: clamp(24px, 3vw, 40px); color: #4a2d22; font: 560 13px/1.4 var(--sans); }
.contact-actions { margin-top: 6px; gap: 2px 22px; }
.contact-actions .text-action { color: #261711; }
.contact-actions .contact-icon { width: 18px; height: 18px; }
.contact-ornament { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.contact-ornament i { position: absolute; width: 36%; aspect-ratio: 1; left: -12%; bottom: -26%; transform: rotate(-34deg); border: 1px solid #823d2466; border-radius: 39%; }
.contact-ornament i:nth-child(2) { left: -8%; bottom: -34%; }
.contact-ornament i:nth-child(3) { left: -4%; bottom: -42%; }
.brief { position: relative; z-index: 1; display: grid; gap: 18px; padding: clamp(18px, 2.2vw, 28px); background: #fff7ef; color: #2a1d17; border: 1px solid #b4543133; border-radius: 14px; box-shadow: 0 1px 2px #5b2a1814, 0 24px 44px -26px #5b2a1880; }
html:not(.js) .brief { display: none; }
.brief-title { font-size: clamp(19px, 1.6vw, 22px); font-weight: 600; letter-spacing: -.03em; }
.brief-types { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.brief-types legend, .brief-field label, .brief-preview-label { padding: 0; color: #6a4334; font: 560 13px/1.4 var(--sans); }
.brief-types legend { margin-bottom: 9px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px; border: 1px solid #cfa18c; border-radius: 999px; background: #fffdfa; color: #3d271e; font-size: 14px; font-weight: 550; transition: background .2s, color .2s, border-color .2s; }
.chip input:hover + span { border-color: #8c5a45; }
.chip input:checked + span { background: #2a1d17; border-color: #2a1d17; color: #fff7ef; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.brief-field { display: grid; gap: 7px; }
.brief-field label small { color: #84604f; font-size: 12.5px; font-weight: 450; }
.brief-field input, .brief-field textarea { width: 100%; padding: 11px 13px; border: 1px solid #d4b3a3; border-radius: 10px; background: #fffdfa; color: #2a1d17; font: 15px/1.5 var(--sans); transition: border-color .2s, box-shadow .2s; }
.brief-field textarea { min-height: 104px; resize: vertical; }
.brief-field :is(input, textarea)::placeholder { color: #85614f; opacity: 1; }
.brief-field :is(input, textarea):focus { outline: none; border-color: #2a1d17; box-shadow: 0 0 0 3px #f4522b45; }
.brief-preview { padding: 12px 14px; border: 1px dashed #d9a58c; border-radius: 10px; background: #fbeadf; }
.brief-preview-label { margin-bottom: 5px; color: #7a4b38; font-size: 12.5px; }
.brief-preview-text { min-height: 3.1em; color: #3d271e; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.brief-actions .button { flex: 1 1 auto; }
.brief .button-ink { background: #2a1d17; color: #fff7ef; }
.brief .button-ink:hover { background: #48342b; }
.brief .button-line { color: #2a1d17; border-color: #2a1d17; }
.brief .button-line:hover { background: #2a1d17; color: #fff7ef; }
.brief-note { margin-top: -6px; color: #6a4334; font-size: 12.5px; }
.contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding-top: 13px; font-size: 13px; }
.contact-links > a:hover { text-decoration: underline; }
.copy-btn { min-height: 36px; background: transparent; border: 0; border-left: 1px solid var(--line); padding: 6px 9px 6px 12px; color: var(--muted); font-size: 12.5px; gap: 6px; }
.copy-btn:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { margin-top: clamp(36px, 5vw, 72px); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px clamp(20px, 3vw, 48px); padding-block: clamp(40px, 5vw, 68px) clamp(28px, 3vw, 44px); }
.footer-mark { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 32px; padding-bottom: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line); }
.footer-name { font-size: clamp(44px, 8vw, 96px); font-weight: 620; letter-spacing: -.04em; line-height: .95; }
.footer-name span { color: var(--accent); }
.footer-role { color: var(--muted); max-width: 30ch; padding-bottom: .4em; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer-col h2 { margin-bottom: 6px; color: var(--muted); font: 560 13px/1.4 var(--sans); letter-spacing: 0; }
.footer-col a { display: inline-flex; align-items: center; min-height: 32px; font-size: 15px; font-weight: 530; }
.footer-col a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.footer-clock time { font: 520 24px/1.2 var(--mono); letter-spacing: -.02em; }
.footer-clock .availability { margin-top: 10px; font-size: 12.5px; }
.footer-base { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer-base a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; }
.footer-base a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Layers: dialogs open and close softly ---------- */
html.has-modal { overflow: hidden; }
dialog { padding: 0; color: var(--ink); border: 1px solid var(--control-line); opacity: 0; transform: translateY(10px) scale(.996); transition: opacity .18s ease-in, transform .18s ease-in, overlay .18s ease-in allow-discrete, display .18s ease-in allow-discrete; }
dialog[open] { opacity: 1; transform: none; transition: opacity .3s var(--ease-out), transform .45s var(--ease-out), overlay .45s allow-discrete, display .45s allow-discrete; }
@starting-style { dialog[open] { opacity: 0; transform: translateY(16px) scale(.99); } }
dialog::backdrop { background: #191b1800; transition: background .2s, backdrop-filter .2s, overlay .2s allow-discrete, display .2s allow-discrete; }
dialog[open]::backdrop { background: #191b18ab; backdrop-filter: blur(4px); }
@starting-style { dialog[open]::backdrop { background: #191b1800; backdrop-filter: blur(0); } }
.film-dialog[open]::backdrop { background: #111410db; backdrop-filter: blur(6px); }
.viewer[open]::backdrop { background: #151714d9; }

/* Case study: a full reading page */
.case-sheet { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; background: var(--paper); overflow-y: auto; overscroll-behavior: contain; }
.case-sheet[open]::backdrop { background: var(--paper); backdrop-filter: none; }
.case-bar { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px var(--pad); background: var(--glass); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.case-back, .case-bar-next { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--control-line); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 560; transition: background .2s; }
.case-back { padding: 0 16px 0 11px; }
.case-bar-next { padding: 0 11px 0 16px; }
.case-back:hover, .case-bar-next:hover { background: var(--surface-hover); }
.case-bar-next:hover .icon { transform: translateX(2px); }
.case-bar-next .icon { transition: transform .25s var(--ease-out); }
.case-bar-title { justify-self: center; max-width: 100%; overflow: hidden; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .35s var(--ease-out); }
.case-sheet.is-scrolled .case-bar-title { opacity: 1; transform: none; }
.case-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; }
.case-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--case-progress, 0)); }
.case-page { width: min(calc(100% - var(--pad) * 2), 1120px); margin-inline: auto; padding-block: clamp(30px, 5vw, 64px) clamp(44px, 6vw, 84px); }
.case-page.is-entering { animation: copy-in .55s var(--ease-out) both; }
.case-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px clamp(28px, 5vw, 76px); align-items: end; padding-bottom: clamp(26px, 3.6vw, 40px); }
.case-hero h2 { font-size: clamp(38px, 5.2vw, 76px); font-weight: 620; line-height: 1; letter-spacing: -.04em; }
.case-meta { margin-top: 16px; color: var(--muted); font-size: 15px; }
.case-lead { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; letter-spacing: -.02em; }
.case-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 22px; }
.case-facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.case-facts dt { margin-bottom: 6px; color: var(--muted); font: 560 13px/1.4 var(--sans); }
.case-facts dd { font-size: 15px; }
.case-facts .tech-tags { margin: 0; }
.case-gallery { padding-block: clamp(26px, 3.6vw, 44px); border-block: 1px solid var(--line); }
.case-gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.case-gallery-head h3 { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.case-gallery-head p { margin-top: 2px; color: var(--muted); font: 500 12px/1.4 var(--mono); }
.case-strip-nav { display: flex; gap: 6px; }
.case-strip { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; list-style: none; padding: 4px 2px 14px; margin: 0; scrollbar-width: thin; scrollbar-color: var(--control-line) transparent; }
.case-strip li { flex: none; scroll-snap-align: start; }
.case-shot { display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-align: left; }
.case-shot img { display: block; width: auto; height: clamp(190px, 22vw, 290px); background: #131923; transition: transform .45s var(--ease-out); }
.case-strip[data-format=portrait] .case-shot img { height: clamp(300px, 34vw, 440px); background: #e9ece6; }
.case-shot:hover img { transform: scale(1.025); }
.case-shot span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; font-size: 13px; font-weight: 560; }
.case-shot span .icon { width: 14px; height: 14px; color: var(--muted); }
.case-body-grid { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); gap: clamp(28px, 5vw, 84px); padding-top: clamp(30px, 4vw, 56px); }
.case-toc { position: sticky; top: 90px; align-self: start; }
.case-toc p { margin-bottom: 10px; color: var(--muted); font: 560 13px/1.4 var(--sans); }
.case-toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.case-toc button { position: relative; display: block; width: 100%; padding: 7px 0 7px 20px; border: 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.35; text-align: left; transition: color .2s; }
.case-toc button::before { content: ''; position: absolute; left: 2px; top: 12px; width: 9px; height: 9px; background: var(--control-line); clip-path: var(--pixel-cross); transition: background .2s; }
.case-toc button:hover, .case-toc button[aria-current] { color: var(--ink); }
.case-toc button[aria-current] { font-weight: 600; }
.case-toc button[aria-current]::before { background: var(--accent); }
.case-sections { max-width: 68ch; }
.case-section { scroll-margin-top: 96px; }
.case-section + .case-section { margin-top: 38px; }
.case-section h3 { margin-bottom: 10px; font-size: clamp(22px, 2vw, 28px); font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.case-section p, .case-section li { color: var(--muted); font-size: 17px; line-height: 1.7; }
.case-section ul { display: grid; gap: 10px; list-style: none; padding: 0; margin-top: 10px; }
.case-section li { position: relative; padding-left: 24px; }
.case-section li::before { content: ''; position: absolute; left: 1px; top: .6em; width: 10px; height: 10px; background: var(--accent); clip-path: var(--pixel-cross); }
.case-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; border-block: 1px solid var(--line); }
.case-results div { padding: 20px 18px 22px; border-left: 1px solid var(--line); }
.case-results div:first-child { border-left: 0; padding-left: 0; }
.case-results strong { display: block; font-size: clamp(32px, 3.4vw, 48px); font-weight: 600; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.case-results span { display: block; margin-top: 8px; color: var(--muted); font-size: 14px; }
.case-end { margin-top: clamp(44px, 6vw, 80px); }
.case-next { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px; min-height: 210px; padding: clamp(22px, 3vw, 38px); overflow: hidden; border-radius: 16px; background: var(--poster-base); color: var(--poster-ink); }
.case-next small { font: 560 13px/1.4 var(--sans); opacity: .82; }
.case-next strong { display: block; margin-top: 8px; font-size: clamp(32px, 4.6vw, 64px); font-weight: 620; line-height: 1; letter-spacing: -.04em; }
.case-next p { max-width: 46ch; margin-top: 12px; opacity: .88; }
.case-next > .icon { width: 30px; height: 30px; transition: transform .35s var(--ease-out); }
.case-next:hover > .icon { transform: translateX(5px); }
.case-next::after { content: ''; position: absolute; z-index: -1; width: 46%; aspect-ratio: 1; right: -12%; top: -38%; border: 1px solid currentColor; border-radius: 50%; opacity: .18; box-shadow: 0 0 0 18px #0000, 0 0 0 19px currentColor; }

/* ---------- Image viewer ---------- */
.viewer { width: min(1120px, calc(100% - 32px)); max-width: none; max-height: 94vh; max-height: 94dvh; border: 1px solid #51544b; background: #242622; color: var(--on-deep); border-radius: 16px; overscroll-behavior: contain; }
.viewer-shell { padding: clamp(13px,2vw,22px); }
.viewer-top, .viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.viewer-top { margin-bottom: 13px; }
.viewer-top h2 { font-size: clamp(17px, 2vw, 25px); letter-spacing: -.035em; font-weight: 560; margin-top: 2px; line-height: 1.2; }
.viewer-actions, .view-paging { display: flex; align-items: center; gap: 7px; }
.viewer .icon-btn { width: 42px; height: 42px; border-color: #575b50; color: var(--on-deep); }
.viewer .icon-btn:hover, .viewer .icon-btn[aria-pressed=true] { background: #393c35; }
.viewer-stage { overflow: auto; position: relative; display: grid; place-items: center; height: min(56vh,620px); height: min(56dvh,620px); width: 100%; background: #171916; border: 1px solid #494c42; border-radius: 8px; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; cursor: zoom-in; }
.viewer-stage img { height: 100%; width: 100%; position: absolute; inset: 0; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.viewer-stage.is-zoomed { display: block; touch-action: auto; cursor: zoom-out; }
.viewer-stage.is-zoomed img { position: static; height: auto; width: max(135%, var(--zoom-width, 1200px)); max-width: none; object-fit: initial; }
.viewer-stage.is-zoomed.portrait img { width: max(72%, min(730px, 175vw)); margin-inline: auto; }
.viewer-bottom { padding-block: 12px; }
.view-paging { flex: none; }
.view-paging .icon-btn { width: 40px; height: 40px; }
#view-count { font: 500 12px/1.2 var(--mono); text-align: center; min-width: 48px; }
#view-caption { flex: 1; max-width: 72ch; color: #dfdfd5; font-size: 13.5px; line-height: 1.45; text-align: right; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 3px; scrollbar-width: thin; }
.thumb { padding: 2px; border: 1px solid #51554b; border-radius: 5px; flex: 0 0 auto; width: 62px; height: 38px; background: #151813; transition: border-color .2s, box-shadow .2s; }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb:hover { border-color: #8a8e80; }
.thumb[aria-pressed=true] { border-color: #ff956e; box-shadow: 0 0 0 1px #ff956e; }

/* ---------- Language suggestion ---------- */
.lang-suggest { position: fixed; z-index: 7; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; max-width: min(480px, calc(100% - 32px)); padding: 10px 10px 10px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow-float); font-size: 14px; transition: opacity .3s var(--ease-out), transform .45s var(--ease-out); }
@starting-style { .lang-suggest { opacity: 0; transform: translateY(12px); } }
.lang-suggest p { flex: 1; min-width: 0; }
.lang-suggest .button { min-height: 40px; padding: 0 14px; font-size: 13px; }
.lang-suggest .icon-btn { flex: none; }

/* ---------- Network status ---------- */
.net-status { position: fixed; z-index: 8; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100% - 32px)); padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); box-shadow: var(--shadow-float); font-size: 13.5px; font-weight: 520; transition: opacity .3s var(--ease-out), transform .45s var(--ease-out); }
@starting-style { .net-status { opacity: 0; transform: translateY(12px); } }
.net-dot { flex: none; width: 8px; height: 8px; background: var(--accent); }
.net-status[data-state=online] .net-dot { background: #6fbf7f; }
@media (max-width: 600px) { .net-status { left: 12px; right: 12px; max-width: none; border-radius: 14px; } }
@media (prefers-reduced-motion: reduce) { .net-status { transform: none !important; } }

/* ---------- Dark edition artwork ---------- */
:root[data-theme=dark] .availability { color: #c0d4ba; }
:root[data-theme=dark] .status-dot { background: #8fb586; box-shadow: 0 0 0 3px #8fb58630; }
:root[data-theme=dark] .hero-role span { color: #a9afa3; }
:root[data-theme=dark] .proof-source:hover strong { color: var(--accent); }
:root[data-theme=dark] .portrait-card { border-color: #62675c; }
:root[data-theme=dark] .portrait-stage { background: #332e27; }
:root[data-theme=dark] .poster-grid { background-image: linear-gradient(to right,#d49b691f 1px,transparent 1px),linear-gradient(to bottom,#d49b691f 1px,transparent 1px); }
:root[data-theme=dark] .poster-orbit { border-color: #b58c5b68; }
:root[data-theme=dark] .poster-sun { background: #c78b66; }
:root[data-theme=dark] .frame-corners i { border-color: #e6bd95; }
:root[data-theme=dark] .portrait-index { color: #ffdbb8; }
:root[data-theme=dark] .print-head { background: #ffdbb8; }
:root[data-theme=dark] .portrait-change, :root[data-theme=dark] .portrait-hint { color: #ffdfc1; background: #392c24ec; border-color: #a27b5a; }
:root[data-theme=dark] .portrait-change:hover { background: #534034; }
:root[data-theme=dark] .portrait-meta { background: #1e241e; border-top: 1px solid #53574b; }
:root[data-theme=dark] .credential-art { --doc-ground: #324438; --doc-light: #3d5244; }
:root[data-theme=dark] .credential-art.trust { --doc-ground: #334251; --doc-light: #3f5063; }
:root[data-theme=dark] .contact-panel { background: #35261f; border: 1px solid #624737; }
:root[data-theme=dark] .contact h2 > span { color: var(--accent); }
:root[data-theme=dark] .contact-copy > p:not(.contact-direct-label) { color: #e2cbc0; }
:root[data-theme=dark] .contact-direct-label { color: #d6b8aa; }
:root[data-theme=dark] .contact-actions .text-action { color: #fbe9de; }
:root[data-theme=dark] .contact-ornament i { border-color: #cd8b5c55; }
:root[data-theme=dark] .brief { background: #241a15; color: #f6ebe3; border-color: #624737; box-shadow: 0 24px 44px -26px #000c; }
:root[data-theme=dark] .brief-types legend, :root[data-theme=dark] .brief-field label, :root[data-theme=dark] .brief-note { color: #dcbfb1; }
:root[data-theme=dark] .brief-field label small { color: #c09f90; }
:root[data-theme=dark] .chip span { background: #2e221c; border-color: #765443; color: #f0dccf; }
:root[data-theme=dark] .chip input:hover + span { border-color: #b88a72; }
:root[data-theme=dark] .chip input:checked + span { background: #ffa27d; border-color: #ffa27d; color: #2d2018; }
:root[data-theme=dark] .brief-field :is(input, textarea) { background: #2e221c; border-color: #765443; color: #f6ebe3; }
:root[data-theme=dark] .brief-field :is(input, textarea)::placeholder { color: #b8988a; }
:root[data-theme=dark] .brief-field :is(input, textarea):focus { border-color: #ffa27d; box-shadow: 0 0 0 3px #ff895f40; }
:root[data-theme=dark] .brief-preview { background: #2e221c; border-color: #8a6150; }
:root[data-theme=dark] .brief-preview-label { color: #e0b9a7; }
:root[data-theme=dark] .brief-preview-text { color: #ecd9cc; }
:root[data-theme=dark] .brief .button-ink { background: #ffa27d; color: #2d2018; }
:root[data-theme=dark] .brief .button-ink:hover { background: #ffc3a7; }
:root[data-theme=dark] .brief .button-line { color: #fbe9de; border-color: #c49a85; }
:root[data-theme=dark] .brief .button-line:hover { background: #fbe9de; color: #2d2018; }

/* ---------- View transitions ---------- */
::view-transition-group(*) { animation-duration: .42s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
:root[data-vt=filter]::view-transition-old(root), :root[data-vt=filter]::view-transition-new(root) { animation: none; }
:root[data-vt=theme]::view-transition-old(root) { animation: none; }
:root[data-vt=theme]::view-transition-new(root) { animation: theme-reveal .62s steps(12, end) both; }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 100%) var(--vt-y, 0)); }
  to { clip-path: circle(var(--vt-r, 150vmax) at var(--vt-x, 100%) var(--vt-y, 0)); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .contact-short { display: inline; }
  .contact-long { display: none; }
}
@media (max-width: 1020px) {
  .main-nav { gap: clamp(12px, calc(4vw - 18px), 22px); }
  .credential-card { grid-template-columns: 1fr; }
  .credential-art { height: 180px; min-height: 0; padding: 15px 22px; }
  .credential-art img { max-width: 218px; }
  .hero { grid-template-columns: 1.04fr .96fr; gap: 32px; }
  .hero-name, .hero-skeleton-name { font-size: clamp(60px, 7.6vw, 80px); }
  .proof { grid-template-columns: 1.12fr .82fr .94fr 1.1fr; }
  .proof-icon { display: none; }
  .showroom-grid { grid-template-columns: 1.3fr 1fr; gap: 25px; }
  .contact-panel { grid-template-columns: 1fr; }
  .case-hero { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 900px) {
  .case-body-grid { grid-template-columns: 1fr; }
  .case-toc { display: none; }
}
@media (max-width: 760px) {
  :root { --header: 60px; --pad: clamp(19px, 5.3vw, 36px); }
  .brand { width: 104px; }
  .header-contact { font-size: 13px; padding: 0 14px; min-height: 40px; gap: 6px; }
  .hero { grid-template-columns: 1fr 1fr; gap: 20px; padding-block: 35px; }
  .hero-name, .hero-skeleton-name { font-size: clamp(46px, 8.3vw, 64px); margin-block: 14px; }
  .availability { font-size: 12px; }
  .hero-role { font-size: 18px; }
  .hero-intro { font-size: 14.5px; }
  .hero-actions { gap: 14px; margin-top: 20px; }
  .hero-actions .button { padding: 0 16px; min-height: 44px; }
  .portrait-stage { aspect-ratio: .92; }
  .portrait-person { width: 115%; left: -7.5%; top: 3%; }
  .portrait-index { top: 18px; left: 16px; font-size: 10px; }
  .portrait-change { top: 14px; right: 14px; width: 34px; height: 34px; }
  .portrait-meta { min-height: 38px; padding: 7px 10px; font-size: 12px; gap: 6px; }
  .proof { grid-template-columns: 1fr 1fr 1fr; row-gap: 15px; padding: 15px 0; }
  .proof-source { grid-column: 1/-1; }
  .proof-source > span:last-child { display: flex; gap: 8px; align-items: baseline; }
  .proof-source strong { font-size: 13px; margin: 0; }
  .metric { padding-left: 14px; }
  .metric:nth-child(2) { border: 0; padding-left: 0; }
  .metric dt { font-size: 12px; }
  .section-line { gap: 17px; margin-bottom: 24px; }
  .project-grid { gap: 22px 15px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .showroom-grid { grid-template-columns: 1fr; gap: 18px; }
  .deck-list-wrap { order: -1; min-width: 0; }
  .deck-list-head { padding: 0 0 10px; border-bottom: 0; }
  .deck-list { display: flex; gap: 10px; max-height: none; overflow-x: auto; overflow-y: hidden; padding: 2px 2px 10px; scroll-snap-type: x mandatory; }
  .deck-option { flex: 0 0 auto; flex-direction: column; align-items: flex-start; gap: 8px; width: 156px; padding: 8px; border: 1px solid #484a42; border-radius: 10px; scroll-snap-align: start; }
  .deck-option img { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .deck-option > .icon { display: none; }
  .deck-option > span { font-size: 13px; }
  .about { gap: 30px; grid-template-columns: 1fr 1fr; }
  .process-steps { grid-template-columns: 1fr; margin-top: 20px; }
  .process-steps li { padding: 0 0 24px 26px; border-top: 0; border-left: 2px solid var(--line); }
  .process-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
  .process-steps li::before { top: 0; left: -7px; }
  .case-bar { grid-template-columns: auto auto; justify-content: space-between; min-height: 58px; }
  .case-bar-title { display: none; }
  .case-facts { grid-template-columns: 1fr 1fr; }
  .case-facts > div:last-child { grid-column: 1 / -1; }
}
/* The full navigation needs about 1080px (longer in English); below that the menu sheet takes over. */
@media (max-width: 1080px) {
  .nav-row { grid-template-columns: 1fr auto; column-gap: 0; }
  .main-nav, .header-actions > .lang-switch, .header-actions > .theme-control { display: none; }
  .menu-toggle { display: inline-flex; width: 42px; height: 42px; }
}
@media (min-width: 1081px) {
  .menu-sheet { display: none !important; }
}
@media (max-width: 600px) {
  .credential-grid, .credential-card { grid-template-columns: 1fr; }
  .credential-art { height: 178px; }
  .credential-info { padding: 17px 19px; }
  .portrait-hint { right: 12px; bottom: 10px; font-size: 12px; }
  .hero { grid-template-columns: 1fr; gap: 29px; padding-top: 30px; padding-bottom: 30px; }
  .hero-name, .hero-skeleton-name { font-size: clamp(46px, 15.4vw, 80px); margin: 13px 0 15px -.045em; }
  .availability { font-size: 12.5px; }
  .hero-role { font-size: 20px; }
  .hero-intro { max-width: 42ch; margin-top: 8px; font-size: 15px; }
  .hero-actions { gap: 21px; margin-top: 18px; }
  .portrait-card { border-radius: 12px; }
  .portrait-stage { aspect-ratio: 1.48; }
  .portrait-person { width: 75%; left: 12.5%; top: -6%; }
  .portrait-meta { font-size: 11.5px; min-height: 38px; padding-inline: 12px; }
  .portrait-index { font-size: 10px; }
  .proof { column-gap: 5px; padding: 14px 0 17px; }
  .metric dt { font-size: 12px; line-height: 1.35; margin-top: 2px; }
  .metric dd { font-size: 26px; }
  .metric { padding-left: 10px; }
  .section { padding-block: 52px; }
  .section h2, .contact h2 { font-size: clamp(36px, 9.4vw, 52px); }
  .section-line { align-items: flex-start; flex-direction: column; }
  .filters button { min-height: 40px; padding: 6px 15px; font-size: 13.5px; }
  .project-grid { grid-template-columns: 1fr; gap: 32px; }
  .project-info { padding-top: 13px; }
  .tech-tags { margin-top: 9px; }
  .section-note { font-size: 12px; }
  .showroom .section-line { gap: 10px; margin-bottom: 20px; }
  .deck-caption { margin-top: 15px; align-items: flex-start; flex-direction: column; }
  .deck-caption h3 { font-size: 22px; }
  .deck-desc { font-size: 13.5px; }
  .deck-strip { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
  .about { grid-template-columns: 1fr; }
  .about-lead { margin-top: 16px; }
  .contact-panel { padding: 26px 20px; gap: 26px; }
  .contact-ornament i { width: 80%; left: -69%; opacity: .5; }
  .contact-ornament i:nth-child(2) { left: -62%; }
  .contact-ornament i:nth-child(3) { left: -55%; }
  .brief { padding: 16px; }
  .brief-actions { flex-direction: column; }
  .contact-links { gap: 4px; font-size: 12.5px; }
  .copy-btn { padding-left: 8px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-clock { grid-column: 1 / -1; }
  .footer-base { font-size: 12.5px; }
  .footer-col a { min-height: 40px; }
  .viewer, .film-dialog { width: calc(100% - 16px); border-radius: 12px; max-height: 95dvh; }
  .viewer-bottom { align-items: flex-start; flex-direction: column; gap: 8px; }
  #view-caption { text-align: left; }
  .viewer-stage { height: min(44dvh, 320px); }
  .viewer-stage.portrait { height: 50dvh; }
  .case-facts { grid-template-columns: 1fr; }
  .case-results { grid-template-columns: 1fr; }
  .case-results div { padding: 16px 0; border-left: 0; border-top: 1px solid var(--line); }
  .case-results div:first-child { border-top: 0; }
  .case-section p, .case-section li { font-size: 16px; }
  .case-next { grid-template-columns: 1fr; min-height: 180px; }
  .case-gallery-head .case-strip-nav { display: none; }
  .lang-suggest { left: 12px; right: 12px; max-width: none; flex-wrap: wrap; }
}
@media (max-width: 380px) {
  .header-actions { gap: 5px; }
  .header-contact { width: 42px; min-height: 42px; padding: 0; }
  .header-contact .contact-short, .header-contact .contact-arrow { display: none; }
  .header-contact .contact-compact { display: inline-block; width: 16px; height: 16px; }
}
@media (max-width: 350px) {
  .brand { width: 90px; }
}
@media (min-width: 601px) and (max-width: 1020px) {
  .hero-name { font-size: min(7.8vw, 18cqw); }
}
@media (min-width: 601px) and (max-width: 760px) {
  .portrait-layer { mask-image: none; }
}
@media (max-height: 540px) and (orientation: landscape) {
  .viewer-stage, .viewer-stage.portrait { height: 44dvh; }
  .viewer-shell { padding: 10px; }
  .viewer-top { margin-bottom: 6px; }
  .viewer-bottom { padding-block: 6px; }
  .thumbs { display: none; }
}

/* ---------- Scroll reveal ----------
   Content arrives in the page's own language: headings settle like ink (rise, blur to sharp),
   artwork prints top to bottom in steps (the hero poster's move), lists follow in order, and the
   process line draws itself. Nothing is hidden until app.js marks the page .reveal-ready, and
   anything already on screen at that moment stays put. */
.reveal-ready [data-reveal]:not(.is-revealed) { opacity: 0; transform: translateY(16px); }
.reveal-ready [data-reveal=heading]:not(.is-revealed) { transform: translateY(24px); filter: blur(6px); }
.reveal-ready [data-reveal=print]:not(.is-revealed) { opacity: 1; transform: none; clip-path: inset(0 0 100% 0); }
.reveal-ready [data-reveal=draw]:not(.is-revealed) { opacity: 1; transform: none; }
.reveal-ready [data-reveal].is-revealed {
  transition: opacity .6s var(--ease-out) var(--reveal-delay, 0ms), transform .85s var(--ease-out) var(--reveal-delay, 0ms), filter .6s var(--ease-out) var(--reveal-delay, 0ms);
}
.reveal-ready [data-reveal=print].is-revealed { clip-path: inset(0 0 0 0); transition: clip-path .64s steps(10, end) var(--reveal-delay, 0ms); }
/* The process line draws left to right; each pixel marker lands as the line reaches it. */
.process-steps li:nth-child(1) { --step: 0; }
.process-steps li:nth-child(2) { --step: 1; }
.process-steps li:nth-child(3) { --step: 2; }
.process-steps li::before { z-index: 1; transform-origin: center; }
.process-steps li::after { content: ''; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--paper); transform-origin: right; transform: scaleX(0); pointer-events: none; }
.reveal-ready .process[data-reveal]:not(.is-revealed) .process-steps li::after { transform: scaleX(1); }
.reveal-ready .process[data-reveal]:not(.is-revealed) .process-steps li::before { transform: scale(0); }
.reveal-ready .process[data-reveal]:not(.is-revealed) .process-steps li > * { opacity: 0; transform: translateY(12px); }
.reveal-ready .process[data-reveal].is-revealed .process-steps li::after { transition: transform .55s cubic-bezier(.65, 0, .35, 1) calc(var(--step) * 300ms + 120ms); }
.reveal-ready .process[data-reveal].is-revealed .process-steps li::before { transition: transform .24s steps(3, end) calc(var(--step) * 300ms + 60ms); }
.reveal-ready .process[data-reveal].is-revealed .process-steps li > * { transition: opacity .55s var(--ease-out) calc(var(--step) * 300ms + 260ms), transform .8s var(--ease-out) calc(var(--step) * 300ms + 260ms); }
.reveal-ready .process[data-reveal].is-revealed .process-steps li .step-no { transition-delay: calc(var(--step) * 300ms + 160ms); }
@media (max-width: 760px) {
  .process-steps li::after { left: -2px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; transform-origin: bottom; transform: scaleY(0); }
  .reveal-ready .process[data-reveal]:not(.is-revealed) .process-steps li::after { transform: scaleY(1); }
}

/* ---------- Hero placeholder while the portrait decodes ---------- */
.hero-skeleton { display: none; }
.hero[aria-busy=true] > .hero-skeleton { display: contents; }
.hero[aria-busy=true] > :is(.hero-copy, .portrait-card) { display: none; }
.hero .hero-skeleton .skeleton-block { display: block; border-radius: 4px; background-color: var(--surface-hover); background-image: linear-gradient(105deg, transparent 25%, color-mix(in srgb, var(--ink) 9%, transparent) 50%, transparent 75%); background-size: 220% 100%; animation: hero-shimmer 1.6s ease-in-out infinite; }
.hero-skeleton .skeleton-kicker { display: grid; align-items: center; height: 1.55rem; }
.hero-skeleton .skeleton-kicker .skeleton-block { width: min(190px, 70%); height: 12px; }
.hero-skeleton-name { display: grid; grid-auto-rows: .92em; align-items: center; }
.hero-skeleton-name .skeleton-block { width: 88%; height: .74em; }
.hero-skeleton-name .skeleton-block + .skeleton-block { width: 49%; }
.hero-skeleton .hero-role { min-height: 1.22em; align-content: center; }
.hero-skeleton .hero-role .skeleton-block { width: min(315px, 85%); height: .75em; }
.hero-skeleton .hero-intro { display: grid; grid-auto-rows: 1.56em; align-items: center; }
.hero-skeleton .hero-intro .skeleton-block { width: 100%; height: .65em; }
.hero-skeleton .hero-intro .skeleton-block:last-child { width: 62%; }
.hero .hero-skeleton .button { width: 126px; border-radius: 999px; }
.hero-skeleton .skeleton-action { width: 80px; height: 13px; }
.hero .hero-skeleton .portrait-card { border-color: var(--line); box-shadow: none; }
.hero .hero-skeleton .portrait-stage { border-radius: 0; }
.hero .hero-skeleton .portrait-meta { background: var(--white); border-top: 1px solid var(--line); }
.hero-skeleton .portrait-meta .skeleton-block { width: min(110px, 35%); height: 8px; }
.hero-skeleton .portrait-meta .skeleton-block + .skeleton-block { width: min(64px, 22%); }
@keyframes hero-shimmer { from { background-position: 160% 0; } to { background-position: -60% 0; } }

/* ---------- Reduced motion: keep state changes, drop travel ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; }
  .case-strip { scroll-behavior: auto; }
  dialog, dialog[open], .menu-sheet, .menu-links a, .lang-suggest { transform: none !important; }
  @starting-style { dialog[open], .menu-sheet, .menu-links a, .lang-suggest { transform: none; } }
  .portrait-reveal { transition: none; }
  .cover-object, .deck-open img, .deck-frame img, .case-shot img, .credential-art img, .button .icon, .text-action .icon, .study-link .icon { transition: none; }
  .nav-indicator, .filter-thumb { transition: opacity .2s; }
  /* Reveals keep a short fade so arrival still reads, without travel, blur or clipping. */
  .reveal-ready [data-reveal]:not(.is-revealed) { transform: none; filter: none; clip-path: none; opacity: 0; }
  .reveal-ready [data-reveal].is-revealed { transition: opacity .3s ease-out; }
  .process-steps li::after { display: none; }
  .reveal-ready .process[data-reveal] .process-steps li::before, .reveal-ready .process[data-reveal] .process-steps li > * { transform: none !important; opacity: 1 !important; transition: none !important; }
}
