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

:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-2: #1c2128;
  --border: #30363d;
  --text: #c9d1d9;
  --text-muted: #8b949e;
  --accent: #2dd4bf;
  --accent-dim: rgba(45, 212, 191, 0.12);
  --accent-border: #0d4a44;
  --radius: 12px;
  --radius-sm: 8px;
  --brr-gold: #efb132;
  --brr-brown: #2f2013;
  --brr-sunset: #c74c2b;
  --brr-forest: #116b5a;
  --brr-cream: #fdf5e3;
}

html { scroll-behavior: smooth; }

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

/* ── Nav ─────────────────────────────────────────────────────────────── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(13, 17, 23, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
  gap: 16px;
}

.nav-brand {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
  text-decoration: none;
  display: flex;
  align-items: center;
}

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

.nav-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); }

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

.nav-right { display: flex; align-items: center; gap: 14px; position: relative; }
.nav-hamburger { display: none; background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.3rem; padding: 4px 6px; line-height: 1; }
@media (max-width: 700px) {
  .site-nav { padding: 12px 20px; }
  .nav-hamburger { display: block; }
  .nav-links { display: none; position: absolute; top: calc(100% + 8px); right: 0; min-width: 160px; flex-direction: column; align-items: flex-start; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px 16px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
  .nav-links.open { display: flex; }
  .nav-username { font-weight: 600; }
}

/* ── Sections ────────────────────────────────────────────────────────── */
section {
  padding: 80px 24px;
  max-width: 1000px;
  margin: 0 auto;
}

section + section {
  border-top: 1px solid var(--border);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* ── Hero ────────────────────────────────────────────────────────────── */
#hero {
  padding-top: 100px;
  padding-bottom: 80px;
  text-align: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 28px;
}

.hero-eyebrow::before { content: '◉'; font-size: 0.6rem; }

h1.hero-title {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 800;
  color: #f0f6fc;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  line-height: 1.1;
}

h1.hero-title span { color: var(--accent); }

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

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

.hero-stat {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 14px;
}

.hero-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 999px;
  transition: all 0.15s;
}

.hero-link-primary {
  background: var(--accent);
  color: #0d1117;
}
.hero-link-primary:hover { background: #14b8a6; }

.hero-link-ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.hero-link-ghost:hover { border-color: var(--text-muted); color: var(--text); }

/* ── Stack ───────────────────────────────────────────────────────────── */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.stack-category {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.stack-category-name {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.stack-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Services ────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.2s, transform 0.15s;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.service-icon { font-size: 1.4rem; }

.service-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f0f6fc;
}

.service-url {
  font-size: 0.75rem;
  color: var(--accent);
  text-decoration: none;
  word-break: break-all;
}

.service-url:hover { text-decoration: underline; }

.service-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

.service-port {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  align-self: flex-start;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ── Features ────────────────────────────────────────────────────────── */
.features-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}

.feature-card.open { border-color: var(--accent-border); }

.feature-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.feature-header:hover { background: var(--surface-2); }

.feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.feature-header-text { flex: 1; }

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 2px;
}

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

.feature-chevron {
  color: var(--text-muted);
  font-size: 0.8rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.feature-card.open .feature-chevron { transform: rotate(180deg); }

.feature-body {
  display: none;
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
}

.feature-card.open .feature-body { display: block; }

.feature-body-inner {
  padding-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-points h4 {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.feature-points ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.feature-points li {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-left: 14px;
  position: relative;
  line-height: 1.5;
}

.feature-points li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.7rem;
  top: 3px;
}

.feature-code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: #a5d6ff;
  line-height: 1.7;
  white-space: pre;
  overflow-x: auto;
}

.feature-code .cmt { color: #8b949e; }
.feature-code .kw  { color: #ff7b72; }
.feature-code .str { color: #a5d6ff; }
.feature-code .fn  { color: #d2a8ff; }
.feature-code .num { color: #79c0ff; }

@media (max-width: 640px) {
  .feature-body-inner { grid-template-columns: 1fr; }
}

/* ── Architecture ────────────────────────────────────────────────────── */
.arch-diagram {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  overflow-x: auto;
}

.arch-layer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.arch-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 90px;
  text-align: right;
}

.arch-arrow {
  color: var(--border);
  font-size: 1rem;
  flex-shrink: 0;
}

.arch-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.arch-box {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  white-space: nowrap;
}

.arch-box-teal  { color: var(--accent); border-color: var(--accent-border); background: var(--accent-dim); }
.arch-box-blue  { color: #79c0ff; border-color: #1a3050; background: rgba(121,192,255,0.08); }
.arch-box-purple{ color: #d2a8ff; border-color: #3a2060; background: rgba(210,168,255,0.08); }
.arch-box-orange{ color: #ffa657; border-color: #402010; background: rgba(255,166,87,0.08); }
.arch-box-gray  { color: var(--text-muted); border-color: var(--border); background: var(--bg); }

.arch-divider {
  border: none;
  border-top: 1px dashed var(--border);
  margin: 20px 0;
}

.arch-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 20px;
  line-height: 1.6;
}

/* ── Deployment ──────────────────────────────────────────────────────── */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.deploy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.deploy-card-icon { font-size: 1.3rem; margin-bottom: 10px; }

.deploy-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f0f6fc;
  margin-bottom: 6px;
}

.deploy-card-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-nav { padding: 12px 16px; }
  section { padding: 56px 16px; }
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .deploy-grid { grid-template-columns: 1fr; }
  .arch-label { min-width: 60px; font-size: 0.62rem; }
  .hero-stats { gap: 8px; }
}

/* ── Mini radio player ───────────────────────────────────────────────────── */
.radio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--text-muted, var(--muted, #888));
  transition: border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.radio-pill:hover { border-color: var(--accent); color: var(--text); }
.radio-pill.playing { border-color: var(--accent); color: var(--accent); }
.radio-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.3s;
}
.radio-pill.playing .radio-pill-dot {
  background: var(--accent);
  animation: pill-pulse 1.8s ease-in-out infinite;
}
@keyframes pill-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

@media (max-width: 400px) {
  .stack-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
}
