/* ==========================================================================
   ATLAS THEME — Main Stylesheet
   ========================================================================== */

:root {
  --bg: #0e1014;
  --surface: #161a21;
  --surface-2: #1d222b;
  --surface-3: #252b35;
  --border: #262d38;
  --border-light: #353d4a;
  --text: #e8ecf2;
  --text-soft: #aab1bf;
  --text-muted: #6b7280;
  --blue: #4d8eff;
  --blue-soft: #6ea4ff;
  --blue-deep: #2d4f9e;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --rose: #f472b6;
  --purple: #8a5dff;
  --red: #ef4444;
  --green: #22c55e;
  --font-sans: 'Manrope', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;
  --max-w: 1400px;
  --rad-sm: 8px;
  --rad-md: 12px;
  --rad-lg: 16px;
  --rad-xl: 20px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-soft); }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }

/* ============ SKIP LINK ============ */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  padding: 1rem; background: var(--blue); color: var(--bg); font-weight: 600;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ============ ACCESSIBILITY ============ */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ============ LOADER ============ */
.atlas-loader {
  position: fixed; inset: 0; background: var(--bg);
  display: grid; place-items: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}
.atlas-loader.loaded { opacity: 0; visibility: hidden; }
.atlas-loader-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ HEADER ============ */
.site-header {
  padding: 1rem 1.5rem;
  background: rgba(22, 26, 33, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo-group { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: var(--rad-sm);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: grid; place-items: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.logo-name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.logo-name .dot { color: var(--blue); }
.custom-logo-link img { max-height: 36px; width: auto; }

/* ============ NAVIGATION ============ */
.main-nav {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface-2);
  border-radius: 999px;
  border: 1px solid var(--border);
}
.main-nav ul { list-style: none; display: flex; gap: 0.25rem; }
.main-nav a {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  border-radius: 999px;
  font-weight: 500;
  transition: var(--transition);
  display: inline-block;
}
.main-nav a:hover { color: var(--text); }
.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-ancestor > a { background: var(--bg); color: var(--text); }

.menu-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--rad-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  color: var(--text);
}
.menu-toggle span {
  display: block; width: 18px; height: 2px;
  background: currentColor; position: relative;
}
.menu-toggle span::before, .menu-toggle span::after {
  content: ''; position: absolute; left: 0; width: 100%; height: 2px;
  background: currentColor; transition: var(--transition);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle.active span { background: transparent; }
.menu-toggle.active span::before { top: 0; transform: rotate(45deg); }
.menu-toggle.active span::after { top: 0; transform: rotate(-45deg); }

.header-actions { display: flex; gap: 0.5rem; align-items: center; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--rad-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--transition);
}
.icon-btn:hover { color: var(--text); border-color: var(--border-light); }
.cta-btn {
  background: var(--blue);
  color: var(--bg) !important;
  padding: 0.55rem 1.1rem;
  border-radius: var(--rad-sm);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: var(--transition);
}
.cta-btn:hover { background: var(--blue-soft); transform: translateY(-1px); }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 16, 20, 0.95);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: none;
  padding: 6rem 1.5rem 2rem;
  opacity: 0;
  transition: opacity 0.3s;
}
.search-overlay.active { display: block; opacity: 1; }
.search-overlay-inner { max-width: 700px; margin: 0 auto; }
.search-overlay-form {
  display: flex; align-items: center; gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 0.5rem 0.5rem 0.5rem 1.5rem;
}
.search-overlay-form input[type="search"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.2rem;
  color: var(--text);
  padding: 1rem 0;
}
.search-overlay-form .submit-btn {
  background: var(--blue);
  color: var(--bg);
  padding: 0.85rem 1.5rem;
  border-radius: var(--rad-md);
  font-weight: 600;
  font-size: 0.95rem;
}
.search-overlay-close {
  position: absolute; top: 1.5rem; right: 1.5rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text);
  font-size: 1.2rem;
}

/* ============ HERO ============ */
.hero {
  max-width: var(--max-w);
  margin: 2rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}
.hero-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 3rem;
  position: relative;
  overflow: hidden;
}
.hero-main::after {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  background: rgba(77, 142, 255, 0.1);
  border: 1px solid rgba(77, 142, 255, 0.25);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--blue-soft);
  margin-bottom: 1.75rem;
  font-family: var(--font-mono);
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
  animation: live 2s infinite;
}
@keyframes live {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(77, 142, 255, 0.6); }
  50% { opacity: 0.5; box-shadow: 0 0 0 8px rgba(77, 142, 255, 0); }
}
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.25rem;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero p {
  color: var(--text-soft);
  font-size: 1.1rem;
  max-width: 55ch;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--blue);
  color: var(--bg);
  padding: 0.75rem 1.3rem;
  border-radius: var(--rad-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}
.btn-primary:hover {
  background: var(--blue-soft);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(77, 142, 255, 0.3);
}
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.3rem;
  border-radius: var(--rad-md);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}
.btn-ghost:hover {
  border-color: var(--border-light);
  color: var(--text);
  transform: translateY(-2px);
}

/* ============ SIDE PANELS ============ */
.hero-aside { display: flex; flex-direction: column; gap: 1.5rem; }
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 1.75rem;
  position: relative;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.panel-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.panel-action {
  font-size: 0.78rem;
  color: var(--blue);
  text-decoration: none;
  transition: var(--transition);
}
.panel-action:hover { color: var(--blue-soft); }

.profile-row { display: flex; align-items: center; gap: 1rem; }
.profile-pic {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: grid;
  place-items: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 1.4rem;
  flex-shrink: 0;
  overflow: hidden;
}
.profile-pic img { width: 100%; height: 100%; object-fit: cover; }
.profile-info .name { font-weight: 700; font-size: 1.05rem; margin-bottom: 0.15rem; }
.profile-info .title { font-size: 0.85rem; color: var(--text-soft); }
.profile-info .badge {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  background: rgba(45, 212, 191, 0.1);
  color: var(--teal);
  font-size: 0.7rem;
  border-radius: 4px;
  font-family: var(--font-mono);
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.25rem;
}
.metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 1rem;
  transition: var(--transition);
}
.metric:hover { border-color: var(--border-light); transform: translateY(-2px); }
.metric-num {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}
.metric-num.t { color: var(--teal); }
.metric-num.b { color: var(--blue); }
.metric-num.a { color: var(--amber); }
.metric-num.r { color: var(--rose); }
.metric-lab {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* ============ ACTIVITY FEED ============ */
.activity-list { display: flex; flex-direction: column; gap: 0.75rem; }
.activity { display: flex; align-items: center; gap: 0.75rem; }
.activity-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.activity-dot.b { background: var(--blue); }
.activity-dot.a { background: var(--amber); }
.activity-dot.r { background: var(--rose); }
.activity-text { font-size: 0.88rem; flex: 1; color: var(--text-soft); }
.activity-text strong { color: var(--text); font-weight: 600; }
.activity-text a { color: var(--text-soft); text-decoration: none; }
.activity-text a:hover { color: var(--text); }
.activity-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ============ ARTICLES SECTION ============ */
.articles {
  max-width: var(--max-w);
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-bar h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.filter-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface);
  border-radius: var(--rad-md);
  border: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-tabs button {
  background: transparent;
  border: none;
  color: var(--text-soft);
  padding: 0.4rem 0.9rem;
  font-size: 0.82rem;
  cursor: pointer;
  border-radius: 7px;
  font-weight: 500;
  transition: var(--transition);
  white-space: nowrap;
}
.filter-tabs button:hover { color: var(--text); }
.filter-tabs button.active {
  background: var(--surface-2);
  color: var(--text);
}

.posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  min-height: 300px;
}
.posts.is-loading { opacity: 0.5; pointer-events: none; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  animation: fadeInUp 0.4s ease-out backwards;
}
.post-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

.post-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  position: relative;
  overflow: hidden;
}
.post-img.alt-1 { background: linear-gradient(135deg, var(--teal) 0%, #1d8e7a 100%); }
.post-img.alt-2 { background: linear-gradient(135deg, var(--rose) 0%, #b85285 100%); }
.post-img.alt-3 { background: linear-gradient(135deg, var(--amber) 0%, #c89512 100%); }
.post-img.alt-4 { background: linear-gradient(135deg, var(--purple) 0%, #5d3eb8 100%); }
.post-img.alt-5 { background: linear-gradient(135deg, #ff6b8a 0%, #b8425e 100%); }
.post-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s;
}
.post-card:hover .post-img img { transform: scale(1.05); }
.post-img::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), transparent 50%);
  pointer-events: none;
}
.post-img .badge {
  position: absolute;
  top: 1rem; left: 1rem;
  padding: 0.3rem 0.7rem;
  background: rgba(14, 16, 20, 0.7);
  backdrop-filter: blur(6px);
  color: white;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  border-radius: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
  z-index: 2;
}
.post-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.post-body h3 {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.post-body h3 a { color: var(--text); text-decoration: none; transition: var(--transition); }
.post-body h3 a:hover { color: var(--blue); }
.post-body p {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 1rem;
  flex: 1;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.post-meta .sep {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

.no-posts {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* ============ LOAD MORE ============ */
.load-more-wrap { text-align: center; margin-top: 2.5rem; }
.load-more-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.85rem 2rem;
  border-radius: var(--rad-md);
  font-weight: 600;
  font-size: 0.92rem;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.load-more-btn:hover { border-color: var(--blue); color: var(--blue); }
.load-more-btn.is-loading { opacity: 0.6; pointer-events: none; }
.load-more-btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ============ SINGLE POST ============ */
.single-post-wrap {
  max-width: 1100px;
  margin: 3rem auto;
  padding: 0 1.5rem;
}
.single-post-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}
.single-cat-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(77, 142, 255, 0.1);
  border: 1px solid rgba(77, 142, 255, 0.3);
  color: var(--blue-soft);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 1.5rem;
}
.single-post-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  max-width: 25ch;
  margin-left: auto;
  margin-right: auto;
}
.single-post-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.single-post-meta .author {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-sans);
  color: var(--text-soft);
}
.single-post-meta .author-pic {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: grid; place-items: center;
  color: var(--bg);
  font-weight: 700;
  font-size: 0.78rem;
}
.single-post-meta .author-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.single-post-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-muted); }

.single-featured-img {
  margin: 0 auto 3rem;
  border-radius: var(--rad-xl);
  overflow: hidden;
  border: 1px solid var(--border);
}
.single-post-content {
  font-size: 1.075rem;
  line-height: 1.75;
  color: var(--text-soft);
  max-width: 720px;
  margin: 0 auto;
}
.single-post-content > * + * { margin-top: 1.25rem; }
.single-post-content h2, .single-post-content h3, .single-post-content h4 {
  color: var(--text);
  margin-top: 3rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.single-post-content h2 { font-size: 1.85rem; }
.single-post-content h3 { font-size: 1.45rem; }
.single-post-content h4 { font-size: 1.2rem; }
.single-post-content p { margin-bottom: 1.5rem; }
.single-post-content a { color: var(--blue); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.single-post-content a:hover { border-bottom-color: var(--blue); }
.single-post-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-radius: 0 var(--rad-md) var(--rad-md) 0;
  font-style: italic;
  font-size: 1.15rem;
  color: var(--text);
  margin: 2rem 0;
}
.single-post-content code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--teal);
}
.single-post-content pre {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem;
  border-radius: var(--rad-md);
  overflow-x: auto;
  margin: 2rem 0;
  font-family: var(--font-mono);
  font-size: 0.88rem;
}
.single-post-content pre code { background: none; border: none; padding: 0; color: var(--text); }
.single-post-content img { border-radius: var(--rad-md); margin: 2rem auto; }
.single-post-content ul, .single-post-content ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.single-post-content li { margin-bottom: 0.5rem; }
.single-post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  overflow: hidden;
}
.single-post-content th, .single-post-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.single-post-content th { background: var(--surface); color: var(--text); font-weight: 600; }
.single-post-content hr { border: none; border-top: 1px solid var(--border); margin: 3rem 0; }

/* Single post tags & share */
.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.single-post-tags .tag {
  padding: 0.35rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.82rem;
  border-radius: 999px;
  text-decoration: none;
  transition: var(--transition);
}
.single-post-tags .tag:hover { border-color: var(--blue); color: var(--blue); }

.share-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 2rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.share-row .share-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-right: 0.5rem;
}
.share-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-soft);
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.78rem;
  font-weight: 600;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

/* Reading progress bar */
.reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--blue), var(--teal));
  width: 0%;
  z-index: 200;
  transition: width 0.1s;
}

/* Author box */
.author-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-xl);
  padding: 2rem;
  margin: 3rem auto;
  max-width: 720px;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}
.author-box-pic {
  width: 64px; height: 64px;
  border-radius: var(--rad-md);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  display: grid; place-items: center;
  color: var(--bg);
  font-weight: 800;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.author-box-pic img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--rad-md); }
.author-box-info h4 { font-size: 1.15rem; margin-bottom: 0.4rem; color: var(--text); }
.author-box-info p { color: var(--text-soft); font-size: 0.92rem; line-height: 1.6; margin-bottom: 0.75rem; }
.author-box-link {
  font-size: 0.82rem;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

/* Post navigation */
.post-navigation { max-width: 720px; margin: 3rem auto; }
.post-nav-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.post-nav-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-lg);
  padding: 1.25rem;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}
.post-nav-item:hover { border-color: var(--blue); }
.post-nav-item.next { text-align: right; }
.post-nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--blue);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.post-nav-title {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}

/* ============ COMMENTS ============ */
.comments-area {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 0 2rem;
}
.comments-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}
.comment-list { list-style: none; }
.comment-item { margin-bottom: 1.5rem; }
.comment-item .children {
  list-style: none;
  margin-left: 2rem;
  margin-top: 1.5rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--border);
}
.comment-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-md);
  padding: 1.25rem;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.comment-author-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--rose));
  display: grid; place-items: center;
  color: var(--bg);
  font-weight: 700;
  flex-shrink: 0;
}
.comment-author-info strong { display: block; font-size: 0.92rem; }
.comment-date {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}
.comment-content { color: var(--text-soft); font-size: 0.95rem; line-height: 1.6; }
.comment-content p { margin-bottom: 0.5rem; }
.comment-footer { margin-top: 0.75rem; }
.comment-reply-link {
  font-size: 0.82rem;
  color: var(--blue);
  font-weight: 500;
}
.comment-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--rad-lg); padding: 1.5rem; margin-top: 2rem; }
.comment-form label { display: block; font-size: 0.82rem; color: var(--text-soft); margin-bottom: 0.4rem; font-weight: 500; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--rad-sm);
  color: var(--text);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  transition: var(--transition);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--blue); }
.comment-form .form-submit input[type="submit"] {
  background: var(--blue);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  border-radius: var(--rad-md);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--blue-soft); }

/* ============ ARCHIVE & SEARCH ============ */
.archive-header {
  max-width: var(--max-w);
  margin: 3rem auto 2rem;
  padding: 0 1.5rem;
  text-align: center;
}
.archive-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--blue);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.archive-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}
.archive-description { color: var(--text-soft); font-size: 1.05rem; max-width: 60ch; margin: 0 auto; }

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  margin: 3rem 0;
}
.pagination-wrap .nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.pagination-wrap .page-numbers {
  padding: 0.5rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rad-sm);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: var(--transition);
  min-width: 40px;
  text-align: center;
}
.pagination-wrap .page-numbers:hover { border-color: var(--blue); color: var(--blue); }
.pagination-wrap .page-numbers.current {
  background: var(--blue);
  color: var(--bg);
  border-color: var(--blue);
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 4rem 1.5rem 2rem;
  margin-top: 5rem;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}
.footer-brand h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.footer-brand h3 .dot { color: var(--blue); }
.footer-brand p {
  color: var(--text-soft);
  font-size: 0.9rem;
  max-width: 38ch;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}
.social-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.social-row a {
  width: 34px; height: 34px;
  border-radius: var(--rad-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid; place-items: center;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  transition: var(--transition);
}
.social-row a:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.55rem; }
.footer-col a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.88rem;
  transition: var(--transition);
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  max-width: var(--max-w);
  margin: 1.5rem auto 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ============ SCROLL TO TOP ============ */
.scroll-top {
  position: fixed;
  bottom: 2rem; right: 2rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--bg);
  display: grid; place-items: center;
  cursor: pointer;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--blue-soft); transform: translateY(-3px); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--blue);
  border-radius: var(--rad-md);
  padding: 0.85rem 1.5rem;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 500;
  z-index: 200;
  opacity: 0;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ ANIMATIONS ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s, transform 0.6s;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============ 404 PAGE ============ */
.error-404 {
  max-width: 600px;
  margin: 6rem auto;
  padding: 0 1.5rem;
  text-align: center;
}
.error-404 .num {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 800;
  background: linear-gradient(120deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
  margin-bottom: 1rem;
}
.error-404 h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.error-404 p { color: var(--text-soft); margin-bottom: 2rem; }

/* ============ WP CORE BLOCKS ============ */
.alignwide { max-width: 1100px !important; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100% !important; margin-left: 0; margin-right: 0; width: 100vw; position: relative; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-caption { margin-bottom: 1.5rem; max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; text-align: center; font-style: italic; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.75rem; margin: 2rem 0; }
.gallery-item img { border-radius: var(--rad-sm); }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .posts { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { gap: 0.5rem; }
  .main-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--surface);
    flex-direction: column;
    padding: 2rem 1.5rem;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s;
    z-index: 99;
    overflow-y: auto;
  }
  .main-nav.active { transform: translateX(0); }
  .main-nav ul { flex-direction: column; gap: 0; width: 100%; }
  .main-nav a { padding: 1rem 0; border-bottom: 1px solid var(--border); border-radius: 0; }
  .menu-toggle { display: inline-flex; }
  .hero { margin-top: 1.5rem; }
  .hero-main { padding: 2rem 1.5rem; }
  .panel { padding: 1.25rem; }
  .posts { grid-template-columns: 1fr; }
  .filter-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .filter-tabs button { flex-shrink: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .post-nav-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; text-align: center; }
  .single-post-meta { font-size: 0.78rem; gap: 0.5rem; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .scroll-top { bottom: 1rem; right: 1rem; }
  .header-actions .icon-btn:not(:last-child) { display: none; }
}

/* ============ PRINT ============ */
@media print {
  .site-header, .site-footer, .scroll-top, .reading-progress, .comments-area, .post-navigation, .filter-tabs, .hero-aside { display: none; }
  body { background: white; color: black; }
  .single-post-content { color: black; }
  a { color: black; }
}
