/* =====================================================
   blog-homepage.css
   WordPress-ready stylesheet for Blog Homepage
   ===================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: #0b1120;
  font-family: 'Inter', sans-serif;
  color: #e2e8f0;
  min-height: 100vh;
  scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; }

/* ---------- Utility ---------- */
.mono  { font-family: 'JetBrains Mono', monospace; }
.accent { color: #2dd4bf; }
.dim    { color: #4a6380; }
.muted  { color: #8b9ab0; }

/* ---------- Layout ---------- */
.sidebar {
  position: fixed;
  left: 0; top: 0;
  height: 100%;
  width: 288px;
  display: none;            /* shown via media query */
  flex-direction: column;
  justify-content: space-between;
  background: #0a0f1a;
  border-right: 1px solid #1e2d3d;
  padding: 40px 32px;
  z-index: 40;
  overflow-y: auto;
}

@media (min-width: 1024px) {
  .sidebar { display: flex; }
  .mobile-header { display: none !important; }
  .main-content { margin-left: 288px; }
}

.main-content {
  position: relative;
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(45,212,191,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,212,191,.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

@media (min-width: 1024px) {
  .bg-grid { left: 288px; }
}

.bg-glow {
  position: fixed;
  top: -20%; right: 10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,212,191,.06) 0%, transparent 70%);
  pointer-events: none;
}

.content-inner { position: relative; z-index: 10; }

/* ---------- Section Divider ---------- */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #1e2d3d 20%, #1e2d3d 80%, transparent);
  margin: 0 48px;
}

/* ---------- Sidebar ---------- */
.sidebar-top { display: flex; flex-direction: column; gap: 32px; }

.sidebar-identity { display: flex; flex-direction: column; gap: 16px; }

.avatar {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: rgba(45,212,191,.12);
  border: 1.5px solid rgba(45,212,191,.3);
  display: flex; align-items: center; justify-content: center;
}
.avatar span {
  font-family: 'JetBrains Mono', monospace;
  color: #2dd4bf; font-weight: 700; font-size: 1rem;
}

.sidebar-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.05rem; font-weight: 700;
  color: #fff; line-height: 1.3;
}
.sidebar-role {
  font-size: .8rem; color: #2dd4bf;
  margin-top: 4px; font-weight: 500;
}

.sidebar-bio {
  font-size: .825rem; color: #8b9ab0;
  line-height: 1.75;
}

/* Tags */
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem; color: #2dd4bf;
  background: rgba(45,212,191,.08);
  border: 1px solid rgba(45,212,191,.2);
  border-radius: 6px; padding: 2px 8px;
}

/* Sidebar Nav */
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; font-weight: 400;
  color: #8b9ab0;
  padding: 6px 10px; border-radius: 6px;
  display: flex; align-items: center; gap: 8px;
  transition: all .15s;
}
.sidebar-nav a.active {
  color: #2dd4bf; font-weight: 500;
  background: rgba(45,212,191,.07);
}
.sidebar-nav a:hover:not(.active) {
  color: #e2e8f0;
  background: rgba(255,255,255,.04);
}
.sidebar-nav .nav-slash { color: #2dd4bf; opacity: .5; }

/* Sidebar Bottom */
.sidebar-bottom { display: flex; flex-direction: column; gap: 16px; }
.sidebar-divider { height: 1px; background: rgba(255,255,255,.06); }

.social-row { display: flex; align-items: center; gap: 12px; }
.social-row a { color: #4a5568; transition: color .15s; }
.social-row a:hover { color: #2dd4bf; }
.social-row svg { width: 16px; height: 16px; }

.sidebar-copyright {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem; color: #3d4f64;
}

/* ---------- Mobile Header ---------- */
.mobile-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: #0a0f1a;
  border-bottom: 1px solid #1e2d3d;
}

.mobile-brand { display: flex; align-items: center; gap: 8px; }
.mobile-avatar {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(45,212,191,.12);
  border: 1px solid rgba(45,212,191,.25);
  display: flex; align-items: center; justify-content: center;
}
.mobile-avatar span {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; color: #2dd4bf; font-weight: 700;
}
.mobile-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; font-weight: 700; color: #e2e8f0;
}

.mobile-menu-btn {
  background: none; border: none;
  color: #4a6380;
}
.mobile-menu-btn svg { width: 20px; height: 20px; }

.mobile-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #0a0f1a;
  border-bottom: 1px solid #1e2d3d;
  flex-direction: column;
}
.mobile-dropdown nav { display: flex; flex-direction: column; }
.mobile-dropdown nav button {
  text-align: left; padding: 12px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .8rem; color: #7a8fa6;
  background: none; border: none;
  border-bottom: 1px solid #1a2535;
  transition: color .15s;
}
.mobile-dropdown nav button:hover { color: #2dd4bf; }

.mobile-socials {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 20px;
}
.mobile-socials a { color: #3d5168; }
.mobile-socials svg { width: 16px; height: 16px; }

/* ---------- Section layout ---------- */
.section { padding: 80px 48px; }

.section-header {
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 40px;
}
.section-label {
  font-size: .72rem; letter-spacing: .1em;
  text-transform: uppercase; display: block;
}
.section-title {
  font-size: 1.75rem; font-weight: 700;
  color: #e2e8f0; line-height: 1.2;
}
.section-line {
  flex: 1; height: 1px;
  background: linear-gradient(to right, #1e2d3d, transparent);
}

/* ---------- Hero ---------- */
.hero-section {
  display: flex; flex-direction: column; justify-content: center;
  min-height: 92vh;
  padding: 80px 48px;
}

.hero-greeting {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 24px;
}
.hero-greeting .mono { font-size: .8rem; }

.cursor-blink {
  display: inline-block;
  width: 8px; height: 16px;
  background: #2dd4bf;
  animation: blink 1s step-end infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.hero-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: 700; color: #e2e8f0;
  line-height: 1.15; letter-spacing: -.02em;
  margin-bottom: 16px;
}

.hero-roles {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-family: 'JetBrains Mono', monospace; font-size: .95rem;
  margin-bottom: 32px;
}

.hero-bio {
  max-width: 580px; margin-bottom: 40px;
  font-size: 1rem; color: #7a8fa6; line-height: 1.8;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 64px; }

.btn-primary {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; font-weight: 500;
  color: #0a0f1a; background: #2dd4bf;
  padding: 10px 20px; border-radius: 8px;
  transition: background .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary:hover { background: #5eead4; }

.btn-ghost {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; font-weight: 500;
  color: #8b9ab0; background: transparent;
  border: 1px solid #1e2d3d;
  padding: 10px 20px; border-radius: 8px;
  transition: all .15s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-ghost:hover { color: #e2e8f0; border-color: #2dd4bf; }

.hero-stats {
  display: flex; flex-wrap: wrap; gap: 32px;
  padding-top: 32px;
  border-top: 1px solid #1e2d3d;
}
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem; font-weight: 700;
  color: #2dd4bf; line-height: 1.2;
}
.stat-label {
  font-size: .75rem; color: #4a6380; margin-top: 2px;
}

.scroll-hint {
  display: flex; align-items: center; gap: 8px;
  color: #2d3f53; margin-top: 48px;
  animation: bounce .8s ease-in-out infinite alternate;
}
@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(6px); }
}

/* ---------- Projects ---------- */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter-tab {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; padding: 5px 14px;
  border-radius: 6px; border: 1px solid #1e2d3d;
  background: transparent; color: #4a6380;
  transition: all .15s;
}
.filter-tab.active {
  border-color: #2dd4bf;
  background: rgba(45,212,191,.1);
  color: #2dd4bf;
}
.filter-tab:hover:not(.active) { color: #8b9ab0; border-color: #2d3f53; }

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 1280px) {
  .projects-grid { grid-template-columns: 1fr 1fr; }
}

.project-card {
  display: flex; flex-direction: column; gap: 12px;
  border-radius: 12px; padding: 22px 24px;
  background: #0d1424;
  border: 1px solid #1e2d3d;
  transition: border-color .2s, background .2s;
  height: 100%;
  min-height: 200px;
}

/* Теги */
.project-card .project-tags {
  padding-top: 12px;
  border-top: 1px solid #1a2535;
}
.project-card:hover { background: #101828; }

.project-card-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 16px;
}
.project-icon-wrap {
  display: flex; align-items: center; gap: 12px;
}
.project-icon {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.project-name {
  font-family: 'JetBrains Mono', monospace;
  font-size: .95rem; font-weight: 600;
  color: #e2e8f0; line-height: 1.3;
}
.project-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem; color: #3d4f64;
}

.status-badge {
  display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem;
  border-radius: 20px; padding: 3px 10px;
  white-space: nowrap; flex-shrink: 0;
}
.status-dot { width: 6px; height: 6px; border-radius: 50%; }

.project-desc {
  font-size: .85rem; color: #7a8fa6; line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-long-desc {
  display: none; /* скрыт в карточке — только на детальной странице */
}

.project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.project-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .63rem;
  border-radius: 4px; padding: 3px 8px;
  background: transparent;
  border: 1px solid #1e2d3d;
  color: #4a6380;
  transition: color .15s, border-color .15s;
}

.project-links {
  display: flex; align-items: center; gap: 16px;
  padding-top: 8px;
}
.project-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem; color: #4a6380;
  display: flex; align-items: center; gap: 6px;
  transition: color .15s;
}
.project-link svg { width: 12px; height: 12px; }

/* ---------- Notes ---------- */
.notes-all-link {
  font-size: .72rem; color: #4a6380;
  flex-shrink: 0; transition: color .15s;
  display: flex; align-items: center; gap: 4px;
}
.notes-all-link:hover { color: #2dd4bf; }

.notes-list { display: flex; flex-direction: column; }

.note-row {
  display: flex; gap: 24px; padding: 24px 0;
  border-bottom: 1px solid #1e2d3d;
  text-decoration: none;
  transition: all .15s;
}
.note-row:first-child { border-top: 1px solid #1e2d3d; }

.note-date-col {
  flex-shrink: 0; width: 96px; padding-top: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem; color: #3d5168; line-height: 1.6;
}
.note-readtime {
  display: flex; align-items: center; gap: 4px;
  color: #2d3f53; margin-top: 4px; font-size: .68rem;
}
.note-readtime svg { width: 10px; height: 10px; }

.note-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }

/* Мобильный: вертикальный layout */
@media (max-width: 600px) {
  .note-row { flex-direction: column; gap: 10px; padding: 20px 0; }
  .note-date-col {
    width: auto;
    display: flex; flex-direction: row; align-items: center; gap: 12px;
    padding-top: 0;
  }
  .note-readtime { margin-top: 0; }
  .note-arrow { align-self: flex-end; opacity: 1; }
  .note-title { font-size: .85rem; }
  .note-excerpt { font-size: .8rem; }
}

.note-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem; border-radius: 4px;
  padding: 1px 8px; display: inline-block;
  width: fit-content;
}

.note-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem; font-weight: 500;
  color: #c4cdd8; line-height: 1.4;
  transition: color .15s;
}
.note-row:hover .note-title { color: #2dd4bf; }

.note-excerpt {
  font-size: .82rem; color: #4a6380; line-height: 1.65;
}

.note-arrow {
  flex-shrink: 0; align-self: center;
  color: #2dd4bf;
  opacity: 0; transition: opacity .15s;
}
.note-row:hover .note-arrow { opacity: 1; }
.note-arrow svg { width: 16px; height: 16px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
}
@media (min-width: 1024px) {
  .about-grid { grid-template-columns: 1fr 1fr; }
}

.about-left { display: flex; flex-direction: column; gap: 32px; }

.card {
  border-radius: 12px; padding: 24px;
  background: #0d1424; border: 1px solid #1e2d3d;
}

.about-bio-text {
  font-size: .9rem; color: #7a8fa6; line-height: 1.85;
}

/* Timeline */
.timeline { display: flex; flex-direction: column; }
.timeline-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem; color: #4a6380;
  letter-spacing: .05em; margin-bottom: 16px;
}

.timeline-item { display: flex; gap: 16px; }
.timeline-track {
  display: flex; flex-direction: column;
  align-items: center; width: 40px;
}
.timeline-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; margin-top: 4px;
}
.timeline-dot.current {
  background: #2dd4bf;
  box-shadow: 0 0 8px #2dd4bf;
}
.timeline-dot.past {
  background: transparent;
  border: 1px solid #2d3f53;
}
.timeline-line {
  flex: 1; width: 1px;
  background: #1a2535;
  min-height: 24px; margin: 4px 0;
}

.timeline-content { padding-bottom: 24px; }
.timeline-year-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.timeline-year {
  font-family: 'JetBrains Mono', monospace;
  font-size: .65rem; color: #2dd4bf;
  background: rgba(45,212,191,.08);
  padding: 1px 7px; border-radius: 4px;
}
.timeline-current-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: .6rem; color: #2dd4bf; opacity: .6;
}
.timeline-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; font-weight: 500;
  color: #c4cdd8; margin-bottom: 2px;
}
.timeline-company {
  font-size: .75rem; color: #3d5168; margin-bottom: 4px;
}
.timeline-desc {
  font-size: .8rem; color: #4a6380; line-height: 1.6;
}

/* Skills */
.about-right { display: flex; flex-direction: column; gap: 16px; }
.skills-list { display: flex; flex-direction: column; gap: 16px; }

.skill-card {
  border-radius: 12px; padding: 20px;
  background: #0d1424; border: 1px solid #1e2d3d;
  display: flex; flex-direction: column; gap: 16px;
}
.skill-card-header { display: flex; align-items: center; gap: 12px; }
.skill-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(45,212,191,.1);
  display: flex; align-items: center; justify-content: center;
}
.skill-icon svg { width: 15px; height: 15px; color: #2dd4bf; }
.skill-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .85rem; font-weight: 600; color: #c4cdd8;
}

.skill-items { display: flex; flex-direction: column; gap: 8px; }
.skill-item { display: flex; align-items: center; gap: 8px; }
.skill-chevron { color: #2dd4bf; opacity: .5; flex-shrink: 0; }
.skill-chevron svg { width: 12px; height: 12px; }
.skill-item-text { font-size: .82rem; color: #7a8fa6; }

/* ---------- Footer ---------- */
.site-footer {
  padding: 32px 48px;
  border-top: 1px solid #1e2d3d;
  display: flex; flex-direction: column; gap: 12px;
}
@media (min-width: 640px) {
  .site-footer {
    flex-direction: row; align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Responsive helpers ---------- */
@media (max-width: 640px) {
  .section { padding: 60px 24px; }
  .section-divider { margin: 0 24px; }
  .hero-section { padding: 60px 24px; }
  .site-footer { padding: 32px 24px; }
}


/* =====================================================
   POSTS PAGE — Страница списка постов с пагинацией
   ===================================================== */

/* ---------- Обёртка страницы ---------- */
.posts-page {
  padding: 64px 48px 64px;
  max-width: 860px;
}

@media (max-width: 640px) {
  .posts-page { padding: 40px 24px 48px; }
}

/* ---------- Шапка страницы ---------- */
.posts-page-header {
  margin-bottom: 48px;
}

.posts-page-header-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.posts-page-title {
  font-size: 2rem;
  font-weight: 700;
  color: #e2e8f0;
  line-height: 1.2;
  margin-top: 6px;
}

.posts-count {
  font-size: .7rem;
  color: #3d5168;
  white-space: nowrap;
  padding-bottom: 6px;
}

/* ---------- Фильтр категорий ---------- */
.posts-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.posts-filter-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .72rem;
  padding: 4px 14px;
  border-radius: 20px;
  border: 1px solid #1e2d3d;
  background: transparent;
  color: #4a6380;
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.posts-filter-tag:hover:not(.active) {
  color: #8b9ab0;
  border-color: #2d3f53;
}

.posts-filter-tag.active {
  color: var(--tag-color, #2dd4bf);
  border-color: var(--tag-color, #2dd4bf);
  background: color-mix(in srgb, var(--tag-color, #2dd4bf) 10%, transparent);
}

.posts-filter-count {
  font-size: .6rem;
  color: #2d3f53;
  font-family: 'JetBrains Mono', monospace;
}

/* ---------- Список постов ---------- */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---------- Featured карточка (первый пост) ---------- */
.post-card--featured {
  margin-bottom: 8px;
}

.post-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.post-card-featured-inner {
  border-radius: 14px;
  background: #0d1424;
  border: 1px solid #1e2d3d;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}

.post-card--featured:hover .post-card-featured-inner {
  border-color: rgba(45,212,191,.35);
  background: #101828;
}

/* Thumbnail */
.post-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 6;
  overflow: hidden;
}

.post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.7) saturate(.8);
  transition: transform .4s ease, filter .3s;
}

.post-card--featured:hover .post-card-thumb img {
  transform: scale(1.03);
  filter: brightness(.8) saturate(.9);
}

.post-card-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, #0d1424 100%);
}

/* Body */
.post-card-featured-body {
  padding: 24px 28px 28px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.post-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: .68rem;
  border-radius: 4px;
  padding: 2px 10px;
  display: inline-block;
}

.post-badge-new {
  font-size: .62rem;
  color: #2dd4bf;
  opacity: .5;
}

.post-card-title--large {
  font-size: 1.3rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.4;
  margin-bottom: 12px;
  transition: color .15s;
}

.post-card--featured:hover .post-card-title--large {
  color: #2dd4bf;
}

.post-card-excerpt {
  font-size: .875rem;
  color: #5a7394;
  line-height: 1.75;
  margin-bottom: 20px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #1a2535;
}

.post-card-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .68rem;
  color: #3d5168;
}

.post-dot { color: #2d3f53; }

.post-card-read-link {
  font-size: .72rem;
  transition: opacity .15s;
}

.post-card--featured:hover .post-card-read-link {
  opacity: .7;
}

/* ---------- Обычная строка поста ---------- */
.post-card--row {
  border-bottom: 1px solid #1e2d3d;
}

.post-card--row:first-of-type,
.post-card--featured + .post-card--row {
  border-top: 1px solid #1e2d3d;
}

.post-card-row-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 22px 4px;
  transition: background .15s;
}

.post-card--row:hover .post-card-row-inner {
  background: rgba(255,255,255,.015);
}

/* Дата-колонка */
.post-row-date {
  flex-shrink: 0;
  width: 100px;
  padding-top: 2px;
  font-size: .68rem;
  color: #3d5168;
  line-height: 1.6;
}

.post-readtime-small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #2d3f53;
  margin-top: 5px;
  font-size: .65rem;
}

/* Контент */
.post-row-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.post-row-top {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-tag--sm {
  font-size: .62rem;
  padding: 1px 8px;
  border-radius: 4px;
}

.post-card-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: .9rem;
  font-weight: 500;
  color: #c4cdd8;
  line-height: 1.45;
  transition: color .15s;
}

.post-card--row:hover .post-card-title {
  color: #2dd4bf;
}

.post-card-excerpt--sm {
  font-size: .8rem;
  color: #4a6380;
  line-height: 1.65;
  margin-bottom: 0;
}

/* Стрелка */
.post-row-arrow {
  flex-shrink: 0;
  align-self: center;
  color: #2dd4bf;
  opacity: 0;
  transition: opacity .15s, transform .15s;
}

.post-card--row:hover .post-row-arrow {
  opacity: 1;
  transform: translateX(3px);
}

/* ---------- Пустое состояние ---------- */
.posts-empty {
  padding: 80px 0;
  text-align: center;
}

/* ---------- Пагинация ---------- */
.posts-pagination {
  padding: 48px 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.posts-pagination-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .72rem;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #1e2d3d;
  color: #4a6380;
  background: transparent;
  transition: all .15s;
  text-decoration: none;
}

.pagination-btn:not(.pagination-btn--disabled):hover {
  color: #2dd4bf;
  border-color: #2dd4bf;
  background: rgba(45,212,191,.07);
}

.pagination-btn--disabled {
  opacity: .3;
  cursor: default;
  pointer-events: none;
}

.pagination-pages {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  font-size: .72rem;
  border-radius: 7px;
  border: 1px solid transparent;
  color: #4a6380;
  text-decoration: none;
  transition: all .15s;
}

.pagination-num:hover:not(.pagination-num--active) {
  color: #e2e8f0;
  background: rgba(255,255,255,.04);
  border-color: #1e2d3d;
}

.pagination-num--active {
  color: #2dd4bf;
  background: rgba(45,212,191,.1);
  border-color: rgba(45,212,191,.3);
  cursor: default;
}

.pagination-ellipsis {
  font-size: .72rem;
  color: #2d3f53;
  padding: 0 4px;
}

.pagination-info {
  font-size: .65rem;
  color: #2d3f53;
}

/* ---------- Адаптив ---------- */
@media (max-width: 640px) {
  .posts-page-header-inner { flex-direction: column; align-items: flex-start; }
  .post-row-date { width: 80px; }
  .post-card-featured-body { padding: 20px; }
  .post-card-title--large { font-size: 1.1rem; }
  .pagination-btn span { display: none; }
}


/* =====================================================
   SINGLE POST — Детальная страница поста (без сайдбара)
   ===================================================== */

/* Страница поста — на всю ширину, без сдвига под сайдбар */
.single-main {
    position: relative;
    min-height: 100vh;
    /* Намеренно НЕ используем margin-left: 288px */
}

.single-main .bg-grid { left: 0; }

/* Центрированная колонка контента с широкими полями */
.single-content-wrap {
    position: relative;
    z-index: 10;
    max-width: 860px;
    margin: 0 auto;
    padding: 0 48px;
}

@media (max-width: 900px) {
    .single-content-wrap { padding: 0 32px; }
}

@media (max-width: 640px) {
    .single-content-wrap { padding: 0 20px; }
}

/* ---------- Обёртка статьи ---------- */
.single-post {
    padding-top: 56px;
}

@media (max-width: 640px) {
    .single-post { padding-top: 36px; }
}

/* ---------- Хлебные крошки ---------- */
.single-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: .7rem;
    color: #3d5168;
    margin-bottom: 28px;
}

.breadcrumb-link {
    color: #3d5168;
    transition: color .15s;
}
.breadcrumb-link:hover { color: #2dd4bf; }
.breadcrumb-sep { color: #2d3f53; }
.breadcrumb-current { color: #4a6380; }

/* ---------- Мета-строка ---------- */
.single-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
}

.single-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .7rem;
    color: #3d5168;
}

/* ---------- Заголовок ---------- */
.single-title {
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.3;
    letter-spacing: -.02em;
    margin-bottom: 16px;
}

/* ---------- Excerpt ---------- */
.single-excerpt {
    font-size: 1rem;
    color: #5a7394;
    line-height: 1.8;
    margin-bottom: 32px;
    padding-left: 16px;
    border-left: 2px solid #2dd4bf;
}

/* ---------- Thumbnail ---------- */
.single-thumbnail {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 48px;
    border: 1px solid #1e2d3d;
}

.single-thumbnail img {
    width: 100%;
    display: block;
    filter: brightness(.85) saturate(.9);
    transition: filter .3s;
}

.single-thumbnail:hover img { filter: brightness(.95) saturate(1); }

/* ---------- Тело поста (типографика) ---------- */
.single-body {
    font-size: .95rem;
    color: #8b9ab0;
    line-height: 1.9;
    margin-bottom: 48px;
}

.single-body h2 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: #e2e8f0;
    margin: 48px 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #1e2d3d;
}

.single-body h3 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: #c4cdd8;
    margin: 36px 0 12px;
}

.single-body h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: .9rem;
    font-weight: 500;
    color: #8b9ab0;
    margin: 28px 0 10px;
}

.single-body p {
    margin-bottom: 20px;
}

.single-body a {
    color: #2dd4bf;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(45,212,191,.3);
    transition: text-decoration-color .15s;
}
.single-body a:hover { text-decoration-color: #2dd4bf; }

.single-body strong { color: #c4cdd8; font-weight: 600; }
.single-body em     { color: #7a8fa6; font-style: italic; }

/* Код inline */
.single-body code {
    font-family: 'JetBrains Mono', monospace;
    font-size: .82em;
    color: #2dd4bf;
    background: rgba(45,212,191,.08);
    border: 1px solid rgba(45,212,191,.15);
    border-radius: 4px;
    padding: 1px 6px;
}

/* Блок кода */
.single-body pre {
    background: #0a0f1a;
    border: 1px solid #1e2d3d;
    border-left: 3px solid #2dd4bf;
    border-radius: 8px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
}

.single-body pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: .82rem;
    color: #8b9ab0;
    line-height: 1.7;
}

/* Цитата */
.single-body blockquote {
    margin: 28px 0;
    padding: 16px 24px;
    background: #0d1424;
    border-left: 3px solid #2dd4bf;
    border-radius: 0 8px 8px 0;
}

.single-body blockquote p {
    color: #7a8fa6;
    font-style: italic;
    margin-bottom: 0;
}

/* Списки */
.single-body ul,
.single-body ol {
    margin: 16px 0 20px 0;
    padding-left: 0;
    list-style: none;
}

.single-body ul li,
.single-body ol li {
    padding: 4px 0 4px 20px;
    position: relative;
    color: #8b9ab0;
}

.single-body ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #2dd4bf;
    font-family: 'JetBrains Mono', monospace;
}

.single-body ol {
    counter-reset: ol-counter;
}
.single-body ol li {
    counter-increment: ol-counter;
}
.single-body ol li::before {
    content: counter(ol-counter, decimal-leading-zero) '.';
    position: absolute;
    left: 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    color: #2dd4bf;
    top: 6px;
}

/* Разделитель */
.single-body hr {
    border: none;
    height: 1px;
    background: linear-gradient(to right, transparent, #1e2d3d 20%, #1e2d3d 80%, transparent);
    margin: 40px 0;
}

/* Изображения в тексте */
.single-body img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid #1e2d3d;
    display: block;
    margin: 24px auto;
}

/* Таблицы */
.single-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    margin: 24px 0;
}

.single-body th {
    font-family: 'JetBrains Mono', monospace;
    font-size: .72rem;
    color: #2dd4bf;
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid #2dd4bf33;
    background: rgba(45,212,191,.04);
}

.single-body td {
    padding: 10px 12px;
    border-bottom: 1px solid #1a2535;
    color: #7a8fa6;
}

.single-body tr:hover td { background: rgba(255,255,255,.015); }

/* ---------- Теги поста ---------- */
.single-tags {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px 0;
    border-top: 1px solid #1e2d3d;
    margin-bottom: 32px;
}

.single-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.single-tag {
    font-size: .68rem;
    color: #4a6380;
    background: #0d1424;
    border: 1px solid #1e2d3d;
    border-radius: 4px;
    padding: 2px 10px;
    transition: all .15s;
}
.single-tag:hover {
    color: #2dd4bf;
    border-color: rgba(45,212,191,.3);
    background: rgba(45,212,191,.05);
}

/* ---------- Карточка автора ---------- */
.single-author-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: #0d1424;
    border: 1px solid #1e2d3d;
    border-radius: 12px;
    margin-bottom: 48px;
}

.single-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(45,212,191,.12);
    border: 1.5px solid rgba(45,212,191,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    font-weight: 700;
    color: #2dd4bf;
    flex-shrink: 0;
}

.single-author-name {
    font-size: .85rem;
    font-weight: 600;
    color: #c4cdd8;
}

.single-author-role {
    font-size: .75rem;
    color: #4a6380;
    margin-top: 2px;
}

/* ---------- Навигация prev/next ---------- */
.single-nav {
    margin-bottom: 32px;
}

.single-nav-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.single-nav-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    background: #0d1424;
    border: 1px solid #1e2d3d;
    border-radius: 10px;
    transition: all .15s;
    text-decoration: none;
}

.single-nav-card:hover {
    border-color: rgba(45,212,191,.3);
    background: #101828;
}

.single-nav-card--next {
    text-align: right;
    align-items: flex-end;
}

.single-nav-dir {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .65rem;
    color: #2d3f53;
}

.single-nav-card--next .single-nav-dir { justify-content: flex-end; }

.single-nav-cat {
    font-size: .65rem;
}

.single-nav-title {
    font-size: .8rem;
    font-weight: 500;
    color: #8b9ab0;
    line-height: 1.4;
    transition: color .15s;
}

.single-nav-card:hover .single-nav-title { color: #e2e8f0; }

@media (max-width: 580px) {
    .single-nav-inner { grid-template-columns: 1fr; }
    .single-nav-card--next { text-align: left; align-items: flex-start; }
    .single-nav-card--next .single-nav-dir { justify-content: flex-start; }
}

/* ---------- Кнопка «назад» ---------- */
.single-back {
    padding: 16px 0 64px;
    border-top: 1px solid #1e2d3d;
}

.single-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .75rem;
    color: #3d5168;
    transition: color .15s;
}
.single-back-link:hover { color: #2dd4bf; }

/* ---------- WP Blocks в контенте ---------- */
.single-body .wp-block-image { margin: 24px 0; }
.single-body .wp-block-quote { margin: 28px 0; }
.single-body .wp-block-code  { margin: 24px 0; }


/* =====================================================
   SCROLL TO TOP BUTTON — стиль как у оригинального scroll hint
   ===================================================== */

.scroll-top-btn {
    position: fixed;
    bottom: 100px;
    right: 40px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s, transform .3s;
    pointer-events: none;
    color: #2d3f53;
    padding: 0;
    animation: none;
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: bounce-up 0.8s ease-in-out infinite alternate;
}

.scroll-top-btn:hover {
    color: #2dd4bf;
}

.scroll-top-btn span {
    font-family: 'JetBrains Mono', monospace;
    font-size: .7rem;
    color: inherit;
}

@keyframes bounce-up {
    from { transform: translateY(0); }
    to   { transform: translateY(-6px); }
}

@media (max-width: 640px) {
    .scroll-top-btn { bottom: 90px; right: 20px; }
}

/* Убираем margin-bottom у карточек внутри списка */
.posts-list .post-card--featured {
    margin-bottom: 0;
}


/* =====================================================
   PROJECTS — горизонтальный скролл
   ===================================================== */

.projects-scroll-wrap {
    position: relative;
}

/* Трек — горизонтальный скролл, внутри колонки */
.projects-scroll-track {
    display: flex;
    flex-direction: row;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 4px 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    align-items: stretch;
}
.projects-scroll-track::-webkit-scrollbar { display: none; }

/* Колонка из 2 карточек */
.projects-scroll-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex-shrink: 0;
    width: 480px;
    scroll-snap-align: start;
}

/* Карточка растягивается на половину колонки */
.projects-scroll-col .project-card {
    flex: 1;
}

@media (max-width: 768px) {
    .projects-scroll-col { width: 360px; }
}

/* Мобильный: одна колонка, без горизонтального скролла */
@media (max-width: 600px) {
    .projects-scroll-wrap {
        position: relative;
    }
    .projects-scroll-track {
        flex-direction: column;
        overflow-x: visible;
        padding: 4px 0 16px;
        scroll-snap-type: none;
    }
    .projects-scroll-col {
        width: 100%;
        flex-direction: column;
    }
    .projects-scroll-col .project-card {
        flex: none;
    }
    /* Стрелки скролла не нужны на мобильном */
    .projects-arrow { display: none; }
}

/* Стрелки — стиль как у scroll-top-btn */
.projects-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #0d1424;
    border: 1px solid #1e2d3d;
    color: #4a6380;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .15s, border-color .15s, background .15s, opacity .25s, transform .25s;
    animation: bounce-side 0.9s ease-in-out infinite alternate;
}

.projects-arrow--left  {
    left: -18px;
    animation-name: bounce-left;
}
.projects-arrow--right {
    right: -18px;
    animation-name: bounce-right;
}

.projects-arrow:hover {
    color: #2dd4bf;
    border-color: rgba(45,212,191,.4);
    background: #101828;
}

.projects-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

@keyframes bounce-left {
    from { transform: translateY(-50%) translateX(0); }
    to   { transform: translateY(-50%) translateX(-5px); }
}

@keyframes bounce-right {
    from { transform: translateY(-50%) translateX(0); }
    to   { transform: translateY(-50%) translateX(5px); }
}

/* На мобиле убираем абсолютные стрелки, показываем снизу */
@media (max-width: 640px) {
    .projects-arrow--left, .projects-arrow--right {
        position: static;
        transform: none;
        animation: none;
        margin-top: 12px;
    }
    .projects-scroll-wrap {
        display: flex;
        flex-direction: column;
    }
    .projects-scroll-track { order: -1; }
    .projects-arrow--left  { order: 0; }
    .projects-arrow--right { order: 1; }
}


/* =====================================================
   PROJECT SINGLE PAGE
   ===================================================== */

.project-single {
    padding-top: 56px;
}

.project-single-header {
    margin-bottom: 40px;
}

.project-single-title-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin: 20px 0 16px;
}

.project-single-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.project-single-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #e2e8f0;
    line-height: 1.25;
    margin-bottom: 8px;
}

.project-single-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.project-single-status {
    font-size: .65rem;
    border-radius: 4px;
    padding: 2px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.project-single-excerpt {
    font-size: 1rem;
    color: #5a7394;
    line-height: 1.8;
    margin-bottom: 24px;
    padding-left: 16px;
    border-left: 2px solid #2dd4bf;
}

.project-single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.project-single-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.project-single-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid #1e2d3d;
    color: #4a6380;
    background: #0d1424;
    transition: color .15s, border-color .15s, background .15s;
    text-decoration: none;
}
.project-single-link:hover {
    color: var(--link-accent, #2dd4bf);
    border-color: var(--link-accent, #2dd4bf);
    background: #101828;
}

.project-single-divider {
    height: 1px;
    margin-bottom: 40px;
    border-radius: 1px;
}
