:root {
  --stage-width: 1920;
  --stage-height: 960;
  --scale: 1;
  --bg: #08090c;
  --text: rgba(255, 255, 255, 0.96);
  --muted: #7a8494;
  --body: #e6e9f0;
  --body-dim: #abb6cc;
  --accent: #ff7700;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Source Han Sans CN", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.work-details::-webkit-scrollbar,
.preview-thumbs::-webkit-scrollbar {
  display: none;
}

button,
a {
  font: inherit;
}

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

.splash-cursor {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

.snap-shell {
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
  background: var(--bg);
}

.page {
  position: relative;
  height: 100vh;
  min-height: 720px;
  overflow: hidden;
}

/* 以 1920 x 960 作为设计坐标系，scripts.js 会写入 --scale 数值来完成稳定等比缩放。 */
.viewport-scale {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(1920px * var(--scale));
  height: calc(960px * var(--scale));
  transform: translate(-50%, -50%);
}

.stage {
  position: absolute;
  left: 0;
  top: 0;
  width: 1920px;
  height: 960px;
  overflow: hidden;
  transform: scale(var(--scale));
  transform-origin: 0 0;
  background: var(--bg);
}

.background,
.blob,
.grid {
  position: absolute;
  inset: 0;
}

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

.background::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(255, 255, 255, 0.02);
  pointer-events: none;
}

.blob {
  width: 1920px;
  height: 1080px;
  object-fit: cover;
  opacity: 0.98;
}

.grid {
  height: 960px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 160px 120px;
  background-position: 0 0;
  opacity: 1;
}

.site-header {
  position: absolute;
  left: 108px;
  top: 48px;
  z-index: 12;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 1704px;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.brand strong {
  font-size: 20px;
  line-height: 24px;
  font-weight: 700;
}

.brand span {
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  font-weight: 500;
}

.download-btn {
  position: relative;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.download-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.side-tabs {
  position: absolute;
  right: 24px;
  top: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 64px;
  align-items: center;
  width: 16px;
  transform: translateY(-50%);
}

.side-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 50px;
  color: #677285;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.side-tabs a:first-child {
  height: 36px;
}

.side-tabs a[href="#portfolio"],
.side-tabs a[href="#photography"] {
  height: 78px;
}

.side-tabs .active {
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12), 2px 2px 1px #52321d;
}

.photography-dome {
  position: absolute;
  left: 108px;
  top: 136px;
  z-index: 2;
  width: 1704px;
  height: 768px;
  overflow: hidden;
  border-radius: 4px;
  background: transparent;
  opacity: 0;
  transform: translateY(72px);
  animation: photo-dome-enter 980ms cubic-bezier(0.22, 1, 0.36, 1) 180ms forwards;
}

.photography-dome::before,
.photography-dome::after {
  position: absolute;
  inset: 0;
  z-index: 4;
  content: "";
  pointer-events: none;
}

.photography-dome::before {
  display: none;
}

.photography-dome::after {
  display: none;
  backdrop-filter: blur(2px);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, transparent 66%, #000 92%);
  mask-image: radial-gradient(circle at 50% 50%, transparent 66%, #000 92%);
}

.photo-dome__stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  perspective: 1180px;
  perspective-origin: 50% 50%;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 86%, transparent 100%);
  mask-composite: intersect;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 24%, #000 76%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 10%, #000 86%, transparent 100%);
  -webkit-mask-composite: source-in;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.photo-dome__stage:active {
  cursor: grabbing;
}

.photo-dome__sphere,
.photo-dome__item,
.photo-dome__button {
  transform-style: preserve-3d;
}

.photo-dome__sphere {
  --photo-radius: 1040px;
  --photo-unit-x: 4deg;
  --photo-unit-y: 4deg;
  position: relative;
  width: 0;
  height: 0;
  transform: translateZ(calc(var(--photo-radius) * -1)) rotateX(var(--photo-rotate-x, 0deg)) rotateY(var(--photo-rotate-y, 0deg));
  will-change: transform;
}

.photo-dome__item {
  --photo-float-z: 0px;
  --photo-float-scale: 1;
  position: absolute;
  left: -66px;
  top: -66px;
  width: 132px;
  height: 132px;
  padding: 6px;
  opacity: 0;
  transform:
    rotateY(calc(var(--photo-unit-x) * var(--photo-x)))
    rotateX(calc(var(--photo-unit-y) * var(--photo-y)))
    translateZ(calc(var(--photo-radius) + var(--photo-float-z)))
    translateY(72px)
    scale(var(--photo-float-scale));
  transform-origin: 50% 50%;
  animation: photo-tile-enter 740ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--photo-order) * 14ms);
  backface-visibility: hidden;
  will-change: transform;
}

.photo-dome__button {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32), 0 0 18px rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 260ms ease, box-shadow 260ms ease, filter 260ms ease;
  backface-visibility: hidden;
}

.photo-dome__button:hover,
.photo-dome__button:focus-visible {
  border-color: rgba(255, 255, 255, 0.46);
  filter: saturate(1.08) brightness(1.08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.48);
  outline: none;
}

.photo-dome__button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
}

.photo-dome__count {
  position: absolute;
  left: 32px;
  bottom: 28px;
  z-index: 6;
  display: none;
  gap: 12px;
  align-items: flex-end;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.photo-dome__count span {
  font-size: 42px;
  line-height: 0.9;
  font-weight: 800;
}

.photo-dome__count small {
  color: rgba(255, 255, 255, 0.44);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  text-transform: uppercase;
}

@keyframes photo-dome-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photo-tile-enter {
  to {
    opacity: 1;
    transform:
      rotateY(calc(var(--photo-unit-x) * var(--photo-x)))
      rotateX(calc(var(--photo-unit-y) * var(--photo-y)))
      translateZ(calc(var(--photo-radius) + var(--photo-float-z)))
      scale(var(--photo-float-scale));
  }
}

.watermark {
  position: absolute;
  left: -8px;
  bottom: -24px;
  z-index: 1;
  margin: 0;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  white-space: nowrap;
  font-size: 142px;
  line-height: 1;
  font-weight: 700;
  opacity: 0.55;
  pointer-events: none;
}

.watermark-image {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.watermark-image-large {
  left: 15px;
  bottom: 34px;
  width: 1890px;
  height: 107px;
  opacity: 0.64;
  mix-blend-mode: screen;
}

.home-hero {
  position: absolute;
  left: 108px;
  top: 196px;
  z-index: 2;
  width: 900px;
}

.home-title-row {
  display: flex;
  align-items: flex-start;
  gap: 28px;
}

.home-title-row h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--accent);
  font-size: 96px;
  line-height: 116px;
  font-weight: 700;
  text-transform: uppercase;
}

.home-title-row img {
  width: 48px;
  height: 48px;
  margin-top: 0;
}

.portfolio-title-stack {
  position: relative;
  width: 848px;
  height: 116px;
  margin-top: 24px;
}

.portfolio-title,
.portfolio-title-mask {
  position: absolute;
  left: 0;
  margin: 0;
  font-size: 96px;
  line-height: 116px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}

.portfolio-title {
  top: 0;
  color: rgba(255, 255, 255, 0.96);
}

.warp-title {
  position: relative;
}

.warp-title.warp-ready {
  color: transparent !important;
  -webkit-text-fill-color: transparent;
}

.warp-title-canvas {
  position: absolute;
  left: -14px;
  top: -8px;
  z-index: 1;
  display: block;
  opacity: 0;
  pointer-events: none;
}

.warp-title.warp-ready .warp-title-canvas {
  opacity: 1;
}

.portfolio-title-mask {
  top: 84px;
  height: 20px;
  overflow: hidden;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.18);
  opacity: 0.4;
}

.home-quote {
  margin: 76px 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-style: normal;
}

.home-quote p {
  margin: 0;
}

.home-quote p:first-child {
  font-size: 24px;
  line-height: 36px;
  font-weight: 500;
}

.home-quote p:nth-child(2),
.home-quote cite {
  display: block;
  color: rgba(255, 255, 255, 0.48);
  font-size: 20px;
  line-height: 24px;
  font-style: normal;
  font-weight: 400;
}

.home-quote p:nth-child(2) {
  margin-top: 16px;
}

.home-quote cite {
  margin-top: 12px;
}

.contact-card {
  position: absolute;
  left: 108px;
  top: 772px;
  z-index: 2;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 56px;
  row-gap: 16px;
  align-items: center;
  align-content: center;
  width: max-content;
  max-width: calc(100% - 216px);
  min-height: 108px;
  padding: 24px 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(6, 15, 31, 0.4);
  backdrop-filter: blur(20px);
}

.contact-card.border-glow-card {
  --border-radius: 16px;
  --glow-padding: 28px;
  --edge-sensitivity: 26;
  --cone-spread: 22;
  --fill-opacity: 0.1;
  --glow-color: hsl(192deg 100% 72% / 100%);
  --glow-color-60: hsl(192deg 100% 72% / 60%);
  --glow-color-50: hsl(192deg 100% 72% / 50%);
  --glow-color-40: hsl(192deg 100% 72% / 40%);
  --glow-color-30: hsl(192deg 100% 72% / 30%);
  --glow-color-20: hsl(192deg 100% 72% / 20%);
  --glow-color-10: hsl(192deg 100% 72% / 10%);
}

.contact-card div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-card span {
  color: #687285;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  text-transform: uppercase;
}

.contact-card strong {
  color: rgba(255, 255, 255, 0.72);
  font-size: 20px;
  line-height: 30px;
  font-weight: 400;
  white-space: nowrap;
}

.home-watermark {
  position: absolute;
  left: 1348px;
  top: 782px;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.04);
  font-size: 80px;
  line-height: 98px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: none;
}

.home-visual-slot {
  position: absolute;
  left: auto;
  right: 72px;
  top: 48px;
  z-index: 2;
  width: 1120px;
  height: 864px;
  pointer-events: auto;
}

.drift-wall {
  --dw-tile-w: 168px;
  --dw-tile-h: 108px;
  --dw-gap: 18px;
  --dw-radius: 8px;
  --dw-lift: 58px;
  position: absolute;
  overflow: hidden;
  perspective: 1200px;
  perspective-origin: 58% 50%;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.08) 10%, #000 30%, #000 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.08) 10%, #000 30%, #000 94%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 6%, #000 94%, transparent 100%);
  mask-composite: intersect;
}

.drift-wall::before {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 3;
  width: 60%;
  content: "";
  background: linear-gradient(to right, rgba(8, 9, 12, 0.86), rgba(8, 9, 12, 0.54) 34%, rgba(8, 9, 12, 0));
  pointer-events: none;
}

.drift-wall__plane {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: row;
  transform-style: preserve-3d;
  transform-origin: 50% 50%;
  will-change: transform;
}

.drift-wall__col {
  position: relative;
  width: calc(var(--dw-tile-w) + var(--dw-gap));
  transform-style: preserve-3d;
}

.drift-wall__track {
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  will-change: transform;
}

.drift-wall__tile {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: calc(var(--dw-tile-h) + var(--dw-gap));
  outline: none;
  transform-style: preserve-3d;
}

.drift-wall__inner {
  position: absolute;
  inset: calc(var(--dw-gap) / 2);
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--dw-radius);
  background: #0b0d12;
  opacity: 0.62;
  transform: translateZ(0);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
  transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1), opacity 420ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 420ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile.is-active .drift-wall__inner,
.drift-wall__tile:focus-visible .drift-wall__inner {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.42);
  transform: translateZ(var(--dw-lift));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

.drift-wall__inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.92) contrast(0.96);
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  transition: filter 420ms cubic-bezier(0.22, 1, 0.36, 1), transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile.is-active img,
.drift-wall__tile:focus-visible img {
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.035);
}

.drift-wall__overlay {
  position: absolute;
  inset: 0;
  background: #060a16;
  opacity: 0.38;
  pointer-events: none;
  transition: opacity 420ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drift-wall__tile.is-active .drift-wall__overlay,
.drift-wall__tile:focus-visible .drift-wall__overlay {
  opacity: 0;
}

.resume-card {
  position: absolute;
  left: 108px;
  top: 136px;
  z-index: 2;
  width: 1704px;
  height: 768px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(6, 15, 31, 0.24);
  backdrop-filter: blur(60px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.resume-card.border-glow-card {
  --border-radius: 16px;
  --glow-padding: 42px;
  --edge-sensitivity: 22;
  --cone-spread: 18;
  --fill-opacity: 0.025;
  --glow-color: hsl(205deg 100% 76% / 100%);
  --glow-color-60: hsl(205deg 100% 76% / 60%);
  --glow-color-50: hsl(205deg 100% 76% / 50%);
  --glow-color-40: hsl(205deg 100% 76% / 40%);
  --glow-color-30: hsl(205deg 100% 76% / 30%);
  --glow-color-20: hsl(205deg 100% 76% / 20%);
  --glow-color-10: hsl(205deg 100% 76% / 10%);
}

/*
  BorderGlow 是从 React Bits 组件改写成静态网页版本。
  JS 写入 --edge-proximity 和 --cursor-angle，CSS 根据这两个变量绘制边缘光。
*/
.border-glow-card {
  --edge-proximity: 0;
  --cursor-angle: 45deg;
  --edge-sensitivity: 30;
  --color-sensitivity: calc(var(--edge-sensitivity) + 20);
  --border-radius: 16px;
  --glow-padding: 40px;
  --cone-spread: 25;
  --fill-opacity: 0.3;
  --gradient-one: radial-gradient(at 80% 55%, #38bdf8 0px, transparent 50%);
  --gradient-two: radial-gradient(at 69% 34%, #f472b6 0px, transparent 50%);
  --gradient-three: radial-gradient(at 8% 6%, #7dd3fc 0px, transparent 50%);
  --gradient-four: radial-gradient(at 41% 38%, #ff7700 0px, transparent 50%);
  --gradient-five: radial-gradient(at 86% 85%, #5eead4 0px, transparent 50%);
  --gradient-six: radial-gradient(at 82% 18%, #facc15 0px, transparent 50%);
  --gradient-seven: radial-gradient(at 51% 4%, #c084fc 0px, transparent 50%);
  --gradient-base: linear-gradient(#38bdf8 0 100%);
  isolation: isolate;
  transform: translate3d(0, 0, 0.01px);
}

.border-glow-card > .edge-light {
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
}

.border-glow-card::before {
  display: none;
}

.border-glow-card > .edge-light {
  inset: calc(var(--glow-padding) * -1);
  z-index: 4;
  border-radius: calc(var(--border-radius) + var(--glow-padding));
  mask-image: conic-gradient(from var(--cursor-angle) at center, black 2.5%, transparent 10%, transparent 90%, black 97.5%);
  mix-blend-mode: plus-lighter;
  opacity: max(0, calc((var(--edge-proximity) - var(--edge-sensitivity)) / (100 - var(--edge-sensitivity))));
}

.border-glow-card > .edge-light::before {
  position: absolute;
  inset: var(--glow-padding);
  border-radius: var(--border-radius);
  content: "";
  box-shadow:
    inset 0 0 0 1px var(--glow-color),
    inset 0 0 3px 0 var(--glow-color-50),
    inset 0 0 10px 0 var(--glow-color-30),
    inset 0 0 24px 2px var(--glow-color-20),
    0 0 3px 0 var(--glow-color-50),
    0 0 12px 0 var(--glow-color-30),
    0 0 28px 2px var(--glow-color-20),
    0 0 58px 2px var(--glow-color-10);
}

.intro-column {
  position: absolute;
  left: 40px;
  top: 40px;
  width: 772px;
}

.section-ornament-left {
  position: absolute;
  left: -28px;
  top: -40px;
  width: 400px;
  height: 40px;
}

.section-ornament-left img,
.corner-ornament img {
  display: block;
  width: 100%;
  height: 100%;
}

.identity-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  color: var(--accent);
}

.identity-row h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.25;
  font-weight: 700;
}

.identity-row p {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 500;
  opacity: 0.8;
}

.summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  color: var(--body);
  font-size: 16px;
  line-height: 1.55;
}

.summary p,
.info-grid p,
.job p {
  margin: 0;
}

.divider {
  width: 772px;
  height: 1px;
  margin: 20px 0 24px;
  background: rgba(255, 255, 255, 0.08);
}

.basic-info h2,
.skills h2,
.experience-column h2 {
  margin: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 40px;
  margin-top: 12px;
  color: var(--body);
  font-size: 16px;
  line-height: 26px;
}

.info-grid p {
  min-width: 0;
  overflow-wrap: anywhere;
}

.info-grid span {
  font-weight: 700;
}

.info-grid div {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skills {
  margin-top: 28px;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  width: 772px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  display: flex;
  flex: 0 0 calc((100% - 72px) / 7);
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  color: var(--body);
  font-size: 16px;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}

.skill-list img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.center-line {
  position: absolute;
  left: 852px;
  top: 40px;
  width: 1px;
  height: 594px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.experience-column {
  position: absolute;
  left: 892px;
  top: 40px;
  width: 772px;
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 68px 680px;
  gap: 24px;
  align-items: center;
}

.timeline li + li {
  margin-top: 0;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  gap: 4px;
  width: 68px;
  padding-top: 6px;
}

.date {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 68px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 20px;
}

.date strong {
  font-weight: 700;
  opacity: 0.24;
}

.date span {
  font-weight: 500;
  opacity: 0.16;
}

.timeline-axis {
  display: flex;
  flex: 1 0 0;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 8px;
  min-height: 1px;
  padding-top: 0;
}

.timeline-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.02);
}

.timeline-dot-primary {
  background: rgba(255, 255, 255, 0.24);
}

.timeline-dot-end {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.22);
}

.timeline-line {
  flex: 1 1 auto;
  width: 1px;
  min-height: 32px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.14) 0,
    rgba(255, 255, 255, 0.14) 2px,
    transparent 2px,
    transparent 6px
  );
}

.timeline li:last-child .timeline-line {
  flex: 0 0 80%;
  min-height: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0));
}

.job {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 680px;
  padding-bottom: 24px;
  color: #abb6cc;
  font-size: 16px;
  line-height: 1.5;
}

.job header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.job h3 {
  margin: 0;
  color: var(--body);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 500;
}

.job span {
  color: #fff;
  font-size: 16px;
  font-weight: 500;
}

.corner-ornament {
  position: absolute;
  right: 16px;
  bottom: 0;
  width: 240px;
  height: 40px;
  transform: scaleY(-1);
}

.card-watermark {
  position: absolute;
  left: 0;
  top: 650px;
  z-index: 0;
  width: 1702px;
  height: 118px;
  opacity: 0.64;
  mix-blend-mode: screen;
  pointer-events: none;
  user-select: none;
}

.portfolio-grid {
  position: absolute;
  left: 108px;
  top: 122px;
  z-index: 2;
  width: 1704px;
  height: 720px;
  overflow: hidden;
  perspective: 1200px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.portfolio-grid:active,
.portfolio-grid.is-dragging {
  cursor: grabbing;
}

.work-card {
  --gallery-x: 0px;
  --gallery-y: 0px;
  --gallery-z: 0px;
  --gallery-rotate: 0deg;
  --gallery-scale: 1;
  position: absolute;
  left: 50%;
  top: 38px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 388px;
  color: #fff;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  opacity: 1;
  transform:
    translate3d(calc(-50% + var(--gallery-x)), var(--gallery-y), var(--gallery-z))
    rotateY(var(--gallery-rotate))
    scale(var(--gallery-scale));
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: filter 220ms ease;
}

.portfolio-grid.is-dragging .work-card {
  cursor: grabbing;
}

.work-card:hover {
  filter: brightness(1.08);
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  -webkit-user-drag: none;
  user-drag: none;
}

.work-card span {
  position: relative;
  display: block;
  padding-left: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 26px;
  line-height: 34px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.work-card span::before {
  content: none;
}

.portfolio-bottom-type {
  position: absolute;
  left: 341px;
  bottom: 20px;
  z-index: 1;
  width: 1239px;
  height: 124px;
  opacity: 1;
  pointer-events: none;
}

.portfolio-note {
  position: absolute;
  left: 50%;
  bottom: 97px;
  z-index: 2;
  margin: 0;
  width: 720px;
  transform: translateX(-50%) translateY(100%);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.64) 24%, rgba(255, 255, 255, 0.64) 76%, rgba(255, 255, 255, 0.24));
  background-clip: text;
  color: transparent;
  font-size: 20px;
  line-height: 28px;
  text-align: center;
  pointer-events: none;
}

.work-details {
  --detail-page-gutter: clamp(24px, 5.625vw, 108px);
  --detail-side-rail: 88px;
  --detail-shell-width: min(1704px, calc(100vw - (var(--detail-page-gutter) + var(--detail-side-rail))));
  --detail-menu-width: 144px;
  --detail-column-gap: clamp(48px, 7.5vw, 144px);
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  overflow: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  background:
    url("./assets/diffused-blob-top-right-cyan.svg") 100% 0 / 1920px 1080px no-repeat,
    url("./assets/diffused-blob-bottom-left-amber.svg") 0 100% / 1920px 1080px no-repeat,
    url("./assets/diffused-blob-lower-right-mint.svg") 100% 100% / 1920px 1080px no-repeat,
    #08090c;
  background-attachment: fixed;
  color: rgba(255, 255, 255, 0.92);
}

.work-details.active {
  display: block;
}

.work-details::before {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  width: 100%;
  height: 136px;
  content: "";
  background:
    url("./assets/diffused-blob-top-right-cyan.svg") 100% 0 / 1920px 1080px no-repeat,
    #08090c;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    url("./assets/diffused-blob-top-right-cyan.svg");
  background-position: 0 0, 0 0, 100% 0;
  background-size: 160px 120px, 160px 120px, 1920px 1080px;
  pointer-events: none;
}

.detail-stage {
  position: relative;
  display: grid;
  grid-template-columns: var(--detail-menu-width) minmax(0, 1fr);
  column-gap: var(--detail-column-gap);
  width: var(--detail-shell-width);
  margin: 0 auto;
  min-width: 320px;
  min-height: 100vh;
  padding: 136px 0 72px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 160px 120px;
}

.detail-global-header {
  position: fixed;
  top: 48px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: var(--detail-shell-width);
  transform: translateX(-50%);
}

.detail-side-tabs {
  position: fixed;
  z-index: 5;
}

.detail-back {
  position: fixed;
  top: 136px;
  left: calc((100vw - var(--detail-shell-width)) / 2);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  color: #bcc1cc;
  font-size: 16px;
  line-height: 24px;
}

.detail-back img {
  display: block;
  width: 24px;
  height: 24px;
}

.detail-menu {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  grid-column: 1;
  width: var(--detail-menu-width);
  min-width: var(--detail-menu-width);
  height: 100vh;
  min-height: 720px;
  margin-top: -136px;
  pointer-events: none;
}

.detail-menu h2 {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.detail-menu nav {
  display: flex;
  flex-direction: column;
  gap: 40px;
  pointer-events: auto;
}

.detail-menu nav a {
  display: block;
  padding: 0;
  border: 0;
  color: #677285;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  transition: color 160ms ease, text-shadow 160ms ease, transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.detail-menu nav a.active,
.detail-menu nav a:hover {
  background: none;
  color: #fff;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.12), 2px 2px 1px #52321d;
}

.detail-menu nav a:hover {
  transform: translateX(16px);
}

.detail-page-count {
  position: absolute;
  left: 0;
  bottom: 40px;
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 0;
  white-space: nowrap;
}

.detail-page-count strong {
  color: rgba(255, 255, 255, 0.8);
  font-size: 32px;
  font-style: italic;
  font-weight: 600;
  line-height: 40px;
}

.detail-page-count span {
  color: rgba(255, 255, 255, 0.4);
  font-size: 16px;
  font-style: italic;
}

.detail-content {
  position: relative;
  z-index: 1;
  grid-column: 2;
  width: 100%;
  max-width: 1416px;
}

.masonry-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.masonry-item {
  position: relative;
  display: block;
  scroll-margin-top: 136px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  cursor: grab;
  overflow: hidden;
  touch-action: pan-y;
  box-shadow: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.masonry-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.04) 8%, rgba(255, 255, 255, 0.12) 18%, rgba(255, 255, 255, 0.04) 33%);
  background-size: 200% 100%;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.masonry-item.is-loading::before {
  opacity: 1;
  animation: image-loading-sheen 1.2s linear infinite;
}

.masonry-item img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.masonry-item.is-loading img {
  opacity: 0;
}

@media (min-width: 1921px) {
  .work-details {
    --detail-shell-width: calc(100vw - 216px);
  }

  .detail-content {
    max-width: none;
  }

  .masonry-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }
}

.fullscreen-preview {
  --preview-frame-width: min(1416px, calc(100vw - clamp(184px, 26vw, 504px)));
  --preview-frame-height: min(820px, calc(100vh - 200px));
  --preview-frame-half-height: min(410px, calc(50vh - 100px));
  --preview-offset-y: -44px;
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: #08090c;
  color: #fff;
}

.fullscreen-preview.active {
  display: block;
}

.fullscreen-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
}

.preview-stage {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--preview-offset-y));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: var(--preview-frame-width);
  height: var(--preview-frame-height);
  padding: 0;
  cursor: grab;
  touch-action: pan-y;
  transform: translate(-50%, -50%);
  box-shadow: none;
}

.preview-stage::before,
.preview-stage::after {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.preview-stage::before {
  content: "";
  width: 42px;
  height: 42px;
  margin: -36px 0 0 -21px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: #fff;
  border-radius: 50%;
  animation: preview-spinner 0.8s linear infinite;
}

.preview-stage::after {
  content: "Loading";
  margin: 22px 0 0 -34px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  letter-spacing: 0;
}

.fullscreen-preview.is-loading .preview-stage::before,
.fullscreen-preview.is-loading .preview-stage::after {
  opacity: 1;
}

.fullscreen-preview.is-error .preview-stage::after {
  content: "Image failed to load";
  margin-left: -62px;
  opacity: 1;
}

.preview-image {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  object-fit: contain;
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
  transform: translateX(var(--preview-drag-x, 0));
  transition: opacity 160ms ease, transform 180ms ease;
}

.preview-stage.is-swiping {
  cursor: grabbing;
}

.preview-stage.is-swiping .preview-image {
  transition-duration: 0ms;
}

.fullscreen-preview.is-loading .preview-image,
.fullscreen-preview.is-error .preview-image {
  opacity: 0;
}

.preview-close {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.preview-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
}

.preview-close {
  right: clamp(24px, 8.4vw, 108px);
  top: clamp(24px, 6.5vh, 56px);
  width: 40px;
  height: 40px;
  border-radius: 4px;
}

.preview-close::before,
.preview-close::after {
  content: none;
  display: none;
}

.preview-close img {
  display: block;
  object-fit: contain;
  pointer-events: none;
}

.preview-close img {
  width: 20px;
  height: 20px;
}

.preview-arrow {
  position: absolute;
  top: calc(50% + var(--preview-offset-y));
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 96px;
  margin-top: -48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.preview-arrow img {
  display: block;
  width: 24px;
  height: 24px;
}

.preview-arrow:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  color: #fff;
}

.preview-prev {
  left: max(32px, calc((100vw - var(--preview-frame-width)) / 2 - 72px));
}

.preview-next {
  right: max(32px, calc((100vw - var(--preview-frame-width)) / 2 - 72px));
}

.preview-thumbs {
  position: absolute;
  left: 50%;
  top: calc(50% + var(--preview-frame-half-height) + var(--preview-offset-y) + 18px);
  z-index: 2;
  display: flex;
  gap: 12px;
  max-width: min(1120px, calc(100vw - 96px));
  padding: 4px 2px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  transform: translateX(-50%);
  scroll-snap-type: x proximity;
}

.preview-thumbs button {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  opacity: 0.58;
  overflow: hidden;
  scroll-snap-align: center;
  transition: opacity 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.preview-thumbs button.active,
.preview-thumbs button:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.82);
  transform: rotate(15deg);
}

.preview-thumbs button.active {
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
}

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

@media (max-width: 720px) {
  .preview-close img {
    width: 18px;
    height: 18px;
  }

  .preview-thumbs {
    top: calc(50% + var(--preview-frame-half-height) + var(--preview-offset-y) + 12px);
    bottom: auto;
    max-width: calc(100vw - 28px);
    gap: 10px;
  }
}

@media (max-width: 1180px) {
  .work-details {
    --detail-column-gap: clamp(24px, 5vw, 48px);
  }
}

@media (max-width: 720px) {
  .work-details {
    --detail-page-gutter: 24px;
    --detail-side-rail: 72px;
    --detail-column-gap: 20px;
  }
}

@media (max-height: 760px) {
  .snap-shell,
  .page {
    min-height: 720px;
  }

  .fullscreen-preview {
    --preview-frame-width: min(1416px, calc(100vw - clamp(144px, 22vw, 424px)));
    --preview-frame-height: calc(100vh - 148px);
    --preview-frame-half-height: calc(50vh - 74px);
    --preview-offset-y: -12px;
  }

  .preview-thumbs {
    top: calc(50% + var(--preview-frame-half-height) + var(--preview-offset-y) + 12px);
    bottom: auto;
  }
}
