:root {
  --bg: #0a0a0c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.065);
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.22);
  --text-primary: #f5f5f7;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.22);
  --success: #22c55e;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max-width: 1140px;
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

code, kbd {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Ambient Glow & Subtle Dot Grid */
.ambient-glow {
  position: fixed;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  width: 920px;
  height: 480px;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.06) 45%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 12, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  font-size: 1rem;
}

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

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.cmd-trigger:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.cmd-trigger kbd {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.icon-yt {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--text-primary);
  color: #0a0a0c;
}

.btn-primary:hover {
  background: #ffffff;
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0 9px;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text-primary);
  border-radius: 2px;
}

.mobile-nav {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mobile-nav-link {
  color: var(--text-secondary);
  font-size: 0.95rem;
  padding: 6px 0;
}

.mobile-sub-btn {
  width: 100%;
  padding: 11px 16px;
  margin-top: 4px;
}

/* Hero Section */
.hero {
  position: relative;
  z-index: 1;
  padding: 88px 0 64px;
  text-align: center;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  max-width: 820px;
  margin-bottom: 20px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 15%, #93c5fd 60%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 630px;
  margin-bottom: 34px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 52px;
}

.hero-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-width: 740px;
}

.bento-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.bento-stat:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.stat-value {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.section-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #60a5fa;
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-top: 6px;
  max-width: 620px;
}

.section-desc code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.84rem;
  color: #e4e4e7;
}

/* Bento Grid & Cards */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.bento-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.bento-card:hover {
  transform: translateY(-3px);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* Video Cards */
.video-card {
  padding: 16px;
}

.video-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 18px;
  background: #121216;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}

.play-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #0a0a0c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  padding-left: 3px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease;
}

.video-card:hover .play-circle {
  transform: scale(1.08);
}

.video-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(10, 10, 12, 0.82);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.video-body {
  padding: 0 8px 6px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.73rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.tag-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-color: var(--border);
}

.card-title {
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
  line-height: 1.35;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 22px;
  flex-grow: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 500;
}

.card-action-primary {
  color: var(--text-primary);
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.card-action-primary:hover {
  color: #93c5fd;
}

.card-action-secondary {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.card-action-secondary:hover {
  color: var(--text-primary);
}

/* Blog Meta */
.blog-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Filter Tabs */
.filter-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.filter-tab {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--text-primary);
  color: #0a0a0c;
}

/* App Cards */
.app-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.app-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.app-price {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.affiliate-disclosure {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Cheatsheet / Lead Magnet */
.cheatsheet-card {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 36px;
  align-items: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.02));
}

.cheatsheet-card:hover {
  transform: none;
}

.cheatsheet-title {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.cheatsheet-desc {
  color: var(--text-secondary);
  font-size: 0.96rem;
  margin-bottom: 24px;
  max-width: 520px;
}

.cheatsheet-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.email-input {
  flex: 1 1 240px;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(10, 10, 12, 0.75);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.email-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-feedback {
  font-size: 0.88rem;
  min-height: 20px;
  margin-bottom: 4px;
}

.form-feedback.success {
  color: var(--success);
}

.form-feedback.error {
  color: #f87171;
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.shortcut-window {
  background: rgba(10, 10, 12, 0.88);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.window-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 16px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.shortcut-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shortcut-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.shortcut-row kbd {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.78rem;
  color: var(--text-primary);
}

/* Modals (Article Reader & Command Palette) */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  background: #121216;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
}

.article-modal-panel {
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.modal-close {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.modal-article-title {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin-bottom: 20px;
}

.modal-article-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 0.96rem;
}

.modal-article-body h4 {
  color: var(--text-primary);
  font-size: 1.08rem;
  font-weight: 600;
  margin-top: 8px;
}

.code-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0a0a0c;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  overflow-x: auto;
}

.code-block code {
  font-size: 0.84rem;
  color: #93c5fd;
  white-space: nowrap;
}

.copy-btn {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}

.copy-btn:hover {
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* Command Palette */
.cmd-panel {
  max-width: 580px;
  overflow: hidden;
  align-self: flex-start;
  margin-top: 10vh;
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.cmd-icon {
  color: var(--text-muted);
  font-size: 1rem;
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.98rem;
}

.cmd-results {
  max-height: 360px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: inherit;
  width: 100%;
}

.cmd-item:hover {
  background: var(--surface-hover);
}

.cmd-item-title {
  font-size: 0.9rem;
  font-weight: 500;
}

.cmd-item-type {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cmd-empty {
  padding: 20px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 32px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--text-muted);
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link:hover {
  color: var(--text-primary);
}

/* Responsive */
@media (max-width: 960px) {
  .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cheatsheet-card {
    grid-template-columns: 1fr;
    padding: 28px;
  }
}

@media (max-width: 760px) {
  .nav-links,
  .header-actions .btn,
  .cmd-trigger {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero {
    padding: 64px 0 44px;
  }

  .hero-bento,
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .filter-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .article-modal-panel {
    padding: 22px;
  }
}
