/* ---------- tokens ---------- */
:root {
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --brand: #3b82f6;
  --brand2: #06b6d4;
  --brand3: #1d4ed8;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --maxw: 1200px;
}
[data-theme='dark'] {
  color-scheme: dark;
  --bg: #05070d;
  --bg2: #0a0f1a;
  --card: rgba(255, 255, 255, 0.04);
  --card-solid: #0e1420;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f8;
  --muted: #9aa6bd;
  --faint: #627089;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --blob-opacity: 0.38;
}
[data-theme='light'] {
  color-scheme: light;
  --bg: #f5f8fd;
  --bg2: #ffffff;
  --card: rgba(255, 255, 255, 0.7);
  --card-solid: #ffffff;
  --line: rgba(15, 15, 40, 0.09);
  --line-strong: rgba(15, 15, 40, 0.16);
  --text: #12121c;
  --muted: #55556a;
  --faint: #8a8aa0;
  --shadow: 0 30px 70px -35px rgba(30, 30, 80, 0.35);
  --blob-opacity: 0.28;
}

/* ---------- base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s var(--ease), color 0.4s var(--ease);
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex: none;
}
kbd {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  color: var(--muted);
  background: var(--card);
}
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 10px;
}
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 10px;
}
.skip:focus {
  left: 8px;
}
.muted {
  color: var(--faint);
}

/* ---------- animated background ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.blob {
  position: absolute;
  width: 46vmax;
  height: 46vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: var(--blob-opacity);
  animation: float 26s var(--ease) infinite alternate;
}
.b1 {
  background: var(--brand3);
  top: -18vmax;
  left: -10vmax;
}
.b2 {
  background: var(--brand);
  top: -10vmax;
  right: -16vmax;
  animation-delay: -8s;
}
.b3 {
  background: var(--brand2);
  bottom: -26vmax;
  left: 30vw;
  opacity: calc(var(--blob-opacity) * 0.6);
  animation-delay: -15s;
}
.grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.6;
}
@keyframes float {
  to {
    transform: translate3d(6vw, 8vh, 0) scale(1.15);
  }
}

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand img {
  border-radius: 9px;
}
.brand b {
  color: var(--brand);
}
.nav-links {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--card);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.pill,
.icon-btn {
  font: inherit;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.pill:hover,
.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
.pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.5rem 0.4rem 0.85rem;
  font-size: 0.88rem;
}
.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
}
.icon-btn svg {
  width: 18px;
  height: 18px;
}
[data-theme='dark'] .i-moon,
[data-theme='light'] .i-sun {
  display: none;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 9vh, 7rem) clamp(1rem, 4vw, 2.5rem) 3rem;
}
h1 {
  font-family: var(--display);
  font-size: clamp(3rem, 9vw, 6.6rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 700;
  margin: 0 0 1.4rem;
}
.grad {
  background: linear-gradient(100deg, #93c5fd 0%, var(--brand) 40%, var(--brand2) 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lead {
  max-width: 640px;
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--muted);
  margin: 0 0 2.6rem;
}

/* ---------- dock ---------- */
.dock {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.9rem;
  perspective: 900px;
}
.dock-item {
  --rx: 0deg;
  --ry: 0deg;
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  background: radial-gradient(400px circle at var(--mx) var(--my), color-mix(in srgb, var(--a) 18%, transparent), transparent 60%), var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(12px);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  overflow: hidden;
}
.dock-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s;
}
.dock-item:hover {
  box-shadow: 0 20px 50px -20px color-mix(in srgb, var(--a) 55%, transparent);
}
.dock-item:hover::after,
.dock-item:focus-visible::after {
  opacity: 1;
}
.dock-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  flex: none;
  background: #fff;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--a) 70%, transparent);
}
.dock-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.dock-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dock-text b {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
}
.dock-text small {
  color: var(--faint);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-key {
  position: absolute;
  top: 0.6rem;
  right: 0.7rem;
  transition: opacity 0.2s;
}
.dock-arrow {
  position: absolute;
  right: 0.9rem;
  bottom: 0.7rem;
  color: var(--a);
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.25s, transform 0.25s var(--ease);
}
.dock-item:hover .dock-arrow {
  opacity: 1;
  transform: none;
}
.dock-item .status {
  position: absolute;
  left: 3.6rem;
  top: 0.75rem;
}

/* status dot */
.status {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--faint);
  border: 2px solid var(--bg2);
  flex: none;
}
.status[data-state='up'] {
  background: #22c55e;
}
.status[data-state='down'] {
  background: #ef4444;
}
.status[data-state='checking'] {
  animation: blink 1s infinite alternate;
}
@keyframes blink {
  to {
    opacity: 0.3;
  }
}

/* stats */
.stats {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats li {
  padding: 1.4rem 1rem 0 0;
  display: flex;
  flex-direction: column;
}
.stats b {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.stats span {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- sections ---------- */
.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(4rem, 10vh, 7rem) clamp(1rem, 4vw, 2.5rem) 0;
}
.section-head {
  margin-bottom: 3.5rem;
}
.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--brand);
  margin: 0 0 0.6rem;
  letter-spacing: 0.04em;
}
h2 {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 0.6rem;
}
.section-head p:last-child {
  color: var(--muted);
  margin: 0;
  max-width: 560px;
}

/* ---------- project showcase ---------- */
.project {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: 3rem 0 5rem;
  position: relative;
}
.project + .project {
  border-top: 1px solid var(--line);
  padding-top: 5rem;
}
.project.flip .project-media {
  grid-column: 2;
  grid-row: 1;
}
.project.flip .project-body {
  grid-column: 1;
  grid-row: 1;
}
.project-media {
  position: relative;
  padding-bottom: 2.5rem;
}
.project-media::before {
  content: '';
  position: absolute;
  inset: 8% 6% 10%;
  background: linear-gradient(135deg, var(--a), var(--a2));
  filter: blur(70px);
  opacity: 0.35;
  border-radius: 40px;
  z-index: -1;
}
figure {
  margin: 0;
  cursor: zoom-in;
}
.browser {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--card-solid);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease);
}
.browser:hover {
  transform: translateY(-4px);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg2);
}
.browser-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-strong);
}
.browser-bar i:nth-child(1) {
  background: #ff5f57;
}
.browser-bar i:nth-child(2) {
  background: #febc2e;
}
.browser-bar i:nth-child(3) {
  background: #28c840;
}
.browser-bar span {
  margin: 0 auto;
  font-size: 0.72rem;
  color: var(--faint);
  font-family: var(--mono);
  padding: 0.15rem 0.9rem;
  border-radius: 6px;
  background: var(--card);
  transform: translateX(-20px);
}
.browser img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
}
.phone {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: 24%;
  border-radius: 26px;
  padding: 6px;
  background: #0d0d14;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s var(--ease);
}
.flip .phone {
  right: auto;
  left: -4%;
}
.phone:hover {
  transform: translateY(-6px) rotate(-1deg);
}
.phone img {
  height: auto;
  border-radius: 20px;
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: top;
  width: 100%;
}
.browser.mini {
  position: absolute;
  right: -5%;
  bottom: 0;
  width: 46%;
  border-radius: 12px;
}
.flip .browser.mini {
  right: auto;
  left: -5%;
}
.browser.mini img {
  aspect-ratio: 16 / 10;
}

.project-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin: 0 0 0.9rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.num {
  font-family: var(--mono);
  color: var(--a);
  font-weight: 600;
}
.cat {
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--a) 40%, transparent);
  background: color-mix(in srgb, var(--a) 10%, transparent);
  color: color-mix(in srgb, var(--a) 70%, var(--text));
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
}
.status-label em {
  font-style: normal;
  font-size: 0.78rem;
}
.project h3 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin: 0 0 0.6rem;
}
.project h3 img {
  border-radius: 12px;
  background: #fff;
}
.badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--a), var(--a2));
  color: #04121c;
  font-weight: 700;
}
.tagline {
  font-size: 1.15rem;
  margin: 0 0 0.8rem;
  font-weight: 500;
}
.desc {
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.project h4 {
  margin: 0 0 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 600;
}
.features {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.45rem;
}
.features li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
}
.features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 50%;
  background: color-mix(in srgb, var(--a) 22%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 4 4 10-10' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 62% no-repeat;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a) 60%, transparent);
}
[data-theme='light'] .features li::before {
  background-color: var(--a);
}
.chips {
  list-style: none;
  padding: 0;
  margin: 0 0 1.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-family: var(--mono);
  padding: 0.28rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
}
.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* buttons */
.btn {
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
  border-color: var(--text);
}
.btn svg {
  width: 1.05em;
  height: 1.05em;
}
.btn.primary {
  background: var(--text);
  color: var(--bg);
  border-color: transparent;
}
.btn.primary.accent {
  background: linear-gradient(135deg, var(--a), var(--a2));
  color: #08110c;
  font-weight: 600;
}
.btn.primary:hover {
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--a, var(--brand)) 70%, transparent);
}
.btn.ghost {
  background: transparent;
  border-style: dashed;
  color: var(--muted);
}

/* ---------- tech icons ---------- */
.ti {
  width: 18px;
  height: 18px;
  flex: none;
  fill: var(--c, currentColor);
}
[data-theme='dark'] .ti.dark {
  fill: var(--text);
}
.ti.mono {
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bg);
  background: var(--muted);
}

/* ---------- tech list ---------- */
.stack-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.tech {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem 0.6rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(8px);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.2s, transform 0.2s var(--ease);
}
.tech .ti {
  width: 22px;
  height: 22px;
}
.tech .ti.mono {
  font-size: 0.66rem;
}
.tech:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
}

/* ---------- Google Play gallery ---------- */
.store-shot {
  position: absolute;
  right: -4%;
  bottom: 0;
  width: 24%;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  transition: transform 0.5s var(--ease);
}
.flip .store-shot {
  right: auto;
  left: -4%;
}
.store-shot:hover {
  transform: translateY(-6px) rotate(-1deg);
}
.store-shot img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.play-strip {
  grid-column: 1 / -1;
}
.play-strip h4 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  font-weight: 600;
}
.play-strip h4 svg {
  fill: #3ddc84;
  width: 16px;
  height: 16px;
}
.play-shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}
.play-shots figure {
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  transition: transform 0.3s var(--ease), border-color 0.3s;
}
.play-shots figure:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--a) 60%, transparent);
}
.play-shots img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

/* ---------- contact ---------- */
.contact {
  padding-bottom: 5rem;
}
.contact-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  border: 1px solid var(--line);
  background: radial-gradient(600px circle at 20% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%),
    radial-gradient(600px circle at 90% 100%, color-mix(in srgb, var(--brand2) 22%, transparent), transparent 60%), var(--card);
}
.contact-card p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.contact-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 3rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---------- dialogs ---------- */
dialog {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
}
dialog::backdrop {
  background: rgba(2, 6, 16, 0.65);
  backdrop-filter: blur(6px);
}
.palette {
  width: min(560px, calc(100vw - 2rem));
  margin-top: 14vh;
}
.palette-box {
  border-radius: 20px;
  background: var(--card-solid);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.palette input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem;
  padding: 1.1rem 1.25rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  outline: none;
}
.palette ul {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  max-height: 50vh;
  overflow: auto;
}
.palette li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  cursor: pointer;
}
.palette li img {
  border-radius: 9px;
  background: #fff;
}
.palette li span {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.palette li small {
  color: var(--faint);
}
.palette li[aria-selected='true'],
.palette li[data-i]:hover {
  background: color-mix(in srgb, var(--a) 14%, transparent);
}
.palette li.empty {
  color: var(--faint);
  justify-content: center;
  cursor: default;
}
.palette-hint {
  margin: 0;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.78rem;
}
.lightbox {
  max-width: min(1300px, 94vw);
  max-height: 92vh;
}
.lightbox img {
  max-height: 84vh;
  border-radius: 14px;
  box-shadow: var(--shadow);
  margin: 0 auto;
}
.lightbox p {
  text-align: center;
  color: #e5e5ee;
  margin: 0.8rem 0 0;
}
.lb-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
dialog[open] {
  animation: pop 0.25s var(--ease);
}
@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
.hero .reveal:nth-child(2) {
  transition-delay: 0.08s;
}
.hero .reveal:nth-child(3) {
  transition-delay: 0.16s;
}
.hero .reveal:nth-child(4) {
  transition-delay: 0.24s;
}
.hero .reveal:nth-child(5) {
  transition-delay: 0.32s;
}
.project-body.reveal {
  transition-delay: 0.12s;
}

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .dock {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1020px) {
  .dock {
    grid-template-columns: repeat(2, 1fr);
  }
  .project,
  .project.flip {
    grid-template-columns: 1fr;
  }
  .project.flip .project-media,
  .project.flip .project-body {
    grid-column: auto;
    grid-row: auto;
  }
  .phone {
    right: 2%;
  }
  .flip .phone,
  .flip .store-shot {
    left: auto;
    right: 2%;
  }
  .store-shot {
    right: 2%;
  }
  .browser.mini,
  .flip .browser.mini {
    left: auto;
    right: 0;
  }
}
@media (max-width: 720px) {
  .nav-links,
  .kbd-btn span,
  .kbd-btn kbd {
    display: none;
  }
  .kbd-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
  }
  .nav-actions {
    margin-left: auto;
  }
  .dock {
    grid-template-columns: 1fr;
  }
  .dock-key {
    display: none;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .store-shot {
    width: 30%;
  }
  .play-shots {
    grid-auto-columns: 42%;
  }
  .phone {
    width: 30%;
  }
  .browser.mini {
    width: 55%;
  }
  .status-label {
    margin-left: 0;
  }
}
@media (hover: none) {
  .dock-key,
  .footer .muted,
  .kbd-btn kbd {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
