/* 🌙 RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #0b0f1a;
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

/* 🌈 CONTAINER */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding: 2rem 0 4rem;
}
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

/* 🔶 COLOR VARIABLES */
:root {
  --accent: #ff6b00;
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.8);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --border: rgba(255, 255, 255, 0.08);
}

/* 🧭 HEADER */
.site-header {
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 1rem 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}
.brand .dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6b00 0%, #ff3d00 80%);
  box-shadow: 0 0 15px #ff6b00;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 1rem;
}
.top-nav a {
  color: var(--text-muted);
  text-decoration: none;
  position: relative;
  transition: color 0.3s;
}
.top-nav a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.top-nav a:hover {
  color: var(--accent);
}
.top-nav a:hover::after {
  width: 100%;
}

/* 📚 SIDEBAR */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.sidebar-card,
.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.toc {
  list-style: none;
  font-size: 1rem;
}
.toc li + li {
  margin-top: 0.5rem;
}
.toc a {
  color: var(--text-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  padding-left: 0.5rem;
  transition: all 0.25s;
}
.toc a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}
.tip-title {
  color: var(--accent);
  font-size: 0.95rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  font-weight: 600;
}
.tip-list {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.tip-list li + li {
  margin-top: 0.4rem;
}

/* 🧾 CARD CONTENT */
.content {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9);
}
.card-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.8rem;
  letter-spacing: -0.02em;
}
.sub-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent);
  margin: 1rem 0 0.5rem;
}
.desc {
  color: var(--text);
  font-size: 1rem;
  margin-bottom: 1rem;
}
.note {
  background: rgba(255, 107, 0, 0.1);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
  padding: 0.9rem 1.2rem;
  color: #fbbf24;
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* 💻 CODE BLOCKS */
.code-block {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 1.25rem 1rem;
  font-size: 0.95rem;
  color: #f1f5f9;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Fira Code", monospace;
  line-height: 1.6;
  box-shadow: inset 0 0 25px rgba(255, 107, 0, 0.15);
}
.code-block::-webkit-scrollbar {
  height: 6px;
}
.code-block::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 999px;
}
.code-block code .kw {
  color: #ff6b00;
  font-weight: 600;
}
.code-block code .fn {
  color: #facc15;
}
.code-block code .str {
  color: #fcd34d;
}
.code-block code .comment {
  color: #64748b;
  font-style: italic;
}

/* 🦶 FOOTER */
.footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.95rem;
  color: var(--text-muted);
}
.footer .small {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.25rem;
}

/* 📱 MOBILE */
@media (max-width: 600px) {
  body {
    font-size: 16px;
  }
  .card-title {
    font-size: 1.2rem;
  }
  .desc,
  .note {
    font-size: 0.9rem;
  }
  .code-block {
    font-size: 0.85rem;
  }
}
