:root {
  --bg: #0a0a0b;
  --bg-2: #101012;
  --ink: #f2efe9;
  --ink-soft: #c9c5bd;
  --muted: #8e8b85;
  --muted-2: #5c5a55;
  --line: rgba(242, 239, 233, 0.1);
  --line-soft: rgba(242, 239, 233, 0.05);
  --accent: #9bcfa5;
  --disp: "Archivo", "Arial Black", sans-serif;
  --sans: "Space Grotesk", "Helvetica Neue", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", monospace;
  --pad-x: 3vw;
  --nm: clamp(4.4rem, 10vw, 10.8rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.js { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--bg); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0.01em; }

:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232325; border-radius: 5px; border: 2px solid var(--bg); }

.skip-link {
  position: fixed; top: -100px; left: var(--pad-x); z-index: 500;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--ink); color: var(--bg); padding: 0.7rem 1.1rem;
  transition: top 0.3s var(--ease-out);
}
.skip-link:focus-visible { top: 0; }

.slash { color: var(--accent); margin: 0 0.55em; font-style: normal; }

.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem var(--pad-x);
}
.site-head::before {
  content: ""; position: absolute; inset: 0 0 -40%; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 10, 11, 0.85), rgba(10, 10, 11, 0));
}
.site-head > * { position: relative; }
.brand {
  font-family: var(--mono); font-size: 0.84rem; font-weight: 500; letter-spacing: 0.08em;
  display: inline-flex; align-items: baseline; gap: 0.45em;
}
.brand-dot { width: 6px; height: 6px; background: var(--accent); display: inline-block; }
.site-nav { display: flex; gap: clamp(1.3rem, 2.6vw, 2.8rem); }
.site-nav a {
  position: relative;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 0.3em;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat; background-position: left bottom; background-size: 0% 1px;
  transition: color 0.35s, background-size 0.45s var(--ease-out);
}
.site-nav a sup {
  position: absolute; left: -1.3em; top: -0.1em;
  font-size: 0.56rem; color: var(--accent);
  opacity: 0; transform: translate(7px, 4px);
  transition: opacity 0.3s, transform 0.4s var(--ease-out);
}
.site-nav a:hover { color: var(--ink); background-size: 100% 1px; }
.site-nav a:hover sup { opacity: 1; transform: translate(0, 0); }
.head-resume {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase;
  border: 1px solid var(--line); padding: 0.55rem 1rem; color: var(--muted);
  transition: color 0.35s, border-color 0.35s;
}
.head-resume:hover { color: var(--ink); border-color: rgba(242, 239, 233, 0.4); }

.scene-identity { position: relative; }
.identity-pin { position: relative; }

.hero-stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.hero-stage .layer { position: absolute; inset: 0; pointer-events: none; }

.stage-bg { z-index: 1; }
.stage-bg::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 38% 80%, #121412 0%, var(--bg) 55%);
}
.bg-col { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-soft); }
.reg { position: absolute; font-family: var(--mono); font-size: 0.75rem; color: var(--muted-2); }
.reg-tl { top: 5.2rem; left: var(--pad-x); }
.reg-tr { top: 5.2rem; right: var(--pad-x); }
.reg-bl { bottom: 1.4rem; left: var(--pad-x); }
.reg-br { bottom: 1.4rem; right: var(--pad-x); }

.halo {
  position: absolute; left: 48%; top: 42%; translate: -50% -50%;
  width: min(58vw, 840px); aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(155, 207, 165, 0.06) 0%, rgba(155, 207, 165, 0) 46%),
    radial-gradient(circle, rgba(242, 239, 233, 0.095) 0%, rgba(242, 239, 233, 0) 58%);
  filter: blur(8px);
}
.hero-stage .layer[data-depth="1"] { z-index: 2; }

.hero-name { z-index: 10; }
.nm-stack { position: absolute; left: var(--pad-x); bottom: 16.5svh; display: block; }
.nm-line { display: block; overflow: hidden; padding-bottom: 0.05em; line-height: 0.84; }
.nm-in {
  display: inline-block;
  font-family: var(--disp); font-weight: 900; font-stretch: 125%;
  font-size: var(--nm); line-height: 0.84; letter-spacing: -0.015em;
  background: linear-gradient(180deg, #f7f4ed 0%, #cfcbc2 58%, #8f8b83 105%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nm-line-2 .nm-in { font-size: calc(var(--nm) * 1.16); }
.nm-egg {
  background: linear-gradient(180deg, #c9ead0 0%, #9bcfa5 52%, #618f6b 108%);
  -webkit-background-clip: text; background-clip: text;
  transition: filter 0.3s;
  user-select: none; -webkit-user-select: none;
}
.nm-egg:hover { filter: brightness(1.18); }
.nm-egg:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 8px; }
html.gaming { overflow: hidden; }
.gaming .hm-eyebrow, .gaming .hm-role, .gaming .hm-loc, .gaming .hm-ctas, .gaming .hm-scroll { opacity: 0.16; transition: opacity 0.5s; }
.gaming .hm-data { opacity: 1; }
.gaming .hm-ctas, .gaming .hero-meta { pointer-events: none !important; }
.gaming .site-head { opacity: 0.25; pointer-events: none; transition: opacity 0.5s; }
.egg-layer { position: absolute; inset: 0; z-index: 14; pointer-events: none; }
.egg-runner { position: absolute; top: 0; left: 0; will-change: transform; }
.egg-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.egg-hud {
  position: absolute; left: 50%; bottom: 3.4svh; translate: -50% 0; z-index: 15;
  display: flex; gap: 1.5rem; align-items: baseline;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.14em; color: var(--muted);
  background: rgba(12, 12, 13, 0.88); border: 1px solid var(--line);
  padding: 0.65rem 1.1rem; white-space: nowrap;
}
.egg-hud b { color: var(--accent); font-weight: 500; }
.egg-chip {
  position: absolute; translate: -50% -100%; z-index: 15;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.13em; color: var(--ink);
  background: rgba(12, 12, 13, 0.92); border: 1px solid rgba(155, 207, 165, 0.45);
  padding: 0.45rem 0.7rem; white-space: nowrap;
}
.egg-chip i { color: var(--accent); font-style: normal; margin-right: 0.5em; }
.egg-strip {
  position: absolute; height: 3px; background: var(--accent);
  box-shadow: 0 0 12px rgba(155, 207, 165, 0.7); transform-origin: left center;
}
.dim {
  position: absolute; display: flex; align-items: center; gap: 0.9rem;
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.2em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
}
.dim::before, .dim::after { content: ""; background: var(--line); }
.dim-top { left: 0; right: 0; top: -2.3rem; }
.dim-top::before { flex: 2.4; height: 1px; }
.dim-top::after { flex: 1; height: 1px; }
.dim-right {
  top: 0; bottom: 0; right: -2.1rem;
  writing-mode: vertical-rl; flex-direction: column;
}
.dim-right::before, .dim-right::after { flex: 1; width: 1px; }
.nm-ground {
  position: absolute; top: 100%; left: 0; width: 200vw; height: 1px;
  background: linear-gradient(90deg, rgba(242, 239, 233, 0.22), rgba(242, 239, 233, 0.04) 60%, transparent);
  transform-origin: left center;
}

.portrait-wrap {
  position: absolute;
  left: calc(var(--pad-x) + var(--nm) * 4.2);
  bottom: calc(16.5svh + var(--nm) * 0.93);
  width: calc(var(--nm) * 1.78);
  z-index: 12; pointer-events: none;
}
.portrait { width: 100%; height: auto; }
.portrait-canvas { width: 100%; height: auto; display: block; pointer-events: auto; }

.hero-meta { z-index: 40; }
.hm { position: absolute; }
.hm-eyebrow, .hm-loc {
  top: clamp(4.6rem, 9svh, 6rem);
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase;
}
.hm-eyebrow { left: var(--pad-x); }
.hm-loc { right: var(--pad-x); text-align: right; line-height: 1.9; }
.hm-role { left: var(--pad-x); bottom: 5svh; }
.role-line, .role-sub { overflow: hidden; }
.swap-line { display: inline-block; }
.ch { display: inline-block; }
.ch-em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0.01em; }
.role-sub .ch-em { color: var(--ink); }
.dd-name canvas { width: 173px; height: 22.5px; display: block; margin-left: auto; }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}
.role-line {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em;
  color: var(--muted); text-transform: uppercase; margin-bottom: 0.5rem;
}
.role-sub { font-family: var(--sans); font-weight: 300; font-size: clamp(1.1rem, 1.6vw, 1.45rem); letter-spacing: 0.01em; }
.role-sub em { color: var(--ink); }
.hm-ctas { right: var(--pad-x); bottom: 5svh; display: flex; gap: clamp(1.2rem, 2.2vw, 2.4rem); pointer-events: auto; }
.cta {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.13em; text-transform: uppercase;
  display: inline-flex; align-items: baseline; gap: 0.5em; padding-bottom: 0.35em;
  background-image: linear-gradient(var(--ink), var(--ink));
  background-repeat: no-repeat; background-position: left bottom; background-size: 0% 1px;
  transition: background-size 0.5s var(--ease-out);
}
.cta:hover { background-size: 100% 1px; }
.cta-arr { color: var(--accent); transition: translate 0.4s var(--ease-out); }
.cta:hover .cta-arr { translate: 0.15em -0.1em; }
.hm-data {
  right: var(--pad-x); top: 23svh;
  width: clamp(200px, 17vw, 252px);
  pointer-events: none;
}
.hm-data div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: 0.85rem 0; border-top: 1px solid var(--line);
}
.hm-data dt {
  font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
}
.hm-data dd {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em; color: var(--ink);
  white-space: nowrap;
}
.hm-scroll {
  right: calc(var(--pad-x) + 0.4rem); top: 58svh;
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.3em; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 0.8rem;
  writing-mode: vertical-rl;
}
.scroll-line { width: 1px; height: 44px; background: linear-gradient(var(--muted), transparent); display: block; }
.js:not(.reduced) .scroll-line { animation: scrollPulse 2.6s var(--ease-out) infinite; transform-origin: top; }
@keyframes scrollPulse {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.fig-frame { position: absolute; inset: -1.1rem; border: 1px solid rgba(242, 239, 233, 0.16); display: block; pointer-events: none; }
.pf-c { position: absolute; width: 11px; height: 11px; }
.pf-tl { top: -1px; left: -1px; border-top: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.pf-tr { top: -1px; right: -1px; border-top: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
.pf-bl { bottom: -1px; left: -1px; border-bottom: 1.5px solid var(--ink); border-left: 1.5px solid var(--ink); }
.pf-br { bottom: -1px; right: -1px; border-bottom: 1.5px solid var(--ink); border-right: 1.5px solid var(--ink); }
.fig-tag {
  position: absolute; top: calc(100% + 1.9rem); left: 0;
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em; color: var(--muted);
  white-space: nowrap;
}

.about-panel { position: relative; padding: 16vh var(--pad-x) 18vh; }
.about-figure { position: relative; width: min(64vw, 300px); margin-bottom: 5rem; }
.about-figure img { width: 100%; height: auto; filter: saturate(0.85) contrast(1.02); }
.about-body { max-width: 620px; }
.pin .about-panel {
  position: absolute; inset: 0; z-index: 20; padding: 10vh var(--pad-x) 5vh;
  display: grid; grid-template-columns: 1fr 1.15fr; align-items: center; column-gap: 5vw;
  pointer-events: none;
}
.pin.about-active .about-panel { pointer-events: auto; }
.pin .about-figure {
  justify-self: center; align-self: center; margin: 0;
  height: min(34svh, 330px); width: auto; aspect-ratio: 1016 / 796;
}
.pin .about-figure img { display: none; }
.pin .about-body { max-width: 560px; padding-right: 2vw; }

.sec-label {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.18em;
  color: var(--muted); text-transform: uppercase; margin-bottom: clamp(1.6rem, 3vh, 2.6rem);
  position: relative; width: fit-content;
  border: 1px solid var(--line); padding: 0.55rem 0.95rem;
}
.sec-label::after {
  content: ""; position: absolute; left: 100%; top: 50%;
  width: 36vw; height: 1px; background: var(--line-soft);
}
.js:not(.reduced) .sec-label::after {
  transform: scaleX(0); transform-origin: left center;
  transition: transform 1.3s var(--ease-out) 0.25s;
}
.sec-label.drawn::after { transform: scaleX(1); }
.reduced .sec-label::after { transform: scaleX(1) !important; }
.about-body .sec-label { border: 0; padding: 0; }
.about-body .sec-label::after { display: none; }
.about-title {
  font-family: var(--disp); font-weight: 700; font-stretch: 112%;
  font-size: clamp(2rem, 3.4vw, 3.2rem); line-height: 1.04; letter-spacing: -0.01em;
  margin-bottom: 2.2rem;
}
.about-title em { font-weight: 400; color: var(--ink); }
.about-lead { font-size: clamp(1.08rem, 1.45vw, 1.34rem); line-height: 1.7; color: var(--ink-soft); max-width: 46ch; margin-bottom: 3rem; }
.about-lead em { color: var(--ink); font-size: 1.06em; }
.fact-sub { display: block; margin-top: 0.45rem; font-size: 0.84rem; color: var(--muted); }
.about-facts .fact {
  display: grid; grid-template-columns: minmax(110px, 9rem) 1fr; gap: 1.6rem;
  padding: 1.3rem 0; border-top: 1px solid var(--line);
}
.about-facts dt {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); padding-top: 0.25em;
}
.about-facts dd { font-size: 0.94rem; line-height: 1.65; color: var(--ink-soft); }

.scene { padding: clamp(6rem, 15vh, 10rem) var(--pad-x); position: relative; }
.scene-identity { padding: 0; }
.scene-statement { padding: clamp(8rem, 23vh, 14rem) var(--pad-x) clamp(7rem, 21vh, 13rem); }
.lamp {
  position: absolute; left: var(--pad-x); top: clamp(2.6rem, 8vh, 4.6rem);
  width: min(34rem, 74vw); height: 14rem; pointer-events: none;
}
.lamp-line {
  position: absolute; top: 0; left: 0; width: 100%; height: 2px; display: block;
  background: var(--accent);
  box-shadow: 0 0 22px 3px rgba(155, 207, 165, 0.45), 0 0 60px 10px rgba(155, 207, 165, 0.18);
  transform-origin: center;
}
.lamp-glow {
  position: absolute; top: 2px; left: 8%; width: 84%; height: 9.5rem; display: block;
  background: radial-gradient(50% 58% at 50% 0%, rgba(155, 207, 165, 0.17), transparent 72%);
  filter: blur(13px); transform-origin: center top;
}
.lamp-beam {
  position: absolute; top: 2px; width: 46%; height: 12rem; display: block;
  background: linear-gradient(to bottom, rgba(155, 207, 165, 0.11), transparent 78%);
}
.lamp-beam-l { left: 1%; clip-path: polygon(40% 0, 64% 0, 20% 100%, 0% 100%); }
.lamp-beam-r { right: 1%; clip-path: polygon(36% 0, 60% 0, 100% 100%, 80% 100%); }
.statement {
  font-family: var(--disp); font-weight: 700; font-stretch: 112%;
  font-size: clamp(2.1rem, 4.8vw, 4.4rem); line-height: 1.14; letter-spacing: -0.01em;
  max-width: 24ch; color: var(--ink);
}
.js:not(.reduced) .st-w { color: #45443f; }
.st-serif { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0.005em; }
.reduced .st-accent, .no-js .st-accent { color: var(--accent); }
.scene-contact { padding: clamp(6rem, 16vh, 11rem) var(--pad-x) clamp(4rem, 9vh, 7rem); }

.sec-head { margin-bottom: clamp(3rem, 8vh, 5.5rem); position: relative; }
.sec-ghost {
  position: absolute; right: -1vw; top: -22%; z-index: 0;
  font-family: var(--disp); font-weight: 900; font-stretch: 125%;
  font-size: clamp(8rem, 16vw, 15rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 239, 233, 0.05);
  pointer-events: none; user-select: none;
}
.sec-head .sec-label, .sec-head .sec-title { position: relative; z-index: 1; }
.sec-title {
  font-family: var(--disp); font-weight: 900; font-stretch: 125%;
  font-size: clamp(2.8rem, 8.6vw, 8.6rem); line-height: 0.88; letter-spacing: -0.015em;
  text-transform: uppercase;
}
.sec-title .line { display: block; overflow: hidden; padding-bottom: 0.05em; }
.sec-title .line-in { display: inline-block; }
.line-shift { margin-left: clamp(2rem, 11vw, 11rem); }
.line-shift .line-in { color: transparent; -webkit-text-stroke: 1.5px rgba(242, 239, 233, 0.85); }

.work-wrap { display: grid; grid-template-columns: 1.3fr 0.85fr; gap: clamp(2rem, 4vw, 4.5rem); align-items: start; }

.work-list { list-style: none; }
.work-row { border-top: 1px solid var(--line); }
.work-row:last-child { border-bottom: 1px solid var(--line); }
.work-link {
  position: relative; display: grid;
  grid-template-columns: minmax(4rem, 5.5rem) 1fr minmax(150px, 175px);
  gap: clamp(1.2rem, 2.4vw, 2.4rem); align-items: start;
  padding: clamp(2.2rem, 5vh, 3.2rem) 0.5rem;
}
.work-link::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(242, 239, 233, 0.04), rgba(242, 239, 233, 0) 60%);
  opacity: 0; transition: opacity 0.5s; pointer-events: none;
}
.work-row:hover .work-link::before, .work-row.is-current .work-link::before { opacity: 1; }
.work-no {
  font-family: var(--disp); font-weight: 800; font-stretch: 125%;
  font-size: clamp(1.6rem, 2.4vw, 2.4rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px var(--muted-2);
  transition: color 0.45s, -webkit-text-stroke-color 0.45s;
  padding-top: 0.3rem;
}
.work-row:hover .work-no, .work-row.is-current .work-no { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.work-name {
  font-family: var(--disp); font-weight: 800; font-stretch: 115%;
  font-size: clamp(1.9rem, 3.6vw, 3.6rem); line-height: 0.98; letter-spacing: -0.01em;
  transition: transform 0.55s var(--ease-out);
}
.work-row:hover .work-name, .work-row.is-current .work-name { transform: translateX(0.7rem); }
.work-kicker { font-family: var(--serif); font-style: italic; font-size: clamp(0.95rem, 1.2vw, 1.1rem); color: var(--muted); margin-top: 0.7rem; }
.work-case { font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft); max-width: 54ch; margin-top: 1.3rem; }
.work-spec { margin-top: 1.5rem; max-width: 33rem; }
.work-spec div {
  display: grid; grid-template-columns: minmax(5.4rem, 6.5rem) 1fr; gap: 1.2rem;
  padding: 0.52rem 0; border-top: 1px solid var(--line-soft);
}
.work-spec div:last-child { border-bottom: 1px solid var(--line-soft); }
.work-spec dt {
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); padding-top: 0.18em;
}
.work-spec dd {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-soft);
}
.work-side {
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.55rem;
  text-align: right; height: 100%; padding-top: 0.55rem;
}
.work-year { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--ink-soft); }
.work-status { font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em; color: var(--muted); }
.work-arrow {
  margin-top: auto;
  font-family: var(--disp); font-weight: 700; font-size: 1.7rem; line-height: 1;
  color: var(--accent); opacity: 0; transform: translateX(-10px);
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.work-row:hover .work-arrow, .work-row.is-current .work-arrow { opacity: 1; transform: translateX(0); }

.media-ph {
  position: relative; display: grid; place-items: center;
  background: radial-gradient(80% 110% at 50% 0%, #161a16 0%, #101210 70%);
  border: 1px solid var(--line);
  width: 100%; height: 100%;
}
.ph-mark {
  font-family: var(--disp); font-weight: 900; font-stretch: 125%; font-size: 4rem;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 239, 233, 0.22); line-height: 1;
}
.ph-cap {
  position: absolute; bottom: 0.9rem; left: 0; right: 0; text-align: center;
  font-family: var(--mono); font-size: 0.55rem; letter-spacing: 0.22em; color: var(--muted);
}

.phones {
  display: flex; align-items: center; justify-content: center;
  gap: 4%; padding: 9% 7%;
  width: 100%; height: 100%;
  background: radial-gradient(90% 110% at 50% 0%, #141a14 0%, #0e110e 70%);
}
.phones img {
  width: 29%; height: auto; border-radius: 14px;
  border: 1px solid rgba(242, 239, 233, 0.14);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.55);
}
.phones img:nth-child(2) { transform: translateY(-4%) scale(1.07); position: relative; z-index: 2; }
.phones img:nth-child(3) { transform: translateY(4%); }

.work-panel {
  position: sticky; top: 13vh;
  height: min(70vh, 640px);
  margin-top: 0.5rem;
}
.wp-stage { position: absolute; inset: 0; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line); }
.wp-item { position: absolute; inset: 0; opacity: 0; transform: scale(1.02); transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out); }
.wp-item.is-active { opacity: 1; transform: scale(1); }
.wp-shot { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.15) contrast(1.04); }
.wp-caption {
  position: absolute; top: calc(100% + 1.4rem); left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--muted);
  text-transform: uppercase;
}
.wp-counter span { color: var(--ink); }
#wpName { color: var(--ink); }
.wp-ticks { display: flex; gap: 7px; align-items: center; }
.wp-ticks i {
  width: 14px; height: 1px; background: var(--muted-2); display: block;
  transition: background 0.4s, width 0.4s var(--ease-out);
}
.wp-ticks i.on { background: var(--accent); width: 26px; }

.sys-list { max-width: 1100px; }
.sys-row {
  display: grid; grid-template-columns: minmax(220px, 30%) 1fr;
  gap: 2rem; padding: clamp(1.6rem, 3.4vh, 2.4rem) 0.5rem;
  border-top: 1px solid var(--line); transition: background 0.5s;
}
.sys-list .sys-row:last-child { border-bottom: 1px solid var(--line); }
.sys-row:hover { background: rgba(242, 239, 233, 0.022); }
.sys-code {
  font-family: var(--mono); font-size: 0.6rem; letter-spacing: 0.18em; color: var(--muted);
  transition: color 0.45s;
}
.sys-row:hover .sys-code { color: var(--accent); }
.sys-row dt {
  display: flex; flex-direction: column; gap: 0.7rem;
  font-family: var(--disp); font-weight: 600; font-stretch: 108%;
  font-size: 1.15rem; letter-spacing: 0.01em;
}
.sys-row dd { font-size: clamp(0.95rem, 1.15vw, 1.08rem); line-height: 2; color: var(--ink-soft); align-self: center; }
.sys-row dd i { font-style: normal; color: var(--accent); opacity: 0.55; margin: 0 0.85rem; }

.rec-list { list-style: none; max-width: 1100px; }
.rec-row {
  display: grid; grid-template-columns: minmax(200px, 26%) 1fr;
  gap: 2rem; padding: clamp(2rem, 4.5vh, 3rem) 0.5rem; border-top: 1px solid var(--line);
}
.rec-list .rec-row:last-child { border-bottom: 1px solid var(--line); }
.rec-date { font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; color: var(--muted); padding-top: 0.55em; }
.rec-role {
  font-family: var(--disp); font-weight: 700; font-stretch: 112%;
  font-size: clamp(1.4rem, 2.2vw, 1.9rem); letter-spacing: -0.005em;
}
.rec-org { font-family: var(--serif); font-style: italic; font-size: 1rem; color: var(--muted); margin-top: 0.4rem; }
.rec-text { font-size: 0.96rem; line-height: 1.7; color: var(--ink-soft); max-width: 62ch; margin-top: 1.2rem; }

.scene-contact { min-height: 92svh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.contact-shader {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0; opacity: 0.22; pointer-events: none;
  -webkit-mask-image: radial-gradient(110% 95% at 80% 45%, #000 25%, transparent 75%);
  mask-image: radial-gradient(110% 95% at 80% 45%, #000 25%, transparent 75%);
}
.contact-grid { display: grid; grid-template-columns: 1fr auto; gap: clamp(2rem, 5vw, 6rem); align-items: center; position: relative; z-index: 1; }
.contact-line {
  font-family: var(--sans); font-weight: 300;
  font-size: clamp(1.9rem, 4.4vw, 4rem); line-height: 1.18; letter-spacing: -0.01em;
  max-width: 22ch;
}
.contact-line em { color: var(--ink); }
.contact-mail {
  display: inline-block;
  margin-top: clamp(2.5rem, 6vh, 4.5rem); max-width: 100%;
  font-family: var(--disp); font-weight: 800; font-stretch: 112%;
  font-size: clamp(1.35rem, 3.6vw, 3.2rem); letter-spacing: -0.01em; line-height: 1.1;
  word-break: break-all;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-repeat: no-repeat; background-position: left bottom; background-size: 0% 2px;
  transition: background-size 0.6s var(--ease-out), color 0.45s;
  padding-bottom: 0.18em;
}
.contact-mail:hover { background-size: 100% 2px; }
.contact-mail-row { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }
.copy-mail {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  color: var(--muted); background: none; border: 1px solid var(--line);
  padding: 0.6rem 1rem; cursor: pointer;
  transition: color 0.35s, border-color 0.35s;
}
.copy-mail:hover { color: var(--ink); border-color: rgba(242, 239, 233, 0.4); }
.copy-mail.did { color: var(--accent); border-color: var(--accent); }
.contact-avail {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: clamp(1.8rem, 4vh, 2.8rem);
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--muted);
}
.avail-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.js:not(.reduced) .avail-dot { animation: availPulse 2.4s ease-in-out infinite; }
@keyframes availPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.contact-links { display: flex; flex-wrap: wrap; gap: clamp(1.4rem, 3vw, 3rem); margin-top: clamp(2.6rem, 7vh, 4.6rem); }
.contact-fig {
  position: relative; width: clamp(180px, 17vw, 250px);
  rotate: -2deg;
  transition: rotate 0.6s var(--ease-out);
  margin-right: 1.5rem;
}
.contact-fig:hover { rotate: 0deg; }
.contact-fig img { width: 100%; height: auto; filter: saturate(0.82) contrast(1.03); }
.contact-fig .fig-frame { inset: -0.85rem; }
.contact-fig .fig-tag { top: calc(100% + 1.5rem); font-size: 0.56rem; }
.contact-ghost {
  position: absolute; left: 50%; bottom: -0.12em; translate: -50% 0; z-index: 1;
  font-family: var(--disp); font-weight: 900; font-stretch: 125%;
  font-size: 12.5vw; line-height: 0.8; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 239, 233, 0.07);
  pointer-events: none; user-select: none;
}

.site-foot {
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 1rem 3rem; justify-content: space-between;
  padding: 2.2rem var(--pad-x) calc(2.2rem + env(safe-area-inset-bottom));
  font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.14em;
  color: var(--muted); text-transform: uppercase;
}
.site-foot a { color: var(--muted); transition: color 0.35s; }
.site-foot a:hover { color: var(--ink); }

.progress-rail {
  position: fixed; left: 1.05rem; top: 50%; translate: 0 -50%; z-index: 90;
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  pointer-events: none;
}
.pr-track { width: 1px; height: 27vh; background: var(--line); position: relative; display: block; }
.pr-fill {
  position: absolute; inset: 0; background: var(--accent);
  transform: scaleY(0); transform-origin: top; display: block;
}
.pr-label {
  writing-mode: vertical-rl;
  font-family: var(--mono); font-size: 0.54rem; letter-spacing: 0.24em;
  color: var(--muted); text-transform: uppercase; white-space: nowrap;
}
.reduced .progress-rail { display: none; }

.grain { position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E"); }
.js:not(.reduced) .grain { animation: grainShift 1.1s steps(5) infinite; }
@keyframes grainShift {
  0% { background-position: 0 0; }
  20% { background-position: -64px 42px; }
  40% { background-position: 48px -60px; }
  60% { background-position: -36px -48px; }
  80% { background-position: 60px 54px; }
  100% { background-position: 0 0; }
}

.cursor { display: none; }
.cur body, .cur a, .cur button { cursor: none; }
.cur .cursor { display: block; position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.cursor-dot {
  position: absolute; top: 0; left: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  background: var(--ink); border-radius: 50%;
}
.cursor-ring {
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%;
  display: grid; place-items: center; align-content: center; row-gap: 3px;
  transition: width 0.4s var(--ease-out), height 0.4s var(--ease-out), margin 0.4s var(--ease-out), background 0.4s;
}
.ring-dots {
  position: absolute; inset: 0; width: 100%; height: 100%;
  stroke: rgba(242, 239, 233, 0.6);
  transition: stroke 0.35s;
}
.js:not(.reduced) .ring-dots { animation: ringSpin 14s linear infinite; }
@keyframes ringSpin { to { transform: rotate(360deg); } }
.cursor-label {
  font-family: var(--mono); font-size: 0.52rem; letter-spacing: 0.16em; color: var(--ink);
  opacity: 0; transition: opacity 0.3s; text-transform: uppercase; white-space: nowrap;
}
.cur-hover .cursor-ring { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(242, 239, 233, 0.07); }
.cur-hover .ring-dots { stroke: var(--accent); }
.cur-view .cursor-ring { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: rgba(242, 239, 233, 0.96); }
.cur-view .ring-dots { stroke: rgba(10, 10, 11, 0.65); }
.cur-view .cursor-label { opacity: 1; color: var(--bg); }
.cur-view .cursor-dot { opacity: 0; }

/* project sigil riding in the cursor disc */
.cursor-sigil { display: none; }
.cursor-sigil canvas { display: block; }
.cur-sigil .cursor-sigil { display: block; }
.cur-sigil .cursor-ring { width: 108px; height: 108px; margin: -54px 0 0 -54px; background: rgba(242, 239, 233, 0.97); }
.cur-sigil .cursor-label { font-size: 0.5rem; letter-spacing: 0.14em; }

.js:not(.reduced) [data-load] { opacity: 0; }
.js:not(.reduced) [data-reveal] { opacity: 0; }
.js:not(.reduced) .lamp > * { opacity: 0; }
.reduced .lamp > * { opacity: 1 !important; }
.reduced .contact-shader, .no-js .contact-shader { display: none; }
.js:not(.reduced) .nm-in { transform: translateY(112%); }
.js:not(.reduced) .sec-title .line-in { transform: translateY(112%); }
.js:not(.reduced) .portrait-wrap { opacity: 0; }
.js:not(.reduced) .nm-ground { transform: scaleX(0); }
.js:not(.reduced) .halo { opacity: 0; }
.js:not(.reduced) .contact-mail { opacity: 0; }
.js:not(.reduced) .contact-ghost { opacity: 0; }
.reduced [data-load], .reduced [data-reveal] { opacity: 1; }
.meta-off .hm-ctas { pointer-events: none !important; }
@media (min-width: 1025px) {
  .reduced .work-media, .no-js .work-media { display: block; grid-column: 2; margin-top: 1.8rem; max-width: 560px; }
  .reduced .work-media > img, .no-js .work-media > img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--line); }
  .reduced .work-media .phones, .no-js .work-media .phones { aspect-ratio: 16 / 12; border: 1px solid var(--line); }
  .reduced .work-panel, .no-js .work-panel { display: none; }
}

.pin .about-figure .fig-frame, .pin .about-figure .fig-tag { opacity: 0; }

@media (max-height: 830px) and (min-width: 901px) {
  .pin .about-panel { padding-top: 9vh; padding-bottom: 3vh; }
  .pin .about-title { font-size: clamp(1.8rem, 2.9vw, 2.6rem); margin-bottom: 1.5rem; }
  .pin .about-body .sec-label { margin-bottom: 1.3rem; }
  .pin .about-lead { font-size: clamp(1rem, 1.25vw, 1.15rem); margin-bottom: 1.8rem; }
  .pin .about-facts .fact { padding: 0.92rem 0; }
  .pin .about-facts dd { font-size: 0.88rem; line-height: 1.55; }
  .pin .fact-sub { font-size: 0.78rem; margin-top: 0.3rem; }
  .pin .about-figure { height: min(31svh, 300px); }
}

@media (max-height: 760px) and (min-width: 901px) {
  .pin .about-panel { padding-top: 8.5vh; padding-bottom: 2vh; }
  .pin .about-title { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-bottom: 1.1rem; }
  .pin .about-body .sec-label { margin-bottom: 0.9rem; }
  .pin .about-lead { font-size: 0.98rem; line-height: 1.55; margin-bottom: 1.2rem; }
  .pin .about-facts .fact { padding: 0.68rem 0; gap: 1.2rem; }
  .pin .about-facts dd { font-size: 0.82rem; line-height: 1.45; }
  .pin .fact-sub { font-size: 0.74rem; margin-top: 0.2rem; }
  .pin .about-figure { height: min(29svh, 280px); }
}

@media (max-width: 1024px) {
  .progress-rail { display: none; }
  .work-wrap { grid-template-columns: 1fr; }
  .work-panel { display: none; }
  .work-link { grid-template-columns: minmax(3.4rem, 5rem) 1fr; }
  .work-side {
    grid-column: 2; flex-direction: row; align-items: baseline; gap: 1.6rem;
    height: auto; padding-top: 0; margin-top: 1.1rem; text-align: left;
  }
  .work-arrow { display: none; }
  .work-media { grid-column: 2; margin-top: 1.8rem; max-width: 560px; }
  .work-media > img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; filter: grayscale(0.15) contrast(1.04); border: 1px solid var(--line); }
  .work-media .media-ph { aspect-ratio: 16 / 10; }
  .work-media .phones { aspect-ratio: 16 / 12; border: 1px solid var(--line); }
  .sys-row, .rec-row { grid-template-columns: 1fr; gap: 1rem; }
  .sys-row dd i { margin: 0 0.6rem; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-fig { margin: 4rem 0 2rem; rotate: -2deg; }
}

@media (min-width: 1025px) {
  .work-media { display: none; }
  .work-case { max-width: 60ch; }
}

@media (max-width: 900px) {
  :root { --pad-x: 5vw; --nm: clamp(2.9rem, 12.6vw, 6.2rem); }
  .nm-stack { bottom: 26svh; }
  .portrait-wrap {
    bottom: calc(26svh + var(--nm) * 0.93);
    width: calc(var(--nm) * 1.78);
    left: calc(var(--pad-x) + var(--nm) * 3.9);
  }
  .halo { left: 50%; top: 50%; width: 120vw; }
  .hm-loc, .hm-data { display: none; }
  .dim-right { display: none; }
  .dim-top { top: -1.7rem; }
  .sec-label::after { width: 16vw; }
  .hm-eyebrow { top: 4rem; }
  .hm-role { bottom: auto; top: 6.4rem; left: var(--pad-x); right: var(--pad-x); }
  .role-line { margin-bottom: 0.25rem; }
  .hm-ctas { left: var(--pad-x); right: var(--pad-x); bottom: 4svh; flex-wrap: wrap; gap: 1.1rem 1.6rem; justify-content: space-between; }
  .hm-scroll { display: none; }
  .reg-bl, .reg-br { display: none; }
  .about-panel { padding: 13vh var(--pad-x) 13vh; }
  .about-figure { margin-bottom: 4.5rem; }
  .contact-ghost { font-size: 22vw; }
}

@media (max-width: 640px) {
  .site-nav { gap: 0.95rem; }
  .site-nav a sup { display: none; }
  .head-resume { display: none; }
  .site-head { padding: 1.1rem var(--pad-x); }
  .role-sub { font-size: 1.05rem; }
  /* hero: bold name that bleeds toward the edge (lower clamp floor so it never
     clips, even at 320px); figure sits on SELIM and leans on YOUSOF (desktop
     proportions); whole block lifted toward centre to cut the dead space */
  :root { --nm: clamp(2.3rem, 12.6vw, 6.2rem); }
  .hm-eyebrow { top: 3.6rem; }
  .hm-role { top: 5.7rem; }
  .nm-stack { bottom: 40svh; }
  .portrait-wrap {
    width: calc(var(--nm) * 1.78);
    left: calc(var(--pad-x) + var(--nm) * 4.2);
    bottom: calc(40svh + var(--nm) * 0.93);
  }
  .about-facts .fact { grid-template-columns: 1fr; gap: 0.5rem; padding: 1.1rem 0; }
  .work-link { grid-template-columns: 1fr; gap: 0.6rem; padding: 2rem 0.2rem; }
  .work-no { font-size: 1.3rem; padding: 0; }
  .work-media { grid-column: 1; }
  .work-side { grid-column: 1; flex-wrap: wrap; gap: 0.8rem 1.6rem; }
  .statement { max-width: 100%; }
  .contact-avail { letter-spacing: 0.1em; }
  .site-foot { flex-direction: column; gap: 0.7rem; }
}

/* ===== Mobile navigation (menu button + full-screen overlay) ===== */
.nav-toggle {
  display: none;
  position: relative;
  align-items: center; gap: 0.62rem;
  min-height: 44px; padding: 0.4rem 0; margin: -0.4rem 0;
  background: none; border: 0; cursor: pointer;
  color: var(--ink); -webkit-tap-highlight-color: transparent;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase;
}
.nav-toggle-lines { position: relative; display: block; width: 26px; height: 11px; flex-shrink: 0; }
.nav-toggle-lines i {
  position: absolute; left: 0; width: 100%; height: 1.5px; background: currentColor;
  transition: transform 0.42s var(--ease-out), width 0.42s var(--ease-out);
}
.nav-toggle-lines i:first-child { top: 0; }
.nav-toggle-lines i:last-child { bottom: 0; }
.menu-open .nav-toggle-lines i:first-child { transform: translateY(5px) rotate(45deg); }
.menu-open .nav-toggle-lines i:last-child  { transform: translateY(-4.5px) rotate(-45deg); }

.mobile-nav {
  position: fixed; inset: 0; z-index: 400;
  display: flex; align-items: stretch;
  padding: max(5.4rem, 13svh) var(--pad-x) calc(2.6rem + env(safe-area-inset-bottom));
  background: rgba(9, 9, 10, 0.975);
  -webkit-backdrop-filter: blur(10px) saturate(1.1); backdrop-filter: blur(10px) saturate(1.1);
  opacity: 0; visibility: hidden;
  overflow-y: auto; overscroll-behavior: contain;
  transition: opacity 0.5s var(--ease-out), visibility 0.5s;
}
.mobile-nav::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(25% - 1px), var(--line-soft) 25%, transparent calc(25% + 1px)),
    linear-gradient(90deg, transparent calc(75% - 1px), var(--line-soft) 75%, transparent calc(75% + 1px));
}
.menu-open .mobile-nav { opacity: 1; visibility: visible; }

.mnav-inner { position: relative; width: 100%; margin: auto 0; }
.mnav-eyebrow {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: clamp(1.4rem, 4vh, 2.4rem);
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--line);
}
.mnav-list { list-style: none; }
.mnav-list li { border-bottom: 1px solid var(--line); }
.mnav-list a {
  position: relative; display: flex; align-items: center; gap: 1rem;
  padding: clamp(0.85rem, 2.3vh, 1.35rem) 0;
  font-family: var(--disp); font-weight: 800; font-stretch: 115%;
  font-size: clamp(2.1rem, 11vw, 3.5rem); line-height: 1; letter-spacing: -0.01em;
  color: var(--ink); text-transform: uppercase;
}
.mnav-list a sup {
  align-self: flex-start; margin-top: 0.5em;
  font-family: var(--mono); font-weight: 400; font-size: 0.58rem; letter-spacing: 0.1em;
  color: var(--accent);
}
.mnav-list a i {
  margin-left: auto; font-style: normal; color: var(--accent); font-size: 1.5rem;
  opacity: 0; transform: translateX(-10px);
  transition: opacity 0.4s, transform 0.4s var(--ease-out);
}
.mnav-list a:hover i, .mnav-list a:focus-visible i, .mnav-list a:active i { opacity: 1; transform: translateX(0); }

.mnav-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1.1rem 2rem; margin-top: clamp(1.8rem, 5vh, 3.2rem);
}
.mnav-resume, .mnav-social a {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  display: inline-flex; align-items: baseline; gap: 0.5em; padding: 0.3rem 0;
}
.mnav-resume { color: var(--ink-soft); }
.mnav-social { display: flex; gap: 1.5rem; }
.mnav-social a { color: var(--muted); transition: color 0.35s; }
.mnav-social a:hover, .mnav-resume:hover { color: var(--ink); }
.mnav-resume .cta-arr, .mnav-social .cta-arr { color: var(--accent); }

/* staggered reveal on open */
.mobile-nav .mnav-eyebrow,
.mobile-nav .mnav-list li,
.mobile-nav .mnav-foot {
  opacity: 0; transform: translateY(15px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
}
.menu-open .mnav-eyebrow { opacity: 1; transform: none; transition-delay: 0.12s; }
.menu-open .mnav-list li { opacity: 1; transform: none; }
.menu-open .mnav-list li:nth-child(1) { transition-delay: 0.18s; }
.menu-open .mnav-list li:nth-child(2) { transition-delay: 0.24s; }
.menu-open .mnav-list li:nth-child(3) { transition-delay: 0.30s; }
.menu-open .mnav-list li:nth-child(4) { transition-delay: 0.36s; }
.menu-open .mnav-foot { opacity: 1; transform: none; transition-delay: 0.42s; }

html.menu-open { overflow: hidden; }
.menu-open .site-head { z-index: 450; }
.menu-open .site-head::before { opacity: 0; }

@media (max-width: 760px) {
  .js .site-nav { display: none; }
  .js .head-resume { display: none; }
  .js .nav-toggle { display: inline-flex; }
}

/* belt-and-suspenders: no element can force sideways scroll on small screens */
@media (max-width: 1024px) {
  html { overflow-x: clip; }
}

/* ===== Project sigils: case-file stamps, panel mark, mobile ID strip ===== */
.work-sigil { display: none; }
.work-sigil canvas { display: block; }
@media (max-width: 1024px) {
  .work-sigil {
    display: block; position: absolute;
    top: clamp(2rem, 4.6vh, 3rem); right: 0.4rem;
    opacity: 0.9;
  }
  .work-main { padding-right: 3rem; }
}

.wp-id { display: inline-flex; align-items: center; gap: 0.7rem; }
.wp-sigil { width: 26px; height: 26px; display: inline-block; }
.wp-sigil:empty { display: none; }
.wp-sigil canvas { display: block; }

.hm-idstrip { display: none; }
@media (max-width: 900px) {
  .hm-idstrip {
    display: flex; align-items: center; justify-content: space-between; gap: 1.2rem;
    left: var(--pad-x); right: var(--pad-x); top: 10.6rem;
    padding: 0.7rem 0;
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  }
  .hm-idstrip canvas { width: 150px; height: 19.5px; display: block; flex-shrink: 0; }
  .idstrip-meta {
    font-family: var(--mono); font-size: 0.56rem; letter-spacing: 0.16em;
    color: var(--muted); text-transform: uppercase; line-height: 1.9;
  }
  .no-js .hm-idstrip canvas { display: none; }
}
@media (max-width: 900px) and (max-height: 620px) {
  .hm-idstrip { display: none; }
}

/* Photoshoot artwork keeps its native paper ratio instead of the 16/10 crop */
.work-media > img.ps-art { height: auto; aspect-ratio: 1202 / 956; }
.wp-shot-ps { object-fit: contain; background: #f2ebdb; }

/* tap-fact chips (touch cousin of the desktop mini game) */
.egg-chip-tap {
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.3s var(--ease-out), transform 0.35s var(--ease-out);
}
.egg-chip-tap.on { opacity: 1; transform: translateY(0); }
@keyframes eggFlash {
  0% { filter: brightness(1); }
  35% { filter: brightness(1.7); }
  100% { filter: brightness(1); }
}
.egg-flash { animation: eggFlash 0.5s var(--ease-out); }

/* touch feedback: fingers deserve the same charm as cursors */
@media (hover: none) {
  .work-row:active .work-link::before { opacity: 1; }
  .work-row:active .work-no { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
  .work-row:active .work-name { transform: translateX(0.4rem); }
  .cta:active { background-size: 100% 1px; }
  .cta:active .cta-arr { translate: 0.15em -0.1em; }
  .sys-row:active { background: rgba(242, 239, 233, 0.03); }
  .sys-row:active .sys-code { color: var(--accent); }
  .contact-mail:active { background-size: 100% 2px; }
  .copy-mail:active { color: var(--ink); border-color: rgba(242, 239, 233, 0.4); }
  .contact-fig:active { rotate: 0deg; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-load], [data-reveal], .nm-in, .sec-title .line-in, .portrait-wrap, .nm-ground, .halo, .contact-mail, .contact-ghost {
    opacity: 1 !important; transform: none !important;
  }
}
