/* ==========================================================================
   Brand palette for the inner dark pages
   (projects, about, contact, 404, services/*). COLORS ONLY: fonts, sizes,
   spacing, layout and effects all come from theme-dark.css. Loaded after
   theme-dark.css. Not loaded by index.html (home.css has its own copy) or
   skills.html (black and white theme).
   Crimson var(--accent) (glows, buttons, accents) · Gunmetal #2B2B2F (cards) ·
   Silver #C0C0C4 (text, metallic) · Onyx #0B0B0D (background).
   Crimson is never used for text (too dark on onyx).
   ========================================================================== */

.theme-dark {
  --nv-crimson: var(--accent);
  --nv-gunmetal: var(--card);
  --nv-silver: #c0c0c4;
  --nv-onyx: var(--bg);

  --dk-bg: var(--nv-onyx);
  --dk-bg-2: #121215;
  --dk-text: #f2f2f4;
  --dk-muted: var(--nv-silver);
  --dk-link: #e2e2e6;
  --dk-link-hover: #ffffff;
  --dk-line: rgba(192, 192, 196, 0.22);
  --dk-glass: rgba(43, 43, 47, 0.6);
  --dk-blue: var(--accent-bright);
  --dk-purple: var(--accent-deep);
  --focus-ring: 0.1875rem solid #e2e2e6;

  background-image:
    radial-gradient(ellipse 60rem 38rem at 85% -5%, rgb(var(--accent-rgb) / 0.42), transparent 60%),
    radial-gradient(ellipse 48rem 32rem at 0% 20%, rgb(var(--accent-rgb) / 0.3), transparent 62%),
    radial-gradient(ellipse 40rem 30rem at 60% 55%, rgb(var(--accent-rgb) / 0.16), transparent 65%),
    linear-gradient(180deg, var(--dk-bg) 0%, var(--dk-bg-2) 55%, var(--dk-bg) 100%);
}

/* ---------- Header + nav ---------- */

.theme-dark .site-header {
  background: rgba(11, 11, 13, 0.72);
}

.theme-dark .site-nav a:hover {
  background: rgba(43, 43, 47, 0.7);
}

.theme-dark .site-nav a[aria-current="page"] {
  box-shadow: inset 0.25rem 0 0 var(--nv-crimson);
}

@media (min-width: 48rem) {
  .theme-dark .site-nav a[aria-current="page"] {
    box-shadow: inset 0 -0.125rem 0 var(--nv-crimson);
  }

  .theme-dark .header-cta {
    border-color: rgba(192, 192, 196, 0.6);
  }

  .theme-dark .header-cta:hover {
    background: rgba(43, 43, 47, 0.7);
  }
}

/* ---------- Text accents ---------- */

.theme-dark .section-label,
.theme-dark .skills-category h3.tool-group-heading {
  color: var(--nv-silver);
}

.theme-dark .breadcrumb li + li::before {
  color: #8a8a90; /* decorative separator */
}

.theme-dark .skills-category li,
.theme-dark .tool-list li,
.theme-dark .skills-category .tool-list li + li {
  color: #e6e6ea;
}

.theme-dark .skills-category ul:not(.tool-list) li::marker {
  color: var(--accent-bright); /* decorative bullet */
}

/* ---------- Gunmetal glass cards with silver edges ---------- */

.theme-dark .service-list li,
.theme-dark .project-card,
.theme-dark .callout,
.theme-dark .form {
  background: rgba(43, 43, 47, 0.6);
  border-color: rgba(192, 192, 196, 0.24);
}

.theme-dark .callout {
  border-left-color: var(--nv-crimson);
  color: #e6e6ea;
}

.theme-dark .service-list li:hover,
.theme-dark .project-card:hover {
  border-color: rgba(192, 192, 196, 0.55);
  background: rgba(52, 52, 57, 0.7);
}

.theme-dark .project-card__media {
  background:
    radial-gradient(circle at 30% 30%, rgb(var(--accent-rgb) / 0.55), transparent 60%),
    linear-gradient(135deg, #2b2b2f, #151518);
  color: #e6e6ea;
}

.theme-dark .tool-list li,
.theme-dark .skills-category .tool-list li + li {
  background: rgba(43, 43, 47, 0.6);
  border-color: rgba(192, 192, 196, 0.24);
}

.theme-dark .project-card__badge {
  background: rgb(var(--accent-rgb) / 0.35);
  border-color: rgba(192, 192, 196, 0.45);
  color: #f2f2f4;
}

/* ---------- Buttons: crimson gradient with light text ---------- */

.theme-dark .button {
  color: #f2f2f4;
  box-shadow: 0 0 1.25rem rgb(var(--accent-rgb) / 0.45);
}

.theme-dark .button:hover {
  color: #ffffff;
  box-shadow: 0 0 2rem rgb(var(--accent-rgb) / 0.65);
}

.theme-dark .button--secondary {
  border-color: rgba(192, 192, 196, 0.6);
  color: var(--dk-text);
  box-shadow: none;
}

.theme-dark .button--secondary:hover {
  background: rgba(43, 43, 47, 0.7);
  box-shadow: none;
}

/* ---------- Projects filter chips ---------- */

.theme-dark .project-filter button {
  background: rgba(43, 43, 47, 0.5);
  border-color: rgba(192, 192, 196, 0.45);
}

.theme-dark .project-filter button:hover {
  background: rgba(52, 52, 57, 0.8);
}

.theme-dark .project-filter button[aria-pressed="true"],
.theme-dark .project-filter button.is-active {
  color: #f2f2f4;
  box-shadow: 0 0 1.25rem rgb(var(--accent-rgb) / 0.5);
}

/* ---------- Contact form ---------- */

.theme-dark .form-field input,
.theme-dark .form-field textarea {
  background: rgba(11, 11, 13, 0.55);
  border-color: rgba(192, 192, 196, 0.45);
}

.theme-dark .form-field input::placeholder,
.theme-dark .form-field textarea::placeholder {
  color: #a4a4aa;
}

.theme-dark .form-field input:hover,
.theme-dark .form-field textarea:hover {
  border-color: rgba(192, 192, 196, 0.75);
}

/* ---------- Footer + page-header wave ---------- */

.theme-dark .site-footer {
  background: rgba(11, 11, 13, 0.6);
}

/* Wave under page headers: silver line with a crimson core */
.theme-dark .page-header::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%236e6e74'/%3E%3Cstop offset='.35' stop-color='%23c0c0c4'/%3E%3Cstop offset='.7' stop-color='%23a52838'/%3E%3Cstop offset='1' stop-color='%236e6e74'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 28 C 90 6, 180 38, 290 22 S 470 4, 600 20' fill='none' stroke='url(%23g)' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  filter: drop-shadow(0 0 0.35rem rgb(var(--accent-rgb) / 0.6));
}

/* ---------- Particle readability on onyx ---------- */

.theme-dark.has-particles .page-header > h1,
.theme-dark.has-particles .page-header > p,
.theme-dark.has-particles .section > h2,
.theme-dark.has-particles .section > p,
.theme-dark.has-particles .prose > p,
.theme-dark.has-particles .skills-category > h2,
.theme-dark.has-particles .skills-category > p,
.theme-dark.has-particles .skills-category li,
.theme-dark.has-particles .breadcrumb,
.theme-dark.has-particles .error-page > p,
.theme-dark.has-particles .contact-methods,
.theme-dark.has-particles .filter-status {
  text-shadow: 0 0 0.75rem rgba(11, 11, 13, 0.9);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .theme-dark .site-header {
    background: var(--dk-bg);
  }
}
