/* ============================================================
   STUDIO NULL — fixed, stationary UI over a watercolor field
   ============================================================ */
:root {
  --ink: #f4f2ec;
  --coal: #1b1d22;
  --panel: #f4f3ef;
  --panel-2: #fbfaf7;
  --lav: #e6e9f4;
  --dim: #6d6f75;
  --line: rgba(20, 22, 28, 0.12);
  --accent: #3a63d8;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --pad: clamp(1rem, 2.2vw, 1.8rem);
  --radius: 14px;
  --shadow: 0 22px 55px -22px rgba(30, 45, 90, 0.5);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
  background: #a9c6e6; color: var(--ink); font-family: var(--sans); line-height: 1.4;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--accent); color: #fff; }

/* ---------- BACKGROUND: sky + WebGL canvas ---------- */
.sky { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(180deg, #2f6fd0 0%, #5f9ae2 40%, #a9cbef 74%, #cfe0f5 100%); }
.sky__clouds { position: absolute; inset: -12% -20%;
  background-image:
    radial-gradient(closest-side, rgba(255,255,255,.9), rgba(255,255,255,0) 70%),
    radial-gradient(closest-side, rgba(255,255,255,.75), rgba(255,255,255,0) 70%),
    radial-gradient(closest-side, rgba(255,255,255,.65), rgba(255,255,255,0) 70%),
    radial-gradient(closest-side, rgba(255,255,255,.8), rgba(255,255,255,0) 70%),
    radial-gradient(closest-side, rgba(255,255,255,.6), rgba(255,255,255,0) 70%);
  background-repeat: no-repeat;
  background-size: 46% 26%, 34% 20%, 40% 22%, 28% 16%, 52% 30%;
  background-position: 8% 16%, 60% 9%, 84% 24%, 38% 26%, 22% 4%;
  filter: blur(5px); opacity: .92; animation: drift 140s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(7%); } }
.scene { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; }
.scene__wash { position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0) 62%, rgba(18,34,14,0.12) 100%); }

/* ---------- GRAIN + CURSOR ---------- */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%; pointer-events: none; z-index: 60; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.6s steps(3) infinite; mix-blend-mode: overlay;
}
@keyframes grain { 0%{transform:translate(0,0)}33%{transform:translate(-3%,2%)}66%{transform:translate(2%,-3%)}100%{transform:translate(0,0)} }
/* custom cursor disabled — using the normal system cursor */
.cursor { display: none !important; }

/* ---------- ENTER LOADER ---------- */
.loader { position: fixed; inset: 0; z-index: 100;
  background: linear-gradient(180deg, #4d84d8 0%, #7ba7e4 46%, #dce9f6 100%);
  transition: transform 1.15s var(--ease), opacity .6s ease .55s; overflow: hidden; }
.loader.is-gone { transform: translateY(-101%); pointer-events: none; }
.loader__grain { position: absolute; inset: 0; opacity: .38; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.loader__count { position: absolute; top: var(--pad); left: var(--pad); font-family: var(--serif); font-weight: 300;
  color: #fff; font-size: clamp(2rem, 6vw, 4rem); line-height: .8; font-variant-numeric: tabular-nums; transition: opacity .4s ease; }
.loader__count::after { content: "%"; font-size: .5em; vertical-align: super; opacity: .7; }
.loader.is-ready .loader__count { opacity: 0; }
.loader__enter { position: absolute; left: var(--pad); bottom: var(--pad); display: flex; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; max-width: 60vw; opacity: 0; transform: translateY(8px);
  transition: opacity .6s var(--ease), transform .6s var(--ease); }
.loader.is-ready .loader__enter { opacity: 1; transform: none; }
.loader__go { font-family: var(--serif); color: #fff; text-transform: uppercase; letter-spacing: .04em;
  font-size: clamp(1.4rem, 3vw, 2.4rem); line-height: 1; border-bottom: 1px solid rgba(255,255,255,.7); padding-bottom: 2px; transition: border-color .3s, opacity .3s; }
.loader__go--muted { font-family: var(--sans); font-size: .72rem; letter-spacing: .1em; line-height: 1.3;
  border-bottom: none; opacity: .82; align-self: center; text-align: left; }
.loader__go--muted:hover { opacity: 1; }
.loader__slash { color: rgba(255,255,255,.6); font-size: 1.4rem; align-self: center; }
.loader__cookie { flex-basis: 100%; margin-top: 1.4rem; color: rgba(255,255,255,.72);
  font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.7; }

/* ---------- BRAND TAGLINE ---------- */
.brandline { display: flex; flex-direction: column; text-align: right; font-family: var(--serif);
  text-transform: uppercase; letter-spacing: .02em; line-height: .98; color: #fff; font-weight: 400;
  font-size: clamp(1.05rem, 2.4vw, 2.1rem); text-shadow: 0 2px 22px rgba(20, 40, 30, .35); }
.brandline__meta { font-family: var(--sans); font-size: .56rem; letter-spacing: .16em; margin-top: .5rem; opacity: .9; text-transform: uppercase; }
.brandline--loader { position: absolute; right: var(--pad); bottom: var(--pad); }
.brandline--corner { position: fixed; right: var(--pad); bottom: var(--pad); z-index: 12; pointer-events: none; }

/* ---------- FIXED UI SHELL ---------- */
.os { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.os > * { pointer-events: auto; }

/* white left rail column (like the reference d-nav) */
.rail { position: fixed; left: 0; top: 0; width: 54px; height: 100vh; z-index: 22;
  background: #fff; border-right: 1px solid rgba(20,22,28,.08); }

.smiley { position: fixed; top: 8px; left: 8px; z-index: 30; width: 38px; height: 38px;
  border-radius: 50%; background: var(--coal); display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); }
.smiley span { transform: rotate(90deg); font-family: var(--sans); font-size: .8rem; letter-spacing: -.05em; }

.railnav { position: fixed; left: 0; width: 54px; top: 50%; transform: translateY(-50%); z-index: 30;
  display: flex; flex-direction: column; align-items: center; gap: clamp(1.6rem, 6vh, 3.2rem); }
.railnav__item { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .18em; font-size: .68rem; color: var(--coal); position: relative; padding: .55rem 0; }
.railnav__item::before { content: ""; position: absolute; left: 50%; bottom: calc(-1 * clamp(.8rem, 3vh, 1.6rem) / 2);
  transform: translateX(-50%); width: 12px; height: 1px; background: rgba(20,22,28,.22); }
.railnav__item:last-child::before { display: none; }
.railnav__item::after { content: ""; position: absolute; left: -4px; top: 0; height: 100%; width: 1px; background: currentColor;
  transform: scaleY(0); transform-origin: bottom; transition: transform .4s var(--ease); }
.railnav__item:hover::after, .railnav__item.is-active::after { transform: scaleY(1); transform-origin: top; }

.eq { position: fixed; left: 0; width: 54px; bottom: 16px; z-index: 30; display: flex;
  justify-content: center; align-items: flex-end; gap: 3px; height: 16px; }
.eq i { width: 3px; background: var(--coal); height: 40%; border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2){animation-delay:.18s} .eq i:nth-child(3){animation-delay:.36s} .eq i:nth-child(4){animation-delay:.1s}
.eq.is-muted i { animation-play-state: paused; height: 30%; opacity: .5; }
@keyframes eq { 0%,100%{height:25%} 50%{height:100%} }

/* ---------- WINDOW CHROME ---------- */
.win { position: fixed; z-index: 25; background: var(--panel-2); color: var(--coal);
  border: 1px solid rgba(255,255,255,.6); border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(.99); pointer-events: none;
  transition: opacity .4s var(--ease), transform .4s var(--ease); overflow: hidden; }
.win.is-open { opacity: 1; transform: none; pointer-events: auto; }
.win__bar { display: flex; align-items: center; justify-content: space-between; padding: .6rem .85rem; user-select: none; }
.win__title { font-size: .68rem; text-transform: none; letter-spacing: .01em; color: var(--coal); font-weight: 500; }
.win__dots { display: flex; gap: 6px; }
.win__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(20,22,28,.14); transition: background .25s; }
.win:hover .win__dots i:first-child { background: #d7d9e0; }
.win:hover .win__dots i:last-child { background: #d7d9e0; }
.win__body { padding: 0 .85rem .85rem; }

/* ---------- TOP-LEFT: Project gallery ---------- */
.win--gallery { top: 8px; left: 72px; width: min(560px, 46vw); }
.pgal { background: var(--panel-2); border-radius: 10px; padding: 1rem 1rem clamp(2.5rem, 7vh, 4.5rem); }
.pgal__card { position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 16px 36px -16px rgba(20,30,70,.4);
  aspect-ratio: 16 / 10; transition: opacity .35s var(--ease); }
.pgal__media { position: absolute; inset: 0; background-size: cover; background-position: center; overflow: hidden; }
.pgal__media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pgal__brand { position: absolute; top: 12px; left: 14px; z-index: 2; font-family: var(--serif);
  font-size: 1rem; color: #fff; mix-blend-mode: difference; letter-spacing: .01em; }
.pgal__menu { position: absolute; top: 12px; right: 14px; z-index: 2; color: #fff; mix-blend-mode: difference; opacity: .9; }
.pgal__scrub { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 2; height: 3px; border-radius: 3px; background: rgba(255,255,255,.35); }
.pgal__scrub span { display: block; height: 100%; width: 38%; border-radius: 3px; background: #fff; }
.gallery__foot { display: flex; align-items: center; gap: .7rem; padding-top: .85rem; }
.gallery__name { font-family: var(--serif); font-size: 1.15rem; border-bottom: 1px solid var(--line); }
.gallery__nav { display: flex; align-items: center; gap: .35rem; margin-left: auto; font-size: .66rem;
  letter-spacing: .06em; color: var(--dim); font-variant-numeric: tabular-nums; }
.gallery__all { font-size: .62rem; text-transform: none; letter-spacing: .01em; border: 1px solid var(--line);
  border-radius: 20px; padding: .5rem .95rem; transition: background .3s, color .3s; }
.gallery__all:hover { background: var(--coal); color: #fff; }

/* ---------- TOP-RIGHT: Null address ---------- */
/* right-hand stacked column: Get in touch → About me → Tech stack */
.rightstack { position: fixed; top: 8px; right: calc(var(--pad) + 28px); z-index: 25;
  width: 206px; display: flex; flex-direction: column; gap: .6rem; }
.rightstack .win { position: static; width: 100%; }
.win--address { width: 100%; }

.aboutbtn { display: flex; align-items: center; justify-content: space-between;
  background: var(--coal); color: #fff; border-radius: var(--radius);
  padding: .8rem 1rem; box-shadow: var(--shadow);
  transition: background .3s var(--ease), transform .3s var(--ease); }
.aboutbtn:hover { background: #2b2f38; transform: translateY(-1px); }
.aboutbtn__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.aboutbtn__arrow { font-size: .8rem; opacity: .8; }

.stack { list-style: none; display: flex; flex-direction: column; gap: .1rem; }
.stack__item { display: flex; align-items: center; gap: .5rem; font-size: .72rem;
  color: #3a3c42; padding: .3rem 0; }
.stack__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--coal));
  flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(255,255,255,.9); }
.win__body--social { display: flex; gap: .4rem; }
.win__body--social a { flex: 1; text-align: center; font-size: .68rem; letter-spacing: .04em;
  border: 1px solid var(--line); border-radius: 9px; padding: .6rem 0; transition: background .3s, color .3s; }
.win__body--social a:hover { background: var(--coal); color: #fff; }

/* ---------- BOTTOM-LEFT DOCK (free-standing tiles) ---------- */
.dock { position: fixed; left: calc(var(--pad) + 52px); bottom: calc(var(--pad) - 2px); z-index: 30;
  display: flex; align-items: flex-start; gap: clamp(1rem, 2.2vw, 1.8rem); }
.dock__btn { display: flex; flex-direction: column; align-items: center; gap: .5rem; width: 62px; }
.dock__tile { position: relative; width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1.5px solid rgba(255,255,255,.35); backdrop-filter: blur(8px);
  color: #fff; transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease); }
.dock__btn:hover .dock__tile { border-color: #fff; transform: translateY(-2px); }
.dock__btn.is-open .dock__tile { background: #fff; border-color: #fff; color: var(--coal); }
.dock__tile--radio { background: linear-gradient(135deg, #1db954, #7de0a0); border-color: rgba(255,255,255,.5); }
.dock__tile--flies { background: linear-gradient(135deg, #4f7dff, #b98bff); border-color: rgba(255,255,255,.5); }
.dock__ico { width: 24px; height: 24px; display: block; background: currentColor;
  -webkit-mask: center/contain no-repeat; mask: center/contain no-repeat; }
.dock__btn.is-open .dock__ico { display: none; }
.dock__close { display: none; }
.dock__btn.is-open .dock__close { display: block; color: var(--coal); }
.dock__ico[data-ico="gallery"]{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='black'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1' fill='black'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1' fill='black'/%3E%3C/svg%3E"); }
.dock__ico[data-ico="reel"]{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9l5 3-5 3z' fill='black'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='5' width='18' height='14' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M10 9l5 3-5 3z' fill='black'/%3E%3C/svg%3E"); }
.dock__ico[data-ico="radio"]{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10c3-1 6-.5 8 1M8 13c2.5-.7 5-.3 6.5.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 10c3-1 6-.5 8 1M8 13c2.5-.7 5-.3 6.5.8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
.dock__ico[data-ico="flies"]{ -webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c-1-4-4-6-7-5-2 .7-2 4 0 5 2 1 5 1 7 0zm0 0c1-4 4-6 7-5 2 .7 2 4 0 5-2 1-5 1-7 0zm0 0c-1 3-3 5-5 5-1.5 0-2-2-1-3 1.5-1.5 4-2 6-2zm0 0c1 3 3 5 5 5 1.5 0 2-2 1-3-1.5-1.5-4-2-6-2z' fill='black'/%3E%3C/svg%3E"); mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12c-1-4-4-6-7-5-2 .7-2 4 0 5 2 1 5 1 7 0zm0 0c1-4 4-6 7-5 2 .7 2 4 0 5-2 1-5 1-7 0zm0 0c-1 3-3 5-5 5-1.5 0-2-2-1-3 1.5-1.5 4-2 6-2zm0 0c1 3 3 5 5 5 1.5 0 2-2 1-3-1.5-1.5-4-2-6-2z' fill='black'/%3E%3C/svg%3E"); }
.dock__label { font-size: .6rem; letter-spacing: .02em; color: #fff; text-shadow: 0 1px 8px rgba(20,30,20,.5); }

/* ---------- WORK OVERLAY ---------- */
.work { position: fixed; z-index: 40; inset: var(--pad); display: grid; grid-template-columns: minmax(320px, 40%) 1fr;
  gap: var(--pad); opacity: 0; pointer-events: none; transform: scale(.99); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.work.is-open { opacity: 1; pointer-events: auto; transform: none; }
.work__list, .work__preview { background: var(--panel); border-radius: var(--radius); color: var(--coal);
  box-shadow: 0 30px 70px -24px rgba(20,40,90,.55); overflow: hidden; }
.work__list { display: flex; flex-direction: column; padding: clamp(1.2rem, 2.4vw, 2rem); }
.work__head { position: relative; }
.work__head h2 { font-family: var(--serif); font-weight: 400; text-transform: uppercase; font-size: clamp(1.6rem, 3.4vw, 2.6rem); line-height: .95; letter-spacing: .01em; }
.work__head h2 span { color: var(--dim); }
.work__floral { position: absolute; top: -6px; right: -6px; width: 46%; height: 90px; opacity: .5;
  background: no-repeat right top / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 90'%3E%3Cg fill='none' stroke='%238a9a6a' stroke-width='1.4'%3E%3Cpath d='M195 12 C150 20 120 40 90 78'/%3E%3Cpath d='M150 22 c-8 -6 -18 -4 -20 4 c8 4 16 2 20 -4z'/%3E%3Cpath d='M120 40 c-8 -6 -18 -4 -20 4 c8 4 16 2 20 -4z'/%3E%3Cpath d='M170 16 c6 -7 16 -7 20 0 c-8 5 -16 4 -20 0z'/%3E%3C/g%3E%3C/svg%3E"); }
.work__intro { font-family: var(--body); font-size: .84rem; line-height: 1.5; color: #3a3c42; max-width: 44ch; margin: clamp(1.2rem, 3vw, 2.2rem) 0 1.2rem; }
.work__filters { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.work__filters button { font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; border: 1px solid var(--line); border-radius: 20px; padding: .4rem .8rem; color: #3a3c42; transition: background .25s, color .25s; }
.work__filters button.is-active { background: var(--coal); color: #fff; border-color: var(--coal); }
.work__rows { flex: 1; overflow-y: auto; margin: 0 calc(-1 * clamp(1.2rem, 2.4vw, 2rem)); padding: 0 clamp(1.2rem, 2.4vw, 2rem); }
.work__rows::-webkit-scrollbar { width: 6px; }
.work__rows::-webkit-scrollbar-thumb { background: rgba(20,22,28,.18); border-radius: 4px; }
.wrow { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start; padding: 1.1rem 0; border-top: 1px solid var(--line); }
.wrow__thumb { width: 64px; height: 64px; border-radius: 8px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.6rem; color: #fff; overflow: hidden; }
.wrow__title { font-size: .92rem; font-weight: 500; }
.wrow__desc { font-family: var(--body); font-size: .76rem; color: #52545a; line-height: 1.45; margin: .25rem 0 .5rem; }
.wrow__live { font-size: .62rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.wrow__live:hover { color: var(--coal); }
.work__preview { display: flex; flex-direction: column; background: #fff; }
.work__preview .win__bar { border-bottom: 1px solid var(--line); }
.work__previewBody { flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; }
.work__hint { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: #a9abb0; position: absolute; bottom: 1.2rem; left: 1.4rem; }
.work__previewShot { position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease); }
.work__previewShot.is-show { opacity: 1; }
.work__previewShot .pv__title { position: absolute; left: 1.6rem; bottom: 1.4rem; font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 3rem); color: #fff; z-index: 2; mix-blend-mode: difference; }
.panel__close { position: absolute; top: calc(var(--pad) + 8px); right: calc(var(--pad) + 14px); z-index: 3; font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--coal); background: #fff; border-radius: 20px; padding: .5rem .9rem; box-shadow: 0 6px 18px -6px rgba(0,0,0,.4); }

/* ---------- STUDIO + CONTACT OVERLAYS ---------- */
.studio, .contact { position: fixed; z-index: 40; inset: var(--pad); background: var(--coal); color: var(--ink);
  border-radius: var(--radius); display: grid; place-items: center; padding: var(--pad);
  opacity: 0; pointer-events: none; transform: scale(.99); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.studio.is-open, .contact.is-open { opacity: 1; pointer-events: auto; transform: none; }
.studio__inner, .contact__inner { width: min(1000px, 92%); }
.contact__label { font-size: .66rem; text-transform: uppercase; letter-spacing: .16em; color: var(--dim); margin-bottom: 1.5rem; }
.studio__body { font-family: var(--serif); font-weight: 300; font-size: clamp(1.8rem, 4.6vw, 3.6rem); line-height: 1.08; letter-spacing: -.01em; max-width: 22ch; }
.studio__body em { font-style: italic; }
.contact__mail { display: inline-block; font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 8vw, 6rem); line-height: .95; letter-spacing: -.02em; margin-bottom: 2.5rem; transition: color .3s; word-break: break-word; }
.contact__mail:hover { color: #7ea0ff; }
.contact__grid { display: flex; gap: 4rem; flex-wrap: wrap; }
.contact__grid h4 { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); margin-bottom: .8rem; }
.contact__grid p { font-family: var(--serif); font-size: 1.1rem; line-height: 1.5; }
.studio__note { font-family: var(--body); font-size: .95rem; line-height: 1.6; color: #b9bcc4;
  max-width: 60ch; margin: -1rem 0 2rem; }
.stats { display: flex; gap: clamp(2rem, 6vw, 5rem); flex-wrap: wrap;
  margin-top: clamp(2rem, 5vw, 3.2rem); padding-top: clamp(1.4rem, 3vw, 2rem);
  border-top: 1px solid rgba(244,242,236,.14); }
.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat__num { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1; }
.stat__label { font-size: .62rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.contact__social { display: flex; flex-direction: column; gap: .3rem; }
.contact__social a { color: var(--ink); opacity: .75; transition: opacity .3s; }
.contact__social a:hover { opacity: 1; }
.studio .panel__close, .contact .panel__close { color: var(--coal); }

/* ---------- TABLET ---------- */
@media (max-width: 1024px) and (min-width: 821px) {
  .win--gallery { width: min(46vw, 430px); }
  .rightstack { width: 186px; }
}

/* ============================================================
   MOBILE — the fixed desktop layout can't fit, so the windows
   become a single scrolling column beside the white rail.
   ============================================================ */
@media (max-width: 820px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; overflow-y: auto; }
  body { -webkit-text-size-adjust: 100%; }

  /* background stays put while the column scrolls */
  .sky, .scene, .scene__wash { position: fixed; height: 100dvh; }

  /* slim white rail */
  .rail { width: 46px; height: 100dvh; }
  .smiley { width: 32px; height: 32px; top: 7px; left: 7px; }
  .smiley span { font-size: .7rem; }
  .railnav { width: 46px; gap: clamp(1rem, 4vh, 1.8rem); }
  .railnav__item { font-size: .58rem; letter-spacing: .14em; padding: .45rem 0; }
  .eq { width: 46px; bottom: 10px; }

  /* the OS layer becomes a normal flowing column.
     NOTE: keep it *relative*, not static — static drops its z-index and the
     windows' in-flow content would paint behind the fixed background canvas. */
  .os { position: relative; inset: auto; z-index: 20;
    padding: 10px 12px calc(18px + env(safe-area-inset-bottom)) 58px; }
  .win, .rightstack { position: relative; z-index: 1; width: 100%; max-width: none;
    transform: none; margin: 0 0 10px;
    /* clear the desktop offsets — on a relative box they'd shift the window */
    top: auto; left: auto; right: auto; bottom: auto; }
  .win.is-open { transform: none; }
  .win:not(.is-open) { display: none; }
  .rightstack { display: flex; flex-direction: column; gap: 10px; }
  .pgal { padding: .7rem .7rem 1.4rem; }
  .gallery__foot { flex-wrap: wrap; gap: .5rem; }
  .gallery__name { font-size: 1rem; }
  .gallery__all { padding: .45rem .8rem; }
  .stack__item { font-size: .78rem; padding: .38rem 0; }
  .aboutbtn { padding: .85rem 1rem; }

  /* tagline sits at the end of the column, not pinned */
  .brandline--corner { position: static; text-align: left; font-size: 1.35rem;
    margin: .4rem 0 0; pointer-events: auto; }
  .brandline--loader { font-size: 1.35rem; }

  /* dock flows inline (a fixed dock would sit on top of the tagline) */
  .dock { position: relative; z-index: 1; left: auto; right: auto; bottom: auto;
    transform: none; justify-content: flex-start; gap: 1.5rem;
    margin: 2px 0 12px; padding: 0; }
  .dock__tile { width: 46px; height: 46px; border-radius: 12px; }
  .dock__ico { width: 21px; height: 21px; }
  .dock__label { font-size: .55rem; }

  /* panels: full-screen and scrollable */
  .work, .studio, .contact { inset: 8px 8px 8px 54px; }
  .work { grid-template-columns: 1fr; grid-template-rows: 1fr; }
  .work__preview { display: none; }
  .work__list { padding: 1.1rem; }
  .work__intro { font-size: .8rem; margin: 1rem 0 .9rem; }
  .wrow { grid-template-columns: 52px 1fr; gap: .8rem; padding: .9rem 0; }
  .wrow__thumb { width: 52px; height: 52px; }
  .contact { overflow-y: auto; place-items: start; padding: 2.4rem 1.2rem; }
  .contact__inner { width: 100%; }
  .contact__mail { font-size: clamp(1.05rem, 5.4vw, 1.8rem); line-height: 1.15;
    margin-bottom: 1.4rem; word-break: normal; overflow-wrap: anywhere; }
  .studio__note { font-size: .85rem; margin: 0 0 1.6rem; }
  .contact__grid { gap: 1.8rem; }
  .stats { gap: 1.8rem; margin-top: 1.8rem; padding-top: 1.2rem; }
  .stat__num { font-size: 2rem; }
  .panel__close { top: 10px; right: 10px; padding: .5rem .8rem; }

  /* loader */
  .loader__enter { max-width: calc(100vw - 2 * var(--pad)); }
  .loader__go { font-size: 1.5rem; }
}

/* very narrow phones */
@media (max-width: 400px) {
  .os { padding-right: 8px; }
  .win__body--social { flex-wrap: wrap; }
  .win__body--social a { flex: 1 1 30%; }
  .brandline--corner { font-size: 1.15rem; }
  .dock { gap: 1.1rem; }
}

/* short landscape phones */
@media (max-height: 460px) and (max-width: 900px) {
  .railnav { gap: .7rem; }
  .railnav__item { font-size: .54rem; }
}

@media (prefers-reduced-motion: reduce) { *, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
