:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --ink: #f7f7f1;
  --ink-soft: rgba(247, 247, 241, 0.78);
  --muted: rgba(247, 247, 241, 0.58);
  --line: rgba(247, 247, 241, 0.14);
  --line-strong: rgba(247, 247, 241, 0.28);
  --acid: #7dd3fc;
  --button-bg: #f7f7f1;
  --button-text: #050505;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
  --max: 1700px;
  --page: clamp(24px, 4vw, 74px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mx: 0;
  --my: 0;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f2;
  --panel: rgba(0, 0, 0, 0.055);
  --panel-strong: rgba(0, 0, 0, 0.09);
  --ink: #10100d;
  --ink-soft: rgba(16, 16, 13, 0.78);
  --muted: rgba(16, 16, 13, 0.58);
  --line: rgba(16, 16, 13, 0.13);
  --line-strong: rgba(16, 16, 13, 0.24);
  --button-bg: #10100d;
  --button-text: #f7f7f1;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at calc(78% + var(--mx) * 9vw) calc(8% + var(--my) * 8vh),
      rgba(125, 211, 252, 0.12),
      transparent 28vw
    ),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button {
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--acid);
  color: #071006;
}

@property --electric-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

@keyframes gradient-text-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 100% 50%;
  }
}

@keyframes electric-border-flow {
  to {
    --electric-angle: 360deg;
  }
}

.site-header {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  width: min(var(--max), calc(100vw - var(--page) * 2));
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(5, 5, 5, 0.62));
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.32), inset 0 1px rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(1.2);
  transform: translateX(-50%);
}

:root[data-theme="light"] .site-header {
  background: rgba(247, 247, 241, 0.76);
}

.brand,
.theme-toggle {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 820;
}

.brand {
  min-width: 138px;
  padding: 0 22px;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.desktop-nav a {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 clamp(14px, 2vw, 24px);
  overflow: hidden;
  border-radius: 999px;
  color: var(--muted);
  transition:
    color 220ms var(--ease),
    background 220ms var(--ease);
}

.desktop-nav a::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -32px;
  z-index: -1;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--ink);
  transform: translateX(-50%) scale(0);
  transform-origin: 50% 80%;
  transition: transform 420ms var(--ease);
}

.desktop-nav a:hover {
  color: var(--bg);
}

.desktop-nav a:hover::before {
  transform: translateX(-50%) scale(1.15);
}

.theme-toggle {
  gap: 8px;
  min-width: 94px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.theme-toggle__mark {
  width: 14px;
  height: 14px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--acid) 0 50%, transparent 50% 100%);
}

.theme-toggle__text {
  font-size: 0.78rem;
  font-weight: 850;
}

.section {
  width: min(var(--max), calc(100vw - var(--page) * 2));
  margin: 0 auto;
  padding: clamp(88px, 9vw, 142px) 0;
  scroll-margin-top: 100px;
}

.section--wide {
  width: min(var(--max), calc(100vw - var(--page) * 2));
}

.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100svh;
  overflow: hidden;
  padding: 0;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.78) saturate(0.98) contrast(1.03);
  transform: translate(calc(var(--mx) * -12px), calc(var(--my) * -8px)) scale(1.045);
  transition: transform 120ms linear;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.9), rgba(5, 5, 5, 0.62) 42%, rgba(5, 5, 5, 0.16) 78%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.1), rgba(5, 5, 5, 0.04) 56%, rgba(5, 5, 5, 0.9));
}

.ferrofluid-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  max-width: none;
  opacity: 0.62;
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 92px 92px;
  mask-image: linear-gradient(90deg, #000, transparent 72%);
  opacity: 0.22;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100vw - var(--page) * 2));
  margin: 0 auto;
  padding-top: clamp(168px, 19vh, 238px);
}

.hero-role,
.eyebrow {
  width: fit-content;
  margin: 0 0 24px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-role {
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 247, 241, 0.84);
  letter-spacing: 0;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

.hero h1 {
  margin: 0;
  line-height: 0.86;
}

.hero h1 span {
  display: block;
  color: #ffffff;
  font-size: clamp(84px, 10.4vw, 188px);
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.18), 0 20px 70px rgba(0, 0, 0, 0.7);
}

.hero h1 small {
  display: block;
  max-width: 940px;
  margin-top: 20px;
  color: rgba(247, 247, 241, 0.88);
  font-size: clamp(34px, 4.3vw, 76px);
  font-weight: 780;
  line-height: 0.96;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(52px, 5.5vw, 108px);
  line-height: 0.88;
  font-weight: 900;
  color: var(--ink);
}

h3 {
  margin-bottom: 18px;
  font-size: clamp(24px, 2.1vw, 40px);
  line-height: 1.05;
}

h4 {
  margin-bottom: 8px;
  font-size: 1.08rem;
  line-height: 1.3;
}

.gradient-text {
  background-image: linear-gradient(90deg, #f7f7f1, #7dd3fc, #40ffaa, #4079ff, #f7f7f1);
  background-size: 320% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: gradient-text-flow 7s ease-in-out infinite alternate;
}

.gradient-text--hero {
  filter: drop-shadow(0 0 18px rgba(125, 211, 252, 0.18));
}

.gradient-text--sub {
  background-image: linear-gradient(90deg, rgba(247, 247, 241, 0.92), #7dd3fc, #40ffaa, rgba(247, 247, 241, 0.92));
}

.gradient-text--profile {
  background-image: linear-gradient(90deg, var(--ink), #7dd3fc, #40ffaa, var(--ink));
}

@supports not (-webkit-background-clip: text) {
  .gradient-text {
    color: var(--ink);
    -webkit-text-fill-color: currentColor;
  }
}

.hero__lead {
  max-width: 720px;
  margin: 34px 0 0;
  color: rgba(247, 247, 241, 0.78);
  font-size: clamp(17px, 1.35vw, 22px);
  line-height: 1.75;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 34px;
  color: rgba(247, 247, 241, 0.72);
}

.hero__meta :is(span, a) {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  overflow-wrap: anywhere;
  backdrop-filter: blur(18px);
}

.hero__meta a:hover {
  border-color: rgba(125, 211, 252, 0.65);
  background: rgba(125, 211, 252, 0.12);
}

.hero__meta b {
  color: var(--acid);
  font-size: 1.18rem;
  white-space: nowrap;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 850;
  backdrop-filter: blur(16px);
}

.button--primary {
  border-color: var(--button-bg);
  background: var(--button-bg);
  color: var(--button-text);
}

.case-orbit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 350px;
  pointer-events: none;
}

.case-title {
  position: absolute;
  left: 50%;
  bottom: 162px;
  z-index: 2;
  width: min(520px, calc(100vw - var(--page) * 2));
  text-align: center;
  transform: translateX(-50%);
}

.case-title span {
  display: block;
  color: var(--ink);
  font-size: clamp(28px, 2.6vw, 48px);
  font-weight: 900;
  line-height: 1;
}

.case-title p {
  margin: 8px 0 0;
  color: rgba(247, 247, 241, 0.48);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.case-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  pointer-events: auto;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  perspective: 880px;
  perspective-origin: 50% 70%;
}

.case-track::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 1;
  height: 160px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(5, 5, 5, 0.72));
}

.case-row {
  display: grid;
  grid-template-columns: repeat(var(--orbit-count, 14), minmax(86px, 1fr));
  gap: clamp(8px, 0.72vw, 14px);
  width: max(100vw, calc(var(--orbit-count, 14) * 112px));
  padding: 0 clamp(24px, 2.6vw, 52px) 22px;
  transform-style: preserve-3d;
}

.orbit-card {
  position: relative;
  z-index: 2;
  height: clamp(146px, 11.8vw, 210px);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(14px);
  transform:
    translateY(calc(clamp(146px, 11.8vw, 210px) - 46px + var(--orbit-depth) * 5px))
    rotateY(calc(var(--orbit-offset) * -5deg))
    rotateZ(calc(var(--orbit-offset) * 0.48deg))
    scale(calc(1 - var(--orbit-depth) * 0.012));
  transform-origin: center bottom;
  transition:
    transform 520ms var(--ease),
    border-color 360ms var(--ease),
    box-shadow 360ms var(--ease);
}

.orbit-card:hover {
  z-index: 5;
  transform: translateY(8px) rotateY(0deg) rotateZ(0deg) scale(1.04);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 60px rgba(255, 255, 255, 0.16);
}

.orbit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.38;
  transition:
    opacity 420ms var(--ease),
    transform 620ms var(--ease);
}

.orbit-card:hover img {
  opacity: 1;
  transform: scale(1.04);
}

.orbit-card span {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 1;
  color: rgba(247, 247, 241, 0.9);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.22;
}

.intro-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
}

.intro-band__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: min(var(--max), calc(100vw - var(--page) * 2));
  margin: 0 auto;
  background: var(--line);
}

.intro-band article {
  min-height: 238px;
  padding: 36px;
  background:
    radial-gradient(circle at 76% 14%, rgba(125, 211, 252, 0.08), transparent 42%),
    rgba(255, 255, 255, 0.055);
}

.intro-band span {
  display: block;
  margin-bottom: 48px;
  color: var(--acid);
  font-size: 0.82rem;
  font-weight: 900;
}

.intro-band h2 {
  margin-bottom: 12px;
  font-size: clamp(24px, 2vw, 36px);
  line-height: 1.05;
}

.intro-band p,
.section-heading p,
.timeline p,
.contact p,
.work-card__body p,
.profile-hero p {
  color: var(--ink-soft);
}

.section-heading {
  max-width: 960px;
  margin-bottom: 56px;
}

.section-heading p:last-child {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.work-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 536px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.055));
  box-shadow: var(--shadow);
  transition:
    transform 420ms var(--ease),
    border-color 360ms var(--ease),
    box-shadow 360ms var(--ease);
}

.work-card::before,
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 1px;
  border-radius: inherit;
  background:
    conic-gradient(
      from var(--electric-angle),
      transparent 0deg 42deg,
      rgba(125, 211, 252, 0.95) 58deg,
      rgba(64, 255, 170, 0.78) 82deg,
      transparent 116deg 214deg,
      rgba(255, 255, 255, 0.62) 242deg,
      transparent 286deg 360deg
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: electric-border-flow 5.2s linear infinite;
}

.work-card::after,
.portrait::after {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 0%, rgba(125, 211, 252, 0.28), transparent 32%),
    radial-gradient(circle at 92% 92%, rgba(64, 255, 170, 0.18), transparent 36%);
  opacity: 0.46;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 360ms var(--ease);
}

.work-card:hover {
  transform: translateY(-8px);
  border-color: rgba(125, 211, 252, 0.45);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.5), 0 0 70px rgba(125, 211, 252, 0.08);
}

.work-card:hover::after {
  opacity: 0.72;
}

.work-card__media {
  position: relative;
  z-index: 1;
  margin: 0;
  background: rgba(255, 255, 255, 0.05);
}

.work-card__media button {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.work-card__media img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.work-card__body {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.work-card__kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  color: var(--accent, var(--acid));
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.work-card__body h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 1.45vw, 30px);
}

.work-card__body p {
  margin-bottom: 0;
}

.work-card__title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 16px;
  margin-bottom: 12px;
}

.work-card__title-row h3 {
  margin-bottom: 0;
}

.detail-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(125, 211, 252, 0.46);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.detail-button:hover {
  border-color: var(--acid);
  background: var(--acid);
  color: #071006;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(300px, 0.42fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 70px);
  align-items: stretch;
  margin-bottom: 64px;
}

.portrait {
  position: relative;
  isolation: isolate;
  min-height: 460px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(125, 211, 252, 0.18), rgba(5, 5, 5, 0.08) 42%, rgba(64, 255, 170, 0.12)),
    rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: translate3d(calc(var(--mx) * -10px), calc(var(--my) * -6px), 0);
  transition:
    transform 260ms linear,
    box-shadow 360ms var(--ease);
}

.profile-card {
  min-height: clamp(500px, 52vw, 680px);
  max-width: 520px;
}

.profile-card__glow {
  position: absolute;
  inset: -22%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(125, 211, 252, 0.3), transparent 30%),
    radial-gradient(circle at 50% 82%, rgba(64, 255, 170, 0.2), transparent 36%);
  filter: blur(34px);
  opacity: 0.72;
  pointer-events: none;
}

.profile-card:hover {
  box-shadow:
    0 34px 110px rgba(0, 0, 0, 0.52),
    0 0 86px rgba(125, 211, 252, 0.14);
}

.portrait img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  filter: saturate(0.95) contrast(1.04);
}

.profile-card__panel {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  display: grid;
  gap: 2px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(5, 5, 5, 0.58);
  color: #f7f7f1;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(20px) saturate(1.2);
}

.profile-card__name {
  font-size: clamp(22px, 2.1vw, 34px);
  font-weight: 900;
  line-height: 1.05;
}

.profile-card__role {
  color: rgba(247, 247, 241, 0.72);
  font-weight: 760;
}

.profile-card__tags {
  margin-top: 10px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-hero h3 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(42px, 5vw, 92px);
  line-height: 0.96;
}

.profile-hero p:last-child {
  max-width: 860px;
  margin-bottom: 0;
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.75;
}

.profile-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 920px;
  margin: 30px 0 0;
}

.profile-signals div {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 8%, rgba(125, 211, 252, 0.14), transparent 36%),
    rgba(255, 255, 255, 0.055);
}

.profile-signals dt {
  margin-bottom: 14px;
  color: var(--acid);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-signals dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.resume-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.timeline {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.timeline article {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.timeline article:last-child {
  border-bottom: 0;
}

.timeline time {
  display: block;
  margin-bottom: 8px;
  color: var(--acid);
  font-size: 0.82rem;
  font-weight: 900;
}

.timeline p {
  margin-bottom: 0;
}

.skill-panel {
  margin-top: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li,
.filter-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-button {
  min-width: 72px;
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--acid);
  background: var(--acid);
  color: #071006;
  font-weight: 900;
}

.asset-grid {
  column-count: 4;
  column-gap: 18px;
}

.asset-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 18px;
  break-inside: avoid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition:
    transform 360ms var(--ease),
    border-color 360ms var(--ease);
}

.asset-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.45);
}

.asset-card[hidden] {
  display: none;
}

.asset-card button {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

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

.asset-card figcaption {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.asset-card figcaption span:last-child {
  white-space: nowrap;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 64px;
  border-top: 1px solid var(--line-strong);
}

.contact p {
  max-width: 760px;
  margin-bottom: 0;
  font-size: 1.08rem;
}

.contact-list {
  display: grid;
  gap: 12px;
  align-self: end;
  font-style: normal;
  color: var(--ink-soft);
}

.contact-list a {
  min-height: 42px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.contact-list a:hover {
  color: var(--acid);
}

.lightbox {
  width: min(1180px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #101010;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog {
  width: min(1320px, calc(100vw - 36px));
  max-height: calc(100dvh - 36px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #101010;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.dialog-close {
  position: sticky;
  top: 0;
  z-index: 2;
  width: 100%;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 16, 0.94);
  color: var(--ink);
}

.project-dialog__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: 0;
}

.project-dialog__media {
  margin: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.project-dialog__image {
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 88px);
  object-fit: contain;
}

.project-dialog__content {
  padding: clamp(24px, 3vw, 44px);
  overflow: auto;
}

.project-dialog__kicker {
  margin-bottom: 18px;
  color: var(--acid);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-dialog__title {
  margin-bottom: 18px;
  font-size: clamp(34px, 3vw, 58px);
  line-height: 0.98;
}

.project-dialog__summary {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.project-dialog__details {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.project-dialog__details li {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink-soft);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox__close {
  position: sticky;
  top: 0;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 16, 16, 0.94);
  color: var(--ink);
}

.lightbox__image {
  width: auto;
  max-width: 100%;
  max-height: calc(100dvh - 150px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox__caption {
  margin: 0;
  padding: 14px 18px 18px;
  color: var(--ink-soft);
  text-align: center;
}

[data-reveal] {
  opacity: 0;
  transform: translateY(46px) scale(0.985);
  filter: blur(14px);
  transition:
    opacity 900ms var(--ease),
    transform 900ms var(--ease),
    filter 900ms var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (max-width: 1280px) {
  .case-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .asset-grid {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .site-header {
    top: 14px;
    grid-template-columns: 1fr auto;
    width: calc(100vw - 28px);
  }

  .desktop-nav {
    display: none;
  }

  .brand {
    justify-content: flex-start;
    min-width: 0;
    background: transparent;
    color: var(--ink);
  }

  .theme-toggle {
    justify-self: end;
    min-width: 44px;
    width: 44px;
    padding: 0;
    background: rgba(255, 255, 255, 0.07);
  }

  .theme-toggle__text {
    display: none;
  }

  .hero__content {
    padding-top: 126px;
  }

  .hero h1 span {
    font-size: clamp(66px, 18vw, 96px);
  }

  .hero h1 small {
    max-width: min(100%, 340px);
    font-size: clamp(30px, 8vw, 48px);
    white-space: normal;
  }

  .case-orbit {
    position: relative;
    height: auto;
    margin-top: 72px;
    padding-bottom: 24px;
  }

  .case-title {
    position: static;
    width: min(100% - 28px, 520px);
    margin: 0 auto 18px;
    transform: none;
  }

  .case-track {
    position: static;
    overflow-x: auto;
    mask-image: none;
    scrollbar-width: none;
  }

  .case-track::before {
    display: none;
  }

  .case-track::-webkit-scrollbar {
    display: none;
  }

  .case-row {
    display: flex;
    width: max-content;
    min-width: 100%;
    padding: 0 14px 10px;
  }

  .orbit-card {
    width: 132px;
    height: 168px;
    transform: none;
  }

  .orbit-card:hover {
    transform: translateY(-4px);
  }

  .intro-band__inner,
  .profile-hero,
  .resume-layout,
  .contact {
    grid-template-columns: 1fr;
  }

  .portrait {
    max-width: 420px;
  }

  .case-grid {
    grid-template-columns: 1fr;
  }

  .asset-grid {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  :root {
    --page: 14px;
  }

  .section,
  .section--wide,
  .intro-band__inner {
    width: calc(100vw - 28px);
  }

  .section {
    padding: 82px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-bg {
    object-position: 62% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(5, 5, 5, 0.72), rgba(5, 5, 5, 0.62) 34%, rgba(5, 5, 5, 0.88)),
      linear-gradient(90deg, rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 0.22));
  }

  .hero__content {
    padding-top: 118px;
  }

  .hero-role {
    max-width: 100%;
    font-size: 0.72rem;
  }

  .hero__lead {
    overflow-wrap: anywhere;
  }

  .hero__meta {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 330px;
  }

  .hero__meta :is(span, a) {
    justify-content: center;
    min-height: 40px;
  }

  .hero__meta b {
    font-size: 1rem;
  }

  .intro-band article,
  .work-card__body,
  .timeline,
  .skill-panel {
    padding: 22px;
  }

  .work-card__title-row {
    grid-template-columns: 1fr;
  }

  .detail-button {
    width: fit-content;
  }

  .project-dialog__inner {
    grid-template-columns: 1fr;
  }

  .project-dialog__media {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-dialog__image {
    max-height: 42dvh;
  }

  .profile-hero h3 {
    font-size: clamp(34px, 11vw, 48px);
  }

  .asset-grid {
    column-count: 1;
  }

  .contact {
    gap: 32px;
  }
}

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

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
