:root {
  --bg: #121214;
  --dark: #0c0c0d;
  --text: #f2f1ed;
  --muted: #8c8a82;
  --border: #2a2a2d;
  --violet: #8b7ff0;
  --acid: #c8ff5c;

  --glass-border: rgba(242, 241, 237, 0.3);
  --glass-bg: rgba(18, 18, 20, 0.72);

  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --shadow-sm: 0 10px 24px -12px rgba(9, 7, 18, 0.6);
  --shadow-lg: 0 20px 36px -20px rgba(9, 7, 18, 0.45);
  --shadow-xl: 0 26px 46px -18px rgba(9, 7, 18, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

button {
  font-family: inherit;
}

button,
a,
[role='button'],
.menu-item,
.gallery-arrow,
.archive-title,
.archive-arrow {
  -webkit-user-select: none;
  user-select: none;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
  border-radius: 6px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

[data-magnetic] {
  will-change: transform;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  animation: loader-exit 0.9s cubic-bezier(0.76, 0, 0.24, 1) 2.25s forwards;
}

body.is-loading .app {
  pointer-events: none;
}

.loader-name {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transform: scale(0.92);
  animation: loader-name-in 1s var(--ease-out) 0.2s forwards;
}

.loader-dots {
  position: absolute;
  top: 62%;
  left: 50%;
  display: flex;
  gap: 12px;
  transform: translateX(-50%);
}

.loader-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: loader-dot-bounce 1s var(--ease-in-out) infinite;
}

.loader-dots span:nth-child(odd) { background: var(--violet); }
.loader-dots span:nth-child(even) { background: var(--acid); }
.loader-dots span:nth-child(1) { animation-delay: 0s; }
.loader-dots span:nth-child(2) { animation-delay: 0.12s; }
.loader-dots span:nth-child(3) { animation-delay: 0.24s; }
.loader-dots span:nth-child(4) { animation-delay: 0.36s; }

@keyframes loader-name-in {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes loader-dot-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.6;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

@keyframes loader-exit {
  to {
    opacity: 0;
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader {
    animation-duration: 0.3s;
    animation-delay: 0.2s;
  }

  .loader-name {
    animation-duration: 0.1s;
    animation-delay: 0s;
  }

  .loader-dots span {
    animation-duration: 0.1s;
  }
}

.app {
  position: relative;
  display: flex;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}

.menu {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  border-radius: 0 28px 28px 0;
  transition: width 0.5s var(--ease-out), border-radius 0.5s var(--ease-out);
}

.menu-indicator {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.menu-ticks {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  pointer-events: none;
}

.tick {
  width: 2px;
  height: 9px;
  border-radius: 2px;
  background: var(--border);
  transition: height 0.4s var(--ease-out), background 0.4s var(--ease-out);
}

.tick.is-current {
  height: 20px;
  background: var(--acid);
}

.menu-brand {
  position: absolute;
  top: 32px;
  left: 32px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.menu-brand span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--muted);
}

.menu-viewport {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  opacity: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  transition: opacity 0.5s var(--ease-out);
}

.menu-reel {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  will-change: transform;
  transition: transform 0.55s var(--ease-out);
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 60px;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 16px;
  text-align: center;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
  opacity: 0.32;
  transform: scale(0.82);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out), color 0.3s ease;
}

.menu-item:hover {
  color: var(--violet);
}

.menu-item:hover:not(.is-active) {
  transform: scale(0.92);
}

.menu-item.is-active {
  color: var(--text);
  opacity: 1;
  transform: scale(1.18);
}

.menu-item.is-bounce {
  animation: menu-bounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes menu-bounce {
  0% { transform: scale(1.18); }
  40% { transform: scale(1.32); }
  100% { transform: scale(1.18); }
}

.menu-marks {
  position: absolute;
  top: 50%;
  left: 14px;
  right: 14px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.5s var(--ease-out);
}

.menu-marks span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--acid);
}

.menu-hint {
  position: absolute;
  bottom: 56px;
  left: 0;
  right: 0;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-align: center;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
}

.menu-arrow,
.menu-expand,
.menu-close {
  display: none;
}

.lang {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  display: flex;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.lang-buttons {
  display: flex;
  gap: 14px;
}

.lang-button {
  padding: 4px 2px;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.lang-button:hover {
  color: var(--text);
}

.lang-button.is-current {
  color: var(--acid);
}

.lang-button.is-current::before {
  content: '[';
  margin-right: 3px;
  color: var(--muted);
}

.lang-button.is-current::after {
  content: ']';
  margin-left: 3px;
  color: var(--muted);
}

.menu.is-open .menu-indicator {
  opacity: 0;
}

.menu.is-open .menu-brand,
.menu.is-open .menu-viewport,
.menu.is-open .menu-marks,
.menu.is-open .menu-hint {
  opacity: 1;
}

.menu.is-open .lang {
  opacity: 1;
  pointer-events: auto;
}

@media (min-width: 861px) {
  .menu.is-open {
    width: 300px;
    border-radius: 0 40px 40px 0;
  }
}

@media (max-width: 860px) {
  .app {
    flex-direction: column;
  }

  .menu {
    width: 100%;
    height: 96px;
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
  }

  .menu-indicator,
  .menu-ticks,
  .menu-brand,
  .menu-hint,
  .lang {
    display: none;
  }

  .menu-viewport {
    height: 96px;
    opacity: 1;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
  }

  .menu-reel {
    top: 0;
    left: 50%;
    display: flex;
    flex-direction: row;
  }

  .menu-item {
    flex: none;
    width: 220px;
    height: 96px;
    opacity: 0.72;
  }

  .menu-marks {
    top: 14px;
    bottom: 14px;
    left: 50%;
    right: auto;
    flex-direction: column;
    opacity: 1;
    transform: translateX(-50%);
  }

  .menu-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1.5px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
    font-size: 15px;
    color: var(--text);
    pointer-events: none;
    transform: translateY(-50%);
  }

  .menu-arrow.prev { left: 6px; }
  .menu-arrow.next { right: 6px; }

  .menu-expand {
    position: absolute;
    bottom: -14px;
    left: 50%;
    z-index: 6;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 34px;
    height: 20px;
    padding-bottom: 3px;
    border: 1.5px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(18, 18, 20, 0.85);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transform: translateX(-50%);
  }

  .menu-expand span {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text);
  }

  .menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 902;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1.5px solid var(--glass-border);
    border-radius: 50%;
    background: var(--glass-bg);
    box-shadow: var(--shadow-sm);
    font-size: 16px;
    color: var(--text);
    cursor: pointer;
  }

  .menu.is-expanded {
    position: fixed;
    inset: 0;
    z-index: 900;
    width: 100%;
    height: 100%;
    border-bottom: none;
    border-radius: 0;
    background: var(--bg);
  }

  .menu.is-expanded .menu-arrow,
  .menu.is-expanded .menu-expand {
    display: none;
  }

  .menu.is-expanded .menu-close {
    display: flex;
  }

  .menu.is-expanded .menu-viewport {
    height: 320px;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 30%, black 70%, transparent 100%);
  }

  .menu.is-expanded .menu-reel {
    top: 50%;
    left: 0;
    flex-direction: column;
  }

  .menu.is-expanded .menu-item {
    width: 100%;
    height: 64px;
    font-size: 22px;
    opacity: 0.65;
  }

  .menu.is-expanded .menu-marks {
    top: 50%;
    bottom: auto;
    left: 20px;
    right: 20px;
    flex-direction: row;
    transform: translateY(-50%);
  }

  .menu.is-expanded .menu-hint {
    display: block;
    bottom: 50px;
    z-index: 901;
    opacity: 1;
  }

  .menu.is-expanded .lang {
    display: flex;
    bottom: 12px;
    z-index: 901;
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .menu,
  .menu-reel,
  .menu-item,
  .menu-expand,
  .menu-close {
    transition-duration: 0.01ms !important;
  }
}

.content {
  position: relative;
  flex: 1;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 60px 48px 32px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  pointer-events: none;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out), filter 0.5s var(--ease-out);
}

.panel::-webkit-scrollbar {
  width: 6px;
}

.panel::-webkit-scrollbar-track {
  background: transparent;
}

.panel::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: var(--border);
}

.panel::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

.panel.offscreen-up { transform: translateY(-40px); }
.panel.offscreen-down { transform: translateY(40px); }

.panel.is-active {
  z-index: 2;
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
  pointer-events: auto;
}

[data-panel='apropos'] {
  padding-top: 36px;
}

.panel-header,
.about-grid,
.project-grid,
.contact-grid,
.archive {
  width: 100%;
  max-width: 1700px;
  margin-inline: auto;
}

.panel > *,
.project-grid > *,
.about-grid > *,
.contact-grid > *,
.project-text > *,
.about-text > *,
.contact-main > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.panel.is-active > *,
.panel.is-active .project-grid > *,
.panel.is-active .about-grid > *,
.panel.is-active .contact-grid > *,
.panel.is-active .project-text > *,
.panel.is-active .about-text > *,
.panel.is-active .contact-main > * {
  opacity: 1;
  transform: translateY(0);
}

.panel.is-active > :nth-child(1) { transition-delay: 0.05s; }
.panel.is-active > :nth-child(2) { transition-delay: 0.13s; }
.panel.is-active > :nth-child(3) { transition-delay: 0.21s; }

.panel.is-active .project-grid > :nth-child(1),
.panel.is-active .about-grid > :nth-child(1),
.panel.is-active .contact-grid > :nth-child(1) { transition-delay: 0.1s; }

.panel.is-active .project-grid > :nth-child(2),
.panel.is-active .about-grid > :nth-child(2),
.panel.is-active .contact-grid > :nth-child(2) { transition-delay: 0.3s; }

.panel.is-active .project-text > :nth-child(1),
.panel.is-active .about-text > :nth-child(1),
.panel.is-active .contact-main > :nth-child(1) { transition-delay: 0.12s; }

.panel.is-active .project-text > :nth-child(2),
.panel.is-active .about-text > :nth-child(2),
.panel.is-active .contact-main > :nth-child(2) { transition-delay: 0.18s; }

.panel.is-active .project-text > :nth-child(3),
.panel.is-active .about-text > :nth-child(3),
.panel.is-active .contact-main > :nth-child(3) { transition-delay: 0.24s; }

.panel.is-active .project-text > :nth-child(4),
.panel.is-active .about-text > :nth-child(4),
.panel.is-active .contact-main > :nth-child(4) { transition-delay: 0.3s; }

.panel-header {
  transition: padding 0.5s var(--ease-out);
}

.panel-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.panel-eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--violet);
}

.panel-title {
  max-width: 100%;
  margin-inline: auto;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
  transition: max-width 0.5s var(--ease-out), opacity 0.5s var(--ease-out);
}

.panel-subtitle {
  max-width: 46ch;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--muted);
  transition: margin-left 0.5s var(--ease-out);
}

.panel-subtitle:has(+ .panel-credits) {
  margin-bottom: 4px;
}

[data-panel='apropos'] .panel-subtitle {
  margin-bottom: 10px;
}

.panel-credits {
  margin-bottom: 18px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
  transition: opacity 0.5s var(--ease-out);
}

.panel-tags {
  margin-bottom: 20px;
  line-height: 2.4;
  list-style: none;
}

.panel-text p {
  max-width: 52ch;
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.6;
  text-wrap: pretty;
}

.about-grid .panel-text p,
.project-grid .panel-text p {
  max-width: none;
  margin-bottom: 8px;
  line-height: 1.5;
}

.about-grid .panel-text.has-padding,
.project-grid .panel-text.has-padding {
  padding-bottom: 40px;
}

.panel-label {
  margin: 16px 0 4px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--violet);
}

.tag {
  display: inline-block;
  font-size: 12px;
  color: var(--text);
  transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

.tag:not(:last-child)::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 9px;
  border-radius: 50%;
  background: var(--acid);
  vertical-align: middle;
}

.panel-tags .tag,
.skills .tag {
  opacity: 0;
  transform: translateY(8px);
}

.panel-tags .tag:nth-child(1), .skills .tag:nth-child(1) { transition-delay: 0.28s; }
.panel-tags .tag:nth-child(2), .skills .tag:nth-child(2) { transition-delay: 0.32s; }
.panel-tags .tag:nth-child(3), .skills .tag:nth-child(3) { transition-delay: 0.36s; }
.panel-tags .tag:nth-child(4), .skills .tag:nth-child(4) { transition-delay: 0.4s; }
.panel-tags .tag:nth-child(5), .skills .tag:nth-child(5) { transition-delay: 0.44s; }
.panel-tags .tag:nth-child(6), .skills .tag:nth-child(6) { transition-delay: 0.48s; }
.panel-tags .tag:nth-child(7), .skills .tag:nth-child(7) { transition-delay: 0.52s; }

.panel.is-active .panel-tags .tag,
.panel.is-active .skills .tag {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

@media (max-width: 860px) {
  .panel {
    padding: 32px 24px calc(48px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    filter: none;
  }

  .panel,
  .panel > *,
  .project-grid > *,
  .about-grid > *,
  .contact-grid > *,
  .project-text > *,
  .about-text > *,
  .contact-main > *,
  .panel-tags .tag,
  .skills .tag {
    transition-delay: 0s !important;
  }
}

[data-panel='hero'] {
  padding: 0;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out);
}

.hero-media.is-active {
  opacity: 1;
}

.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 18, 20, 0.2) 0%, rgba(18, 18, 20, 0.55) 70%, rgba(18, 18, 20, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  padding: 64px;
}

.hero-eyebrow {
  margin-bottom: 18px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--muted);
}

.hero-title {
  max-width: 820px;
  font-family: var(--font-display);
  font-size: clamp(32px, 5.4vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-subtitle {
  max-width: 46ch;
  margin-top: 14px;
  font-size: clamp(15px, 1.7vw, 20px);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: pretty;
}

@media (max-width: 860px) {
  [data-panel='hero'] {
    overflow-y: auto;
  }

  .hero-media {
    position: relative;
    inset: auto;
    flex: none;
    height: 42vh;
  }

  .hero-scrim {
    display: none;
  }

  .hero-content {
    flex: 1;
    justify-content: center;
    height: auto;
    min-height: 0;
    padding: 24px 28px calc(32px + env(safe-area-inset-bottom));
  }

  .hero-eyebrow {
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: clamp(26px, 7.5vw, 38px);
    line-height: 1.18;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media {
    transition-duration: 0.01ms !important;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, calc(50% - 28px)) minmax(0, calc(50% - 28px));
  align-content: center;
  align-items: stretch;
  gap: 56px;
  flex: 1;
  min-height: 0;
  transition: grid-template-columns 0.5s var(--ease-out), gap 0.5s var(--ease-out);
}

.about-text {
  align-self: center;
  min-height: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.about-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-self: center;
}

.about-side .gallery {
  height: clamp(222px, 70vw, 330px);
}

.about-side .slide {
  width: min(420px, 82%);
}

.skills {
  margin-top: 14px;
  transition: opacity 0.5s var(--ease-out);
}

.about-side .skills {
  margin-top: 0;
}

.skills .tag {
  font-size: 13px;
}

.skills-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
}

.skills-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.skill-category {
  border-bottom: 1px solid var(--border);
}

.skill-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 13px 2px;
  border: none;
  background: none;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  transition: color 0.25s var(--ease-out);
}

.skill-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
}

.skill-chevron {
  flex: none;
  color: var(--muted);
  transition: transform 0.35s var(--ease-out), color 0.25s var(--ease-out);
}

.skill-category.is-open .skill-chevron {
  transform: rotate(180deg);
}

.skill-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}

.skill-category.is-open .skill-panel {
  grid-template-rows: 1fr;
}

.skill-panel-inner {
  overflow: hidden;
}

.skill-tags {
  padding-bottom: 12px;
  line-height: 2.4;
  list-style: none;
}

.skill-group-title {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--violet);
}

@media (max-width: 1100px) {
  .about-grid {
    grid-template-columns: 1fr;
    height: auto;
    flex: none;
    gap: 20px;
  }

  .about-text {
    order: 2;
  }

  .about-side {
    order: 1;
    align-self: auto;
  }

  .panel.is-active .about-grid > .about-text { transition-delay: 0.3s; }
  .panel.is-active .about-grid > .about-side { transition-delay: 0.1s; }
}

@media (prefers-reduced-motion: reduce) {
  .about-grid,
  .skill-panel,
  .skill-chevron {
    transition-duration: 0.01ms !important;
  }
}

.project-grid {
  display: grid;
  grid-template-columns: minmax(0, calc(54% - 28px)) minmax(0, calc(46% - 28px));
  align-content: center;
  align-items: stretch;
  gap: 56px;
  flex: 1;
  min-height: 0;
  transition: grid-template-columns 0.5s var(--ease-out), gap 0.5s var(--ease-out);
}

.project-text {
  min-height: 0;
  overflow-x: clip;
  overflow-y: visible;
}

.project-grid .gallery {
  align-self: center;
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: 1fr;
    height: auto;
    flex: none;
    gap: 20px;
  }

  .project-text {
    order: 2;
  }

  .project-grid .gallery {
    order: 1;
  }

  .panel.is-active .project-grid > .project-text { transition-delay: 0.3s; }
  .panel.is-active .project-grid > .gallery { transition-delay: 0.1s; }
}

@media (prefers-reduced-motion: reduce) {
  .project-grid {
    transition-duration: 0.01ms !important;
  }
}

.gallery {
  position: relative;
  height: clamp(420px, 56vh, 560px);
  margin-top: 0;
  overflow: hidden;
  perspective: 1600px;
  transition: height 0.5s var(--ease-out), margin-top 0.5s var(--ease-out);
}

.gallery-stage {
  position: relative;
  width: 100%;
  height: 100%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 9%, black 91%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 9%, black 91%, transparent 100%);
}

.slide {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(560px, 84%);
  aspect-ratio: 4 / 3;
  cursor: pointer;
  will-change: transform, opacity;
  transition: transform 0.55s var(--ease-out), opacity 0.55s var(--ease-out);
}

.slide.is-center {
  cursor: default;
}

.slide-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s var(--ease-out);
}

.slide.is-center .slide-frame {
  box-shadow: var(--shadow-xl);
}

.slide-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--dark);
}

.slide-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--dark);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.55);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 120ms var(--ease-out);
}

.play-button::before {
  content: '';
  margin-left: 4px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent var(--text);
}

.play-button:active {
  transform: translate(-50%, -50%) scale(0.9);
}

.slide.is-playing .play-button {
  display: none;
}

.expand-button {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--glass-border);
  border-radius: 9px;
  background: var(--glass-bg);
  backdrop-filter: blur(4px);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.25s var(--ease-out), background 0.25s var(--ease-out), border-color 0.25s var(--ease-out), transform 120ms var(--ease-out);
}

.expand-button:hover {
  border-color: var(--violet);
  background: rgba(139, 127, 240, 0.6);
  opacity: 1;
}

.expand-button:active {
  transform: scale(0.9);
}

.expand-icon {
  display: block;
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dots {
  position: absolute;
  left: 50%;
  bottom: 4px;
  z-index: 5;
  display: flex;
  flex-direction: row;
  gap: 7px;
  transform: translateX(-50%);
}

.dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(242, 241, 237, 0.3);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.dots button.is-active {
  background: var(--acid);
  transform: scale(1.4);
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  border: 1.5px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  font-size: 20px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.gallery-arrow:hover {
  border-color: var(--acid);
  background: rgba(200, 255, 92, 0.15);
  color: var(--acid);
}

.gallery-arrow.prev { left: 4px; }
.gallery-arrow.next { right: 4px; }

@media (max-width: 1100px) {
  .gallery {
    height: clamp(240px, 62vw, 420px);
  }

  .gallery-arrow {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide,
  .slide-frame {
    transition-duration: 0.01ms !important;
  }
}

.archive {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-top: 8px;
}

.archive-titles {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(820px, 100%);
  margin-inline: auto;
  margin-bottom: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  transition: width 0.5s var(--ease-out);
}

.title-stage {
  position: relative;
  flex: 1;
  height: 60px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.archive-title {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 130px;
  overflow: hidden;
  border: none;
  background: none;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  cursor: pointer;
  transition: transform 0.5s var(--ease-out), opacity 0.5s var(--ease-out), color 0.3s var(--ease-out), font-size 0.5s var(--ease-out);
}

.archive-title:hover {
  color: var(--text);
}

.archive-title.is-center {
  z-index: 3;
  max-width: 220px;
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.archive-title.is-near-prev {
  z-index: 2;
  opacity: 0.4;
  transform: translate(-50%, -50%) translateX(-155px) scale(0.85);
}

.archive-title.is-near-next {
  z-index: 2;
  opacity: 0.4;
  transform: translate(-50%, -50%) translateX(155px) scale(0.85);
}

.archive-title.is-far {
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.7);
}

.archive-arrow {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--glass-border);
  border-radius: 50%;
  background: var(--glass-bg);
  box-shadow: var(--shadow-sm);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out), color 0.3s var(--ease-out), transform 0.2s var(--ease-out);
}

.archive-arrow:hover {
  border-color: var(--acid);
  background: rgba(200, 255, 92, 0.15);
  color: var(--acid);
}

.archive-arrow:active {
  transform: scale(0.9);
}

.archive-stage {
  position: relative;
  flex: 1;
  min-height: 460px;
}

.archive-project {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  opacity: 0;
  transform: translateX(28px);
  filter: blur(6px);
  pointer-events: none;
  transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out), filter 0.45s var(--ease-out);
}

.archive-project.offscreen-right { transform: translateX(28px); }
.archive-project.offscreen-left { transform: translateX(-28px); }

.archive-project.is-active {
  z-index: 2;
  opacity: 1;
  transform: translateX(0);
  filter: blur(0);
  pointer-events: auto;
}

.archive-project .gallery {
  width: min(760px, 92%);
  margin-inline: auto;
}

.archive-project .slide {
  aspect-ratio: 16 / 9;
}

.archive-description {
  max-width: 56ch;
  margin-inline: auto;
  margin-top: 20px;
  font-size: 13.5px;
  line-height: 1.55;
  text-align: center;
  color: var(--muted);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.archive-credits {
  max-width: 56ch;
  margin-inline: auto;
  margin-top: 6px;
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  opacity: 0.7;
  transform: translateY(0);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

@media (max-width: 860px) {
  .archive-titles {
    gap: 8px;
    padding-bottom: 8px;
  }

  .archive-title {
    max-width: 70px;
  }

  .archive-title.is-center {
    max-width: 120px;
    font-size: 19px;
  }

  .archive-title.is-near-prev { transform: translate(-50%, -50%) translateX(-110px) scale(0.75); }
  .archive-title.is-near-next { transform: translate(-50%, -50%) translateX(110px) scale(0.75); }

  .archive-stage {
    min-height: 380px;
  }

  .archive-description {
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .archive-project {
    filter: none;
  }

  .archive-project,
  .archive-title,
  .archive-description,
  .archive-credits {
    transition-duration: 0.01ms !important;
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 11, 0.92);
  opacity: 0;
  pointer-events: none;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 92vw;
  max-height: 88vh;
}

.lightbox-content img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
}

.lightbox-video {
  display: block;
  width: min(92vw, calc(88vh * 16 / 9));
  aspect-ratio: 16 / 9;
  border: 0;
  background: var(--dark);
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--glass-border);
  border-radius: 50%;
  background: rgba(18, 18, 20, 0.6);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 120ms var(--ease-out);
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  border-color: var(--violet);
  background: rgba(139, 127, 240, 0.5);
}

.lightbox-close:active {
  transform: scale(0.9);
}

.lightbox-arrow:active {
  transform: translateY(-50%) scale(0.9);
}

.lightbox-close {
  top: 24px;
  right: 28px;
  width: 38px;
  height: 38px;
  font-size: 18px;
}

.lightbox-arrow {
  top: 50%;
  width: 44px;
  height: 44px;
  font-size: 22px;
  transform: translateY(-50%);
}

.lightbox-arrow.prev { left: 24px; }
.lightbox-arrow.next { right: 24px; }

@media (max-width: 720px) {
  .lightbox-arrow {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .lightbox-arrow.prev { left: 10px; }
  .lightbox-arrow.next { right: 10px; }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  align-items: center;
  gap: 64px;
  flex: 1;
  min-height: 0;
}

.contact-main {
  max-width: 640px;
}

.contact-heading {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: clamp(30px, 4.6vw, 52px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.contact-availability {
  max-width: 54ch;
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.contact-email {
  display: inline-block;
  margin-top: 22px;
  padding: 8px 6px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 500;
  transition: color 0.3s var(--ease-out), background 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.contact-email:hover {
  padding: 8px 22px;
  background: rgba(139, 127, 240, 0.1);
  color: var(--violet);
}

.contact-copyright {
  margin-top: 36px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.7;
}

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--muted);
  transition: color 0.25s var(--ease-out), padding-left 0.25s var(--ease-out);
}

.contact-link:hover {
  padding-left: 10px;
  color: var(--text);
}

.contact-link-arrow {
  font-size: 14px;
  color: var(--muted);
  transform: translate(0, 0);
  transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.contact-link:hover .contact-link-arrow {
  transform: translate(3px, -3px);
  color: var(--acid);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-links {
    margin-top: 8px;
  }
}

.cv-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 11, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cv-gate.open {
  opacity: 1;
  pointer-events: auto;
}

.cv-box {
  position: relative;
  width: min(380px, 88vw);
  padding: 36px 32px 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--bg);
  box-shadow: var(--shadow-lg);
}

.cv-box:not(.is-unlocked) [data-step='unlocked'],
.cv-box.is-unlocked [data-step='locked'] {
  display: none;
}

.cv-close {
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 14px;
}

.cv-text {
  margin: 8px 0 20px;
  font-size: 15px;
  color: var(--muted);
}

.cv-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: transparent;
  font: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.cv-input:focus {
  border-color: var(--violet);
}

.cv-error {
  margin-top: 10px;
  font-size: 14px;
  color: var(--acid);
}

.cv-submit {
  width: 100%;
  margin-top: 20px;
  padding: 12px 16px;
  border: none;
  border-radius: 999px;
  background: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--bg);
  cursor: pointer;
  transition: background 0.2s ease, transform 120ms var(--ease-out);
}

.cv-submit:hover {
  background: var(--acid);
}

.cv-submit:active {
  transform: scale(0.97);
}

.cv-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cv-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cv-option:hover,
.cv-option:focus-visible {
  border-color: var(--violet);
  background: rgba(139, 127, 240, 0.1);
  outline: none;
}

.cv-option-arrow {
  font-size: 14px;
  color: var(--muted);
  transition: transform 0.25s var(--ease-out), color 0.25s var(--ease-out);
}

.cv-option:hover .cv-option-arrow,
.cv-option:focus-visible .cv-option-arrow {
  transform: translate(3px, -3px);
  color: var(--acid);
}

@media (min-width: 861px) {
  .app.menu-open .about-grid,
  .app.menu-open .project-grid {
    grid-template-columns: minmax(0, 0%) minmax(0, 100%);
    gap: 0;
  }

  .app.menu-open .about-text,
  .app.menu-open .project-text {
    grid-column: 1;
  }

  .app.menu-open .about-side,
  .app.menu-open .project-grid > .gallery {
    grid-column: 2;
  }

  .app.menu-open .gallery {
    height: clamp(460px, 60vh, 620px);
    margin-top: 20px;
  }

  .app.menu-open .gallery-stage {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .app.menu-open .slide-frame {
    transform: scale(1.08);
  }

  .app.menu-open .about-side .slide {
    width: min(560px, 84%);
  }

  .app.menu-open .panel-header {
    text-align: center;
  }

  .app.menu-open .panel-title {
    max-width: 720px;
  }

  .app.menu-open .panel-subtitle {
    margin-left: calc((100% - 46ch) / 2);
  }

  .app.menu-open .panel-credits {
    opacity: 0;
    pointer-events: none;
  }

  .app.menu-open .panel.is-active .panel-text,
  .app.menu-open .panel.is-active .panel-tags,
  .app.menu-open .panel.is-active .skills {
    opacity: 0 !important;
    pointer-events: none;
  }

  .app.menu-open .panel.is-active .about-text,
  .app.menu-open .panel.is-active .project-text {
    overflow-y: hidden;
  }

  .app.menu-open .panel.is-active .skills {
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
  }

  .app.menu-open [data-panel='archive'] .archive-description,
  .app.menu-open [data-panel='archive'] .archive-credits {
    opacity: 0 !important;
    pointer-events: none;
    transform: translateY(14px);
  }

  .app.menu-open [data-panel='archive'] .archive-titles {
    width: min(920px, 100%);
  }

  .app.menu-open [data-panel='archive'] .archive-title.is-center {
    max-width: 260px;
    font-size: 32px;
  }
}
