/*
Theme Name: Golden Helix Blog
Theme URI: https://www.goldenhelix.com/blog
Author: Golden Helix, Inc.
Author URI: https://www.goldenhelix.com
Description: Minimal blog theme for the Golden Helix Blog. All navigation, footer, forms, analytics, and fonts are provided by the embed bundle (gh-embed.js/css). This theme handles only blog content layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: Proprietary
License URI: https://www.goldenhelix.com
Text Domain: gh-blog
*/


/* ==========================================================================
   1. Design Tokens (CSS Custom Properties)
   ========================================================================== */

:root {
  /* Primary Blue */
  --primary-50: #eff8ff;
  --primary-100: #dcefff;
  --primary-200: #b2e0ff;
  --primary-300: #6dccff;
  --primary-400: #20b4ff;
  --primary-500: #20A2F3;
  --primary-600: #0284c7;
  --primary-700: #0369a1;
  --primary-800: #075985;
  --primary-900: #0c4a6e;

  /* Brand Orange */
  --brand-50: #fef6ec;
  --brand-100: #fdebd3;
  --brand-200: #fbd5a6;
  --brand-300: #f8ba74;
  --brand-400: #f6a04a;
  --brand-500: #F39420;
  --brand-600: #e07a0e;
  --brand-700: #bb5f0c;
  --brand-800: #954c11;
  --brand-900: #7a3f11;

  /* Gray Scale */
  --gray-10: #F9FAFA;
  --gray-25: #F6F8F8;
  --gray-50: #EDF0F2;
  --gray-100: #D0D8DD;
  --gray-200: #B0BCC4;
  --gray-300: #8FA1AE;
  --gray-400: #788D9B;
  --gray-500: #607A8A;
  --gray-600: #546A78;
  --gray-700: #455763;
  --gray-800: #36454E;
  --gray-900: #253037;

  /* Slate Scale */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;

  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;
  --leading-loose: 1.8;

  /* Layout */
  --container-max: 1280px;
  --content-max: 720px;
  --nav-height: 80px;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Animation */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-card: 500ms;
  --duration-fast: 200ms;
}


/* ==========================================================================
   2. Minimal Reset
   ========================================================================== */

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

body {
  margin: 0;
  padding: 0;
}

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

a {
  text-decoration: none;
}


/* ==========================================================================
   3. Base Typography
   ========================================================================== */

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--slate-700);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--slate-900);
  line-height: var(--leading-tight);
  font-weight: 700;
}


/* ==========================================================================
   4. Layout
   ========================================================================== */

/* Reserve space for embed nav to prevent CLS */
#gh-nav {
  min-height: var(--nav-height);
}

.gh-main {
  padding: 4rem 0;
}

.gh-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .gh-container { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .gh-container { padding: 0 2rem; }
}


/* ==========================================================================
   5. Page Header (listing pages)
   ========================================================================== */

.gh-page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.gh-page-header__tagline {
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--slate-400);
  margin: 0 0 0.25rem;
  letter-spacing: 0.01em;
}

.gh-page-header__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 0.5rem;
}

.gh-page-header__subtitle {
  font-size: var(--text-lg);
  color: var(--slate-500);
  margin: 0;
}

@media (max-width: 639px) {
  .gh-page-header__title {
    font-size: var(--text-3xl);
  }
}


/* ==========================================================================
   6. Topic Navigation
   ========================================================================== */

.gh-topic-nav {
  margin-bottom: 2.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;  /* Firefox */
}

.gh-topic-nav::-webkit-scrollbar {
  display: none;
}

.gh-topic-nav__list {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.gh-topic-nav__item {
  display: inline-block;
  padding: 0.375rem 1rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-600);
  background: var(--gray-25);
  border-radius: var(--radius-full);
  text-decoration: none;
  white-space: nowrap;
  transition: all var(--duration-fast);
}

.gh-topic-nav__item:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.gh-topic-nav__item--active {
  background: var(--primary-600);
  color: #fff;
}

.gh-topic-nav__item--active:hover {
  background: var(--primary-700);
  color: #fff;
}

/* Inline search in topic nav */
.gh-topic-nav__search {
  display: flex;
  align-items: center;
  margin-left: 0.25rem;
}

.gh-topic-nav__search-input {
  width: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--slate-900);
  background: var(--gray-25);
  outline: none;
  transition: width 0.25s ease, padding 0.25s ease, border-color 0.25s ease;
}

.gh-topic-nav__search-input:focus,
.gh-topic-nav__search:focus-within .gh-topic-nav__search-input {
  width: 180px;
  padding: 0.375rem 0.75rem;
  border-color: var(--slate-200);
  background: #fff;
}

.gh-topic-nav__search-input::placeholder {
  color: var(--slate-400);
}

.gh-topic-nav__search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--gray-25);
  color: var(--slate-500);
  cursor: pointer;
  transition: all var(--duration-fast);
  flex-shrink: 0;
}

.gh-topic-nav__search-btn:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

.gh-topic-nav__search:focus-within .gh-topic-nav__search-btn {
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: var(--primary-600);
  color: #fff;
}

.gh-topic-nav__search:focus-within .gh-topic-nav__search-btn:hover {
  background: var(--primary-700);
}

@media (max-width: 639px) {
  .gh-topic-nav__search-input:focus,
  .gh-topic-nav__search:focus-within .gh-topic-nav__search-input {
    width: 140px;
  }
}


/* ==========================================================================
   6b. Narrow Container (for post lists)
   ========================================================================== */

.gh-container--narrow {
  max-width: 960px;
}


/* ==========================================================================
   7. Post List (single-column blog listing)
   ========================================================================== */

.gh-post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* --- List item --- */

.gh-post-item {
  padding: 2rem 0;
  border-bottom: 1px solid var(--slate-200);
}

.gh-post-item:first-child {
  padding-top: 0;
}

.gh-post-item__link {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* Header: title + meta */
.gh-post-item__header {
  margin-bottom: 1rem;
}

.gh-post-item__title {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: var(--leading-snug);
  color: var(--primary-600);
  margin: 0;
  transition: color var(--duration-fast);
}

.gh-post-item__link:hover .gh-post-item__title {
  color: var(--primary-700);
}

.gh-post-item__meta {
  margin-top: 0.375rem;
  font-size: var(--text-sm);
  color: var(--slate-400);
}

/* Content row: image left + excerpt right */
.gh-post-item__content {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.gh-post-item__image-wrap {
  flex-shrink: 0;
  width: 240px;
  height: 160px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.gh-post-item__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  transition: transform 500ms ease-out;
}

.gh-post-item__link:hover .gh-post-item__image {
  transform: scale(1.03);
}

.gh-post-item__body {
  flex: 1;
  min-width: 0;
}

.gh-post-item__excerpt {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--slate-600);
}

.gh-post-item__readmore {
  margin-top: 0.75rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-500);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--duration-fast);
}

.gh-post-item__link:hover .gh-post-item__readmore {
  color: var(--primary-600);
}

.gh-post-item__arrow {
  display: inline-block;
  transition: transform var(--duration-fast);
}

.gh-post-item__link:hover .gh-post-item__arrow {
  transform: translateX(4px);
}

/* Mobile: stack image above excerpt */
@media (max-width: 639px) {
  .gh-post-item__content {
    flex-direction: column;
  }

  .gh-post-item__image-wrap {
    width: 100%;
    height: 200px;
  }

  .gh-post-item__title {
    font-size: var(--text-xl);
  }
}


/* ==========================================================================
   8. Pagination
   ========================================================================== */

.gh-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.25rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

.gh-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-600);
  background: transparent;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.gh-pagination .page-numbers:hover {
  background: var(--slate-50);
  color: var(--slate-900);
  border-color: var(--slate-300);
}

.gh-pagination .page-numbers.current {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
  font-weight: 600;
}

.gh-pagination .page-numbers.dots {
  border: none;
  background: none;
  cursor: default;
  color: var(--slate-400);
}

.gh-pagination .page-numbers.prev,
.gh-pagination .page-numbers.next {
  font-weight: 600;
}


/* ==========================================================================
   9. Single Post
   ========================================================================== */

.gh-single {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .gh-single { padding: 0 1.5rem; }
}

@media (min-width: 1024px) {
  .gh-single { padding: 0 2rem; }
}

/* Back link */
.gh-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-500);
  text-decoration: none;
  margin-bottom: 2rem;
  transition: color var(--duration-fast);
}

.gh-back-link:hover {
  color: var(--primary-600);
}

/* Post header */
.gh-single__header {
  max-width: var(--content-max);
  margin: 0 auto 2rem;
}

.gh-single__title {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 1rem;
  line-height: var(--leading-tight);
}

@media (max-width: 639px) {
  .gh-single__title {
    font-size: var(--text-3xl);
  }
}

.gh-single__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--slate-500);
}

.gh-single__meta a {
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.gh-single__meta a:hover {
  color: var(--primary-700);
}

.gh-single__meta-sep {
  color: var(--slate-300);
}

/* Featured image */
.gh-single__featured {
  max-width: 960px;
  margin: 0 auto 3rem;
}

.gh-single__featured img {
  width: 100%;
  border-radius: var(--radius-xl);
  object-fit: cover;
}


/* ==========================================================================
   10. Entry Content (prose typography)
   ========================================================================== */

.entry-content {
  max-width: var(--content-max);
  margin: 0 auto;
}

.entry-content > * + * {
  margin-top: 1.5rem;
}

.entry-content h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.entry-content h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.entry-content h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.entry-content p {
  line-height: var(--leading-loose);
}

.entry-content a {
  color: var(--primary-600);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--duration-fast);
}

.entry-content a:hover {
  color: var(--primary-700);
}

.entry-content strong {
  font-weight: 600;
  color: var(--slate-900);
}

/* Lists */
.entry-content ul,
.entry-content ol {
  padding-left: 1.5rem;
  line-height: var(--leading-loose);
}

.entry-content ul {
  list-style-type: disc;
}

.entry-content ol {
  list-style-type: decimal;
}

.entry-content li + li {
  margin-top: 0.5rem;
}

.entry-content li > ul,
.entry-content li > ol {
  margin-top: 0.5rem;
}

/* Blockquotes */
.entry-content blockquote {
  border-left: 4px solid var(--primary-200);
  padding: 1rem 1.5rem;
  margin-left: 0;
  margin-right: 0;
  font-style: italic;
  color: var(--slate-600);
  background: var(--slate-50);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.entry-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.entry-content code {
  font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875em;
  background: var(--gray-10);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
  color: var(--slate-800);
}

.entry-content pre {
  background: var(--gray-10);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  line-height: 1.6;
}

.entry-content pre code {
  background: none;
  padding: 0;
  font-size: var(--text-sm);
}

/* Images */
.entry-content img {
  border-radius: var(--radius-xl);
  margin: 2rem 0;
}

.entry-content figure {
  margin: 2rem 0;
}

.entry-content figcaption {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--slate-500);
  margin-top: 0.75rem;
}

/* Tables */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: 2rem 0;
}

.entry-content th {
  background: var(--gray-25);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--gray-100);
  color: var(--slate-800);
}

.entry-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-50);
}

.entry-content tr:last-child td {
  border-bottom: none;
}

/* Horizontal rule */
.entry-content hr {
  border: none;
  border-top: 1px solid var(--slate-200);
  margin: 3rem 0;
}

/* WP alignment classes */
.entry-content .alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  max-width: 50%;
}

.entry-content .alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  max-width: 50%;
}

.entry-content .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignwide {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.entry-content .alignfull {
  max-width: none;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

/* WP gallery */
.entry-content .wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}

/* WP embed & video */
.entry-content .wp-block-embed,
.entry-content iframe {
  max-width: 100%;
}

.entry-content .wp-block-embed__wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.entry-content .wp-block-embed__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* WordPress block buttons — match SPA .btn-primary style */
.entry-content .wp-block-buttons {
  margin: 2rem 0;
}

.entry-content .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--primary-600) !important;
  color: #fff !important;
  font-weight: 600;
  font-size: var(--text-base);
  font-family: var(--font-sans);
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: all var(--duration-fast);
  cursor: pointer;
}

.entry-content .wp-block-button__link:hover {
  background: var(--primary-700) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  color: #fff !important;
  text-decoration: none;
}

.entry-content .wp-block-button__link:active {
  background: var(--primary-800) !important;
}

/* Outline button variant */
.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--primary-600) !important;
  border: 2px solid var(--primary-600);
  box-shadow: none;
}

.entry-content .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--primary-50) !important;
}

/* Clearfix for floats */
.entry-content::after {
  content: '';
  display: table;
  clear: both;
}


/* ==========================================================================
   11. Post Tags
   ========================================================================== */

.gh-tags {
  max-width: var(--content-max);
  margin: 3rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.gh-tags__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--slate-700);
  margin-right: 0.25rem;
  line-height: 2;
}

.gh-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--slate-600);
  background: var(--gray-25);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.gh-tag:hover {
  background: var(--gray-50);
  color: var(--primary-600);
}


/* ==========================================================================
   12a. Related Posts
   ========================================================================== */

.gh-related {
  max-width: var(--content-max);
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.gh-related__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 1.5rem;
}

.gh-related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.gh-related__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  transition: transform var(--duration-card) var(--ease-spring);
}

.gh-related__card:hover {
  transform: translateY(-4px);
}

.gh-related__image-wrap {
  width: 100%;
  padding-top: 100%; /* 1:1 square */
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--gray-25);
  margin-bottom: 0.75rem;
}

.gh-related__image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-card) var(--ease-spring);
}

.gh-related__card:hover .gh-related__image {
  transform: scale(1.03);
}

.gh-related__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--gray-50);
}

.gh-related__card-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-700);
  line-height: 1.4;
  margin: 0;
  transition: color var(--duration-fast);
}

.gh-related__card:hover .gh-related__card-title {
  color: var(--primary-600);
}

@media (max-width: 767px) {
  .gh-related__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}


/* ==========================================================================
   12b. Author Box
   ========================================================================== */

.gh-author-box {
  max-width: var(--content-max);
  margin: 2.5rem auto 0;
  padding: 2rem 0;
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.gh-author-box__avatar {
  flex-shrink: 0;
}

.gh-author-box__img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.gh-author-box__name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 0.5rem;
}

.gh-author-box__bio {
  font-size: var(--text-sm);
  color: var(--slate-600);
  line-height: 1.7;
  margin: 0 0 0.75rem;
}

.gh-author-box__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.gh-author-box__link:hover {
  color: var(--primary-700);
}

@media (max-width: 639px) {
  .gh-author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}


/* ==========================================================================
   12c. Post Navigation (prev/next)
   ========================================================================== */

.gh-post-nav {
  max-width: var(--content-max);
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.gh-post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.gh-post-nav__item--next {
  text-align: right;
}

.gh-post-nav__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--slate-400);
}

.gh-post-nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--primary-600);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.gh-post-nav__link:hover {
  color: var(--primary-700);
}

@media (max-width: 639px) {
  .gh-post-nav {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .gh-post-nav__item--next {
    text-align: left;
  }
}


/* ==========================================================================
   13. Search Form
   ========================================================================== */

.gh-search-form {
  display: flex;
  max-width: 480px;
}

.gh-search-form__input {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  border: 1px solid var(--slate-200);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  color: var(--slate-900);
  background: #fff;
  outline: none;
  transition: border-color var(--duration-fast);
}

.gh-search-form__input::placeholder {
  color: var(--slate-400);
}

.gh-search-form__input:focus {
  border-color: var(--primary-500);
}

.gh-search-form__button {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  color: #fff;
  background: var(--primary-600);
  border: 1px solid var(--primary-600);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  cursor: pointer;
  transition: background var(--duration-fast);
}

.gh-search-form__button:hover {
  background: var(--primary-700);
  border-color: var(--primary-700);
}

/* Centered search (used on 404 and no-results) */
.gh-search-form--centered {
  margin: 0 auto;
}


/* ==========================================================================
   14. No Results / 404
   ========================================================================== */

.gh-no-results {
  text-align: center;
  padding: 4rem 0;
}

.gh-no-results .gh-search-form {
  margin: 0 auto;
}

.gh-no-results__title {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 1rem;
}

.gh-no-results__text {
  font-size: var(--text-lg);
  color: var(--slate-500);
  margin: 0 0 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.gh-no-results__links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.gh-no-results__link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary-600);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-fast);
}

.gh-no-results__link:hover {
  background: var(--primary-100);
  color: var(--primary-700);
}


/* ==========================================================================
   15. Comments
   ========================================================================== */

.gh-comments {
  max-width: var(--content-max);
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--slate-200);
}

.gh-comments__title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--slate-900);
  margin: 0 0 2rem;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-list .comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--slate-100);
}

.comment-list .comment:last-child {
  border-bottom: none;
}

.comment-list .children {
  list-style: none;
  padding-left: 2rem;
  margin: 0;
  border-left: 2px solid var(--slate-100);
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.comment-author .avatar {
  border-radius: var(--radius-full);
}

.comment-author .fn {
  font-weight: 600;
  color: var(--slate-900);
  font-style: normal;
}

.comment-metadata {
  font-size: var(--text-xs);
  color: var(--slate-400);
  margin-bottom: 0.75rem;
}

.comment-metadata a {
  color: var(--slate-400);
  text-decoration: none;
}

.comment-metadata a:hover {
  color: var(--primary-600);
}

.comment-content {
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
  color: var(--slate-700);
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.reply a {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--primary-600);
  text-decoration: none;
}

.reply a:hover {
  color: var(--primary-700);
}

/* Collapsible comment form toggle */
.gh-comments__toggle {
  margin-top: 1.5rem;
}

.gh-comments__toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  color: var(--primary-600);
  background: var(--primary-50);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
  list-style: none;
}

.gh-comments__toggle-btn::-webkit-details-marker {
  display: none;
}

.gh-comments__toggle-btn::before {
  content: '+';
  font-size: var(--text-base);
  font-weight: 700;
  transition: transform var(--duration-fast);
}

.gh-comments__toggle[open] .gh-comments__toggle-btn::before {
  content: '\2212'; /* minus sign */
}

.gh-comments__toggle-btn:hover {
  background: var(--primary-100);
  color: var(--primary-700);
}

.gh-comments__form-wrap {
  padding-top: 1.5rem;
}

/* Comment form */
.comment-respond {
  margin-top: 0;
}

.comment-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--slate-700);
  margin-bottom: 0.25rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  color: var(--slate-900);
  background: #fff;
  outline: none;
  transition: border-color var(--duration-fast);
  margin-bottom: 1rem;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary-500);
}

.comment-form textarea {
  resize: vertical;
  min-height: 120px;
}

.comment-form .form-submit input[type="submit"] {
  padding: 0.625rem 1.5rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  color: #fff;
  background: var(--primary-600);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.comment-form .form-submit input[type="submit"]:hover {
  background: var(--primary-700);
}


/* ==========================================================================
   16. Screen Reader Text (WordPress a11y)
   ========================================================================== */

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: var(--slate-50);
  clip: auto !important;
  clip-path: none;
  color: var(--slate-900);
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 1rem 1.5rem;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}


/* ==========================================================================
   17. Print Styles
   ========================================================================== */

@media print {
  /* Hide embed chrome */
  #gh-embed-root,
  #gh-nav,
  #gh-footer {
    display: none !important;
  }

  body {
    color: #000;
    background: #fff;
    font-size: 12pt;
    line-height: 1.5;
  }

  .gh-main {
    padding: 0;
  }

  .gh-back-link,
  .gh-post-nav,
  .gh-pagination,
  .gh-comments,
  .gh-search-form {
    display: none;
  }

  .entry-content a {
    color: #000;
    text-decoration: underline;
  }

  .entry-content img {
    border-radius: 0;
    max-width: 100%;
  }

  .gh-single__featured img {
    border-radius: 0;
  }
}


/* ==========================================================================
   18. Admin Bar Fix
   ========================================================================== */

body.admin-bar #gh-nav {
  margin-top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar #gh-nav {
    margin-top: 46px;
  }
}
