/*
Theme Name: Jamie Freeman
Theme URI: https://jamiefreeman.news
Author: Silvaris
Description: Dark cinematic WordPress blog — Yoast + Easy TOC ready. Inspired by Break the System.
Version: 2.4.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: jamie-freeman
Tags: blog, custom-menu, featured-images, threaded-comments, dark
*/

:root {
  --bg: #030505;
  --bg-elev: #080c0a;
  --bg-card: #0c110f;
  --bg-card-2: #101714;
  --line: rgba(0, 255, 200, 0.1);
  --line-strong: rgba(0, 255, 200, 0.32);
  --cyan: #00ffc8;
  --cyan-2: #1ad9b0;
  --cyan-dim: #0a8f72;
  --glow: rgba(0, 255, 200, 0.35);
  --text: #edf4f0;
  --muted: #8b9b94;
  --muted-2: #5f7169;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1200px;
  --header-h: 76px;
  --sidebar: 320px;
  --radius: 8px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
ul, ol { margin: 0; padding: 0; }

/* Ambient bg */
body.jf-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 255, 200, 0.07), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(0, 120, 100, 0.08), transparent 45%),
    var(--bg);
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(3, 5, 5, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.header-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}
.site-branding { min-width: 0; flex-shrink: 0; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
  order: 3;
}
@media (min-width: 1101px) {
  .header-actions { order: 0; margin-left: 0; }
  .primary-nav { margin-left: auto; }
}

/* Logo wordmark */
.jf-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--cyan);
  text-decoration: none;
  min-width: 0;
}
.jf-logo:hover { color: #fff; }
.jf-logo__mark {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--cyan);
  filter: drop-shadow(0 0 12px rgba(0, 255, 200, 0.35));
  transition: transform .25s var(--ease), filter .25s;
}
.jf-logo:hover .jf-logo__mark {
  transform: scale(1.04);
  filter: drop-shadow(0 0 18px rgba(0, 255, 200, 0.55));
  color: #fff;
}
.jf-logo__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}
.jf-logo__name {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  letter-spacing: 0.08em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 24px var(--glow);
}
.jf-logo:hover .jf-logo__name { color: var(--cyan); }
.jf-logo__tag {
  font-family: var(--mono);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jf-logo--footer .jf-logo__name { font-size: 1.5rem; }
.custom-logo-link img { max-height: 48px; width: auto; }
.site-title {
  font-family: var(--display);
  font-size: clamp(1.55rem, 3vw, 1.95rem);
  letter-spacing: 0.08em;
  margin: 0;
  line-height: 1;
}
.site-title a {
  color: #fff;
  text-shadow: 0 0 24px var(--glow);
}
.site-title a:hover { color: var(--cyan); }
.site-description {
  font-family: var(--mono);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin: 0.25rem 0 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
}
.search-toggle {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line-strong);
  background: rgba(0, 255, 200, 0.06);
  color: var(--cyan);
  border-radius: 6px;
  cursor: pointer;
  transition: background .2s, color .2s, box-shadow .2s;
}
.search-toggle:hover {
  background: rgba(0, 255, 200, 0.14);
  color: #fff;
  box-shadow: 0 0 16px rgba(0, 255, 200, 0.15);
}
.header-search {
  border-top: 1px solid var(--line);
  background: rgba(3, 5, 5, 0.98);
  padding: 0.85rem 0;
}
.header-search__inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.header-search__inner .search-form {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  margin: 0;
}
.header-search__inner .search-field {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  padding: 0.75rem 1rem;
  font: inherit;
  border-radius: 6px;
}
.header-search__inner .search-submit {
  margin-top: 0;
  width: auto;
  padding: 0.75rem 1.25rem;
}
.header-search__close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 6px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.header-search__close:hover { color: var(--cyan); border-color: var(--cyan); }

/* Clean nav + dropdowns */
.primary-nav > ul {
  list-style: none;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.15rem;
  justify-content: flex-end;
  align-items: center;
}
.primary-nav li {
  margin: 0;
  position: relative;
}
.primary-nav > ul > li > a {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9aaca3;
  display: block;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s;
  white-space: nowrap;
}
.primary-nav > ul > li > a:hover,
.primary-nav > ul > li.current-menu-item > a,
.primary-nav > ul > li.current-menu-ancestor > a,
.primary-nav > ul > li.focus > a {
  color: var(--cyan);
  background: rgba(0, 255, 200, 0.07);
  border-color: var(--line-strong);
  box-shadow: 0 0 18px rgba(0, 255, 200, 0.08);
}
/* Dropdown */
.primary-nav .sub-menu {
  list-style: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  padding: 0.45rem;
  margin: 0;
  background: rgba(8, 12, 10, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 255, 200, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 50;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li.focus > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a {
  font-family: var(--font);
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #c5d4cc;
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  display: block;
  border: 0;
}
.primary-nav .sub-menu a:hover {
  color: #000;
  background: var(--cyan);
}
.primary-nav .menu-item-has-children > a::after {
  content: " ▾";
  font-size: 0.7em;
  opacity: 0.7;
}
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line-strong);
  background: rgba(0, 255, 200, 0.06);
  color: var(--cyan);
  padding: 0.55rem 0.85rem;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
}
.menu-toggle__bars {
  width: 16px;
  height: 12px;
  position: relative;
  display: inline-block;
}
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.menu-toggle__bars::before { top: 0; box-shadow: 0 5px 0 currentColor; }
.menu-toggle__bars::after { bottom: 0; }
/* Wider dropdown for Topics */
.primary-nav .menu-item-has-children .sub-menu {
  min-width: 240px;
  max-height: 70vh;
  overflow-y: auto;
}
@media (max-width: 1100px) {
  .menu-toggle { display: inline-flex; }
  .jf-logo__tag { display: none; }
  .primary-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: rgba(3, 5, 5, 0.99);
    border-bottom: 1px solid var(--line-strong);
    padding: 0.5rem 1rem 1.25rem;
    max-height: 78vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0,0,0,0.55);
    z-index: 150;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav > ul {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0;
  }
  .primary-nav > ul > li > a {
    padding: 0.95rem 0.65rem;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    font-size: 0.75rem;
  }
  .primary-nav .sub-menu {
    display: none;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    border-left: 2px solid var(--line-strong);
    border-radius: 0;
    margin: 0 0 0.35rem 0.85rem;
    padding: 0;
    background: transparent;
    min-width: 0;
    max-height: none;
  }
  .primary-nav .menu-item-has-children.is-open > .sub-menu {
    display: block;
  }
  .primary-nav .sub-menu a {
    padding: 0.65rem 0.55rem;
    border-bottom: 1px solid rgba(0, 255, 200, 0.06);
  }
  .header-inner { position: relative; }
  .header-actions { order: 2; }
}

/* Responsive video embeds */
.jf-video,
.entry-content .wp-block-embed,
.entry-content .wp-block-embed__wrapper,
.entry-content figure.wp-block-embed {
  position: relative;
  width: 100%;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #000;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}
.jf-video {
  aspect-ratio: 16 / 9;
}
.jf-video iframe,
.entry-content .jf-video iframe,
.entry-content iframe[src*="youtube"],
.entry-content iframe[src*="youtu.be"] {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}
.entry-content iframe[src*="youtube"]:not(.jf-video iframe) {
  position: relative;
  width: 100% !important;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  height: auto !important;
  min-height: 280px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.entry-content .wp-video,
.entry-content video.wp-video-shortcode {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #000;
}

/* ========== LAYOUT ========== */
.site-main {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 3.5rem;
  flex: 1;
}
.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar);
  gap: 2rem;
  align-items: start;
}
@media (max-width: 980px) {
  .blog-layout { grid-template-columns: 1fr; }
}

/* ========== HERO ========== */
.blog-hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  background: #000;
  box-shadow: 0 0 0 1px rgba(0, 255, 200, 0.04), 0 20px 60px rgba(0, 0, 0, 0.45);
}
.blog-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(0.85) brightness(0.7);
}
.blog-hero .shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 45%, rgba(0,0,0,0.92) 100%),
    radial-gradient(ellipse 70% 60% at 80% 20%, rgba(0, 255, 200, 0.15), transparent 55%);
}
.blog-hero .inner {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem 1.75rem;
  width: 100%;
}
.blog-hero .kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-2);
  margin: 0 0 0.65rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 20, 16, 0.55);
}
.blog-hero .kicker::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulse 1.8s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.blog-hero h1 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  line-height: 0.98;
  color: #fff;
}
.blog-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 38rem;
  font-size: 1rem;
  line-height: 1.55;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-dim);
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
}

/* ========== POST LIST ========== */
.content-area { min-width: 0; }
.posts-list { display: flex; flex-direction: column; gap: 1.15rem; }

.post-item {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  background: linear-gradient(145deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .3s var(--ease), box-shadow .3s;
}
.post-item:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 255, 200, 0.08);
}
@media (max-width: 680px) {
  .post-item { grid-template-columns: 1fr; }
}
.post-item .thumb {
  display: block;
  min-height: 160px;
  height: 100%;
  background: var(--bg-elev);
  position: relative;
  overflow: hidden;
}
.post-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.post-item:hover .thumb img { transform: scale(1.04); }
.post-item .thumb.placeholder {
  display: grid;
  place-items: center;
  min-height: 160px;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
  background:
    linear-gradient(135deg, rgba(0, 255, 200, 0.06), transparent 60%),
    var(--bg-elev);
}
.post-item .post-body { padding: 1.15rem 1.25rem 1.25rem; display: flex; flex-direction: column; }
.post-item .entry-meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}
.post-item .entry-meta a {
  color: var(--cyan-2);
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 255, 200, 0.04);
}
.post-item .entry-meta a:hover { border-color: var(--cyan); color: #fff; }
.post-item .entry-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  letter-spacing: 0.03em;
  line-height: 1.08;
  margin: 0 0 0.55rem;
  font-weight: 400;
}
.post-item .entry-title a { color: #f4f8f6; }
.post-item .entry-title a:hover { color: var(--cyan); }
.post-item .entry-summary {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 0.85rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-item .more-link {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-2);
  align-self: flex-start;
  border-bottom: 1px solid transparent;
}
.post-item .more-link:hover {
  color: #fff;
  border-bottom-color: var(--cyan);
}

/* Pagination */
.nav-links, .pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2.25rem;
}
.nav-links a, .nav-links span, .page-numbers {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  min-width: 2.4rem;
  height: 2.4rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0 0.55rem;
  background: var(--bg-card);
  border-radius: 4px;
  transition: all .2s;
}
.nav-links .current, .page-numbers.current,
.nav-links a:hover, .page-numbers:hover {
  background: var(--cyan);
  color: #000;
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(0, 255, 200, 0.25);
}

/* ========== SIDEBAR ========== */
.widget-area .widget {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.widget-title {
  font-family: var(--display);
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  margin: 0 0 0.9rem;
  color: #fff;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.55rem;
  font-weight: 400;
}
.widget ul { list-style: none; }
.widget li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(0, 255, 200, 0.05);
  font-size: 0.9rem;
}
.widget li:last-child { border-bottom: 0; }
.widget li a { color: var(--text); }
.widget li a:hover { color: var(--cyan); }
.widget .post-count,
.widget .count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted-2);
}
.widget select,
.widget input[type="search"],
.widget input[type="text"],
.search-form .search-field {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
  border-radius: 4px;
  outline: none;
}
.widget select:focus,
.widget input:focus,
.search-form .search-field:focus {
  border-color: var(--cyan-dim);
  box-shadow: 0 0 0 3px rgba(0, 255, 200, 0.08);
}
.widget button,
.widget input[type="submit"],
.search-form .search-submit {
  margin-top: 0.55rem;
  width: 100%;
  background: var(--cyan);
  color: #000;
  border: 0;
  padding: 0.7rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  font-weight: 600;
  transition: background .2s, box-shadow .2s;
}
.widget button:hover,
.widget input[type="submit"]:hover,
.search-form .search-submit:hover {
  background: #fff;
  box-shadow: 0 0 22px rgba(0, 255, 200, 0.3);
}
.tagcloud a {
  display: inline-block;
  margin: 0.2rem 0.3rem 0.2rem 0;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem !important;
  border-radius: 999px;
  background: rgba(0, 255, 200, 0.03);
  transition: all .2s;
}
.tagcloud a:hover {
  color: var(--cyan);
  border-color: var(--line-strong);
  background: rgba(0, 255, 200, 0.08);
}

/* ========== SINGLE POST ========== */
.single-header {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.single-header .entry-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.75rem;
}
.single-header .entry-meta a {
  color: var(--cyan-2);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.single-header .entry-title {
  font-family: var(--display);
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: 0.03em;
  line-height: 1.02;
  margin: 0;
  font-weight: 400;
  color: #fff;
}
.single-featured {
  margin: 0 0 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.single-featured img { width: 100%; display: block; }

.entry-content {
  font-size: 1.08rem;
  color: #d5e0da;
  overflow: visible;
  line-height: 1.75;
}
.entry-content > * + * { margin-top: 1.15rem; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--display);
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1.12;
  margin-top: 2rem;
  font-weight: 400;
  scroll-margin-top: 100px;
}
.entry-content h2 { font-size: 1.85rem; }
.entry-content h3 { font-size: 1.45rem; }
.entry-content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0, 255, 200, 0.35);
}
.entry-content a:hover { text-decoration-color: var(--cyan); }
.entry-content img {
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}
.entry-content blockquote {
  border-left: 3px solid var(--cyan);
  margin: 0;
  padding: 0.75rem 0 0.75rem 1.2rem;
  color: var(--muted);
  background: rgba(0, 255, 200, 0.03);
  border-radius: 0 6px 6px 0;
}
.entry-content ul, .entry-content ol { padding-left: 1.4rem; }
.entry-content li + li { margin-top: 0.35rem; }
.entry-content iframe,
.entry-content video {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16/9;
  border: 1px solid var(--line);
  background: #000;
  border-radius: 6px;
}

/* Easy Table of Contents — dark theme polish */
.entry-content #ez-toc-container,
#ez-toc-container {
  background: linear-gradient(160deg, #0c110f, #080c0a) !important;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(0, 255, 200, 0.06) !important;
  padding: 1.15rem 1.25rem !important;
  margin: 0 0 1.75rem !important;
  color: var(--text) !important;
}
#ez-toc-container .ez-toc-title {
  font-family: var(--display) !important;
  font-size: 1.25rem !important;
  letter-spacing: 0.06em !important;
  color: var(--cyan) !important;
  font-weight: 400 !important;
}
#ez-toc-container a {
  color: #c8d6cf !important;
  text-decoration: none !important;
  font-size: 0.92rem !important;
  transition: color .2s !important;
}
#ez-toc-container a:hover { color: var(--cyan) !important; }
#ez-toc-container nav ul { list-style: none !important; }
#ez-toc-container .ez-toc-list li { margin: 0.35rem 0 !important; }
#ez-toc-container .ez-toc-toggle svg { fill: var(--cyan) !important; color: var(--cyan) !important; }

.entry-footer {
  margin-top: 2.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.entry-footer a {
  color: var(--cyan-2);
  margin: 0;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 255, 200, 0.04);
}
.entry-footer a:hover {
  border-color: var(--cyan);
  color: #fff;
}

/* Post nav */
.post-navigation .nav-links {
  justify-content: space-between;
  margin-top: 1.75rem;
  gap: 1rem;
}
.post-navigation a {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  max-width: 45%;
  line-height: 1.4;
}
.post-navigation a:hover { color: var(--cyan); }

/* Comments */
.comments-area {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.comments-title, .comment-reply-title {
  font-family: var(--display);
  letter-spacing: 0.05em;
  font-weight: 400;
  font-size: 1.55rem;
  color: #fff;
}
.comment-list { list-style: none; margin: 1.25rem 0; }
.comment-list .comment {
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 1.1rem;
  margin-bottom: 0.75rem;
  border-radius: var(--radius);
}
.comment-form input,
.comment-form textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.7rem 0.85rem;
  font: inherit;
  margin-bottom: 0.65rem;
  border-radius: 4px;
}
.comment-form .submit {
  background: var(--cyan);
  color: #000;
  border: 0;
  padding: 0.75rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  width: auto;
  border-radius: 4px;
  font-weight: 600;
}

/* Archive header */
.page-header {
  margin-bottom: 1.35rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(0, 255, 200, 0.05), transparent 60%), var(--bg-card);
}
.page-header .page-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: 0.05em;
  margin: 0;
  font-weight: 400;
}
.page-header .archive-description {
  color: var(--muted);
  margin: 0.5rem 0 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse 50% 40% at 10% 0%, rgba(0, 255, 200, 0.05), transparent 50%),
    var(--bg-elev);
  padding: 3rem 0 0;
  margin-top: auto;
}
.footer-grid {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem 1.5rem;
  padding-bottom: 2.25rem;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-heading {
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: #fff;
  margin: 0 0 0.85rem;
  font-weight: 400;
}
.footer-tagline {
  margin: 0.85rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  max-width: 22rem;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font);
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li {
  margin: 0 0 0.45rem;
}
.footer-links a {
  color: #a8b8b0;
  font-size: 0.9rem;
  font-family: var(--font);
  letter-spacing: 0.01em;
  text-transform: none;
  transition: color .2s;
}
.footer-links a:hover { color: var(--cyan); }
.footer-social {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.footer-social__btn {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--cyan-2);
  background: rgba(0, 255, 200, 0.04);
  transition: all .2s;
}
.footer-social__btn:hover {
  color: #000;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 255, 200, 0.3);
}
.footer-bottom {
  border-top: 1px solid var(--line);
  width: 100%;
  padding: 1.15rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer-bottom > * {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.footer-bottom {
  flex-direction: column;
  align-items: stretch;
}
.footer-bottom p {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0.15rem auto;
}
.footer-bottom__meta { color: var(--cyan-dim); }
.footer-inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.footer-inner a { color: var(--cyan-2); margin-right: 0.75rem; }
.footer-brand {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.08em;
  color: #fff;
  text-transform: none;
  text-shadow: 0 0 20px var(--glow);
}
.widget-more {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

/* Tax lists */
.jf-tax-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.25rem 1rem;
  margin: 1rem 0 0;
}
.jf-tax-list li {
  border-bottom: 1px solid rgba(0, 255, 200, 0.07);
  padding: 0.5rem 0;
  font-size: 0.95rem;
}
.jf-tax-list a { color: var(--text); }
.jf-tax-list a:hover { color: var(--cyan); }
.jf-tax-list .count {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted-2);
}

/* Yoast breadcrumbs if present */
.yoast-breadcrumbs,
#breadcrumbs {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: 1rem;
}
.yoast-breadcrumbs a { color: var(--cyan-dim); }

/* Misc */
.not-found { text-align: center; padding: 3rem 1rem; }
.not-found h1 {
  font-family: var(--display);
  font-size: 2.4rem;
  letter-spacing: 0.05em;
}
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  height: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; width: 1px;
}
.alignleft { float: left; margin: 0 1rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1rem; }
.aligncenter { display: block; margin: 1rem auto; }
.wp-block-image { margin: 1.25rem 0; }
.custom-logo-link img { max-height: 48px; width: auto; }

/* ========== HOMEPAGE HERO (full bleed) ========== */
.home-hero {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  min-height: min(88vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--line-strong);
}
.home-hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.home-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  transform: scale(1.02);
  filter: saturate(0.9) brightness(0.55) contrast(1.05);
}
.home-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.25) 35%, rgba(0,0,0,0.75) 70%, rgba(3,5,5,0.98) 100%),
    linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.55) 100%),
    radial-gradient(ellipse 70% 55% at 70% 30%, rgba(0, 255, 200, 0.16), transparent 60%);
}
.home-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 255, 200, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 200, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 40% 60%, #000 10%, transparent 70%);
  pointer-events: none;
  opacity: 0.7;
}
.home-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 0 3.5rem;
}
.home-hero__inner {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  max-width: 760px;
  margin-left: max(1rem, calc((100% - min(var(--max), calc(100% - 2rem))) / 2));
}
.home-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-2);
  margin: 0 0 1rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(0, 12, 10, 0.65);
  backdrop-filter: blur(8px);
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 1.7s ease infinite;
}
.home-hero__cat {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #000;
  background: var(--cyan);
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.85rem;
  font-weight: 600;
}
.home-hero__cat:hover { background: #fff; color: #000; }
.home-hero__title {
  font-family: var(--display);
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: 0.03em;
  line-height: 0.95;
  margin: 0 0 1rem;
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,0,0.8), 0 0 40px rgba(0, 255, 200, 0.12);
  max-width: 14ch;
}
.home-hero__title a { color: inherit; }
.home-hero__title a:hover { color: var(--cyan); }
.home-hero__excerpt {
  margin: 0 0 1.5rem;
  color: #b8c8c0;
  font-size: 1.08rem;
  line-height: 1.55;
  max-width: 36rem;
}
.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.95rem 1.4rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all .2s;
}
.btn-primary {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 28px rgba(0, 255, 200, 0.25);
}
.btn-primary:hover {
  background: #fff;
  color: #000;
  box-shadow: 0 0 36px rgba(0, 255, 200, 0.4);
}
.btn-ghost {
  background: rgba(0,0,0,0.4);
  color: var(--cyan);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover {
  background: rgba(0, 255, 200, 0.1);
  color: #fff;
  border-color: var(--cyan);
}

.home-wrap {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}
.home-featured {
  padding: 2.5rem 0 1rem;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .featured-grid { grid-template-columns: 1fr; }
  .home-hero { min-height: min(78vh, 640px); }
  .home-hero__title { max-width: none; }
}

/* Featured overlay cards */
.feat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 280px;
  background: var(--bg-card);
  transition: transform .3s var(--ease), border-color .25s, box-shadow .3s;
}
.feat-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 20px 50px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,255,200,0.1);
}
.feat-card__media {
  display: block;
  position: absolute;
  inset: 0;
  color: inherit;
}
.feat-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.feat-card:hover .feat-card__media img { transform: scale(1.06); }
.feat-card__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.92) 100%);
}
.feat-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1.25rem;
  z-index: 2;
}
.feat-card__cat {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.45rem;
}
.feat-card__title {
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  line-height: 1.05;
  margin: 0 0 0.35rem;
  color: #fff;
  font-weight: 400;
}
.feat-card__meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8a9c94;
}

/* Grid cards for latest */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}
@media (max-width: 700px) {
  .posts-grid { grid-template-columns: 1fr; }
}
.grid-card {
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, var(--bg-card), var(--bg-elev));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .25s, box-shadow .3s;
  height: 100%;
}
.grid-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.grid-card__media {
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--bg-elev);
  overflow: hidden;
  position: relative;
}
.grid-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s var(--ease);
}
.grid-card:hover .grid-card__media img { transform: scale(1.05); }
.grid-card__media.is-empty {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(0,255,200,0.08), transparent 55%),
    var(--bg-elev);
}
.grid-card__placeholder {
  font-family: var(--display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--cyan-dim);
  opacity: 0.5;
}
.grid-card__body {
  padding: 1.1rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.grid-card__meta {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-bottom: 0.5rem;
}
.grid-card__cat {
  color: var(--cyan-2);
  border: 1px solid var(--line);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(0,255,200,0.05);
}
.grid-card__title {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  line-height: 1.08;
  margin: 0 0 0.5rem;
  font-weight: 400;
}
.grid-card__title a { color: #f2f7f4; }
.grid-card__title a:hover { color: var(--cyan); }
.grid-card__excerpt {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
  flex: 1;
  line-height: 1.5;
}
.grid-card__more {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan-2);
  align-self: flex-start;
}
.grid-card__more:hover { color: #fff; }

/* When home-hero is used, site-main shouldn't double-pad top oddly */
body.home .site-main {
  padding-top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
}
body.home .home-wrap.blog-layout {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3.5rem;
}

/* ========== SHARE BUTTONS ========== */
.jf-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  margin: 1.15rem 0 0;
  padding: 0.85rem 0 0;
}
.single-share--top {
  border-top: 1px solid var(--line);
  margin-top: 1.25rem;
}
.single-share--bottom {
  margin-top: 1.75rem;
  padding: 1.15rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(0,255,200,0.04), transparent 55%), var(--bg-card);
}
.jf-share__label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.jf-share__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.jf-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 255, 200, 0.04);
  color: #c5d4cc !important;
  font-family: var(--font);
  font-size: 0.78rem;
  text-decoration: none !important;
  transition: all .2s;
  cursor: pointer;
}
.jf-share__btn:hover {
  color: #000 !important;
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0, 255, 200, 0.25);
}
.jf-share__btn.is-copied {
  background: var(--cyan);
  color: #000 !important;
  border-color: var(--cyan);
}
.jf-share__btn .share-label { line-height: 1; }
@media (max-width: 520px) {
  .jf-share__btn .share-label { display: none; }
  .jf-share__btn { padding: 0.55rem; }
}

/* Related */
.related-posts {
  margin-top: 2.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

/* Better empty media for feature cards */
.feat-card__media.is-empty {
  background:
    linear-gradient(135deg, rgba(0,255,200,0.1), transparent 55%),
    var(--bg-elev);
}
.feat-card__media.is-empty::before {
  content: "JF";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 3rem;
  letter-spacing: 0.12em;
  color: var(--cyan-dim);
  opacity: 0.35;
  z-index: 1;
}

/* Entry content broken images */
.entry-content img[src=""],
.entry-content img:not([src]) { display: none; }

/* Archive restore note on thin posts */
.jf-archive-note {
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--cyan);
  background: rgba(0, 255, 200, 0.05);
  border-radius: 0 8px 8px 0;
  padding: 0.85rem 1.1rem;
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.jf-archive-note strong { color: var(--cyan-2); }
