:root {
  --dubbeh-bg: #070914;
  --dubbeh-bg-soft: #0d1220;
  --dubbeh-panel: rgba(18, 24, 39, 0.78);
  --dubbeh-panel-strong: rgba(22, 30, 49, 0.92);
  --dubbeh-border: rgba(148, 163, 184, 0.18);
  --dubbeh-border-strong: rgba(125, 92, 255, 0.42);

  --dubbeh-text: #e5e7eb;
  --dubbeh-muted: #9ca3af;
  --dubbeh-faint: #64748b;

  --dubbeh-purple: #8b5cf6;
  --dubbeh-purple-strong: #a855f7;
  --dubbeh-cyan: #22d3ee;
  --dubbeh-blue: #38bdf8;
  --dubbeh-green: #34d399;

  --dubbeh-radius: 18px;
  --dubbeh-radius-sm: 12px;
  --dubbeh-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --dubbeh-glow: 0 0 32px rgba(139, 92, 246, 0.18);
}

html {
  background: #070914;
  color: var(--dubbeh-text);
}

body {
  min-height: 100vh;
  background: #070914;
  color: var(--dubbeh-text);
}

body::before {
  background: #070914;
  content: '';
  inset: 0;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}

#page-wrapper,
#body-wrapper,
#start,
.modular-row,
.section {
  background: transparent !important;
}

#page-wrapper {
  background: transparent;
  min-height: 100vh;
}

/* Quark/Spectre base overrides */
#body-wrapper,
#start,
.modular-row,
.section {
  background: transparent;
}

.header-dark #header,
#header {
  background: rgba(7, 9, 20, 0.92);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  backdrop-filter: blur(16px);
  box-shadow: none;
}

#header a,
#header .navbar-section a,
#header .navbar-brand {
  color: var(--dubbeh-text);
}

#header .navbar-brand,
.logo h3,
.logo a {
  text-transform: lowercase;
  letter-spacing: -0.035em;
  font-weight: 800;
}

#header a:hover,
#header .active > a,
.dropmenu ul li a.active,
.dropmenu ul li a:focus,
.dropmenu ul li a:hover {
  color: var(--dubbeh-cyan);
}

#header .navbar-brand {
  align-items: center;
  display: inline-flex;
  min-height: 2.2rem;
  text-decoration: none;
}

.dubbeh-wordmark {
  color: #f8fafc;
  display: inline-block;
  font-size: 1.05rem;
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
  text-transform: lowercase;
}

.dubbeh-wordmark::after {
  background: linear-gradient(90deg, var(--dubbeh-purple), var(--dubbeh-cyan));
  border-radius: 999px;
  content: '';
  display: block;
  height: 2px;
  margin-top: 0.22rem;
  opacity: 0.9;
  width: 100%;
}

#header .navbar-brand:hover .dubbeh-wordmark {
  color: #ffffff;
}

/* Main page shell */
#body,
.container {
  color: var(--dubbeh-text);
}

#body {
  padding-top: 2rem;
}

#body .content,
.blog-list,
.blog-post,
.page-content,
.default-content {
  max-width: 1080px;
}

/* Main content glass panel */
#body .content,
.blog-post,
.blog-list,
section.blog-list,
article.content {
  background: var(--dubbeh-panel);
  border: 1px solid var(--dubbeh-border);
  border-radius: var(--dubbeh-radius);
  box-shadow: var(--dubbeh-shadow), var(--dubbeh-glow);
  backdrop-filter: blur(18px);
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

/* Standard Grav pages should match the blog/dRadio-styled panels.
   Containers that already contain blog wrappers are excluded to avoid duplicate outer panels. */
#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)),
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)),
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) {
  background: var(--dubbeh-panel);
  border: 1px solid var(--dubbeh-border);
  border-radius: var(--dubbeh-radius);
  box-shadow: var(--dubbeh-shadow), var(--dubbeh-glow);
  backdrop-filter: blur(18px);
  color: var(--dubbeh-text);
  max-width: 1080px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
}

/* Prevent the standard page panel from sticking to the header. */
#body-wrapper:has(> .container:not(:has(.blog-list)):not(:has(.blog-post))),
#body-wrapper:has(> section.container:not(:has(.blog-list)):not(:has(.blog-post))) {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

/* If a standard page template renders its own .content wrapper, let the outer panel own the card chrome. */
#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)) > .content,
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)) > .content,
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) > .content {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 0;
}

/* Keep standard page typography aligned with the blog styling. */
#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)) h1,
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)) h1,
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) h1 {
  color: #f8fafc;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}

#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)) h2,
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)) h2,
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) h2 {
  color: #f8fafc;
  margin-top: 2rem;
}

#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)) p,
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)) p,
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) p,
#body-wrapper > .container:not(:has(.blog-list)):not(:has(.blog-post)) li,
#body-wrapper > section.container:not(:has(.blog-list)):not(:has(.blog-post)) li,
main > .container:not(:has(.blog-list)):not(:has(.blog-post)) li {
  color: var(--dubbeh-text);
}

/* Avoid double-card feeling for list contents */
.blog-list article.blog-card {
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.76), rgba(15, 23, 42, 0.78));
  border: 1px solid var(--dubbeh-border);
  border-radius: var(--dubbeh-radius);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.26);
  padding: 1.15rem 1.25rem;
  margin: 0 0 1rem;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.blog-list article.blog-card:hover {
  transform: translateY(-2px);
  border-color: var(--dubbeh-border-strong);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.32), 0 0 28px rgba(139, 92, 246, 0.14);
}

.blog-card h2,
.blog-card h3 {
  margin-top: 0;
}

.blog-date,
.post-date,
time {
  color: var(--dubbeh-muted);
  font-size: 0.92rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #f8fafc;
  letter-spacing: -0.03em;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
}

h2 {
  margin-top: 2rem;
}

p,
li {
  color: var(--dubbeh-text);
}

small,
.text-gray,
.text-muted {
  color: var(--dubbeh-muted) !important;
}

a {
  color: var(--dubbeh-cyan);
  text-decoration-color: rgba(34, 211, 238, 0.35);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: #67e8f9;
  text-decoration-color: rgba(103, 232, 249, 0.8);
}

/* Homepage project links/buttons */
.content p > strong > a,
.content p > a[href*="radio.dubbeh.net"],
.content li > a[href*="radio.dubbeh.net"] {
  color: #ecfeff;
  font-weight: 800;
}

.content p > strong > a {
  display: inline-block;
  background: linear-gradient(135deg, var(--dubbeh-purple), var(--dubbeh-cyan));
  border-radius: 999px;
  box-shadow: 0 14px 36px rgba(34, 211, 238, 0.16), 0 0 30px rgba(139, 92, 246, 0.22);
  color: #ffffff;
  padding: 0.68rem 1rem;
  text-decoration: none;
}

.content p > strong > a:hover {
  transform: translateY(-1px);
}

/* Lists */
ul,
ol {
  padding-left: 1.25rem;
}

li::marker {
  color: var(--dubbeh-cyan);
}

/* Tables from old WordPress/SourceMod docs */
table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--dubbeh-border);
  border-radius: var(--dubbeh-radius-sm);
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  padding: 0.72rem 0.85rem;
}

th {
  background: rgba(139, 92, 246, 0.16);
  color: #f8fafc;
}

tr:last-child td {
  border-bottom: 0;
}

/* Code/documentation */
pre,
code,
kbd {
  background: rgba(2, 6, 23, 0.78);
  color: #dbeafe;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 0.55rem;
}

code {
  padding: 0.12rem 0.34rem;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.04);
}

pre code {
  background: transparent;
  border: 0;
  padding: 0;
}

/* Forms/admin-ish public forms */
input,
textarea,
select,
.form-input,
.form-select {
  background: rgba(15, 23, 42, 0.82);
  border-color: var(--dubbeh-border);
  color: var(--dubbeh-text);
}

input:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-select:focus {
  border-color: var(--dubbeh-cyan);
  box-shadow: 0 0 0 0.12rem rgba(34, 211, 238, 0.18);
}

/* Buttons */
.btn,
button,
input[type="submit"] {
  border-radius: 999px;
}

.btn.btn-primary,
button[type="submit"],
input[type="submit"] {
  background: linear-gradient(135deg, var(--dubbeh-purple), var(--dubbeh-blue));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(139, 92, 246, 0.22);
}

.btn.btn-primary:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
  filter: brightness(1.08);
}

/* Footer */
#footer,
.footer,
#footer.section,
#footer.bg-gray,
.section.bg-gray#footer {
  background: #070914 !important;
  border-top: 1px solid var(--dubbeh-border);
  color: var(--dubbeh-muted);
}

#footer .container {
  color: var(--dubbeh-muted);
  padding-bottom: 1.1rem;
  padding-top: 1.1rem;
}

#footer p {
  color: var(--dubbeh-muted);
  margin: 0;
}

#footer a,
.footer a {
  color: var(--dubbeh-cyan);
}

/* Old WordPress images */
.content img,
.blog-post img {
  border: 1px solid var(--dubbeh-border);
  border-radius: var(--dubbeh-radius-sm);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  max-width: 100%;
  height: auto;
}

/* Mobile */
@media (max-width: 720px) {
  #body {
    padding-top: 1rem;
  }

  #body .content,
  .blog-post,
  .blog-list,
  section.blog-list,
  article.content {
    border-radius: 14px;
    padding: 1rem;
  }

  .blog-list article.blog-card {
    padding: 1rem;
  }

  h1 {
    font-size: 2.2rem;
  }
}
