*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #0a0a0a;
  --fg: #e8e8e8;
  --fg-dim: #888;
  --nav-pad: 16px;
  --nav-radius: 12px;
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
}

html, body {
  height: 100vh;
  height: 100dvh;
  height: -webkit-fill-available;
  overflow: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: 'Inter', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Floating Split Navbar ── */

.nav-bar {
  position: fixed;
  top: var(--nav-pad);
  left: var(--nav-pad);
  right: var(--nav-pad);
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.nav-pill {
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--nav-radius);
  pointer-events: auto;
  overflow: hidden;
}

.nav-pill--left {
  padding: 4px;
  gap: 4px;
}

.nav-pill--right {
  gap: 0;
  padding: 4px;
}

.nav-tag {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--fg-dim);
  padding: 5px 10px;
  letter-spacing: 0.5px;
}

.nav-about {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-dim);
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-about:hover {
  color: #fff;
}

/* ── About Modal ── */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 201;
  transform: translate(-50%, -50%) scale(0.96);
  width: min(440px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  background: #111;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}

.modal-backdrop.open + .modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--fg);
}

.modal p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.modal ul {
  list-style: none;
  margin-bottom: 16px;
}

.modal li {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  color: var(--fg-dim);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal li span {
  color: var(--fg);
}

.modal-install {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--fg-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.modal-install span {
  user-select: all;
}

.modal-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--fg-dim);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s;
}

.modal-copy:hover {
  color: #fff;
}

.modal-copy.copied {
  color: #4ade80;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--fg-dim);
  cursor: pointer;
  border-radius: 6px;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #fff;
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--fg-dim);
  transition: color 0.2s, background 0.2s;
}

.nav-icon:hover {
  color: #fff;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
}

.nav-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background 0.2s;
  color: var(--bg);
  background: var(--fg);
}

.nav-btn:hover {
  background: #fff;
}

/* ── Animation Container ── */

.anim-wrap {
  position: fixed;
  z-index: 1;
  inset: 0;
  overflow: hidden;
}

.anim-wrap [data-us-project] {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1440px !important;
  height: 900px !important;
  transform: translate(-50%, -50%);
}

/* ── Mobile ── */

@media (max-width: 600px) {
  .nav-bar {
    --nav-pad: 10px;
  }

  .nav-pill--left {
    padding: 7px 12px;
    gap: 6px;
  }

  .nav-tag { display: none; }

  .nav-btn {
    padding: 7px 10px;
    font-size: 12px;
  }

  .anim-wrap [data-us-project] {
    /* Scale so 900px canvas covers full physical screen (~956pts on tallest iPhones) */
    /* Also covers behind iOS 26 liquid glass chrome + home indicator */
    transform: translate(-50%, -50%) scale(1.2);
  }
}
