/*
Template Name: Denali
*/

/* Theme tokens */
:root {
  --primary-color: #0d6efd;
  --body-bg: #f8f9fa;
  --text-color: #212529;
  --card-bg: #fff;
  --border-color: #dee2e6;
  --link-color: #0d6efd;
  --footer-bg: #212529;
  --footer-text: #f8f9fa;
}

/* Dark theme tokens (manual toggle) */
[data-bs-theme="dark"] {
  --primary-color: #4dabf7;
  --body-bg: #121212;
  --text-color: #e9ecef;
  --card-bg: #1e1e1e;
  --border-color: #495057;
  --link-color: #4dabf7;
  --footer-bg: #1c1c1c;
  --footer-text: #adb5bd;
}

/* Base layout */
body {
  background-color: var(--body-bg);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: background-color 0.3s, color 0.3s;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
  background-color: var(--body-bg);
}

.footer-gradient {
  margin-top: auto;
}

/* Page header */
.page-header .text-muted,
.page-content .text-muted {
  color: #6c757d;
}

.page-header {
  padding: 4rem 0;
  background-color: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.page-header .lead {
  max-width: 720px;
  margin: 1rem auto 0;
}

/* When header is nested inside content, keep it lighter */
.page-content .page-header {
  padding: 0 0 2.5rem;
  background-color: transparent;
  border-bottom: none;
}

/* Content layout */
.page-content {
  padding: 4rem 0;
  margin-bottom: 2rem;
}

/* Content card */
.content-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Titles */
.page-header h1,
.page-content h1,
.content-card h1 {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.content-card h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1.5rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
  color: var(--text-color);
}

.content-card h2:first-of-type {
  margin-top: 1rem;
}

.content-card p,
.content-card ul {
  line-height: 1.8;
  color: var(--text-color);
}

.content-card p + p {
  margin-top: 1rem;
}

.content-card ul {
  padding-left: 1.5rem;
  margin-bottom: 0;
}

.content-card ul li {
  margin-bottom: 0.5rem;
}

.content-card a {
  color: var(--link-color);
}

.content-card a:hover {
  color: var(--primary-color);
}

/* Contact cards */
.contact-methods .card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.contact-methods .card:hover {
  transform: translateY(-5px);
}

.contact-methods .card-body {
  color: var(--text-color);
}

.contact-methods .card-title {
  font-weight: 600;
}

.contact-methods .btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Footer */
.footer-gradient {
  background: linear-gradient(135deg, #030016, #0d0333);
}

[data-bs-theme="dark"] .footer-gradient {
  background: linear-gradient(135deg, #030016, #0d0333);
}

/* Navigation */
.nav-glass {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,.1);
}

[data-bs-theme="dark"] .nav-glass {
  background-color: rgba(18, 18, 18, 0.8);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #fff;
}

[data-bs-theme="dark"] .footer-links a:hover {
  color: var(--primary-color);
}

/* Dark theme tokens (system preference) */
@media (prefers-color-scheme: dark) {
  :root {
    --primary-color: #4dabf7;
    --body-bg: #121212;
    --text-color: #e9ecef;
    --card-bg: #1e1e1e;
    --border-color: #495057;
    --link-color: #4dabf7;
    --footer-bg: #1c1c1c;
    --footer-text: #adb5bd;
  }

  .page-header .text-muted,
  .page-content .text-muted {
    color: #adb5bd;
  }

  .footer-gradient {
    background: linear-gradient(135deg, #030016, #0d0333);
  }

  .nav-glass {
    background-color: rgba(18, 18, 18, 0.8);
    border-bottom: 1px solid rgba(255,255,255,.1);
  }

  .content-card,
  .contact-methods .card {
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.35);
  }

  .footer-links a:hover {
    color: var(--primary-color);
  }
}

/* Responsive spacing */
@media (max-width: 991.98px) {
  .page-header,
  .page-content {
    padding: 3rem 0;
  }
}

@media (max-width: 575.98px) {
  .page-header h1,
  .page-content h1,
  .content-card h1 {
    font-size: 1.75rem;
  }

  .content-card {
    padding: 1.5rem;
  }

  .content-card h2 {
    font-size: 1.5rem;
  }
}
