/*
Theme Name: hrcustom
Theme URI: https://hereco.in/
Author: Hereco
Author URI: https://hereco.in/
Description: A modern dark blog theme inspired by the Hereco Blog, featuring clean typography, elegant spacing, and a professional layout perfect for technical content and editorial publications.
Version: 2.0.1
Text Domain: dark-inspire-blog
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Inter+Tight:wght@500;600;700;800&display=swap');

:root {
  --spacing: 0.25rem;
  --spacing-post: 48px;
  --spacing-page: 1440px;
  --font-sans: "Inter", "Segoe UI", Arial, sans-serif;
  --font-display: "Inter Tight", "Inter", "Segoe UI", Arial, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --bg: #101010;
  --bg-strong: #0a0a0a;
  --panel: #1a1a1a;
  --panel-soft: rgba(26, 26, 26, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --text: #f5f5f5;
  --muted: #c0c0c0;
  --soft: #999999;
  --accent: #ff6b35;
  --accent-2: #e85d2e;
  --shadow: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-strong: #fafafa;
  --panel: #f5f5f5;
  --panel-soft: rgba(255, 255, 255, 0.95);
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.15);
  --text: #1a1a1a;
  --muted: #4a4a4a;
  --soft: #6a6a6a;
  --accent: #ff6b35;
  --accent-2: #e85d2e;
  --shadow: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .categories-dropdown {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .categories-dropdown:hover {
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .categories-panel {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line);
}

[data-theme="light"] .categories-list a:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .mobile-nav {
  background: rgba(255, 255, 255, 0.97);
  color: #111111;
}

[data-theme="light"] .mobile-nav-header {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .mobile-nav-close {
  color: #111111;
}

[data-theme="light"] .mobile-nav .nav-menu li {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mobile-nav .nav-menu a,
[data-theme="light"] .mobile-category-list a {
  color: #111111;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

.site-shell {
  min-height: 100vh;
  background: var(--bg);
}

.site-header {
  max-width: var(--spacing-page);
  margin: 0 auto;
  padding: calc(var(--spacing) * 5) calc(var(--spacing) * 6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--spacing) * 6);
  border-bottom: 1px solid var(--line);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-title {
  margin: 0;
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  text-transform: none;
  line-height: 1.1;
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: flex-start;
  margin-left: 40px;
}

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

.nav-menu a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.categories-wrapper {
  position: relative;
}

.categories-dropdown {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 12px 20px;
  height: 44px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  gap: 8px;
  position: relative;
}

.categories-dropdown:hover,
.categories-dropdown:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.categories-dropdown.active {
  box-shadow: 0 0 0 2px var(--accent);
}

.categories-dropdown svg {
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.categories-dropdown.active svg {
  transform: rotate(180deg);
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.icon-btn svg {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.icon-btn:hover svg {
  opacity: 1;
}

.categories-panel {
  position: fixed;
  top: 70px;
  right: 20px;
  width: 200px;
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 100;
}

.categories-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.categories-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  max-height: 400px;
  overflow-y: auto;
}

.categories-list::-webkit-scrollbar {
  width: 6px;
}

.categories-list::-webkit-scrollbar-track {
  background: transparent;
}

.categories-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.categories-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.categories-list li {
  margin: 0;
}

.categories-list a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 400;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.categories-list a:hover {
  background: rgba(255, 255, 255, 0.08);
}

.cat-count {
  display: none;
}

.search-close {
  border: none;
  background: transparent;
  color: var(--text);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1.25rem;
}

.search-close:hover,
.search-close:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.menu-toggle {
  display: none;
  border: none;
  background: transparent;
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 1.25rem;
  padding: 0;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}
}

.mobile-nav {
  display: none;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

.search-panel {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 999;
}

.search-panel.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.search-panel-dialog {
  position: relative;
  width: min(600px, calc(100vw - 32px));
  animation: searchSlideIn 0.2s ease;
}

@keyframes searchSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-panel-inner {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.search-input-wrapper {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.search-input-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--soft);
  pointer-events: none;
}

.search-form {
  display: block;
}

.search-form input {
  width: 100%;
  padding: 20px 20px 20px 52px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  outline: none;
}

.search-form input::placeholder {
  color: var(--soft);
}

.search-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
}

.search-empty-icon {
  color: var(--soft);
  margin-bottom: 16px;
}

.search-empty-text {
  margin: 0;
  color: var(--soft);
  font-size: 0.95rem;
}

.search-results-wrapper {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
}

.search-results-wrapper::-webkit-scrollbar {
  width: 6px;
}

.search-results-wrapper::-webkit-scrollbar-track {
  background: transparent;
}

.search-results-wrapper::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.search-results-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

.search-results {
  padding: 8px 0;
}

.search-recent {
  padding: 8px 0;
}

.search-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--soft);
  text-transform: uppercase;
}

.search-section-header svg {
  opacity: 0.7;
}

.search-recent-items {
  /* Items will be added dynamically */
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(255, 111, 53, 0.15);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-thumbnail {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
}

.search-result-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-thumbnail.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--soft);
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-excerpt {
  margin: 0;
  font-size: 0.85rem;
  color: var(--soft);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-result-action {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #ff5d5d;
  background: rgba(255, 93, 93, 0.08);
  opacity: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 93, 93, 0.2);
}

.search-result-item:hover .search-result-action {
  opacity: 1;
}

.search-result-action:hover {
  background: rgba(255, 93, 93, 0.14);
  color: #ff7a7a;
  transform: translateY(-1px);
}

.search-result-action.delete-btn:hover {
  background: rgba(255, 59, 48, 0.18);
  color: #ff7a7a;
}

.search-no-results {
  padding: 60px 40px;
  text-align: center;
}

.search-footer {
  display: none;
}

.search-shortcuts {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--soft);
}

.search-shortcuts span {
  margin-right: 8px;
}

.search-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 500;
  color: var(--text);
}

.search-powered {
  color: var(--soft);
  font-size: 0.75rem;
}

[data-theme="light"] .search-panel-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .search-footer {
  background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .search-key {
  background: rgba(0, 0, 0, 0.03);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-wrap {
  max-width: var(--spacing-page);
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 6) calc(var(--spacing) * 10);
}

.hero-section {
  padding: 32px 0 20px;
  max-width: 800px;
}

.hero-title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2vw, 1.875rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-description {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.featured-post {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  padding: 32px 0;
  margin: 0;
  position: relative;
  align-items: center;
}

.featured-post-image {
  order: 1;
}

/* Image sits in a light-background card like Cloudflare */
.featured-post-image a {
  display: block;
  background: #f5f0eb;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
}

.featured-post-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  background: transparent;
}

.featured-post-content {
  order: 2;
}

.featured-post .meta {
  display: block;
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  font-weight: 600;
  text-transform: uppercase;
}

.featured-post h2 {
  margin: 0 0 14px;
  font-size: clamp(2.8rem, 3.7vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.065em;
  font-weight: 700;
}

.featured-post h2 a {
  color: var(--text);
  transition: color 0.2s ease;
}

.featured-post h2 a:hover {
  color: var(--muted);
}

.featured-post .excerpt {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
  line-height: 1.5;
  max-width: 760px;
}

.featured-post .author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
}

.author-avatars {
  display: flex;
  gap: 0;
  margin-right: 4px;
}

.author-avatars .author-avatar {
  margin-left: -8px;
  position: relative;
  border: 2px solid var(--bg);
}

.author-avatars .author-avatar:first-child {
  margin-left: 0;
}

@media (min-width: 768px) {
  .featured-post {
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    padding: 40px 0;
  }

  .featured-post-image {
    order: 2;
  }

  .featured-post-content {
    order: 1;
  }
}


.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  position: relative;
  width: 100%;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Vertical divider line in the middle */
  .posts-grid::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: repeating-linear-gradient(
      to bottom,
      var(--line-strong) 0px,
      var(--line-strong) 6px,
      transparent 6px,
      transparent 12px
    );
    pointer-events: none;
    z-index: 1;
  }
}

.post-card {
  padding: var(--spacing-post) 40px;
  border-bottom: 1px dashed var(--line-strong);
  position: relative;
  z-index: 1;
}

@media (min-width: 1024px) {
  .post-card {
    padding: var(--spacing-post) 56px;
  }
}

/* Remove bottom border from last row - last item always */
.post-card:last-child {
  border-bottom: none;
}

/* On desktop, 2 cols — remove bottom border from last 2 items */
@media (min-width: 768px) {
  .post-card:nth-last-child(1),
  .post-card:nth-last-child(2) {
    border-bottom: none;
  }
}


.post-card .meta {
  display: block;
  margin-bottom: 10px;
  color: var(--soft);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.post-card h2 {
  margin: 0 0 12px;
  font-size: clamp(var(--text-2xl), 2vw, var(--text-3xl));
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.post-card h2 a {
  color: var(--text);
  transition: color 0.2s ease;
}

.post-card h2 a:hover {
  color: var(--muted);
}

.post-card .excerpt {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.author-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: var(--panel);
  flex-shrink: 0;
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-names {
  font-weight: 500;
}

.site-content {
  padding-top: 0;
}

.page-wrap-empty {
  display: none;
}


.feature-article {
  padding-top: var(--spacing-post);
  max-width: 980px;
  margin: 0 auto;
}

.feature-article .entry-header {
  margin-bottom: 32px;
}

.entry-header-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
}

.share-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
}

.share-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: rgba(17, 17, 17, 0.62);
  border-radius: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.share-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.share-btn:hover,
.share-btn:focus-visible {
  color: rgba(17, 17, 17, 0.9);
  transform: translateY(-1px);
  opacity: 1;
  outline: none;
}

[data-theme="dark"] .share-btn {
  color: rgba(255,255,255,0.7);
}

[data-theme="dark"] .share-btn:hover,
[data-theme="dark"] .share-btn:focus-visible {
  color: rgba(255,255,255,0.95);
}

.single-featured-image {
  margin: 0 0 32px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
}

.single-featured-image img {
  display: block;
  width: 100%;
  height: auto;
}

.feature-article .meta {
  display: block;
  margin-bottom: 16px;
  color: var(--soft);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.feature-article .entry-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.related-tags-block {
  margin-top: 56px;
  padding-top: 0;
  border-top: none;
}

.related-tags-label {
  margin: 0 0 20px;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 600;
}

.related-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 12px;
}

.related-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.related-tag:hover,
.related-tag:focus-visible {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.02);
  outline: none;
}

.related-posts-block {
  margin-top: 0;
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  position: relative;
  width: 100%;
}

/* Outer wrapper centers content and holds the vertical dividers */
.related-posts-inner {
  max-width: var(--spacing-page);
  margin: 0 auto;
  padding: 0 calc(var(--spacing) * 6);
  position: relative;
}

/* Vertical dashed dividers — on the inner wrapper so they span full height */
.related-posts-inner::before,
.related-posts-inner::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: repeating-linear-gradient(
    to bottom,
    var(--line-strong) 0px,
    var(--line-strong) 6px,
    transparent 6px,
    transparent 12px
  );
  pointer-events: none;
  z-index: 1;
}

.related-posts-inner::before {
  left: calc(33.333% + calc(var(--spacing) * 2));
}

.related-posts-inner::after {
  left: calc(66.666% - calc(var(--spacing) * 2));
}

.related-posts-header-wrap {
  padding: 20px 0 0;
}

.related-posts-header {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 600;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.related-post-card {
  padding: 24px 40px var(--spacing-post);
  position: relative;
  z-index: 1;
}

.related-post-meta {
  display: block;
  margin-bottom: 12px;
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
  font-weight: 600;
}

.related-post-card h3 {
  margin: 0 0 16px;
  font-size: clamp(var(--text-2xl), 2vw, var(--text-3xl));
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.related-post-card a {
  color: var(--text);
  text-decoration: none;
}

.related-post-card a:hover,
.related-post-card a:focus-visible {
  color: var(--muted);
  outline: none;
}


.entry-content {
  max-width: 980px;
  margin: 0 auto;
  color: var(--muted);
  font-size: var(--text-lg);
  line-height: 1.7;
}

.entry-content p {
  margin: 0 0 1.5em;
}

.entry-content h1,
.entry-content h2,
.entry-content h3 {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 1.8em 0 0.6em;
}

.entry-content a {
  color: var(--accent);
  text-decoration: underline;
  transition: color 0.2s ease;
}

.entry-content a:hover {
  color: var(--accent-2);
}

.entry-content img {
  border-radius: 8px;
  margin: 2em 0;
}

.entry-content .wp-caption {
  max-width: 100%;
  margin: 2em 0;
}

.entry-content .wp-caption img {
  margin: 0;
}

.entry-content .wp-caption-text,
.entry-content figcaption {
  color: rgba(153, 153, 153, 0.75);
  font-size: 0.875rem;
  font-style: normal;
  text-align: center;
  margin-top: 0.5em;
  padding: 0 1em;
  line-height: 1.6;
  font-weight: 400;
}

[data-theme="light"] .entry-content .wp-caption-text,
[data-theme="light"] .entry-content figcaption {
  color: rgba(106, 106, 106, 0.85);
}

.entry-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Courier New', monospace;
}

.entry-content pre {
  background: rgba(255, 255, 255, 0.05);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5em 0;
}

.entry-content pre code {
  background: none;
  padding: 0;
}

.site-footer {
  max-width: var(--spacing-page);
  margin: 0 auto;
  padding: calc(var(--spacing) * 8) calc(var(--spacing) * 6) calc(var(--spacing) * 10);
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: var(--text-sm);
}

.newsletter-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 30px;
}

.newsletter-section h2 {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(2rem, 2.6vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
  font-weight: 500;
  max-width: 760px;
}

.newsletter-form {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 620px);
}

.newsletter-field {
  flex: 1;
}

.newsletter-field input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  padding: 0 18px;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 0 0 1px transparent;
}

.newsletter-field input::placeholder {
  color: var(--soft);
}

.newsletter-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

[data-theme="light"] .newsletter-field input {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.12);
}

.newsletter-form button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: #f26a35;
  color: #111;
  height: 52px;
  padding: 0 28px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.newsletter-note {
  margin: 14px 0 0;
  color: var(--soft);
  font-size: 0.9rem;
}

.newsletter-note.success {
  color: #f26a35;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--line);
}

.footer-connect {
  min-width: 0;
}

.connect-list {
  display: grid;
  gap: 10px;
}

.connect-list a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.connect-list a:hover,
.connect-list a:focus-visible {
  color: var(--text);
  outline: none;
}

.connect-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  color: currentColor;
  flex-shrink: 0;
}

.connect-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-column h3 {
  margin: 0 0 18px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.footer-column a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.96rem;
  transition: color 0.2s ease;
}

.footer-column a:hover,
.footer-column a:focus-visible {
  color: var(--text);
  outline: none;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
}

.footer-meta p {
  margin: 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.footer-links a,
.footer-links button {
  color: var(--soft);
  font-size: var(--text-sm);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: none;
}

.footer-links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cookie-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #2f6df6;
}

.cookie-trigger-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.footer-links a:hover,
.footer-links a:focus-visible,
.footer-links button:hover,
.footer-links button:focus-visible {
  color: var(--text);
  outline: none;
}

.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px));
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cookie-banner.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cookie-banner-inner {
  background: rgba(17, 17, 17, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.cookie-banner-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.cookie-btn:hover,
.cookie-btn:focus-visible {
  transform: translateY(-1px);
  outline: none;
}

.cookie-btn-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
}

.cookie-btn-primary {
  background: #f06b35;
  border-color: #f06b35;
  color: #111;
}

.load-more-wrap {
  max-width: var(--spacing-page);
  margin: 0 auto;
  padding: 14px 24px 48px;
  display: flex;
  justify-content: center;
}

.load-more-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 18px;
  min-width: 110px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.load-more-btn:hover,
.load-more-btn:focus-visible {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.26);
  outline: none;
  transform: translateY(-1px);
}

.load-more-btn.is-loading {
  opacity: 0.7;
  cursor: wait;
}

[data-theme="light"] .load-more-btn {
  border-color: rgba(0, 0, 0, 0.18);
  background: rgba(0, 0, 0, 0.02);
  color: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .load-more-btn:hover,
[data-theme="light"] .load-more-btn:focus-visible {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
  .site-header {
    padding: 14px 16px;
    flex-wrap: nowrap;
    gap: 12px;
    min-height: 64px;
  }

  .brand-wrap {
    gap: 10px;
    min-width: 0;
    flex: 1;
  }

  .brand-mark {
    width: 28px;
    height: 22px;
    flex-shrink: 0;
  }

  .brand-mark::before {
    width: 15px;
    height: 10px;
    left: 4px;
    bottom: 5px;
    box-shadow: 10px 0 0 0 rgba(244, 126, 47, 0.9);
  }

  .brand-mark::after {
    width: 8px;
    height: 8px;
    left: 10px;
    bottom: 1px;
  }

  .site-title {
    font-size: 1.05rem;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .main-nav {
    display: none;
  }

  .header-actions {
    gap: 6px;
    margin-left: auto;
  }

  .search-trigger,
  .menu-toggle,
  .search-close {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .categories-wrapper {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    inset: 0;
    display: block;
    padding: 22px 22px 26px;
    background: rgba(10, 10, 10, 0.96);
    border: none;
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    box-shadow: none;
    z-index: 40;
    overflow-y: auto;
  }

  .mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 0 12px;
    border-bottom: none;
  }

  .mobile-nav-close {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 0;
    font-size: 30px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
  }

  .mobile-nav-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 14px;
  }

  .mobile-nav .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    width: 100%;
  }

  .mobile-nav .nav-menu li {
    width: 100%;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-nav .nav-menu a {
    display: block;
    width: 100%;
    padding: 18px 0;
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    font-family: var(--font-display);
  }

  .mobile-category-block {
    margin-top: 8px;
  }

  .mobile-category-block h3 {
    margin: 0 0 12px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--soft);
    font-weight: 600;
  }

  .mobile-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .mobile-category-list a {
    display: inline-block;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.85;
    padding: 6px 0;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.03em;
  }

  .page-wrap {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero-section {
    padding: 32px 0 24px;
  }

  .featured-post {
    padding: 36px 0;
    gap: 24px;
  }

  .featured-post-image {
    order: 1;
  }

  .featured-post-content {
    order: 2;
  }


  .post-card,
  .post-card:nth-child(odd),
  .post-card:nth-child(even) {
    padding: 28px 20px;
  }

  /* On mobile only last card has no bottom border */
  .post-card:nth-last-child(2) {
    border-bottom: 1px dashed var(--line-strong);
  }

  .related-posts-block {
    margin-top: 0;
  }

  .related-posts-inner {
    padding: 0 20px;
  }

  .related-posts-header-wrap {
    padding: 16px 0 0;
  }

  .related-posts-header {
    font-size: 0.7rem;
    letter-spacing: 0.14em;
  }

  .related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  /* Hide vertical dividers on mobile */
  .related-posts-inner::before,
  .related-posts-inner::after {
    display: none;
  }

  .related-post-card {
    padding: 28px 0;
    border-top: 1px dashed var(--line-strong);
    border-bottom: none;
  }

  .related-post-card h3 {
    font-size: clamp(1.35rem, 6vw, 2.2rem);
    line-height: 1.12;
  }

  .site-footer {
    padding-left: 20px;
    padding-right: 20px;
    padding-top: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-bottom: 18px;
  }

  .footer-brand {
    display: none;
  }

  .footer-column {
    width: 100%;
  }

  .footer-column h3 {
    margin-bottom: 10px;
    font-size: 0.82rem;
  }

  .footer-column ul {
    gap: 8px;
  }

  .footer-column a {
    font-size: 1.05rem;
    line-height: 1.5;
  }

  .footer-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    padding-top: 18px;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .footer-links a,
  .footer-links button {
    font-size: 0.8rem;
  }
}
