/* ==========================================================================
   emm. Splitscreen Webpage - Minimalist, Responsive, Pure Geometry
   ========================================================================== */

:root {
  --bg-dark: #000000;
  --bg-panel: #050608;
  --reveal-orange: #F47204;
  --reveal-text: #000000;
  --reveal-grid-line: #FF8D28;
  --reveal-margin: clamp(18px, 2.4vw, 35px);
  --reveal-margin-left: max(var(--reveal-margin), env(safe-area-inset-left, 0px));
  --reveal-margin-right: max(var(--reveal-margin), env(safe-area-inset-right, 0px));
  --reveal-gutter: clamp(16px, 2vw, 28px);
  --reveal-bar-height: clamp(30px, 3.2vw, 36px);
  --text-main: #ffffff;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --transition-speed: 0.8s;
  --transition-easing: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  color-scheme: dark;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

html.is-revealed,
html.is-revealed body {
  color-scheme: light;
  background-color: var(--reveal-orange);
  overflow-y: auto;
  overscroll-behavior-y: auto;
}

::selection {
  background-color: var(--reveal-grid-line);
  color: var(--reveal-text);
}

/* ==========================================================================
   1. BACKGROUND REVEAL LAYER: SWISS GRID ORANGE CANVAS
   ========================================================================== */
.reveal-layer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: var(--reveal-orange);
  color: var(--reveal-text);
  font-family: 'Google Sans Flex', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 300;
  font-variation-settings: "wdth" 100, "GRAD" 0, "ROND" 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.02em;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Keep reveal layer out of layout until scratched/revealed so iOS Liquid Glass never samples orange */
.reveal-layer.standby {
  display: none;
}

@property --gr {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

/* Full-canvas gridline blur with a cursor-following clear lens that brings gridlines into focus */
.reveal-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  --gx: 50vw;
  --gy: 50vh;
  --gr: 0px;
  transition: --gr 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  -webkit-mask-image: radial-gradient(circle at var(--gx) var(--gy), transparent 0px, rgba(0, 0, 0, 0.35) calc(var(--gr) * 0.55), #000 var(--gr));
  mask-image: radial-gradient(circle at var(--gx) var(--gy), transparent 0px, rgba(0, 0, 0, 0.35) calc(var(--gr) * 0.55), #000 var(--gr));
}

.reveal-glow::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
  opacity: 0.14;
}

.reveal-glow.active {
  --gr: clamp(240px, 28vmax, 420px);
}

/* Vertical construction grid lines (4 cols desktop, 2 cols tablet, 1 col mobile) */
.reveal-grid-cols {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--reveal-margin-left);
  right: var(--reveal-margin-right);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--reveal-gutter);
  pointer-events: none;
  z-index: 1;
}

.reveal-grid-cols .grid-col {
  height: 100%;
  border-left: 1px solid var(--reveal-grid-line);
  border-right: 1px solid var(--reveal-grid-line);
}

/* Horizontal grid frame: pinned header, one-liner, open canvas, pinned footer */
.reveal-frame {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding-top: calc(var(--reveal-margin) + env(safe-area-inset-top, 0px));
  padding-bottom: calc(var(--reveal-margin) + env(safe-area-inset-bottom, 0px));
}

.reveal-row {
  padding-left: calc(var(--reveal-margin-left) + 8px);
  padding-right: calc(var(--reveal-margin-right) + 8px);
}

/* Header pinned to top */
.reveal-header {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--reveal-gutter);
  align-items: stretch;
  padding-left: var(--reveal-margin-left);
  padding-right: var(--reveal-margin-right);
  min-height: var(--reveal-bar-height);
  border-top: 1px solid var(--reveal-grid-line);
  border-bottom: 1px solid var(--reveal-grid-line);
  pointer-events: none;
}

.reveal-header-cell {
  position: relative;
  z-index: 5;
  grid-column: 1;
  display: flex;
  align-items: center;
  padding-left: 8px;
  padding-right: 8px;
}

.reveal-brand {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.reveal-brand-name {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.reveal-dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background-color: currentColor;
  margin-inline: 0.14em;
  flex-shrink: 0;
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-slash {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 6px 8px;
  margin: -6px -6px -6px -2px;
  color: var(--reveal-text);
  cursor: pointer;
  pointer-events: auto;
  outline: none;
}

.reveal-slash:focus-visible {
  outline: 1.5px solid var(--reveal-text);
  outline-offset: -2px;
  border-radius: 3px;
}

.reveal-slash-svg {
  width: 0.7em;
  height: 1.8em;
  margin-block: -0.4em;
  display: block;
  overflow: visible;
}

.reveal-slash-svg path {
  stroke-width: 1.4;
  transition: stroke-width 0.25s ease;
}

.reveal-header.has-active.menu-open .reveal-slash-svg path {
  stroke-width: 0.7;
}

.reveal-header.has-active.menu-open .reveal-slash:hover .reveal-slash-svg path,
.reveal-header.has-active.menu-open .reveal-slash:focus-visible .reveal-slash-svg path {
  stroke-width: 1.4;
}

.reveal-active-crumb {
  display: none;
}

/* One-liner band: locked to column 1 of the visible grid */
.reveal-bio {
  grid-row: 2;
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--reveal-gutter);
  padding-left: var(--reveal-margin-left);
  padding-right: var(--reveal-margin-right);
  border-bottom: 1px solid var(--reveal-grid-line);
}

.reveal-bio-cell {
  position: relative;
  z-index: 4;
  grid-column: 1;
  display: grid;
  align-items: start;
}

@keyframes menuCellShimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.reveal-header-cell::before,
.reveal-bio-cell::before {
  content: '';
  position: absolute;
  top: -1px;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 0;
  border: 1px solid var(--reveal-grid-line);
  background: linear-gradient(
    115deg,
    rgba(255, 141, 40, 0.12) 0%,
    rgba(255, 141, 40, 0.28) 38%,
    rgba(255, 141, 40, 0.15) 65%,
    rgba(255, 141, 40, 0.24) 100%
  );
  background-size: 260% 260%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1),
              filter 0.35s ease;
}

.reveal-header.menu-open .reveal-header-cell::before,
.reveal-bio.menu-open .reveal-bio-cell::before {
  opacity: 1;
  animation: menuCellShimmer 12s ease-in-out infinite;
}

.reveal-bio.menu-open .reveal-bio-cell:hover::before {
  filter: brightness(1.12);
}

.reveal-oneliner {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 1;
  align-self: center;
  padding-top: 6px;
  padding-bottom: 6px;
  padding-left: 8px;
  padding-right: 8px;
  max-width: 28ch;
  font-weight: 300;
  line-height: 1.25;
  color: var(--reveal-text);
  overflow-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.28s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-menu {
  position: relative;
  z-index: 1;
  grid-row: 1;
  grid-column: 1;
  width: 100%;
  padding-top: 0;
  opacity: 0;
  transform: translateY(5px);
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.28s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 300;
  line-height: 1.25;
  letter-spacing: 0.02em;
  color: var(--reveal-text);
}

.reveal-menu-list li {
  margin: 0;
}

.reveal-menu-link {
  display: flex;
  align-items: center;
  width: 100%;
  height: calc(var(--reveal-bar-height) - 1px);
  padding-left: var(--menu-indent, 4.5em);
  padding-right: 12px;
  gap: 0.38em;
  color: var(--reveal-text);
  text-decoration: none;
  border-bottom: 1px solid var(--reveal-grid-line);
  transition: font-weight 0.2s ease,
              letter-spacing 0.2s ease,
              background-color 0.25s ease,
              box-shadow 0.25s ease;
}

.reveal-menu-spacer {
  height: calc(var(--reveal-bar-height) - 1px);
  pointer-events: none;
}

.reveal-menu-link:hover,
.reveal-menu-link:focus-visible {
  background-color: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 14px rgba(255, 215, 160, 0.08);
}

.reveal-menu-dot {
  display: inline-block;
  width: 0.17em;
  height: 0.17em;
  border-radius: 50%;
  background-color: currentColor;
  flex-shrink: 0;
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.2s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-menu-link:hover .reveal-menu-dot,
.reveal-menu-link:focus-visible .reveal-menu-dot,
.reveal-menu-link.is-active .reveal-menu-dot {
  opacity: 1;
}

.reveal-menu.has-active .reveal-menu-link:not(.is-active) {
  font-weight: 100;
  letter-spacing: 0.04em;
}

.reveal-menu-link:hover,
.reveal-menu-link:focus-visible,
.reveal-menu-link.is-active,
.reveal-menu.has-active .reveal-menu-link:hover,
.reveal-menu.has-active .reveal-menu-link:focus-visible {
  font-weight: 500;
  letter-spacing: 0em;
  outline: none;
}

.reveal-bio.menu-open .reveal-oneliner {
  opacity: 0;
  transform: translateY(-5px);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.reveal-bio.menu-open .reveal-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Secret section content: flows continuously across cols 2-3 without altering row height */
.reveal-section-top {
  --section-pad: clamp(16px, 1.5vw, 22px);
  position: relative;
  z-index: 5;
  grid-column: 2 / 4;
  height: 0;
  overflow: visible;
  padding: var(--section-pad) var(--section-pad) 0;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-section-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Open middle canvas separated by double horizontal hairline gutter */
.reveal-canvas {
  grid-row: 3;
  grid-column: 1;
  margin-top: calc(var(--reveal-bar-height) - 2px);
  border-top: 1px solid var(--reveal-grid-line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--reveal-gutter);
  padding-left: var(--reveal-margin-left);
  padding-right: var(--reveal-margin-right);
  min-height: 0;
}

.reveal-section-body {
  --section-pad: clamp(16px, 1.5vw, 22px);
  position: relative;
  z-index: 4;
  grid-column: 2 / 4;
  padding: var(--section-pad);
  overflow: visible;
  scrollbar-width: none;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1),
              transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Hide the two horizontal gridlines transparently across cols 2-3 when desktop big text is active */
.reveal-frame.has-active-section .reveal-bio {
  --col-w: calc((100% - var(--reveal-margin-left) - var(--reveal-margin-right) - 3 * var(--reveal-gutter)) / 4);
  --gap-start: calc(var(--reveal-margin-left) + var(--col-w) + var(--reveal-gutter) + 1px);
  --gap-end: calc(100% - var(--reveal-margin-right) - var(--col-w) - var(--reveal-gutter) - 1px);
  border-bottom-color: transparent;
  background-image: linear-gradient(
    to right,
    var(--reveal-grid-line) 0,
    var(--reveal-grid-line) var(--gap-start),
    transparent var(--gap-start),
    transparent var(--gap-end),
    var(--reveal-grid-line) var(--gap-end),
    var(--reveal-grid-line) 100%
  );
  background-origin: border-box;
  background-size: 100% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
}

.reveal-frame.has-active-section .reveal-canvas {
  --col-w: calc((100% - var(--reveal-margin-left) - var(--reveal-margin-right) - 3 * var(--reveal-gutter)) / 4);
  --gap-start: calc(var(--reveal-margin-left) + var(--col-w) + var(--reveal-gutter) + 1px);
  --gap-end: calc(100% - var(--reveal-margin-right) - var(--col-w) - var(--reveal-gutter) - 1px);
  border-top-color: transparent;
  background-image: linear-gradient(
    to right,
    var(--reveal-grid-line) 0,
    var(--reveal-grid-line) var(--gap-start),
    transparent var(--gap-start),
    transparent var(--gap-end),
    var(--reveal-grid-line) var(--gap-end),
    var(--reveal-grid-line) 100%
  );
  background-origin: border-box;
  background-size: 100% 1px;
  background-position: 0 0;
  background-repeat: no-repeat;
}

.reveal-section-body::-webkit-scrollbar {
  display: none;
}

.reveal-section-body.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.reveal-section-copy {
  font-weight: 250;
  font-size: 24px;
  line-height: 1.333;
  letter-spacing: 0.02em;
  color: var(--reveal-text);
  text-wrap: pretty;
  overflow-wrap: break-word;
  user-select: text;
  -webkit-user-select: text;
}

.reveal-section-copy + .reveal-section-copy {
  margin-top: 0.85em;
}

.reveal-section-copy:empty {
  display: none;
}

.reveal-section-mobile-only {
  display: none;
}

/* Bottom architectural bar */
.reveal-footer-bar {
  grid-row: 4;
  grid-column: 1;
  min-height: var(--reveal-bar-height);
  border-top: 1px solid var(--reveal-grid-line);
  border-bottom: 1px solid var(--reveal-grid-line);
  pointer-events: none;
}

/* Contacts: col 4 in top header on desktop; bottom bar on tablet/mobile */
.reveal-footer {
  grid-row: 1;
  grid-column: 1;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--reveal-gutter);
  align-items: center;
  padding-left: var(--reveal-margin-left);
  padding-right: var(--reveal-margin-right);
  min-height: var(--reveal-bar-height);
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
}

.reveal-email {
  grid-row: 1;
  grid-column: 4;
  justify-self: start;
  display: inline-block;
  padding: 2px 8px;
  color: var(--reveal-text);
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  -webkit-user-drag: none;
  transition: font-weight 0.2s ease, letter-spacing 0.2s ease;
}

.reveal-email:hover,
.reveal-email:focus-visible {
  font-weight: 500;
  letter-spacing: 0em;
  text-decoration: none;
}

.reveal-contacts {
  grid-row: 1;
  grid-column: 4;
  justify-self: end;
  padding-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.reveal-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--reveal-text);
  text-decoration: none;
  filter: grayscale(1);
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.reveal-contact-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.reveal-contact-icon:hover,
.reveal-contact-icon:focus-visible {
  opacity: 1;
}

.reveal-contact-instagram path {
  stroke: currentColor;
  stroke-width: 0;
  stroke-linejoin: round;
  transition: stroke-width 0.2s ease;
}

.reveal-contact-instagram:hover path,
.reveal-contact-instagram:focus-visible path {
  stroke-width: 0.85;
}

/* ==========================================================================
   2. FOREGROUND ISOLATED STAGE (SVG, PHOTOS & TRIGGER)
   Isolates mix-blend-mode: exclusion so it blends ONLY with the SVG and
   photo layers, and NEVER with the orange reveal background underneath.
   ========================================================================== */
@property --iris-r {
  syntax: '<length-percentage>';
  inherits: false;
  initial-value: 0px;
}

.foreground-stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  isolation: isolate;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

/* Pass clicks, hover, and text selection through orange areas to the reveal layer */
.foreground-stage.over-hole .splitscreen-layout {
  pointer-events: none;
}

.foreground-stage.revealed .center-trigger {
  --tscale: 0;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
              opacity 0.35s ease 0.25s;
}

/* Secret invisible toggles in all 4 corners (matches outer grid margin) */
.secret-toggle {
  position: fixed;
  width: max(32px, var(--reveal-margin));
  height: max(32px, var(--reveal-margin));
  z-index: 999;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  cursor: zoom-in;
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
}

html.is-revealed .secret-toggle {
  cursor: zoom-out;
}

.secret-toggle.corner-tl { top: 0; left: 0; }
.secret-toggle.corner-tr { top: 0; right: 0; }
.secret-toggle.corner-bl { bottom: 0; left: 0; }
.secret-toggle.corner-br { bottom: 0; right: 0; }

.splitscreen-iris {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  --iris-r: 0px;
  --iris-origin: 100% 0%;
  will-change: clip-path, mask-image, -webkit-mask-image;
}

.splitscreen-iris.iris-mask {
  -webkit-mask-image: radial-gradient(circle at var(--iris-origin), transparent var(--iris-r), #000 calc(var(--iris-r) + 1px));
  mask-image: radial-gradient(circle at var(--iris-origin), transparent var(--iris-r), #000 calc(var(--iris-r) + 1px));
  transition: --iris-r 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.splitscreen-iris.iris-open {
  --iris-r: 150vmax;
}

.splitscreen-layout {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: transparent;
  pointer-events: auto;
  touch-action: none;
}

.splitscreen-layout.scratch-active {
  opacity: 0;
}

.scratch-canvas {
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.scratch-canvas.active {
  visibility: visible;
}

.half-panel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
}

/* LEFT PANEL (SVG) */
.left-panel {
  background-color: var(--bg-dark);
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  max-width: 90%;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--text-main);
}

.logo-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.7);
  outline-offset: 8px;
  border-radius: 4px;
}

.brand-svg {
  width: clamp(200px, 32vw, 460px);
  height: auto;
  display: block;
}

/* RIGHT PANEL (PHOTOS) */
.right-panel {
  background-color: var(--bg-panel);
  position: relative;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.image-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 2;
}

.gallery-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity var(--transition-speed) var(--transition-easing),
              transform 1.2s var(--transition-easing);
  will-change: opacity, transform;
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* Block native drag/selection on media */
img, svg, video {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  -webkit-user-select: none;
}

.gallery-img.active {
  opacity: 1;
  transform: scale(1);
}

/* ==========================================================================
   3. LIQUID METABALL STAGE (DRAGGER + CUSTOM CURSOR)
   SVG gooey filter fuses cursor and dragger into one liquid exclusion shape
   ========================================================================== */
.goo-svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.goo-stage {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  mix-blend-mode: exclusion;
  filter: url(#goo-filter);
}

.center-trigger {
  --tx: 0px;
  --ty: 0px;
  --tscale: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate3d(var(--tx), var(--ty), 0) translate(-50%, -50%) scale(var(--tscale));
  z-index: 50;
  width: clamp(68px, 8vw, 84px);
  height: clamp(68px, 8vw, 84px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background-color: #ffffff;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  pointer-events: auto;
  border: none;
  padding: 0;
  outline: none;
  box-shadow: none;
  will-change: transform, opacity;
}

.center-trigger:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.center-trigger.entering {
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.35s,
              opacity 0.35s ease 0.35s;
}

.center-trigger.gliding {
  transition: transform 0.4s var(--transition-easing);
}

.center-trigger.dragging {
  cursor: grabbing;
}

.touch-trigger-blend {
  display: none;
}

/* On touch devices, mirror the dragger outside .foreground-stage with soft-light over scratched orange */
@media (hover: none), (pointer: coarse) {
  .foreground-stage.trigger-over-hole .center-trigger {
    background-color: transparent;
  }

  .touch-trigger-blend {
    --bx: 50vw;
    --by: 50vh;
    --tscale: 1;
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: clamp(68px, 8vw, 84px);
    height: clamp(68px, 8vw, 84px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background-color: #ffffff;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 60;
    opacity: 0;
    transform: translate3d(var(--bx), var(--by), 0) translate(-50%, -50%) scale(var(--tscale));
    will-change: transform, opacity;
  }

  .touch-trigger-blend.visible {
    opacity: 1;
  }

  .touch-trigger-blend.gliding {
    transition: transform 0.4s var(--transition-easing);
  }

  .touch-trigger-blend.revealed {
    --tscale: 0;
    opacity: 0;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1) 0.25s,
                opacity 0.35s ease 0.25s;
  }
}

/* Custom exclusion cursor for both foreground & reveal views */
.custom-cursor,
.reveal-cursor {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  html, body, a, button,
  .left-panel, .right-panel, .logo-link, .reveal-slash,
  .reveal-layer {
    cursor: none;
  }

  .secret-toggle {
    cursor: zoom-in;
  }

  html.is-revealed .secret-toggle {
    cursor: zoom-out;
  }

  .reveal-email {
    cursor: cell;
  }

  .reveal-contact-icon {
    cursor: alias;
  }

  .center-trigger {
    --tscale: 0.8;
    cursor: grab;
  }

  .foreground-stage.revealed .center-trigger {
    --tscale: 0;
  }

  .center-trigger.dragging {
    cursor: grabbing;
  }

  .custom-cursor,
  .reveal-cursor {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #ffffff;
    pointer-events: none;
    z-index: 60;
    opacity: 0;
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%) scale(1);
    will-change: transform, opacity;
    transition: opacity 0.15s ease;
  }

  .reveal-cursor {
    z-index: 998;
    mix-blend-mode: soft-light;
  }

  .custom-cursor.visible,
  .reveal-cursor.visible {
    opacity: 1;
  }

  .custom-cursor.hidden,
  .reveal-cursor.hidden {
    opacity: 0;
  }
}

/* ==========================================================================
   RESPONSIVE LAYOUT
   ========================================================================== */
@media (max-width: 1024px) {
  .reveal-grid-cols,
  .reveal-header,
  .reveal-bio,
  .reveal-canvas {
    grid-template-columns: repeat(2, 1fr);
  }

  .reveal-menu-dot {
    display: none;
  }

  .reveal-active-crumb {
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    padding: 4px 6px 4px 2px;
    margin: -4px 0 -4px 0.1em;
    font: inherit;
    font-weight: 500;
    letter-spacing: 0em;
    color: var(--reveal-text);
    cursor: pointer;
    pointer-events: none;
    outline: none;
    opacity: 0;
    transform: translate3d(0, 10px, 0);
    will-change: transform, opacity;
    transition: opacity 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-active-crumb.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
  }

  .reveal-active-crumb:focus-visible {
    outline: 1.5px solid var(--reveal-text);
    outline-offset: -2px;
    border-radius: 3px;
  }

  .reveal-bio {
    max-height: calc(var(--reveal-bar-height) * 5);
    overflow: hidden;
    transition: max-height 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                border-bottom-color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-bio-cell {
    transition: opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-canvas {
    transition: margin-top 0.42s cubic-bezier(0.22, 1, 0.36, 1),
                border-top-color 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .reveal-section-top {
    display: none;
  }

  .reveal-section-body {
    grid-column: 1 / -1;
    overflow-y: auto;
  }

  .reveal-frame.has-active-section .reveal-bio {
    border-bottom-color: var(--reveal-grid-line);
    background-image: none;
  }

  .reveal-frame.has-active-section .reveal-canvas {
    border-top-color: var(--reveal-grid-line);
    background-image: none;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-bio {
    max-height: 0;
    border-bottom-color: transparent;
    pointer-events: none;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-bio-cell {
    opacity: 0;
    transform: translateY(-18px);
    pointer-events: none;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-oneliner {
    opacity: 0;
    pointer-events: none;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: none;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-menu-link.is-active {
    color: transparent;
  }

  .reveal-frame.has-active-section:not(.menu-open) .reveal-canvas {
    margin-top: 0;
    border-top-color: transparent;
  }

  .reveal-section-mobile-only {
    display: block;
  }

  .reveal-section-mobile-only:empty {
    display: none;
  }

  .reveal-grid-cols .grid-col:nth-child(n + 3) {
    display: none;
  }

  /* Move email & social links down to the pinned bottom bar on tablet/mobile */
  .reveal-footer {
    grid-row: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-left: calc(var(--reveal-margin-left) + 8px);
    padding-right: calc(var(--reveal-margin-right) + 8px);
    min-height: var(--reveal-bar-height);
    pointer-events: auto;
  }

  .reveal-email,
  .reveal-contacts {
    grid-row: auto;
    grid-column: auto;
    justify-self: auto;
    padding-left: 0;
    padding-right: 0;
  }
}

.ios-status-tint {
  display: none;
}

@media (max-width: 1024px) and (hover: none) and (pointer: coarse) {
  .reveal-frame {
    padding-bottom: calc(var(--reveal-margin) + env(safe-area-inset-bottom, 0px) + 16px);
  }
}

@media (max-width: 768px) {
  .splitscreen-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .left-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    padding-top: env(safe-area-inset-top, 0px);
  }

  .brand-svg {
    width: clamp(160px, 45vw, 300px);
  }
}

/* iOS Safari only: let fixed layers bleed behind Liquid Glass chrome and keep status bar edge sampler locked */
@supports (-webkit-touch-callout: none) {
  html, body {
    height: auto;
    min-height: 100lvh;
    overflow: visible;
  }

  .reveal-layer,
  .foreground-stage {
    bottom: auto;
    height: 100lvh;
  }

  @media (max-width: 768px) {
    .ios-status-tint {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 14px;
      background-color: var(--bg-dark);
      pointer-events: none;
      z-index: 990;
      transition: background-color 0.45s ease;
    }

    html.is-revealed .ios-status-tint {
      background-color: var(--reveal-orange);
    }
  }
}

@media (max-width: 560px) {
  .reveal-grid-cols,
  .reveal-header,
  .reveal-bio,
  .reveal-canvas {
    grid-template-columns: 1fr;
  }

  .reveal-grid-cols .grid-col:nth-child(n + 2) {
    display: none;
  }
}

/* ==========================================================================
   REDUCED MOTION SUPPORT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .foreground-stage {
    clip-path: none;
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  .foreground-stage.revealed {
    clip-path: none;
    opacity: 0;
  }

  .gallery-img {
    transform: none;
    transition: opacity 0.25s ease;
  }

  .gallery-img.active {
    transform: none;
  }

  .center-trigger.gliding,
  .touch-trigger-blend.gliding {
    transition: none;
  }

  .reveal-header.menu-open .reveal-header-cell::before,
  .reveal-bio.menu-open .reveal-bio-cell::before {
    animation: none;
  }
}
