@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #09090b;
  --bg-subtle: #0f0f13;
  --surface: rgba(255,255,255,0.03);
  --surface-hover: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --text: #fafafa;
  --text-secondary: #d4d4d8;
  --muted: #a1a1aa;
  --accent-1: #5C60EF;
  --accent-dark: #4B4FD9;
  --accent-glow: rgba(92,96,239,0.15);
  --warning-bg: rgba(234,179,8,0.08);
  --warning-border: rgba(234,179,8,0.25);
  --warning-text: #fbbf24;
  --terminal-bg: #0c0c0e;
  --terminal-border: rgba(255,255,255,0.08);
  --mono: 'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

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

html { scroll-behavior: smooth; scroll-snap-type: y proximity; scroll-padding-top: 4rem; }

section { scroll-snap-align: start; min-height: 100svh; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-1); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-1); }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,11,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  font-family: var(--mono);
}

.logo-m, .logo-re {
  color: var(--accent-1);
  text-decoration: underline;
  text-decoration-color: var(--accent-1);
  text-underline-offset: 4px;
}

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 6rem 2rem 3rem;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-1);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(150deg, #7B7FF5, #4B4FD9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(150deg, var(--accent-1), var(--accent-dark));
  color: white;
  border: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(92,96,239,0.25);
  color: white;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

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

/* ── Sections ── */
.section {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  max-width: 1200px;
  margin: 0 auto;
}

/* ── Workflow Steps ── */
.workflow-steps {
  display: flex;
  flex-direction: column;
  max-width: 680px;
  margin: 0 auto;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.workflow-step:last-child {
  border-bottom: none;
}

.step-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.step-num {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}

.step-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.workflow-step > p,
.workflow-step > .app-mock {
  padding-left: 1.5rem;
}

.workflow-step > p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.7;
}

.step-header h3 code,
.workflow-step > p code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: var(--accent-1);
}

/* ── App Mockup ── */
.app-mock {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 160px 1fr;
  font-size: 0.8rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  margin-top: 6px;
}

.app-sidebar {
  background: #161b22;
  border-right: 1px solid #30363d;
  padding: 6px 0;
}

.app-sidebar .hdr {
  padding: 4px 10px 6px;
  color: #8b949e;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  font-family: var(--mono);
}

.app-sidebar .file {
  padding: 4px 10px;
  color: #8b949e;
  font-family: var(--mono);
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}

.app-sidebar .file.active {
  background: rgba(88,166,255,0.08);
  color: #c9d1d9;
}

.app-sidebar .file .badge-count {
  margin-left: auto;
  background: #cf222e;
  color: white;
  font-size: 0.62rem;
  padding: 0 4px;
  border-radius: 8px;
  font-weight: 600;
  line-height: 16px;
}

.app-content {
  padding: 6px 0;
  font-family: var(--mono);
  overflow-x: auto;
}

.app-content .toolbar {
  display: flex;
  gap: 2px;
  padding: 2px 8px 6px;
  border-bottom: 1px solid #30363d;
  margin-bottom: 2px;
}

.app-content .tab {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  color: #8b949e;
  cursor: default;
}

.app-content .tab.active {
  background: #0d1117;
  color: #c9d1d9;
}

.code-line {
  padding: 1.5px 8px;
  display: flex;
  gap: 10px;
  white-space: pre;
}

.code-line .ln {
  color: #30363d;
  min-width: 16px;
  text-align: right;
  user-select: none;
}

.code-line .code { color: #8b949e; }
.code-line .kw { color: #ff7b72; }
.code-line .fn { color: #d2a8ff; }
.code-line .str { color: #a5d6ff; }
.code-line.highlighted { background: rgba(88,166,255,0.06); }

.comment-bubble {
  margin: 4px 8px 6px 8px;
  background: rgba(99,102,241,0.18);
  border: 1px solid rgba(99,102,241,0.5);
  border-left: 4px solid #818cf8;
  border-radius: 6px;
  padding: 8px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  box-shadow: 0 0 12px rgba(99,102,241,0.12);
}

.comment-bubble .comment-header {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

.comment-bubble .comment-author {
  font-weight: 700;
  color: #c7d2fe;
  font-size: 0.7rem;
}

.comment-bubble .comment-type {
  font-size: 0.62rem;
  padding: 1px 5px;
  border-radius: 10px;
  font-weight: 600;
}

.comment-bubble .comment-type.issue {
  background: rgba(248,81,73,0.2);
  color: #fca5a5;
  border: 1px solid rgba(248,81,73,0.4);
}

.comment-bubble .comment-text {
  color: #e2e8f0;
  line-height: 1.5;
  font-weight: 500;
}

/* ── Install Section ── */
.install-steps {
  max-width: 680px;
  margin: 0 auto;
}

.install-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.install-step:last-child { border-bottom: none; }

.install-step-hdr {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.install-step-hdr h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.install-step-desc {
  font-size: 0.87rem;
  color: var(--muted);
  padding-left: 1.5rem;
}

.install-step .install-tabs {
  padding-left: 1.5rem;
}

.install-step .install-code {
  margin-left: 1.5rem;
}

.install-code {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
  position: relative;
}

/* ── Copy button ── */
.copy-btn {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-family: var(--mono);
  padding: 1px 7px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.8;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

.copy-btn.copied {
  color: var(--accent-1);
  border-color: rgba(92,96,239,0.3);
  background: rgba(92,96,239,0.06);
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
}

.script-note {
  font-size: 0.75rem;
  color: var(--warning-text);
}

.install-step .script-block {
  padding: 0.75rem;
  gap: 0.4rem;
}

.install-tabs {
  max-width: 560px;
  margin: 0 auto;
}

.install-step .install-tabs {
  max-width: none;
  margin: 0;
}

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
  gap: 0;
}

.tab-btn {
  padding: 0.6rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

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

.tab-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent-1);
}

.tab-panel { display: flex; flex-direction: column; gap: 1rem; }
.tab-panel.hidden { display: none; }

.download-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.download-platform {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.download-arch {
  font-size: 0.82rem;
  color: var(--muted);
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  background: linear-gradient(150deg, var(--accent-1), var(--accent-dark));
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.btn-download:hover { transform: translateY(-1px); color: white; }
.btn-download.loading { opacity: 0.6; pointer-events: none; }

.other-platforms {
  font-size: 0.8rem;
  color: var(--muted);
}

.script-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.script-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.script-label .copy-btn {
  position: static;
  text-transform: none;
  letter-spacing: 0;
}

.script-block pre {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.script-block code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}


/* ── Warning Box ── */
.warning-box {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--warning-border);
  background: var(--warning-bg);
  text-align: left;
}

.warning-box .warning-icon { font-size: 1.1rem; flex-shrink: 0; line-height: 1.5; }

.warning-box p {
  color: var(--warning-text);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* ── Skills / Code blocks ── */
.skills-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.skills-block pre {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

.skills-block code {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.skills-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.skills-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skills-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.skills-table td:first-child {
  font-family: var(--mono);
  color: var(--accent-1);
  font-weight: 500;
  white-space: nowrap;
}

.skills-table td:last-child { color: var(--text-secondary); }

/* ── Update Section ── */
.update-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.update-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}

.update-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.update-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.update-card pre {
  background: var(--terminal-bg);
  border: 1px solid var(--terminal-border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.update-card code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ── Footer ── */
footer {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  font-size: 0.85rem;
  scroll-snap-align: start;
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
}

footer .footer-links a { color: var(--muted); font-weight: 500; }
footer .footer-links a:hover { color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero { padding: 4rem 1.5rem 2rem; }
  .nav-inner { padding: 1rem 1.5rem; }
  .app-mock { grid-template-columns: 1fr; }
  .app-sidebar { display: none; }
  .update-grid { grid-template-columns: 1fr; }
  .section, .section-wide { padding: 3rem 1.5rem; }
}

/* ── Scroll Reveal ── */
.reveal {
  transform: translateY(36px) scale(0.97);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transform: none; transition: none; }
}
