@font-face {
  font-family: 'SuisseIntl-Regular';
  src: url('./Fonts/SuisseIntl-Regular.woff2') format('woff2'),
       url('./Fonts/SuisseIntl-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'GreedExtended-Medium';
  src: url('./Fonts/GreedExtended-Medium.woff2') format('woff2'),
       url('./Fonts/GreedExtended-Medium.woff') format('woff'),
       url('./Fonts/GreedExtended-Medium.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

.homepage-header,
.homepage-header-link,
.profile-timeline,
.frame-left,
.project-info-desc1,
.acknowledgments-overlay,
.acknowledgments-intro,
.acknowledgments-name-item {
  font-family: var(--font-display);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.homepage-header {
  font-size: 2vw;
  line-height: 1em;
  letter-spacing: -2%;
  color: #cdcdcd;
  margin: 24px;
  text-align: left;
  position: absolute;
  top: 0;
}

.homepage-header-link, .profile-timeline {
  font-size: 2.1vw;
  line-height: 1em;
  letter-spacing: -2%;
  color: #cdcdcd;
}

.homepage-header-link:hover {
  color: #666;
}



/* Loader Overlay */
.loader-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(245,245,245,1);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.33, 0, 0.35, 1);
  opacity: 1;
  pointer-events: all;
}

/* Timeline container */
.profile-timeline ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Each timeline entry as a flex row */
.profile-timeline li {
  display: flex;
  align-items: center;
  padding: 1px 0;
  border-top: 0px solid #ececec;
}

/* Years column: left, fixed width */
.timeline-years {
  flex: 2;
  width: auto;
}

/* Role column: right, fills space, right aligned */
.timeline-role {
  flex: 1;
  text-align: right;
  min-width: 80%;

}
.profile {
  position: absolute;
  bottom: 0;
  margin-bottom: 24px;

  width: calc(100% - 48px);
  z-index: 1000;
  border-radius: 0.75rem;
}

section {
  font-size: .7rem;
  line-height: 1.35;
  color: #ababab;
}

.loader-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}


:root {
  --font-primary: 'SuisseIntl-Regular', Arial, sans-serif;
  --font-display: 'GreedExtended-Medium', Arial, sans-serif;
  --gridSize: 3;
  --ease-in: cubic-bezier(0.33, 0, 0.35, 1);
  --ease-out: cubic-bezier(0.33, 0, 0.35, 1);
  --ease-in-out: cubic-bezier(0.33, 0, 0.35, 1);
  transition: --zoom 1.6s cubic-bezier(0.88, 0, 0.1, 1);
  /* Single value controlling all card corner radii.
     Gallery cells and the grow transition derive from --card-radius.
     Detail (zoomed-in) view uses half that value. */
  --card-radius: 2.8rem;
  --detail-radius: calc(var(--card-radius) / 1.5);
  /* Gallery grid gutter — reused as project-detail image gap on mobile */
  --gap: 1.5rem;
}

html,
body {
  width: 100%;
  min-height: 100%;
  box-sizing: border-box;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
  overflow-x: hidden;
  background-color: inherit;
}

body {
  color: inherit;
  background: #f5f5f5;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Allow scrolling when in project detail mode */
html.project-detail-active body {
  overflow: visible;
}

*,
*::before,
*::after {
  box-sizing: inherit;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  margin: 0;
  padding: 0;
  position: relative;
  border: none;
  font: inherit;
  vertical-align: baseline;
}

html {
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
}

section,
.frame-left2,
.frame-right2,
.frame-scroll-hint,
.frame-info-link,
.project-info-content,
.project-info-desc2,
.project-info-tags li,
.project-info-meta,
.project-info-label,
.project-info-value,
.site-nav,
section,
.frame-left2,
.frame-right2,
.frame-scroll-hint,
.frame-info-link,
.project-info-content,
.project-info-desc2,
.project-info-tags li,
.project-info-meta,
.project-info-label,
.project-info-value,
.nav-btn {
  font-family: var(--font-primary);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@supports (font: -apple-system-body) {
  .site-nav,
  section,
  .frame-left2,
  .frame-right2,
  .frame-scroll-hint,
  .frame-info-link,
  .project-info-content,
  .project-info-desc2,
  .project-info-tags li,
  .project-info-meta,
  .project-info-label,
  .project-info-value,
  .nav-btn {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
  }
}

@supports not (font: -apple-system-body) {
  .site-nav,
  section,
  .frame-left2,
  .frame-right2,
  .frame-scroll-hint,
  .frame-info-link,
  .project-info-content,
  .project-info-desc2,
  .project-info-tags li,
  .project-info-meta,
  .project-info-label,
  .project-info-value,
  .nav-btn {
    font-weight: 400;
    font-style: normal;
    font-synthesis: none;
    font-synthesis-weight: none;
    text-rendering: auto;
  }
}

img {
  display: block;
  width: 100%;
  height: 100%;
}

/* Hide scrollbars globally except for project detail view */
body:not(.project-detail-active) ::-webkit-scrollbar,
html:not(.project-detail-active) ::-webkit-scrollbar {
  display: none;
}

.visuallyhidden {
  border: 0;
  clip: rect(1px 1px 1px 1px);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.visuallyhidden.focusable:focus,
.visuallyhidden.focusable:active {
  clip: auto;
  height: 100%;
  text-align: center;
  margin: auto;
  padding: 20px;
  width: 100%;
  color: inherit;
  background: inherit;
  overflow: visible;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  outline: none;
}



button,
input {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

.viewport {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  transform: scale3d(var(--zoom), var(--zoom), 1);
  transform-origin: center;
  transition: transform 1.6s cubic-bezier(0.88, 0, 0.1, 1), opacity 1.6s var(--ease-in);
  opacity: 1;
  z-index: 4;
  will-change: transform;
}

.open .viewport {
  transform: scale3d(.99, .985, 1);
  transition: transform 1.6s cubic-bezier(0.88, 0, 0.1, 1), opacity 1.6s var(--ease-in);
}

.loading .viewport {
  opacity: 0;
  pointer-events: none;
}

.loaded .viewport {
  opacity: 1;
}

.frame-overlay {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100000;
  pointer-events: none;
  border-radius: 2rem;
  width: calc(100vw * var(--zoom, 0.375));
  height: calc(100vh * var(--zoom, 0.375));
  opacity: 1;
  /* SKIPPED: width/height animation — transform replacement not safe here
     (flex children reposition to frame edges based on actual computed width;
     scale() would also scale the text labels inside) */
  transition: width 1.6s cubic-bezier(0.88, 0, 0.1, 1), height 1.6s cubic-bezier(0.88, 0, 0.1, 1);
  will-change: width, height;
}

.frame-left-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .2rem;
}

.frame-left-group:has(.frame-left br) {
  gap: 1em;
}


.frame-right-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .35rem;
}

.frame-right-row {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.frame-left2, .frame-right2 {
  padding: 0 .8rem 0 0;
  font-size: .65rem;
  color: #ffffff;
  transition: color 1.6s var(--ease-in-out), padding 1.6s var(--ease-in-out);
}

/* Windows-only optical baseline nudge — Suisse sits higher than Greed in flex rows
   (uses html.is-windows class set by inline head script — @supports / -ms- queries
   match Mac Chrome or are IE-only) */
html.is-windows .frame-left2,
html.is-windows .frame-right2,
html.is-windows .frame-scroll-hint,
html.is-windows .frame-info-link {
  position: relative;
  top: 1px;
}

/* Scroll hint — beside left-frame text, only in project detail view, dismissed on first scroll */
.frame-scroll-hint {
  display: none;
  font-size: .65rem;
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s var(--ease-in-out);
}

html.project-detail-active .frame-scroll-hint {
  display: inline;
  opacity: 0.4;
}

html.scroll-hint-dismissed .frame-scroll-hint {
  opacity: 0;
  transition: opacity 0.6s var(--ease-in-out);
}

@media (max-width: 800px) {
  html.project-detail-active .frame-scroll-hint {
    display: none;
  }
}

/* Info toggle link — only rendered in project detail view */
.frame-info-link {
  padding: .6rem 1.2rem .6rem .6rem;
  margin: -.6rem -1.2rem -.6rem -.6rem;
  font-size: .65rem;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
  background: none;
  border: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s var(--ease-in-out);
}

html.project-detail-active .frame-info-link {
  opacity: 1;
  pointer-events: auto;
}

.open .frame-info-link {
  padding: 0 2 0 0;
}


.open .frame-right2 {
  padding: 0 2rem 0 0;
}

.frame-left {
  padding: 0 0 0 .9rem;
  font-size: .65rem;
  text-transform: uppercase;
  color: #ffffff;
  transition: color 1.6s var(--ease-in-out), padding 1.6s var(--ease-in-out);
}

.open .frame-left {
  padding: 0 0 0 2rem;
}


/* Homepage state - darker text color */
html:not(.gallery-active) .frame-overlay .frame-left,
html:not(.gallery-active) .frame-overlay .frame-left2,
html:not(.gallery-active) .frame-overlay .frame-right2,
html.loading .frame-overlay .frame-left,
html.loading .frame-overlay .frame-left2,
html.loading .frame-overlay .frame-right2 {
  color: #585858;
}

html:not(.gallery-active) .frame-overlay .frame-right2,
html.loading .frame-overlay .frame-right2 {
  color: #adadad;
}

.frame-left::after {
  content: "";
}

/* Remove comma after the last item */
.frame-left2::after,
.frame-right2::after {
  content: "";
}

.open .bottom-container {
  opacity: 0;
}

.bottom-container {
  position: absolute;
  height: 8rem;
  width: 100%;
  bottom: 0rem;
  z-index: 19;
    background: linear-gradient(
    to bottom,
    rgba(245, 245, 245, 0) 0%,
    rgba(245, 245, 245, 0.15) 50%,
    rgba(245, 245, 245, 0.3) 65%,
    rgba(245, 245, 245, 0.5) 75.5%,
    rgba(245, 245, 245, 0.7) 82.85%,
    rgba(245, 245, 245, 0.85) 88%,
    #f5f5f5 100%
  );
  transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1); /* standard ease-in-out */
}

.chevron-back {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 99;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  min-width: 48px;
  min-height: 48px;
  padding: 12px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html.project-detail-active .chevron-back {
  opacity: 1;
  pointer-events: auto;
}

.chevron-back svg {
  display: block;
  width: 24px;
  height: 24px;
  color: #ffffff;
}

.homepage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 101;
  opacity: 1;
  transition: opacity 1.6s var(--ease-in-out);
}

.homepage-blank .homepage-content {
  pointer-events: none;
}


.homepage-content {
  width: calc(100vw * var(--zoom, 0.275));
  height: calc(100vh * var(--zoom, 0.275));
  text-align: center;
  border-radius: calc(var(--card-radius) * var(--zoom, 0.275));
  box-sizing: border-box;
  border: 1px solid #ececec;
  cursor: pointer;
  transition: background-color 1.2s var(--ease-in);


}

.homepage-content:hover {
  background-color: rgb(255, 255, 255);
}

html.homepage-blank .homepage-header,
html.homepage-blank .profile {
  opacity: 0;
}

html.gallery-active .homepage-header,
html.gallery-active .profile {
  opacity: 0;
    transition: opacity 1.6s var(--ease-in-out);
}

.gallery-active .homepage {
  opacity: 0;
  pointer-events: none;
}

.panning,
.panning * {
  pointer-events: none !important;
}

.canvas {
  --x: 0;
  --y: 0;
  position: absolute;
  display: grid;
  grid-template-columns: repeat(var(--gridSize), 100vw);
  width: fit-content;
  gap: var(--gap);
  margin: auto;
  transform: translate3d(calc((-100vw * var(--x, 0)) - (var(--gap) * var(--x, 0))), calc((-100vh * var(--y, 0)) - (var(--gap) * var(--y, 0))), 0);
  transition: transform 1.2s var(--ease-in-out);
  transform-origin: left top;
  z-index: 5;
}

.panning .viewport,
.panning .canvas {
  will-change: transform, opacity;
}

.canvas div {
  width: 100vw;
  height: 100vh;
  border-radius: var(--card-radius);
  corner-shape: squircle;
  opacity: 0.12;
  overflow: hidden;
  background-color: #ffffff;
  transition: opacity 0.6s var(--ease-in-out);
  cursor: pointer;
}

.canvas img {
  position: absolute;
  transform: scale3d(1.4, 1.4, 1.4);
  transition:
    transform 1.6s cubic-bezier(0.88, 0, 0.1, 1),
    opacity 0.6s cubic-bezier(0.33, 0, 0.35, 1),
    filter 0.4s ease;
  will-change: transform, opacity;
  object-fit: cover;
  overflow: hidden;
  outline: none;
  border-radius: 2rem;
  user-select: none;
  pointer-events: none;
  opacity: 0;
}

/* ── Canvas Gallery Renderer ──────────────────────────────────────────────── */

/* ── Unified Canvas Renderer ──────────────────────────────────────────────── */

/* Single canvas element, sibling of .viewport (outside any CSS-transformed
   ancestor). position:fixed anchors it to the true screen viewport so that
   getBoundingClientRect() coords map 1:1 to canvas draw coords. z-index:6
   places it above the gallery grid (z-5) and below .project-detail-view
   (z-98), which is intentionally transparent — the canvas shows through.
   pointer-events are toggled in JS (auto when gallery active, none otherwise). */
#main-canvas {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 6;
  display: block;
  pointer-events: none;
}

/* When the gallery canvas layer is active:
   - Hide the DOM grid (visibility:hidden preserves layout and keeps CSS
     transitions + getBoundingClientRect() working for proxy reads)
   - Disable the focus button so canvas click handler owns all interaction */
html.gallery-canvas-active .canvas,
html.loading .canvas {
  visibility: hidden;
}

html.gallery-canvas-active .focus {
  pointer-events: none !important;
}

/* When the project detail canvas layer is active:
   Hide only .project-images-inner (the image stack) — NOT the scroll container.
   visibility:hidden on the container would make it non-hittable so wheel events
   would never reach the Lenis wrapper and scrolling would break.
   .project-images-container stays visible (transparent) so Lenis keeps
   receiving wheel events. DOM overlays (.gradient-overlay) remain as real DOM elements. */
html.project-detail-canvas-active .project-images-inner {
  visibility: hidden;
}

/* Hide the scrollbar while the canvas renderer is active — the container is
   transparent but still has content height, so the scrollbar would otherwise
   show as a grey strip on the right edge. */
html.project-detail-canvas-active .project-images-container {
  scrollbar-width: none;
}
html.project-detail-canvas-active .project-images-container::-webkit-scrollbar {
  display: none;
}

/* Windows: hide native scrollbars in detail view — scroll meter is the affordance */
html.is-windows.project-detail-active,
html.is-windows.project-detail-active body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.is-windows.project-detail-active::-webkit-scrollbar,
html.is-windows.project-detail-active body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html.is-windows.project-detail-active .project-images-container,
html.is-windows.project-detail-active .project-info-content {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html.is-windows.project-detail-active .project-images-container::-webkit-scrollbar,
html.is-windows.project-detail-active .project-info-content::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

/* ── End Unified Canvas Renderer ──────────────────────────────────────────── */

.gallery-active .canvas img {
  filter: grayscale(100%);
}

.gallery-active .canvas .selected img {
  filter: grayscale(0%) brightness(1);
}

.canvas img.loaded {
  opacity: 1;
}

.canvas .selected {
  opacity: 1;
  transition: opacity 0.6s var(--ease-in-out);
  pointer-events: none;
}

.open .canvas .selected img {
  transform: scale3d(1, 1, 1);
  filter: grayscale(0%) brightness(0.92);
  transition: transform 1.6s cubic-bezier(0.88, 0, 0.1, 1), filter 1.6s cubic-bezier(0.88, 0, 0.1, 1);
}

.focus-container {
  display: flex;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 6;
  pointer-events: none;
}

.focus-container .focus {
  pointer-events: all;
}

.focus {
  width: 100%;
  height: 100%;
  transform: scale(0.375);
  margin: auto;
  border-radius: var(--card-radius);
  corner-shape: squircle;
  border: 2px solid whitesmoke;
  backface-visibility: hidden;
  overflow: hidden;
  user-select: none;
  cursor: zoom-in;
}

.open .focus {
  cursor: zoom-out;
}

.open .focus-container {
  opacity: 0;
}

/* Scroll Meter Component */
.scroll-meter-container {
  position: fixed;
  top: 50.1%;
  left: 50.08%;
  transform: translate(-50%, -50%);
  width: 3.5vw;
  height: 3.5vw;
  z-index: 999; /* Behind crosshair */
  pointer-events: none;
  opacity: 0;
}

.scroll-meter-circle {
  display: block;
  width: 100%;
  height: 100%;
}

.scroll-meter {
	position: absolute;
	margin: auto;
	display: block;
  opacity: 1;
}

.scroll-meter-circle circle {
  stroke-dashoffset: var(--scroll-progress, 125.66);
}

/* Show scroll meter only in project detail view */
html.project-detail-active .scroll-meter-container {
  opacity: 1;
}

/* Show progress circle during zoom transitions - start at 10% opacity */
html.progress-circle-visible .scroll-meter-container {
  opacity: 0.2;
  transition: opacity 0.3s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Full opacity when in project detail view */
html.project-detail-active.progress-circle-visible .scroll-meter-container {
  opacity: 1;
  transition: opacity 0.5s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Crosshair Component */
.crosshair-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 8px;
  z-index: 1000;
  pointer-events: none;
  transition: transform 1.6s cubic-bezier(0.88, 0, 0.1, 1);
  transform-origin: center;
  will-change: transform;
  --crosshair-rotation: 0deg;
}

.crosshair-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  transition: opacity 1.6s cubic-bezier(0.88, 0, 0.1, 1), background-color 1.6s cubic-bezier(0.88, 0, 0.1, 1);
}

/* Triangle formation positioning - default: two dots on bottom */
.crosshair-dot-1 {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.crosshair-dot-2 {
  bottom: 0;
  left: 25%;
  transform: translateX(-50%);
}

.crosshair-dot-3 {
  bottom: 0;
  right: 25%;
  transform: translateX(50%);
}

/* Initial page-loading state — crosshair spins above the overlay, dots show progress */
@keyframes crosshair-loader-spin {
  from { transform: translate(-50%, -50%);}
  to   { transform: translate(-50%, -50%);}
}

html.page-loading .crosshair-container {
  animation: crosshair-loader-spin 10s linear infinite;
  z-index: 100001;
  opacity: 1;
}

html.page-loading .crosshair-dot {
  background-color: #333;
  transition: opacity 0.3s ease;
}

html.page-loading .crosshair-dot-1,
html.page-loading .crosshair-dot-2,
html.page-loading .crosshair-dot-3 {
  opacity: 0.2;
}

/* Homepage state — applies both after initial load settles and on back-navigation */
html:not(.gallery-active):not(.page-loading) .crosshair-container {
  transform: translate(-50%, -50%) rotate(0deg);
}

html:not(.gallery-active):not(.page-loading) .crosshair-dot {
  background-color: #CDCDCD;
}

html:not(.gallery-active):not(.page-loading) .crosshair-dot-1 {
  opacity: 1;
}

html:not(.gallery-active):not(.page-loading) .crosshair-dot-2,
html:not(.gallery-active):not(.page-loading) .crosshair-dot-3 {
  opacity: 0.4;
}

/* Gallery state - #FFFFFF color, 2 dots full opacity, 1 dot 40% */
html.gallery-active:not(.open) .crosshair-container {
  transform: translate(-50%, -50%) rotate(120deg);
}

html.gallery-active:not(.open) .crosshair-dot {
  background-color: #FFFFFF;
}

html.gallery-active:not(.open) .crosshair-dot-3 {
  opacity: 0.3;
}

html.gallery-active:not(.open) .crosshair-dot-2,
html.gallery-active:not(.open) .crosshair-dot-1 {
  opacity: 1;
}

/* Open viewport state - #FFFFFF color, all dots full opacity, rotated so 2 dots on top */
html.open .crosshair-container {
  transform: translate(-50%, -50%) rotate(240deg) rotate(60deg);
}

html.open .crosshair-dot {
  background-color: #FFFFFF;
  opacity: 1;
}

.loaded .crosshair-container {
  opacity: 1;
}

@media (max-width: 800px) {
  /* Align scroll ring with crosshair anchor */
  .crosshair-container,
  .scroll-meter-container {
    top: 50%;
    left: 50%;
    transform: translate(-47%, -50%);
  }

  html.project-detail-active .scroll-meter-container,
  html.progress-circle-visible .scroll-meter-container {
    width: 3rem;
    height: 3rem;
  }

  html.project-detail-active .scroll-meter-circle circle:first-of-type {
    stroke-width: 1;
    opacity: 0.35;
  }

  html.project-detail-active .scroll-meter-circle circle:last-of-type {
    stroke-width: 1.5;
  }

  html.project-detail-active .crosshair-container {
    width: 14px;
    height: 10px;
  }

  html.project-detail-active .crosshair-dot {
    width: 4px;
    height: 4px;
  }

  /* Mobile: stack frame-left above frame-right2 (year), centered in the frame */
  .frame-overlay {
    padding-left: .9rem;
    padding-right: .9rem;
    padding-top: 8rem;
    line-height: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    text-align: center;
    border-radius: .8rem;
    transition: opacity 1.6s cubic-bezier(0.4, 0, 0.2, 1), padding 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .frame-left-group,
  .frame-right-group,
  .frame-right-row {
    display: contents;
  }

  .frame-left {
    order: 1;
  }

  .frame-right2 {
    order: 2;
  }

  .frame-left2 {
    order: 3;
  }

  .frame-info-link {
    order: 4;
  }

  .frame-scroll-hint {
    order: 5;
  }

  .frame-left,
  .frame-left2,
  .frame-right2,
  .frame-info-link {
    padding-left: 0;
    padding-right: 0;
    line-height: 1.3;
  }

  .frame-info-link {
    margin: 0;
    padding-top: 0.5rem;
    padding-bottom: 0;
  }

  html.gallery-active .frame-overlay {
    padding-left: 1rem;
    padding-right: 1rem;
    transform: translate(-50%, -50%);
    transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
  }

  html.open .frame-overlay,
  html.project-detail-transitioning .frame-overlay,
  html.project-detail-fading .frame-overlay {
    padding-left: 1rem;
    padding-right: 1rem;
    top: calc(var(--vv-top) + var(--cell-offset-y));
    left: calc(var(--vv-left) + var(--cell-offset-x));
    width: var(--cell-w, calc(99vw * var(--zoom, 1)));
    height: var(--cell-h, calc(98dvh * var(--zoom, 1)));
    transform: none;
    justify-content: flex-start;
    padding-top: 2rem;
    opacity: 0;
    transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  html.project-detail-active .frame-overlay {
    padding-left: 1rem;
    padding-right: 1rem;
    top: calc(var(--vv-top) + var(--cell-offset-y));
    left: calc(var(--vv-left) + var(--cell-offset-x));
    width: var(--cell-w, calc(99vw * var(--zoom, 1)));
    height: var(--cell-h, calc(98dvh * var(--zoom, 1)));
    transform: none;
    justify-content: flex-start;
    padding-top: 2rem;
    opacity: 1;
    transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Pin labels to the cell top — decoupled from overlay width/height changes */
  html.open .frame-overlay .frame-left,
  html.open .frame-overlay .frame-left2,
  html.open .frame-overlay .frame-right2,
  html.open .frame-overlay .frame-info-link,
  html.open .frame-overlay .frame-scroll-hint,
  html.project-detail-transitioning .frame-overlay .frame-left,
  html.project-detail-transitioning .frame-overlay .frame-left2,
  html.project-detail-transitioning .frame-overlay .frame-right2,
  html.project-detail-transitioning .frame-overlay .frame-info-link,
  html.project-detail-transitioning .frame-overlay .frame-scroll-hint,
  html.project-detail-fading .frame-overlay .frame-left,
  html.project-detail-fading .frame-overlay .frame-left2,
  html.project-detail-fading .frame-overlay .frame-right2,
  html.project-detail-fading .frame-overlay .frame-info-link,
  html.project-detail-fading .frame-overlay .frame-scroll-hint,
  html.project-detail-active .frame-overlay .frame-left,
  html.project-detail-active .frame-overlay .frame-left2,
  html.project-detail-active .frame-overlay .frame-right2,
  html.project-detail-active .frame-overlay .frame-info-link,
  html.project-detail-active .frame-overlay .frame-scroll-hint {
    position: fixed;
    left: calc(var(--vv-left, 0px) + var(--cell-offset-x, 0px) + var(--cell-w, 99vw) / 2);
    transform: translateX(-50%);
    width: max-content;
    max-width: calc(var(--cell-w, 99vw) - 2rem);
    margin: 0;
  }

  html.open .frame-overlay .frame-left,
  html.project-detail-transitioning .frame-overlay .frame-left,
  html.project-detail-fading .frame-overlay .frame-left,
  html.project-detail-active .frame-overlay .frame-left {
    top: calc(var(--vv-top, 0px) + var(--cell-offset-y, 0px) + 2rem);
  }

  html.open .frame-overlay .frame-right2,
  html.project-detail-transitioning .frame-overlay .frame-right2,
  html.project-detail-fading .frame-overlay .frame-right2,
  html.project-detail-active .frame-overlay .frame-right2 {
    top: calc(var(--vv-top, 0px) + var(--cell-offset-y, 0px) + 2rem + 1.3em);
  }

  html.open .frame-overlay .frame-left2,
  html.project-detail-transitioning .frame-overlay .frame-left2,
  html.project-detail-fading .frame-overlay .frame-left2,
  html.project-detail-active .frame-overlay .frame-left2 {
    top: calc(var(--vv-top, 0px) + var(--cell-offset-y, 0px) + 2rem + 2.6em);
  }

  html.open .frame-overlay .frame-info-link,
  html.project-detail-transitioning .frame-overlay .frame-info-link,
  html.project-detail-fading .frame-overlay .frame-info-link,
  html.project-detail-active .frame-overlay .frame-info-link {
    top: calc(var(--vv-top, 0px) + var(--cell-offset-y, 0px) + 2rem + 3.9em);
    pointer-events: auto;
  }

  html.open .frame-overlay .frame-scroll-hint,
  html.project-detail-transitioning .frame-overlay .frame-scroll-hint,
  html.project-detail-fading .frame-overlay .frame-scroll-hint,
  html.project-detail-active .frame-overlay .frame-scroll-hint {
    top: calc(var(--vv-top, 0px) + var(--cell-offset-y, 0px) + 2rem + 5.2em);
  }

  /* Info open: hide frame labels; Close on .frame-info-link still dismisses */
  html.info-active.project-detail-active .frame-left,
  html.info-active.project-detail-active .frame-left2,
  html.info-active.project-detail-active .frame-right2 {
    display: none;
  }


  /* Frame labels: hidden during zoom; fade in when project-detail-active */
  html.open .frame-overlay .frame-left,
  html.open .frame-overlay .frame-left2,
  html.open .frame-overlay .frame-right2,
  html.open .frame-overlay .frame-info-link,
  html.open .frame-overlay .frame-scroll-hint,
  html.project-detail-transitioning .frame-overlay .frame-left,
  html.project-detail-transitioning .frame-overlay .frame-left2,
  html.project-detail-transitioning .frame-overlay .frame-right2,
  html.project-detail-transitioning .frame-overlay .frame-info-link,
  html.project-detail-transitioning .frame-overlay .frame-scroll-hint {
    opacity: 0;
  }

  html.project-detail-active .frame-overlay .frame-left,
  html.project-detail-active .frame-overlay .frame-left2,
  html.project-detail-active .frame-overlay .frame-right2,
  html.project-detail-active .frame-overlay .frame-info-link,
  html.project-detail-active .frame-overlay .frame-scroll-hint {
    opacity: 1;
    transition: opacity .6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  html.project-detail-fading .frame-overlay .frame-left,
  html.project-detail-fading .frame-overlay .frame-left2,
  html.project-detail-fading .frame-overlay .frame-right2,
  html.project-detail-fading .frame-overlay .frame-info-link,
  html.project-detail-fading .frame-overlay .frame-scroll-hint {
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Frame labels: instant layout during zoom only — must not override opacity fade on active */
  .frame-left-group,
  .frame-right-group,
  html.open:not(.project-detail-active) .frame-overlay .frame-left,
  html.open:not(.project-detail-active) .frame-overlay .frame-left2,
  html.open:not(.project-detail-active) .frame-overlay .frame-right2,
  html.open:not(.project-detail-active) .frame-overlay .frame-info-link,
  html.open:not(.project-detail-active) .frame-overlay .frame-scroll-hint,
  html.project-detail-transitioning .frame-overlay .frame-left,
  html.project-detail-transitioning .frame-overlay .frame-left2,
  html.project-detail-transitioning .frame-overlay .frame-right2,
  html.project-detail-transitioning .frame-overlay .frame-info-link,
  html.project-detail-transitioning .frame-overlay .frame-scroll-hint {
    transition-property: color, padding;
    transition-duration: 0s;
  }


  .open .frame-right2 {
  padding: 0 0rem 0 0;
}

.frame-left::after {
  content: "";
  margin-right: 0;
}

.open .frame-left {
  padding: 0 0 0 0rem;
}

  /* homepage-content border-radius inherits the calc(2rem * var(--zoom)) expression */

  .frame-left {
    padding: 0;
  }

}

/* Project Detail View Styles */
.project-detail-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s cubic-bezier(0.88, 0, 0.1, 1);
  transform: scale(1);
}

/* Transitioning state - reduce opacity to reveal canvas transition */
.project-detail-transitioning .project-detail-view {
  opacity: 0.3;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Fade out current project images before transition */
.project-detail-transitioning .project-detail-image {
  opacity: 0 !important;
  transition: opacity 0.3s cubic-bezier(0.33, 0, 0.35, 1) !important;
}

/* Disable scrolling during transition */
.project-detail-transitioning .project-images-container {
  pointer-events: none;
  overflow: hidden;
}

/* Active state with smooth fade-in */
.project-detail-active .project-detail-view {
  opacity: 1;
  pointer-events: all;
  transform: scale(1);
  transition: opacity 0.8s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Fading state for smooth exit transition */
.project-detail-fading .project-detail-view {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Fade the info link out quickly at close start — must complete before
   the zoom-out kicks in at t=600ms (project-detail-fading lasts 400ms). */
html.project-detail-fading .frame-info-link {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-in-out);
}

html.project-detail-fading .project-info-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease-in-out);
}

.project-detail-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  
}

.project-images-wrapper {
  position: relative;
  width: calc(99vw * var(--zoom, 0.375));
  height: calc(98vh * var(--zoom, 0.375));
  flex-shrink: 0;
  /* SKIPPED: width/height animation — transform replacement not safe here
     (overflow-y scroll container computes range from actual layout height;
     absolute-positioned .project-text depends on real dimensions) */
  transition: width 1.6s cubic-bezier(0.88, 0, 0.1, 1), height 1.6s cubic-bezier(0.88, 0, 0.1, 1);
}

.project-images-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: var(--detail-radius);
  corner-shape: squircle;
  scroll-behavior: smooth;
}


/* Gradient overlay — bottom fade above project detail images */
.gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 349;
  pointer-events: none;
  border-radius: 0 0 var(--detail-radius) var(--detail-radius);

  background: linear-gradient(
    to top,
    #111111 0%,
    rgba(17, 17, 17, 0.738) 19%,
    rgba(17, 17, 17, 0.541) 34%,
    rgba(17, 17, 17, 0.382) 47%,
    rgba(17, 17, 17, 0.278) 56.5%,
    rgba(17, 17, 17, 0.194) 65%,
    rgba(17, 17, 17, 0.126) 73%,
    rgba(17, 17, 17, 0.075) 80.2%,
    rgba(17, 17, 17, 0.042) 86.1%,
    rgba(17, 17, 17, 0.021) 91%,
    rgba(17, 17, 17, 0.008) 95.2%,
    rgba(17, 17, 17, 0.002) 98.2%,
    transparent 100%
  );

  /* Tweak handles — adjust these to reshape the fade */
  --gradient-overlay-opacity: .1;
  --gradient-overlay-start: 50%;
  --gradient-overlay-end: 100%;

  opacity: var(--gradient-overlay-opacity);
}



.project-images-container::-webkit-scrollbar {
  width: 8px;
}

.project-images-container::-webkit-scrollbar-track {
  background: #d2d2d2;
  border-radius: 4px;
}

.project-images-container::-webkit-scrollbar-thumb {
  background: #d2d2d2;
  border-radius: 4px;
}

.project-images-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Project Info Overlay — fullscreen gradient overlay, toggled by .frame-info-link */
.project-info-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 1) 100%
  );
  transition: opacity 0.6s var(--ease-in-out);
}

html.info-active .project-info-overlay {
  cursor: pointer;
  opacity: 1;
  pointer-events: auto;
}

.project-info-content {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.6s var(--ease-in-out);
}

html.info-active .project-info-content {
  opacity: 1;
}

.project-info-desc1 {
  color: #fff;
  font-size: 32px;
  line-height: 100%;
  max-width: 60vw;
}

.project-info-desc-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 3rem;
  flex-wrap: nowrap;
}

.project-info-desc2 {
  color: #fff;
  font-size: .7rem;
  line-height: 1.4;
  max-width: 22rem;
  flex-shrink: 0;
}

/* Tags list — sits alongside desc2 */
.project-info-tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}

.project-info-tags li {
  color: rgba(255, 255, 255, 0.6);
  font-size: .7rem;
  line-height: 1.4;
}

.project-info-meta {
  display: flex;
  flex-direction: row;
  gap: 3rem;
  font-size: .7rem;
  line-height: 1.4;
  flex-shrink: 0;
}

.project-info-cell {
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.project-info-label {
  display: block;
  color: rgba(255, 255, 255, 0.6);
}

.project-info-value {
  display: block;
  color: #fff;
}

/* Project frame turns black while info overlay is open */
body {
  transition: background-color 1.6s var(--ease-in-out);
}

/* ── Project-open background ─────────────────────────────────────────────────
   Turns body black the moment a project is opened (html.open fires with the
   zoom-in). To revert: delete the two rules below (html.open body and
   html.project-detail-active body). The transition on `body` above can also
   be removed if you no longer need the animated crossfade.
   ────────────────────────────────────────────────────────────────────────── */
html.open body {
  background-color: #000000;
}

html.project-detail-active body {
  background-color: #000;
}

html.info-active body {
  background-color: #000;
}

/* Hide chevron-back while info overlay is open — close link replaces it */
html.info-active .chevron-back {
  opacity: 0;
  pointer-events: none;
}

.project-detail-image {
  width: 99vw;
  height: 98vh;
  margin-bottom: .5rem;
  border-radius: var(--detail-radius);
  corner-shape: squircle;
  object-fit: cover;
  filter: brightness(0.92); /* 10% black overlay for text visibility */
  transition: opacity 1.6s cubic-bezier(0.33, 0, 0.35, 1);
  opacity: 0;
}

.project-detail-image.loaded {
  opacity: 1;
}

.project-detail-image:last-child {
  margin-bottom: 0;
}

/* Hide other elements when in project detail view */
.project-detail-active .viewport,
.project-detail-active .focus-container {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s cubic-bezier(0.33, 0, 0.35, 1);
}

/* During transition, keep canvas visible for seamless swap */
.project-detail-transitioning .viewport {
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Ensure canvas image remains visible during asset swap */
.project-detail-transitioning .canvas .selected img {
  opacity: 1;
  transition: opacity 0.3s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Smooth fade-out for return transition */
.project-detail-fading .viewport,
.project-detail-fading .focus-container {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s cubic-bezier(0.33, 0, 0.35, 1);
}

/* Update crosshair for project detail state */
html.project-detail-active .crosshair-container {
  transform: translate(-50%, -50%) rotate(120px);
}

html.project-detail-active .crosshair-dot {
  background-color: #ffffff;
  opacity: 1;
}

/* Update frame overlay for project detail state */
html.project-detail-active .frame-overlay .frame-left,
html.project-detail-active .frame-overlay .frame-left2,
html.project-detail-active .frame-overlay .frame-right2 {
  color: #fff;
}

/* Zoom-out cursor in detail view */
html.project-detail-active .project-detail-view,
html.project-detail-active .project-images-container,
html.project-detail-active .project-detail-image {
  cursor: zoom-out;
}

html.open {
  cursor: zoom-out;
}

@media (max-width: 800px) {
  /* Detail-sized cells (99×98) centered in full viewport stage — matches white .focus outline */
  html {
    --cell-w: 99vw;
    --cell-h: 98vh;
    --cell-h: 98dvh;
    --stage-w: 100vw;
    --stage-h: 100vh;
    --stage-h: 100dvh;
    --cell-offset-x: calc((var(--stage-w) - var(--cell-w)) / 2);
    --cell-offset-y: calc((var(--stage-h) - var(--cell-h)) / 2);
    /* Vertical gap between slides = frame L/R inset (thin strip beside 99vw cell) */
    --detail-image-gap: var(--cell-offset-x);
    --vv-top: 0px;
    --vv-left: 0px;
    /* Homepage intro + Homies row: 22px by default, scales down on short viewports */
    --home-center-half: calc(var(--cell-h) * var(--zoom, 0.275) * 0.5);
    --home-top-inset: calc(var(--vv-top, 0px) + max(env(safe-area-inset-top), 1rem));
    --home-type-fluid: calc(
      (50dvh - var(--home-center-half) - 0.75rem - var(--home-top-inset)) / 6.5
    );
    --home-type-size: clamp(12px, var(--home-type-fluid), 22px);
  }

  /* Homepage enter button — matches .focus at minimum zoom (ZOOM_HIDDEN / --zoom 0.275) */
  .homepage-content {
    position: fixed;
    top: calc(var(--vv-top, 0px) + var(--stage-h, 100dvh) * 0.5);
    left: calc(var(--vv-left, 0px) + var(--stage-w, 100vw) * 0.5);
    transform: translate(-50%, -50%);
    width: calc(var(--cell-w) * var(--zoom, 0.275));
    height: calc(var(--cell-h) * var(--zoom, 0.275));
    border-radius: calc(var(--card-radius) * var(--zoom, 0.275));
    margin: 0;
    z-index: 3;
    box-sizing: border-box;
  }

  /* Homepage intro — roles/timeline hidden (see Resume link); colors match desktop */
  .homepage {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: calc(var(--vv-top, 0px) + max(env(safe-area-inset-top), 1rem)) 1.25rem 0;
    box-sizing: border-box;
  }

  .homepage .profile {
    display: none;
  }

  .homepage-header {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 22rem;
    margin: 0;
    z-index: 2;
    flex-shrink: 0;
    font-size: var(--home-type-size);
    line-height: 100%;
    text-align: left;
    text-wrap: balance;
    text-wrap: pretty;
  }

  .homepage-header-link {
    font-size: var(--home-type-size);
    line-height: 100%;
    text-underline-offset: 3px;
  }

  /* Align stage + focus ring to visible viewport (iOS Safari URL bar) */
  .viewport {
    top: var(--vv-top);
    left: var(--vv-left);
    width: var(--stage-w);
    height: var(--stage-h);
  }

  .focus-container {
    top: var(--vv-top);
    left: var(--vv-left);
    right: auto;
    bottom: auto;
    width: var(--stage-w);
    height: var(--stage-h);
  }

  .open .viewport {
    transform: scale3d(var(--zoom), var(--zoom), 1);
  }

  /* White outline = same box + zoom as the gallery cell */
  .focus {
    width: var(--cell-w);
    height: var(--cell-h);
    transform: scale(var(--zoom, 0.375));
  }

  .canvas {
    grid-template-columns: repeat(var(--gridSize), var(--cell-w));
    transform: translate3d(
      calc(var(--cell-offset-x) + (var(--cell-w) * var(--x, 0) * -1) - (var(--gap) * var(--x, 0))),
      calc(var(--cell-offset-y) + (var(--cell-h) * var(--y, 0) * -1) - (var(--gap) * var(--y, 0))),
      0
    );
  }

  .canvas div {
    width: var(--cell-w);
    height: var(--cell-h);
  }

  /* Same zoom math as desktop: wrapper tracks --zoom during open so the cell grows into detail size */
  html.open body,
  html.project-detail-active,
  html.project-detail-active body {
    background-color: #f5f5f5;
    transition: background-color 0s;
  }

  html.project-detail-active body {
    overflow: hidden;
  }

  /* Same visual-viewport box as .viewport — prevents jump up on handoff (iOS Safari) */
  html.open .project-detail-view,
  html.project-detail-transitioning .project-detail-view,
  html.project-detail-fading .project-detail-view,
  html.project-detail-active .project-detail-view {
    top: var(--vv-top);
    left: var(--vv-left);
    width: var(--stage-w);
    height: var(--stage-h);
    max-width: var(--stage-w);
    max-height: var(--stage-h);
    overflow: hidden;
    overscroll-behavior: none;
  }

  html.project-detail-active .project-detail-content,
  html.project-detail-active .project-text-container {
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
  }

  html.project-detail-active .project-detail-content {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  html.project-detail-active .project-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  html.open .project-images-wrapper,
  html.project-detail-transitioning .project-images-wrapper,
  html.project-detail-fading .project-images-wrapper,
  html.project-detail-active .project-images-wrapper {
    position: relative;
    width: calc(var(--cell-w, 99vw) * var(--zoom, 0.375));
    height: calc(var(--cell-h, 98dvh) * var(--zoom, 0.375));
    max-width: var(--stage-w, 100vw);
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--card-radius);
    corner-shape: squircle;
    background-color: transparent;
    transition: width 1.6s cubic-bezier(0.88, 0, 0.1, 1),
      height 1.6s cubic-bezier(0.88, 0, 0.1, 1);
  }

  html.project-detail-transitioning .project-images-wrapper,
  html.project-detail-fading .project-images-wrapper,
  html.project-detail-active .project-images-wrapper {
    transition: none;
  }

  html.open .project-detail-image,
  html.project-detail-transitioning .project-detail-image,
  html.project-detail-fading .project-detail-image,
  html.project-detail-active .project-detail-image {
    height: var(--detail-slide-h, calc(98vh * var(--zoom, 1)));
    min-height: var(--detail-slide-h, calc(98vh * var(--zoom, 1)));
    margin-bottom: 0;
  }

  /* Scroll stack lives inside the frame (behind gradient / blur chrome) */
  html.project-detail-active .project-images-container {
    position: absolute;
    inset: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    overscroll-behavior: contain;
    border-radius: inherit;
    -webkit-overflow-scrolling: touch;
  }

  html.project-detail-active .project-images-container::-webkit-scrollbar {
    width: 6px;
    height: auto;
  }

  html.open .project-images-inner,
  html.project-detail-transitioning .project-images-inner,
  html.project-detail-fading .project-images-inner,
  html.project-detail-active .project-images-inner {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: var(--detail-image-gap);
    box-sizing: border-box;
  }

  html.project-detail-active .project-detail-image {
    width: 100%;
    max-height: none;
    margin-bottom: 0;
    margin-right: 0;
    flex-shrink: 0;
    object-fit: cover;
  }

  /* Tagged in script.js → projectDetailMobileHidden */
  html.project-detail-active .project-detail-image.detail-mobile-hidden {
    display: none !important;
  }

  html.project-detail-active .gradient-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
    background: linear-gradient(
      to top,
      #111111 0%,
      rgba(17, 17, 17, 0.738) 19%,
      rgba(17, 17, 17, 0.541) 34%,
      rgba(17, 17, 17, 0.382) 47%,
      rgba(17, 17, 17, 0.278) 56.5%,
      rgba(17, 17, 17, 0.194) 65%,
      rgba(17, 17, 17, 0.126) 73%,
      rgba(17, 17, 17, 0.075) 80.2%,
      rgba(17, 17, 17, 0.042) 86.1%,
      rgba(17, 17, 17, 0.021) 91%,
      rgba(17, 17, 17, 0.008) 95.2%,
      rgba(17, 17, 17, 0.002) 98.2%,
      transparent 100%
    );
  }

  /* Frame chrome box tracks the cell; labels are fixed above — no size animation */
  html.open .frame-overlay,
  html.project-detail-transitioning .frame-overlay,
  html.project-detail-fading .frame-overlay {
    width: var(--cell-w, calc(99vw * var(--zoom, 1)));
    height: var(--cell-h, calc(98dvh * var(--zoom, 1)));
    transition: none;
  }

  html.project-detail-active .frame-overlay {
    width: var(--cell-w, calc(99vw * var(--zoom, 1)));
    height: var(--cell-h, calc(98dvh * var(--zoom, 1)));
    /* opacity fade defined above — do not reset transition here */
  }

  /* Close (X): hidden during zoom; fade in with frame on project-detail-active */
  html.open .chevron-back,
  html.project-detail-transitioning .chevron-back {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  html.project-detail-active .chevron-back {
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }

  html.project-detail-fading .chevron-back {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .project-detail-content {
    padding: 0;
  }

  html.project-detail-active .project-images-container {
    padding: 0;
  }

  .project-images-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .project-detail-image {
    width: 100%;
    height: auto;
    max-height: 98vh;
    margin-bottom: 0;
  }

  html.project-detail-active .project-info-content {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    gap: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
  }

  .project-info-desc1 {
    font-size: 22px;
    max-width: none;
  }

  .project-info-meta {
    gap: 1.5rem;
  }
}

@media (max-width: 500px) {

 .homepage-header {
  max-width: none;
 }

 html.project-detail-active .project-detail-content,
 html.project-detail-active .project-text-container,
 html.project-detail-active .project-images-container {
   padding: 0;
 }
}

/* Acknowledgments Overlay — Homies (Figma name row + two-column list) */
.acknowledgments-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
  z-index: 100001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.33, 0, 0.35, 1);
  box-sizing: border-box;
}

.acknowledgments-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Inset matches homepage: .homepage-header margin + .profile width calc(100% - 48px) */
.acknowledgments-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px;
  box-sizing: border-box;
}

.acknowledgments-main {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: clamp(2rem, 6vw, 5rem);
  min-height: 0;
}

/* Left column: intro includes ← Back after <br> (same pattern as .homepage-header + Homies) */
.acknowledgments-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 50vw;
}

.acknowledgments-intro {
  position: relative;
  top: auto;
  margin: 0;
  max-width: none;
  font-size: 2vw;
  line-height: 1em;
  letter-spacing: -2%;
  color: #cdcdcd;
  text-align: left;
}

.acknowledgments-names-columns {
  display: flex;
  flex-direction: row;
  flex: 1;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  max-width: min(36rem, 52vw);
}

.acknowledgments-names-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* 8px text → rule, 8px rule → next row’s text (padding-top on following item) */
.acknowledgments-names-col .acknowledgments-name-item + .acknowledgments-name-item {
  padding-top: 8px;
}

/* Figma Name Item: border #cdcdcd, Greed Medium — line-height >1 so descenders aren’t clipped */
.acknowledgments-name-item {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: flex-start;
  padding-bottom: 8px;
  border-bottom: 1px solid #ececec;
  text-decoration: none;
  color: #cdcdcd;
  font-size: clamp(16px, 1.65vw, 24px);
  line-height: 1.2;
  letter-spacing: -2%;
  margin-bottom: 0;
  overflow: visible;
}

.acknowledgments-name-text {
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.acknowledgments-name-item:hover {
  color: #b0b0b0;
}

/* Inherits Homies / Contact / Resume styles from .homepage-header-link */
.acknowledgments-back-button {
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

@media (max-width: 1000px) {
  .acknowledgments-main {
    flex-direction: column;
    align-items: stretch;
  }

  .acknowledgments-left {
    max-width: none;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
  }

  .acknowledgments-names-columns {
    max-width: none;
    justify-content: flex-start;
  }
}

@media (max-width: 800px) {
  /* Homies overlay — match mobile homepage / project-info-desc1 typography */
  .acknowledgments-content {
    padding: calc(var(--vv-top, 0px) + max(env(safe-area-inset-top), 1rem)) 1.25rem 1.25rem;
  }

  .acknowledgments-intro {
    font-size: var(--home-type-size);
    line-height: 100%;
    text-wrap: balance;
    text-wrap: pretty;
  }

  .acknowledgments-intro .homepage-header-link,
  .acknowledgments-back-button {
    font-size: var(--home-type-size);
    line-height: 100%;
    text-underline-offset: 3px;
  }

  .acknowledgments-name-item {
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 1%;
  }

  /* Two columns side by side (10 names each) */
  .acknowledgments-names-columns {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: none;
    width: 100%;
  }

  .acknowledgments-names-col {
    flex: 1 1 0;
    min-width: 0;
  }

  .acknowledgments-names-col + .acknowledgments-names-col .acknowledgments-name-item:first-child {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .acknowledgments-overlay {
    overflow-y: auto;
  }

  .acknowledgments-name-text {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}

/* Site Nav */
@keyframes nav-enter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%);
    filter: blur(0px);
  }
}

@keyframes nav-exit {
  from {
    opacity: 1;
    transform: translateX(-50%);
    filter: blur(0px);
  }
  to {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
    filter: blur(4px);
  }
}

.site-nav {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #1d1b1d;
  border: 1px solid #464646;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0px 5px 12px -2px rgba(0, 0, 0, 0.38);
  opacity: 0;
  pointer-events: none;
  font-family: var(--font-primary);
  overscroll-behavior: none;
}

.site-nav.nav-visible {
  animation: nav-enter 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
  pointer-events: auto;
}

.site-nav.nav-exiting {
  animation: nav-exit 350ms cubic-bezier(0.88, 0, 0.1, 1) forwards;
  pointer-events: none;
}

.nav-btn {
  font-family: var(--font-primary);
  font-size: 12px;
  letter-spacing: 0.2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.4;
  border: none;
  border-radius: 3px;
  padding: 2px 6px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Windows-only: tighten line-height, lock pill height to match Mac (~21px),
   asymmetric padding pushes Suisse down so it sits on the same optical center as Mac */
html.is-windows .site-nav .nav-btn {
  line-height: 0.75;
  min-height: 21px;
  padding: 4px 7px 2px 6px;
}

/* Level 1 (homepage): About active */
.nav-about {
  background: #323032;
  color: #ffffff;
}
.nav-index {
  background: transparent;
  color: #898889;
}

/* Level 2 (gallery-active): Index active */
html.gallery-active .nav-index {
  background: #323032;
  color: #ffffff;
}
html.gallery-active .nav-about {
  background: transparent;
  color: #898889;
}

@media (max-width: 800px) {
  .site-nav {
    padding: 3px;
    gap: 3px;
    border-radius: 10px;
    min-height: 44px;
    box-sizing: border-box;
    align-items: stretch;
  }

  .nav-btn {
    font-size: 12px;
    line-height: 1.25;
    padding: 0 14px;
    border-radius: 6px;
  }

  html.is-windows .site-nav .nav-btn {
    line-height: 0.75;
    align-self: stretch;
    padding: 2px 14px 0 14px;
  }
}