/* ---------- Color Tokens ---------- */
:root {
  /* Core backgrounds */
  --bg-main: #0f1314;
  --bg-card: #1c2123;

  /* Text */
  --text-primary:   #e9e6e2;
  --text-secondary: #b6b1ac;
  --text-muted:     #8f8a84;

  /* Accents */
  --accent-primary: #6aa89a;
  --accent-hover:   #8fc2b6;
  --accent-warm: #b7a98f;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.16);
  --ui-border-subtle: rgba(255,255,255,0.20);
  --ui-border-hover: rgba(255,255,255,0.35);

  /* ---------- Theme / Framework Variable Mapping ---------- */
  /* Backgrounds used by Quark / Spectre */
  --bg-color: var(--bg-main);
  --bg-secondary: var(--bg-card);

  /* Text used by Quark / Spectre */
  --text-color: var(--text-primary);
  --text-light: var(--text-secondary);

  /* Accents used by Quark / Spectre */
  --primary-color: var(--accent-primary);
  --secondary-color: var(--accent-primary);

  /* Borders used by Quark / Spectre */
  --border-color: var(--border-subtle);
}


/* Mobile menu overlay */
.overlay,
.overlay.open {
  background-color: var(--bg-main) !important;
}

.mobile-menu .button_container span {
        background-color: var(--accent-primary) !important;
}

.treemenu li a, .treemenu li a.active, .treemenu li a:focus, .treemenu li a:hover {
        color: var(--accent-primary) !important;
}


/* Mobile menu links */
.overlay-menu a {
  color: var(--text-primary) !important;
}

.overlay-menu a:hover {
  color: var(--accent-primary) !important;
}


/* Header navigation links */
#header a,
#header a:visited {
  color: var(--text-secondary);
}

#header a:hover {
  color: var(--accent-primary);
}


/* ---------- Base ---------- */
body {
  background: var(--bg-main);
  color: var(--text-primary);
}

p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---------- Header / Nav ---------- */
#header {
  background: linear-gradient(to bottom, #14191b, #101415);
  border-bottom: 1px solid var(--border-subtle);
}



/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

/* card meta */
.card-subtitle,
.blog-date,
.text-gray {
  color: var(--text-muted);
}

/* card titles: ALL teal */
.card-title h5 a {
  color: var(--accent-primary);
}

.card-title h5 a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.card-body p {
  color: var(--text-secondary);
}


/* ---------- Tags (Cards + Sidebar) ---------- */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}


.label,
.label-rounded,
.label-secondary,
.label-primary {
  background: transparent !important;
  border-radius: 3px !important;
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-muted) !important;
  font-size: 0.8rem !important;
  font-weight:400 !important;
  padding: 0.25rem 0.45rem !important;
  text-transform: lowercase !important;
}

.label:hover {
  border-color: rgba(255,255,255,0.25) !important;
  color: var(--text-secondary) !important;
}



/* ---------- Sidebar ---------- */
#sidebar {
  color: var(--text-muted);
}


/* sidebar links */
#sidebar a {
  color: var(--text-muted);
}

#sidebar a:hover {
  color: var(--text-primary);
}

/* search */
.search-input {
  background: var(--bg-main) !important;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

.search-input::placeholder {
  color: var(--text-muted);
}


.search-input,
.search-input:focus,
.search-input:invalid {
  background: var(--bg-main) !important;
  color: var(--text-primary);
  border-color: var(--accent);
}


/* ---------- Footer ---------- */
#footer {
  background: var(--bgmain);
  border-top: 1px solid var(--border-subtle);
}

#footer p {
  color: var(--text-muted);
  font-size: 0.8rem;
}

#footer .container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  margin-bottom:2rem;
}

.footer-nav {
  font-size: 0.85rem;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

.footer-separator {
  margin: 0 0.5rem;
  color: var(--text-muted);
}



/* =========================================================
   Corrections: Nav + Tag Color Discipline
   ========================================================= */

.dropmenu ul li a,
.dropmenu ul li a:visited {
  color: var(--accent-primary);
  font-weight: 400;
}

.dropmenu ul li a.active {
  color: var(--accent-primary) !important;
  font-weight: 600;
}

.dropmenu ul li a:hover {
  color: var(--accent-secondary) !important;
}


/* ---------- General links ---------- */
a, a:visited {
  color: var(--accent-primary) !important;
  font-weight: 600;
}

a.active {
  color: var(--accent-secondary) !important;
  font-weight: 600;
}

a:hover {
  color: var(--accent-secondary) !important;
}


/* ---------- Tags: metadata, not links ---------- */
.tags a,
.tags a:visited {
  color: var(--text-muted) !important;
  text-decoration: none;
}

.tags a:hover {
  color: var(--text-secondary);
  border-color: rgba(255,255,255,0.25);
}

/* Card footer tags slightly quieter than sidebar */
.card-footer .tags a {
  opacity: 0.85;
}







/* =========================================================
   Pagination – Quiet, Editorial
   ========================================================= */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 3.5rem;
}


.pagination li {
        border: none;
}

.pagination li a,
.pagination li span {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  border-radius: 3px;
  min-width: 2rem;
  text-align: center;
}

/* Hover stays very subtle */
.pagination li a:hover {
  border-color: rgba(255,255,255,0.25);
  color: var(--accent-primary);
}


/* Active page: remove "button-ness" */
.pagination li span.active {
  border: 1px solid var(--accent-primary);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: 0;
}


/* =========================================================
   Search Page
   ========================================================= */


.simplesearch {
  margin-top: 2rem !important
}

.search-item {
  margin-bottom: 2.5rem;
  margin-left:0 !important
}

.search-title h3 {
  margin-bottom: 0.25rem;
}

.search-date {
  font-size: 0.85rem;
  opacity: 0.7;
}

.search-excerpt {
  margin-top: 0.75rem;
  line-height: 1.6;
}

.search-item hr {
  margin-top: 2rem;
  opacity: 0.3;
}

.simplesearch p {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}



/* =========================================================
   Page Lead
   ========================================================= */


.page-lead {
  margin: 2rem 0 5rem;
}

.page-lead-inner {
  display: flex;
  align-items: center;
  gap: 3rem;
  max-width: 72rem;
  margin: 0 auto;
}

.page-lead-text {
  flex: 1;
}

.page-lead-headline {
  font-size: clamp(1.25rem, 2.5vw, 1.4rem);
  line-height: 1.4;
  font-weight: 500;
  margin: 0;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
  color: var(--text-secondary)
}


.page-lead-photo {
  position: relative;
}

.page-lead-photo::before {
  content: "";
  position: absolute;
  top: 8px;
  right: -8px;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  background: var(--bg-card);
}

.page-lead-photo img {
  position: relative;
  height: 250px;
  filter: saturate(0.90) contrast(0.90);
  border-radius: 16px;
  z-index: 1;
}

@media (max-width: 700px) {
  .page-lead-inner {
    flex-direction: column;
    gap: 2rem;
  }

  .page-lead-photo {
    order: -1;              /* image on top */
    align-self: center;     /* center the photo only */
  }

  .page-lead-text {
    text-align: left;       /* ensure text stays left */
  }

  .page-lead-headline {
    padding-left: 0;
    border-left: none;
  }
}


/* --- About: Body content --- */

.about-content {
  max-width: 88ch;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.about-content p {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 1.4rem;
}

/* Lead paragraph */
.about-content p:first-of-type {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 2.2rem;
}

/* Emphasis / pull-quote */
.about-emphasis {
  font-size: 1.08rem;
  line-height: 1.5;
  padding-left: 1.5rem;
  border-left: 3px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}





.contact-intro {
  max-width: 88ch;
  margin: 3.5rem auto 2.5rem;
  padding: 0 1.5rem;
  color: rgba(255, 255, 255, 0.85);
}

.contact-intro p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
}


/* =========================================================
   Contact page form
   ========================================================= */

/* Form container */
#contact-form {
  max-width: 88ch;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Field spacing */
#contact-form .form-field {
  margin-bottom: 1rem;
}

/* Labels */
#contact-form .form-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#contact-form .form-label .required {
  color: var(--text-muted);
}

/* Inputs & textarea */
#contact-form .form-input {
  width: 100%;
  font-size: 1rem;
  line-height: 1.5;

  padding: 0.55rem 0.6rem;

  color: var(--text-primary);
  background-color: var(--bg-card);

  border: 1px solid var(--ui-border-subtle);
  border-radius: 3px;
}

#contact-form .form-input::placeholder {
  color: var(--text-muted);
}

#contact-form .form-input:focus {
  outline: none;
  border-color: var(--ui-border-hover);
}

/* Textarea emphasis */
#contact-form .form-textarea-wrapper .form-input {
  min-height: 8rem;
  resize: vertical;
}

/* reCAPTCHA (de-emphasized, not hidden) */
#contact-form .g-recaptcha-container {
  margin-top: 1.5rem;
  opacity: 0.85;
}


#contact-form .button-wrapper {
  margin-top: 3.5rem;
}

#contact-form .button-wrapper .btn {
  /* Reset native button behavior */
  appearance: none;
  -webkit-appearance: none;
  border: none;

  /* Explicit layout control */
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* Typography */
  font-family: inherit;
  font-size: 1rem;
  line-height: 1;              /* critical */
  font-weight: 400;

  /* Spacing */
  padding: 0.85rem 1.9rem;

  /* Visuals */
  background: transparent;
  color: var(--text-secondary);

  border: 1px solid var(--ui-border-subtle);
  border-radius: 4px;

  cursor: pointer;
}

#contact-form .button-wrapper .btn:hover,
#contact-form .button-wrapper .btn:focus {
  color: var(--text-primary);
  border-color: var(--ui-border-hover);
  outline: none;
}




/* =========================================================
   Post content
   ========================================================= */
.e-content hr {
  margin: 3rem 0 2.5rem;
  border: none;
  border-top: 1px solid var(--border-subtle);
}

.e-content {
        font-size:1rem;
}


.e-content > p:first-of-type {
  font-size: 1.35rem;          /* adjust: 1.2–1.35rem */
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 1.75rem;
}



/* === Post Header === */

.post-header {
  margin-bottom: 3rem;
}


/* Title */
.post-title h2, .post-title h2 a {
  margin: 0;
  font-size: 2.4rem;
  color: var(--accent-primary);
  line-height: 1.25;
}

/* Subtitle */
.post-subtitle {
  margin-top: 0.75rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}


.post-meta {
  display: flex;
  align-items: center;   /* vertical alignment */
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top:2rem;
}

.post-type {
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
}


.post-meta .blog-date,
.post-meta time {
  font-size: inherit;
  display: inline-flex;
  align-items: center;
}



/* =========================================================
   Sidebar – Author Block
   ========================================================= */

.sidebar-author {
  display: flex;
  flex-direction: column;
  align-items: center;   /* center the image */
  text-align: left;      /* keep copy readable */
}


/* Author image */
.sidebar-author img {
  width: 100%;
  height: auto;
  filter: saturate(0.90) contrast(0.90);
  border-radius: 12px;
  margin-bottom: 1rem;
}

/* Author bio text */
.sidebar-author .author-bio {
  width: 100%;
}



/* Sidebar behavior when stacked below content */
@media (max-width: 840px) {

  /* Space between article and stacked sidebar */
  #sidebar {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  /* AUTHOR BLOCK — force horizontal layout */
  #sidebar .sidebar-content.sidebar-author {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;

    max-width: 680px;
    margin: 0 auto 2.5rem auto;
    text-align: left;
  }

  /* Author image */
  #sidebar .sidebar-content.sidebar-author img {
    width: 150px;
    max-width: 150px;
    filter: saturate(0.90) contrast(0.90);
    border-radius: 8px;
    flex-shrink: 0;
    display: block;
  }

  /* Author bio text */
  #sidebar .sidebar-content.sidebar-author .author-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
  }

  /* Headings spacing */
  #sidebar h4 {
    margin-top: 2.5rem;
  }
}


/* ===== Sidebar visual separation ===== */

@media (min-width: 841px) {
  #sidebar {
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.08);
  }
}

@media (max-width: 840px) {
  #sidebar {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
}
