/*
Theme Name:  The Other Side of Yesterday
Theme URI:   https://billferroauthor.com
Author:      Bill Ferro
Description: Custom theme for The Other Side of Yesterday by Bill Ferro.
Version:     1.0.0
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: yesterday
*/

/* ==========================================================================
   1. CSS VARIABLES & RESET
   ========================================================================== */

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

:root {
  --bg-deep:     #060B18;
  --bg-dark:     #090e1f;
  --bg-mid:      #0c1428;
  --bg-card:     #101c30;
  --border:      rgba(198, 236, 255, 0.12);
  --border-hover:rgba(198, 236, 255, 0.35);
  --accent:      #C6ECFF;
  --accent-dim:  rgba(198, 236, 255, 0.55);
  --accent-glow: rgba(198, 236, 255, 0.15);
  --text-white:  #ffffff;
  --text-muted:  #8aaccc;
  --text-dim:    #445a70;
  --text-body:   #b8d0e8;
  --success:     #3db88a;
  --font:        'Space Grotesk', sans-serif;
  --font-body:   'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg-deep);
  color: var(--text-white);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
ul { list-style: none; }

/* ==========================================================================
   2. NAVIGATION
   ========================================================================== */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(6, 11, 24, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2rem;
}

.site-nav .nav-menu {
  display: flex;
  align-items: center;
  gap: 3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .nav-menu li a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.site-nav .nav-menu li a:hover,
.site-nav .nav-menu li.current-menu-item > a,
.site-nav .nav-menu li.current_page_item > a,
.site-nav .nav-menu li.current-page-ancestor > a {
  color: var(--text-white);
}

.site-nav .nav-menu li.current-menu-item > a,
.site-nav .nav-menu li.current_page_item > a {
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  font-size: 1.1rem;
  position: absolute;
  right: 1.25rem;
}

/* ==========================================================================
   3. HERO — SHARED BASE
   ========================================================================== */

.site-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 62px;
}

.hero-label {
  font-family: var(--font);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 2;
}

.hero-heading {
  font-family: var(--font);
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-white);
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 1.2rem auto 0;
  position: relative;
  z-index: 2;
}

.hero-sub {
  font-size: 0.9rem;
  color: var(--text-muted);
  position: relative;
  z-index: 2;
  margin-top: 1rem;
  text-align: center;
  max-width: 420px;
  line-height: 1.65;
}

/* ==========================================================================
   4. SHARED COMPONENTS
   ========================================================================== */

.section-label {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 3rem 0;
}

/* Buttons */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 16px 24px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: #142F4C;
  color: var(--text-white);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-outline:hover {
  border-color: var(--accent);
  background: #1a3d63;
  color: var(--text-white);
}
.btn-accent {
  border-color: var(--accent) !important;
  background: #142F4C !important;
}

/* Post tag pill */
.post-tag {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(198, 236, 255, 0.3);
  padding: 0.28rem 0.75rem;
  margin-bottom: 0.75rem;
}

/* Pull quote */
.pull-quote {
  border-left: 2px solid var(--accent);
  padding: 1.25rem 1.75rem;
  margin: 2.5rem 0;
  background: rgba(198, 236, 255, 0.03);
}
.pull-quote p {
  font-family: var(--font);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-white);
  line-height: 1.65;
  font-style: italic;
  margin: 0;
}
.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-style: normal;
}

/* Store buttons — real logo images */
.store-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: #142F4C;
  text-decoration: none;
  transition: all 0.25s;
}
.store-btn:hover {
  background: #1a3d63;
}
.store-btn img {
  height: 30px;
  width: 80px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity 0.2s;
}
.store-btn:hover img { opacity: 1; }

/* ==========================================================================
   5. HOMEPAGE
   ========================================================================== */

/* Hero */
.home .site-hero {
  min-height: 100vh;
  margin-top: 0;
  padding-top: 62px;
}

.hero-img-wrap {
  position: absolute;
  inset: 0;
}
.hero-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Gradient overlay — lighter in middle so image shows, dark at bottom for text */
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6,11,24,0.40) 0%,
      rgba(6,11,24,0.05) 30%,
      rgba(6,11,24,0.10) 55%,
      rgba(6,11,24,0.75) 80%,
      rgba(6,11,24,0.97) 100%
    );
}

.home .hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  min-height: calc(100vh - 62px);
  padding: 56px 2rem 132px;
}

.hero-logo {
  width: clamp(273px, 47vw, 525px);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(198,236,255,0.2));
  /* Push everything below to the bottom of the flex container */
  margin-bottom: auto;
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 500;
  color: var(--text-white);
  max-width: 600px;
  line-height: 1.5;
  margin: 0;
}

.hero-divider-gap {
  height: 32px;
  flex-shrink: 0;
}

.home .store-btns { justify-content: center; margin-top: 14px; }

.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 10;
  animation: bob 2s ease-in-out infinite;
}
.scroll-cue span {
  font-family: var(--font);
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
}
.scroll-cue-line {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, var(--accent), transparent);
}
@keyframes bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* About the book */
.about-section {
  padding: 7rem 2rem;
  background: var(--bg-deep);
}
.about-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6rem;
  align-items: center;
}

.book-cover-wrap {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  flex-shrink: 0;
}
.book-cover-img {
  height: clamp(500px, 60vh, 900px);
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(-16px 20px 40px rgba(0,0,0,0.7)) drop-shadow(0 0 30px rgba(198,236,255,0.08));
}

.about-body {
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-white);
  line-height: 1.5;
  max-width: 540px;
  margin-bottom: 2rem;
}

/* About section specific overrides */
.about-section .section-title {
  font-size: 48px;
}
.about-section .store-btns,
.about-section .trailer-btn {
  margin-left: 0;
  align-self: flex-start;
}

.trailer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--text-white);
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: gap 0.2s, color 0.2s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-bottom: 1.5rem;
}
.trailer-btn:hover { gap: 1.15rem; color: var(--accent); }
.play-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.play-icon img { width: 40px; height: 40px; display: block; }
.trailer-btn:hover .play-icon { opacity: 0.8; }

/* YouTube lightbox modal */
.yt-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.yt-modal.is-open { display: flex; }
.yt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,11,24,0.92);
  cursor: pointer;
}
.yt-modal-inner {
  position: relative;
  z-index: 2;
  width: min(90vw, 960px);
  height: min(50.625vw, 540px); /* 16:9 ratio locked */
  background: #000;
}
.yt-modal-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
#trailerIframeWrap {
  position: absolute;
  inset: 0;
}
.yt-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-white);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.yt-modal-close:hover { opacity: 1; }

/* Meet the author */
.author-section {
  position: relative;
  padding: 7rem 2rem;
  overflow: hidden;
}
.author-section-bg {
  position: absolute;
  inset: 0;
}
.author-section-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}
.author-section-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(6,11,24,0.55) 40%, rgba(6,11,24,0.55) 60%, var(--bg-deep) 100%);
}
.author-inner {
  max-width: 1060px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}
.author-bio-short {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-white);
  line-height: 1.85;
  max-width: 480px;
  margin-bottom: 2rem;
}
.author-photo-ring {
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow:
    0 0 0 10px rgba(198, 236, 255, 0.06),
    0 0 80px rgba(198, 236, 255, 0.15);
  overflow: hidden;
  flex-shrink: 0;
}
.author-photo-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.author-photo-ring .photo-placeholder { font-size: 7rem; opacity: 0.22; }

/* ==========================================================================
   6. INNER PAGE HEROES
   ========================================================================== */

.inner-hero {
  height: 400px;
  padding: 0 2rem;
  position: relative;
}

.inner-hero-bg {
  position: absolute;
  inset: 0;
}
.inner-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.inner-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(6,11,24,0.45) 0%,
      rgba(6,11,24,0.20) 45%,
      rgba(6,11,24,0.65) 100%
    );
}

/* ==========================================================================
   7. BLOG LISTING
   ========================================================================== */

.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2.5rem 1.5rem 1.5rem;
}
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
  border-color: var(--accent);
  color: var(--text-white);
  background: rgba(198, 236, 255, 0.06);
}

.posts-section { max-width: 1100px; margin: 0 auto; padding: 1rem 2rem 6rem; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }

.post-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.post-featured:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.3s, transform 0.3s;
  position: relative;
}
.post-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }

/* Cards are made fully clickable via JS in main.js */

.post-image { position: relative; overflow: hidden; }
.post-featured .post-image { height: 100%; min-height: 320px; }
.post-card .post-image { height: 200px; }
.post-image .wp-post-image { width: 100%; height: 100%; object-fit: cover; }

.post-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #080e22 0%, #0f1e3a 60%, #060b18 100%);
}
.post-image-placeholder::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 40% 40%, rgba(198,236,255,0.07) 0%, transparent 60%);
}
.post-image-placeholder span { font-size: 3rem; opacity: 0.2; position: relative; z-index: 1; }

.post-body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.post-featured .post-body { padding: 2.5rem; justify-content: center; }

.post-meta {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
  font-family: var(--font);
  font-weight: 500;
}

.post-title {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-white);
  line-height: 1.35;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.post-featured .post-title { font-size: 1.65rem; margin-bottom: 0.5rem; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--accent); }

.post-excerpt { font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; flex: 1; margin-bottom: 1.25rem; }

.post-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: gap 0.2s;
  align-self: flex-start;
}
.post-read-more:hover { gap: 0.85rem; }
.post-read-more::after { content: '→'; }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 3.5rem; }
.page-numbers {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--border);
  color: var(--text-muted); font-family: var(--font); font-weight: 600; font-size: 0.85rem;
  text-decoration: none; transition: all 0.2s;
}
.page-numbers:hover, .page-numbers.current { border-color: var(--accent); color: var(--text-white); background: rgba(198,236,255,0.06); }
.page-numbers.dots { border: none; color: var(--text-dim); }

/* ==========================================================================
   8. SINGLE POST
   ========================================================================== */

.post-hero {
  position: relative;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  margin-top: 62px;
  padding: 0 max(2rem, calc(50vw - 530px)) 4rem;
}
/* Ensure breadcrumb and meta align with article body */
.post-hero .breadcrumb,
.post-hero .post-header {
  max-width: 1060px;
  width: 100%;
  padding-top: 64px;
}
.post-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #060c20 0%, #0c1830 50%, #060b18 100%);
}
.post-hero-fade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, #060b18 28%, rgba(6,11,24,0.5) 60%, transparent 100%),
    linear-gradient(180deg, rgba(6,11,24,0.4) 0%, transparent 45%, rgba(6,11,24,0.95) 100%);
}
.post-hero-img { position: absolute; inset: 0; }
.post-hero-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }

.breadcrumb {
  position: relative; z-index: 5;
  display: flex; align-items: center; gap: 0.6rem;
  margin-bottom: 2rem;
  font-family: var(--font); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--text-dim); }
.breadcrumb .current { color: var(--text-muted); }

.post-header { position: relative; z-index: 5; max-width: 780px; }
.post-heading {
  font-family: var(--font);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700; color: var(--text-white); line-height: 1.15; letter-spacing: -0.01em;
  margin-bottom: 1.25rem;
}
.post-meta-row { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.author-chip { display: flex; align-items: center; gap: 0.65rem; }
.author-chip-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); overflow: hidden; flex-shrink: 0;
  background: var(--bg-card);
}
.author-chip-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-chip-name { font-family: var(--font); font-size: 0.82rem; font-weight: 600; color: var(--text-white); }
.post-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-dim); }
.post-meta-item { font-family: var(--font); font-size: 0.75rem; font-weight: 400; color: var(--text-dim); }

/* Article layout */
.article-layout {
  max-width: 1100px; margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid; grid-template-columns: 1fr 260px; gap: 5rem; align-items: start;
}

#readingBar {
  position: fixed; top: 62px; left: 0;
  height: 2px; background: linear-gradient(90deg, var(--accent), #ffffff);
  width: 0%; z-index: 199; transition: width 0.1s linear;
}

.article-body { min-width: 0; }
.article-body .opener {
  font-size: 1.05rem; color: var(--text-body); line-height: 1.9; margin-bottom: 1.75rem;
}
.article-body .opener::first-letter {
  font-size: 4.2rem; font-weight: 700;
  float: left; line-height: 0.75; margin-right: 0.12em; margin-top: 0.08em; color: var(--text-white);
}
.article-body p { font-size: 1rem; color: var(--text-body); line-height: 1.9; margin-bottom: 1.6rem; }
.article-body h2 {
  font-family: var(--font); font-size: 1.3rem; font-weight: 700; color: var(--text-white);
  margin: 3rem 0 1.1rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); letter-spacing: -0.01em;
}
.article-body h3 { font-size: 1.05rem; font-weight: 700; color: var(--text-white); margin: 2rem 0 0.8rem; }
.article-body ul, .article-body ol { margin: 1rem 0 1.6rem 1.5rem; color: var(--text-body); font-size: 1rem; line-height: 1.9; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body a { color: var(--accent); }
.article-body blockquote {
  border-left: 2px solid var(--accent); padding: 1rem 1.5rem; margin: 2rem 0;
  background: rgba(198,236,255,0.03); color: var(--text-muted); font-style: italic;
}
.article-body img { width: 100%; border: 1px solid var(--border); margin: 1.5rem 0; }

.article-divider { width: 100%; height: 1px; background: var(--border); margin: 3rem 0; }

.article-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.5rem; }
.article-tag {
  font-family: var(--font); font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted); border: 1px solid var(--border); padding: 0.3rem 0.75rem; transition: all 0.2s;
}
.article-tag:hover { border-color: var(--accent); color: var(--text-white); }

.share-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.share-label { font-family: var(--font); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.share-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.9rem; border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-family: var(--font); font-weight: 600; font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all 0.2s;
}
.share-btn:hover { border-color: var(--accent); color: var(--text-white); }

.author-bio-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 2rem; display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; margin-top: 3rem;
}
.author-bio-card-avatar { width: 80px; height: 80px; border-radius: 50%; border: 1px solid var(--accent); overflow: hidden; flex-shrink: 0; }
.author-bio-card-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.author-bio-card-name { font-family: var(--font); font-size: 1.05rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.2rem; }
.author-bio-card-role { font-family: var(--font); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dim); margin-bottom: 0.75rem; }
.author-bio-card-text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 0.85rem; }
.author-bio-card-link { font-family: var(--font); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.author-bio-card-link:hover { color: var(--text-white); }

/* Sidebar */
.article-sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2rem; }
.toc { background: var(--bg-card); border: 1px solid var(--border); padding: 1.5rem; }
.toc-title { font-family: var(--font); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-dim); margin-bottom: 1rem; }
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 0.1rem; }
.toc-list li a {
  display: block; padding: 0.4rem 0.6rem;
  font-family: var(--font); font-size: 0.78rem; font-weight: 400;
  color: var(--text-muted); text-decoration: none; border-left: 2px solid transparent; transition: all 0.2s; line-height: 1.4;
}
.toc-list li a:hover, .toc-list li.active a { color: var(--text-white); border-left-color: var(--accent); background: rgba(198,236,255,0.04); }

.reading-progress { background: var(--bg-card); border: 1px solid var(--border); padding: 1.25rem 1.5rem; }
.progress-label { font-family: var(--font); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.75rem; display: flex; justify-content: space-between; }
.progress-label span { color: var(--accent); }
.progress-bar-bg { height: 3px; background: rgba(198,236,255,0.08); border-radius: 2px; overflow: hidden; }
.progress-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), #ffffff); transition: width 0.2s; }

.sidebar-book { background: var(--bg-card); border: 1px solid var(--border); padding: 1.5rem; text-align: center; }
.sidebar-book-cover { width: 90px; height: 130px; margin: 0 auto 1rem; overflow: hidden; }
.sidebar-book-cover img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-book-title { font-family: var(--font); font-size: 0.85rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.25rem; line-height: 1.3; }
.sidebar-book-author { font-family: var(--font); font-size: 0.65rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; }
.sidebar-cta-btn {
  display: block; padding: 0.6rem 1rem;
  border: 1px solid rgba(198,236,255,0.3); background: rgba(198,236,255,0.05);
  color: var(--text-white); font-family: var(--font); font-weight: 600;
  font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; transition: all 0.2s;
}
.sidebar-cta-btn:hover { background: rgba(198,236,255,0.1); border-color: var(--accent); }

/* Related posts */
.related-section { background: var(--bg-dark); border-top: 1px solid var(--border); padding: 5rem 2rem; }
.related-inner { max-width: 1100px; margin: 0 auto; }
.related-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2.5rem; }
.related-title { font-family: var(--font); font-size: 1.1rem; font-weight: 700; color: var(--text-white); }
.related-all { font-family: var(--font); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.related-all:hover { color: var(--text-white); }
.related-all::after { content: ' →'; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.related-card { background: var(--bg-card); border: 1px solid var(--border); overflow: hidden; text-decoration: none; display: block; transition: border-color 0.25s, transform 0.25s; }
.related-card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
.related-card-img { height: 140px; overflow: hidden; background: linear-gradient(135deg, #080e22, #0f1e3a); position: relative; }
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-icon { position: relative; z-index: 1; opacity: 0.25; font-size: 2.5rem; display: flex; align-items: center; justify-content: center; height: 100%; }
.related-card-body { padding: 1.25rem; }
.related-card-tag { font-family: var(--font); font-size: 0.62rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-dim); margin-bottom: 0.4rem; }
.related-card-title { font-family: var(--font); font-size: 0.88rem; font-weight: 700; color: var(--text-white); line-height: 1.35; margin-bottom: 0.5rem; }
.related-card-meta { font-family: var(--font); font-size: 0.65rem; font-weight: 400; color: var(--text-dim); }

/* ==========================================================================
   9. ABOUT PAGE
   ========================================================================== */

.intro-section {
  max-width: 1060px; margin: 0 auto;
  padding: 5rem 2rem 0;
  display: grid; grid-template-columns: 340px 1fr; gap: 5rem; align-items: start;
}
.author-photo-card { position: sticky; top: 90px; }
.author-photo-frame {
  position: relative; width: 100%; padding-bottom: 115%;
  background: var(--bg-card); border: 1px solid var(--border); overflow: hidden; margin-bottom: 1.75rem;
}
.author-photo-frame-inner { position: absolute; inset: 0; overflow: hidden; }
.author-photo-frame-inner img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.author-photo-frame-inner::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 35%; background: linear-gradient(to top, var(--bg-card), transparent); pointer-events: none;
}
.photo-caption { position: absolute; bottom: 1.25rem; left: 1.25rem; right: 1.25rem; z-index: 1; }
.photo-name { font-family: var(--font); font-size: 1.2rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.2rem; }
.photo-title-text { font-family: var(--font); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.author-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); border: 1px solid var(--border); margin-bottom: 1.5rem; }
.stat { background: var(--bg-card); padding: 1rem 1.1rem; text-align: center; }
.stat-num { font-family: var(--font); font-size: 1.6rem; font-weight: 700; color: var(--text-white); display: block; line-height: 1; margin-bottom: 0.35rem; }
.stat-label { font-family: var(--font); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.sidebar-actions { display: flex; flex-direction: column; gap: 0.75rem; }
.bio-text { font-family: var(--font-body); font-size: 1rem; color: var(--text-white); line-height: 1.75; margin-bottom: 1.25rem; }

/* Author page — section labels back to compact size */
.intro-section .section-label,
.book-banner .section-label,
.sidebar-actions + .section-label,
.bio-content .section-label,
.author-photo-card .section-label {
  font-size: 0.68rem;
  letter-spacing: 0.22em;
}
.tag-group { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.tag { font-family: var(--font); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); border: 1px solid var(--border); padding: 0.35rem 0.8rem; transition: all 0.2s; }
.tag:hover { border-color: var(--accent); color: var(--text-white); }
.book-banner { max-width: 1060px; margin: 0 auto; padding: 0 2rem 6rem; }
.book-banner-inner { display: grid; grid-template-columns: auto 1fr; gap: 3rem; align-items: center; background: var(--bg-card); border: 1px solid var(--border); padding: 2.5rem; margin-top: 1rem; }
.book-cover-placeholder { width: 280px; height: 420px; overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.book-cover-placeholder img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   10. CONTACT PAGE
   ========================================================================== */

.contact-layout { max-width: 1000px; margin: 0 auto; padding: 4rem 2rem 6rem; display: grid; grid-template-columns: 1fr 1.7fr; gap: 4rem; align-items: start; }
.contact-info { position: sticky; top: 90px; }
.info-label { font-family: var(--font); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-dim); margin-bottom: 0.5rem; }
.info-title { font-family: var(--font); font-size: 1.55rem; font-weight: 700; color: var(--text-white); line-height: 1.25; margin-bottom: 1.2rem; }
.info-body { font-size: 0.9rem; color: var(--text-muted); line-height: 1.8; margin-bottom: 2.5rem; }
.contact-items { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1.1rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border); }
.contact-item-icon { display: none; }
.contact-item-label { font-family: var(--font); font-size: 0.65rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.2rem; }
.contact-item-value { font-size: 0.9rem; color: var(--text-white); }
.contact-item-value a { color: var(--accent); text-decoration: none; }
.social-row { display: flex; gap: 0.75rem; margin-top: 2rem; }
.social-btn { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font-size: 1rem; text-decoration: none; transition: all 0.2s; }
.social-btn:hover { border-color: var(--accent); color: var(--text-white); background: rgba(198,236,255,0.06); }

.contact-form-wrap { background: var(--bg-card); border: 1px solid var(--border); padding: 2.5rem; }
.form-title { font-family: var(--font); font-size: 1.1rem; font-weight: 700; color: var(--text-white); margin-bottom: 0.4rem; }
.form-subtitle { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.65; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.25rem; }
.form-group.full { grid-column: 1 / -1; }
label { font-family: var(--font); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
label .req { color: var(--accent); margin-left: 2px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], select, textarea {
  background: rgba(6,11,24,0.7); border: 1px solid var(--border);
  color: var(--text-white); font-family: var(--font);
  font-size: 0.9rem; font-weight: 400;
  padding: 0.75rem 1rem; outline: none; transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--text-dim); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(198,236,255,0.08); }
textarea { resize: vertical; min-height: 140px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23445a70' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
select option { background: var(--bg-mid); color: var(--text-white); }
.form-note { font-size: 0.76rem; color: var(--text-dim); margin-bottom: 1.75rem; line-height: 1.6; }
.submit-btn { display: inline-flex; align-items: center; gap: 0.65rem; background: transparent; border: 1px solid rgba(198,236,255,0.35); color: var(--text-white); font-family: var(--font); font-weight: 600; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 0.85rem 2.2rem; cursor: pointer; transition: all 0.25s; }
.submit-btn:hover { border-color: var(--accent); box-shadow: 0 0 20px rgba(198,236,255,0.1); background: rgba(198,236,255,0.06); }

/* CF7 overrides */
.wpcf7-form .wpcf7-text,
.wpcf7-form .wpcf7-email,
.wpcf7-form .wpcf7-select,
.wpcf7-form .wpcf7-textarea { background: rgba(6,11,24,0.7) !important; border: 1px solid var(--border) !important; color: var(--text-white) !important; font-family: var(--font) !important; font-size: 0.9rem !important; padding: 0.75rem 1rem !important; width: 100% !important; outline: none !important; }
.wpcf7-form .wpcf7-submit { background: transparent !important; border: 1px solid rgba(198,236,255,0.35) !important; color: var(--text-white) !important; font-family: var(--font) !important; font-weight: 600 !important; font-size: 0.8rem !important; letter-spacing: 0.14em !important; text-transform: uppercase !important; padding: 0.85rem 2.2rem !important; cursor: pointer !important; transition: all 0.25s !important; }
.wpcf7-response-output { font-family: var(--font) !important; font-size: 0.8rem !important; border: 1px solid var(--border) !important; padding: 0.75rem 1rem !important; margin-top: 1rem !important; background: var(--bg-card) !important; color: var(--text-muted) !important; }
.wpcf7-response-output.wpcf7-mail-sent-ok { border-color: var(--success) !important; color: var(--success) !important; }

/* ==========================================================================
   11. FOOTER
   ========================================================================== */

.site-footer {
  position: relative;
  border-top: 1px solid var(--border);
  padding: 5rem 2rem 2.5rem;
  text-align: center;
  overflow: hidden;
}
.footer-bg-img {
  position: absolute;
  inset: 0;
}
.footer-bg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.footer-bg-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--bg-deep) 0%, rgba(6,11,24,0.5) 40%, rgba(6,11,24,0.5) 60%, var(--bg-deep) 100%);
}
.footer-inner { position: relative; z-index: 2; }
.footer-logo { display: block; text-decoration: none; margin: 0 auto 2rem; width: fit-content; }
.footer-logo img { width: clamp(225px, 35vw, 350px); height: auto; display: block; opacity: 0.9; transition: opacity 0.2s; }
.footer-logo:hover img { opacity: 1; }
.footer-rule { display: none; }
.footer-nav-menu { display: flex; justify-content: center; gap: 2.5rem; margin-bottom: 2.5rem; list-style: none; padding: 0; }
.footer-nav-menu li a { color: var(--accent); text-decoration: none; font-family: var(--font); font-weight: 500; font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.2s; }
.footer-nav-menu li a:hover { color: var(--text-white); }
.footer-copy { color: var(--text-muted); font-size: 0.72rem; letter-spacing: 0.06em; }

/* ==========================================================================
   12. RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
  .about-inner { grid-template-columns: 1fr; gap: 3rem; justify-items: center; }
  .about-body { max-width: 100%; }
  .author-inner { grid-template-columns: 1fr; gap: 2.5rem; justify-items: center; text-align: center; }
  .author-bio-short { max-width: 100%; }
  .author-photo-ring { width: 220px; height: 220px; }
  .article-layout { grid-template-columns: 1fr; }
  .article-sidebar { position: static; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .intro-section { grid-template-columns: 1fr; gap: 2.5rem; }
  .author-photo-card { position: static; max-width: 360px; }
}

@media (max-width: 780px) {
  .post-featured { grid-template-columns: 1fr; }
  .post-featured .post-image { height: 240px; min-height: unset; }
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .contact-info { position: static; }
  .form-row { grid-template-columns: 1fr; }
  .book-banner-inner { grid-template-columns: 1fr; }
  .site-nav .nav-menu { gap: 1.5rem; }
}

@media (max-width: 580px) {
  .related-grid { grid-template-columns: 1fr; }
  .author-bio-card { grid-template-columns: 1fr; }
  .site-nav .nav-menu { gap: 1rem; }
  .book-cover-img { height: 260px; width: auto; }
}

@media (max-width: 480px) {
  .nav-toggle { display: flex; }
  .site-nav .nav-menu {
    display: none; flex-direction: column; gap: 0;
    position: absolute; top: 62px; left: 0; right: 0;
    background: rgba(6,11,24,0.98); padding: 1rem 0;
    border-bottom: 1px solid var(--border);
  }
  .site-nav .nav-menu.is-open { display: flex; }
  .site-nav .nav-menu li a { padding: 0.75rem 1.5rem; display: block; }
  .store-btns { flex-direction: column; align-items: center; }
}
