/* -----------------------------------------------------------
   Improved Dark Theme — Higher Contrast, More Legible
   ----------------------------------------------------------- */

:root {
  --bg-color: #14171f;          /* lighter than #0b0c10 */
  --bg-alt: #1b1f2a;
  --card-bg: #1f2430;
  --accent: #5ec8ff;            /* brighter, more readable */
  --accent-soft: #2d3b4d;
  --text-main: #f0f0f0;         /* brighter text */
  --text-muted: #b5bdc9;
  --border-subtle: #2e3440;
  --danger: #ff6b6b;
  --success: #8be09f;
  --warning: #ffcc80;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Reset & Base ------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Navigation -------------------------------------------------- */

header {
  background: #1a1d26;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.navbar-brand span.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #5ec8ff, #2a7bbd);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.navbar-menu {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.navbar-menu a {
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  color: var(--text-muted);
  transition: 0.15s ease;
}

.navbar-menu a:hover {
  background: var(--accent-soft);
  color: var(--text-main);
}

.navbar-menu a.active {
  background: rgba(94, 200, 255, 0.18);
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* Layout ------------------------------------------------------ */

.page-wrapper {
  max-width: 1200px;
  margin: 1.5rem auto 2.5rem;
  padding: 0 1.5rem;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.breadcrumb span.separator {
  margin: 0 0.35rem;
  color: #6c7480;
}

/* Headers ----------------------------------------------------- */

.page-header h1 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
}

.page-header p.subtitle {
  margin: 0.4rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

/* Cards ------------------------------------------------------- */

.card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.35);
}

.card-header h3 {
  margin: 0;
  font-size: 1.15rem;
}

/* Typography -------------------------------------------------- */

.section-title {
  margin: 2rem 0 1rem;
  font-size: 1.35rem;
  font-weight: 600;
}

.section-title .kicker {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.code-inline {
  background: #2a2f3a;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

/* Tables ------------------------------------------------------ */

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.table th {
  background: #1b1f2a;
  color: var(--text-muted);
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--border-subtle);
}

.table tr:nth-child(even) td {
  background: #181c25;
}

/* Images ------------------------------------------------------ */

.img-frame {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: #1b1f2a;
  margin: 1rem 0;
}

.img-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
}

/* Footer ------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  background: #1a1d26;
}

/* Responsive -------------------------------------------------- */

@media (max-width: 720px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

/* Image Size Adjustment---------------------------------------- */

/* Image sizing adjustments for index visuals */
.img-frame img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Optional: limit very wide hero images */
.index-hero img {
  max-width: 800px;
  width: 90%;
  margin: 0 auto;
  display: block;
}

/* Generic badge styling */
.badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #ffffff;
  background-color: #3a6ea5; /* matches your site's blue accents */
  border-radius: 4px;
  line-height: 1.2;
}

/* Rounded pill variant */
.badge-pill {
  border-radius: 999px;
  padding: 2px 10px;
}
