:root {
  --bg: #000000;
  --bg-subtle: #0a0a0a;
  --bg-card: #111111;
  --bg-hover: #1a1a1a;
  --text: #ededed;
  --text-secondary: #a1a1a1;
  --text-muted: #666666;
  --border: rgba(255,255,255,0.08);
  --border-light: rgba(255,255,255,0.04);
  --accent-blue: #0072f5;
  --accent-red: #ff5b4f;
  --accent-pink: #de1d8d;
  --accent-develop: #0a72ef;
  --badge-blue-bg: rgba(0,114,245,0.12);
  --badge-blue-text: #4d9cff;
  --shadow-card: 0 0 0 1px rgba(255,255,255,0.06), 0 2px 8px rgba(0,0,0,0.4);
  --shadow-border: rgba(255,255,255,0.06) 0px 0px 0px 1px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Geist', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: "liga";
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Navigation ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 -1px 0 var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.72px;
  color: var(--text);
}

.nav-logo svg {
  fill: white;
}

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

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}

.nav-links a:hover {
  color: var(--text);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 120px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2.4px;
  margin-bottom: 24px;
  color: var(--text);
}

.hero p {
  font-size: 20px;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 40px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  background: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  box-shadow: var(--shadow-border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  height: 24px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
  margin-bottom: 24px;
}

/* ── Cards Grid ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header h2 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -2.4px;
  margin-bottom: 16px;
  color: var(--text);
}

.section-header p {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
}

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

.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: background 0.15s;
}

.card:hover {
  background: var(--bg-hover);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
}

.card h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  line-height: 1.33;
  margin-bottom: 12px;
  color: var(--text);
}

.card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Workflow ── */
.workflow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.workflow-step {
  text-align: center;
}

.workflow-step .step-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.workflow-step .step-label.blue { color: var(--accent-develop); }
.workflow-step .step-label.pink { color: var(--accent-pink); }
.workflow-step .step-label.red { color: var(--accent-red); }

.workflow-step h3 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.96px;
  margin-bottom: 8px;
  color: var(--text);
}

.workflow-step p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── CTA Section ── */
.cta {
  text-align: center;
  padding: 80px 24px;
  max-width: 900px;
  margin: 0 auto;
}

.cta h2 {
  font-size: 40px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -2.4px;
  margin-bottom: 16px;
  color: var(--text);
}

.cta p {
  font-size: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
}

/* ── Divider ── */
.divider {
  max-width: 1200px;
  margin: 0 auto;
  height: 1px;
  background: var(--border);
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
}

/* ── Posts List ── */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.post-card {
  display: block;
  padding: 28px 32px;
  border-radius: var(--radius-lg);
  transition: background 0.15s;
  text-decoration: none;
}

.post-card:hover {
  background: var(--bg-card);
}

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

.post-card-meta time {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.post-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 9999px;
  background: var(--badge-blue-bg);
  color: var(--badge-blue-text);
}

.post-card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.64px;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text);
}

.post-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Hero Image ── */
.hero-image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-xl);
  margin-bottom: 40px;
  display: block;
}

.hero-image-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  margin-top: -24px;
}

/* ── Post Card with Image ── */
.post-card-with-image {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  transition: background 0.15s;
  text-decoration: none;
  background: var(--bg-card);
  overflow: hidden;
}

.post-card-with-image:hover {
  background: var(--bg-hover);
}

.post-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}

.post-card-with-image .post-card-body {
  padding: 20px 24px;
}

.post-card-body {
  min-width: 0;
}

/* ── Post Page ── */
.post-header {
  margin-bottom: 40px;
}

.post-header .post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.post-header .post-meta time {
  font-size: 13px;
  color: var(--text-muted);
  font-family: 'Geist Mono', ui-monospace, monospace;
}

.post-header h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2.4px;
  color: var(--text);
}

.post-nav {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

.post-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

.post-nav a:hover {
  color: var(--text);
}

/* ── Page Content ── */
.page {
  max-width: 800px;
  margin: 0 auto;
  padding: 80px 24px;
}

.page h1 {
  font-size: 48px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -2.4px;
  margin-bottom: 24px;
  color: var(--text);
}

.page h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -1.28px;
  margin-top: 48px;
  margin-bottom: 16px;
  color: var(--text);
}

.page p {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.56;
  margin-bottom: 16px;
}

.page a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.page strong {
  font-weight: 600;
  color: var(--text);
}

.page code {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 14px;
  background: rgba(255,255,255,0.06);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 32px;
    letter-spacing: -1.28px;
  }

  .hero p {
    font-size: 18px;
  }

  .section-header h2,
  .cta h2 {
    font-size: 32px;
    letter-spacing: -1.28px;
  }

  .cards-grid,
  .workflow {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 80px 24px 48px;
  }

  .section {
    padding: 48px 24px;
  }
}

@media (min-width: 641px) {
  .post-card-with-image {
    grid-template-columns: 280px 1fr;
    gap: 0;
  }

  .post-card-thumb {
    aspect-ratio: 16/9;
    height: 100%;
  }

  .post-card-with-image .post-card-body {
    padding: 24px 28px;
  }
}

/* ── About Page ── */
.about-links {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}

.about-links li {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.56;
  margin-bottom: 12px;
}

.about-links a {
  color: var(--accent-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.about-cta {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* ── TL;DR Block ── */
.tldr {
  background: var(--bg-card);
  border-left: 3px solid var(--accent-blue);
  padding: 16px 20px;
  margin: 24px 0 32px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.tldr strong {
  color: var(--text);
  font-weight: 600;
}

/* ── Post Layout (two-column) ── */
.post-layout {
  display: flex;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 24px;
  align-items: flex-start;
}

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

.post-main .page {
  max-width: none;
  margin: 0;
  padding: 0;
}

.post-sidebar {
  flex: 0 0 320px;
  position: sticky;
  top: 88px;
}

.post-sidebar .related-posts {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.post-sidebar .related-posts h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin-bottom: 20px;
  color: var(--text);
}

.post-sidebar .related-posts .post-card {
  padding: 16px 20px;
  border-left: none;
  margin-bottom: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  transition: background 0.15s;
}

.post-sidebar .related-posts .post-card:hover {
  transform: none;
  background: var(--bg-hover);
}

.post-sidebar .related-posts .post-card h3 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 6px;
  color: var(--text);
}

.post-sidebar .related-posts .post-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-sidebar .related-posts .post-card-meta {
  margin-bottom: 8px;
}

.post-sidebar .related-posts .post-card-meta time {
  font-size: 12px;
}

.post-sidebar .related-posts .post-tag {
  font-size: 11px;
  padding: 1px 6px;
}

@media (max-width: 900px) {
  .post-layout {
    flex-direction: column;
    padding: 48px 24px;
  }

  .post-sidebar {
    flex: 1 1 auto;
    position: static;
    width: 100%;
  }

  .post-sidebar .related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
  }
}

/* ── Hub Pages ── */
.hub-sections {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.hub-section h2 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 24px;
  color: var(--text);
}

.hero-subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-top: -16px;
  margin-bottom: 32px;
}

/* ── Internal Links ── */
.internal-links {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.internal-links h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

.internal-links ul {
  list-style: none;
  padding: 0;
}

.internal-links li {
  margin-bottom: 8px;
}

.internal-links a {
  color: var(--accent-blue);
  font-size: 14px;
  text-decoration: none;
}

.internal-links a:hover {
  text-decoration: underline;
}

/* ── Pagination ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.pagination-prev,
.pagination-next,
.pagination-link,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
}

.pagination-prev,
.pagination-next {
  padding: 0 16px;
}

.pagination-link {
  color: var(--text-secondary);
  background: var(--bg-card);
  text-decoration: none;
}

.pagination-link:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.pagination-current {
  color: var(--text);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}

.pagination-prev.disabled,
.pagination-next.disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.5;
}

/* ── Related Posts ── */
.related-posts {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 2px solid var(--accent-blue);
}

.related-posts h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.64px;
  margin-bottom: 24px;
  color: var(--text);
}

.related-posts .post-card {
  padding: 20px 24px;
  border-left: 3px solid var(--accent-blue);
  margin-bottom: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  transition: transform 0.15s, background 0.15s;
}

.related-posts .post-card:hover {
  transform: translateX(4px);
  background: var(--bg-hover);
}

.related-posts .post-card h3 {
  font-size: 18px;
}

/* ── Share Buttons ── */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--accent-blue);
}

.share-bar span {
  font-size: 14px;
  color: var(--text-muted);
  margin-right: 8px;
  font-weight: 500;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
}

.share-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-blue);
  transform: translateY(-2px);
}

.share-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.share-btn.telegram:hover {
  background: rgba(36, 161, 222, 0.15);
  border-color: #24a1de;
  color: #24a1de;
}

.share-btn.x:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.share-btn.vk:hover {
  background: rgba(0, 119, 255, 0.15);
  border-color: #0077ff;
  color: #0077ff;
}
