:root {
  color-scheme: light dark;

  --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-fallback: Inter, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;

  --fs-12: 12px;
  --fs-14: 14px;
  --fs-17: 17px;
  --fs-21: 21px;
  --fs-28: 28px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-48: 48px;
  --fs-56: 56px;
  --fs-80: 80px;
  --fs-96: 96px;

  --space-4: 4px;
  --space-8: 8px;
  --space-16: 16px;
  --space-24: 24px;
  --space-32: 32px;
  --space-48: 48px;
  --space-64: 64px;
  --space-80: 80px;
  --space-120: 120px;
  --space-160: 160px;

  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 18px;

  --page: #ffffff;
  --page-alt: #f5f5f7;
  --surface: #ffffff;
  --surface-soft: rgba(255, 255, 255, 0.72);
  --text: #1d1d1f;
  --text-soft: #424245;
  --muted: #6e6e73;
  --quiet: #86868b;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.16);
  --accent: #0066cc;
  --accent-on-dark: #2997ff;
  --danger: #bf4800;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 20px 60px rgba(0, 0, 0, 0.08);

  --container: 1180px;
  --copy: 700px;
  --nav-height: 64px;
  --scroll-progress: 0;

  /* Legacy aliases kept so older admin/front-end rules still resolve through the token system. */
  --bg: var(--page);
  --bg-soft: var(--page-alt);
  --cyan: var(--accent);
  --gold: var(--accent);
  --violet: var(--accent);
}

:root.theme-dark,
body.theme-dark {
  --page: #000000;
  --page-alt: #1d1d1f;
  --surface: #1d1d1f;
  --surface-soft: rgba(29, 29, 31, 0.72);
  --text: #f5f5f7;
  --text-soft: #e8e8ed;
  --muted: #a1a1a6;
  --quiet: #86868b;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.22);
  --accent: #2997ff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text);
  font-family: var(--font-system);
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  pointer-events: none;
  display: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  display: none;
  opacity: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.26) 0 1px, transparent 1px 4px);
  mix-blend-mode: screen;
}

.ambient-flow-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  width: 100vw;
  height: 100vh;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

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

button,
input,
textarea {
  font: inherit;
  letter-spacing: 0;
}

a {
  color: inherit;
}

::selection {
  background: rgba(155, 220, 221, 0.32);
  color: var(--text);
}

.site-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-height);
  padding: 16px 52px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(5, 6, 9, 0.88), rgba(5, 6, 9, 0.54));
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

.site-topbar::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  content: "";
  transform: scaleX(var(--scroll-progress));
  transform-origin: left;
  background: linear-gradient(90deg, transparent, rgba(155, 220, 221, 0.72), rgba(201, 165, 106, 0.5), transparent);
}

.site-topbar.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(5, 6, 9, 0.74);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.22);
}

.site-topbar.is-nav-hidden {
  transform: translateY(calc(-1 * var(--nav-height)));
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 15px;
  font-weight: 800;
}

.brand-mark strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.top-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 54px;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.top-nav a span {
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
}

.top-nav a:hover,
.top-nav a:focus-visible,
.top-nav a.is-active {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  outline: 0;
}

.top-nav .admin-link {
  margin-left: 8px;
  border: 1px solid rgba(155, 220, 221, 0.28);
  color: var(--text-soft);
}

.side-rail {
  position: fixed;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 750;
}

.side-rail::after {
  display: block;
  width: 1px;
  height: 92px;
  content: "";
  background: linear-gradient(180deg, rgba(155, 220, 221, 0.42), transparent);
}

.side-rail a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.side-rail a:hover,
.side-rail a:focus-visible {
  color: var(--cyan);
  outline: 0;
}

.side-rail-left {
  left: 38px;
  flex-direction: column;
}

.side-rail-left a {
  writing-mode: vertical-rl;
  transform: translateY(0);
}

.side-rail-left a:hover,
.side-rail-left a:focus-visible {
  transform: translateY(-3px);
}

.side-rail-right {
  right: 38px;
  flex-direction: column;
}

.side-rail-right a {
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 440px);
  grid-template-rows: 1fr auto;
  gap: 32px 56px;
  min-height: 100svh;
  padding: 140px 120px 54px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.hero-backdrop,
.hero-tone {
  position: absolute;
  inset: 0;
}

.dot-field-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.dot-field-canvas,
.dot-field-glow {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-backdrop {
  overflow: hidden;
  background: #030406;
}

.hero-slide {
  position: absolute;
  inset: -1.5%;
  z-index: 0;
  opacity: 0;
  background-position: center;
  background-size: cover;
  transform: scale(1.045) translate3d(0, 0, 0);
  transition:
    opacity 1600ms ease,
    transform 7600ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  transform: var(--hero-drift, scale(1.012) translate3d(0, 0, 0));
}

.hero-slide img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

.hero-backdrop img,
.hero-backdrop video,
.hero-backdrop .media-fallback {
  width: 100%;
  height: 100%;
  min-height: calc(100svh + 3%);
  object-fit: cover;
}

.hero-backdrop img,
.hero-backdrop video {
  filter: saturate(0.82) contrast(1.04) brightness(0.62);
  transform: scale(1.01);
}

.hero-tone {
  z-index: 2;
  background:
    radial-gradient(circle at 66% 42%, rgba(141, 123, 255, 0.08), transparent 34%),
    radial-gradient(circle at 30% 62%, rgba(155, 220, 221, 0.07), transparent 26rem),
    linear-gradient(90deg, rgba(5, 6, 9, 0.94), rgba(5, 6, 9, 0.62) 42%, rgba(5, 6, 9, 0.28)),
    linear-gradient(180deg, rgba(5, 6, 9, 0.48), rgba(5, 6, 9, 0.14) 40%, rgba(5, 6, 9, 0.88));
}

.hero-copy,
.hero-statement,
.hero-index {
  position: relative;
  z-index: 3;
}

.hero-copy {
  align-self: end;
  max-width: 860px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 12ch;
  margin-bottom: 20px;
  font-size: clamp(52px, 8vw, 96px);
  font-weight: 760;
  line-height: 0.96;
}

h2 {
  margin-bottom: 0;
  font-size: 46px;
  font-weight: 720;
  line-height: 1.05;
}

h3 {
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.16;
}

.role-line {
  margin-bottom: 0;
  color: var(--text-soft);
  font-size: 20px;
  font-weight: 700;
}

.hero-statement {
  align-self: end;
  max-width: 440px;
}

.intro-line {
  margin-bottom: 24px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.78;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: rgba(155, 220, 221, 0.62);
  background: rgba(155, 220, 221, 0.12);
  outline: 0;
}

.button.primary {
  border-color: rgba(155, 220, 221, 0.54);
  background: rgba(155, 220, 221, 0.11);
  color: var(--text);
}

.button.quiet {
  background: transparent;
  color: var(--text-soft);
}

.button.danger {
  border-color: rgba(220, 122, 107, 0.56);
  color: #ef9a8d;
}

.button.full {
  width: 100%;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-index {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.7fr 1.2fr 1fr;
  gap: 16px;
  width: 100%;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
}

.hero-index span,
.hero-index em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-index strong {
  font-size: 14px;
}

.work-band,
.about-band,
.cv-band,
.contact-band {
  position: relative;
  z-index: 2;
  padding: 112px 120px;
}

.numbered-section {
  max-width: 1260px;
  margin: 0 auto;
}

.numbered-section::before {
  display: block;
  margin-bottom: 18px;
  color: rgba(155, 220, 221, 0.72);
  content: attr(data-section);
  font-size: 13px;
  font-weight: 900;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.section-heading h2 {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
}

.section-heading h2::after {
  display: block;
  width: min(34vw, 320px);
  height: 1px;
  content: "";
  background: linear-gradient(90deg, rgba(155, 220, 221, 0.36), transparent);
}

.reveal-item {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.filter-button:hover,
.filter-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--text);
  outline: 0;
}

.filter-button.is-active {
  border-color: rgba(242, 240, 234, 0.52);
  background: rgba(242, 240, 234, 0.09);
  color: var(--text);
}

.project-grid {
  display: grid;
  gap: 118px;
  max-width: 1120px;
  margin: 58px auto 0;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 380px;
  padding: 0;
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease;
}

.project-card:last-child {
  border-bottom: 0;
}

.project-card:hover .project-thumb,
.project-card:focus-visible .project-thumb {
  border-color: rgba(155, 220, 221, 0.48);
  opacity: 0.96;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
}

.project-card:focus-visible {
  outline: 0;
}

.project-number,
.project-open {
  position: absolute;
  z-index: 4;
  color: var(--quiet);
  font-size: 12px;
  font-weight: 800;
}

.project-number {
  top: -32px;
  left: 0;
}

.project-open {
  right: 0;
  bottom: -28px;
  color: var(--gold);
  text-transform: uppercase;
}

.project-thumb {
  position: relative;
  grid-column: 6 / -1;
  grid-row: 1 / -1;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #020304;
  opacity: 0.82;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.project-thumb::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(120deg, rgba(155, 220, 221, 0.14), transparent 36%),
    linear-gradient(0deg, rgba(5, 6, 9, 0.22), transparent);
  mix-blend-mode: screen;
  pointer-events: none;
}

.project-thumb img,
.project-thumb video,
.dialog-media img,
.dialog-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(242, 240, 234, 0.14);
  border-radius: 999px;
  background: rgba(5, 6, 9, 0.68);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.project-card-body {
  position: relative;
  z-index: 3;
  grid-column: 1 / 7;
  grid-row: 1 / -1;
  max-width: none;
}

.project-card p,
.dialog-content p,
#profileBio {
  color: var(--muted);
  line-height: 1.72;
}

.project-card p {
  margin-bottom: 0;
  font-size: 15px;
}

.project-overline {
  margin-bottom: 10px !important;
  color: var(--cyan) !important;
  font-size: 12px !important;
  font-weight: 850;
  text-transform: uppercase;
}

.project-meta {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.project-description {
  padding: 22px;
  border: 1px solid rgba(242, 240, 234, 0.11);
  border-radius: 8px;
  background: rgba(10, 13, 18, 0.82);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.24);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.project-card:nth-child(odd) .project-card-body {
  grid-column: 7 / -1;
  text-align: right;
}

.project-card:nth-child(odd) .project-thumb {
  grid-column: 1 / 8;
}

.project-card:nth-child(odd) .project-meta,
.project-card:nth-child(odd) .tag-row {
  justify-content: flex-end;
}

.project-card:nth-child(odd) .project-number {
  right: 0;
  left: auto;
}

.project-card:nth-child(odd) .project-open {
  right: auto;
  left: 0;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-row span {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

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

.cv-band {
  border-bottom: 1px solid var(--line);
}

.about-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: start;
}

.portrait {
  display: grid;
  overflow: hidden;
  width: 220px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(140deg, rgba(155, 220, 221, 0.36), rgba(201, 165, 106, 0.22)),
    #0a0d12;
  color: var(--text);
  font-size: 74px;
  font-weight: 860;
}

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

.about-copy {
  max-width: 780px;
}

.profile-facts {
  display: grid;
  gap: 12px;
  margin: 0;
}

.profile-facts div {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.profile-facts div:last-child {
  border-bottom: 1px solid var(--line);
}

.profile-facts dt {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 800;
}

.profile-facts dd {
  margin: 8px 0 0;
  color: var(--text-soft);
  font-weight: 800;
}

.cv-display {
  min-height: 220px;
}

.cv-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cv-empty p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.72;
}

.cv-card {
  display: grid;
  grid-template-columns: minmax(260px, 0.36fr) minmax(0, 0.64fr);
  min-height: 560px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.026);
}

.cv-meta {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: clamp(24px, 4vw, 44px);
  border-right: 1px solid var(--line);
}

.cv-meta span {
  color: var(--cyan);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.cv-meta strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 26px;
  line-height: 1.18;
}

.cv-meta p {
  color: var(--muted);
  line-height: 1.72;
}

.cv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.cv-preview {
  min-height: 560px;
  background:
    linear-gradient(140deg, rgba(155, 220, 221, 0.05), transparent 42%),
    #080b10;
}

.cv-preview iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
  border: 0;
  background: #1b2028;
}

.cv-document-placeholder {
  display: grid;
  height: 100%;
  min-height: 560px;
  place-items: center;
  padding: 32px;
  text-align: center;
}

.cv-document-placeholder span {
  display: grid;
  width: 96px;
  height: 118px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--cyan);
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.cv-document-placeholder p {
  max-width: 360px;
  margin: 18px auto 0;
  color: var(--muted);
  line-height: 1.72;
}

.contact-band {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  overflow: hidden;
  isolation: isolate;
}

.contact-ether {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.contact-ether canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.contact-band h2 {
  max-width: 760px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  max-width: 520px;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.contact-icon {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  flex: 0 0 20px;
}

.contact-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: rgba(201, 165, 106, 0.52);
  color: var(--gold);
  outline: 0;
}

.project-dialog {
  width: min(1060px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0a0d12;
  color: var(--text);
  box-shadow: var(--shadow);
}

.project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgba(5, 6, 9, 0.72);
  color: var(--text);
  cursor: pointer;
}

.dialog-media {
  aspect-ratio: 16 / 9;
  background: #020304;
}

.dialog-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px 30px 0;
}

.dialog-thumb {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  text-align: left;
  cursor: pointer;
  opacity: 0.72;
  transition: border-color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.dialog-thumb:hover,
.dialog-thumb:focus-visible,
.dialog-thumb.is-active {
  border-color: rgba(155, 220, 221, 0.58);
  opacity: 1;
  outline: 0;
}

.dialog-thumb:hover,
.dialog-thumb:focus-visible {
  transform: translateY(-2px);
}

.dialog-gallery img,
.dialog-gallery video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #020304;
}

.dialog-thumb-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 12px;
  min-width: 0;
}

.dialog-thumb-meta span {
  color: var(--cyan);
  font-weight: 900;
}

.dialog-content {
  padding: 30px;
}

.summary {
  color: var(--text-soft) !important;
  font-size: 18px;
  font-weight: 700;
}

.media-fallback {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 240px;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(155, 220, 221, 0.16), transparent 42%),
    linear-gradient(32deg, transparent 44%, rgba(201, 165, 106, 0.16)),
    #040608;
  color: rgba(242, 240, 234, 0.86);
  font-size: 72px;
  font-weight: 900;
}

.media-fallback::before {
  position: absolute;
  inset: 12%;
  content: "";
  border: 1px solid rgba(242, 240, 234, 0.14);
  transform: rotate(-6deg);
}

.media-fallback span {
  position: relative;
  z-index: 1;
}

.error-page {
  padding: 12vh 8vw;
}

.admin-body {
  color-scheme: light;
  background: var(--page);
}

.admin-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 36px 0 56px;
}

.login-panel {
  display: grid;
  gap: 26px;
  width: min(460px, 100%);
  margin: 12vh auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  box-shadow: var(--shadow);
}

.admin-workspace {
  display: grid;
  gap: 20px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.tab-button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.tab-button.is-active {
  background: rgba(242, 240, 234, 0.12);
  color: var(--text);
}

.tab-panel,
.project-editor,
.project-list-panel,
.resume-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tab-panel {
  padding: 22px;
}

.stack-form {
  display: grid;
  gap: 16px;
}

.stack-form label {
  display: grid;
  gap: 8px;
}

.stack-form label > span,
.check-row span {
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 800;
}

.stack-form label > .field-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  flex: 0 0 18px;
  color: rgba(155, 220, 221, 0.9);
}

.field-icon svg {
  display: block;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

input,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
}

input:focus,
textarea:focus {
  border-color: rgba(155, 220, 221, 0.54);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(155, 220, 221, 0.08);
}

input::placeholder,
textarea::placeholder {
  color: var(--quiet);
}

textarea {
  resize: vertical;
}

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

.wide {
  grid-column: 1 / -1;
}

.bilingual-fields-heading {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.bilingual-fields-heading strong {
  color: var(--text);
  font-size: 15px;
}

.bilingual-fields-heading small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.upload-preview,
.resume-current {
  display: grid;
  min-height: 92px;
  align-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
}

.resume-admin-summary {
  display: grid;
  min-width: 0;
  gap: 10px;
}

.resume-admin-summary > strong {
  overflow-wrap: anywhere;
}

.resume-admin-summary > span {
  color: var(--muted);
  font-size: 13px;
}

.resume-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.resume-text-preview {
  max-height: 240px;
  margin: 4px 0 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(5, 6, 9, 0.2);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  max-height: 220px;
  border-radius: 6px;
  object-fit: cover;
}

.media-gallery-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.media-gallery-admin-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.media-gallery-admin-item {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.media-gallery-admin-copy {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.media-gallery-admin-copy label {
  display: grid;
  gap: 6px;
}

.media-gallery-admin-copy label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.media-gallery-admin-copy input,
.media-gallery-admin-copy textarea {
  width: 100%;
  min-width: 0;
  background: var(--surface);
  color: var(--text);
}

.media-resource-editor {
  display: grid;
  gap: 12px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.media-resource-heading {
  display: grid;
  gap: 3px;
}

.media-resource-heading strong {
  color: var(--text);
  font-size: 14px;
}

.media-resource-heading small,
.media-download-admin-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.media-resource-heading.tutorial-heading {
  margin-top: 8px;
}

.media-resource-upload input[type="file"] {
  padding: 8px;
  background: var(--surface);
}

.media-download-admin-list {
  display: grid;
  gap: 8px;
}

.media-download-admin-item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.media-download-admin-item > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.media-download-admin-item a {
  overflow: hidden;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-resource-empty {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
}

.media-drag-handle {
  position: absolute;
  z-index: 3;
  top: 16px;
  right: 16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  background: rgba(5, 6, 9, 0.68);
  color: rgba(255, 255, 255, 0.72);
  cursor: grab;
  touch-action: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.media-drag-handle:hover,
.media-drag-handle:focus-visible {
  border-color: rgba(155, 220, 221, 0.56);
  background: rgba(5, 6, 9, 0.84);
  color: #fff;
  outline: none;
}

.media-drag-handle:disabled {
  display: none;
}

.media-gallery-admin-item.is-dragging {
  z-index: 2;
  border-color: rgba(0, 102, 204, 0.42);
  background: var(--page-alt);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  opacity: 0.76;
  transform: scale(0.985);
}

.media-gallery-admin-item img,
.media-gallery-admin-item video {
  width: 100%;
  max-height: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.media-gallery-admin-empty {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  place-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
}

.media-gallery-admin-empty small {
  color: var(--quiet);
  font-size: 12px;
}

.media-gallery-admin-item figcaption {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.media-gallery-admin-item figcaption span {
  overflow: hidden;
  color: var(--text-soft);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-gallery-admin-item figcaption small {
  color: var(--quiet);
  font-size: 12px;
  font-weight: 700;
}

.media-gallery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.media-replace-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

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

.media-replace-button:focus-within {
  outline: 2px solid var(--cyan);
  outline-offset: 4px;
  border-radius: 2px;
}

.danger-link {
  color: var(--danger);
}

.project-admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
}

.project-list-panel {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.project-list {
  display: grid;
  gap: 8px;
}

.project-sort-hint {
  margin: -2px 2px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.project-list-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  transition: border-color 160ms ease, background-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.project-list-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px 0 0 8px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.project-list-item small {
  color: var(--muted);
}

.project-list-row.is-active {
  border-color: rgba(155, 220, 221, 0.42);
  background: rgba(155, 220, 221, 0.08);
}

.project-drag-handle {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 38px;
  padding: 0;
  border: 0;
  border-left: 1px solid transparent;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--muted);
  cursor: grab;
  touch-action: none;
}

.project-drag-handle:hover,
.project-drag-handle:focus-visible {
  border-left-color: var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
}

.project-drag-handle:active {
  cursor: grabbing;
}

.project-drag-handle:disabled {
  opacity: 0.3;
  cursor: default;
}

.project-drag-dots {
  width: 14px;
  height: 20px;
  background-image: radial-gradient(circle, currentColor 1.25px, transparent 1.5px);
  background-position: 0 0;
  background-size: 7px 7px;
}

.project-list-row.is-dragging {
  z-index: 2;
  border-color: rgba(155, 220, 221, 0.7);
  background: rgba(155, 220, 221, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  opacity: 0.78;
  transform: scale(0.99);
}

.project-list.is-sorting .project-list-row:not(.is-dragging) {
  transition-duration: 220ms;
}

.project-sort-active,
.project-sort-active * {
  cursor: grabbing !important;
  user-select: none !important;
}

.project-editor {
  padding: 18px;
}

.form-row,
.media-previews {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.link-button {
  width: fit-content;
  border: 0;
  background: transparent;
  color: var(--gold);
  font-weight: 800;
  cursor: pointer;
}

.status-line {
  min-height: 24px;
  color: var(--muted);
  font-weight: 700;
}

.status-line.success {
  color: var(--cyan);
}

.status-line.error {
  color: var(--danger);
}

.resume-current a {
  color: var(--cyan);
  font-weight: 800;
}

.is-hidden {
  display: none !important;
}

.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .hero-slide,
  .reveal-item {
    transition-duration: 1ms !important;
    transform: none !important;
  }
}

@media (max-width: 1040px) {
  .site-topbar {
    padding-right: 24px;
    padding-left: 24px;
  }

  .side-rail {
    display: none;
  }

  .hero-shell {
    grid-template-columns: 1fr;
    padding-right: 42px;
    padding-left: 42px;
  }

  h1 {
    font-size: 68px;
  }

  h2 {
    font-size: 38px;
  }

  .hero-statement {
    max-width: 680px;
  }

  .project-card {
    min-height: 340px;
  }

  .project-open {
    bottom: -24px;
  }

  .about-layout {
    grid-template-columns: 220px 1fr;
  }

  .profile-facts {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-band,
  .section-heading,
  .admin-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar,
  .contact-links,
  .admin-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-topbar {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 18px;
  }

  .site-topbar.is-nav-hidden {
    transform: none;
  }

  .top-nav {
    width: 100%;
    overflow-x: auto;
  }

  .top-nav a {
    flex: 0 0 auto;
  }

  .hero-shell {
    min-height: calc(100svh - 104px);
    padding: 72px 20px 28px;
  }

  h1 {
    font-size: 48px;
  }

  h2 {
    font-size: 32px;
  }

  h3 {
    font-size: 24px;
  }

  .role-line,
  .intro-line {
    font-size: 17px;
  }

  .hero-index {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .work-band,
  .about-band,
  .cv-band,
  .contact-band {
    padding: 64px 20px;
  }

  .cv-empty {
    align-items: flex-start;
    flex-direction: column;
  }

  .cv-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

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

  .cv-preview,
  .cv-preview iframe,
  .cv-document-placeholder {
    min-height: 420px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 16px;
    min-height: 0;
    padding: 0 0 22px;
    border-bottom: 1px solid var(--line);
    transform: none !important;
  }

  .project-number,
  .project-open {
    position: static;
  }

  .project-thumb {
    grid-column: 1;
    grid-row: auto;
    order: -1;
    opacity: 0.94;
  }

  .project-card-body,
  .project-card:nth-child(odd) .project-card-body {
    grid-column: 1;
    grid-row: auto;
    text-align: left;
  }

  .project-card:nth-child(odd) .project-thumb {
    grid-column: 1;
  }

  .project-card:nth-child(odd) .project-meta,
  .project-card:nth-child(odd) .tag-row {
    justify-content: flex-start;
  }

  .project-description {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .project-open {
    color: var(--gold);
  }

  .about-layout,
  .admin-grid,
  .form-row,
  .media-previews,
  .profile-facts,
  .project-admin-layout {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: 100%;
  }

  .admin-shell {
    width: min(100% - 24px, 1180px);
  }
}

/* Apple-inspired portfolio layer
   Tokens above are the source of truth for typography, color, spacing, radius, and motion. */
body:not(.admin-body) {
  background: var(--page);
  color: var(--text);
}

body:not(.admin-body) main {
  overflow: hidden;
}

body:not(.admin-body) .ambient-flow-canvas,
body:not(.admin-body) .side-rail,
body:not(.admin-body) .numbered-section::before,
body:not(.admin-body) .project-number,
body:not(.admin-body) .project-overline {
  display: none !important;
}

body:not(.admin-body) .site-topbar {
  position: sticky;
  min-height: var(--nav-height);
  padding: 0 max(var(--space-24), calc((100vw - var(--container)) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--page);
  background: color-mix(in srgb, var(--page) 78%, transparent);
  box-shadow: none;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

body:not(.admin-body) .site-topbar::after {
  background: var(--accent);
  opacity: 0.28;
}

body:not(.admin-body) .site-topbar.is-scrolled {
  background: var(--page);
  background: color-mix(in srgb, var(--page) 82%, transparent);
  box-shadow: none;
}

body:not(.admin-body) .site-topbar.is-nav-hidden {
  transform: none;
}

body:not(.admin-body) .brand-mark {
  gap: var(--space-8);
}

body:not(.admin-body) .brand-mark span {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--text);
  color: var(--page);
  font-size: var(--fs-12);
  font-weight: 600;
}

body:not(.admin-body) .brand-mark strong,
body:not(.admin-body) .top-nav a {
  color: var(--text);
  font-size: var(--fs-12);
  font-weight: 500;
}

body:not(.admin-body) .top-nav {
  gap: var(--space-24);
}

body:not(.admin-body) .top-nav a {
  min-width: 0;
  padding: var(--space-8) 0;
  border-radius: 0;
  background: transparent;
  opacity: 0.78;
}

body:not(.admin-body) .top-nav a span {
  display: none;
}

body:not(.admin-body) .top-nav a:hover,
body:not(.admin-body) .top-nav a:focus-visible,
body:not(.admin-body) .top-nav a.is-active {
  background: transparent;
  color: var(--accent);
  opacity: 1;
}

body:not(.admin-body) .top-nav .admin-link {
  margin-left: 0;
  padding: var(--space-8) var(--space-16);
  border: 1px solid var(--line);
  border-radius: 999px;
}

body:not(.admin-body) .hero-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(var(--space-80), 1fr) auto auto minmax(148px, 0.82fr);
  row-gap: var(--space-24);
  min-height: calc(100svh - var(--nav-height));
  padding: var(--space-64) var(--space-24) 0;
  place-items: center;
  overflow: hidden;
  border-bottom: 0;
  background: #000;
  text-align: center;
}

body:not(.admin-body) .hero-backdrop,
body:not(.admin-body) .hero-tone {
  border-radius: 0;
}

body:not(.admin-body) .hero-backdrop {
  inset: 0;
  background: #000;
  contain: paint;
}

body:not(.admin-body) .hero-slide {
  inset: 0;
  transition:
    opacity 1600ms cubic-bezier(0.25, 0.1, 0.25, 1),
    transform 7600ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

body:not(.admin-body) .hero-slide img {
  min-height: 0;
  filter: none;
  transform: translate3d(0, 0, 0);
}

body:not(.admin-body) .hero-tone {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.32) 45%, rgba(0, 0, 0, 0.64)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0.42));
}

body:not(.admin-body) .hero-dot-field {
  position: absolute;
  inset: -2%;
  z-index: 3;
  opacity: 0.48;
  mix-blend-mode: screen;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  -webkit-mask-image:
    radial-gradient(circle at 42% 48%, #000 0%, #000 58%, rgba(0, 0, 0, 0.74) 74%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image:
    radial-gradient(circle at 42% 48%, #000 0%, #000 58%, rgba(0, 0, 0, 0.74) 74%, transparent 100%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

body:not(.admin-body) .hero-dot-field .dot-field-glow {
  display: none;
}

body:not(.admin-body) .hero-copy,
body:not(.admin-body) .hero-statement {
  z-index: 4;
  max-width: var(--copy);
  align-self: auto;
  justify-self: start;
  width: min(720px, calc(100vw - var(--space-48)));
  margin-left: clamp(var(--space-24), 8vw, var(--space-120));
  text-align: left;
}

body:not(.admin-body) .hero-copy {
  grid-row: 2;
  margin-top: 0;
}

body:not(.admin-body) .hero-statement {
  grid-row: 3;
}

body:not(.admin-body) .eyebrow {
  margin-bottom: var(--space-16);
  color: var(--accent-on-dark);
  font-size: var(--fs-14);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body:not(.admin-body) h1,
body:not(.admin-body) h2,
body:not(.admin-body) h3 {
  color: inherit;
  letter-spacing: -0.025em;
}

body:not(.admin-body) h1 {
  max-width: 12ch;
  margin: 0 auto var(--space-16) 0;
  color: #f5f5f7;
  font-size: clamp(var(--fs-56), 7vw, var(--fs-96));
  font-weight: 700;
  line-height: 1.05;
}

body:not(.admin-body) #profileName {
  display: inline-grid;
  justify-items: start;
  max-width: 14ch;
  cursor: default;
}

body:not(.admin-body) .hero-title-main {
  display: block;
}

body:not(.admin-body) .hero-title-note {
  display: inline-flex;
  align-items: center;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: #1d1d1f;
  font-size: var(--fs-21);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  opacity: 0;
  transform: translate3d(0, -10px, 0) scale(0.98);
  transition:
    max-height 560ms cubic-bezier(0.25, 0.1, 0.25, 1),
    margin-top 560ms cubic-bezier(0.25, 0.1, 0.25, 1),
    opacity 360ms ease,
    transform 560ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

body:not(.admin-body) .hero-title-note.is-active {
  max-height: 68px;
  margin-top: var(--space-16);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

body:not(.admin-body) .hero-title-note-invert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.16em 0.5em 0.22em;
  border-radius: 10px;
  background: #f5f5f7;
  color: #1d1d1f;
  overflow: hidden;
  white-space: nowrap;
  box-shadow:
    0 10px 34px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.84);
}

body:not(.admin-body) .hero-title-note-word {
  padding-bottom: 0.08em;
}

body:not(.admin-body) .hero-title-note-letter {
  will-change: transform, opacity;
}

body:not(.admin-body) #profileName:focus,
body:not(.admin-body) #profileName:focus-visible {
  outline: 0;
}

body:not(.admin-body) .split-char {
  display: inline-block;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  animation: splitTextIn 760ms cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
  animation-delay: calc(var(--char-index, 0) * 24ms);
  will-change: opacity, transform;
}

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

@media (prefers-reduced-motion: reduce) {
  body:not(.admin-body) .split-char {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  body:not(.admin-body) .hero-title-note {
    transition: none;
  }

}

body:not(.admin-body) h2 {
  color: var(--text);
  font-size: clamp(var(--fs-32), 4vw, var(--fs-48));
  font-weight: 700;
  line-height: 1.08;
}

body:not(.admin-body) h3 {
  font-size: var(--fs-28);
  font-weight: 600;
  line-height: 1.1;
}

body:not(.admin-body) .role-line,
body:not(.admin-body) .intro-line {
  color: rgba(245, 245, 247, 0.86);
  font-size: var(--fs-21);
  font-weight: 400;
  line-height: 1.48;
}

body:not(.admin-body) .intro-line {
  max-width: 680px;
  margin: var(--space-24) auto var(--space-24) 0;
}

body:not(.admin-body) .hero-actions {
  justify-content: flex-start;
  gap: var(--space-16);
}

body:not(.admin-body) .button {
  min-height: 44px;
  padding: 0 var(--space-24);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  font-size: var(--fs-17);
  font-weight: 400;
  transition: opacity 180ms ease, background 180ms ease, transform 180ms ease;
}

body:not(.admin-body) .button.primary {
  background: var(--accent);
  color: #fff;
}

body:not(.admin-body) .hero-shell .button {
  color: #fff;
}

body:not(.admin-body) .hero-shell .button.primary {
  background: rgba(245, 245, 247, 0.92);
  color: #1d1d1f;
}

body:not(.admin-body) .hero-shell .button.quiet {
  border-color: rgba(245, 245, 247, 0.34);
  color: #f5f5f7;
}

body:not(.admin-body) .button:hover,
body:not(.admin-body) .button:focus-visible {
  opacity: 0.82;
  transform: scale(1.02);
  outline: 0;
}

body:not(.admin-body) .hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 40px;
  height: 40px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  opacity: 0.46;
  transform: translateY(-50%);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

body:not(.admin-body) .hero-control::before {
  content: "";
  width: 11px;
  height: 11px;
  border-top: 1.75px solid rgba(245, 245, 247, 0.78);
  border-right: 1.75px solid rgba(245, 245, 247, 0.78);
  transition: border-color 180ms ease;
}

body:not(.admin-body) .hero-control-prev {
  left: var(--space-24);
}

body:not(.admin-body) .hero-control-prev::before {
  transform: translateX(1px) rotate(-135deg);
}

body:not(.admin-body) .hero-control-next {
  right: var(--space-24);
}

body:not(.admin-body) .hero-control-next::before {
  transform: translateX(-1px) rotate(45deg);
}

body:not(.admin-body) .hero-control:hover,
body:not(.admin-body) .hero-control:focus-visible {
  opacity: 0.88;
  outline: 0;
  transform: translateY(-50%) scale(1.06);
}

body:not(.admin-body) .hero-control:hover::before,
body:not(.admin-body) .hero-control:focus-visible::before {
  border-color: rgba(245, 245, 247, 0.96);
}

body:not(.admin-body) .hero-control[hidden],
body:not(.admin-body) .hero-control:disabled {
  display: none;
}

body:not(.admin-body) .hero-index {
  position: absolute;
  z-index: 4;
  right: auto;
  bottom: var(--space-32);
  left: clamp(var(--space-24), 8vw, var(--space-120));
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  width: min(720px, calc(100vw - var(--space-48)));
  padding: 0;
  border: 0;
  color: rgba(245, 245, 247, 0.72);
  text-align: left;
  pointer-events: none;
}

body:not(.admin-body) .hero-index span,
body:not(.admin-body) .hero-index em {
  color: rgba(245, 245, 247, 0.6);
  font-size: var(--fs-12);
  font-weight: 400;
  text-transform: none;
}

body:not(.admin-body) .hero-index strong {
  color: #f5f5f7;
  font-size: var(--fs-14);
  font-weight: 600;
}

body:not(.admin-body) .work-band,
body:not(.admin-body) .about-band,
body:not(.admin-body) .cv-band,
body:not(.admin-body) .contact-band {
  max-width: none;
  margin: 0;
  padding: var(--space-160) var(--space-24);
  background: var(--page);
}

body:not(.admin-body) .about-band,
body:not(.admin-body) .contact-band {
  background: var(--page-alt);
}

body:not(.admin-body) .section-heading {
  display: grid;
  max-width: var(--container);
  margin: 0 auto var(--space-80);
  justify-items: start;
  text-align: left;
}

body:not(.admin-body) .section-heading h2::after {
  display: none;
}

body:not(.admin-body) .section-heading .eyebrow {
  color: var(--muted);
}

body:not(.admin-body) .filter-bar {
  justify-content: flex-start;
  margin-top: var(--space-32);
}

body:not(.admin-body) .filter-button {
  min-height: 36px;
  padding: 0 var(--space-16);
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-14);
}

body:not(.admin-body) .filter-button:hover,
body:not(.admin-body) .filter-button:focus-visible,
body:not(.admin-body) .filter-button.is-active {
  background: rgba(242, 240, 234, 0.08);
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text);
}

body:not(.admin-body) .project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: var(--container);
  margin: 0 auto;
  gap: var(--space-32);
}

body:not(.admin-body) .project-card,
body:not(.admin-body) .project-card:nth-child(odd) {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--page-alt);
  cursor: pointer;
  overflow: hidden;
  box-shadow: none;
  text-align: left;
  transform: none;
}

body:not(.admin-body) .project-card:hover,
body:not(.admin-body) .project-card:focus-visible {
  transform: none;
  outline: 0;
}

body:not(.admin-body) .project-thumb,
body:not(.admin-body) .project-card:nth-child(odd) .project-thumb {
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 16 / 10;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--page);
  opacity: 1;
}

body:not(.admin-body) .project-thumb::after {
  display: none;
}

body:not(.admin-body) .project-thumb img,
body:not(.admin-body) .project-thumb video {
  filter: none;
  transition: transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1), opacity 220ms ease;
}

body:not(.admin-body) .project-card:hover .project-thumb img,
body:not(.admin-body) .project-card:hover .project-thumb video {
  transform: scale(1.02);
}

body:not(.admin-body) .project-card-body,
body:not(.admin-body) .project-card:nth-child(odd) .project-card-body {
  grid-column: 1;
  grid-row: 2;
  max-width: none;
  padding: var(--space-32);
  text-align: left;
}

body:not(.admin-body) .project-meta,
body:not(.admin-body) .project-card:nth-child(odd) .project-meta {
  justify-content: flex-start;
  margin-bottom: var(--space-16);
  color: var(--muted);
  font-size: var(--fs-12);
  font-weight: 500;
  text-transform: none;
}

body:not(.admin-body) .project-description {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body:not(.admin-body) .project-card p,
body:not(.admin-body) .dialog-content p,
body:not(.admin-body) #profileBio {
  color: var(--muted);
  font-size: var(--fs-17);
  font-weight: 400;
  line-height: 1.55;
}

body:not(.admin-body) .project-open {
  position: static;
  display: inline-flex;
  padding: 0 var(--space-32) var(--space-32);
  color: var(--accent);
  font-size: var(--fs-17);
  font-weight: 400;
  text-transform: none;
}

body:not(.admin-body) .tag-row {
  justify-content: flex-start;
  margin-top: var(--space-24);
  text-align: left;
}

body:not(.admin-body) .project-card .tag-row,
body:not(.admin-body) .project-card:nth-child(odd) .tag-row {
  justify-content: flex-start;
  text-align: left;
}

body:not(.admin-body) .tag-row span {
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: var(--fs-14);
  font-weight: 400;
}

body:not(.admin-body) .project-media-count {
  right: var(--space-16);
  bottom: var(--space-16);
  border: 0;
  background: rgba(245, 245, 247, 0.78);
  color: #1d1d1f;
  font-size: var(--fs-12);
  font-weight: 500;
}

body:not(.admin-body) .about-layout {
  grid-template-columns: minmax(260px, 360px) minmax(0, var(--copy));
  max-width: 980px;
  margin: 0 auto;
  gap: var(--space-64);
  align-items: center;
}

body:not(.admin-body) .portrait {
  width: 100%;
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

body:not(.admin-body) .about-copy .eyebrow {
  color: var(--muted);
}

body:not(.admin-body) .about-copy h2 {
  margin-bottom: var(--space-32);
}

body:not(.admin-body) .profile-facts {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-24);
}

body:not(.admin-body) .profile-facts div {
  padding: var(--space-24) 0 0;
  border-top: 1px solid var(--line);
}

body:not(.admin-body) .profile-facts div:last-child {
  border-bottom: 0;
}

body:not(.admin-body) .profile-facts dt,
body:not(.admin-body) .profile-facts dd {
  font-size: var(--fs-14);
}

body:not(.admin-body) .cv-display,
body:not(.admin-body) .cv-card,
body:not(.admin-body) .contact-links,
body:not(.admin-body) .contact-copy {
  max-width: var(--container);
  margin-right: auto;
  margin-left: auto;
}

body:not(.admin-body) .cv-empty,
body:not(.admin-body) .cv-card {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--page-alt);
  box-shadow: none;
}

body:not(.admin-body) .cv-empty {
  padding: var(--space-48);
}

body:not(.admin-body) .cv-card {
  overflow: hidden;
}

body:not(.admin-body) .contact-band {
  display: grid;
  min-height: min(720px, 82svh);
  align-content: center;
  justify-items: center;
  background: #f7f7f8;
  isolation: isolate;
  overflow: hidden;
  text-align: center;
}

body:not(.admin-body) .contact-band::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(247, 247, 248, 0.68), rgba(247, 247, 248, 0.38) 32%, rgba(247, 247, 248, 0.06) 64%, transparent 100%),
    linear-gradient(180deg, rgba(247, 247, 248, 0.64), rgba(247, 247, 248, 0.04) 30%, rgba(247, 247, 248, 0.04) 70%, rgba(247, 247, 248, 0.68));
  content: "";
  pointer-events: none;
}

body:not(.admin-body) .contact-ether {
  opacity: 0.94;
  filter: saturate(0.92) contrast(0.98);
}

body:not(.admin-body) .contact-copy h2 {
  max-width: 760px;
  margin-right: auto;
  margin-left: auto;
  text-wrap: balance;
}

body:not(.admin-body) .contact-links {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100vw - var(--space-48)));
  max-width: none;
  justify-content: center;
  align-items: center;
  gap: var(--space-32);
  margin-top: var(--space-48);
}

body:not(.admin-body) .contact-copy {
  position: relative;
  z-index: 2;
  width: min(960px, calc(100vw - var(--space-48)));
  text-align: center;
}

body:not(.admin-body) .contact-link {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: var(--fs-17);
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

body:not(.admin-body) .contact-icon {
  width: 22px;
  height: 22px;
  flex-basis: 22px;
}

body:not(.admin-body) .contact-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.85;
}

body:not(.admin-body) .reveal-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 700ms cubic-bezier(0.25, 0.1, 0.25, 1);
}

body:not(.admin-body) .reveal-item.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

body:not(.admin-body) .project-dialog {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}

body:not(.admin-body) .project-dialog::backdrop {
  background: rgba(0, 0, 0, 0.36);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

body:not(.admin-body) .dialog-media,
body:not(.admin-body) .dialog-thumb {
  background: var(--page-alt);
}

body:not(.admin-body) .dialog-thumb {
  border: 0;
  border-radius: var(--radius-sm);
}

body:not(.admin-body) .dialog-thumb.is-active {
  box-shadow: inset 0 0 0 2px var(--accent);
}

body:not(.admin-body) .dialog-content {
  padding: var(--space-48);
}

@media (max-width: 900px) {
  body:not(.admin-body) .site-topbar {
    padding-right: var(--space-16);
    padding-left: var(--space-16);
  }

  body:not(.admin-body) .top-nav {
    gap: var(--space-16);
  }

  body:not(.admin-body) .hero-shell {
    min-height: 88svh;
  }

  body:not(.admin-body) .hero-copy,
  body:not(.admin-body) .hero-statement {
    width: min(680px, calc(100vw - var(--space-48)));
    margin-left: 0;
  }

  body:not(.admin-body) .project-grid,
  body:not(.admin-body) .about-layout,
  body:not(.admin-body) .profile-facts {
    grid-template-columns: 1fr;
  }

  body:not(.admin-body) .profile-facts {
    grid-column: auto;
  }

  body:not(.admin-body) .work-band,
  body:not(.admin-body) .about-band,
  body:not(.admin-body) .cv-band,
  body:not(.admin-body) .contact-band {
    padding-top: var(--space-120);
    padding-bottom: var(--space-120);
  }
}

@media (max-height: 760px) {
  body:not(.admin-body) .hero-shell {
    grid-template-rows: minmax(var(--space-48), 1fr) auto auto minmax(var(--space-64), 0.45fr);
  }

  body:not(.admin-body) .hero-index {
    display: none;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) .site-topbar {
    align-items: center;
    flex-direction: row;
  }

  body:not(.admin-body) .top-nav {
    gap: var(--space-16);
    overflow-x: auto;
  }

  body:not(.admin-body) .brand-mark strong,
  body:not(.admin-body) .top-nav a:not(.admin-link) {
    display: none;
  }

  body:not(.admin-body) h1 {
    font-size: var(--fs-48);
  }

  body:not(.admin-body) #profileName {
    max-width: 10ch;
  }

  body:not(.admin-body) .role-line,
  body:not(.admin-body) .intro-line {
    font-size: var(--fs-17);
  }

  body:not(.admin-body) .hero-control {
    width: 36px;
    height: 36px;
  }

  body:not(.admin-body) .hero-control-prev {
    left: var(--space-16);
  }

  body:not(.admin-body) .hero-control-next {
    right: var(--space-16);
  }

  body:not(.admin-body) .hero-index {
    display: none;
  }

  body:not(.admin-body) .work-band,
  body:not(.admin-body) .about-band,
  body:not(.admin-body) .cv-band,
  body:not(.admin-body) .contact-band {
    padding: var(--space-80) var(--space-16);
  }

  body:not(.admin-body) .project-card-body {
    padding: var(--space-24);
  }

  body:not(.admin-body) .project-open {
    padding: 0 var(--space-24) var(--space-24);
  }
}

body:not(.admin-body) #work .section-heading {
  justify-items: start;
  text-align: left;
}

body:not(.admin-body) #work .filter-bar {
  justify-content: flex-start;
}

/* Responsive alignment guardrail for the public site.
   Keeps the main composition centered and rhythmically consistent across
   phone, tablet, laptop, desktop, and high-resolution preview sizes. */
body:not(.admin-body) {
  --site-gutter: clamp(var(--space-16), 5vw, var(--space-80));
  --section-block: clamp(var(--space-80), 9vw, var(--space-160));
  --content-wide: min(var(--container), calc(100vw - (var(--site-gutter) * 2)));
  --content-copy: min(var(--copy), calc(100vw - (var(--site-gutter) * 2)));
  overflow-x: hidden;
}

body:not(.admin-body) main {
  width: 100%;
  overflow-x: clip;
}

body:not(.admin-body) .site-topbar {
  padding-right: max(var(--site-gutter), calc((100vw - var(--container)) / 2));
  padding-left: max(var(--site-gutter), calc((100vw - var(--container)) / 2));
}

body:not(.admin-body) .work-band,
body:not(.admin-body) .about-band,
body:not(.admin-body) .cv-band,
body:not(.admin-body) .contact-band {
  width: 100%;
  padding: var(--section-block) var(--site-gutter);
}

body:not(.admin-body) .section-heading,
body:not(.admin-body) .project-grid,
body:not(.admin-body) .about-layout,
body:not(.admin-body) .cv-display,
body:not(.admin-body) .cv-card {
  width: var(--content-wide);
  max-width: var(--container);
  margin-right: auto;
  margin-left: auto;
}

body:not(.admin-body) .contact-band {
  min-height: clamp(560px, 76svh, 820px);
  padding-right: var(--site-gutter);
  padding-left: var(--site-gutter);
  place-content: center;
  place-items: center;
}

body:not(.admin-body) .contact-copy,
body:not(.admin-body) .contact-links {
  width: min(960px, calc(100vw - (var(--site-gutter) * 2)));
  max-width: 960px;
  margin-right: auto;
  margin-left: auto;
}

body:not(.admin-body) .contact-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

body:not(.admin-body) .contact-copy h2 {
  width: min(760px, 100%);
}

body:not(.admin-body) .contact-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(var(--space-16), 2.2vw, var(--space-32));
  text-align: center;
}

@media (min-width: 1600px) {
  body:not(.admin-body) {
    --site-gutter: clamp(var(--space-64), 7vw, var(--space-120));
  }

  body:not(.admin-body) .contact-band {
    min-height: clamp(640px, 72svh, 900px);
  }
}

@media (max-width: 900px) {
  body:not(.admin-body) {
    --site-gutter: var(--space-24);
    --section-block: var(--space-120);
  }

  body:not(.admin-body) .section-heading,
  body:not(.admin-body) .filter-bar {
    width: var(--content-wide);
    margin-right: auto;
    margin-left: auto;
  }

  body:not(.admin-body) .contact-links {
    gap: var(--space-24);
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) {
    --site-gutter: var(--space-16);
    --section-block: var(--space-80);
  }

  body:not(.admin-body) .contact-band {
    min-height: 620px;
  }

  body:not(.admin-body) .contact-copy,
  body:not(.admin-body) .contact-links {
    width: 100%;
  }

  body:not(.admin-body) .contact-links {
    flex-direction: column;
    gap: var(--space-16);
  }

  body:not(.admin-body) .contact-link {
    justify-content: center;
    max-width: 100%;
    font-size: var(--fs-14);
  }
}

/* Site footer: ICP / public security filing numbers (required for China filing). */
.site-footer {
  padding: 28px 24px 36px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  text-decoration: underline;
}
