:root {
  --bg: #000;
  --bg-elevated: #080808;
  --surface: #0c0c0c;
  --surface-2: #111;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-secondary: #a1a1a6;
  --text-tertiary: #48484a;
  --accent: #ff3b30;
  --accent-glow: rgba(255, 59, 48, 0.35);
  --card-w-project: 460px;
  --card-w-dev: 300px;
  --radius-card: 24px;
  --radius-sm: 12px;
  --nav-h: 56px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html,
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: clip;
  scrollbar-width: none;
  cursor: none !important;
}

* {
  cursor: none !important;
}

::-webkit-scrollbar {
  display: none;
}

#cursor-dot {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.08s, opacity 0.2s;
  box-shadow: 0 0 12px var(--accent-glow), 0 0 28px var(--accent-glow);
}

#cursor-ring {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out),
    border-color 0.3s, transform 0.12s;
}

#cursor-ring.expand {
  width: 56px;
  height: 56px;
  border-color: rgba(255, 255, 255, 0.08);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg%20viewBox='0%200%20256%20256'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter%20id='noise'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='4'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='100%25'%20height='100%25'%20filter='url(%23noise)'%20opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9998;
  opacity: 0.6;
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 56px;
    height: var(--nav-h);
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(180%) blur(28px);
    -webkit-backdrop-filter: saturate(180%) blur(28px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: background 0.4s;
  }

  nav.scrolled {
    background: rgba(0, 0, 0, 0.88);
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
  }

  .nav-brand-logo {
    width: 32px; height: 32px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .nav-brand-name {
    font-size: 14px;
    letter-spacing: -0.4px;
  }

  .nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
  }

  .nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.1px;
    transition: color 0.2s;
  }

  .nav-links a:hover {
    color: var(--text);
  }

  .nav-cta {
    background: var(--text) !important;
    color: var(--bg) !important;
    padding: 7px 18px !important;
    border-radius: 100px !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    transition: background 0.2s, opacity 0.2s !important;
  }

  .nav-cta:hover {
    opacity: 0.85 !important;
  }

  .hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--nav-h) + 40px) 24px 120px;
    position: relative;
    overflow: hidden;
  }

  .hero-glow {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse at center,
      rgba(255, 59, 48, 0.08) 0%,
      rgba(255, 59, 48, 0.03) 40%,
      transparent 70%);
    pointer-events: none;
    z-index: 0;
  }

  .hero-grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
    pointer-events: none;
    z-index: 0;
  }

  .hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-logo {
    width: 250px;
    height: 250px;
    object-fit: contain;
    margin-bottom: 48px;
    opacity: 0;
    animation: fadeUp 1s 0.1s var(--ease-out) forwards;
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.05));
  }

  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border-hover);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.03);
    opacity: 0;
    animation: fadeUp 0.9s 0.2s var(--ease-out) forwards;
  }

  .hero-eyebrow-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: blink 2s ease-in-out infinite;
  }

  @keyframes blink {
    0%, 100% {
      opacity: 1;
    }

    50% {
      opacity: 0.3;
    }
  }

  .hero h1 {
    font-size: clamp(64px, 9.5vw, 112px);
    font-weight: 700;
    letter-spacing: -5px;
    line-height: 0.95;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeUp 1s 0.35s var(--ease-out) forwards;
  }

  .hero h1 em {
    font-style: normal;
    color: var(--text-secondary);
    font-weight: 300;
  }

  .hero-sub {
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 300;
    color: var(--text-secondary);
    max-width: 520px;
    line-height: 1.6;
    letter-spacing: -0.2px;
    margin-bottom: 52px;
    opacity: 0;
    animation: fadeUp 1s 0.5s var(--ease-out) forwards;
  }

  .hero-actions {
    display: flex;
    gap: 14px;
    align-items: center;
    opacity: 0;
    animation: fadeUp 1s 0.65s var(--ease-out) forwards;
  }

  .btn-primary {
    background: var(--text);
    color: var(--bg);
    padding: 14px 32px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.3px;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s var(--ease-out);
  }

  .btn-primary:hover {
    opacity: 0.88; transform: scale(1.02);
  }

  .btn-ghost {
    color: var(--text-secondary);
    padding: 14px 24px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.3px;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .btn-ghost:hover {
    color: var(--text);
  }

  .btn-ghost svg {
    transition: transform 0.2s var(--ease-out);
  }

  .btn-ghost:hover svg {
    transform: translateX(3px);
  }

  .hero-scroll-hint {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-tertiary);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: scrollBounce 2.5s ease-in-out infinite;
  }

  @keyframes scrollBounce {
    0%, 100% {
      opacity: 0.3; transform: translateX(-50%) translateY(0);
    }

    50% {
      opacity: 0.7; transform: translateX(-50%) translateY(5px);
    }
  }

  @keyframes fadeUp {
    from {
      opacity: 0; transform: translateY(28px);
    }

    to {
      opacity: 1; transform: translateY(0);
    }
  }

  .stats-bar {
    padding: 0 56px;
    margin-bottom: 0;
  }

  .stats-inner {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    background: var(--surface);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow: hidden;
  }

  .stat-item {
    padding: 40px 48px;
    border-right: 1px solid var(--border);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  }

  .stat-item:last-child {
    border-right: none;
  }

  .stat-item.visible {
    opacity: 1; transform: translateY(0);
  }

  .stat-num {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1;
    margin-bottom: 8px;
  }

  .stat-label {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: -0.1px;
  }

  .section-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 12px;
  }

  .section-title {
    font-size: clamp(36px, 4.5vw, 60px);
    font-weight: 700;
    letter-spacing: -3px;
    line-height: 1.05;
    color: var(--text);
  }

  .section-title em {
    font-style: normal;
    color: var(--text-secondary);
    font-weight: 300;
  }

  .h-scroll-pin {
    position: relative;
  }

  .h-scroll-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    padding: calc(var(--nav-h) + 20px) 0 20px;
  }

  .h-scroll-header {
    padding: 0 56px;
    margin-bottom: 0px;
  }

  .h-scroll-track-wrap {
    overflow: hidden;
    width: 100%;
    padding-bottom: 8px;
  }

  .h-scroll-track {
    display: flex;
    gap: 16px;
    padding: 0 56px;
    width: max-content;
    will-change: transform;
  }

  .scroll-progress {
    display: flex;
    gap: 5px;
    padding: 0 56px;
    margin-top: 32px;
    align-items: center;
  }

  .progress-dot {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background 0.3s, transform 0.3s, width 0.3s;
  }

  .progress-dot.active {
    background: var(--text);
    width: 20px;
    border-radius: 2px;
    transform: none;
  }

  .project-card {
    flex-shrink: 0;
    width: var(--card-w-project);
    height: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 52px 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, transform 0.5s var(--ease-out), box-shadow 0.5s;
  }

  .project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    opacity: 0;
    transition: opacity 0.4s;
  }

  .project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
  }

  .project-card:hover::before {
    opacity: 1;
  }

  .card-bg-num {
    position: absolute;
    bottom: -20px; right: 24px;
    font-size: 180px;
    font-weight: 800;
    letter-spacing: -12px;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    pointer-events: none;
    user-select: none;
  }

  .card-num {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 24px;
  }

  .project-card h3 {
    font-size: 32px;
    font-weight: 600;
    letter-spacing: -1.5px;
    margin-bottom: 16px;
    line-height: 1.1;
  }

  .project-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 300;
    flex: 1;
  }

  .card-badge {
    margin-top: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 8px 16px;
    width: fit-content;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.02);
  }

  .badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--text-tertiary);
  }

  .badge-dot.live {
    background: #30d158; box-shadow: 0 0 6px #30d158;
  }

  .badge-dot.dev {
    background: #ffd60a; box-shadow: 0 0 6px #ffd60a;
  }

  .dev-card {
    flex-shrink: 0;
    width: var(--card-w-dev);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 40px 32px 36px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, transform 0.5s var(--ease-out), box-shadow 0.5s, background 0.3s;
  }

  .dev-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    opacity: 0;
    transition: opacity 0.4s;
  }

  .dev-card:hover {
    border-color: var(--border-hover);
    background: var(--surface-2);
    transform: translateY(-8px);
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.6);
  }

  .dev-card:hover::before {
    opacity: 1;
  }

  .dev-avatar-wrap {
    position: relative;
    width: 80px; height: 80px;
    margin: 0 auto 24px;
  }

  .dev-card img {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border);
    display: block;
  }

  .status-ring {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 2.5px solid var(--surface);
    background: var(--text-tertiary);
    transition: background 0.3s;
  }

  .status-ring.online {
    background: #30d158;
  }

  .status-ring.idle {
    background: #ffd60a;
  }

  .status-ring.dnd {
    background: #ff453a;
  }

  .dev-card h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
  }

  .dev-status-text {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-tertiary);
    margin-bottom: 28px;
    text-transform: capitalize;
  }

  .dev-status-text.online {
    color: #30d158;
  }

  .dev-status-text.idle {
    color: #ffd60a;
  }

  .dev-status-text.dnd {
    color: #ff453a;
  }

  .dev-socials {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .dev-social-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 16px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
  }

  .dev-social-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
  }

  .dev-social-link span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
  }

  .manifesto {
    padding: 160px 56px;
    max-width: 1100px;
    margin: 0 auto;
  }

  .manifesto-text {
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 300;
    letter-spacing: -2px;
    line-height: 1;
    color: var(--text-secondary);
  }

  .manifesto-text strong {
    color: var(--text);
    font-weight: 600;
  }

  footer {
    border-top: 1px solid var(--border);
    padding: 64px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .footer-brand-logo {
    width: 24px; height: 24px;
    object-fit: contain;
  }

  .footer-brand-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.3px;
  }

  .footer-copy {
    font-size: 12px;
    color: var(--text-tertiary);
    letter-spacing: -0.1px;
  }

  .footer-links {
    display: flex;
    gap: 24px;
  }

  .footer-links a {
    font-size: 12px;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
  }

  .footer-links a:hover {
    color: var(--text-secondary);
  }

  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  @media (max-width: 900px) {
    nav {
      padding: 0 24px;
    }

    .stats-bar {
      padding: 0 20px;
    }

    .stats-inner {
      grid-template-columns: 1fr;
    }

    .stat-item {
      border-right: none; border-bottom: 1px solid var(--border);
    }

    .stat-item:last-child {
      border-bottom: none;
    }

    .h-scroll-header {
      padding: 0 24px;
    }

    .h-scroll-track {
      padding: 0 24px;
    }

    .scroll-progress {
      padding: 0 24px;
    }

    .manifesto {
      padding: 100px 24px;
    }

    footer {
      padding: 48px 24px; flex-direction: column; gap: 24px; text-align: center;
    }

    .footer-links {
      justify-content: center;
    }

    :root {
      --card-w-project: 300px;
      --card-w-dev: 260px;
    }

    .hero h1 {
      letter-spacing: -3px;
    }
  }

  /* Documentation Specific Styles */
  .docs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 56px 80px;
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 64px;
  }

  .docs-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
  }

  .docs-nav-group {
    margin-bottom: 32px;
  }

  .docs-nav-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    margin-bottom: 16px;
  }

  .docs-nav-link {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 12px;
    transition: color 0.2s;
  }

  .docs-nav-link:hover, .docs-nav-link.active {
    color: var(--text);
  }

  .docs-content {
    max-width: 720px;
  }

  .docs-content h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 24px;
  }

  .docs-content p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 24px;
  }

  .docs-content h2 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -1px;
    margin: 48px 0 20px;
  }

  .code-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    font-family: monospace;
    font-size: 14px;
    margin: 24px 0;
    overflow-x: auto;
    color: var(--text);
  }

  @media (max-width: 900px) {
    .docs-container {
      grid-template-columns: 1fr;
      padding: 100px 24px 60px;
    }
    .docs-sidebar {
      position: static;
      margin-bottom: 48px;
    }
  }
