:root {
  --pico-font-size: 106%;
  --brand-color: #8490ff;
  --brand-hover-color: #6272ff;
}

html {
  overflow-y: scroll;
}

body {
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: #222;
  background: #fff;
  overflow-x: hidden;
  user-select: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 600;
  color: #111;
  clear: both;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  margin-bottom: 0.5em;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-top: 1.2em;
  margin-bottom: 0.4em;
}

hr {
  border-top: solid 2px;
  color: #e5e7eb;
  margin: 1.5em 0;
}

p, ol, ul {
  line-height: 160%;
  color: #333;
}

a {
  color: var(--brand-color);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand-hover-color);
}

img {
  max-width: 100%;
  height: auto;
}

/* Header & Nav */
header#site-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #8490ff;
  padding-bottom: 1rem;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
}

.brand-logo img {
  height: 40px;
  width: auto;
}

.brand-tagline {
  font-size: 0.85rem;
  color: #666;
  margin: 0;
  font-style: italic;
}

.nav-menu,
.nav-menu li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0;
  padding: 0;
}

.nav-menu {
  display: flex;
  gap: 1.5rem;
}

.nav-menu li::marker,
.nav-menu li::before {
  content: none !important;
  display: none !important;
}

.nav-menu a {
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: #444;
  padding: 0.25rem 0;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--brand-color);
}

.nav-menu a.active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--brand-color);
}

/* Motto Banner */
.motto-banner {
  background: #f8f9fa;
  border-left: 4px solid var(--brand-color);
  padding: 0.75rem 1.25rem;
  margin-bottom: 2rem;
  border-radius: 0 4px 4px 0;
  font-style: italic;
  font-size: 0.9rem;
  color: #555;
}

/* Fluid Content Area & Container Override */
.container,
main.container {
  max-width: 100% !important;
  width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  margin: 0 auto;
}

main.container {
  min-height: 60vh;
}

.home-about-area {
  padding: 1rem 0;
}

/* Footer */
footer#site-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  font-size: 0.875rem;
  color: #666;
}

/* Responsive Mobile Navigation */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 28px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
  }

  .nav-menu.active {
    display: flex;
  }
}

/* Dark Theme Compatibility */
@media (prefers-color-scheme: dark) {
  body {
    color: var(--pico-color, #e5e7eb);
    background: var(--pico-background-color, #111827);
  }

  h1, h2, h3, h4, h5, h6 {
    color: var(--pico-h1-color, #f9fafb);
  }

  p, ol, ul {
    color: var(--pico-color, #e5e7eb);
  }

  .brand-logo {
    color: #f9fafb;
  }

  .brand-tagline {
    color: #9ca3af;
  }

  .nav-menu a {
    color: #d1d5db;
  }

  .motto-banner {
    background: #1f2937;
    color: #9ca3af;
  }

  footer#site-footer {
    border-top-color: #374151;
    color: #9ca3af;
  }

  .menu-toggle span {
    background: #f9fafb;
  }
}
