﻿  /* ─── TOKENS ─────────────────────────────────────────────── */
  :root {
    --bg:        #080706;
    --surface:   #0f0d0b;
    --surface2:  #181512;
    --border:    rgba(237, 232, 223, 0.06);
    --border2:   rgba(237, 232, 223, 0.12);
    --text:      #ede8df;
    --muted:     #8a8478;
    --dim:       #4a4640;
    --gold:      #c8a96e;
    --gold-lt:   #e8d090;
    --f-serif:   'Cormorant Garamond', Georgia, serif;
    --f-sans:    'Inter', system-ui, sans-serif;
    --f-mono:    'Space Mono', monospace;
    --ease:      cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in:   cubic-bezier(0.64, 0, 0.78, 0);
  }

  /* ─── RESET ──────────────────────────────────────────────── */
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { font-size: 16px; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--f-sans);
    font-weight: 300;
    line-height: 1.65;
    overflow-x: clip; /* clip instead of hidden — doesn't create a scroll container, so position:sticky works */
    overflow-y: hidden;
    cursor: none;
  }
  body.ready { overflow-y: auto; }
  a { color: inherit; text-decoration: none; }
  button { font-family: inherit; border: none; background: none; cursor: none; }
  img, video { display: block; }

  /* ─── LOADER ──────────────────────────────────────────────── */
  #loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg);
    pointer-events: none;
    transition: opacity 0.9s var(--ease), visibility 0.9s;
    overflow: hidden;
  }
  #loader.done { opacity: 0; visibility: hidden; }
  .loader-fill {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0%;
    background: rgba(200,169,110,0.055);
    border-top: 1px solid rgba(200,169,110,0.55);
    transition: height 0.08s linear;
  }
  .loader-info {
    position: absolute;
    left: 3rem;
    bottom: 1rem;
    display: flex;
    align-items: baseline;
    gap: 0.2em;
    transition: bottom 0.08s linear;
  }
  .loader-num {
    font-family: var(--f-serif);
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 300;
    line-height: 1;
    color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .loader-pct {
    font-family: var(--f-serif);
    font-size: clamp(1.25rem, 2.5vw, 2rem);
    font-weight: 300;
    color: var(--muted);
    padding-bottom: 0.15em;
  }
  #cursor {
    position: fixed;
    top: 0; left: 0;
    pointer-events: none;
    z-index: 9000;
  }
  .c-ring {
    position: absolute;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1px solid rgba(237, 232, 223, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0.35s var(--ease), width 0.35s var(--ease), height 0.35s var(--ease), border-color 0.35s;
    will-change: transform;
  }
  .c-dot {
    position: absolute;
    top: 0; left: 0;
    width: 5px; height: 5px;
    background: var(--text);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s, background 0.3s;
  }
  .c-label {
    position: absolute;
    top: 0; left: 0;
    transform: translate(14px, -50%);
    font-family: var(--f-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--text);
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.25s;
  }
  body.c-hover .c-ring {
    width: 64px; height: 64px;
    border-color: var(--gold);
  }
  body.c-hover .c-dot { transform: translate(-50%, -50%) scale(0); }
  body.c-hover .c-label { opacity: 1; }
  body.c-drag .c-ring {
    width: 100px; height: 100px;
    border-color: rgba(200, 169, 110, 0.3);
  }

  /* ─── NAV ────────────────────────────────────────────────── */
  #nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 800;
    padding: 1.75rem 3rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    transition: background 0.5s, backdrop-filter 0.5s;
  }
  #nav.scrolled {
    background: rgba(8, 7, 6, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
  .nav-logo {
    font-family: var(--f-mono);
    font-size: 0.62rem;
    letter-spacing: 0.25em;
    color: var(--text);
    text-transform: uppercase;
    opacity: 0.9;
  }
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2.25rem;
    list-style: none;
  }
  .nav-btn {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 2px;
    position: relative;
    transition: color 0.3s;
  }
  .nav-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.35s var(--ease);
  }
  .nav-btn:hover,
  .nav-btn.active { color: var(--text); }
  .nav-btn:hover::after,
  .nav-btn.active::after { width: 100%; }
  .nav-contact {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.3s;
  }
  .nav-contact:hover { color: var(--gold); }

  /* ─── MASTHEAD ───────────────────────────────────────────── */
  #masthead {
    padding: 7rem 3rem 3.5rem;
    border-bottom: 1px solid var(--border);
    overflow: hidden;
  }
  .mast-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }
  .mast-name {
    font-family: var(--f-serif);
    font-size: clamp(3.5rem, 11vw, 13rem);
    font-weight: 300;
    line-height: 0.88;
    letter-spacing: -0.01em;
    color: var(--text);
  }
  .mast-line1 { display: block; }
  .mast-line2 { display: block; font-style: italic; color: var(--muted); }
  .mast-aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2.5rem;
    padding-bottom: 0.5rem;
    flex-shrink: 0;
  }
  .mast-role {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 2.2;
    text-align: right;
  }
  .mast-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
  }
  .mast-info span {
    font-family: var(--f-mono);
    font-size: 0.56rem;
    letter-spacing: 0.08em;
    color: var(--dim);
  }

  /* ─── WORKS ──────────────────────────────────────────────── */
  #works {
    padding: 5rem 3rem 6rem;
  }
  .section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  .cat-filters,
  .tag-filters {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
  }
  .tag-filters .filter-btn {
    font-size: 0.5rem;
    padding: 0.3rem 0.75rem;
    color: var(--dim);
    border-color: rgba(237,232,223,0.04);
  }
  .tag-filters .filter-btn:hover { color: var(--muted); border-color: var(--border); }
  .tag-filters .filter-btn.active { color: var(--gold); border-color: rgba(200,169,110,0.25); background: rgba(200,169,110,0.04); }
  .filter-btn {
    font-family: var(--f-mono);
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.42rem 1rem;
    border: 1px solid var(--border);
    transition: color 0.25s, border-color 0.25s, background 0.25s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .filter-count {
    font-size: 0.46rem;
    opacity: 0.5;
    letter-spacing: 0.06em;
  }
  .filter-btn:hover {
    color: var(--text);
    border-color: var(--border2);
  }
  .filter-btn.active {
    color: var(--gold);
    border-color: rgba(200, 169, 110, 0.35);
    background: rgba(200, 169, 110, 0.06);
  }
  .filter-btn.active .filter-count { opacity: 1; }
  .section-count {
    font-family: var(--f-mono);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    color: var(--dim);
  }

  /* ─── WORK GRID ──────────────────────────────────────────── */
  .work-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5px;
  }
  .work-item {
    position: relative;
    overflow: hidden;
    background: var(--surface);
  }

  .work-media {
    position: relative;
    overflow: hidden;
    width: 100%;
  }
  @keyframes spin { to { transform: rotate(360deg); } }
  .media-loader {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.4s var(--ease);
  }
  .media-loader-fill {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 0%;
    background: rgba(200,169,110,0.32);
    transition: height 0.12s linear;
  }
  .work-media.loaded > .media-loader { opacity: 0; }
  .work-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative; z-index: 1;
    transition: transform 0.8s var(--ease), filter 0.5s;
    will-change: transform;
  }
  .vid-overlay {
    position: absolute; inset: 0; z-index: 2;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), transform 0.8s var(--ease), filter 0.5s;
  }
  .work-item:hover .vid-overlay { opacity: 0 !important; }
  .work-item:hover .work-thumb {
    transform: scale(1.06);
    filter: brightness(0.85);
  }
  .work-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
      to top,
      rgba(8,7,6,0.88) 0%,
      rgba(8,7,6,0.15) 45%,
      transparent 65%
    );
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
  }

  .work-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    opacity: 0;
    transition: opacity 0.35s var(--ease);
  }
  .work-item:hover .work-top { opacity: 1; }
  .work-badge {
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(237,232,223,0.2);
    color: var(--text);
  }
  .work-badge.award   { border-color: rgba(200,169,110,0.5); color: var(--gold); }
  .work-badge.exhibition { border-color: rgba(237,232,223,0.2); }
  .work-badge.project { border-color: rgba(237,232,223,0.12); color: var(--muted); }

  .work-year {
    font-family: var(--f-mono);
    font-size: 0.56rem;
    letter-spacing: 0.1em;
    color: var(--muted);
  }
  .work-bottom { }
  .work-name {
    font-family: var(--f-serif);
    font-size: clamp(0.95rem, 1.6vw, 1.35rem);
    font-weight: 300;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 0.2rem;
  }
  .work-venue-small {
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    color: rgba(237,232,223,0.45);
  }
  .work-cta {
    font-family: var(--f-mono);
    font-size: 0.54rem;
    letter-spacing: 0.14em;
    color: var(--gold);
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.35s var(--ease);
    margin-top: 0.35rem;
  }
  .work-item:hover .work-cta { opacity: 1; }

  /* ─── ABOUT ──────────────────────────────────────────────── */
  #about {
    padding: 5rem 3rem 6rem;
    border-top: 1px solid var(--border);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
  }
  .about-left {}
  .about-label {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2.5rem;
  }
  .about-bio {
    font-family: var(--f-serif);
    font-size: clamp(1.25rem, 2.2vw, 1.8rem);
    font-weight: 300;
    line-height: 1.45;
    color: var(--text);
    margin-bottom: 2.5rem;
  }
  .about-bio em { font-style: italic; color: var(--muted); }
  .about-detail {
    font-family: var(--f-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    color: var(--muted);
    line-height: 2;
  }
  .about-right {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    padding-top: 4.5rem;
  }
  .about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .stat {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
  }
  .stat-num {
    font-family: var(--f-serif);
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 300;
    line-height: 1;
    color: var(--text);
    margin-bottom: 0.4rem;
  }
  .stat-label {
    font-family: var(--f-mono);
    font-size: 0.55rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .skill-tag {
    font-family: var(--f-mono);
    font-size: 0.55rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border);
    transition: color 0.3s, border-color 0.3s;
  }
  .skill-tag:hover { color: var(--gold); border-color: rgba(200,169,110,0.4); }

  /* ─── FOOTER ─────────────────────────────────────────────── */
  footer {
    padding: 2.5rem 3rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .footer-name {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
  }
  .footer-links {
    display: flex;
    gap: 2rem;
  }
  .footer-link {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.3s;
  }
  .footer-link:hover { color: var(--gold); }
  .footer-year {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    color: var(--dim);
  }

  /* ─── MODAL ──────────────────────────────────────────────── */
  #modal {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background: rgba(8, 7, 6, 0.97);
    display: grid;
    grid-template-columns: 1fr 420px;
    grid-template-rows: 1fr;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
    overscroll-behavior: none; /* blocks browser back/forward on all WebKit iOS browsers */
  }
  #modal.open { opacity: 1; visibility: visible; }

  .modal-media-col {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid var(--border);
  }
  .modal-main-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
  }
  .modal-main {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
    padding: 2rem;
  }
  .modal-main img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
  }
  .modal-main video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
  }

  /* ─── CUSTOM VIDEO PLAYER ────────────────────────────────── */
  .vid-wrap {
    position: relative;
    display: flex;
    max-width: 100%;
    max-height: 100%;
  }
  .vid-wrap video {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    pointer-events: none; /* let touches pass to overlay */
  }
  .vid-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
  }
  .vid-flash {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
  }
  .vid-flash-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(8,7,6,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: var(--text);
  }
  .vid-bar {
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    padding: 2rem 0.85rem 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    transition: opacity 0.4s var(--ease);
  }
  .vid-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
  }
  .vid-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: none;
    color: rgba(237,232,223,0.7);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
  }
  .vid-btn:hover { color: var(--gold); }
  .vid-time {
    font-family: var(--f-mono);
    font-size: 0.48rem;
    letter-spacing: 0.06em;
    color: rgba(237,232,223,0.5);
    flex: 1;
  }

  .modal-main iframe {
    width: 100%;
    height: 100%;
    border: none;
  }
  .modal-nav-arrows {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    pointer-events: none;
  }
  .modal-arrow {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text);
    pointer-events: all;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    cursor: none;
  }
  .modal-arrow:hover { background: rgba(200,169,110,0.12); border-color: var(--gold); color: var(--gold); }
  .modal-arrow:disabled { opacity: 0.2; pointer-events: none; }

  .iframe-controls {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 0.4rem;
    z-index: 20;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
  }
  .iframe-controls.visible { opacity: 1; pointer-events: all; }
  .iframe-ctrl-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: var(--muted);
    background: rgba(8,7,6,0.72);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: all;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    cursor: none;
  }
  .iframe-ctrl-btn:hover { background: rgba(200,169,110,0.12); border-color: var(--gold); color: var(--gold); }

  /* When faux-fs is active, controls must escape the stacking context */
  .modal-main.faux-fs ~ .iframe-controls {
    position: fixed !important;
    z-index: 10000 !important;
    bottom: 0.75rem;
    right: 0.75rem;
    opacity: 1 !important;
    pointer-events: all !important;
  }

  /* Faux fullscreen for iOS Safari (no native Fullscreen API for iframes) */
  .modal-main.faux-fs {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    height: 100dvh !important;
    padding: 0 !important;
    background: #000;
  }
  .modal-main.faux-fs iframe {
    width: 100%;
    height: 100%;
  }

  .modal-media-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s;
  }
  .modal-media-loader::after {
    content: '';
    width: 24px;
    height: 24px;
    border: 1.5px solid rgba(237,232,223,0.08);
    border-top-color: var(--muted);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
  }
  .modal-media-loader.hidden { opacity: 0; }
  .modal-filmstrip {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(0,0,0,0.6);
    flex-shrink: 0;
  }
  .modal-filmstrip::-webkit-scrollbar { display: none; }
  .modal-thumb-item {
    flex-shrink: 0;
    width: 56px;
    height: 42px;
    overflow: hidden;
    border: 1px solid transparent;
    opacity: 0.45;
    transition: opacity 0.25s, border-color 0.25s;
    cursor: none;
  }
  .modal-thumb-item.active { opacity: 1; border-color: var(--gold); }
  .modal-thumb-item img,
  .modal-thumb-item video { width: 100%; height: 100%; object-fit: cover; }
  .modal-thumb-item.video-th { position: relative; background: var(--surface2); }
  .film-vid-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .film-vid-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--muted);
    pointer-events: none;
    z-index: 1;
  }
  .modal-thumb-item.video-th.has-frame .film-vid-icon { display: none; }
  .modal-thumb-item.iframe-th {
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--f-mono);
    font-size: 0.45rem;
    color: var(--muted);
    text-align: center;
    padding: 4px;
  }

  .modal-counter {
    position: absolute;
    bottom: 62px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--f-mono);
    font-size: 0.55rem;
    letter-spacing: 0.12em;
    color: var(--muted);
    pointer-events: none;
  }

  /* ─── MODAL HANDLE ───────────────────────────────────────── */
  .modal-handle {
    display: none;
    flex-shrink: 0;
    height: 28px;
    align-items: center;
    justify-content: center;
    background: rgba(8,7,6,0.9);
  }
  .modal-handle::after {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: rgba(237,232,223,0.2);
  }

  /* ─── MODAL CAPTION ──────────────────────────────────────── */
  .modal-caption {
    flex-shrink: 0;
    padding: 0.45rem 1.5rem;
    background: rgba(0,0,0,0.55);
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    color: rgba(237,232,223,0.45);
    line-height: 1.4;
  }
  .modal-caption:empty { display: none; }

  /* ─── MODAL DOTS ─────────────────────────────────────────── */
  .modal-dots {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.5);
    flex-shrink: 0;
    flex-wrap: wrap;
  }
  .modal-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--dim);
    border: none;
    padding: 0;
    cursor: pointer;
    position: relative;
    transition: background 0.25s var(--ease), transform 0.25s var(--ease);
  }
  .modal-dot::after { content: ''; position: absolute; inset: -8px; }
  .modal-dot.active { background: var(--gold); transform: scale(1.5); }

  /* ─── ONBOARDING HINTS ──────────────────────────────────── */
  /* Swipe hint — centered over image */
  .modal-swipe-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    pointer-events: none;
    z-index: 15;
  }
  .swipe-chevrons {
    display: flex;
    gap: 5px;
    color: rgba(237,232,223,0.85);
  }
  .swipe-chevrons svg:last-child { opacity: 0.45; }
  @keyframes swipeNudge {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
  }
  .swipe-chevrons { animation: swipeNudge 1s ease-in-out infinite; }
  .swipe-hint-label {
    font-family: var(--f-mono);
    font-size: 0.42rem;
    letter-spacing: 0.22em;
    color: rgba(237,232,223,0.45);
    text-transform: uppercase;
  }
  /* Interactive hint — full overlay */
  .modal-iframe-hint {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    pointer-events: none;
    z-index: 15;
    background: rgba(8,7,6,0.32);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  .iframe-hint-icon {
    color: rgba(237,232,223,0.85);
    animation: cursorExplore 2s ease-in-out infinite;
  }
  .iframe-hint-label {
    font-family: var(--f-mono);
    font-size: 0.42rem;
    letter-spacing: 0.22em;
    color: rgba(237,232,223,0.45);
    text-transform: uppercase;
  }
  @keyframes cursorExplore {
    0%   { transform: translate(0, 0) rotate(0deg); }
    25%  { transform: translate(9px, -6px) rotate(6deg); }
    50%  { transform: translate(3px,  8px) rotate(-4deg); }
    75%  { transform: translate(-8px, 1px) rotate(3deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
  }

  .modal-info-col {
    display: flex;
    flex-direction: column;
    padding: 3.5rem 2.5rem 4.5rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
  }
  .modal-info-col::-webkit-scrollbar { width: 4px; }
  .modal-info-col::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

  .modal-type {
    font-family: var(--f-mono);
    font-size: 0.55rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 1.25rem;
  }
  .modal-title {
    font-family: var(--f-serif);
    font-size: clamp(1.6rem, 2.5vw, 2.4rem);
    font-weight: 300;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 1.5rem;
  }
  .modal-meta-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
  }
  .modal-meta-item {}
  .modal-meta-label {
    font-family: var(--f-mono);
    font-size: 0.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 0.2rem;
  }
  .modal-meta-value {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    color: var(--muted);
  }
  .modal-intro {
    font-family: var(--f-serif);
    font-size: 1.2rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.55;
    color: var(--text);
    border-left: 2px solid var(--gold);
    padding-left: 1.25rem;
    margin-bottom: 1.5rem;
  }
  .modal-intro:empty { display: none; }
  .modal-desc {
    font-family: var(--f-serif);
    font-size: 1.05rem;
    font-weight: 300;
    line-height: 1.7;
    color: var(--muted);
    margin-bottom: 2rem;
    flex: 1;
  }
  .modal-desc i, .modal-desc em { font-style: italic; color: var(--text); }
  .modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
  }
  .modal-tag {
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--border);
  }
  .modal-links-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
  }
  .modal-ext-link {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    letter-spacing: 0.1em;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: opacity 0.25s;
  }
  .modal-ext-link:hover { opacity: 0.7; }
  .modal-ext-link::before { content: '→'; }

  .modal-close-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--muted);
    z-index: 200;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
    cursor: none;
    touch-action: manipulation;
  }
  /* Expand hit area on touch without changing visual size */
  .modal-close-btn::before {
    content: '';
    position: absolute;
    inset: -10px;
  }
  .modal-close-btn:hover { border-color: var(--text); color: var(--text); background: rgba(237,232,223,0.05); }

  .modal-proj-nav {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 420px;
    display: flex;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }
  .modal-proj-btn {
    font-family: var(--f-mono);
    font-size: 0.56rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
    transition: color 0.3s;
    cursor: none;
  }
  .modal-proj-btn:hover { color: var(--text); }
  .modal-proj-btn:disabled { opacity: 0.2; pointer-events: none; }

  /* ─── UTILITIES ──────────────────────────────────────────── */
  .sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .reveal-item {
    opacity: 0;
    transform: translateY(28px);
  }

  /* ─── TOUCH DEVICES — no custom cursor ────────────────────── */
  @media (hover: none) and (pointer: coarse) {
    #cursor { display: none !important; }
    body { cursor: auto; }
    button { cursor: pointer; }
  }

  /* ─── RESPONSIVE ─────────────────────────────────────────── */
  @media (max-width: 1024px) {
    #modal { grid-template-columns: 1fr; grid-template-rows: 60vh 1fr; }
    .modal-media-col { border-right: none; border-bottom: 1px solid var(--border); }
    .modal-proj-nav { width: 100%; position: static; }
    .modal-info-col { padding: 2rem 1.75rem; }
  }
  @media (max-width: 768px) {
    #nav { padding: 1.25rem 1.5rem; }
    #masthead { padding: 5.5rem 1.5rem 2.5rem; }
    .mast-inner { flex-direction: column; align-items: flex-start; gap: 1.75rem; }
    .mast-aside { align-items: flex-start; gap: 1.5rem; }
    .mast-role { text-align: left; }
    #works { padding: 3rem 1.5rem 4rem; }
    #about { grid-template-columns: 1fr; gap: 2.5rem; padding: 3rem 1.5rem; }
    .about-right { padding-top: 0; }
    footer { padding: 2rem 1.5rem; flex-direction: column; gap: 1.25rem; text-align: center; }
    .footer-links { justify-content: center; }
    .work-grid { grid-template-columns: repeat(6, 1fr); gap: 1px; }
    /* Modal — scrollable column: image full width, info below */
    #modal { display: flex; flex-direction: column; overflow-y: auto; }
    .modal-handle { display: flex; }
    .modal-media-col { flex-shrink: 0; overflow: visible; border-right: none; border-bottom: 1px solid var(--border); }
    .modal-main { flex: none; height: auto; padding: 0; align-items: flex-start; }
    /* Iframes get a fixed 50vh slot on mobile */
    .modal-main:has(iframe) { height: 66vh; }
    .modal-main img,
    .modal-main video,
    .modal-main .vid-wrap { width: 100%; height: auto; max-height: none; }
    .modal-main .vid-wrap video { width: 100%; height: auto; max-height: none; }
    /* Filmstrip replaced by dots on mobile */
    .modal-filmstrip { display: none; }
    .modal-dots { display: flex; }
    /* Counter hidden — dots take over */
    .modal-counter { display: none; }
    /* Nav arrows hidden — swipe is primary navigation */
    .modal-nav-arrows { display: none !important; }
    /* Larger close button touch target (44px+ Apple HIG) */
    .modal-close-btn { width: 52px; height: 52px; font-size: 1.15rem; top: 0.75rem; right: 0.75rem; }
    .modal-info-col { padding: 1.5rem 1.25rem 5rem; overflow-y: visible; }
    .modal-proj-nav { position: fixed; bottom: 0; left: 0; right: 0; width: 100%; z-index: 6000; background: var(--bg); border-top: 1px solid var(--border2); }
    /* Gallery header — stack vertically, filters scroll horizontally */
    .section-head { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .section-head-right { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
    .cat-filters,
    .tag-filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
    .cat-filters::-webkit-scrollbar,
    .tag-filters::-webkit-scrollbar { display: none; }
  }
  @media (max-width: 480px) {
    .work-grid { grid-template-columns: 1fr 1fr; gap: 1px; }
  }

  /* ─── LAYOUT MODE SWITCHER ────────────────────────────────── */
  .section-head-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    flex-shrink: 0;
  }

  /* ─── WORKS GROUPS ───────────────────────────────────────── */
  .works-section-nav {
    display: flex;
    align-items: center;
    gap: 0;
  }
  .wsn-link {
    font-family: var(--f-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    position: relative;
    transition: color 0.25s;
    white-space: nowrap;
  }
  .wsn-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0.85rem;
    right: 0.85rem;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform 0.25s var(--ease);
  }
  .wsn-link:hover { color: var(--muted); }
  .wsn-link.active { color: var(--gold); }
  .wsn-link.active::after { transform: scaleX(1); }

  @media (max-width: 768px) {
    .works-section-nav { display: none; }
  }

  .works-group { margin-bottom: 3.5rem; }
  .works-group:last-child { margin-bottom: 0; }
  .works-group[hidden] { display: none !important; }
  .works-group-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5px;
  }
  .works-group-label {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .works-group-count {
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.1em;
    color: var(--dim);
  }

  /* ─── VERTICAL LAYOUT ────────────────────────────────────── */
  .work-grid.vertical-layout { grid-template-columns: repeat(3, 1fr); }
  .work-grid.vertical-layout .work-item { grid-column: span 1 !important; }
  .work-grid.vertical-layout .work-item .work-media { aspect-ratio: 3 / 4; }

  @media (max-width: 768px) {
    .work-grid.vertical-layout { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 480px) {
    .work-grid.vertical-layout { grid-template-columns: 1fr 1fr; }
    .work-grid.vertical-layout .work-item { grid-column: span 1 !important; }
  }

  /* ─── CONTACT MODAL ──────────────────────────────────────── */
  #contactModal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 7, 6, 0.88);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
    padding: 2rem;
  }
  #contactModal.open { opacity: 1; visibility: visible; }
  .contact-panel {
    background: var(--surface);
    border: 1px solid var(--border2);
    padding: 3rem;
    width: 100%;
    max-width: 540px;
    position: relative;
    transform: translateY(16px);
    transition: transform 0.4s var(--ease);
  }
  #contactModal.open .contact-panel { transform: translateY(0); }
  .contact-panel-label {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 2rem;
  }
  .contact-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 1.2rem;
    transition: color 0.25s;
    cursor: none;
  }
  .contact-close:hover { color: var(--text); }
  .contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
  .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .cf-field { display: flex; flex-direction: column; gap: 0.4rem; }
  .cf-label {
    font-family: var(--f-mono);
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .cf-input, .cf-textarea {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--f-sans);
    font-size: 0.85rem;
    font-weight: 300;
    padding: 0.7rem 0.9rem;
    outline: none;
    transition: border-color 0.25s;
    resize: none;
    width: 100%;
  }
  .cf-input:focus, .cf-textarea:focus { border-color: rgba(200,169,110,0.45); }
  .cf-textarea { min-height: 120px; }
  .cf-submit {
    font-family: var(--f-mono);
    font-size: 0.58rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--bg);
    background: var(--gold);
    padding: 0.8rem 1.8rem;
    border: none;
    cursor: none;
    transition: background 0.25s, opacity 0.25s;
    align-self: flex-start;
    margin-top: 0.25rem;
  }
  .cf-submit:hover { background: var(--gold-lt); }
  .cf-submit:disabled { opacity: 0.45; }
  .cf-status {
    font-family: var(--f-mono);
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    padding: 0.65rem 0.9rem;
    display: none;
  }
  .cf-status.ok  { display: block; color: #7ecfa0; border: 1px solid rgba(126,207,160,0.3); background: rgba(126,207,160,0.07); }
  .cf-status.err { display: block; color: #e07070; border: 1px solid rgba(224,112,112,0.3); background: rgba(224,112,112,0.07); }
  @media (max-width: 600px) {
    .contact-panel { padding: 2rem 1.5rem; }
    .cf-row { grid-template-columns: 1fr; }
  }