:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f4;
  --text: #152023;
  --muted: #657377;
  --line: #dce5e7;
  --brand: #087f8c;
  --brand-dark: #075d67;
  --accent: #b8ef43;
  --warning: #f4b740;
  --danger: #e75b52;
  --shadow: 0 12px 32px rgba(20, 37, 42, .08);
  --container: 1180px;
  --radius: 8px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0f1517;
  --surface: #172024;
  --surface-2: #202b2f;
  --text: #eef5f6;
  --muted: #a2b0b4;
  --line: #2c3a3e;
  --brand: #3bc2cf;
  --brand-dark: #86e0e8;
  --accent: #b8ef43;
  --shadow: 0 14px 36px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  overflow-x: hidden;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand); }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
svg { flex: 0 0 auto; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.site-content { min-height: 60vh; }
.site-main { padding: 34px 0 72px; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  z-index: 9999; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 14px;
  clip: auto; background: var(--surface); color: var(--text); border-radius: 6px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 1000; height: 72px; background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line); backdrop-filter: blur(14px);
}
.admin-bar .site-header { top: 32px; }
.header-inner { height: 72px; display: flex; align-items: center; gap: 28px; }
.site-branding { flex: 0 0 auto; }
.custom-logo-link, .footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.logo-badge {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px;
  color: #09282c; background: var(--accent); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}
.logo-text { display: grid; line-height: 1.05; }
.brand-title { font-size: 16px; font-weight: 800; letter-spacing: 0; }
.brand-tag { margin-top: 4px; color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: 1.4px; }
.main-navigation { margin-left: auto; }
.nav-menu { display: flex; align-items: center; gap: 3px; margin: 0; padding: 0; list-style: none; }
.nav-menu a { display: block; padding: 9px 12px; color: var(--muted); font-size: 13px; font-weight: 650; border-radius: 6px; }
.nav-menu a:hover, .nav-menu .current-menu-item > a { color: var(--text); background: var(--surface-2); }
.nav-menu .current-menu-item > a { box-shadow: inset 0 -2px 0 var(--brand); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.action-btn, .back-to-top-btn, .search-close-btn, .mobile-close-btn {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); cursor: pointer;
}
.action-btn:hover, .back-to-top-btn:hover { color: var(--brand); border-color: var(--brand); }
.moon-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: none; }
.mobile-menu-btn { display: none; align-content: center; gap: 4px; }
.hamburger-bar { display: block; width: 18px; height: 2px; background: currentColor; transition: .2s; }
.search-drawer {
  position: absolute; inset: 72px 0 auto; max-height: 0; overflow: hidden; opacity: 0;
  background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); transition: .25s ease;
}
.search-drawer.is-open { max-height: 100px; opacity: 1; }
.search-drawer .container { padding-block: 14px; }
.search-input-wrap { position: relative; display: flex; align-items: center; }
.search-icon-inside { position: absolute; left: 15px; color: var(--muted); }
.search-field {
  width: 100%; height: 48px; padding: 0 54px 0 47px; border: 1px solid var(--line); border-radius: 7px;
  outline: 0; background: var(--bg); color: var(--text);
}
.search-field:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.search-close-btn { position: absolute; right: 7px; width: 34px; height: 34px; border: 0; background: transparent; font-size: 25px; }
.mobile-drawer, .mobile-backdrop { display: none; }

/* Homepage and archives */
.tech-hero-banner {
  position: relative; min-height: 330px; display: flex; align-items: center; overflow: hidden; margin-bottom: 24px;
  border-radius: var(--radius); background: #142125 url("../images/tech-hero.webp") center/cover no-repeat; color: #fff;
  box-shadow: var(--shadow);
}
.tech-hero-banner::before { content: ""; position: absolute; inset: 0; background: rgba(7, 17, 20, .66); }
.tech-hero-banner::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--accent); }
.hero-content { position: relative; z-index: 1; max-width: 730px; padding: 48px 54px; }
.hero-badge, .archive-badge {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 15px; color: var(--accent);
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.3px;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(184,239,67,.15); }
.hero-title { max-width: 680px; margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.15; font-weight: 800; letter-spacing: 0; }
.hero-subtitle { max-width: 650px; margin: 17px 0 21px; color: #d0dcde; font-size: 16px; }
.hero-author-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border: 1px solid rgba(255,255,255,.2);
  border-radius: 7px; background: rgba(8,18,21,.72); font-size: 12px;
}
.hero-author-avatar, .author-avatar-badge, .sidebar-author-avatar, .author-avatar-circle {
  display: grid; place-items: center; flex: 0 0 auto; background: var(--accent); color: #102124; font-weight: 800;
}
.hero-author-avatar { width: 27px; height: 27px; border-radius: 5px; font-size: 10px; }
.verified-icon { display: inline-flex; vertical-align: middle; color: var(--brand); }
.hero-author-tag .verified-icon { color: var(--accent); }
.category-pills-bar { display: flex; gap: 8px; overflow-x: auto; padding: 3px 1px 18px; scrollbar-width: none; }
.category-pills-bar::-webkit-scrollbar { display: none; }
.cat-pill {
  display: inline-flex; align-items: center; flex: 0 0 auto; gap: 7px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 7px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700;
}
.cat-pill:hover, .cat-pill.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.cat-count { min-width: 20px; padding: 1px 5px; border-radius: 10px; background: var(--surface-2); color: var(--text); text-align: center; font-size: 10px; }
.articles-header-bar { display: flex; align-items: center; justify-content: space-between; margin: 13px 0 18px; }
.section-title { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 18px; line-height: 1.35; }
.section-title svg { color: var(--brand); }
.section-badge, .count-pill {
  padding: 5px 9px; border-radius: 5px; background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 700;
}
.tech-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.homepage-category-sections { display: grid; gap: 44px; }
.homepage-category-section { scroll-margin-top: 92px; }
.category-section-header {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 5px 0 18px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.category-section-heading { display: grid; gap: 4px; }
.category-section-kicker { color: var(--brand); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1.2px; }
.category-view-all {
  display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; padding: 8px 12px; border: 1px solid var(--brand);
  border-radius: 7px; color: var(--brand); font-size: 12px; font-weight: 750; transition: background .2s, color .2s;
}
.category-view-all:hover { background: var(--brand); color: #fff; }
.category-posts-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.category-posts-grid .card-body { min-height: 245px; padding: 15px; }
.category-posts-grid .card-title { font-size: 15px; }
.category-posts-grid .card-author .author-label-small { display: none; }
.tech-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: transform .2s, box-shadow .2s, border-color .2s; }
.tech-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); box-shadow: var(--shadow); }
.card-thumb-wrap { position: relative; aspect-ratio: 16/9; overflow: hidden; background: #263337; }
.card-thumb-link, .card-thumb-img { width: 100%; height: 100%; }
.card-thumb-img { object-fit: cover; transition: transform .35s; }
.tech-card:hover .card-thumb-img { transform: scale(1.035); }
.card-thumb-placeholder {
  display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; flex-direction: column; gap: 9px;
  color: #8fa5aa; background: #243136;
}
.placeholder-text { font-size: 10px; font-weight: 800; letter-spacing: 1.3px; }
.card-category-tag, .entry-cat-badge {
  display: inline-flex; padding: 5px 9px; border-radius: 5px; background: var(--accent); color: #142225;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
}
.card-category-tag { position: absolute; left: 12px; bottom: 12px; }
.card-category-tag:hover, .entry-cat-badge:hover { color: #142225; background: #d2ff70; }
.card-body { display: flex; min-height: 235px; flex-direction: column; padding: 17px; }
.card-meta-top, .post-sub-meta, .card-stats { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.card-meta-top svg, .post-sub-meta svg { vertical-align: -2px; }
.meta-date, .meta-time, .meta-views { display: inline-flex; align-items: center; gap: 4px; }
.card-title { margin: 10px 0 8px; font-size: 17px; line-height: 1.45; font-weight: 750; }
.card-title a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-excerpt { display: -webkit-box; overflow: hidden; margin-bottom: 16px; color: var(--muted); font-size: 13px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.card-author { display: flex; min-width: 0; align-items: center; gap: 4px; font-size: 10px; }
.author-label-small { color: var(--muted); }
.author-name-highlight { overflow: hidden; color: var(--text); text-overflow: ellipsis; white-space: nowrap; }
.card-rating, .card-views, .rating-mini-badge { display: inline-flex; align-items: center; gap: 4px; }
.card-rating { color: #d68a00; font-weight: 700; }
.card-views { color: var(--muted); }
.archive-header-banner {
  position: relative; overflow: hidden; margin-bottom: 26px; padding: 36px 40px; border: 1px solid var(--line);
  border-left: 5px solid var(--brand); border-radius: var(--radius); background: var(--surface);
}
.archive-header-banner::after { content: "01"; position: absolute; right: 24px; top: -30px; color: var(--surface-2); font: 800 120px/1 "JetBrains Mono", monospace; }
.archive-header-banner > * { position: relative; z-index: 1; }
.archive-badge { margin-bottom: 7px; color: var(--brand); }
.archive-title { margin: 0; font-size: 34px; line-height: 1.25; }
.archive-title .page-title { margin: 0; }
.archive-description { max-width: 730px; margin: 10px 0 0; color: var(--muted); }
.archive-meta-info { display: flex; gap: 8px; margin-top: 16px; }
.author-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 5px; background: var(--surface-2); font-size: 11px; }

/* Pagination and empty states */
.tech-pagination { margin-top: 34px; }
.nav-links { display: flex; justify-content: center; gap: 6px; }
.page-numbers { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; gap: 5px; padding: 0 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; font-weight: 700; }
.page-numbers.current, .page-numbers:hover { border-color: var(--brand); background: var(--brand); color: #fff; }
.no-posts-card, .error-404-container { padding: 60px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: center; }
.no-posts-card svg { color: var(--muted); margin: 0 auto 12px; }
.error-404-container { max-width: 750px; margin: 30px auto; }
.error-code-badge { color: var(--brand); font: 800 82px/1 "JetBrains Mono", monospace; }
.error-title { margin: 14px 0 8px; }
.error-desc { max-width: 580px; margin: 0 auto 24px; color: var(--muted); }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 10px 15px; border-radius: 6px; background: var(--brand); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }

/* Single article */
.reading-progress-bar { position: fixed; z-index: 1500; inset: 0 auto auto 0; width: 0; height: 3px; background: var(--accent); transition: width .08s linear; }
.single-post-main { padding-top: 22px; }
.tech-breadcrumb { margin-bottom: 17px; }
.breadcrumb-list { display: flex; min-width: 0; align-items: center; gap: 8px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 11px; }
.breadcrumb-item.current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.single-layout-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; }
.single-content-col { min-width: 0; }
.single-tech-article, .single-tech-page { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 8px 24px rgba(20,37,42,.04); }
.single-tech-article > .entry-header { padding: 34px 38px 26px; }
.entry-categories { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 13px; }
.single-tech-article .entry-title, .single-tech-page .entry-title { margin: 0; font-size: clamp(28px, 4vw, 42px); line-height: 1.23; font-weight: 800; letter-spacing: 0; }
.entry-meta-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.meta-author-pill { display: flex; align-items: center; gap: 10px; }
.author-avatar-badge { width: 38px; height: 38px; border-radius: 6px; font-size: 12px; }
.author-details { min-width: 0; }
.author-line { display: flex; align-items: center; gap: 5px; line-height: 1.25; }
.author-name-text { font-size: 13px; }
.post-sub-meta { flex-wrap: wrap; margin-top: 4px; }
.rating-mini-badge { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.score-val { font-size: 15px; }
.score-sub { color: var(--muted); font-size: 10px; }
.entry-featured-media { aspect-ratio: 16/8.5; overflow: hidden; }
.featured-hero-img { width: 100%; height: 100%; object-fit: cover; }
.tech-article-body { padding: 32px 38px; font-size: 16px; line-height: 1.82; overflow-wrap: anywhere; }
.tech-article-body > :first-child { margin-top: 0; }
.tech-article-body > :last-child { margin-bottom: 0; }
.tech-article-body h2, .tech-article-body h3, .tech-article-body h4 { scroll-margin-top: 96px; color: var(--text); line-height: 1.35; }
.tech-article-body h2 { margin: 36px 0 13px; padding-bottom: 9px; border-bottom: 1px solid var(--line); font-size: 25px; }
.tech-article-body h3 { margin: 28px 0 10px; font-size: 20px; }
.tech-article-body h4 { margin: 23px 0 8px; font-size: 17px; }
.tech-article-body p { margin: 0 0 18px; }
.tech-article-body a { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tech-article-body ul, .tech-article-body ol { margin: 0 0 20px; padding-left: 25px; }
.tech-article-body li + li { margin-top: 7px; }
.tech-article-body blockquote { margin: 24px 0; padding: 17px 20px; border-left: 4px solid var(--brand); background: var(--surface-2); color: var(--muted); }
.tech-article-body pre { overflow-x: auto; margin: 22px 0; padding: 18px; border-radius: 7px; background: #11191c; color: #d9f0f1; font: 13px/1.7 "JetBrains Mono", monospace; }
.tech-article-body code { padding: 2px 5px; border-radius: 4px; background: var(--surface-2); color: var(--danger); font-family: "JetBrains Mono", monospace; font-size: .86em; }
.tech-article-body pre code { padding: 0; background: none; color: inherit; }
.tech-article-body table { width: 100%; margin: 22px 0; border-collapse: collapse; font-size: 14px; }
.tech-article-body th, .tech-article-body td { padding: 11px 12px; border: 1px solid var(--line); text-align: left; }
.tech-article-body th { background: var(--surface-2); }
.tech-article-body figure { max-width: 100%; margin: 25px 0; }
.tech-article-body figcaption { margin-top: 7px; color: var(--muted); font-size: 12px; text-align: center; }
.tech-toc-wrapper { margin: 4px 0 26px; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 7px; background: var(--surface-2); }
.toc-header { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 13px 10px 15px; cursor: pointer; user-select: none; }
.toc-title { display: flex; align-items: center; gap: 9px; font-weight: 750; }
.toc-icon { color: var(--brand); }
.toc-toggle-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 0; border-radius: 5px; background: var(--surface); color: var(--muted); cursor: pointer; font-size: 11px; }
.toc-chevron { transition: transform .2s; }
.tech-toc-wrapper:not(.toc-collapsed) .toc-chevron { transform: rotate(180deg); }
.toc-body { padding: 0 16px 15px; }
.toc-list { margin: 0 !important; padding: 11px 0 0 !important; border-top: 1px solid var(--line); list-style: none; }
.toc-list li { margin: 0; }
.toc-list li + li { margin-top: 5px; }
.toc-list .toc-level-3 { padding-left: 18px; }
.toc-list .toc-level-4 { padding-left: 34px; }
.toc-link { display: flex; gap: 7px; padding: 5px 4px; color: var(--muted) !important; text-decoration: none !important; font-size: 13px; line-height: 1.45; }
.toc-link:hover, .toc-link.is-active { color: var(--brand) !important; }
.toc-bullet { color: var(--brand); font-family: "JetBrains Mono", monospace; }
.entry-tags-wrap, .tech-share-bar { display: flex; align-items: center; gap: 12px; margin: 0 38px; padding: 19px 0; border-top: 1px solid var(--line); }
.tags-label, .share-title { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.tags-list, .share-buttons { display: flex; flex-wrap: wrap; gap: 7px; }
.tech-tag-pill, .share-btn { padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-2); font-size: 11px; font-weight: 700; }
.share-btn { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.share-btn.fb:hover { color: #1877f2; border-color: #1877f2; }
.share-btn.telegram:hover { color: #229ed9; border-color: #229ed9; }
.share-btn.x-twitter:hover { color: var(--text); border-color: var(--text); }
.article-rating-section { padding: 0 38px; }
.tech-rating-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 9px 20px; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.rating-header { display: flex; align-items: center; gap: 14px; }
.rating-badge { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 750; }
.rating-badge svg { color: var(--warning); }
.rating-summary { white-space: nowrap; }
.rating-score { font-size: 19px; }
.rating-max, .rating-count { color: var(--muted); font-size: 11px; }
.rating-stars { display: flex; flex-direction: row-reverse; justify-content: flex-end; }
.star-btn { width: 31px; height: 32px; padding: 2px; border: 0; background: transparent; cursor: pointer; }
.star-btn svg { width: 25px; fill: transparent; stroke: var(--warning); stroke-width: 1.5; transition: .15s; }
.star-btn.filled svg, .star-btn:hover svg, .star-btn:hover ~ .star-btn svg { fill: var(--warning); transform: scale(1.08); }
.rating-message { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.rating-message.is-success { color: var(--brand); }
.rating-message.is-error { color: var(--danger); }
.author-profile-box { display: flex; gap: 17px; margin: 0 38px 26px; padding: 21px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.author-avatar-circle { width: 54px; height: 54px; border-radius: 7px; }
.author-badge-tag { color: var(--brand); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.author-full-name { display: flex; align-items: center; gap: 6px; margin: 1px 0 5px; font-size: 17px; }
.author-bio-desc { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.related-posts-section { margin: 0 38px 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.related-title { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 17px; }
.related-title svg { color: var(--brand); }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.related-card { min-width: 0; }
.related-thumb, .related-thumb-ph { width: 100%; aspect-ratio: 16/9; border-radius: 6px; object-fit: cover; background: #243136; }
.related-thumb-ph { display: grid; place-items: center; color: #91a3a8; font-size: 8px; font-weight: 800; letter-spacing: 1px; }
.related-card-title { display: -webkit-box; overflow: hidden; margin: 8px 0 3px; font-size: 12px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.related-date { color: var(--muted); font-size: 10px; }
.related-empty { margin: 0; padding: 13px 15px; border: 1px dashed var(--line); border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 12px; }

/* Sidebar */
.sticky-sidebar { position: sticky; top: 94px; }
.tech-widget { overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.widget-header { display: flex; align-items: center; justify-content: space-between; min-height: 51px; padding: 0 15px; border-bottom: 1px solid var(--line); }
.widget-title { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; }
.widget-icon { display: inline-flex; color: var(--brand); }
.fire-icon { color: var(--danger); }
.widget-badge { padding: 3px 6px; border-radius: 4px; background: var(--danger); color: #fff; font-size: 8px; font-weight: 800; letter-spacing: .6px; }
.widget-content { padding: 5px 15px; }
.popular-list, .latest-list { margin: 0; padding: 0; list-style: none; }
.popular-item { display: flex; gap: 11px; padding: 13px 0; }
.popular-item + .popular-item, .latest-item + .latest-item { border-top: 1px solid var(--line); }
.rank-badge { flex: 0 0 30px; color: #b2c0c3; font: 800 18px/1.4 "JetBrains Mono", monospace; }
.rank-1 > .rank-badge, .rank-2 > .rank-badge, .rank-3 > .rank-badge { color: var(--brand); }
.popular-info { min-width: 0; }
.popular-title, .latest-title { margin: 0; font-size: 12px; line-height: 1.48; }
.popular-title a, .latest-title a { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.popular-meta { display: flex; gap: 6px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.popular-views, .popular-rating { display: inline-flex; align-items: center; gap: 4px; }
.latest-item { display: flex; gap: 10px; padding: 12px 0; }
.latest-thumb-link { flex: 0 0 76px; height: 55px; }
.latest-thumb-img, .latest-thumb-ph { width: 100%; height: 100%; border-radius: 5px; object-fit: cover; }
.latest-thumb-ph { display: grid; place-items: center; background: #243136; color: var(--accent); font-size: 11px; font-weight: 800; }
.latest-info { min-width: 0; }
.latest-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.sidebar-author-box { padding: 17px; }
.sidebar-author-top { display: flex; gap: 10px; align-items: center; }
.sidebar-author-avatar { width: 42px; height: 42px; border-radius: 6px; font-size: 12px; }
.sidebar-author-title h4 { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 14px; }
.sidebar-author-role { color: var(--muted); font-size: 10px; }
.sidebar-author-text { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.widget-empty { color: var(--muted); font-size: 12px; }

/* Pages and footer */
.page-container-narrow { max-width: 900px; }
.single-tech-page { padding: 38px; }
.page-header-simple { margin-bottom: 5px; }
.single-tech-page .tech-article-body { padding-inline: 0; }
.site-footer { border-top: 1px solid #2d3a3e; background: #11191c; color: #dce6e8; }
.footer-inner { padding-top: 44px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr .8fr 1fr; gap: 54px; }
.footer-brand-title { font-size: 18px; }
.footer-desc { max-width: 480px; color: #aebdc0; font-size: 14px; line-height: 1.75; }
.footer-author-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #314146; border-radius: 5px; color: #c3ced0; font-size: 12px; }
.verified-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.footer-heading { margin: 6px 0 15px; color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links, .footer-features { margin: 0; padding: 0; list-style: none; color: #aebdc0; font-size: 13px; }
.footer-links li + li, .footer-features li + li { margin-top: 9px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding: 19px 0; border-top: 1px solid #2a373b; color: #91a2a6; font-size: 12px; }
.footer-copy a { color: #becbce; }
.back-to-top-btn { position: fixed; z-index: 800; right: 22px; bottom: 22px; visibility: hidden; opacity: 0; transform: translateY(8px); box-shadow: var(--shadow); transition: .2s; }
.back-to-top-btn.is-visible { visibility: visible; opacity: 1; transform: translateY(0); }

/* Comments and WordPress defaults */
.comments-area { margin: 0 38px 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.comments-title, .comment-reply-title { font-size: 18px; }
.comment-list { padding-left: 0; list-style: none; }
.comment-body { padding: 15px 0; border-bottom: 1px solid var(--line); }
.comment-form input:not([type="submit"]), .comment-form textarea { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text); }
.comment-form .submit { padding: 10px 15px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; cursor: pointer; font-weight: 700; }
.alignwide { width: calc(100% + 40px); max-width: calc(100% + 40px); margin-left: -20px; }

@media (max-width: 1024px) {
  .main-navigation { display: none; }
  .header-actions { margin-left: auto; }
  .mobile-menu-btn { display: grid; }
  .tech-posts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .category-posts-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .single-layout-grid { grid-template-columns: minmax(0, 1fr) 285px; gap: 20px; }
  .single-tech-article > .entry-header, .tech-article-body { padding-inline: 28px; }
  .entry-tags-wrap, .tech-share-bar, .author-profile-box, .related-posts-section, .comments-area { margin-inline: 28px; }
  .article-rating-section { padding-inline: 28px; }
  .mobile-drawer {
    display: block; position: fixed; z-index: 1300; top: 0; right: 0; width: min(86vw, 360px); height: 100vh;
    visibility: hidden; transform: translateX(100%); background: var(--surface); transition: .25s ease; box-shadow: -16px 0 35px rgba(0,0,0,.18);
  }
  .mobile-drawer.is-open { visibility: visible; transform: translateX(0); }
  .mobile-backdrop { display: block; position: fixed; z-index: 1200; inset: 0; visibility: hidden; opacity: 0; background: rgba(5,12,14,.55); transition: .25s; }
  .mobile-backdrop.is-open { visibility: visible; opacity: 1; }
  .mobile-drawer-header { display: flex; height: 67px; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); }
  .mobile-close-btn { font-size: 23px; }
  .mobile-drawer-body { padding: 18px; }
  .mobile-author-intro { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 7px; background: var(--surface-2); }
  .mobile-author-avatar { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 6px; background: var(--accent); color: #142225; font-weight: 800; }
  .mobile-author-meta { display: grid; }
  .mobile-author-meta small { color: var(--muted); font-size: 9px; }
  .mobile-menu-items { margin: 16px 0 0; padding: 0; list-style: none; }
  .mobile-menu-items li + li { border-top: 1px solid var(--line); }
  .mobile-menu-items a { display: block; padding: 12px 3px; font-size: 13px; font-weight: 650; }
}

@media (max-width: 800px) {
  .admin-bar .site-header { top: 46px; }
  .single-layout-grid { grid-template-columns: 1fr; }
  .single-sidebar-col { margin-top: 4px; }
  .sticky-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
  .sticky-sidebar .tech-widget { margin: 0; }
  .widget-author-card { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .site-header, .header-inner { height: 64px; }
  .search-drawer { top: 64px; }
  .logo-badge { width: 34px; height: 34px; }
  .brand-title { font-size: 14px; }
  .brand-tag { font-size: 8px; }
  .action-btn { width: 35px; height: 35px; }
  .theme-toggle-btn { display: none; }
  .site-main { padding: 22px 0 50px; }
  .tech-hero-banner { min-height: 345px; margin-bottom: 18px; background-position: 60% center; }
  .hero-content { align-self: flex-end; padding: 30px 24px; }
  .hero-title { font-size: 29px; }
  .hero-subtitle { font-size: 13px; }
  .hero-author-tag { max-width: 100%; font-size: 10px; }
  .tech-posts-grid { grid-template-columns: 1fr; gap: 15px; }
  .homepage-category-sections { gap: 36px; }
  .homepage-category-section { scroll-margin-top: 78px; }
  .category-section-header { align-items: center; flex-wrap: wrap; gap: 12px; }
  .category-section-heading { min-width: 0; }
  .category-section-kicker { display: none; }
  .category-view-all { margin-left: auto; padding: 7px 10px; }
  .category-posts-grid { grid-template-columns: 1fr; }
  .category-posts-grid .card-body { min-height: 220px; }
  .card-body { min-height: 220px; }
  .articles-header-bar { align-items: flex-start; gap: 12px; }
  .section-title { font-size: 15px; }
  .section-badge { white-space: nowrap; }
  .archive-header-banner { padding: 28px 22px; }
  .archive-title { font-size: 27px; }
  .archive-header-banner::after { font-size: 85px; }
  .archive-meta-info { flex-wrap: wrap; }
  .breadcrumb-list { gap: 5px; }
  .single-tech-article > .entry-header { padding: 25px 20px 20px; }
  .single-tech-article .entry-title, .single-tech-page .entry-title { font-size: 28px; }
  .entry-meta-bar { align-items: flex-start; }
  .meta-header-rating { display: none; }
  .post-sub-meta .meta-dot:nth-of-type(2), .post-sub-meta .meta-views { display: none; }
  .entry-featured-media { aspect-ratio: 16/10; }
  .tech-article-body { padding: 25px 20px; font-size: 15px; }
  .tech-article-body h2 { font-size: 21px; }
  .tech-article-body h3 { font-size: 18px; }
  .entry-tags-wrap, .tech-share-bar { align-items: flex-start; flex-direction: column; margin-inline: 20px; }
  .article-rating-section { padding-inline: 20px; }
  .tech-rating-card { grid-template-columns: 1fr; gap: 12px; }
  .rating-stars { grid-row: 2; }
  .author-profile-box { margin-inline: 20px; padding: 17px; }
  .author-avatar-circle { width: 44px; height: 44px; }
  .related-posts-section, .comments-area { margin-inline: 20px; }
  .related-grid { grid-template-columns: 1fr; gap: 16px; }
  .related-card { display: grid; grid-template-columns: 105px 1fr; gap: 10px; }
  .related-card-title { margin-top: 0; }
  .related-date { grid-column: 2; margin-top: -25px; }
  .sticky-sidebar { grid-template-columns: 1fr; }
  .widget-author-card { grid-column: auto; }
  .single-tech-page { padding: 22px 20px; }
  .single-tech-page .tech-article-body { padding-inline: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 27px; }
  .footer-about { grid-column: auto; }
  .footer-bottom { align-items: flex-start; flex-direction: column; margin-top: 30px; }
  .footer-meta-tag { display: none; }
  .back-to-top-btn { right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
