:root {
  --bg: #09090e;
  --surface: #0f0f17;
  --card: #13131c;
  --raised: #191926;
  --border: #222233;
  --accent: #e8ff47;
  --purple: #7c6bff;
  --teal: #00e5c0;
  --text: #eeeeff;
  --muted: #50506a;
  --danger: #ff4757;
  --r: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 999;
  opacity: 0.4;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(9, 9, 14, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(34, 34, 51, 0.5);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-family: "Syne", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  background: var(--accent) !important;
  color: var(--bg) !important;
  padding: 0.5rem 1.25rem;
  border-radius: var(--r);
  font-weight: 700 !important;
  font-size: 0.875rem !important;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem clamp(1.5rem, 5vw, 4rem);
  flex-direction: column;
  gap: 1rem;
  z-index: 99;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu a:hover {
  color: var(--text);
}

/* PAGE HEADER */
.page-header {
  padding-top: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.page-header-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem clamp(1.5rem, 5vw, 2rem) 3rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  color: var(--border);
}

.page-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 229, 192, 0.08);
  border: 1px solid rgba(0, 229, 192, 0.2);
  border-radius: 100px;
  padding: 5px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1rem;
}

.page-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1rem;
}

.page-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.page-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.page-meta-item svg {
  width: 14px;
  height: 14px;
}

/* LAYOUT */
.doc-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem clamp(1.5rem, 5vw, 2rem) 5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  align-items: start;
}

/* TOC */
.toc {
  position: sticky;
  top: 90px;
}

.toc-title {
  font-family: "Syne", sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-list a {
  display: block;
  padding: 6px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all 0.2s;
  line-height: 1.4;
}

.toc-list a:hover {
  color: var(--text);
  background: var(--surface);
  border-left-color: var(--border);
}

.toc-list a.active {
  color: var(--accent);
  background: rgba(232, 255, 71, 0.06);
  border-left-color: var(--accent);
}

/* DOC CONTENT */
.doc-content {
  min-width: 0;
}

.doc-section {
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border);
}

.doc-section:last-child {
  border-bottom: none;
}

.doc-section-num {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.doc-h2 {
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.doc-h3 {
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
}

.doc-p {
  color: #b0b0cc;
  font-size: 0.93rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.doc-p:last-child {
  margin-bottom: 0;
}

.doc-ul {
  list-style: none;
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #b0b0cc;
  font-size: 0.93rem;
  line-height: 1.7;
}

.doc-ul li::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}

.doc-ol {
  list-style: none;
  counter-reset: doc-counter;
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.doc-ol li {
  counter-increment: doc-counter;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #b0b0cc;
  font-size: 0.93rem;
  line-height: 1.7;
}

.doc-ol li::before {
  content: counter(doc-counter);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  background: rgba(124, 107, 255, 0.12);
  border: 1px solid rgba(124, 107, 255, 0.2);
  border-radius: 50%;
  color: var(--purple);
  font-size: 0.72rem;
  font-weight: 700;
  margin-top: 2px;
}

.highlight-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.highlight-box.purple {
  border-left-color: var(--purple);
}

.highlight-box.accent {
  border-left-color: var(--accent);
}

.highlight-box.danger {
  border-left-color: var(--danger);
}

.highlight-box p {
  color: #b0b0cc;
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0;
}

.highlight-box strong {
  color: var(--text);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--r);
  overflow: hidden;
  margin: 1.25rem 0;
}

.info-cell {
  background: var(--card);
  padding: 1rem 1.25rem;
}

.info-cell-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.info-cell-val {
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

.tag {
  display: inline-flex;
  align-items: center;
  background: rgba(232, 255, 71, 0.08);
  border: 1px solid rgba(232, 255, 71, 0.15);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  font-family: "Syne", monospace;
}

.tag.purple {
  background: rgba(124, 107, 255, 0.08);
  border-color: rgba(124, 107, 255, 0.2);
  color: var(--purple);
}

.tag.teal {
  background: rgba(0, 229, 192, 0.08);
  border-color: rgba(0, 229, 192, 0.2);
  color: var(--teal);
}

.contact-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.contact-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-item svg {
  width: 16px;
  height: 16px;
  color: var(--teal);
  flex-shrink: 0;
}

.contact-label {
  color: var(--muted);
  min-width: 80px;
  font-size: 0.78rem;
}

.contact-val {
  color: var(--text);
}

.contact-val a {
  color: var(--accent);
  text-decoration: none;
}

.contact-val a:hover {
  text-decoration: underline;
}

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem clamp(1.5rem, 5vw, 4rem);
}

.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  color: var(--muted);
  font-size: 0.8rem;
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--text);
}

/* RESPONSIVE */
@media (max-width: 860px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .toc {
    position: static;
  }

  .nav-links {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }
}
