/*
Theme Name: Hora Nerd
Theme URI: https://horanerd.com.br/
Author: Hora Nerd
Author URI: https://horanerd.com.br/
Description: Tema clássico moderno e responsivo focado em DevOps, Devs, SysAdmins e SecOps com identidade cyber/tech premium.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: horanerd
Tags: dark, technology, blog, responsive, custom-menu, custom-logo, editor-style, grid-layout
*/

:root {
  --hn-bg: #07090e;
  --hn-surface: #0f1523;
  --hn-surface-2: #161f33;
  --hn-border: rgba(255, 255, 255, 0.08);
  --hn-border-strong: rgba(99, 102, 241, 0.5);
  --hn-text-primary: #f8fafc;
  --hn-text-secondary: rgba(226, 232, 255, 0.72);
  --hn-text-tertiary: rgba(226, 232, 255, 0.56);
  --hn-indigo: #6366f1;
  --hn-violet: #8b5cf6;
  --hn-cyan: #06b6d4;
  --hn-emerald: #10b981;
  --hn-rose: #f43f5e;
  --hn-amber: #f59e0b;
  --hn-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --hn-radius-lg: 20px;
  --hn-radius-md: 14px;
  --hn-radius-sm: 12px;
  --hn-shadow: 0 40px 80px -60px rgba(99, 102, 241, 0.9);
  --hn-shadow-card: 0 30px 60px -40px rgba(6, 182, 212, 0.4);
  --hn-header-height: 76px;
  --hn-max-width: 1280px;
  --hn-content-width: 800px;
}

[data-theme="light"] {
  --hn-bg: #f8fafc;
  --hn-surface: #ffffff;
  --hn-surface-2: #f1f5f9;
  --hn-border: rgba(15, 23, 42, 0.08);
  --hn-border-strong: rgba(99, 102, 241, 0.45);
  --hn-text-primary: #0f1026;
  --hn-text-secondary: rgba(15, 23, 42, 0.8);
  --hn-text-tertiary: rgba(15, 23, 42, 0.6);
  --hn-shadow: 0 40px 80px -60px rgba(79, 70, 229, 0.4);
  --hn-shadow-card: 0 30px 60px -40px rgba(14, 165, 233, 0.25);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body,
body.elementor-kit-234,
body.elementor-default,
body.wp-theme-horanerd {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.12), transparent 55%), var(--hn-bg) !important;
  background-color: var(--hn-bg) !important;
  color: var(--hn-text-primary) !important;
  line-height: 1.7;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(99, 102, 241, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(99, 102, 241, 0.08) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.16;
  mix-blend-mode: screen;
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(600px circle at 10% 10%, rgba(99, 102, 241, 0.18), transparent), radial-gradient(800px circle at 90% 5%, rgba(6, 182, 212, 0.14), transparent);
  z-index: -3;
}

[data-theme="light"] body {
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.08), transparent 55%), var(--hn-bg);
}

[data-theme="light"] body::before {
  opacity: 0.08;
  mix-blend-mode: multiply;
}

[data-theme="light"] body::after {
  background: radial-gradient(600px circle at 10% 10%, rgba(99, 102, 241, 0.1), transparent), radial-gradient(800px circle at 90% 5%, rgba(14, 165, 233, 0.08), transparent);
}

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

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: #a5b4fc;
}

:focus-visible {
  outline: 2px solid var(--hn-cyan);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 12px;
  background: var(--hn-surface);
  color: var(--hn-text-primary);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  z-index: 1000;
}

.skip-link:focus {
  left: 16px;
}

#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--hn-gradient);
  z-index: 999;
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 9, 14, 0.9) 0%, rgba(7, 9, 14, 0.7) 100%);
  border-bottom: 1px solid var(--hn-border);
}

[data-theme="light"] .site-header {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92) 0%, rgba(248, 250, 252, 0.8) 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 0 auto;
  max-width: var(--hn-max-width);
  padding: 0 24px;
  height: var(--hn-header-height);
}

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

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--hn-gradient);
  box-shadow: 0 20px 40px -20px rgba(99, 102, 241, 0.9);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 12px;
}

.brand-badge {
  margin-top: 4px;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.6);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--hn-cyan);
}

.primary-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.nav-list a {
  position: relative;
  padding: 8px 10px;
  font-weight: 500;
  color: var(--hn-text-secondary);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: var(--hn-gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

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

.nav-list a:hover::after,
.nav-list a:focus::after {
  transform: scaleX(1);
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  background: transparent;
  color: var(--hn-text-secondary);
  cursor: pointer;
}

.icon-btn:hover {
  color: var(--hn-text-primary);
  border-color: var(--hn-border-strong);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--hn-gradient);
  color: #fff;
  box-shadow: var(--hn-shadow);
}

.btn-secondary {
  border-color: var(--hn-border);
  color: var(--hn-text-secondary);
}

.btn-ghost {
  border-color: transparent;
  color: var(--hn-text-secondary);
}

.btn:hover {
  filter: brightness(1.05);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--hn-border);
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  background: var(--hn-text-primary);
  border-radius: 2px;
}

.mobile-drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 950;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.7);
}

[data-theme="light"] .mobile-drawer-backdrop {
  background: rgba(15, 23, 42, 0.4);
}

.mobile-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(320px, 85vw);
  background: var(--hn-surface);
  border-left: 1px solid var(--hn-border);
  display: flex;
  flex-direction: column;
  padding: 24px;
  gap: 18px;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-drawer-nav .nav-list {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  z-index: 960;
}

.search-overlay.is-open {
  display: flex;
}

.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 9, 14, 0.8);
}

[data-theme="light"] .search-overlay-backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.search-overlay-panel {
  position: relative;
  width: min(640px, 92vw);
  background: var(--hn-surface);
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius-lg);
  box-shadow: var(--hn-shadow-card);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-form-inline {
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  background: transparent;
  color: var(--hn-text-primary);
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--hn-text-tertiary);
}

.search-submit {
  border-radius: 999px;
  padding: 12px 22px;
  border: 1px solid transparent;
  background: var(--hn-gradient);
  color: #fff;
  cursor: pointer;
}

main {
  display: block;
}

.site-main {
  margin: 0 auto;
  max-width: var(--hn-max-width);
  padding: 48px 24px 96px;
}

.home .site-main {
  max-width: 100%;
  padding: 0;
}

.container {
  margin: 0 auto;
  max-width: var(--hn-max-width);
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--hn-text-tertiary);
}

.section-title {
  margin: 12px 0 0;
  font-size: clamp(28px, 4vw, 48px);
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 12px 0 0;
  color: var(--hn-text-secondary);
  max-width: 640px;
}

.hero {
  padding: 96px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 11px;
  color: var(--hn-text-tertiary);
}

.hero-title {
  margin: 18px 0 0;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.gradient-text {
  background: var(--hn-gradient);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-description {
  margin: 20px 0 0;
  color: var(--hn-text-secondary);
  font-size: clamp(18px, 2vw, 20px);
  max-width: 580px;
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-microcopy {
  margin-top: 16px;
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.terminal-card {
  position: relative;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.18), transparent 60%), var(--hn-surface);
  box-shadow: var(--hn-shadow-card);
  overflow: hidden;
}

.terminal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent);
}

.terminal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  border-bottom: 1px solid var(--hn-border);
}

.terminal-dots {
  display: flex;
  gap: 8px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.terminal-dot:nth-child(1) {
  background: #f43f5e;
}
.terminal-dot:nth-child(2) {
  background: #f59e0b;
}
.terminal-dot:nth-child(3) {
  background: #10b981;
}

.terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--hn-text-tertiary);
}

.terminal-body {
  position: relative;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}

.terminal-line {
  color: var(--hn-text-secondary);
}

.terminal-line.is-prompt {
  color: var(--hn-cyan);
}

.terminal-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--hn-cyan);
  margin-left: 6px;
  animation: cursor-blink 1.2s steps(2, end) infinite;
}

.terminal-footer {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  font-size: 13px;
  color: var(--hn-text-secondary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  border-radius: var(--hn-radius-md);
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
  text-align: center;
}

.stat-value {
  font-weight: 700;
  font-size: 18px;
}

.stat-label {
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

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

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.01) 0%, transparent 100%), var(--hn-surface);
  overflow: hidden;
  min-height: 100%;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
  transform: translateY(-6px);
  border-color: var(--hn-border-strong);
  box-shadow: var(--hn-shadow-card);
}

.post-card-media {
  position: relative;
  height: 190px;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.25), transparent 70%), var(--hn-surface-2);
}

.post-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(99, 102, 241, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.4;
}

.post-card-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.badge-devops {
  color: var(--hn-cyan);
  border-color: rgba(6, 182, 212, 0.5);
}
.badge-security {
  color: var(--hn-rose);
  border-color: rgba(244, 63, 94, 0.5);
}
.badge-sysadmin {
  color: var(--hn-amber);
  border-color: rgba(245, 158, 11, 0.5);
}
.badge-backend {
  color: var(--hn-indigo);
  border-color: rgba(99, 102, 241, 0.5);
}
.badge-ai {
  color: var(--hn-emerald);
  border-color: rgba(16, 185, 129, 0.5);
}
.badge-default {
  color: var(--hn-text-tertiary);
}

.post-card-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.post-card-excerpt {
  margin: 0;
  color: var(--hn-text-secondary);
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--hn-radius-md);
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--hn-border-strong);
  box-shadow: var(--hn-shadow-card);
}

.tool-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tool-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent 70%);
}

.tool-card-title {
  margin: 0;
  font-size: 18px;
}

.tool-card-desc {
  margin: 0;
  color: var(--hn-text-secondary);
  font-size: 15px;
}

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 36px 44px;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: radial-gradient(circle at left, rgba(99, 102, 241, 0.25), transparent 60%), var(--hn-surface);
}

.cta-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
}

.cta-subtitle {
  margin: 10px 0 0;
  color: var(--hn-text-secondary);
}

.cta-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 48px 24px;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.2), transparent 60%), var(--hn-surface);
}

.cta-card-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.site-footer {
  border-top: 1px solid var(--hn-border);
  background: linear-gradient(180deg, transparent 0%, rgba(7, 9, 14, 0.8) 100%);
}

[data-theme="light"] .site-footer {
  background: linear-gradient(180deg, transparent 0%, rgba(248, 250, 252, 0.9) 100%);
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
  margin: 0 auto;
  max-width: var(--hn-max-width);
  padding: 48px 24px 36px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-tagline {
  color: var(--hn-text-secondary);
}

.footer-title {
  margin: 0 0 14px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 11px;
  color: var(--hn-text-tertiary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: var(--hn-text-secondary);
}

.footer-links a:hover {
  color: var(--hn-text-primary);
}

.footer-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  color: var(--hn-text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hn-emerald);
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.12);
}

.footer-bottom {
  border-top: 1px solid var(--hn-border);
}

.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 auto;
  max-width: var(--hn-max-width);
  padding: 18px 24px;
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.page-hero {
  padding: 72px 0 40px;
}

.page-title {
  margin: 12px 0 0;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.03em;
}

.page-subtitle {
  margin: 14px 0 0;
  color: var(--hn-text-secondary);
  max-width: 640px;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-link {
  display: inline-flex;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  color: var(--hn-text-secondary);
}

.chip-link:hover {
  color: var(--hn-text-primary);
  border-color: var(--hn-border-strong);
}

.layout-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

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

.pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
}

.nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  color: var(--hn-text-secondary);
}

.page-numbers.current {
  background: var(--hn-gradient);
  color: #fff;
  border-color: transparent;
}

.widget-area {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.widget {
  padding: 22px;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
}

.widget-title {
  margin: 0 0 12px;
  font-size: 18px;
}

.widget ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  color: var(--hn-text-secondary);
  font-size: 15px;
  line-height: 1.5;
}

.widget a {
  color: var(--hn-text-secondary);
}

.widget a:hover {
  color: var(--hn-text-primary);
}

.widget input[type="search"],
.widget input[type="text"],
.widget .wp-block-search__input {
  flex: 1;
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--hn-border);
  border-radius: 999px;
  background: transparent;
  color: var(--hn-text-primary);
  font-family: inherit;
  font-size: 14px;
}

.widget input::placeholder {
  color: var(--hn-text-tertiary);
}

.widget button,
.widget .wp-block-search__button {
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--hn-gradient);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.widget .wp-block-search__inside-wrapper {
  display: flex;
  gap: 8px;
}

.widget .wp-block-search__label {
  display: block;
  margin-bottom: 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--hn-text-tertiary);
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--hn-text-tertiary);
}

.breadcrumbs a {
  color: var(--hn-text-secondary);
}

.single-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.single-title {
  margin: 0;
  font-size: clamp(34px, 6vw, 68px);
  letter-spacing: -0.03em;
}

.single-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--hn-text-tertiary);
}

.meta-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hn-gradient);
}

.article-body {
  margin-top: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 40px;
  align-items: start;
}

.article-body-content {
  max-width: var(--hn-content-width);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.article-body-content h2,
.article-body-content h3 {
  letter-spacing: -0.01em;
}

.article-body-content p {
  color: var(--hn-text-secondary);
}

.article-body-content pre {
  position: relative;
  padding: 22px 24px;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.16), transparent 60%), var(--hn-surface);
  overflow-x: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 14px;
}

.article-body-content code {
  font-family: "JetBrains Mono", monospace;
}

.copy-code-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  background: transparent;
  color: var(--hn-text-secondary);
  cursor: pointer;
}

.article-body-content blockquote {
  margin: 0;
  padding: 18px 24px;
  border-left: 2px solid var(--hn-cyan);
  background: rgba(6, 182, 212, 0.08);
  border-radius: 0 var(--hn-radius-md) var(--hn-radius-md) 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.post-tags a,
.tag-link {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--hn-border);
  color: var(--hn-text-secondary);
  font-size: 13px;
}

.post-tags a:hover,
.tag-link:hover {
  border-color: var(--hn-border-strong);
  color: var(--hn-text-primary);
}

.page-links {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.page-links a,
.page-links > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hn-border);
  border-radius: 999px;
}

.page-links a:hover {
  border-color: var(--hn-border-strong);
  color: var(--hn-text-primary);
}

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

.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.nav-card {
  flex: 1;
  padding: 18px 22px;
  border-radius: var(--hn-radius-md);
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
}

.search-page-form {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.error-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  padding: 80px 24px;
}

.error-404-terminal {
  padding: 28px 40px;
  border-radius: var(--hn-radius-lg);
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
    font-family: "JetBrains Mono", monospace;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[data-reveal] {
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hn-reveal-ready[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}

.hn-reveal-ready[data-reveal].is-inview {
  opacity: 1;
  transform: translateY(0);
}

@keyframes cursor-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hn-reveal-ready[data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .terminal-cursor {
    animation: none;
  }
}

@media (max-width: 1200px) {
  .tools-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout-two-col {
    grid-template-columns: 1fr;
  }
  .article-body {
    grid-template-columns: 1fr;
  }
  .related-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .primary-nav {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
  .header-actions .btn-primary {
    display: none;
  }
}

@media (max-width: 720px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .related-posts {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr;
  }
  .cta-banner {
    padding: 28px;
  }
  .section {
    padding: 64px 0;
  }
  .hero {
    padding: 72px 0 56px;
  }
}

/* Theme toggle */
.theme-icon-moon {
  display: none;
}

[data-theme="light"] .theme-icon-moon {
  display: inline-block;
}

[data-theme="light"] .theme-icon-sun {
  display: none;
}

.site-header.is-scrolled {
  box-shadow: 0 24px 48px -36px rgba(0, 0, 0, 0.9);
}

.post-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Single post */
.single-header {
  gap: 14px;
}

.breadcrumbs {
  font-size: 13px;
  letter-spacing: 0.01em;
}

.breadcrumb-sep {
  opacity: 0.4;
}

.breadcrumbs [aria-current="page"] {
  color: var(--hn-text-tertiary);
}

.reading-time {
  font-size: 13px;
  color: var(--hn-text-tertiary);
}

.single-cover {
  margin: 32px 0 0;
  border-radius: var(--hn-radius-lg);
  overflow: hidden;
  border: 1px solid var(--hn-border);
  background: var(--hn-surface);
}

.single-cover img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}

.article-body-content h2 {
  margin: 34px 0 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.2;
}

.article-body-content h3 {
  margin: 26px 0 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.25;
}

.article-body-content p {
  margin: 0;
}

.article-body-content ul,
.article-body-content ol {
  margin: 0;
  padding-left: 24px;
  color: var(--hn-text-secondary);
}

.article-body-content li {
  margin: 6px 0;
}

.article-body-content li::marker {
  color: var(--hn-cyan);
}

.article-body-content a {
  color: var(--hn-cyan);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-body-content a:hover {
  color: #22d3ee;
}

.article-body-content :not(pre) > code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--hn-border);
  color: #a5b4fc;
}

.article-body-content img {
  border-radius: var(--hn-radius-md);
}

.article-body-content figure {
  margin: 0;
}

.article-body-content figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--hn-text-tertiary);
  text-align: center;
}

.article-body-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.article-body-content th,
.article-body-content td {
  border: 1px solid var(--hn-border);
  padding: 10px 12px;
  text-align: left;
}

.article-body-content th {
  background: var(--hn-surface-2);
}

.article-body-content blockquote p {
  margin: 0;
}

.article-aside {
  position: sticky;
  top: calc(var(--hn-header-height) + 24px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
  font-size: 14px;
}

.toc-nav a {
  padding: 6px 0 6px 12px;
  border-left: 2px solid var(--hn-border);
  color: var(--hn-text-secondary);
  line-height: 1.35;
}

.toc-nav a:hover {
  border-left-color: var(--hn-cyan);
  color: var(--hn-text-primary);
}

.toc-nav .toc-sub {
  padding-left: 26px;
  font-size: 13px;
}

.toc-nav::-webkit-scrollbar {
  width: 6px;
}

.toc-nav::-webkit-scrollbar-thumb {
  background: var(--hn-border);
  border-radius: 999px;
}

.cta-widget p {
  margin: 0 0 14px;
  color: var(--hn-text-secondary);
  font-size: 15px;
}

.cta-widget .btn {
  width: 100%;
  justify-content: center;
}

.related-section {
  margin-top: 64px;
}

.related-title {
  margin: 0 0 22px;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -0.02em;
}

.page-content {
  max-width: var(--hn-content-width);
  margin: 8px auto 0;
}

.post-nav {
  margin-top: 56px;
}

.nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.nav-card:hover {
  transform: translateY(-3px);
  border-color: var(--hn-border-strong);
}

.nav-card span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--hn-text-tertiary);
}

.nav-card strong {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 600;
}

/* Comments */
.comments-area {
  max-width: var(--hn-content-width);
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--hn-border);
}

.comments-title,
.comment-reply-title {
  margin: 0 0 20px;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
}

.comment-list,
.comment-list .children {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}

.comment-list .children {
  margin: 14px 0 0 28px;
}

.comment-body {
  margin-bottom: 14px;
  padding: 20px 22px;
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius-md);
  background: var(--hn-surface);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.comment-author img {
  border-radius: 50%;
}

.comment-metadata {
  font-size: 13px;
  color: var(--hn-text-tertiary);
}

.comment-metadata a {
  color: inherit;
}

.comment-content {
  color: var(--hn-text-secondary);
  font-size: 15px;
}

.comment-content p {
  margin: 0 0 10px;
}

.reply a {
  font-size: 13px;
  color: var(--hn-cyan);
}

.comment-respond {
  margin-top: 32px;
}

.comment-notes {
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.comment-form {
  display: grid;
  gap: 14px;
}

.comment-form p {
  margin: 0;
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hn-text-tertiary);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius-sm);
  background: var(--hn-surface);
  color: var(--hn-text-primary);
  font-family: inherit;
  font-size: 15px;
}

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

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--hn-border-strong);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.comment-form .submit {
  justify-self: start;
  cursor: pointer;
}

.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-form .comment-form-cookies-consent label {
  margin: 0;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}

.comment-form .comment-form-cookies-consent input {
  margin-top: 3px;
}

.comment-awaiting-moderation {
  color: var(--hn-amber);
  font-size: 13px;
}

.no-comments {
  color: var(--hn-text-tertiary);
}

/* Archive & search */
.archive-description p {
  margin: 0;
}

.archive-count {
  margin-top: 12px;
  color: var(--hn-text-tertiary);
  font-size: 14px;
}

.search-page-form {
  width: 100%;
  max-width: 640px;
}

.search-page-form .search-form-inline {
  width: 100%;
}

.error-404 .search-page-form {
  align-self: stretch;
  margin-left: auto;
  margin-right: auto;
}

.error-404-terminal {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 1080px) {
  .article-aside {
    position: static;
  }

  .toc-widget {
    display: none;
  }
}

/* Topics strip */
.topic-strip {
  padding: 8px 0 0;
}

.topic-strip-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 20px;
  padding: 16px 20px;
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius-md);
  background: var(--hn-surface);
}

.topic-strip-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: var(--hn-text-tertiary);
}

.chip-count {
  margin-left: 6px;
  font-size: 11px;
  color: var(--hn-text-tertiary);
}

@media (max-width: 720px) {
  .comment-list .children {
    margin-left: 14px;
  }

  .post-nav {
    flex-direction: column;
  }

  .single-cover img {
    max-height: 320px;
  }
}
