:root {
  --bg-1: #fbfbf9;
  --bg-2: #f3f2ee;
  --bg-3: #eceae5;
  --text-strong: #111111;
  --text-muted: #b5b5b5;
  --text-body: #2a2a2a;
  --frame: #0f0f0f;
  --shadow: 0 30px 80px rgba(10, 10, 10, 0.18);
  --nav-height: clamp(44px, 6vh, 64px);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text-strong);
  background: #ffffff;
  overflow: hidden;
  overscroll-behavior: none;
}

.top-nav {
  width: 100%;
  display: flex;
  align-items: center;
  height: var(--nav-height);
  padding: 0 clamp(12px, 1.5vw, 20px);
  color: #111111;
  font-size: clamp(14px, 1.4vw, 16px);
  letter-spacing: 0.02em;
}

.nav-title {
  font-weight: 600;
}

.nav-title-light {
  font-weight: 300;
}

.page {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  gap: 14px;
  padding: clamp(12px, 1.5vw, 20px);
  align-items: center;
  overflow: visible;
}

.left {
  flex: 1.1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  overflow: visible;
}

.device-frame {
  width: min(520px, 90%);
  max-height: 90vh;
  background: transparent;
  padding: 48px 40px 64px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  animation: liftIn 700ms ease both;
}

.device-media {
  width: calc(100% - 0px);
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.device-media.is-hidden {
  display: none;
}

.carousel-preview {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 12%,
    #000 88%,
    transparent 100%
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

.carousel-preview.is-hidden {
  display: none;
}

.carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 72%;
  height: auto;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 30px;
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.14),
    0 -6px 18px rgba(0, 0, 0, 0.08);
  backface-visibility: hidden;
  transition:
    transform 280ms ease,
    opacity 280ms ease,
    filter 280ms ease;
}

.carousel-card.is-blurred {
  -webkit-mask-image: radial-gradient(
    closest-side,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: radial-gradient(
    closest-side,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
}

.right {
  flex: 0.9;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vw, 36px);
  animation: fadeIn 700ms ease 120ms both;
}

.projects {
  display: grid;
  gap: 14px;
}

.project-item {
  display: grid;
  gap: 8px;
  transition: transform 260ms ease;
}

.project-button {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-family: inherit;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 200ms ease, transform 200ms ease;
}

.project-button:hover,
.project-button:focus-visible {
  color: #4a4a4a;
  outline: none;
  transform: translateX(6px);
}

.project-button.active {
  color: var(--text-strong);
  font-weight: 700;
  transform: translateX(6px);
  font-size: clamp(30px, 3.4vw, 42px);
}

.project-features {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: grid;
  overflow: hidden;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-muted);
  max-height: 0;
  opacity: 0;
  transform: translate(6px, -6px);
  transition: max-height 260ms ease, opacity 260ms ease, transform 260ms ease;
}

.project-item.active .project-features {
  gap: 6px;
  max-height: 240px;
  opacity: 1;
  transform: translate(6px, 0);
}

.nav-hint {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9a9a9a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.key-badge {
  display: inline-flex;
  gap: 6px;
}

.key {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid #d4d4d4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #7a7a7a;
  background: #ffffff;
}

.key.pulse-up {
  animation: keyPulseUp 420ms cubic-bezier(0.16, 1.2, 0.3, 1);
}

.key.pulse-down {
  animation: keyPulseDown 420ms cubic-bezier(0.16, 1.2, 0.3, 1);
}

@keyframes keyPulseUp {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-6px) scale(1.32);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}

@keyframes keyPulseDown {
  0% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(6px) scale(1.32);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}
.project-features li {
  color: var(--text-muted);
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.project-features li.feature-group {
  cursor: default;
  display: grid;
  gap: 8px;
}

.feature-group-label {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.feature-indexes {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
}

.feature-index {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.feature-index.active {
  color: var(--text-strong);
  font-weight: 600;
}

.feature-index:hover,
.feature-index:focus-visible {
  color: var(--text-strong);
  outline: none;
  transform: translateY(-1px);
}

.project-features li.active {
  color: var(--text-strong);
  font-weight: 600;
}

.project-features li:hover,
.project-features li:focus-visible {
  color: var(--text-strong);
  outline: none;
  transform: translateX(6px);
}

.project-features li.feature-group.active {
  color: var(--text-muted);
  font-weight: 500;
}

.project-features li.feature-group:hover,
.project-features li.feature-group:focus-visible {
  color: var(--text-muted);
  transform: none;
}

.project-features li.feature-group.active .feature-group-label {
  color: var(--text-strong);
}

.project-features li.feature-group .feature-indexes {
  display: none;
}

.project-features li.feature-group.active .feature-indexes {
  display: flex;
}

.project-features li.video-active {
  --progress: 100%;
  --softness: 2%;
  background: linear-gradient(
    90deg,
    #b5b5b5 0%,
    #b5b5b5 clamp(0%, calc(var(--progress) - var(--softness)), 100%),
    #111111 clamp(0%, calc(var(--progress) + var(--softness)), 100%),
    #111111 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.project-features li.video-active.active {
  background: none;
  color: var(--text-strong);
}

.feature-index.video-active.active {
  background: none;
  color: var(--text-strong);
}


@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@media (max-width: 900px) {
  .top-nav {
    transform: none;
  }

  .page {
    flex-direction: column;
    align-items: stretch;
  }

  .left,
  .right {
    width: 100%;
  }

  .device-frame {
    width: min(420px, 100%);
  }
}

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: clamp(14px, 3vh, 24px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
}

.dock-inner {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  border-radius: 26px;
  background: rgba(250, 250, 250, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
  pointer-events: auto;
}

.dock-button {
  width: 52px;
  height: 52px;
  border: none;
  padding: 0;
  border-radius: 14px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.dock-button:hover,
.dock-button:focus-visible {
  transform: translateY(-6px) scale(1.08);
  outline: none;
}

.dock-button.active {
  transform: translateY(-8px) scale(1.1);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.16);
}

.dock-icon {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.dock-fallback {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: #f0f0f0;
  color: #222;
  font-size: 16px;
  font-weight: 600;
  display: grid;
  place-items: center;
}
