:root {
  --white: #f8fbff;
  --paper: #ffffff;
  --ink: #08090d;
  --muted: #5d6470;
  --line: rgba(8, 9, 13, 0.13);
  --cyan: #9ff4ff;
  --mint: #bfffe7;
  --lavender: #d8c8ff;
  --peach: #ffd6c2;
  --lime: #ddff8f;
  --shadow: 0 24px 70px rgba(9, 15, 25, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(8, 9, 13, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 9, 13, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 12% 18%, rgba(159, 244, 255, 0.42), transparent 25rem),
    radial-gradient(circle at 84% 4%, rgba(255, 214, 194, 0.4), transparent 20rem),
    linear-gradient(180deg, #ffffff 0%, #f4f8fb 42%, #eef3f6 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.cursor-glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  width: 18rem;
  height: 18rem;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(159, 244, 255, 0.24), rgba(216, 200, 255, 0.12) 38%, transparent 68%);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -50%, 0);
  transition: opacity 220ms ease;
  mix-blend-mode: multiply;
}

body.has-pointer .cursor-glow {
  opacity: 1;
}

body.viewer-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  filter: blur(2px);
  pointer-events: none;
}

.ambient-one {
  inset: 18vh auto auto -4rem;
  width: 16rem;
  height: 28rem;
  background: linear-gradient(135deg, rgba(216, 200, 255, 0.42), rgba(159, 244, 255, 0.08));
  transform: rotate(19deg);
  animation: ambientDrift 10s ease-in-out infinite alternate;
}

.ambient-two {
  right: -8rem;
  bottom: 12vh;
  width: 26rem;
  height: 18rem;
  background: linear-gradient(135deg, rgba(191, 255, 231, 0.35), rgba(255, 214, 194, 0.16));
  transform: rotate(-18deg);
  animation: ambientDrift 13s ease-in-out infinite alternate-reverse;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 30px rgba(10, 18, 30, 0.08);
  backdrop-filter: blur(18px) saturate(1.45);
}

.brand,
.site-nav,
.hero-actions,
.contact-links {
  display: flex;
  align-items: center;
}

.brand {
  font-size: 0.92rem;
  font-weight: 800;
}

.site-nav {
  gap: 3px;
}

.site-nav a,
.button,
.contact-links a,
.close-viewer {
  min-height: 40px;
  border-radius: 7px;
}

.site-nav a {
  padding: 10px 12px;
  color: #22252c;
  font-size: 0.86rem;
  font-weight: 700;
}

.site-nav a:hover {
  background: rgba(8, 9, 13, 0.06);
}

.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: 55vh;
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 0;
  padding: clamp(24px, 5vw, 62px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: #f6fbff;
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.58) 44%, rgba(255, 255, 255, 0.08) 100%),
    linear-gradient(180deg, transparent 66%, rgba(248, 251, 255, 0.88) 100%);
  pointer-events: none;
}

.hero-media,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media img {
  object-fit: cover;
  object-position: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  padding-bottom: min(9vh, 88px);
}

.hero-content > * {
  animation: riseIn 700ms ease both;
}

.hero-content > *:nth-child(2) { animation-delay: 80ms; }
.hero-content > *:nth-child(3) { animation-delay: 160ms; }
.hero-content > *:nth-child(4) { animation-delay: 240ms; }
.hero-content > *:nth-child(5) { animation-delay: 320ms; }

.eyebrow {
  margin: 0 0 12px;
  color: #2a333d;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(4.6rem, 14vw, 11rem);
  line-height: 0.82;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 4.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 570px;
  margin: 24px 0 0;
  color: #252b32;
  font-size: clamp(1rem, 2vw, 1.28rem);
  line-height: 1.5;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  max-width: 780px;
  margin-top: 28px;
}

.hero-stats span {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 86px;
  padding: 13px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.34)),
    radial-gradient(circle at 18% 0%, rgba(159, 244, 255, 0.42), transparent 9rem),
    radial-gradient(circle at 92% 18%, rgba(216, 200, 255, 0.32), transparent 8rem);
  box-shadow:
    0 18px 42px rgba(71, 111, 140, 0.16),
    0 0 24px rgba(159, 244, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  color: #303740;
  font-size: 0.9rem;
  line-height: 1.35;
  backdrop-filter: blur(18px) saturate(1.35);
  transform: translateY(0);
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
  animation: badgeHover 5.6s ease-in-out infinite;
}

.hero-stats span:nth-child(2) {
  animation-delay: 700ms;
}

.hero-stats span:nth-child(3) {
  animation-delay: 1400ms;
}

.hero-stats span::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background:
    linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.72) 38%, transparent 62%);
  opacity: 0.42;
  transform: translateX(-120%);
  animation: badgeSheen 7s ease-in-out infinite;
  pointer-events: none;
}

.hero-stats span::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  box-shadow:
    inset 0 0 0 1px rgba(159, 244, 255, 0.18),
    inset 0 -18px 38px rgba(255, 255, 255, 0.18);
  pointer-events: none;
}

.hero-stats span:hover {
  transform: translateY(-5px);
  border-color: rgba(159, 244, 255, 0.88);
  box-shadow:
    0 22px 52px rgba(71, 111, 140, 0.22),
    0 0 34px rgba(159, 244, 255, 0.28),
    0 0 58px rgba(216, 200, 255, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.hero-stats strong {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: clamp(0.9rem, 1.35vw, 1.04rem);
  font-weight: 950;
  line-height: 1.05;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
}

.hero-stats span > * {
  position: relative;
  z-index: 1;
}

.button,
.contact-links a,
.close-viewer {
  border: 1px solid rgba(8, 9, 13, 0.14);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
}

.primary {
  background: #08090d;
  color: #fff;
}

.button {
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(8, 9, 13, 0.12);
}

.ghost {
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px);
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(58px, 9vw, 118px) 0 0;
}

.skill-band {
  width: 100%;
  margin: 22px 0 0;
  border-block: 1px solid rgba(8, 9, 13, 0.1);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(16px);
}

.skill-band-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 12px 0;
}

.skill-band-inner span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(8, 9, 13, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 22px rgba(9, 17, 29, 0.07);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.skill-band-inner span:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 9, 13, 0.22);
  box-shadow: 0 12px 26px rgba(9, 17, 29, 0.1);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: end;
}

.intro > p {
  margin: 0;
  color: #303740;
  font-size: 1.04rem;
  line-height: 1.75;
}

.credential-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
  max-width: 780px;
}

.credential-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(8, 9, 13, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
    radial-gradient(circle at 10% 10%, rgba(191, 255, 231, 0.28), transparent 7rem);
  box-shadow: 0 10px 24px rgba(9, 17, 29, 0.08);
  color: #20252c;
  font-size: 0.82rem;
  font-weight: 850;
}

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

.work-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  width: min(560px, 100%);
  padding: 5px;
  border: 1px solid rgba(8, 9, 13, 0.13);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 14px 35px rgba(9, 17, 29, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(16px) saturate(1.3);
}

.work-tab {
  min-height: 40px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #252b34;
  cursor: pointer;
  font-size: clamp(0.72rem, 1.2vw, 0.86rem);
  font-weight: 850;
  line-height: 1.05;
  text-align: center;
}

.work-tab:hover {
  background: rgba(8, 9, 13, 0.06);
}

.work-tab.active {
  border-color: rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(8, 9, 13, 0.98), rgba(36, 43, 54, 0.98)),
    #08090d;
  color: white;
  box-shadow: 0 10px 24px rgba(8, 9, 13, 0.18);
}

.portfolio-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.work-card {
  min-height: 260px;
}

.featured-card {
  position: relative;
}

.span-wide {
  grid-column: span 2;
}

.span-tall {
  grid-row: span 2;
  min-height: 532px;
}

.card-button {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  min-height: inherit;
  overflow: hidden;
  border: 1px solid rgba(8, 9, 13, 0.11);
  border-radius: 8px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  box-shadow: 0 16px 45px rgba(9, 17, 29, 0.1);
  transform: perspective(900px) rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg)) translateY(var(--lift, 0));
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.card-button:hover {
  --lift: -4px;
  border-color: rgba(8, 9, 13, 0.2);
  box-shadow: 0 24px 64px rgba(9, 17, 29, 0.16);
}

.featured-card .card-button {
  border-color: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 18px 48px rgba(9, 17, 29, 0.14),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

.featured-card .card-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 28%, transparent 68%, rgba(255, 255, 255, 0.22)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.82;
  pointer-events: none;
}

.featured-card .card-button::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  z-index: 2;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--lavender), var(--peach));
  box-shadow: 0 0 28px rgba(159, 244, 255, 0.46);
  pointer-events: none;
}

.feature-tonker .card-button {
  box-shadow:
    0 20px 60px rgba(72, 108, 180, 0.25),
    0 0 0 1px rgba(159, 244, 255, 0.44) inset;
}

.feature-winner .card-button {
  box-shadow:
    0 20px 60px rgba(255, 111, 72, 0.23),
    0 0 0 1px rgba(255, 214, 194, 0.6) inset;
}

.feature-winner .card-button::after {
  background: linear-gradient(90deg, #ff774d, var(--peach), var(--lime));
  box-shadow: 0 0 28px rgba(255, 119, 77, 0.5);
}

.card-button:hover .visual {
  transform: scale(1.035);
}

.visual {
  position: absolute;
  inset: 0;
  transition: transform 500ms ease;
}

.media-visual img,
.media-visual video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.visual::before,
.visual::after {
  content: "";
  position: absolute;
}

.visual-a {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.95), transparent 10rem),
    linear-gradient(135deg, rgba(8, 9, 13, 0.9), rgba(216, 200, 255, 0.54) 48%, rgba(159, 244, 255, 0.82));
}

.visual-a::before {
  inset: 14%;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.78), transparent 66%);
}

.visual-b {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(159, 244, 255, 0.38)),
    repeating-linear-gradient(90deg, rgba(8, 9, 13, 0.1) 0 1px, transparent 1px 40px);
}

.visual-b::before {
  inset: 16% 18%;
  border: 1px solid rgba(8, 9, 13, 0.18);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(191, 255, 231, 0.35));
  transform: skew(-8deg);
}

.visual-c {
  background:
    radial-gradient(circle at 75% 22%, var(--peach), transparent 12rem),
    linear-gradient(160deg, #fefefe, rgba(221, 255, 143, 0.5) 38%, rgba(216, 200, 255, 0.65));
}

.visual-c::before {
  width: 70%;
  height: 68%;
  left: 15%;
  top: 16%;
  border: 1px solid rgba(8, 9, 13, 0.16);
  background:
    linear-gradient(90deg, rgba(8, 9, 13, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(8, 9, 13, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
}

.visual-d {
  background:
    linear-gradient(120deg, rgba(8, 9, 13, 0.92), rgba(8, 9, 13, 0.38)),
    url("./assets/hero-atmosphere.png") center / cover;
}

.visual-e {
  background:
    radial-gradient(circle at 54% 44%, rgba(255, 255, 255, 0.92), transparent 9rem),
    linear-gradient(145deg, rgba(191, 255, 231, 0.86), rgba(255, 255, 255, 0.9) 52%, rgba(8, 9, 13, 0.86));
}

.visual-e::before {
  inset: 22% 18%;
  border-radius: 50%;
  border: 1px solid rgba(8, 9, 13, 0.16);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.05));
  box-shadow: inset 0 0 36px rgba(255, 255, 255, 0.64);
}

.visual-f {
  background:
    conic-gradient(from 180deg at 50% 50%, #ffffff, var(--cyan), var(--lavender), #08090d, var(--peach), #ffffff);
}

.visual-f::before {
  inset: 19%;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(6px);
}

.play-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 52px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.56);
  color: #07090d;
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.card-button:hover .play-dot {
  background: rgba(255, 255, 255, 0.86);
}

.work-meta {
  position: absolute;
  z-index: 3;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 5px;
  padding: 48px 18px 18px;
  background: linear-gradient(180deg, transparent, rgba(8, 9, 13, 0.7));
  color: white;
  text-align: left;
}

.work-meta span {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.work-meta strong {
  font-size: clamp(1rem, 2vw, 1.32rem);
  line-height: 1.12;
}

.feature-chip,
.feature-note {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.work-meta .feature-chip {
  margin-bottom: 4px;
  padding: 7px 9px;
  font-size: clamp(0.68rem, 1.2vw, 0.76rem);
  line-height: 1;
}

.work-meta .feature-note {
  margin-top: 3px;
  padding: 6px 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(0.72rem, 1.4vw, 0.86rem);
  font-weight: 800;
  line-height: 1.15;
  text-transform: none;
}

.work-card.hidden {
  display: none;
}

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

.system-panel {
  position: relative;
  min-height: 250px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid rgba(8, 9, 13, 0.12);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.5)),
    radial-gradient(circle at 82% 18%, rgba(159, 244, 255, 0.36), transparent 11rem);
  box-shadow: 0 18px 48px rgba(9, 17, 29, 0.09);
}

.system-panel::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px auto;
  width: 74px;
  height: 74px;
  border: 1px solid rgba(8, 9, 13, 0.12);
  border-radius: 50%;
  background:
    conic-gradient(from 90deg, var(--cyan), var(--lavender), var(--peach), var(--mint), var(--cyan));
  opacity: 0.78;
  animation: spinSlow 9s linear infinite;
}

.panel-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 32px;
  margin-bottom: 36px;
  border: 1px solid rgba(8, 9, 13, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  font-weight: 900;
}

.system-panel h3 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 0.98;
}

.system-panel p {
  position: relative;
  z-index: 1;
  max-width: 30ch;
  margin: 18px 0 0;
  color: #303740;
  line-height: 1.55;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 650ms ease, transform 650ms ease;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: clamp(26px, 6vw, 70px);
  align-items: start;
  padding-bottom: 70px;
}

.contact-links {
  align-items: stretch;
  flex-direction: column;
  gap: 9px;
}

.contact-links a {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 14px 15px;
  border-color: rgba(8, 9, 13, 0.12);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(9, 17, 29, 0.08);
  font-size: clamp(0.82rem, 2vw, 0.98rem);
  overflow-wrap: anywhere;
}

.viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(3, 5, 8, 0.45);
  backdrop-filter: blur(8px);
}

.viewer-backdrop[hidden],
.viewer[hidden] {
  display: none;
}

.viewer {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 41;
  transform: translate(-50%, -50%);
  width: min(960px, calc(100% - 32px));
  max-height: 92vh;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(1.25);
}

.close-viewer {
  position: relative;
  z-index: 2;
  display: block;
  margin-left: auto;
  padding: 0 14px;
  background: #08090d;
  color: white;
}

.viewer-toolbar {
  position: relative;
  z-index: 2;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.viewer-art-wrap {
  position: relative;
  margin-top: 14px;
}

.viewer-prev,
.viewer-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: opacity 0.15s, background 0.15s;
}

.viewer-prev { left: 12px; }
.viewer-next { right: 12px; }

.viewer-prev::before,
.viewer-next::before {
  content: "";
  display: block;
  width: 9px;
  height: 9px;
  border-top: 2px solid #08090d;
  border-right: 2px solid #08090d;
}

.viewer-prev::before { transform: rotate(-135deg) translate(-1px, 1px); }
.viewer-next::before { transform: rotate(45deg) translate(-1px, 1px); }

.viewer-prev:hover,
.viewer-next:hover {
  background: rgba(255, 255, 255, 1);
}

.viewer-prev:disabled,
.viewer-next:disabled {
  opacity: 0.2;
  cursor: default;
}

.viewer-art {
  height: min(62vh, 580px);
  margin-top: 0;
  overflow: hidden;
  border-radius: 8px;
  background: url("./assets/hero-atmosphere.png") center / cover;
}

.viewer-art img,
.viewer-art video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #08090d;
}

.viewer-type {
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.viewer-title {
  margin: 0;
  font-size: clamp(1.8rem, 6vw, 3.4rem);
  line-height: 0.96;
}

.viewer-copy {
  margin: 12px 0 4px;
  color: #2f3740;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .hero {
    min-height: 760px;
  }

  .hero::after {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.32) 52%, rgba(248, 251, 255, 0.9) 100%);
  }

  .hero-content {
    padding-bottom: 150px;
  }

  .hero-stats,
  .systems-section {
    grid-template-columns: 1fr;
  }

  .intro,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .span-wide,
  .span-tall {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 320px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .work-tabs {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .site-header {
    align-items: stretch;
    flex-direction: column;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .site-nav a {
    text-align: center;
  }

  .hero {
    min-height: 720px;
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 18px;
  }

  h1 {
    font-size: clamp(4.1rem, 21vw, 6.5rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .hero-content {
    padding-bottom: 96px;
  }

  .hero-stats {
    gap: 7px;
  }

  .hero-stats span {
    min-height: auto;
    padding: 11px;
  }

  .section {
    width: calc(100% - 20px);
  }

  .work-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .work-card,
  .span-wide,
  .span-tall {
    min-height: 330px;
  }

  .viewer {
    width: calc(100% - 20px);
    padding: 10px;
  }

  .viewer-art {
    height: 56vh;
  }
}

@media (pointer: coarse), (prefers-reduced-motion: reduce) {
  .cursor-glow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes badgeHover {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -7px;
  }
}

@keyframes badgeSheen {
  0%,
  42% {
    transform: translateX(-120%);
  }
  64%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes ambientDrift {
  from {
    translate: 0 0;
  }
  to {
    translate: 24px -18px;
  }
}

@keyframes spinSlow {
  to {
    transform: rotate(1turn);
  }
}
