/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */

/* ==========================================================================
 Base styles: opinionated defaults
 ========================================================================== */

html {
  color: #ffffff;
  font-size: 1em;
  line-height: 1.4;
}

::-moz-selection {
  background: var(--selection-bg);
  text-shadow: none;
}

::selection {
  background: var(--selection-bg);
  text-shadow: none;
}

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

/* ==========================================================================
 Author's custom styles
 ========================================================================== */

* {
  box-sizing: border-box;
}

:root {
  color-scheme: light dark;

  --page-bg: #ffffff;
  --text-main: #161616;
  --text-muted: rgb(0 0 0 / 0.5);
  --text-soft: rgb(0 0 0 / 0.4);

  --glass-bg: rgb(200 200 200 / 0.35);
  --glass-bg-hover: rgb(0 0 0 / 1);

  --overlay-bg: rgb(255 255 255 / 0.35);
  --sheet-bg: rgb(255 255 255 / 0.1);

  --icon-filter: brightness(0) opacity(0.55);
  --icon-filter-hover: brightness(0) invert(1) opacity(0.8);

  --selection-bg: rgb(0 0 0 / 0.3);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #141414;
    --text-main: #f5f5f5;
    --text-muted: rgb(255 255 255 / 0.55);
    --text-soft: rgb(255 255 255 / 0.45);

    --glass-bg: rgb(120 120 120 / 0.28);
    --glass-bg-hover: rgb(255 255 255 / 1);

    --overlay-bg: rgb(20 20 20 / 0.35);
    --sheet-bg: rgb(45 45 45 / 0.18);

    --icon-filter: brightness(0) invert(1) opacity(0.65);
    --icon-filter-hover: brightness(0) opacity(0.85);

    --selection-bg: rgb(255 255 255 / 0.25);
    --overlay-transition-bg: rgb(20 20 20 / 0.18);
  }
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display",
  "Segoe UI", sans-serif;
  background: var(--page-bg);
  color: var(--text-main);
}

body {
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) 72px;
  padding: 7% 18%;
  gap: 24px;

  transform: scale(1);
  filter: blur(0px);

  transition:
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1);
}

img {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  z-index: 2;
}

.identity,
.contact {
  line-height: 1.05;
}

.name,
.year {
  margin: 0;
  font-size: clamp(16px, 2vw, 36px);
  font-weight: 500;
}

.year {
  margin-top: 4px;
  opacity: 0.5;

  transition:
    opacity 360ms ease,
    filter 360ms ease,
    transform 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.year.is-changing {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(4px);
}

.contact {
  text-align: left;
  font-size: clamp(14px, 1.2vw, 16px);
  font-style: normal;
  font-weight: 300;
  color: var(--text-soft);
}

.contact p {
  margin: 0 0 6px;
}

.work-stage {
  position: relative;
  min-height: 0;
  display: flex;
  align-items: center;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: visible;

  padding-top: 2vh;
  padding-bottom: 2vh;
}

.work-scroll {
  width: 100%;
  display: flex;
  align-items: flex-end;
  gap: clamp(48px, 8vw, 140px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 8vh 50vw;
  scrollbar-width: none;
}

.work-scroll::-webkit-scrollbar {
  display: none;
}

.work-card {
  flex: 0 0 auto;
  height: clamp(300px, 46vh, 560px);
  scroll-snap-align: center;
  overflow: hidden;
  position: relative;

  opacity: 1;
  transition:
    opacity 360ms ease,
    filter 360ms ease;

  filter: saturate(1);
  cursor: none;
}

.work-card.is-focused {
  opacity: 1;
  filter: saturate(1);
}

.work-card img {
  width: auto;
  height: 100%;

  max-width: min(78vw, 1100px);

  object-fit: contain;
  display: block;
}

.work-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.work-cursor {
  position: fixed;
  left: 0;
  top: 0;

  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  color: rgb(0 0 0 / 0.55);

  pointer-events: none;
  opacity: 0;
  filter: blur(20px);
  transform: translate(-50%, -50%) scale(0);

  transition:
    opacity 220ms ease,
    transform 420ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 420ms cubic-bezier(0.16, 1, 0.3, 1);

  z-index: 30;
}

.work-cursor img,
.about-close img {
  object-fit: contain;
  pointer-events: none;

  filter: var(--icon-filter);
}

.about-close img {
  width: 22px;
  height: 22px;
}

.work-cursor img {
  width: 24px;
  height: 24px;
}

.about-close:hover img {
  filter: brightness(0) invert(1) opacity(0.8);
}

.work-cursor.is-visible.is-pressed {
  transform: translate(-50%, -50%) scale(0.8);

  transition:
    opacity 220ms ease,
    transform 180ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work-cursor.is-visible {
  opacity: 1;
  filter: blur(0px);
  transform: translate(-50%, -50%) scale(1);
}

.bottom-info {
  text-align: center;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  height: 72px;
  z-index: 2;
}

.project-title {
  margin: 0;
  font-size: clamp(18px, 1.2vw, 20px);
  font-weight: 500;
}

.project-description {
  margin: 4px auto 0;
  font-size: clamp(14px, 1.2vw, 16px);
  color: var(--text-muted);
  font-weight: 400;
  max-width: 600px;
}

.about-button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;

  display: grid;
  place-items: center;

  padding: 40px 18%;

  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;

  background: var(--overlay-transition-bg);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);

  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);

  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    background 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-overlay::-webkit-scrollbar {
  display: none;
}

.about-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);

  background: var(--overlay-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.about-overlay:not(.is-visible) .about-panel {
  transition-delay: 0ms;
}

.about-overlay.is-visible ~ .page,
body:has(.about-overlay.is-visible) .page {
  transform: scale(0.9);
  filter: blur(12px);
  opacity: 0.5;
}

.about-panel {
  width: 90%;
  min-height: min-content;

  display: grid;
  grid-template-columns: 1fr minmax(180px, 24vw);
  gap: clamp(16px, 2vw, 32px);
  align-items: start;

  margin: auto 0;

  opacity: 0;
  transform: scale(1.2);
  filter: blur(50px);

  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-overlay.is-visible .about-panel {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);

  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-overlay.is-closing {
  pointer-events: auto;
}

.about-overlay.is-closing .about-panel {
  opacity: 0;
  transform: scale(1.2);
  filter: blur(50px);

  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.about-close {
  position: fixed;
  left: 50%;
  bottom: 48px;

  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  border: 1px solid rgb(0 0 0 / 0);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  cursor: pointer;
  z-index: 20;

  opacity: 0;
  filter: blur(20px);
  transform: translate(-50%, 120px) scale(0);

  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    background 240ms ease,
    color 240ms ease;
}

body:has(.about-overlay.is-visible) .about-close {
  opacity: 1;
  filter: blur(0px);
  transform: translate(-50%, 0) scale(1);

  transition-delay:
    1000ms,
    1000ms,
    1000ms,
    0ms,
    0ms;
}

body:has(.about-overlay.is-closing) .about-close {
  opacity: 0;
  filter: blur(20px);
  transform: translate(-50%, 120px) scale(0);
}

.about-close:hover {
  background: var(--glass-bg-hover);
  transform: translate(-50%, 0) scale(1.1);
}

.about-close:hover img {
  filter: var(--icon-filter-hover);
}

body:has(.about-overlay.is-visible) .about-close.is-pressed,
body:has(.about-overlay.is-visible) .about-close:hover.is-pressed {
  transform: translate(-50%, 0) scale(0.8);

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease,
    color 240ms ease;
}

.about-text p {
  margin: 0;
  max-width: 480px;
  font-size: clamp(18px, 1.2vw, 22px);
  line-height: 1.3;
  font-weight: 300;
}

.about-links {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;

  font-size: clamp(18px, 1.2vw, 22px);
  font-weight: 300;
  color: var(--text-muted);
}

.about-links a {
  transition:
    color 240ms ease,
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.about-photo {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body:has(.wechat-overlay.is-visible) .about-panel {
  transform: scale(0.9);
  filter: blur(20px);
  opacity: 0.35;
}

.wechat-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;

  display: grid;
  place-items: center;

  background: var(--overlay-transition-bg);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);

  opacity: 0;
  pointer-events: none;
  transform: scale(1.04);

  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 1200ms cubic-bezier(0.16, 1, 0.3, 1),
    background 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.wechat-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);

  background: var(--overlay-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

.wechat-overlay.is-closing {
  pointer-events: auto;
}

.wechat-sheet {
  --wechat-size: min(300px, calc(100vw - 64px));

  width: fit-content;
  padding: 10px;
  border-radius: 34px;

  background: var(--sheet-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  box-shadow:
    0 24px 80px rgb(0 0 0 / 0.12),
    0 8px 24px rgb(0 0 0 / 0.06);

  opacity: 0;
  transform: scale(1.2);
  filter: blur(50px);

  transition:
    opacity 800ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.wechat-overlay.is-visible .wechat-sheet {
  opacity: 1;
  transform: scale(1);
  filter: blur(0px);
}

.wechat-overlay.is-closing .wechat-sheet {
  opacity: 0;
  transform: scale(1.2);
  filter: blur(50px);
}

.wechat-header {
  width: var(--wechat-size);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  min-height: 42px;
  padding: 18px 18px 4px;
}

.wechat-header h2 {
  margin: 0;
  line-height: 1;
  font-size: clamp(18px, 1.4vw, 22px);
  font-weight: 600;
  color: var(--text-main);
}

.wechat-header p {
  margin: 4px 0 0;
  line-height: 1;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 400;
  color: var(--text-muted);
}

.wechat-qr {
  width: var(--wechat-size);
  height: auto;
  display: block;
  border-radius: 24px;
}

.wechat-close {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;
  flex: 0 0 42px;

  border: 1px solid rgb(0 0 0 / 0);
  border-radius: 999px;

  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  cursor: pointer;

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease;
}

.wechat-close img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  pointer-events: none;
  filter: var(--icon-filter);
}

.wechat-close:hover {
  background: var(--glass-bg-hover);
}

.wechat-close:hover img {
  filter: var(--icon-filter-hover);
}

.wechat-close.is-pressed,
.wechat-close:hover.is-pressed {
  transform: scale(0.8);

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease;
}

body:has(.project-detail.is-visible) .page {
  transform: scale(0.9);
  filter: blur(20px);
  opacity: 0.35;
}

.project-detail {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;

  --start-left: 50vw;
  --start-top: 50vh;
  --start-width: 1px;
  --start-height: 1px;

  --target-right: 8vw;
  --target-width: min(34vw, 460px);
  --target-height: 52vh;

  --sheet-width: min(920px, 76vw);
  --sheet-padding: 40px;
}

.project-detail {
  overflow-y: auto;
  overflow-x: hidden;

  scrollbar-width: none;
}

.project-detail::-webkit-scrollbar {
  display: none;
}

.project-detail.is-visible {
  pointer-events: auto;
}

.project-detail-hero {
  position: fixed;
  z-index: 42;

  left: auto;
  right: var(--target-right);
  top: var(--start-top);
  width: var(--start-width);
  height: var(--start-height);

  object-fit: contain;
  opacity: 0;
  filter: blur(20px);
  transform: scale(1);

  transition:
    left 1400ms cubic-bezier(0.1, 0, 0, 1),
    top 1400ms cubic-bezier(0.1, 0, 0, 1),
    width 1400ms cubic-bezier(0.1, 0, 0, 1),
    height 1400ms cubic-bezier(0.1, 0, 0, 1),
    opacity 500ms ease,
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-detail-meta {
  position: fixed;
  left: calc((100vw - var(--sheet-width)) / 2 + var(--sheet-padding));
  top: 7vh;
  z-index: 41;

  width: min(34vw, 460px);
  height: var(--target-height);

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  gap: 14px;

  opacity: 0;
  filter: blur(30px);
  transform: scale(1.08);

  transition:
    opacity 500ms ease,
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-detail.is-closing .project-detail-hero {
  left: auto;
  right: calc((100vw - var(--sheet-width)) / 2 + var(--sheet-padding));
  top: 7vh;
  width: var(--target-width);
  height: var(--target-height);

  opacity: 0;
  filter: blur(20px);
  transform: scale(0.92);

  transition:
    opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
    filter 700ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}


.project-detail.is-closing .project-detail-meta {
  opacity: 0;
  filter: blur(30px);
  transform: scale(1.08);
}

.project-detail-meta h2 {
  margin: 0;

  font-size: clamp(20px, 1.8vw, 30px);
  line-height: 1.1;
  font-weight: 500;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-detail-info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.project-detail-label {
  display: block;

  margin-bottom: 4px;

  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;

  color: var(--text-soft);
}

.project-detail-info p {
  margin: 0;

  font-size: 16px;
  line-height: 1.2;

  color: var(--text-main);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;

  overflow: hidden;
  text-overflow: ellipsis;
}

.project-detail {
  --hero-scroll-offset: 0px;
  --hero-scroll-blur: 0px;
}

.project-detail.is-visible .project-detail-meta {
  opacity: 1;
  filter: blur(var(--hero-scroll-blur));
  transform: translateY(var(--hero-scroll-offset)) scale(1);
}

.project-detail.is-visible .project-detail-hero {
  left: auto;
  right: calc((100vw - var(--sheet-width)) / 2 + var(--sheet-padding));
  top: 7vh;

  width: var(--target-width);
  height: var(--target-height);

  opacity: 1;
  filter: blur(var(--hero-scroll-blur));
  transform: translateY(var(--hero-scroll-offset)) scale(1);
}

.project-detail.is-scroll-ready .project-detail-meta,
.project-detail.is-scroll-ready .project-detail-hero {
  transition: none;
}

.project-detail-sheet {
  position: relative;
  margin-top: calc(7vh + var(--target-height) + 18px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  z-index: 60;

  width: var(--sheet-width);
  min-height: calc(100vh - (7vh + var(--target-height) + 18px));

  padding: var(--sheet-padding) var(--sheet-padding) calc(var(--sheet-padding) + 48px + 56px + 24px);

  border-radius: 50px 50px 0 0;

  background: var(--sheet-bg);

  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);

  box-shadow:
    0 24px 80px rgb(0 0 0 / 0.12),
    0 8px 24px rgb(0 0 0 / 0.06);

  opacity: 0;
  filter: blur(30px);

  transform: translateY(120%) scale(0.9);

  transition:
    opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 1200ms cubic-bezier(0.1, 0, 0, 1),
    filter 1000ms cubic-bezier(0.16, 1, 0.3, 1);
}

.project-detail.is-visible .project-detail-sheet {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
  transition-delay: 550ms;
}

.project-detail-sheet h2 {
  margin: 0;
  font-size: clamp(18px, 1.7vw, 28px);
  font-weight: 600;
}

.project-detail-sheet p {
  margin: 28px 0 0;
  max-width: 100%;
  color: var(--text-muted);
  font-size: clamp(18px, 1.4vw, 20px);
  font-weight: 300;
  line-height: 1.45;
}

.project-detail-close {
  position: fixed;
  left: 50%;
  bottom: 48px;

  width: 56px;
  height: 56px;

  display: grid;
  place-items: center;

  border: 1px solid rgb(0 0 0 / 0);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);

  cursor: pointer;
  z-index: 70;

  opacity: 0;
  filter: blur(20px);
  transform: translate(-50%, 120px) scale(0);

  transition:
    opacity 520ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 900ms cubic-bezier(0.34, 1.56, 0.64, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1),
    background 240ms ease;
}

.project-detail-close img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  pointer-events: none;
  filter: var(--icon-filter);
}

.project-detail.is-visible .project-detail-close {
  opacity: 1;
  filter: blur(0);
  transform: translate(-50%, 0) scale(1);

  transition-delay:
    1800ms,
    1800ms,
    1800ms,
    0ms;
}

.project-detail.is-closing .project-detail-close {
  opacity: 0;
  filter: blur(20px);
  transform: translate(-50%, 120px) scale(0);
}

.project-detail-close:hover {
  background: var(--glass-bg-hover);
  transform: translate(-50%, 0) scale(1.1);
}

.project-detail-close:hover img {
  filter: var(--icon-filter-hover);
}

.project-detail-close.is-pressed,
.project-detail-close:hover.is-pressed {
  transform: translate(-50%, 0) scale(0.8);

  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    background 240ms ease;
}

@media (max-width: 1100px) {
  .page {
    padding: 6% 15%;
  }

  .work-scroll {
    gap: clamp(36px, 6vw, 72px);
    padding: 6vh 40vw;
  }

  .work-card {
    height: 38vh;
  }

  .work-card img {
    max-width: 82vw;
  }

  .about-panel {
    width: 100%;
    grid-template-columns: 1fr minmax(220px, 36vw);
    gap: 32px;
    align-items: start;
  }

  .about-text {
    display: contents;
  }

  .about-text p {
    grid-column: 1 / -1;
    max-width: none;
    font-size: clamp(18px, 2vw, 26px);
  }

  .about-links {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
    align-self: start;
    font-size: clamp(18px, 2vw, 26px);
  }

  .about-photo {
    grid-column: 2;
    grid-row: 2;
    width: min(320px, 60vw);

  }
}

@media (max-width: 900px) {
  .project-detail {
    --sheet-width: calc(100vw - 24px);
    --sheet-padding: 35px;

    --target-width: min(50vw, 500px);
  }

  .project-detail-sheet {
    border-radius: 45px 45px 0 0;
  }

  .about-photo {
    width: min(260px, 42vw);
  }
}

@media (max-width: 700px) {
  .page {
    padding: 5% 10% 10%;
  }

  .top-bar {
    gap: 16px;
  }

  .contact {
    font-size: 14px;
  }

  .work-scroll {
    gap: clamp(32px, 12vw, 64px);
    padding-inline: 50vw;
  }

  .work-card {
    flex: 0 0 auto;
    height: 34vh;
  }

  .work-card img {
    width: auto;
    height: 100%;
    max-width: 82vw;
  }

  .about-photo {
    width: min(220px, 52vw);
  }
}

@media (max-width: 500px) {
  .page {
    padding: 10% 5% 16%;
  }

  .top-bar {
    gap: 16px;
  }

  .contact {
    font-size: 16px;
  }

  .name,
  .year {
    font-size: 16px;
  }

  .work-scroll {
    gap: 28px;
    padding-inline: 42vw;
  }

  .work-card {
    flex: 0 0 auto;
    height: 30vh;
  }

  .work-card img {
    width: auto;
    height: 100%;
    max-width: 78vw;
  }

  .project-detail {
    --sheet-width: calc(100vw - 12px);
    --sheet-padding: 30px;

    --target-width: min(46vw, 320px);
  }

  .project-detail-sheet {
    border-radius: 40px 40px 0 0;
  }
}

/* ==========================================================================
 Article sections (project detail sheet)
 ========================================================================== */

.article-section {
  display: flex;
  flex-direction: column;
}

.article-section + .article-section {
  margin-top: clamp(32px, 4vw, 52px);
  padding-top: clamp(32px, 4vw, 52px);
  border-top: 1px solid rgb(128 128 128 / 0.18);
}

/* Heading inside a section: reuses existing .project-detail-sheet h2 cascade */
.article-section h2 {
  margin: 0;
  font-size: clamp(22px, 2vw, 30px);
}

/* Images */

.article-image-single {
  margin-top: clamp(20px, 2.4vw, 32px);
  margin-left: calc(-1 * var(--sheet-padding));
  margin-right: calc(-1 * var(--sheet-padding));
}

.article-image-pager {
  margin-top: clamp(20px, 2.4vw, 32px);
}

.article-image-single picture {
  display: block;
  overflow: hidden;
}

.article-image-single picture,
.article-image-single img {
  width: 100%;
  height: auto;
  display: block;
}

/* Multi-image pager */

.article-image-track {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.article-image-track::-webkit-scrollbar {
  display: none;
}

.article-image-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  margin: 0;
  line-height: 0;
}

.article-image-slide picture,
.article-image-slide img {
  width: 100%;
  height: auto;
  display: block;
}

/* Single image caption re-indented to align with text (compensates for negative margins) */
.article-image-caption {
  padding-left: var(--sheet-padding);
  padding-right: var(--sheet-padding);
}

/* Pager dots — iOS page control style */

.article-pager-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 14px 0 4px;
}

.pager-dot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;

  background: var(--text-main);
  opacity: 0.28;

  cursor: pointer;

  transition:
    width 360ms cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 280ms ease,
    background 280ms ease;
}

.pager-dot.is-active {
  width: 20px;
  opacity: 0.9;
}

.pager-dot:hover:not(.is-active) {
  opacity: 0.5;
}

/* Captions */

.article-image-caption {
  display: block;
  margin-top: 10px;

  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Pager captions — only the active one is visible */

.article-pager-captions {
  position: relative;
  min-height: 1.4em;
  margin-top: 10px;
}

.article-pager-caption-item {
  display: block;
  position: absolute;
  inset: 0;

  font-size: clamp(12px, 1vw, 14px);
  font-weight: 400;
  color: var(--text-soft);
  line-height: 1.4;

  opacity: 0;
  transition: opacity 300ms ease;
  pointer-events: none;
}

.article-pager-caption-item.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
 Helper classes
 ========================================================================== */

.hidden,
[hidden] {
  display: none !important;
}

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

.invisible {
  visibility: hidden;
}

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

/* ==========================================================================
 Media Queries
 ========================================================================== */

@media only screen and (min-width: 35em) {
}

@media print,
(-webkit-min-device-pixel-ratio: 1.25),
(min-resolution: 1.25dppx),
(min-resolution: 120dpi) {
}

/* ==========================================================================
 Print styles
 ========================================================================== */

@media print {
  *,
  *::before,
  *::after {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
  }

  abbr[title]::after {
    content: " (" attr(title) ")";
  }

  a[href^="#"]::after,
  a[href^="javascript:"]::after {
    content: "";
  }

  pre {
    white-space: pre-wrap !important;
  }

  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }

  tr,
  img {
    page-break-inside: avoid;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
