/* ─────────────────────────────────────────────────────────────
   ARTICLE TYPOGRAPHY
───────────────────────────────────────────────────────────── */
.entry-content h2 {
  padding-left: 0;
}

.entry-content h2::before {
  display: none;
}

.section-heading {
  font-family: var(--f-heading);
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 600;
  color: var(--text-hi);
  position: relative;
  padding-left: var(--s5);
}

.section-heading::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.1em; bottom: 0.1em;
  width: 2px;
  border-radius: 2px;
  background: rgba(1, 191, 255, 0.6);
}

.entry-content > p:first-of-type {
  font-size: 1.2rem;
  font-weight: 300;
  color: var(--text-hi);
  line-height: 1.9;
  letter-spacing: 0.01em;
  margin-bottom: var(--s6);
}

/* ─────────────────────────────────────────────────────────────
   CONTACT PAGE
───────────────────────────────────────────────────────────── */
.contact-section { padding: 0; }

.contact-container { max-width: 680px; }

.contact-intro {
  color: var(--text-mid);
  margin-bottom: var(--s7);
}

.contact-closing {
  margin-top: var(--s5);
  font-size: 0.88rem;
  color: var(--text-lo);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
}

.form-row--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.form-group label {
  font-family: var(--f-display);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-lo);
}

.form-group label span { color: var(--cyan); }

.form-submit { margin-top: var(--s2); }

.btn-submit {
  -webkit-appearance: none;
  appearance: none;
  font-family: var(--f-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0 2.8em;
  height: 52px;
  border-radius: var(--r-sm);
  border: none;
  background: linear-gradient(120deg, var(--cyan) 0%, #0099CC 100%);
  color: var(--bg-0);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
  box-shadow:
    0 0 0 1px rgba(1, 191, 255, 0.25),
    0 4px 18px rgba(1, 191, 255, 0.18);
  transition: transform var(--ease-base), box-shadow var(--ease-base);
}

/* shimmer sweep */
.btn-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    108deg,
    transparent 35%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 65%
  );
  transform: translateX(-130%);
  transition: transform 550ms ease;
  pointer-events: none;
}

/* arrow */
.btn-submit::after {
  content: '→';
  display: inline-block;
  transition: transform var(--ease-base);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px var(--cyan),
    0 8px 32px rgba(1, 191, 255, 0.30),
    0 2px 8px rgba(0, 0, 0, 0.35);
}

.btn-submit:hover::before { transform: translateX(130%); }
.btn-submit:hover::after  { transform: translateX(5px); }

.btn-submit:active {
  transform: translateY(0);
  box-shadow:
    0 0 0 1px var(--cyan),
    0 2px 12px rgba(1, 191, 255, 0.18);
}

.contact-success {
  background: var(--bg-2);
  border-left: 2px solid var(--green);
  color: var(--text-hi);
  padding: var(--s5) var(--s6);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.95rem;
}

.contact-error {
  background: var(--bg-2);
  border-left: 2px solid #E05555;
  color: var(--text-hi);
  padding: var(--s4) var(--s5);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.88rem;
  margin-bottom: var(--s5);
}

@media (max-width: 540px) {
  .form-row--2col { grid-template-columns: 1fr; }
}

.da-honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────
   FRONT PAGE & ARCHIVE — LAYOUT OVERRIDES
───────────────────────────────────────────────────────────── */

/* Beat the (1,0,0) specificity of #primary in the MAIN LAYOUT block */
#primary.fp-main,
#primary.archive-main {
  max-width: none;
  padding: 0;
}

/* ─────────────────────────────────────────────────────────────
   FRONT PAGE — HERO
───────────────────────────────────────────────────────────── */

.fp-hero {
  position: relative;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-dim);
  overflow: hidden;
}

.fp-hero-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: var(--s8) var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s7);
  align-items: center;
}

.fp-hero-image {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  aspect-ratio: 16 / 9;
}

.fp-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  border: none;
  border-radius: 0;
  box-shadow: none;
  transition: transform var(--ease-slow);
}

.fp-hero-image:hover .fp-hero-img { transform: scale(1.03); }

.fp-hero-content {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.fp-hero-title {
  font-family: var(--f-heading);
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: var(--text-hi);
  text-shadow: none;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.fp-hero-title-link {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease-fast);
}

.fp-hero-title-link:hover {
  color: var(--cyan);
  text-shadow: none;
}

.fp-hero-excerpt {
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: 0;
  max-width: 52ch;
}

.fp-hero-meta {
  display: flex;
  gap: var(--s4);
  align-items: center;
  font-family: var(--f-display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-lo);
}

.fp-hero-read-more { align-self: flex-start; }

@media (max-width: 900px) {
  .fp-hero-inner {
    grid-template-columns: 1fr;
    gap: var(--s6);
    padding: var(--s7) var(--pad-x);
  }
  .fp-hero-image { order: -1; }
}

/* ─────────────────────────────────────────────────────────────
   FRONT PAGE — FILTER BAR
───────────────────────────────────────────────────────────── */

.fp-filter-section {
  position: sticky;
  top: 57px;
  z-index: 100;
  background: rgba(11, 16, 26, 0.92);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border-dim);
}

body.admin-bar .fp-filter-section { top: 89px; }

@media screen and (max-width: 782px) {
  body.admin-bar .fp-filter-section { top: 103px; }
}

.fp-filter-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  overflow-x: auto;
  scrollbar-width: none;
}

.fp-filter-inner::-webkit-scrollbar { display: none; }

.filter-bar {
  display: flex;
  gap: var(--s3);
  padding: var(--s4) 0;
  white-space: nowrap;
}

.filter-btn {
  font-family: var(--f-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.5em 1.2em;
  min-height: 36px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-mid);
  cursor: pointer;
  transition:
    color var(--ease-fast),
    border-color var(--ease-fast),
    background-color var(--ease-fast),
    box-shadow var(--ease-fast);
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

.filter-btn.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--bg-0);
  box-shadow: var(--glow-cyan);
}

.filter-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────
   FRONT PAGE — POSTS GRID
───────────────────────────────────────────────────────────── */

.fp-grid-section {
  padding: var(--s7) 0 var(--s8);
}

.fp-grid-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  margin-bottom: var(--s7);
}

.post-card--featured { grid-column: span 2; }

.post-card--featured .post-card-image { aspect-ratio: 21 / 9; }

.post-card--featured .post-card-title {
  font-size: 1.25rem;
  -webkit-line-clamp: 3;
}

.post-card--hidden { display: none; }

.load-more-wrap {
  display: flex;
  justify-content: center;
  gap: var(--s3);
  flex-wrap: wrap;
  margin-top: var(--s6);
}

@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--featured { grid-column: span 2; }
}

@media (max-width: 600px) {
  .posts-grid { grid-template-columns: 1fr; gap: var(--s5); }
  .post-card--featured { grid-column: span 1; }
  .post-card--featured .post-card-image { aspect-ratio: 16 / 9; }
}

/* ─────────────────────────────────────────────────────────────
   ARCHIVE / CATEGORY PAGES
───────────────────────────────────────────────────────────── */

.archive-header {
  padding: var(--s8) 0 var(--s7);
  border-bottom: 1px solid var(--border-dim);
}

.archive-header-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.archive-eyebrow {
  font-family: var(--f-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: var(--s3);
}

.archive-title {
  font-family: var(--f-heading);
  font-size: clamp(1.5rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--text-hi);
  text-shadow: none;
  border-bottom: none;
  padding-bottom: 0;
  margin-top: 0;
  margin-bottom: var(--s4);
}

.archive-description {
  color: var(--text-mid);
  font-size: 1rem;
  max-width: 60ch;
  margin-bottom: 0;
}

.archive-grid-wrap { padding: var(--s7) 0 var(--s8); }

/* ─────────────────────────────────────────────────────────────
   SINGLE POST — READING TYPOGRAPHY
───────────────────────────────────────────────────────────── */

/* Constrain reading column to optimal 65-char measure */
.single-entry .entry-content {
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
}

/* Generous paragraph rhythm */
.single-entry .entry-content p {
  margin-bottom: var(--s6);
  line-height: 1.82;
}

/* Lede — slightly larger, softer weight, extra gap below */
.single-entry .entry-content > p:first-of-type {
  font-size: clamp(1.1rem, 2.5vw, 1.22rem);
  font-weight: 400;
  line-height: 1.85;
  color: rgba(216, 227, 238, 0.92);
  letter-spacing: 0.008em;
  margin-bottom: var(--s7);
}

/* Heading vertical breathing inside articles */
.single-entry .entry-content h2 {
  margin-top: var(--s8);
  margin-bottom: var(--s5);
  font-size: clamp(1.25rem, 3.5vw, 1.65rem);
}

.single-entry .entry-content h3 {
  margin-top: var(--s7);
  margin-bottom: var(--s4);
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
}

.single-entry .entry-content h4 {
  margin-top: var(--s6);
  margin-bottom: var(--s3);
}

/* List breathing */
.single-entry .entry-content ul,
.single-entry .entry-content ol {
  margin-bottom: var(--s6);
}

.single-entry .entry-content li {
  margin-bottom: var(--s3);
  line-height: 1.8;
}

/* Inline code — compensate for JetBrains Mono's wider metrics */
.single-entry .entry-content :not(pre) > code {
  font-size: 0.87em;
  letter-spacing: -0.01em;
}

/* Entry meta — more separation from content */
.single .entry-meta {
  margin-bottom: var(--s7);
  gap: var(--s4);
}

/* Entry footer with tags and post navigation */
.single-entry .entry-footer {
  margin-top: var(--s8);
  padding-top: var(--s6);
  border-top: 1px solid var(--border-dim);
}

.single-entry .tags-links {
  margin-bottom: var(--s5);
  font-size: 0.82rem;
  color: var(--text-lo);
}

.single-entry .tags-links a {
  display: inline-block;
  margin: 0.2em 0.25em;
  padding: 0.25em 0.7em;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  color: var(--text-mid);
  text-decoration: none;
  transition: color var(--ease-fast), border-color var(--ease-fast);
}

.single-entry .tags-links a:hover {
  color: var(--cyan);
  border-color: var(--cyan);
}

/* ─────────────────────────────────────────────────────────────
   SINGLE POST — prev/next navigation (title-first design)
───────────────────────────────────────────────────────────── */
.navigation.post-navigation {
  margin: var(--s7) 0 0;
}

.navigation.post-navigation .nav-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s5);
  justify-content: initial;
  flex-wrap: initial;
  margin: 0;
}

.navigation.post-navigation .nav-previous,
.navigation.post-navigation .nav-next {
  min-width: 0;
}

.navigation.post-navigation .nav-next {
  text-align: right;
}

.navigation.post-navigation .nav-previous a,
.navigation.post-navigation .nav-next a {
  display: flex;
  flex-direction: column;
  gap: 0.45em;
  padding: var(--s5);
  height: 100%;
  font-size: 1rem;
  letter-spacing: normal;
  text-transform: none;
  color: inherit;
}

.navigation.post-navigation .nav-previous a {
  align-items: flex-start;
}

.navigation.post-navigation .nav-next a {
  align-items: flex-end;
}

.navigation.post-navigation .nav-direction {
  font-family: var(--f-display);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: 0.7;
  transition: opacity var(--ease-fast);
}

.navigation.post-navigation .nav-title {
  font-family: var(--f-heading);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-hi);
  line-height: 1.35;
  letter-spacing: -0.01em;
  transition: color var(--ease-fast);
}

.navigation.post-navigation .nav-previous a:hover .nav-title,
.navigation.post-navigation .nav-next a:hover .nav-title {
  color: var(--cyan);
}

.navigation.post-navigation .nav-previous a:hover .nav-direction,
.navigation.post-navigation .nav-next a:hover .nav-direction {
  opacity: 1;
}

@media (max-width: 520px) {
  .navigation.post-navigation .nav-links {
    grid-template-columns: 1fr;
  }
  .navigation.post-navigation .nav-next {
    text-align: left;
  }
  .navigation.post-navigation .nav-next a {
    align-items: flex-start;
  }
}

/* ─────────────────────────────────────────────────────────────
   ABOUT PAGE
───────────────────────────────────────────────────────────── */

#primary.about-main {
  max-width: none;
  padding: 0;
}

.about-section-inner {
  max-width: var(--wide-w);
  margin: 0 auto;
  padding: var(--s8) var(--pad-x);
}

/* Shared eyebrow label */
.about-eyebrow {
  font-family: var(--f-display);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--cyan);
  display: block;
  margin-bottom: var(--s4);
}

/* ── Intro ── */
.about-intro {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-dim);
}

.about-intro-inner {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: var(--s8) var(--pad-x);
}

.about-lead {
  font-size: clamp(1.1rem, 2.5vw, 1.22rem);
  font-weight: 400;
  line-height: 1.82;
  color: var(--text-hi);
  margin-bottom: var(--s6);
}

.about-body p {
  color: var(--text-mid);
  margin-bottom: var(--s5);
}

.about-body p:last-child { margin-bottom: 0; }

/* ── Story ── */
.about-story {
  border-bottom: 1px solid var(--border-dim);
}

.about-story p {
  color: var(--text-mid);
  margin-bottom: var(--s5);
}

.about-story p:last-child { margin-bottom: 0; }

/* ── Services ── */
.about-services {
  border-bottom: 1px solid var(--border-dim);
}

/* ── Credentials ── */
.about-credentials {
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-dim);
}

.about-credentials-intro {
  color: var(--text-mid);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.credential-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s5);
}

.credential-tag {
  font-family: var(--f-display);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 0.5em 1.1em;
  display: inline-block;
}

/* ── Location ── */
.about-location {
  border-bottom: 1px solid var(--border-dim);
}

.about-location-text {
  color: var(--text-mid);
  font-size: 1rem;
  max-width: 52ch;
  margin-bottom: 0;
}

/* Reset h2 margin/padding inside about sections — each section provides its own spacing */
.about-section-inner > h2,
.about-intro-inner > h2 {
  margin-top: 0;
  margin-bottom: var(--s6);
}

/* CTA h2 inside about-main: suppress left bar and margins */
.about-main .cta-section h2 {
  margin-top: 0;
  padding-left: 0;
}

.about-main .cta-section h2::before {
  display: none;
}

/* btn-submit used as anchor in CTA */
a.btn-submit {
  text-decoration: none;
  color: var(--bg-0);
}

a.btn-submit:hover {
  text-shadow: none;
  color: var(--bg-0);
}

@media (max-width: 600px) {
  .about-intro-inner,
  .about-section-inner {
    padding: var(--s7) var(--pad-x);
  }
}
