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

:root {
  --bg:       #070707;
  --text:     #bcb9c3;
  --text-dim: rgba(188,185,195,0.6);
  --num-col:  #c9c6d1;
  --sep:      rgba(188,185,195,0.15);
  --thumb:    #161616;
  --m: 24px;
  --g: 24px;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Satoshi', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════
   INTRO
══════════════════════════════════════════ */
#intro {
  position: fixed; inset: 0;
  background: var(--bg); z-index: 400;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#intro.fade-out {
  opacity: 0;
}
#intro-num {
  position: absolute;
  font-size: 38vw; font-weight: 500;
  color: var(--num-col); line-height: .82; letter-spacing: -0.04em;
  bottom: -2vw; right: -1vw;
  transition: top .5s ease, bottom .5s ease, left .5s ease, right .5s ease, opacity .6s ease;
}

/* ══════════════════════════════════════════
   HEADER — 12-col grid
══════════════════════════════════════════ */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--g);
  padding: 0 var(--m);
  pointer-events: none;
  height: 72px;
  align-items: center;
}
/* K.Work logo — absolutely positioned so it can slide left on detail */
.h-logo {
  position: absolute;
  /* Home: left edge aligned with col 11 start — approx (2/12 cols from right) minus logo width */
  right: calc(16.67% - 80px);
  top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 700; letter-spacing: 0.15px;
  color: var(--text);
  cursor: pointer; pointer-events: all;
  white-space: nowrap;
  transition: right 0.4s ease, color 0.18s ease, text-shadow 0.18s ease, opacity 0.12s ease, transform 0.12s ease;
}
.h-logo:hover {
  color: #fff;
  text-shadow: 0 0 0.6px #fff, 0 0 0.6px #fff;
}
.h-logo:active {
  opacity: 0.5;
  transform: translateY(-50%) scale(0.96);
}
/* Detail: K.Work slides left — right edge sits 48px before col 11 (nav section left edge) */
header.detail .h-logo {
  right: calc(16.67% + 48px);
}

/* ══════════════════════════════════════════
   PAGE — 12-col grid
══════════════════════════════════════════ */
#page {
  position: fixed; inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr;
  column-gap: var(--g);
  padding: 0 var(--m);
  opacity: 0; transition: opacity .6s ease;
  pointer-events: none;
}
#page.visible { opacity: 1; pointer-events: all; }

/* ──────────────────────────────────────────
   LEFT COLUMN  cols 1–3
────────────────────────────────────────── */
.col-left {
  grid-column: 1 / 4;
  display: flex; flex-direction: column;
  padding: 36px 0 16px;
  min-height: 0;
  /*max-width: 456px;*/
  height: 100vh;
}

.sep {
  width: 100%; height: 1px;
  background: var(--sep);
  flex-shrink: 0;
}
.sep-spaced { margin-top: 32px; }

.left-label {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  padding: 16px 0 12px;
  flex-shrink: 0;
}

#proj-num {
  font-size: clamp(140px, 20vw, 275px);
  font-weight: 500;
  color: var(--num-col);
  line-height: .85; letter-spacing: -0.01em;
  flex-shrink: 0;
  margin-bottom: 20px;
  transform-origin: center center;
}

@keyframes num-liquid {
  0%   {
    filter: blur(0px);
    transform: scaleY(1) scaleX(1);
    opacity: 1;
    text-shadow: none;
  }
  12%  {
    filter: blur(14px);
    transform: scaleY(0.88) scaleX(1.08);
    opacity: 0.45;
    text-shadow:
      -24px 0 0 rgba(255, 30, 0, 0.95),
       24px 0 0 rgba(0, 120, 255, 0.95);
  }
  30%  {
    filter: blur(7px);
    transform: scaleY(1.04) scaleX(0.97);
    opacity: 0.7;
    text-shadow:
      -12px 0 0 rgba(255, 30, 0, 0.65),
       12px 0 0 rgba(0, 120, 255, 0.65);
  }
  42%  {
    filter: blur(0px);
    transform: scaleY(1) scaleX(1);
    opacity: 1;
    text-shadow: none;
  }
  100% {
    filter: blur(0px);
    transform: scaleY(1) scaleX(1);
    opacity: 1;
    text-shadow: none;
  }
}

#proj-num.num-spike {
  animation: num-liquid 1.4s ease-out forwards;
}

#intro-num.num-spike {
  animation: num-liquid 0.65s ease-out forwards;
}

/* Project name — visible in detail only */
#proj-name-large {
  font-size: clamp(1.8rem, 3.5vw, 48px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.15;
  padding: 10px 0 0;
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease .1s, transform .35s ease .1s;
  flex-shrink: 0;
}
#proj-name-large.show { opacity: 1; transform: translateY(0); }

/* ──────────────────────────────────────────
   LEFT SLOT — shared container for home/detail panels
────────────────────────────────────────── */
.left-slot {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

/* ──────────────────────────────────────────
   HOME META BLOCK
   year + disciplines row, "Project" label, thumbnail
────────────────────────────────────────── */
.left-meta-block {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  transition: opacity .3s ease;
}
#page.detail .left-meta-block {
  opacity: 0; pointer-events: none;
}
.left-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Details + Project are one unified block — hide the second separator */
.s-project > .sep { display: none; }

/* Spacing between Details row and the Project thumbnail */
.s-project { padding-top: 8px; }
.s01 {
  margin-bottom: 100px;
}
/* Row: year (left) | disciplines (right) */
.meta-row {
  display: flex; justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0;
  
  gap: 12px;
}
.meta-year {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  flex-shrink: 0;
}
.meta-disciplines {
  display: flex; flex-direction: column;
  align-items: flex-end;
  font-size: 16px; font-weight: 500;
  color: var(--text); letter-spacing: 0.15px;
  line-height: 1.5;
}
.meta-disciplines span { display: block; }

.meta-cat {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  padding: 16px 0 16px;
}

/* Thumbnail */
.thumb-block { flex-shrink: 0; }
.thumb-img {
  width: 100%; height: auto; aspect-ratio: 4 / 3;
  background: var(--thumb);
  border-radius: 60px;
  corner-shape: squircle;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.4,0,0.2,1);
}
.thumb-img:active { transform: scale(0.97); }
.thumb-cover {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: background .4s ease, transform .5s ease;
}
.thumb-img:hover .thumb-cover,
.thumb-img:hover .thumb-vid { transform: scale(1.01); }
.view-btn {
  font-family: 'Satoshi', sans-serif;
  font-size: 14px; font-weight: 800;
  color: #070707; background: #fff;
  border: none; padding: 8px 24px;
  cursor: pointer; letter-spacing: 0.15px;
  border-radius: 100px;
  position: absolute; bottom: 12px; left: 12px;
  z-index: 2;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  transition: opacity .2s;
}
.view-btn:hover { opacity: .8; }

/* ──────────────────────────────────────────
   DETAIL META BLOCK
   year + disciplines row, Details + description, Back pill
────────────────────────────────────────── */
.left-detail-meta {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease .15s;
}
#page.detail .left-detail-meta {
  opacity: 1; pointer-events: all;
}

.detail-row {
  display: flex; justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  gap: 12px;
}
.detail-side-label {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  flex-shrink: 0;
  white-space: nowrap;
}
.detail-disciplines {
  display: flex; flex-direction: column;
  align-items: flex-end;
  font-size: 16px; font-weight: 500;
  color: var(--text); letter-spacing: 0.15px;
  line-height: 1.5;
}
.detail-disciplines span { display: block; }
.detail-desc {
  font-size: 16px; font-weight: 500;
  color: var(--text); letter-spacing: 0.15px;
  line-height: 1.5;
  text-align: left;
  width: 100%;
}
.detail-desc p { margin: 0; }
.detail-desc p + p { margin-top: 16px; }

/* Stack desc below the Details label */
.s-details .detail-row {
  flex-direction: column;
  gap: 12px;
}
.detail-spacer { flex: 1; }

/* Back pill */
.back-pill {
  font-family: 'Satoshi', sans-serif;
  font-size: 14px; font-weight: 800;
  color: #070707; background: #fff;
  border: none; padding: 8px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  cursor: pointer; letter-spacing: 0.15px;
  border-radius: 100px;
  align-self: flex-start;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease .2s;
}
.back-pill.show { opacity: 1; pointer-events: all; }
.back-pill:hover { opacity: .8; }

/* ──────────────────────────────────────────
   CENTER COLUMN
   home:   cols 4–10  (7 cols)
   detail: cols 4–11  (8 cols)
────────────────────────────────────────── */
.col-center {
  grid-column: 4 / 11;
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
}
#page.detail .col-center { grid-column: 4 / 13; }

/* Project page: gallery starts at col 5 (col 4 = breathing room after left col),
   extends to right edge, and isn't clipped */
.project-page .col-center {
  grid-column: 5 / 13;
  overflow: visible;
}

/* ── Project list ── */
.list-view {
  position: absolute; inset: 0;
  overflow: hidden;
  transition: opacity .3s ease;
}
.list-view.out { opacity: 0; pointer-events: none; }

.list-track {
  width: 100%;
  padding-left: 10%;
  display: flex; flex-direction: column;
  transition: transform .6s cubic-bezier(.22,.61,.36,1);
  cursor: grab;
}
.list-track:active { cursor: grabbing; }

.p-item {
  display: flex; align-items: center;
  width: 100%; gap: 0; padding: 12px 0;
  cursor: pointer;
  transition: opacity .45s cubic-bezier(0.4,0,0.2,1), filter .45s cubic-bezier(0.4,0,0.2,1), transform 0.15s cubic-bezier(0.4,0,0.2,1);
  white-space: nowrap;
}
.p-year {
  font-size: 18px; font-weight: 400;
  color: var(--text-dim);
  flex: 0 0 72px;
  text-align: right; padding-right: 16px;
  line-height: 1;
  transition: font-size .45s cubic-bezier(0.4,0,0.2,1), color .2s ease;
}
.p-name {
  font-size: clamp(31px, 4.95vw, 71.5px);
  font-weight: 400; color: var(--text);
  line-height: 1.15; flex: 1;
  will-change: font-size;
  transition: font-size .45s cubic-bezier(0.4,0,0.2,1), color .2s ease;
}
.p-tag {
  font-size: 18px; font-weight: 700;
  color: var(--text-dim);
  margin-left: 14px; align-self: center;
  opacity: 0; transition: opacity .35s ease;
}

/* Distance blur states */
.p-item[data-d="0"] { opacity: 1; filter: blur(0); }
.p-item[data-d="0"] .p-name { font-size: clamp(43.5px, 6.655vw, 96.8px); font-weight: 700; }
.p-item[data-d="0"] .p-year { font-size: 18px; }
.p-item[data-d="0"] .p-tag  { opacity: 1; }
.p-item[data-d="1"] { opacity: .55; filter: blur(0); }
.p-item[data-d="1"] .p-name { font-weight: 400; }
.p-item[data-d="2"] { opacity: .28; filter: blur(.4px); }
.p-item[data-d="3"] { opacity: .14; filter: blur(.8px); }
.p-item[data-d="4"] { opacity: .06; filter: blur(1.2px); }
.p-item[data-d="5"] { opacity: .03; filter: blur(2px); }

/* Hover / active brightness — must sit after data-d rules to win the cascade */
.p-item:hover  { filter: blur(0) brightness(1.2); }
.p-item:active { filter: blur(0) brightness(1.15); transform: scale(0.97); }

/* ── Gallery ── */
.gallery-view {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100vh;
  overflow-y: auto; overflow-x: hidden; scrollbar-width: none;
  opacity: 0; pointer-events: none;
  transition: opacity .38s ease .15s;
  padding-top: 164px;
  padding-left: 72px;
}
.gallery-view::-webkit-scrollbar { display: none; }
.gallery-view.in { opacity: 1; pointer-events: all; }

/* Fade out content as it scrolls under the header */
.project-page .gallery-view {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 140px);
  mask-image: linear-gradient(to bottom, transparent 0px, black 140px);
}

/* padding-bottom = 50vh - half panel height (34vh) so last panel can scroll to center */
.img-panels { display: flex; flex-direction: column; gap: 24px; padding-bottom: calc(50vh - 34vh); }

.img-panel {
  width: 100%; position: relative;
  overflow: hidden; flex-shrink: 0; border-radius: 60px; corner-shape: squircle;
  height: 68vh;
}

.panel-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: transform .5s ease;
}
img.panel-bg, video.panel-bg {
  object-fit: cover; object-position: center;
  display: block;
}
.img-panel:hover .panel-bg { transform: scale(1.01); }
/* ── Compare slider ── */
.compare-panel { cursor: col-resize; user-select: none; }

.compare-left,
.compare-right {
  position: absolute; inset: 0;
}
.compare-left  { clip-path: inset(0 50% 0 0); }
.compare-right { clip-path: inset(0 0 0 50%); }
.compare-img   { transition: opacity .15s ease; }

.compare-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain; object-position: center;
  display: block; pointer-events: none;
}

.compare-divider {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px;
  background: rgba(255,255,255,0.5);
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}

.compare-handle {
  position: relative;
  background: #bcb9c3;
  border-radius: 100px;
  padding: 5px 12px;
  display: flex; align-items: center; gap: 5px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor: grab;
}
.compare-panel:hover .compare-handle {
  transform: scale(1.1);
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.compare-panel.dragging .compare-handle {
  transform: scale(0.94);
  box-shadow: 0 1px 6px rgba(0,0,0,0.15);
  cursor: grabbing;
}

/* Inverted slider — for light/white images */
.compare-panel.inverted .compare-divider         { background: rgba(0,0,0,.5); }
.compare-panel.inverted .compare-handle          { background: #070707; }
.compare-panel.inverted:hover .compare-handle {
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.compare-panel.inverted.dragging .compare-handle {
  box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}

.panel-lbl {
  position: absolute; bottom: 16px; left: 18px;
  font-size: 13px; font-weight: 500;
  color: rgba(188,185,195,.5);
  text-transform: uppercase; letter-spacing: .12em;
}

/* ──────────────────────────────────────────
   RIGHT COLUMN  cols 11–12 always
   home:   full content, padding-top 72px (below header)
   detail: Navigation only, padding-top 36px (closer to top)
────────────────────────────────────────── */
.col-right {
  grid-column: 11 / 13;
  display: flex; flex-direction: column;
  padding: 152px 0 148px;
  overflow: hidden; min-height: 0;
  transition: padding-top .4s ease;
}
#page.detail .col-right {
  grid-column: 11 / 13;
}

.r-section { display: flex; flex-direction: column; }
.r-sep { width: 100%; height: 1px; background: var(--sep); flex-shrink: 0; }
.r-row {
  display: flex; justify-content: space-between;
  align-items: flex-start;
  padding: 16px 0; gap: 8px;
}
.r-label {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  flex-shrink: 0; white-space: nowrap;
}
.r-links {
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 0;
}
.r-link {
  font-size: 16px; font-weight: 400;
  color: var(--text); letter-spacing: 0.15px;
  text-decoration: none; line-height: 1.5;
  transition: color .2s ease, text-shadow .2s ease;
}
.r-link:hover { color: #fff; text-shadow: 0 0 0.6px #fff, 0 0 0.6px #fff; }
.r-link--linkedin:hover { color: #0A66C2; text-shadow: 0 0 0.6px #0A66C2, 0 0 0.6px #0A66C2; }
.r-link--dribbble:hover { color: #EA4C89; text-shadow: 0 0 0.6px #EA4C89, 0 0 0.6px #EA4C89; }
.r-link-stack { text-align: right; line-height: 1.5; }

/* External + All fade out in detail */
.r-ext, .r-all { transition: opacity .28s ease; }
#page.detail .r-ext,
#page.detail .r-all { opacity: 0; pointer-events: none; }


.r-spacer { flex: 1; }

/* ══════════════════════════════════════════
   PROJECT PAGE
   body.project-page — detail state on load,
   no intro, navigation pinned to top right
══════════════════════════════════════════ */

/* Navigation fixed at top right, level with K.Work */
/* Width = 2 grid cols + 1 gutter: (100vw - 2×24px margins - 11×24px gutters) / 12 × 2 + 24px */
.project-page .r-nav {
  position: fixed;
  top: 36px;
  right: 24px;
  z-index: 250;
  width: calc((100vw - 312px) / 6 + 24px);
}
.sproject{
  margin-bottom: 60px;
}
.s-year {
  margin-bottom: 40px;
}
/* Back pill is an anchor on the project page — fixed to bottom of viewport */
.project-page .back-pill {
  display: inline-block;
  text-decoration: none;
  position: fixed;
  bottom: 32px;
  left: 24px;
}

/* Left detail meta visible immediately — no transition on load */
.project-page .left-detail-meta {
  transition: none;
}

/* Project page col-left — constrained width */
.project-page .col-left {
  max-width: 456px;
}

/* ── Dual-speed scroll ──────────────────── */

/* col-left is now the scroll container — entire left side scrolls */
.project-page .col-left {
  overflow-y: scroll;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 110px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 110px), transparent 100%);
}
.project-page .col-left::-webkit-scrollbar { display: none; }

/* left-slot: normal flow, no longer clips or positions children */
.project-page .left-slot {
  flex: none;
  position: static;
  overflow: visible;
}

/* Home meta block doesn't belong in the project page scroll flow */
.project-page .left-meta-block { display: none; }

/* left-detail-meta: normal flow inside scrolling col-left */
.project-page .left-detail-meta {
  position: static;
  opacity: 1;
  pointer-events: all;
  overflow-y: visible;
  padding-bottom: 40vh;
}

/* Responsive 16 ∶ 9 panels — scale with column width, never stretch */
.project-page .img-panel {
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Bottom breathing room after last panel */
.project-page .img-panels {
  padding-bottom: 15vh;
}

/* In single-column view, panel-card is just a passthrough wrapper */
.project-page .img-panels:not(.panels-grid-2) .panel-card {
  display: contents;
}

/* 2-column grid layout — used on Misc and any collection-style project */
.project-page .img-panels.panels-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Each card (image + caption) is one grid item */
.project-page .img-panels.panels-grid-2 .panel-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Force uniform 4:3 aspect ratio for all panels in the 2-col grid */
.project-page .img-panels.panels-grid-2 .img-panel {
  aspect-ratio: 4 / 3 !important;
  height: auto;
}

/* Panel caption */
.panel-caption {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
}
.panel-caption-num {
  width: 36px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.15px;
  text-align: center;
}
.panel-caption-text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.panel-caption-title {
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  letter-spacing: 0.15px;
  line-height: 24px;
}
.panel-caption-sub {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.15px;
  line-height: 18px;
}

/* ══════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════ */

.about-name {
  font-size: 96px;
  font-weight: 700;
  color: var(--num-col);
  line-height: 1.1;
  letter-spacing: 0.15px;
  flex-shrink: 0;
  padding-top: 8px;
}

/* ── Companies list ── */
.s-companies { margin-top: 0; }

.companies-label {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  padding: 12px 0 8px;
}

.company-item {
  display: flex; align-items: center;
  gap: 10px; padding: 16px 0;
  border-bottom: 1px solid var(--sep);
}
.company-item:first-child { border-top: 1px solid var(--sep); }

.company-logo {
  width: 56px; height: 56px;
  object-fit: contain; flex-shrink: 0;
  border-radius: 4px;
}

.company-info { flex: 1; min-width: 0; }

.company-name {
  font-size: 18px; font-weight: 800;
  color: var(--text); letter-spacing: 0.1px;
}

.company-sub {
  display: flex; flex-direction: row;
  align-items: center; gap: 5px;
  margin-top: 2px;
}

.company-role {
  font-size: 15px; font-weight: 400;
  color: var(--text-dim); letter-spacing: 0.1px;
  white-space: nowrap;
}

.company-sep {
  font-size: 15px; font-weight: 400;
  color: var(--text-dim);
}

.company-dates {
  font-size: 15px; font-weight: 400;
  color: var(--text-dim); letter-spacing: 0.1px;
  white-space: nowrap;
}

/* ── About content wrapper — constrains both photo and body copy ── */
.about-content {
  max-width: 1000px;
}

/* ── Photo ── */
.about-photo-wrap {
  width: 500px;
  max-width: 100%;
  aspect-ratio: 1;
  position: relative;
  margin: 0 auto 48px;
  flex-shrink: 0;
}

.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Body copy ── */
.about-body {
  padding-bottom: 15vh;
}

.about-body p {
  font-size: 24px;
  font-weight: 400;
  color: #fff;
  line-height: 1.45;
  letter-spacing: 0.15px;
  margin: 0;
}

.about-body p + p { margin-top: clamp(24px, 3.5vh, 48px); }

/* ── About page layout — mirrors project-page ── */
.about-page .col-left    { grid-column: 1 / 5; }
/* !important needed to beat #page.detail .col-center specificity */
.about-page .col-center  { grid-column: 6 / 13 !important; overflow: visible; }

.about-page .r-nav {
  position: fixed; top: 36px; right: 24px;
  z-index: 250;
  width: calc((100vw - 312px) / 6 + 24px);
}

.about-page .back-pill {
  display: inline-block; text-decoration: none;
  position: fixed; bottom: 32px; left: 24px;
}

.about-page .col-left {
  overflow-y: scroll;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 110px), transparent 100%);
  mask-image: linear-gradient(to bottom, black calc(100% - 110px), transparent 100%);
}
.about-page .col-left::-webkit-scrollbar { display: none; }

.about-page .left-slot {
  flex: none;
  position: static;
  overflow: visible;
}

.about-page .left-meta-block { display: none; }

.about-page .gallery-view {
  padding-left: 0;
  padding-top: 40px;
}

.about-page .left-detail-meta {
  position: static; opacity: 1; pointer-events: all;
  overflow-y: visible;
  padding-top: 186px;
  padding-bottom: 40vh;
  transition: none;
}

/* ══════════════════════════════════════════
   CONTACT PAGE
══════════════════════════════════════════ */

.contact-heading {
  font-size: 48px;
  font-weight: 500;
  color: var(--num-col);
  letter-spacing: 0.15px;
  line-height: 1;
  padding-top: 12px;
  flex-shrink: 0;
}

.s-contact-section { margin-top: 0; }

.contact-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 0;
}

.contact-side-label {
  font-size: 16px; font-weight: 500;
  color: var(--text-dim); letter-spacing: 0.15px;
  flex-shrink: 0;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.contact-link {
  font-size: 16px; font-weight: 400;
  color: var(--text); letter-spacing: 0.15px;
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.contact-link:hover { color: #fff; text-shadow: 0 0 0.6px #fff, 0 0 0.6px #fff; }
.contact-link--linkedin:hover { color: #0A66C2; text-shadow: 0 0 0.6px #0A66C2, 0 0 0.6px #0A66C2; }
.contact-link--dribbble:hover { color: #EA4C89; text-shadow: 0 0 0.6px #EA4C89, 0 0 0.6px #EA4C89; }

.contact-value {
  font-size: 16px; font-weight: 400;
  color: var(--text); letter-spacing: 0.15px;
}

/* ── Big email ── */
.contact-page .col-center {
  display: flex !important;
  align-items: center;
  overflow: visible;
}

.contact-email-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
}

.contact-email {
  font-size: clamp(28px, 7vw, 96px);
  font-weight: 500;
  color: var(--num-col);
  letter-spacing: 0.15px;
  line-height: 1;
  text-decoration: none;
  display: block;
  white-space: nowrap;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.contact-email:hover { color: #fff; text-shadow: 0 0 0.8px #fff, 0 0 0.8px #fff; }

/* ── Contact page layout ── */
.contact-page .col-left {
  grid-column: 1 / 5;
  overflow: visible;
  -webkit-mask-image: none;
  mask-image: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-page .col-center {
  grid-column: 5 / 13 !important;
}

.contact-page .left-slot {
  flex: none;
  position: static;
  overflow: visible;
}

.contact-page .left-detail-meta {
  position: static; opacity: 1; pointer-events: all;
  overflow-y: visible; padding-bottom: 0;
  transition: none;
}

.contact-page .s-number.sproject {
  margin-bottom: 0;
}

.contact-heading {
  margin-bottom: 36px;
}

.contact-page .s-contact-section:first-child .sep {
  margin-bottom: 36px;
}

.contact-page .left-meta-block { display: none; }

.contact-page .back-pill {
  display: inline-block; text-decoration: none;
  position: fixed; bottom: 32px; left: 24px;
}

.contact-page .r-nav {
  position: fixed; top: 36px; right: 24px;
  z-index: 250;
  width: calc((100vw - 312px) / 6 + 24px);
}

/* ══════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════════ */

/* ──────────────────────────────────────────
   SMALL DESKTOP  ≤ 1024px
────────────────────────────────────────── */
@media (max-width: 1024px) {
  #proj-num { font-size: clamp(110px, 17vw, 210px); }
  .about-name { font-size: 80px; }
  .about-photo-wrap { width: 380px; }
  .about-body p { font-size: 22px; }
}

/* ──────────────────────────────────────────
   TABLET  ≤ 764px
────────────────────────────────────────── */
@media (max-width: 764px) {
  :root { --m: 16px; --g: 16px; }

  /* Logo: centered */
  .h-logo {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }
  header.detail .h-logo {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }

  /* Number */
  #proj-num { font-size: 116px; line-height: .82; }

  /* Project list */
  .p-name { font-size: 36px !important; }
  .p-item[data-d="0"] .p-name { font-size: 56px !important; font-weight: 700; }
  .p-year { flex-basis: 56px; font-size: 14px; padding-right: 10px; }

  /* Grid: 3-col left, 2-col right, center takes the rest (home/contact/about) */
  .col-left { grid-column: 1 / 4; }
  .col-center { grid-column: 4 / 11; }
  #page.detail .col-center { grid-column: 4 / 11; }
  .col-right { grid-column: 11 / 13; padding-top: 36px; padding-bottom: 36px; }

  /* Project page: 3-col left info, gallery fills the rest */
  .project-page .col-left { grid-column: 1 / 4; }
  html.project-page #page .col-center { grid-column: 4 / 13; }

  /* Right col: stack label above links, all left-aligned */
  .r-row { flex-direction: column; gap: 6px; padding: 12px 0; }
  .r-links { align-items: flex-start; }
  .r-label { font-size: 14px; }
  .r-link { font-size: 14px; text-align: left; }
  .r-link-stack { text-align: left; }

  /* List indent: tighter at tablet */
  .list-track { padding-left: 8px; }

  /* Home meta: stack disciplines vertically, left-aligned */
  .meta-row { flex-direction: column; gap: 4px; }
  .meta-disciplines { align-items: flex-start; }

  /* Project detail: stack year + disciplines vertically */
  .detail-row { flex-direction: column; gap: 8px; }
  .detail-disciplines { align-items: flex-start; }

  /* Project title: smaller at tablet */
  #proj-name-large { font-size: 36px !important; }

  /* About */
  .about-name { font-size: 60px; }
  .about-photo-wrap { width: 264px; height: 264px; aspect-ratio: unset; }
  .about-body p { font-size: 20px; }

  /* Companies at tablet */
  .about-page .company-item { align-items: flex-start; padding: 10px 0; }
  .about-page .company-logo { width: 48px; height: 48px; }
  .about-page .company-name { font-size: 15px; }
  .about-page .company-role,
  .about-page .company-sep,
  .about-page .company-dates { font-size: 13px; }

  /* Contact: email column wider at tablet too (5/13 via !important on base rule) */
}

/* ──────────────────────────────────────────
   MOBILE  ≤ 512px
────────────────────────────────────────── */
@media (max-width: 512px) {
  :root { --m: 16px; --g: 12px; }

  /* ── Logo: centered on all pages ── */
  .h-logo {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }
  header.detail .h-logo {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
  }

  /* ── Right col: fixed minimal nav (about, contact, project pages) ── */
  .col-right {
    position: fixed !important;
    top: 24px;
    right: var(--m);
    grid-column: unset !important;
    width: auto;
    height: auto;
    padding: 0;
    z-index: 250;
    overflow: visible;
    flex-direction: column;
    background: transparent;
  }
  .r-spacer, .r-ext, .r-all { display: none !important; }
  .r-sep { display: none; }
  .r-nav .r-sep { display: none; }
  .r-row { padding: 0; gap: 4px; }
  .r-label { display: none; }
  .r-links { flex-direction: column; align-items: flex-end; gap: 2px; }

  /* ══ HOME: hide left col, full-width list, keep nav ══ */
  body:not(.about-page):not(.contact-page):not(.project-page) .col-left  { display: none !important; }
  body:not(.about-page):not(.contact-page):not(.project-page) .col-center { grid-column: 1 / 13 !important; }

  /* r-nav separator visible on home mobile */
  .r-nav .r-sep { display: block; }

  /* ══ PROJECT PAGE: stacked layout ══ */
  html.project-page, body.project-page { overflow-y: auto; overflow-x: hidden; }
  .project-page #page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-top: 72px;
    overflow: visible;
  }
  /* Gallery (col-center) comes first */
  .project-page .col-center {
    order: 1;
    grid-column: unset !important;
    width: 100%;
    height: auto;
    position: relative;
    overflow: visible;
  }
  /* Meta (col-left) comes second */
  .project-page .col-left {
    order: 2;
    grid-column: unset !important;
    width: 100%;
    height: auto;
    max-width: 100% !important;
    padding: 0 var(--m) 48px;
    overflow: visible;
    overflow-y: visible !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  /* Gallery: full-width, remove left indent, keep top fade */
  .project-page .gallery-view {
    position: relative;
    height: auto;
    padding-left: 0;
    padding-top: 0;
    overflow: visible;
    opacity: 1;
    pointer-events: all;
    /* restore the top-fade mask that the base style sets */
    -webkit-mask-image: linear-gradient(to bottom, transparent 0px, black 80px);
    mask-image: linear-gradient(to bottom, transparent 0px, black 80px);
  }
  .project-page .img-panels { padding-bottom: 24px; }
  /* Project title smaller on mobile */
  #proj-name-large { font-size: 36px !important; opacity: 1; transform: none; }
  /* Left slot: static flow */
  .project-page .left-slot { flex: none; position: static; overflow: visible; }
  .project-page .left-detail-meta {
    position: static !important;
    opacity: 1; pointer-events: all;
    padding-bottom: 0;
  }
  /* Year + disciplines: stack vertically, left-aligned */
  .project-page .detail-row {
    flex-direction: column;
    gap: 8px;
  }
  .project-page .detail-disciplines {
    align-items: flex-start;
  }
  /* Back pill: fixed top-left */
  .project-page .back-pill {
    position: fixed !important;
    top: 16px !important;
    bottom: auto !important;
    left: var(--m);
    z-index: 300;
  }
  /* Nav: width auto on mobile */
  .project-page .r-nav {
    width: auto;
    top: 24px; right: var(--m);
  }

  /* ══ ABOUT: stacked single-column ══ */
  html.about-page, body.about-page { overflow-y: auto; overflow-x: hidden; }
  .about-page #page {
    position: relative;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    padding-top: 72px;
    overflow: visible;
  }
  .about-page .col-left {
    display: block !important;
    order: 2;
    grid-column: unset !important;
    width: 100%;
    height: auto;
    padding: 0 var(--m) 48px;
    overflow: visible;
    -webkit-mask-image: none !important;
    mask-image: none !important;
  }
  .about-page .col-center {
    order: 1;
    grid-column: unset !important;
    width: 100%;
    height: auto;
    position: relative;
    overflow: visible;
  }
  /* Hide "About" label + Kyle Bridges name */
  .about-page .s-number.sproject { display: none; }
  /* Photo: centered */
  .about-page .about-photo-wrap {
    width: 264px; height: 264px; aspect-ratio: unset;
    margin: 24px auto 32px;
  }
  /* Gallery: flow normally */
  .about-page .gallery-view {
    position: relative; height: auto;
    padding-top: 0; padding-left: 0;
    overflow: visible; opacity: 1; pointer-events: all;
  }
  .about-page .about-content { max-width: 100%; padding: 0 var(--m); }
  .about-page .about-body p { font-size: 18px; }
  /* Back pill: fixed top-left */
  .about-page .back-pill {
    position: fixed !important;
    top: 16px; bottom: auto !important;
    left: var(--m); z-index: 300;
  }
  /* Reset desktop scroll-alignment padding */
  .about-page .left-detail-meta { padding-top: 0 !important; padding-bottom: 0 !important; }
  .about-page .left-slot { flex: none; position: static; overflow: visible; }

  /* Companies: full-width rows */
  .about-page .s-companies { margin-top: 0; }
  .about-page .company-item { width: 100%; padding: 12px 0; }
  .about-page .company-info { flex: 1; min-width: 0; }
  .about-page .company-name { font-size: 16px; }
  .about-page .company-role,
  .about-page .company-sep,
  .about-page .company-dates { font-size: 14px; }

  /* ══ CONTACT: hide email, full-width info ══ */
  .contact-page .col-center { display: none !important; }
  .contact-page .col-left {
    grid-column: 1 / 13 !important;
    padding-top: 100px;
    justify-content: flex-start;
  }
  .contact-heading { font-size: 48px; margin-bottom: 0; }
  .contact-page .s-number.sproject { margin-bottom: 16px; }
  .contact-page .back-pill {
    position: fixed !important;
    top: 16px; bottom: auto !important;
    left: var(--m); z-index: 300;
  }
  .contact-page .r-nav { width: auto; top: 24px; right: var(--m); }
}
