/*
Theme Name: Voyager Editorial
Theme URI: https://voyagerpro.co.uk
Author: Simon Warburton / Voyager Pro
Author URI: https://voyagerpro.co.uk
Description: Classic Voyager Pro layout based on the original Semplice design, paired with a modern left-side Article Reader (section & paragraph jumping, progress tracking, typography controls, and mobile reading bar).
Version: 2.2.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: voyager-editorial
*/

:root {
  --bg-page: #f5f5f5;
  --bg-box: #ffffff;
  --text-body: #535353;
  --text-dark: #000000;
  --accent-color: #066aab;
  --accent-hover: #f5908a;
  --border-color: #ebebeb;
  --box-shadow: 0 0 1.5em rgba(0, 0, 0, 0.1);
  --font-body: 'Libre Baskerville', Georgia, serif;
  --font-heading: 'Fjalla One', sans-serif;
  --font-nav: 'Oswald', sans-serif;
  --font-logo: 'Playfair Display', Georgia, serif;
  --article-font-size: 1.06rem;
  --article-line-height: 1.85;
}

body.font-size-sm {
  --article-font-size: 0.94rem;
  --article-line-height: 1.78;
}
body.font-size-md {
  --article-font-size: 1.06rem;
  --article-line-height: 1.85;
}
body.font-size-lg {
  --article-font-size: 1.2rem;
  --article-line-height: 1.9;
}
body.font-size-xl {
  --article-font-size: 1.35rem;
  --article-line-height: 1.95;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.8;
  overflow-x: hidden;
}

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

a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-dark);
  font-weight: 400;
  line-height: 1.35;
  margin-top: 0;
  margin-bottom: 0.75em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; margin-top: 1.6em; }
h4 { font-size: 1.15rem; }

p {
  margin-top: 0;
  margin-bottom: 1.4em;
}

hr, .wp-block-separator {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 2.5em 0;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.boxed {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  padding: 2.25em;
}

/* Top Reading Progress Bar */
#reading-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1100;
  pointer-events: none;
}

#reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.08s linear;
}

/* ==========================================================================
   HEADER (Original Semplice Classic Centered Style)
   ========================================================================== */
.header {
  background: #fefefe;
  box-shadow: var(--box-shadow);
  padding: 2em 0 0.75em;
}

.header__inner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.75em;
  position: relative;
}

.header__branding {
  text-align: center;
}

.header__branding .site-title {
  font-family: var(--font-logo);
  font-size: 3.4rem;
  font-style: italic;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.1;
  display: inline-block;
  border: none;
}

.header__branding .site-title:hover {
  color: var(--text-dark);
}

.mobile-menu-toggle {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.navigation--primary {
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: var(--font-nav);
  font-size: 1rem;
}

.navigation--primary ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  line-height: 3.2;
}

.navigation--primary li {
  margin: 0 1.25em;
}

.navigation--primary a {
  color: var(--text-dark);
  font-weight: 400;
}

.navigation--primary a:hover {
  color: var(--accent-hover);
}

/* ==========================================================================
   HERO SLIDER (Front Page)
   ========================================================================== */
.featured-slider {
  position: relative;
}

.featured-slider__slide {
  position: relative;
  color: #ffffff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.featured-slider__overlay {
  position: absolute;
  inset: 0;
  background-color: #000000;
  opacity: 0.48;
}

.featured-slider__content {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  text-align: center;
  width: 85%;
  max-width: 820px;
  min-height: 460px;
  padding: 3.5rem 0;
}

.featured-slider__title {
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: clamp(1.75rem, 3.2vw, 2.4rem);
  color: #ffffff;
  margin: 0 0 0.75em;
}

.featured-slider__text {
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.8;
  color: #ffffff;
  margin: 0 auto;
}

.featured-slider__buttons {
  margin-top: 1.8em;
}

/* Buttons */
.btn-solid,
.featured-slider__button {
  display: inline-block;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.92rem;
  padding: 0.7em 1.8em;
  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-solid:hover,
.featured-slider__button:hover {
  background: #ffffff;
  color: #000000;
}

.btn-outline,
.wp-block-button.is-style-outline .wp-block-button__link {
  display: inline-block;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  padding: 0.6em 1.5em;
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--text-dark);
  border-radius: 0 !important;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-outline:hover,
.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--text-dark);
  color: #ffffff;
}

/* ==========================================================================
   "I WRITE ABOUT" 3x3 CONTENT BOXES (Front Page)
   ========================================================================== */
.content-boxes {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  margin: 2.5em 0;
  padding: 2.25em;
}

.content-boxes__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: var(--text-dark);
  text-align: center;
  margin: 0 0 1.25em;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.content-boxes__inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25em;
  grid-auto-rows: 220px;
}

.content-boxes__box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  padding: 2em;
  overflow: hidden;
}

.content-boxes__box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 1);
  opacity: 0.58;
  transition: opacity 0.15s ease-in-out;
}

.content-boxes__box:hover::before {
  opacity: 0.38;
}

.content-boxes__box-content {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.content-boxes__box-title {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: #ffffff;
  margin: 0;
  letter-spacing: 0.5px;
}

.content-boxes__box-link {
  position: absolute;
  inset: 0;
  z-index: 3;
}

/* ==========================================================================
   MAIN CONTENT & RIGHT SIDEBAR LAYOUT (Homepage, About, Blog)
   ========================================================================== */
.site__main {
  margin: 3.5em 0;
}

.site__content-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2.5em;
}

.site__content {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  padding: 2.5em;
  width: calc(100% - 365px);
}

.site__sidebar {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  padding: 2em 1.75em;
  width: 330px;
  flex-shrink: 0;
  position: sticky;
  top: 1.5rem;
}

.about-me {
  text-align: center;
}

.about-me__title,
.about-me__contact-title {
  position: relative;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 1.25em;
  font-size: 1rem;
  color: var(--text-dark);
  text-align: center;
}

.about-me__title::after,
.about-me__contact-title::after {
  position: absolute;
  top: 50%;
  left: 0;
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--border-color);
}

.about-me__title span,
.about-me__contact-title span {
  position: relative;
  z-index: 1;
  padding: 0 0.85em;
  background-color: #ffffff;
}

.about-me__image {
  margin-bottom: 1em;
}

.about-me__image img {
  margin: 0 auto;
  max-width: 195px;
  height: auto;
}

.about-me__bio {
  font-size: 0.86rem;
  line-height: 1.6;
  margin-bottom: 1.15em;
}

/* Integrated Contact Form inside Sidebar Widget */
.about-me__contact-form {
  margin-top: 1.1em;
  text-align: left;
}

.about-me__contact-title {
  margin-bottom: 0.85em;
}

.about-me__contact-form div.wpforms-container-full,
.about-me__contact-form .wpforms-container {
  margin: 0 !important;
  width: 100% !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-field {
  padding: 0 0 0.7rem 0 !important;
  clear: both;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-field-label {
  display: block;
  font-family: var(--font-body) !important;
  font-size: 0.84rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  color: var(--text-dark) !important;
  margin: 0 0 0.35rem 0 !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form input.wpforms-field-medium,
.about-me__contact-form div.wpforms-container-full .wpforms-form input[type="text"],
.about-me__contact-form div.wpforms-container-full .wpforms-form input[type="email"],
.about-me__contact-form div.wpforms-container-full .wpforms-form textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 0.58rem 0.75rem !important;
  font-family: var(--font-body) !important;
  font-size: 0.88rem !important;
  line-height: 1.45 !important;
  color: var(--text-dark) !important;
  background-color: #fafafa !important;
  border: 1px solid #d4d4d4 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form input[type="text"]:focus,
.about-me__contact-form div.wpforms-container-full .wpforms-form input[type="email"]:focus,
.about-me__contact-form div.wpforms-container-full .wpforms-form textarea:focus {
  background-color: #ffffff !important;
  border-color: #000000 !important;
  outline: none !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form textarea {
  height: 105px !important;
  min-height: 92px !important;
  resize: vertical !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-submit-container {
  padding: 0.25rem 0 0 0 !important;
  margin: 0 !important;
  text-align: center;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form button[type="submit"],
.about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-submit {
  display: inline-block !important;
  width: 100% !important;
  padding: 0.72em 1.5em !important;
  font-family: var(--font-nav) !important;
  font-size: 0.9rem !important;
  font-weight: 400 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  color: #000000 !important;
  background-color: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 0 !important;
  cursor: pointer !important;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out !important;
}

.about-me__contact-form div.wpforms-container-full .wpforms-form button[type="submit"]:hover,
.about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-submit:hover {
  background-color: #000000 !important;
  color: #ffffff !important;
}

/* My Work Rectangular Image-Link Cards on Front Page */
.sector-group-heading {
  margin-top: 1.85em;
  margin-bottom: 0.75em;
  padding-bottom: 0.35em;
  border-bottom: 1px solid var(--border-color);
}

.portfolio-rect-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.75em;
}

.portfolio-rect-item {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.55rem 0.9rem 0.55rem 0.55rem;
  background: #fafafa;
  border: 1px solid #e4e4e4;
  color: var(--text-dark);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.portfolio-rect-item:hover {
  background: #ffffff;
  border-color: var(--text-dark);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  color: var(--text-dark);
}

.portfolio-rect-thumb {
  width: 118px;
  height: 74px;
  flex-shrink: 0;
  overflow: hidden;
  background: #eaeaea;
  border: 1px solid #dddddd;
  display: block;
}

.portfolio-rect-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.portfolio-rect-item:hover .portfolio-rect-thumb img {
  transform: scale(1.06);
}

.portfolio-rect-title {
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.45;
  color: var(--text-dark);
  font-weight: 400;
}

.portfolio-rect-item:hover .portfolio-rect-title {
  color: var(--accent-color);
}

/* ==========================================================================
   SINGLE ARTICLE PAGE: LEFT-SIDE MODERN READER + MAIN ARTICLE COLUMN
   ========================================================================== */
.article-reader-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2.25em;
  align-items: start;
}

.article-left-reader {
  position: sticky;
  top: 1.75rem;
  max-height: calc(100vh - 3.5rem);
  overflow-y: auto;
  scrollbar-width: thin;
}

.reader-panel-box {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  padding: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 1.25em;
}

.reader-back-link {
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--text-body);
  display: inline-block;
  padding-bottom: 0.75em;
  border-bottom: 1px solid var(--border-color);
}

.reader-back-link:hover {
  color: var(--text-dark);
}

/* Reading Progress Widget in Left Sidebar */
.reader-progress-card {
  background: #fafafa;
  border: 1px solid var(--border-color);
  padding: 0.9em 1em;
}

.reader-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-size: 0.78rem;
  color: var(--text-dark);
  margin-bottom: 0.45em;
}

.reader-progress-pct {
  font-weight: 600;
  color: var(--accent-color);
}

.reader-progress-track {
  width: 100%;
  height: 6px;
  background: #e5e5e5;
  overflow: hidden;
  margin-bottom: 0.55em;
}

.reader-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.1s linear;
}

.reader-stats-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-body);
}

/* Paragraph Stepper & Direct Jump Selector */
.reader-para-stepper {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.35rem;
  align-items: center;
}

.stepper-btn {
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  padding: 0.45em 0.65em;
  background: #fafafa;
  border: 1px solid #d5d5d5;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}

.stepper-btn:hover {
  background: var(--text-dark);
  color: #ffffff;
  border-color: var(--text-dark);
}

.para-jump-select {
  width: 100%;
  padding: 0.4em 0.35em;
  font-family: var(--font-nav);
  font-size: 0.78rem;
  border: 1px solid #d5d5d5;
  background: #ffffff;
  color: var(--text-dark);
  cursor: pointer;
}

/* Interactive Section & Key Paragraph Outline */
.reader-panel-heading {
  display: block;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin: 0 0 0.65em;
}

.reader-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.reader-toc-link {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-body);
  padding: 0.42em 0.65em;
  border-left: 2px solid var(--border-color);
  transition: all 0.18s ease;
}

.reader-toc-link.is-para-link {
  font-size: 0.76rem;
}

.reader-toc-link:hover,
.reader-toc-link.active {
  color: var(--text-dark);
  border-left-color: var(--accent-color);
  background: #f4f8fb;
  font-weight: 700;
}

/* Text Size Controls */
.reader-controls-section {
  padding-top: 0.85em;
  border-top: 1px solid var(--border-color);
}

.reader-font-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
}

.font-size-btn {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  padding: 0.4em 0;
  border: 1px solid #d5d5d5;
  background: #fafafa;
  color: var(--text-dark);
  cursor: pointer;
  transition: all 0.15s ease;
}

.font-size-btn:hover,
.font-size-btn.active {
  background: var(--text-dark);
  border-color: var(--text-dark);
  color: #ffffff;
}

/* Main Article Box */
.article-reader-box {
  background: var(--bg-box);
  box-shadow: var(--box-shadow);
  padding: 2.75em 3.25em;
  min-width: 0;
}

.article-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-bottom: 1.1em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
}

/* Hide the duplicate Back to My Work button inside the article box on desktop
   since it is already shown in the sticky left-side reader */
.article-top-bar .article-back-link {
  display: none;
}

.article-title {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  line-height: 1.25;
  color: var(--text-dark);
  margin: 0 0 0.5em;
}

.article-subtitle {
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--text-dark);
  font-style: italic;
  margin: 0 0 1.25em;
}

.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85em 0;
  margin-bottom: 1.85em;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.88rem;
  color: var(--text-body);
}

.article-pdf-link {
  display: none;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  padding: 0.4em 1em;
  border: 1px solid var(--text-dark);
  color: var(--text-dark);
}

.article-pdf-link:hover {
  background: var(--text-dark);
  color: #ffffff;
}

/* Smooth Scrollable Article Body & Paragraph Highlighting */
.scrolly-article-body {
  font-size: var(--article-font-size);
  line-height: var(--article-line-height);
  color: #2c2c2c;
}

.scrolly-block {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.42s ease-out, transform 0.42s ease-out, background-color 0.45s ease;
}

.js-scrolly-ready .scrolly-block.scrolly-hidden {
  opacity: 0.08;
  transform: translateY(15px);
}

.para-flash-highlight {
  background-color: rgba(6, 106, 171, 0.11);
  box-shadow: -8px 0 0 0 var(--accent-color);
  padding-left: 6px;
}

.scrolly-heading {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  color: var(--text-dark);
  margin: 2em 0 0.75em;
}

.scrolly-pullquote {
  margin: 2em 0;
  padding: 1.25em 1.75em;
  border-left: 3px solid var(--text-dark);
  background: #fafafa;
}

.scrolly-pullquote p {
  font-size: 1.15em;
  font-style: italic;
  color: var(--text-dark);
  margin: 0 0 0.4em;
}

.scrolly-pullquote cite {
  font-family: var(--font-nav);
  font-style: normal;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-body);
}

.scrolly-figure,
.article-lead-figure {
  margin: 2em 0;
  background: #fafafa;
  border: 1px solid var(--border-color);
}

.scrolly-figure img,
.article-lead-figure img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  cursor: zoom-in;
}

.scrolly-figure figcaption,
.article-lead-caption {
  padding: 0.65em 1em;
  font-size: 0.82rem;
  color: var(--text-body);
  border-top: 1px solid var(--border-color);
}

/* Prev / Next Navigation at Bottom of Article */
.article-post-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 2.5em;
  padding-top: 1.75em;
  border-top: 1px solid var(--border-color);
}

.post-nav-card {
  flex: 1 1 240px;
}

.post-nav-label {
  display: block;
  font-family: var(--font-nav);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-body);
  margin-bottom: 0.25em;
}

.post-nav-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-dark);
}

/* ==========================================================================
   MOBILE-FRIENDLY BOTTOM READER BAR & SLIDE-UP JUMP SHEET
   ========================================================================== */
.mobile-reader-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #d5d5d5;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
  z-index: 1200;
}

.mobile-reader-progress {
  width: 100%;
  height: 3px;
  background: #e5e5e5;
}

.mobile-reader-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-color);
  transition: width 0.1s linear;
}

.mobile-reader-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.85rem;
  gap: 0.45rem;
}

.mobile-para-nav {
  display: flex;
  gap: 0.3rem;
}

.mobile-reader-btn {
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.78rem;
  padding: 0.48rem 0.75rem;
  background: #fafafa;
  border: 1px solid #cccccc;
  color: var(--text-dark);
  cursor: pointer;
}

.mobile-jump-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 1300;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.22s ease;
}

.mobile-jump-sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.mobile-jump-sheet {
  width: 100%;
  max-height: 75vh;
  background: #ffffff;
  padding: 1.25rem 1.5rem 2rem;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.mobile-jump-sheet-backdrop.open .mobile-jump-sheet {
  transform: translateY(0);
}

.mobile-jump-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--text-dark);
}

.mobile-jump-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.mobile-sheet-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-nav);
  font-size: 0.85rem;
  text-transform: uppercase;
}

.mobile-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-toc-link {
  display: block;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  border-left: 3px solid var(--border-color);
  color: var(--text-body);
}

.mobile-toc-link.active,
.mobile-toc-link:hover {
  border-left-color: var(--accent-color);
  background: #f4f8fb;
  color: var(--text-dark);
  font-weight: 700;
}

/* Blog List Cards */
.blog-entry {
  padding-bottom: 2em;
  margin-bottom: 2em;
  border-bottom: 1px solid var(--border-color);
}

.blog-entry:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-entry__meta {
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
  color: var(--text-body);
  margin-bottom: 0.4em;
}

/* Lightbox Overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-Overlay-img {
  max-width: 92vw;
  max-height: 88vh;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2rem;
  cursor: pointer;
}

/* Footer */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2em 0;
  margin-top: 3em;
  font-size: 0.85rem;
}

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

.navigation--footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25em;
  font-family: var(--font-nav);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.82rem;
}

/* ==========================================================================
   RESPONSIVE (Mobile & Tablet)
   ========================================================================== */
@media (max-width: 991px) {
  .site__content-wrapper {
    flex-direction: column;
    gap: 2em;
  }
  .site__content {
    width: 100%;
  }
  .site__sidebar {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2em;
  }
  .about-me {
    max-width: 520px;
    margin: 0 auto;
  }
  .about-me__image img {
    max-width: 240px;
    width: 100%;
    height: auto;
  }
  .content-boxes__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25em;
  }
  .article-reader-layout {
    grid-template-columns: 1fr;
  }
  .article-left-reader {
    display: none;
  }
  .article-top-bar {
    justify-content: space-between;
  }
  .article-top-bar .article-back-link,
  .article-meta-row .article-pdf-link {
    display: inline-block;
  }
  .mobile-reader-bar {
    display: block;
  }
  .single-portfolio_article .footer {
    padding-bottom: 5rem;
  }
}

@media (max-width: 767px) {
  .header {
    padding: 1.25em 0 0.75em;
  }
  .header__branding .site-title {
    font-size: 2.4rem;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .navigation--primary {
    display: none;
    border-top: 1px solid var(--border-color);
    margin-top: 0.5em;
    padding-top: 0.5em;
  }
  .navigation--primary.mobile-open {
    display: block;
  }
  .navigation--primary ul {
    flex-direction: column;
    align-items: center;
    line-height: 2.4;
  }
  .featured-slider__content {
    min-height: 360px;
    height: auto;
    width: 94%;
    padding: 2.5rem 0;
  }
  .content-boxes,
  .site__content,
  .site__sidebar,
  .article-reader-box {
    padding: 1.4em 1.25em;
  }
  .about-me {
    max-width: 100%;
  }
  .about-me__image img {
    max-width: 210px;
  }
  /* Prevent mobile browser auto-zoom on input focus (16px font-size) & comfortable touch targets */
  .about-me__contact-form div.wpforms-container-full .wpforms-form input.wpforms-field-medium,
  .about-me__contact-form div.wpforms-container-full .wpforms-form input[type="text"],
  .about-me__contact-form div.wpforms-container-full .wpforms-form input[type="email"],
  .about-me__contact-form div.wpforms-container-full .wpforms-form textarea {
    font-size: 16px !important;
    min-height: 44px !important;
    padding: 0.65rem 0.8rem !important;
  }
  .about-me__contact-form div.wpforms-container-full .wpforms-form button[type="submit"],
  .about-me__contact-form div.wpforms-container-full .wpforms-form .wpforms-submit {
    min-height: 46px !important;
    font-size: 0.95rem !important;
  }
  .content-boxes__inner {
    grid-template-columns: 1fr;
    grid-auto-rows: 180px;
  }
  .portfolio-rect-thumb {
    width: 94px;
    height: 62px;
  }
  .portfolio-rect-item {
    gap: 0.75rem;
    padding: 0.45rem;
  }
  .portfolio-rect-title {
    font-size: 0.9rem;
  }
}
