/* 
 * ─── DESIGN SYSTEM ───
 * VonCMS "Rebel" Aesthetics - Manifesto Edition
 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #161616;
  --border: rgba(255,255,255,0.07);
  --green-accent: #7CFC00;
  --accent-dim: rgba(124,252,0,0.12);
  --accent-glow: rgba(124,252,0,0.25);
  --text: #f0ede8;
  --muted: #888;
  --muted2: #6b6762;
  --red: #e05252;
  --nav-height: 70px;
  --sidebar-width: 320px;
}

html { 
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

/* CUSTOM SCROLLBAR */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted2); }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* NOISE & GRID BACKGROUND */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(124,252,0,0.03) 0%, transparent 50%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: .4;
}

/* ─── NAVIGATION ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 3rem;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: rgba(8,8,8,0.8);
  backdrop-filter: blur(20px);
}
.nav-logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  transition: transform .2s ease;
}
.nav-logo:hover { transform: scale(1.02); }
.nav-logo span {
  width: 10px; height: 10px;
  background: var(--green-accent);
  border-radius: 50%;
  box-shadow: 0 0 15px var(--accent-glow);
}

/* ─── DOCS LAYOUT ─── */
.layout {
  max-width: 1300px;
  margin: var(--nav-height) auto 0;
  display: flex;
  justify-content: center;
  position: relative;
}

/* ─── SIDEBAR ─── */
aside {
  width: var(--sidebar-width);
  padding: 2rem 2rem;
  border-right: 1px solid var(--border);
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted2);
  font-weight: 700;
}
.sidebar-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.sidebar-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  border-left: 2px solid transparent;
  font-family: 'JetBrains Mono', monospace;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-links a:hover {
  color: var(--text);
  background: var(--bg2);
  border-left-color: var(--green-accent);
}
.sidebar-links a.active {
  color: var(--green-accent);
  background: var(--accent-dim);
  border-left-color: var(--green-accent);
}
.sidebar-links a.active::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--green-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-accent);
  flex-shrink: 0;
}

/* ─── MAIN CONTENT ─── */
main {
  flex: 1;
  padding: 1.5rem 4rem 4rem;
  max-width: 900px;
}

/* ─── HERO ─── */
.hero {
  margin-bottom: 2rem;
  position: relative;
}
.hero-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-dim);
  border: 1px solid var(--green-accent);
  color: var(--green-accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 4px;
}
.hero h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: clamp(3rem, 5vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}
.hero h1 em {
  color: var(--green-accent);
  font-style: italic;
}
.hero p.lead {
  font-size: 1.4rem;
  color: #a09b95;
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 3rem;
}

/* ─── TYPOGRAPHY & SECTIONS ─── */
section {
  margin-bottom: 1rem;
  scroll-margin-top: 100px;
  animation: fadeIn 0.8s ease backwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 2.4rem;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text);
}
h2::before {
  content: '';
  display: block;
  width: 40px; height: 3px;
  background: var(--green-accent);
  border-radius: 2px;
}
h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 1.5rem 0 1rem;
  color: var(--text);
}
p {
  margin-bottom: 1.75rem;
  color: #a09b95;
  font-size: 1.15rem;
}
p strong { color: var(--text); font-weight: 600; }

/* ─── BLOCKS & CARDS ─── */
.quote-block {
  position: relative;
  padding: 2.5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green-accent);
  border-radius: 0 12px 12px 0;
  margin: 2rem 0;
}
.quote-block blockquote {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--green-accent);
  line-height: 1.6;
  font-style: italic;
}
.quote-block cite {
  display: block;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--green-accent);
  background: var(--bg3);
  transform: translateY(-5px);
}
.card h4 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card p {
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.6;
}

.tech-spec {
  background: #000;
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin: 2rem 0;
}
.tech-spec header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
  color: var(--muted);
}
.tech-line {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.tech-label { color: var(--green-accent); min-width: 140px; }
.tech-val { color: var(--muted); }

/* ─── SECTION SPACING ─── */
main section {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

/* ─── LIGHTBOX (IMAGE ZOOM) ─── */
#lightbox {
  position: fixed; z-index: 20000; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9); display: none; align-items: center; justify-content: center;
  cursor: zoom-out; backdrop-filter: blur(10px);
}
#lightbox.active { display: flex; }
#lightbox img { max-width: 90%; max-height: 85%; border-radius: 8px; box-shadow: 0 0 50px rgba(0,0,0,0.5); }
.lightbox-close {
  position: absolute; top: 2rem; right: 2rem; font-size: 2.5rem; color: #fff; cursor: pointer;
}

/* ─── ENGAGEMENT TOAST ─── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 380px;
  background: rgba(15, 15, 15, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  z-index: 10001;
  max-width: calc(100vw - 2rem);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform: translateY(150%) scale(0.9);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  opacity: 0;
  pointer-events: none;
}
.toast.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}
.toast-x-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  font-size: 1.5rem;
  color: var(--muted2);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.toast-x-close:hover { color: var(--text); }
.toast-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast-title span {
  width: 8px;
  height: 8px;
  background: var(--green-accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--green-accent);
}
.toast-desc {
  font-size: 0.9rem;
  color: #a09b95;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.toast-actions {
  display: flex;
  gap: 0.75rem;
}
.toast-btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.toast-btn-primary {
  background: var(--green-accent);
  color: #000;
}
.toast-btn-primary:hover {
  background: #fff;
  transform: translateY(-2px);
}
.toast-btn-secondary {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid var(--border);
}
.toast-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
}

@media (max-width: 480px) {
  .toast {
    width: auto;
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    padding: 1.25rem;
  }
}

/* ─── FOOTER ─── */
/* ─── FOOTER ─── */
footer {
  margin-top: 2rem;
  padding: 3rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}
.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--text);
  display: flex;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}
.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-right {
  font-size: .7rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  opacity: 0.8;
}

/* ─── LIGHTBOX (GLOBAL) ─── */
#lightbox {
  position: fixed;
  z-index: 2000;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
  cursor: zoom-out;
}
#lightbox.active { opacity: 1; pointer-events: auto; }
#lightbox img {
  max-width: 90%; max-height: 85vh;
  box-shadow: 0 0 50px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-radius: 4px;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: default;
}
#lightbox.active img { transform: scale(1); }
.lightbox-close {
  position: absolute; top: 2rem; right: 2rem;
  color: #fff; font-size: 3rem; cursor: pointer;
  line-height: 1; opacity: 0.5; transition: opacity 0.2s;
  font-family: serif;
}
.lightbox-close:hover { opacity: 1; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1100px) {
  aside { width: 240px; }
  main { padding: 4rem 3rem; }
}
@media (max-width: 850px) {
  aside { display: none; }
  nav { padding: 0 1.5rem; }
  main { padding: 4rem 1.5rem; width: 100%; }
  .hero { text-align: center; }
  .hero p.lead { margin-left: auto; margin-right: auto; }
  .hero h1 { font-size: 3rem; }
  footer { flex-direction: column; text-align: center; gap: 1.5rem; }
  .footer-links { justify-content: center; flex-wrap: wrap; gap: 1rem; }
}
