:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.14);
  --accent: #0071e3;
  --accent-ink: #ffffff;
  --ok: #1fa95b;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.05), 0 18px 40px rgba(0, 0, 0, 0.1);
  --radius: 24px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #111113;
  --surface-2: #17171a;
  --text: #f5f5f7;
  --muted: #98989f;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);
  --accent: #2997ff;
  --accent-ink: #000000;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.5), 0 18px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s, color 0.3s;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { font-weight: 650; letter-spacing: -0.03em; font-size: 1.05rem; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a { padding: 6px 12px; border-radius: 999px; font-size: 0.875rem; color: var(--muted); transition: color 0.2s, background 0.2s; }
.nav-links a:hover { color: var(--text); background: var(--surface); }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--surface); transition: transform 0.2s, border-color 0.2s;
}
.icon-btn:hover { border-color: var(--border-strong); transform: scale(1.05); }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }

/* Hero */
.hero { padding: clamp(72px, 14vw, 150px) 0 clamp(56px, 9vw, 96px); text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 12px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-size: 0.8125rem; font-weight: 500; color: var(--muted); box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31, 169, 91, 0.5); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(31, 169, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 169, 91, 0); } }
h1 {
  margin: 28px auto 0; max-width: 14ch; font-size: clamp(2.8rem, 8.5vw, 5.75rem);
  line-height: 1.02; letter-spacing: -0.045em; font-weight: 700;
}
h1 .soft { color: var(--muted); }
.lede { margin: 26px auto 0; max-width: 56ch; font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--muted); letter-spacing: -0.02em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 38px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 24px; border-radius: 999px;
  font-weight: 550; font-size: 0.97rem; border: 1px solid transparent; transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn-ghost { background: var(--surface); border-color: var(--border-strong); }
.btn-ghost:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.meta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 44px; }
.tag { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); font-size: 0.78rem; color: var(--muted); background: var(--surface-2); }

/* Sections */
section { padding: clamp(48px, 8vw, 88px) 0; }
.eyebrow { font-size: 0.8125rem; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
h2 { margin-top: 10px; font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -0.04em; line-height: 1.07; font-weight: 700; max-width: 18ch; }
.sec-sub { margin-top: 14px; color: var(--muted); max-width: 52ch; font-size: 1.05rem; }

/* Bento */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 48px; }
.card {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 32px; min-height: 280px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.35s, border-color 0.35s;
}
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.c-ypp { grid-column: span 4; background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.c-fpv, .c-lab { grid-column: span 2; }
.c-content { grid-column: span 4; }
.c-ypp { min-height: 340px; }
.card h3 { font-size: 1.6rem; letter-spacing: -0.035em; line-height: 1.12; font-weight: 650; }
.c-ypp h3 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); }
.card p { margin-top: 10px; color: var(--muted); max-width: 46ch; }
.card .top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.badge.accent { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.arrow { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border); transition: background 0.25s, color 0.25s, transform 0.25s; }
.arrow svg { width: 16px; height: 16px; }
a.card:hover .arrow { background: var(--text); color: var(--bg); transform: rotate(-45deg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 5px 12px; border-radius: 999px; font-size: 0.8rem; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.glyph { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--text); color: var(--bg); }
.glyph svg { width: 22px; height: 22px; }
.stats { display: flex; gap: 32px; flex-wrap: wrap; }
.stat b { display: block; font-size: 1.9rem; letter-spacing: -0.04em; line-height: 1; }
.stat span { font-size: 0.8rem; color: var(--muted); }
.platforms { display: flex; flex-wrap: wrap; gap: 8px; }

/* Links hub */
.stack { display: grid; gap: 12px; margin-top: 40px; max-width: 560px; }
.stack.center { margin-inline: auto; }
.link-card {
  display: flex; align-items: center; gap: 16px; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}
.link-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: var(--shadow-hover); border-color: var(--border-strong); }
.link-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; }
.link-ico svg { width: 22px; height: 22px; }
.link-body { flex: 1; min-width: 0; }
.link-body b { display: block; font-weight: 600; letter-spacing: -0.02em; }
.link-body span { font-size: 0.85rem; color: var(--muted); }
.link-go { color: var(--muted); width: 18px; height: 18px; flex: none; }
.i-yt { background: #ff0033; } .i-tw { background: #9146ff; } .i-tt { background: #111; } .i-kick { background: #53fc18; color: #000; }
.i-gh { background: #24292f; } .i-ypp { background: linear-gradient(135deg, #0071e3, #5e5ce6); }
:root[data-theme="dark"] .i-tt { background: #25252a; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 48px 0 56px; margin-top: 40px; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h4 { font-size: 0.8rem; font-weight: 600; margin-bottom: 12px; }
.foot a { display: block; color: var(--muted); font-size: 0.9rem; padding: 3px 0; transition: color 0.2s; }
.foot a:hover { color: var(--text); }
.foot p { color: var(--muted); font-size: 0.9rem; max-width: 34ch; margin-top: 8px; }
.copy { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.8rem; }

/* Links page */
.profile { text-align: center; padding: 64px 0 8px; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 2.2rem; font-weight: 700; letter-spacing: -0.04em; background: var(--text); color: var(--bg);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border-strong);
}
.profile h1 { font-size: 2rem; margin: 0; max-width: none; letter-spacing: -0.04em; }
.profile p { color: var(--muted); margin-top: 6px; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .bento { grid-template-columns: 1fr; }
  .c-ypp, .c-fpv, .c-lab, .c-content, .c-side { grid-column: auto; min-height: 0; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot > :first-child { grid-column: 1 / -1; }
  .nav-links .hide-sm { display: none; }
}
@media (max-width: 480px) { .card { padding: 24px; } .btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
