/* =========================================
   HAPPYCODER.IO — Main Stylesheet
   ========================================= */

/* --- Variables --- */
:root {
  --bg:          #080c10;
  --bg-card:     #0d1117;
  --bg-card-2:   #111820;
  --border:      rgba(255,255,255,0.07);
  --border-blue: rgba(37,99,235,0.4);
  --blue:        #2563eb;
  --blue-bright: #3b82f6;
  --blue-glow:   rgba(37,99,235,0.15);
  --text:        #e2e8f0;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --white:       #ffffff;
  --font-display: 'Space Mono', monospace;
  --font-body:   'DM Sans', sans-serif;
  --font-code:   'JetBrains Mono', monospace;
  --radius:      10px;
  --radius-lg:   16px;
  --container:   1200px;
  --header-h:    64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
address { font-style: normal; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* --- Utilities --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.text-blue { color: var(--blue-bright); }

.label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--blue-bright);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(37,99,235,0.15);
  border: 1px solid var(--border-blue);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--blue-bright);
  letter-spacing: 0.05em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn--white {
  background: var(--white);
  color: var(--blue);
  border-color: var(--white);
}
.btn--white:hover { background: transparent; color: var(--white); }
.btn--blue {
  background: var(--blue);
  color: var(--white);
  justify-content: center;
}
.btn--blue:hover { background: var(--blue-bright); }
.btn--full { width: 100%; }

/* =========================================
   HEADER
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8,12,16,0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 100%;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  transition: opacity 0.2s;
}
.site-logo:hover { opacity: 0.8; }
.site-logo__icon {
  width: 30px; height: 30px;
  background: var(--blue);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.site-nav__link {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.site-nav__link:hover,
.site-nav__link.active { color: var(--white); }
.layout-contact .site-nav__link[href*="contact"],
.layout-blog .site-nav__link[href*="blog"] {
  color: var(--blue-bright);
  border-bottom: 2px solid var(--blue-bright);
  border-radius: 0;
  padding-bottom: 4px;
}
.site-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 200px;
  color: var(--text-muted);
}
.header-search input {
  background: none; border: none; outline: none;
  color: var(--text-dim); font-size: 13px; font-family: var(--font-body);
  width: 100%;
}
.header-search input::placeholder { color: var(--text-muted); }
.avatar-btn {
  width: 34px; height: 34px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: border-color 0.2s;
}
.avatar-btn:hover { border-color: var(--blue); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text-dim); border-radius: 2px;
  transition: all 0.3s;
}

/* =========================================
   HERO
   ========================================= */
.hero {
  padding: 100px 0 80px;
  overflow: hidden;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin-bottom: 20px;
}
.hero__desc {
  font-size: 16px;
  color: var(--text-dim);
  max-width: 420px;
  line-height: 1.7;
}
.server-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.server-card::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(37,99,235,0.08), transparent 60%);
}
.server-card__lights {
  display: flex; gap: 6px; margin-bottom: 16px;
}
.server-card__lights span {
  width: 10px; height: 10px; border-radius: 50%;
}
.server-card__lights span:nth-child(1) { background: #ff5f57; }
.server-card__lights span:nth-child(2) { background: #ffbd2e; }
.server-card__lights span:nth-child(3) { background: #28ca41; }
.server-racks {
  display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px;
}
.rack {
  height: 36px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.rack::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--blue);
}
.rack:nth-child(2)::after { background: #10b981; }
.rack:nth-child(3)::after { background: #f59e0b; }
.server-card__badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--blue-bright);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.server-card__uptime {
  font-size: 13px;
  color: var(--text-muted);
}

/* =========================================
   SERVICES
   ========================================= */
.services {
  padding: 80px 0;
}
.service {
  padding: 80px 0;
  border-top: 1px solid var(--border);
}
.service__header { max-width: 640px; margin-bottom: 48px; }
.service__header--center { max-width: 600px; margin: 0 auto 48px; text-align: center; }
.service h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.service__desc { font-size: 15px; color: var(--text-dim); line-height: 1.7; }

.feature-grid {
  display: grid;
  gap: 16px;
}
.feature-grid--3 { grid-template-columns: repeat(3, 1fr); }
.feature-grid--4 { grid-template-columns: repeat(4, 1fr); }

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-2px);
}
.feature-card__icon {
  width: 40px; height: 40px;
  background: var(--blue-glow);
  border: 1px solid var(--border-blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-bottom: 14px;
}
.feature-card h3 {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--white);
  margin-bottom: 8px;
}
.feature-card p { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* Cloud service split layout */
.service__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.service__tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tech-tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s;
}
.tech-tile:hover { border-color: var(--border-blue); }
.tech-tile__icon { font-size: 28px; }
.tech-tile span {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
}
.checklist li::before {
  content: '';
  flex-shrink: 0;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--blue-glow);
  border: 1px solid var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  margin-top: 2px;
}

/* =========================================
   TECH STACK
   ========================================= */
.tech-stack {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  text-align: center;
}
.tech-stack__label { display: block; margin-bottom: 28px; }
.tech-stack__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 48px;
}
.tech-stack__list span {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}
.tech-stack__list span:hover { color: var(--text); }

/* =========================================
   CTA BANNER
   ========================================= */
.cta-banner {
  padding: 40px 0 80px;
}
.cta-banner__inner {
  background: linear-gradient(135deg, var(--blue) 0%, #1d4ed8 100%);
  border-radius: var(--radius-lg);
  padding: 60px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner__inner::before {
  content: '?';
  position: absolute;
  right: 48px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 200px;
  opacity: 0.05;
  line-height: 1;
  color: var(--white);
}
.cta-banner__inner h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  color: var(--white);
  margin-bottom: 12px;
}
.cta-banner__inner p {
  color: rgba(255,255,255,0.8);
  font-size: 15px;
  margin-bottom: 32px;
}

/* =========================================
   BLOG INDEX
   ========================================= */
.blog-index { padding: 48px 0 80px; }

.blog-search { margin-bottom: 48px; }
.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 20px;
  transition: border-color 0.2s;
}
.search-bar:focus-within { border-color: var(--blue); }
.search-bar__icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar__input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; font-family: var(--font-body);
}
.search-bar__input::placeholder { color: var(--text-muted); }

.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--white);
  margin-bottom: 20px;
}

/* Featured card */
.featured-article { margin-bottom: 48px; }
.featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.featured-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-2px);
}
.featured-card__image {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.featured-card__image img { width: 100%; height: 100%; object-fit: cover; }
.featured-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1e2a3a, #0d1117);
}
.featured-card__content {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-card__meta {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
}
.featured-card__meta time { font-size: 13px; color: var(--text-muted); }
.featured-card__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.featured-card__excerpt { font-size: 14px; color: var(--text-dim); line-height: 1.7; margin-bottom: 20px; }
.read-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue-bright);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.2s;
}
.read-more:hover { gap: 8px; }

/* Topic filter */
.topic-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
}
.topic-btn {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.topic-btn:hover { border-color: var(--blue); color: var(--white); }
.topic-btn--active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.article-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.article-card:hover {
  border-color: var(--border-blue);
  transform: translateY(-3px);
}
.article-card__link { display: flex; flex-direction: column; height: 100%; }
.article-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
}
.article-card__image img { width: 100%; height: 100%; object-fit: cover; }
.article-card__placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #1a2535, #0d1117);
}
.article-card__body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.article-card__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.read-time { font-size: 12px; color: var(--text-muted); }
.article-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--white);
  line-height: 1.35;
  margin-bottom: 8px;
}
.article-card__excerpt { font-size: 13px; color: var(--text-dim); line-height: 1.6; flex: 1; margin-bottom: 16px; }
.article-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.article-card__footer time { font-size: 12px; color: var(--text-muted); }

/* Pagination */
.pagination {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  margin-top: 48px;
}
.pagination__btn {
  padding: 8px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-dim);
  background: var(--bg-card);
  transition: all 0.2s;
}
.pagination__btn:hover { border-color: var(--blue); color: var(--white); }
.pagination__info { font-size: 13px; color: var(--text-muted); }

/* =========================================
   POST
   ========================================= */
.post { padding: 32px 0 80px; }
.post__container {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 48px;
  align-items: start;
}
.post__main { min-width: 0; }

.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 32px;
}
.breadcrumb a { color: var(--text-muted); transition: color 0.2s; }
.breadcrumb a:hover { color: var(--blue-bright); }

.post__share {
  float: left;
  margin-right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.share-btn {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
  font-size: 12px;
}
.share-btn:hover { border-color: var(--blue); color: var(--blue-bright); }

.post__meta {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.post__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.post__subtitle {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 620px;
}

.post__author {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 36px;
}
.author-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-avatar__placeholder {
  width: 100%; height: 100%;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
}
.author-name { font-weight: 600; font-size: 14px; color: var(--white); }
.author-role { font-size: 12px; color: var(--text-muted); }

/* Post content */
.post__content { font-size: 15px; line-height: 1.8; color: var(--text-dim); }
.post__content h2 {
  font-family: var(--font-display);
  font-size: 22px; color: var(--white);
  margin: 40px 0 16px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.post__content h3 {
  font-family: var(--font-display);
  font-size: 17px; color: var(--white);
  margin: 28px 0 12px;
}
.post__content p { margin-bottom: 16px; }
.post__content a { color: var(--blue-bright); text-decoration: underline; }
.post__content ul, .post__content ol {
  margin: 12px 0 20px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.post__content li { list-style: disc; }
.post__content li strong { color: var(--white); }
.post__content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 20px 0;
  position: relative;
}
.post__content pre::before {
  content: attr(data-file);
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}
.post__content code {
  font-family: var(--font-code);
  font-size: 13px;
  color: #a5f3fc;
}
.post__content p code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--blue-bright);
  font-size: 13px;
}
.post__content blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 20px;
  background: var(--blue-glow);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-dim);
}
.post__content .architect-note {
  background: var(--bg-card);
  border: 1px solid var(--border-blue);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 14px;
}
.post__content .architect-note strong {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--blue-bright);
  margin-bottom: 8px;
}
.post__content figure {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}
.post__content figure img { width: 100%; }
.post__content figcaption {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  font-style: italic;
}

/* Post footer */
.post__footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.post__tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.post__tags-label { font-family: var(--font-display); font-size: 11px; color: var(--text-muted); letter-spacing: 0.1em; }

/* Series prev/next nav */
.post__series-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 40px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.series-nav__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 45%;
  text-decoration: none;
}
.series-nav__item--next { align-items: flex-end; }
.series-nav__label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.series-nav__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-bright);
  line-height: 1.3;
}
.series-nav__item:hover .series-nav__title { text-decoration: underline; }

/* TOC Sidebar */
.post__toc { position: sticky; top: calc(var(--header-h) + 24px); }
.toc { font-size: 12px; }
.toc__nav-hint {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  line-height: 1.4;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-bottom: 16px;
}
.toc__links { display: flex; flex-direction: column; gap: 4px; }
.toc__links a {
  display: block;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
  border-left: 2px solid transparent;
  padding-left: 10px;
  transition: all 0.2s;
}
.toc__links a:hover,
.toc__links a.active {
  color: var(--blue-bright);
  border-color: var(--blue-bright);
}
.toc__series {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.toc__series-label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--blue-bright);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toc__series-label::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--blue-bright);
  border-radius: 50%;
  flex-shrink: 0;
}
.series-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: series-counter;
}
.series-list__item {
  counter-increment: series-counter;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 0;
}
.series-list__item::before {
  content: counter(series-counter, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.series-list__item a {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
  transition: color 0.2s;
}
.series-list__item a:hover { color: var(--blue-bright); }
.series-list__item--current::before { color: var(--blue-bright); }
.series-list__item--current span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-primary);
  font-weight: 600;
}

/* =========================================
   CONTACT
   ========================================= */
.contact-page { padding: 60px 0 100px; }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 20px;
}
.contact-desc { font-size: 16px; color: var(--text-dim); line-height: 1.7; margin-bottom: 40px; }
.contact-details { display: flex; flex-direction: column; gap: 16px; margin-bottom: 36px; }
.contact-detail {
  display: flex; align-items: flex-start; gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-detail__icon {
  width: 40px; height: 40px;
  background: var(--blue-glow);
  border: 1px solid var(--border-blue);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue-bright);
  flex-shrink: 0;
}
.contact-detail__label {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--blue-bright);
  margin-bottom: 4px;
}
.contact-detail__value { font-size: 15px; color: var(--white); font-weight: 500; }
.social-links { margin-bottom: 36px; }
.social-links__icons { display: flex; gap: 10px; margin-top: 12px; }
.social-btn {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dim);
  transition: all 0.2s;
}
.social-btn:hover { border-color: var(--blue); color: var(--blue-bright); }
.contact-quote {
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-dim);
  font-style: italic;
  line-height: 1.6;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 60px;
}
.site-footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer-brand .site-logo { margin-bottom: 14px; }
.footer-brand p { font-size: 13px; color: var(--text-muted); line-height: 1.6; max-width: 260px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul a {
  font-size: 13px;
  color: var(--text-muted);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--white); }
.footer-col address {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 32px; height: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: all 0.2s;
}
.footer-social a:hover { border-color: var(--blue); color: var(--blue-bright); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom p { font-size: 12px; color: var(--text-muted); }
.footer-bottom__icons { display: flex; gap: 16px; }
.footer-bottom__icons a { color: var(--text-muted); transition: color 0.2s; }
.footer-bottom__icons a:hover { color: var(--white); }

/* =========================================
   SYNTAX HIGHLIGHTING (Rouge)
   ========================================= */
.highlight { background: transparent !important; }
.highlight .c, .highlight .cm, .highlight .c1 { color: #64748b; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn { color: #93c5fd; }
.highlight .s, .highlight .s1, .highlight .s2 { color: #86efac; }
.highlight .nx, .highlight .n { color: #e2e8f0; }
.highlight .nf, .highlight .na { color: #a5f3fc; }
.highlight .mi, .highlight .mf { color: #fcd34d; }
.highlight .o { color: #94a3b8; }
.highlight .p { color: #cbd5e1; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .feature-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .post__container { grid-template-columns: 1fr; }
  .post__toc { display: none; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --header-h: 56px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .feature-grid--3 { grid-template-columns: 1fr; }
  .service__split { grid-template-columns: 1fr; }
  .featured-card { grid-template-columns: 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    z-index: 99;
  }
  .hamburger { display: flex; }
  .header-search { display: none; }
}
@media (max-width: 480px) {
  .cta-banner__inner { padding: 40px 24px; }
  .tech-stack__list { gap: 24px; }
  .tech-stack__list span { font-size: 15px; }

}
