@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,700&display=swap");

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

:root {
  --accent: #00ff87;
  --accent-rgb: 0, 255, 135;
  --bg: #080909;
  --bg-2: #0d0f0e;
  --bg-card: #111312;
  --border: rgba(255, 255, 255, 0.08);
  --text: #edf2ee;
  --text-muted: #7a9080;
  --text-mid: #aabfa5;
  --font: "Plus Jakarta Sans", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

body.theme-angular {
  --accent: #dd0031;
  --accent-rgb: 221, 0, 49;
  --text-muted: #9a8080;
  --text-mid: #bf9fa5;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 17px;
  transition: --accent 0.4s;
}

::-webkit-scrollbar {
  width: 3px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--accent);
}
::selection {
  background: var(--accent);
  color: #000;
}

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2.5rem;
}
.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(8, 9, 9, 0.358);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: background 0.4s;
}
.brand-icon .material-symbols-outlined {
  font-size: 16px;
  color: #000;
  font-variation-settings:
    "FILL" 1,
    "wght" 700;
}

.brand-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text);
}

.name {
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
}

#name-big {
  display: inline;
}
#name-small {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-link:hover {
  color: var(--accent);
}
.nav-link.active {
  color: var(--accent);
}
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

/* ============================================
   BLOG HERO
   ============================================ */

.blog-hero {
  min-height: 25vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 0 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(
    135deg,
    rgba(var(--accent-rgb), 0.03) 0%,
    transparent 100%
  );
}

.blog-hero-content {
  text-align: center;
}

.blog-hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin-bottom: 16px;
  line-height: 1.1;
}

.blog-hero-title .highlight {
  color: var(--accent);
  transition: color 0.4s;
}

.blog-hero-subtitle {
  font-size: 18px;
  color: var(--text-mid);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ============================================
   SEARCH SECTION - WITH STICKY BEHAVIOR
   ============================================ */

.blog-search-section {
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
  z-index: 999;
}

/* Sticky state */
.blog-search-section.sticky {
  position: fixed;
  left: 0;
  right: 0;
  background: rgba(8, 9, 9, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon-wrapper {
  position: absolute;
  left: 20px;
  display: flex;
  align-items: center;
  color: var(--accent);
  pointer-events: none;
}

.search-icon {
  font-size: 20px;
  transition: color 0.4s;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 18px 20px 18px 56px;
  font-family: var(--font);
  font-size: 16px;
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.search-input:focus {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.02);
}

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

.clear-btn {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  transition: all 0.2s;
  font-family: var(--font);
}

.clear-btn:hover {
  background: rgba(var(--accent-rgb), 0.1);
  color: var(--accent);
}

.clear-btn .material-symbols-outlined {
  font-size: 18px;
}

/* ============================================
   SORT SECTION
   ============================================ */

.sort-section {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  justify-content: flex-end;
}

.sort-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.sort-icon {
  font-size: 18px;
  color: var(--accent);
  font-variation-settings: "FILL" 1;
  transition: color 0.4s;
}

.sort-buttons-group {
  display: flex;
  gap: 12px;
}

.sort-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.sort-btn.active {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.sort-btn .material-symbols-outlined {
  font-size: 16px;
  transition: transform 0.2s;
}

.sort-btn:hover .material-symbols-outlined {
  transform: translateY(2px);
}

/* ============================================
   TAGS FILTER - HORIZONTAL SCROLL
   ============================================ */

.tags-filter-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 24px;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.tags-filter-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  flex: 1;
  /* Hide scrollbar */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tags-filter-container::-webkit-scrollbar {
  display: none;
}

.tag-filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 10px 18px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.tag-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tag-filter-btn.active {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.tag-filter-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

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

/* Tag Scroll Button */
.tag-scroll-btn {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
  font-family: var(--font);
}

.tag-scroll-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: var(--accent);
}

.tag-scroll-btn .material-symbols-outlined {
  font-size: 20px;
}

/* ============================================
   BLOG GRID
   ============================================ */

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.02);
  transform: translateY(-4px);
}

.blog-card-image {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--bg-2);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.blog-card:hover .blog-card-overlay {
  opacity: 1;
}

.read-more-icon {
  font-size: 28px;
  color: var(--accent);
  transition: transform 0.3s;
}

.blog-card:hover .read-more-icon {
  transform: translate(4px, -4px);
}

.blog-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.blog-card-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.blog-card-date,
.blog-card-read-time {
  display: flex;
  align-items: center;
}

.blog-card-date::before {
  content: "📅";
  margin-right: 6px;
}

.blog-card-read-time::before {
  content: "⏱";
  margin-right: 6px;
}

.blog-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
}

.blog-card-excerpt {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 8px;
}

.blog-card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.blog-tag {
  padding: 5px 10px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  transition: all 0.4s;
}

.blog-tag {
  padding: 5px 10px;
  background: rgba(var(--accent-rgb), 0.06);
  border: 1px solid rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  border-radius: 3px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  transition: all 0.4s;
}

.blog-card-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-top: auto;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.blog-card-link:hover {
  gap: 8px;
}

.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  text-align: center;
  gap: 20px;
}

.no-results-icon {
  font-size: 64px;
  color: var(--text-muted);
  opacity: 0.5;
}

.no-results h3 {
  font-size: 24px;
  color: var(--text);
  font-weight: 700;
}

.no-results p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 400px;
}

/* ============================================
   ARTICLE TOP BAR (BACK BUTTON)
   ============================================ */

.article-top-bar {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 9, 9, 0.95);
  backdrop-filter: blur(10px);
  z-index: 50;
  margin-top: 68px;
  margin-bottom: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-mid);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.back-link:hover {
  color: var(--accent);
}

.back-link .material-symbols-outlined {
  font-size: 18px;
  transition: transform 0.2s;
}

.back-link:hover .material-symbols-outlined {
  transform: translateX(-2px);
}

.container-wide {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ============================================
   ARTICLE PAGE
   ============================================ */

.article-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 2.5rem 60px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 60px;
}

.article-header {
  margin-bottom: 60px;
}

.article-cover-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
}

.article-header-content {
  padding: 0;
}

.article-title {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.article-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.article-author,
.article-date,
.article-reading-time {
  display: flex;
  align-items: center;
  gap: 8px;
}

.article-meta .material-symbols-outlined {
  font-size: 18px;
  color: var(--accent);
  font-variation-settings: "FILL" 1;
}

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

.article-tag {
  padding: 6px 14px;
  background: rgba(var(--accent-rgb), 0.08);
  border: 1px solid rgba(var(--accent-rgb), 0.15);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  border-radius: 4px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  transition: all 0.3s;
}

.article-tag:hover {
  background: rgba(var(--accent-rgb), 0.15);
}

.article-body {
  padding: 0;
  line-height: 1.9;
}

.article-heading {
  font-size: 32px;
  font-weight: 800;
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.article-heading:first-child {
  margin-top: 0;
}

.article-body h3 {
  font-size: 24px;
  font-weight: 700;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--text);
}

.article-paragraph {
  font-size: 16px;
  color: var(--text-mid);
  margin-bottom: 20px;
}

.article-code-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 32px 0;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--border);
}

.code-language {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.copy-code-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  letter-spacing: 0.06em;
}

.copy-code-btn:hover {
  background: rgba(var(--accent-rgb), 0.2);
}

.copy-code-btn .material-symbols-outlined {
  font-size: 14px;
}

.article-code-block pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
}

.article-code-block code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}

.article-figure {
  margin: 32px 0;
  text-align: center;
}

.article-image {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.article-figure figcaption {
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.article-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
}

.article-list li {
  padding-left: 24px;
  margin-bottom: 16px;
  position: relative;
  color: var(--text-mid);
  font-size: 16px;
}

.article-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.article-quote {
  border-left: 4px solid var(--accent);
  padding: 24px 0 24px 24px;
  margin: 32px 0;
  font-style: italic;
  color: var(--text-mid);
  font-size: 17px;
  line-height: 1.8;
}

.article-quote footer {
  margin-top: 12px;
  color: var(--text-muted);
  font-style: normal;
  font-size: 14px;
  font-family: var(--font-mono);
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */

.article-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.article-toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.toc-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  transition: color 0.4s;
}

.toc-title .material-symbols-outlined {
  font-size: 16px;
  font-variation-settings: "FILL" 1;
}

.toc-list {
  list-style: none;
  padding: 0;
}

.toc-list li {
  margin-bottom: 8px;
}

.toc-link {
  font-size: 13px;
  color: var(--text-mid);
  text-decoration: none;
  display: block;
  padding: 6px 0;
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s;
}

.toc-link:hover {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* ============================================
   RELATED ARTICLES
   ============================================ */

.related-articles {
  padding: 80px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
}

.section-title {
  font-size: clamp(26px, 2.8vw, 36px);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  padding-bottom: 14px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  margin-bottom: 48px;
  transition: border-color 0.4s;
}

.section-title .highlight {
  color: var(--accent);
  transition: color 0.4s;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.blog-card-small {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
}

.blog-card-small:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.02);
}

.blog-card-image-small {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--bg-2);
}

.blog-card-image-small img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.blog-card-small:hover .blog-card-image-small img {
  transform: scale(1.05);
}

.blog-card-content-small {
  padding: 20px;
}

.blog-card-date-small {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.blog-card-title-small {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 10px 0;
  line-height: 1.4;
  transition: color 0.2s;
}

.blog-card-small:hover .blog-card-title-small {
  color: var(--accent);
}

.blog-card-link-small {
  color: var(--accent);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
}

.blog-card-link-small:hover {
  gap: 8px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

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

.brand-icon-small {
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 2px;
  transition: background 0.4s;
}

.footer-brand-text {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .article-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .article-sidebar {
    position: static;
  }

  .blogs-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  #name-big {
    display: none;
  }
  #name-small {
    display: inline;
  }

  .blog-hero {
    padding: 50px 0 0;
  }

  .blog-hero-title {
    font-size: 28px;
  }

  .blog-hero-subtitle {
    font-size: 14px;
  }

  .blog-search-section {
    padding: 30px 0 20px;
  }

  .blog-search-section.sticky {
    padding: 12px 0;
  }

  .skills-section,
  .projects-section,
  .fun-section,
  .experience-section,
  .contact-section {
    padding: 72px 0;
  }

  .strength-card {
    padding: 40px 28px;
  }

  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .contact-form-container {
    padding: 28px;
  }

  .timeline-item {
    padding: 28px 24px;
  }

  .footer-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-tab-btn {
    padding: 14px 20px;
    font-size: 14px;
  }

  .tags-filter-wrapper {
    gap: 8px;
  }

  .tag-scroll-btn {
    width: 36px;
    height: 36px;
  }

  .sort-section {
    align-items: center;
    gap: 12px;
  }

  .sort-btn {
    flex: 1;
    justify-content: center;
  }

  .article-container {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 70px 1.25rem 40px;
  }

  .article-top-bar {
    top: 68px;
  }

  .article-sidebar {
    position: static;
  }

  .blogs-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .container,
  .container-narrow,
  .container-wide {
    padding: 0 1.25rem;
  }

  .blog-hero-subtitle {
    font-size: 14px;
  }

  .sort-section {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 20px;
  }

  .sort-buttons-group {
    width: 100%;
    gap: 8px;
  }

  .sort-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    gap: 4px;
  }

  .sort-btn .material-symbols-outlined {
    font-size: 14px;
  }

  .article-title {
    font-size: 24px;
  }

  .article-heading {
    font-size: 20px;
    margin-top: 32px;
  }

  .article-meta {
    flex-direction: column;
    gap: 12px;
  }

  .article-paragraph {
    font-size: 15px;
  }

  .article-code-block {
    margin: 20px 0;
  }

  .article-code-block code {
    font-size: 12px;
  }

  .tags-filter-wrapper {
    gap: 6px;
    margin-bottom: 32px;
  }

  .tag-filter-btn {
    padding: 8px 14px;
    font-size: 12px;
  }

  .tag-scroll-btn {
    width: 32px;
    height: 32px;
  }

  .article-cover-image {
    height: 200px;
  }

  .back-link {
    font-size: 12px;
  }

  .article-container {
    padding: 60px 1.25rem 30px;
  }
}

/* ============================================
   SYNTAX HIGHLIGHTING (Highlight.js)
   ============================================ */

.hljs {
  background: var(--bg) !important;
  color: var(--text) !important;
}

.hljs-attr,
.hljs-attribute {
  color: #a1e8de !important;
}

.hljs-literal,
.hljs-number {
  color: #ae81ff !important;
}

.hljs-string {
  color: #a6e22e !important;
}

.hljs-type,
.hljs-class {
  color: #66d9ef !important;
}

.hljs-keyword {
  color: #f92672 !important;
}

.hljs-function {
  color: #a6e22e !important;
}

.hljs-comment {
  color: var(--text-muted) !important;
  font-style: italic;
}
