:root {
  --bg: #fbfbfd;
  --bg-soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-soft: #3a3a3c;
  --muted: #6e6e73;
  --muted-light: #a1a1a6;
  --line: #d2d2d7;
  --line-soft: #e5e5ea;
  --accent: #7f2535;
  --silver: #d7dce3;
  --green: #174532;
  --green-soft: #dfe9dd;
  --purple-soft: #e8e3fb;
  --red-soft: #f5dfda;
  --sand: #e9e0cf;
  --ease: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

h1,
h2,
h3,
h4,
.brand span,
.section-heading h2,
.about-copy h3,
.block-title h3,
.subsection-title h3,
.video-row h3,
.product-copy h3,
.product-metric strong {
  font-family: "Bodoni 72", "Bodoni 72 Display", Didot, "Times New Roman", "Songti SC", serif;
  font-weight: 500;
  letter-spacing: 0;
}

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

button,
input,
textarea {
  font: inherit;
}

::selection {
  color: #fff;
  background: var(--accent);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 80;
  width: calc(var(--page-progress, 0) * 100%);
  height: 2px;
  background: var(--accent);
  transform-origin: left center;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 42px;
  color: var(--ink);
  background: rgba(251, 251, 253, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(22px);
  transition: padding 420ms var(--ease), border-color 420ms ease, background 420ms ease;
}

.site-header.is-compact {
  padding-top: 15px;
  padding-bottom: 15px;
  border-color: rgba(210, 210, 215, 0.72);
  background: rgba(251, 251, 253, 0.88);
}

.brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand span {
  font-family: "Bodoni 72", "Bodoni 72 Display", Didot, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 500;
  line-height: 0.95;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.top-nav a {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  transition: color 260ms ease;
}

.top-nav a span {
  color: var(--muted-light);
  font-size: 11px;
}

.top-nav a::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 300ms ease, transform 420ms var(--ease);
}

.top-nav a:hover,
.top-nav a.is-active {
  color: var(--ink);
}

.top-nav a.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

main {
  min-height: 100vh;
}

.scene {
  position: relative;
  min-height: 100vh;
}

.section-shell {
  width: min(1160px, calc(100vw - 88px));
  margin: 0 auto;
}

.opening {
  overflow: hidden;
  display: grid;
  min-height: 100vh;
  padding: 110px 44px 56px;
  place-items: center;
}

.opening-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, 100%);
}

.section-count {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}

.opening-title {
  margin: 34px 0 0;
  font-family: "Bodoni 72", "Bodoni 72 Display", Didot, "Times New Roman", serif;
  font-size: clamp(74px, 12.8vw, 189px);
  font-weight: 500;
  line-height: 0.82;
  letter-spacing: 0;
  opacity: 0;
  transform: translate3d(0, 38px, 0) scale(0.96);
}

.is-ready .opening-title {
  animation: openingTitle 1300ms var(--ease) forwards;
}

@keyframes openingTitle {
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.opening-name {
  margin: 36px 0 0;
  color: var(--ink-soft);
  font-family: "Avenir Next", "Helvetica Neue", "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: clamp(28px, 4.4vw, 64px);
  font-weight: 300;
  letter-spacing: 0.01em;
}

.portfolio-line-art {
  --line-intensity: 0;
  position: absolute;
  top: 0;
  right: 0;
  bottom: -9vh;
  left: 0;
  z-index: 1;
  width: 100vw;
  pointer-events: none;
}

.portfolio-line-art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.portfolio-track,
.portfolio-runner,
.portfolio-runner-glow {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.portfolio-track {
  stroke: rgba(0, 49, 83, 0.2);
  stroke-width: 1.05;
}

.portfolio-track-soft {
  stroke: rgba(101, 151, 190, 0.26);
  stroke-width: 1.05;
}

.portfolio-track-faint {
  stroke: rgba(0, 49, 83, 0.11);
  stroke-width: 0.85;
}

.portfolio-runner-glow {
  opacity: calc(0.18 + var(--line-intensity) * 0.5);
  stroke: url(#portfolioBlue);
  stroke-width: 5.8;
  filter: url("#portfolioGlow");
}

.portfolio-runner {
  opacity: calc(0.56 + var(--line-intensity) * 0.36);
  stroke: url(#portfolioBlue);
  stroke-width: 1.75;
}

.opening-foot {
  z-index: 2;
  position: absolute;
  right: 44px;
  bottom: 42px;
  left: 44px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  padding-top: 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 13px;
}

.story-section {
  padding: 180px 0 190px;
  border-bottom: 1px solid var(--line-soft);
}

.section-heading {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: end;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(48px, 7vw, 96px);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0;
}

.section-heading > p:last-child {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
}

.about-panel,
.resume-block {
  width: min(1160px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.about-panel {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 36px;
  margin-top: 96px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 24px;
  box-shadow: 0 18px 70px rgba(29, 29, 31, 0.06);
}

.portrait-slot {
  position: relative;
  overflow: visible;
  min-height: 520px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.portrait-stack {
  --swap: 0;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  outline: none;
  cursor: pointer;
}

.portrait-card {
  position: absolute;
  width: min(82%, 320px);
  height: min(92%, 470px);
  padding: 0;
  border: 2px solid rgba(29, 29, 31, 0.88);
  border-radius: 0;
  background: transparent;
  overflow: hidden;
  box-shadow: 0 var(--portrait-shadow-y, 18px) var(--portrait-shadow-blur, 38px) rgba(29, 29, 31, var(--portrait-shadow-alpha, 0.12));
  opacity: var(--portrait-opacity, 1);
  filter: saturate(var(--portrait-saturation, 1)) brightness(var(--portrait-brightness, 1));
  transition:
    top 1800ms cubic-bezier(0.16, 1, 0.3, 1),
    left 1800ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1900ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 1500ms ease,
    filter 1700ms ease,
    box-shadow 1900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}

.portrait-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-card-front {
  z-index: 3;
  top: var(--front-top, 18px);
  left: var(--front-left, 64px);
  --portrait-opacity: var(--front-opacity, 1);
  --portrait-saturation: var(--front-saturation, 1);
  --portrait-brightness: var(--front-brightness, 1);
  --portrait-shadow-y: var(--front-shadow-y, 18px);
  --portrait-shadow-blur: var(--front-shadow-blur, 38px);
  --portrait-shadow-alpha: var(--front-shadow-alpha, 0.12);
  transform: translate3d(var(--front-x, 0px), var(--front-y, 0px), 0) scale(var(--front-scale, 1));
}

.portrait-card-back {
  z-index: 2;
  top: var(--back-top, 86px);
  left: var(--back-left, 0px);
  --portrait-opacity: var(--back-opacity, 0.64);
  --portrait-saturation: var(--back-saturation, 0.82);
  --portrait-brightness: var(--back-brightness, 0.96);
  --portrait-shadow-y: var(--back-shadow-y, 14px);
  --portrait-shadow-blur: var(--back-shadow-blur, 30px);
  --portrait-shadow-alpha: var(--back-shadow-alpha, 0.08);
  transform: translate3d(var(--back-x, 0px), var(--back-y, 0px), 0) scale(var(--back-scale, 0.96));
}

.portrait-stack.is-swapped .portrait-card-front {
  z-index: 2;
  top: 54px;
  left: 10px;
  --portrait-opacity: 0.76;
  --portrait-saturation: 0.86;
  --portrait-brightness: 0.965;
  --portrait-shadow-y: 12px;
  --portrait-shadow-blur: 28px;
  --portrait-shadow-alpha: 0.07;
  transform: translate3d(-15px, 18px, 0) scale(0.952);
}

.portrait-stack.is-swapped .portrait-card-back {
  z-index: 4;
  top: 8px;
  left: 70px;
  --portrait-opacity: 1;
  --portrait-saturation: 1;
  --portrait-brightness: 1;
  --portrait-shadow-y: 22px;
  --portrait-shadow-blur: 48px;
  --portrait-shadow-alpha: 0.14;
  transform: translate3d(14px, -20px, 0) scale(1);
}

.panel-kicker {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 12px;
  font-weight: 400;
  text-transform: uppercase;
}

.about-copy h3,
.block-title h3 {
  margin: 0;
  font-size: 38px;
  font-weight: 500;
  line-height: 1.08;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.info-grid div,
.skill-board article {
  min-height: 138px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 16px;
}

.info-grid span,
.skill-board span,
.timeline-row time,
.product-index,
.product-type,
.date-line,
.video-row p,
.subsection-title p {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.info-grid strong {
  display: block;
  margin-top: 18px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.78;
}

.skills-block {
  margin-top: 78px;
}

.block-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.skill-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.skill-board p {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.78;
}

.subsection {
  margin-top: 150px;
}

.subsection-title {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 32px;
}

.subsection-title p {
  margin: 0 0 10px;
}

.subsection-title h3 {
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 500;
  line-height: 1;
}

.timeline-list {
  border-top: 1px solid var(--line);
}

.timeline-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 48px;
  padding: 42px 0;
  border-bottom: 1px solid var(--line-soft);
}

.timeline-row h4 {
  margin: 0 0 18px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
}

.timeline-row p {
  max-width: 850px;
  margin: 12px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
}

.photograph-section {
  background: var(--bg);
}

.photo-flow {
  --photo-column: clamp(260px, 31vw, 410px);
  width: min(1180px, 100%);
  margin: 118px auto 0;
  padding-bottom: 90px;
}

.photo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(74px, 11vh, 128px);
  padding-top: 18px;
}

.photo-frame {
  --crop-x: 0px;
  --crop-y: 0px;
  --image-scale: 1.11;
  --label-opacity: 0.7;
  position: relative;
  display: block;
  width: var(--photo-column);
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--muted);
  opacity: 1;
  transform: none;
  transform-origin: center;
}

.photo-window {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 8px;
  background: var(--bg-soft);
  transform: translate3d(var(--crop-x), var(--crop-y), 0);
  transition: transform 180ms linear;
  will-change: transform;
}

.photo-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--image-scale)) translate3d(calc(var(--crop-x) * -0.18), calc(var(--crop-y) * -0.18), 0);
  transform-origin: center;
  will-change: transform;
}

.photo-ratio-portrait .photo-window {
  aspect-ratio: 10 / 16;
}

.photo-ratio-native .photo-window {
  aspect-ratio: var(--native-ratio);
  overflow: visible;
  background: transparent;
}

.photo-ratio-native .photo-window img {
  object-fit: contain;
  transform: none;
}

.photo-note {
  position: absolute;
  top: 50%;
  width: clamp(140px, 16vw, 260px);
  margin: 0;
  color: rgba(29, 29, 31, 0.74);
  font-size: clamp(12px, 0.95vw, 15px);
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
  opacity: var(--label-opacity);
  transform: translateY(calc(-50% + var(--crop-y)));
  transition: opacity 520ms ease;
  pointer-events: none;
}

.photo-label-left .photo-note {
  right: calc(100% + clamp(86px, 16vw, 230px));
  text-align: right;
}

.photo-label-right .photo-note {
  left: calc(100% + clamp(86px, 16vw, 230px));
  text-align: left;
}

.photo-note:empty {
  display: none;
}


.video-list {
  margin-top: 92px;
  border-top: 1px solid var(--line);
}

.video-row {
  display: grid;
  grid-template-columns: minmax(360px, 620px) minmax(0, 1fr);
  gap: 70px;
  align-items: center;
  padding: 52px 0;
  border-bottom: 1px solid var(--line-soft);
}

.video-media {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  color: var(--muted);
  font-size: 13px;
}

.video-media.small {
  width: min(440px, 100%);
}

.video-row p {
  margin: 0 0 16px;
}

.video-row h3 {
  margin: 0;
  font-size: clamp(30px, 4vw, 58px);
  font-weight: 500;
  line-height: 1;
}

.product-list {
  margin-top: 92px;
  border-top: 1px solid var(--line);
}

.product-story {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 190px;
  gap: 54px;
  align-items: start;
  padding: 62px 0;
  border-bottom: 1px solid var(--line-soft);
}

.product-index {
  color: var(--accent);
  font-size: 18px;
}

.product-subtitle,
.date-line {
  margin: 0;
}

.product-copy h3 {
  max-width: 780px;
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 500;
  line-height: 1.14;
}

.product-subtitle {
  max-width: 760px;
  color: var(--ink);
  font-size: clamp(17px, 1.7vw, 24px);
  font-weight: 500;
  line-height: 1.55;
}

.date-line {
  margin-top: 20px;
  color: var(--muted);
  font-size: 14px;
}

.product-copy p:not(.product-subtitle, .date-line) {
  max-width: 860px;
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.95;
}

.product-copy p strong {
  color: var(--ink);
  font-weight: 700;
}

.product-metric {
  padding-left: 28px;
  border-left: 1px solid var(--line-soft);
}

.product-metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.product-metric strong {
  display: block;
  margin-top: 12px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 500;
  line-height: 1.1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  padding: 36px 44px;
  color: var(--muted);
  background: var(--bg-soft);
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 42px, 0);
  transition: opacity 900ms ease, transform 1100ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translate3d(0, var(--float-y, 0), 0);
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    padding: 18px 22px;
  }

  .top-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px 18px;
  }

  .section-shell {
    width: min(100% - 40px, 760px);
  }

  .opening {
    padding-right: 22px;
    padding-left: 22px;
  }

  .portfolio-line-art {
    right: -44vw;
    width: 116vw;
    opacity: 0.58;
  }

  .opening-foot {
    right: 22px;
    left: 22px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .about-panel,
  .subsection-title,
  .timeline-row,
  .video-row,
  .product-story {
    grid-template-columns: 1fr;
  }

  .story-section {
    padding: 130px 0;
  }

  .info-grid,
  .skill-board {
    grid-template-columns: 1fr;
  }

  .about-panel {
    gap: 24px;
    padding: 20px;
  }

  .photo-flow {
    --photo-column: min(68vw, 360px);
    margin-top: 72px;
  }

  .photo-stack {
    gap: 76px;
  }

  .photo-note {
    position: static;
    width: 100%;
    margin-top: 12px;
    text-align: center;
    transform: none;
  }

  .photo-label-left .photo-note,
  .photo-label-right .photo-note {
    text-align: center;
  }

  .product-metric {
    padding: 24px 0 0;
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .reveal,
  .opening-title {
    opacity: 1;
    transform: none;
  }
}
