:root {
  --bg-color: #ffffff;         /* Clean White Background */
  --surface-color: #f6f8fa;    /* Light Grey Surface */
  --text-primary: #1f2328;     /* Dark Grey for readability */
  --text-secondary: #656d76;   /* Medium Grey for subtler text */
  --accent-color: #0969da;     /* Professional Blue */
  --accent-hover: #0842a8;     /* Deeper Blue for hover */
  --border-color: #d0d7de;     /* Soft border color */
  --header-bg: #24292f;        /* Sophisticated Dark Grey Header */
  --header-text: #ffffff;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif;
  --transition: all 0.2s ease;
}

/* Scroll animation keyframes */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  opacity: 1;
  --animation-delay: 0s;
}

.post-thumbnail {
  opacity: 0;
}

.post-card.animate-in .post-thumbnail {
  animation: slideDown 0.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: var(--animation-delay);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.8s ease-out, color 0.8s ease-out;
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

/* GitHub Double Header */
.gh-header {
  background: var(--header-bg);
  color: var(--header-text);
  width: 100%;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.8s ease-out, border-color 0.8s ease-out;
}
.gh-nav-top { 
  display: grid; 
  grid-template-columns: 1fr auto 1fr;
  align-items: center; 
  padding: 18px 24px; 
  max-width: 1440px; 
  margin: 0 auto;
}

.gh-logo { 
  display: flex; 
  align-items: center; 
  text-decoration: none; 
  color: #e8f1ff;
  line-height: 1;
}
.gh-logo .slash { color: #7a94af; font-weight: 300; margin: 0 8px; font-size: 24px; line-height: 1;}
.gh-logo .wiki { font-weight: 500; font-size: 20px; letter-spacing: -0.5px; line-height: 1;}

/* Wide Divider Center Navigation */
.gh-center-nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.center-nav-link {
  color: rgba(232, 241, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: all 0.25s ease;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  line-height: 1;
}

.center-nav-link:hover, .center-nav-link.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

.nav-divider {
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.15);
}

/* Search Bar */
.search-container { justify-self: end; position: relative; }
.gh-search { display:flex; align-items: center; background: rgba(232,241,255,0.12); border-radius: 6px; padding: 6px 12px; border: 1px solid transparent; width: 280px; transition: var(--transition);}
.gh-search:focus-within { background: #172d4d; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(255,157,61,0.2);}
.gh-search input { background: transparent; border: none; color: #e8f1ff; padding: 2px 4px; box-shadow: none; outline: none; width: 100%; font-size: 14px;}
.gh-search input::placeholder { color: #7a94af; }
.gh-search:focus-within input { color: #ffffff; }
.gh-search:focus-within .search-icon { color: #ffffff; }
.gh-search .search-icon { font-size: 18px; color: #7a94af; margin-right: 4px;}

/* Search Results Dropdown */
#results-container {
  position: absolute;
  top: 100%;
  right: 0;
  width: 320px;
  background-color: #161b22;
  border: 1px solid #30363d;
  border-radius: 8px;
  margin-top: 8px;
  padding: 8px 0;
  list-style: none;
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: none;
}

#results-container.visible { display: block; }
#results-container li { border-bottom: 1px solid rgba(255,255,255,0.05); }
#results-container li:last-child { border-bottom: none; }

#results-container a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  transition: background 0.2s;
}

#results-container a:hover { background-color: #21262d; }
.search-result-title { display: block; color: #58a6ff; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.search-result-meta { display: flex; font-size: 11px; color: #7d8590; gap: 8px; text-transform: uppercase; letter-spacing: 0.05em; }


/* Sub Navbar */
.gh-nav-sub { display: flex; padding: 4px 28px 8px 28px; position: relative; max-width: 1440px; margin: 0 auto; gap: 24px;}
.gh-sub-item-wrapper { position: static; }
.gh-sub-item { padding: 15px 20px; cursor: pointer; font-size: 15px; color: #e8f1ff; font-weight: 600; display: flex; align-items: center; gap: 6px; border-bottom: 2px solid transparent;}
.gh-sub-item:hover { color: #ff9d3d; border-bottom-color: #ff9d3d;}
.gh-sub-item .material-symbols-outlined { font-size: 18px; color: #7a94af; }
.gh-sub-item .nav-toggle-icon { transition: transform 0.4s ease; }
.gh-sub-item-wrapper.active .nav-toggle-icon { transform: rotate(180deg); }

/* Mega Menu Dropdown */
.mega-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--bg-color);
  color: var(--text-primary);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 0 0 12px 12px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1), transform 1.0s cubic-bezier(0.16, 1, 0.3, 1), visibility 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 40px;
  z-index: 1000;
  border: 1px solid var(--border-color);
  border-top: none;
  width: 100%;
  cursor: default;
}
.gh-sub-item-wrapper.active .mega-menu { visibility: visible; opacity: 1; transform: translateY(0); }

.mega-menu-content { display: flex; max-width: 1440px; margin: 0 auto; gap: 64px; }
.mega-menu-left { flex: 2; }
.mega-menu-right { flex: 1; padding-left: 40px; border-left: 1px solid var(--border-color); }

.mega-category-title { font-size: 20px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; color: var(--text-primary); text-decoration: none; border-bottom: none;}
.mega-category-title:hover { color: var(--accent-color); }
.mega-category-desc { color: var(--text-secondary); font-size: 14px; margin-bottom: 32px; }

.mega-items-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.mega-item { display: block; text-decoration: none; }
.mega-item-title { font-weight: 600; font-size: 15px; color: var(--text-primary); margin-bottom: 6px; }
.mega-item-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; }
.mega-item:hover .mega-item-title { color: var(--accent-color); }

.mega-featured { text-decoration: none; display: block; }
.mega-featured img { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; margin-bottom: 20px; border: 1px solid var(--border-color);}
.mega-featured-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; line-height: 1.3;}
.mega-featured-desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.5;}
.mega-featured-link { color: var(--accent-color); font-size: 14px; font-weight: 600; display: flex; align-items: center; }

/* Main Content Area */
.page-content {
  min-height: calc(100vh - 200px);
  padding: 0 0 64px 0;
  background-color: var(--bg-color);
  transition: background-color 0.8s ease-out;
}
.home-wrapper, .page-wrapper { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.post-wrapper { width: 100%; }

/* ─── Section header (heading + view-all link) ────── */
.home-section { margin-top: 56px; opacity: 1; transition: opacity 0.6s ease-out; }
.home-section.transitioning { opacity: 0.7; }

/* Security Section Theme - Purple + Cyan */
body.security-theme {
  --bg-color: #020617;         /* Very Deep Navy */
  --surface-color: #0f172a;    /* Deep Navy Surface */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-color: #10b981;     /* Emerald Green */
  --accent-hover: #34d399;
  --header-bg: #020617;
  --border-color: #1e293b;
}

@keyframes sectionGlow {
  0% { box-shadow: inset 0 0 0 0 rgba(0, 255, 204, 0); }
  50% { box-shadow: inset 0 0 40px 0 rgba(0, 255, 204, 0.12); }
  100% { box-shadow: inset 0 0 0 0 rgba(0, 255, 204, 0); }
}

.home-section.glow { animation: sectionGlow 1.2s ease-out; }


.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 32px;
}

.section-heading {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}

.section-view-all {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  white-space: nowrap;
}
.section-view-all:hover { text-decoration: underline; }
.section-view-all .material-symbols-outlined { font-size: 16px; }

/* Post Card Grid - Spotify Style */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
@media (max-width: 1024px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }

.post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-bottom: none;
  background: var(--bg-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
}

.post-thumbnail {
  width: 100%;
  height: 0;
  padding-bottom: 52%;
  background-color: var(--surface-color);
  background-size: cover;
  background-position: center;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0;
  overflow: hidden;
  position: relative;
  transition: opacity 0.3s ease;
}
.post-card:hover .post-thumbnail { opacity: 0.92; }
.post-thumbnail.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1a4d7a 0%, #0d3b66 100%);
}
.post-thumbnail.placeholder .material-symbols-outlined { font-size: 48px; color: #7a94af; }

.post-content { padding: 16px 20px 20px; display: flex; flex-direction: column; flex-grow: 1; }

/* Category label (github.blog text-link style with color per category) */
.post-category-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--accent-color);
  letter-spacing: 0.02em;
}
.post-category-label[data-cat="security"]   { color: #ff6b6b; }
.post-category-label[data-cat="engineering"] { color: #7ec8ff; }
.post-category-label[data-cat="ai & ml"]    { color: #d97ef6; }
.post-category-label[data-cat="genai"]      { color: #d97ef6; }
.post-category-label[data-cat="machine learning"] { color: #d97ef6; }
.post-category-label[data-cat="career"]     { color: #4ecdc4; }
.post-category-label[data-cat="tools"]      { color: #ffa500; }
.post-category-label[data-cat="personal"]   { color: #ff9d3d; }

.post-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 10px 0;
  line-height: 1.4;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  transition: color 0.2s ease;
}
.post-card:hover .post-title { color: var(--accent-color); }

.post-excerpt {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 16px 0;
  flex-grow: 1;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Author meta row: avatar · name · separator · date */
.post-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.post-author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--header-bg);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  text-transform: uppercase;
}

.post-author-avatar-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.post-author-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.post-meta-sep {
  font-size: 13px;
  color: var(--border-color);
}

.post-meta-date {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ─── Newsletter section ─────────────────────────── */
.newsletter-section {
  margin: 72px 0 0;
  background: #172d4d;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 56px 48px;
}

.newsletter-inner {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.newsletter-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0 0 28px;
  line-height: 1.6;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.newsletter-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  outline: none;
  font-family: var(--font-family);
  background: #0f1419;
  color: var(--text-primary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.newsletter-input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(255, 157, 61, 0.3);
}

.newsletter-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background: var(--accent-color);
  color: #0f1419;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--font-family);
  white-space: nowrap;
  transition: background 0.15s ease;
}
.newsletter-btn:hover { background: var(--accent-hover); }

.newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: left;
  justify-content: center;
}
.newsletter-checkbox { margin-top: 2px; flex-shrink: 0; }
.newsletter-consent a { color: var(--accent-color); text-decoration: none; }
.newsletter-consent a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .newsletter-section { padding: 40px 24px; }
  .newsletter-form { flex-direction: column; }
}

/* ─── Pagination - GitHub Blog Style ──────────────── */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border-color);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  padding: 10px 4px;
  transition: color 0.2s ease;
}
.pagination-btn .material-symbols-outlined { font-size: 20px; }
.pagination-btn:hover { color: var(--accent-hover); }
.pagination-btn.disabled {
  color: var(--border-color);
  pointer-events: none;
  cursor: default;
}

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

.pagination-page {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.pagination-page:hover { background: var(--surface-color); color: var(--accent-color); }
.pagination-page.active {
  background: var(--accent-color);
  color: #ffffff;
  font-weight: 600;
  pointer-events: none;
}

.pagination-ellipsis {
  font-size: 15px;
  color: var(--text-secondary);
  padding: 8px 6px;
  user-select: none;
}

/* Category Hero Banner */
.category-hero { background: var(--header-bg); color: #ffffff; padding: 64px 24px; text-align: center; border-bottom: 1px solid #30363d;}
.category-hero-content { max-width: 800px; margin: 0 auto; }
.category-hero h1 { font-size: 48px; font-weight: 700; margin: 0 0 16px 0; letter-spacing: -1px; }
.category-hero p { font-size: 20px; color: #8c959f; margin: 0; line-height: 1.5; }

/* Post Article specific */
.post-header { margin: 64px 0 48px; text-align: center; }
.post-header h1 { font-size: 42px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; margin-bottom: 24px; color: var(--text-primary);}
.post-article { max-width: 860px; margin: 0 auto; }
.post-article img { max-width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border-color); margin: 32px 0;}
.post-main-content { font-size: 17px; line-height: 1.7; color: var(--text-primary); }
.post-main-content h2 { font-size: 28px; margin-top: 48px; margin-bottom: 16px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; color: var(--text-primary);}
.post-main-content h3 { font-size: 22px; margin-top: 32px; margin-bottom: 16px; color: var(--text-primary);}
.post-main-content ul { padding-left: 20px; }
.post-main-content li { margin-bottom: 8px; }
.post-main-content p { margin-bottom: 20px; }
/* ─── Code Block Enhancements (Thayer Theme) ────────── */
.post-main-content .highlight {
  position: relative;
  margin: 28px 0;
  background-color: #1b1d1e !important; /* Thayer Background */
  border-radius: 8px;
  border: 1px solid #2b2d2e;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.post-main-content pre {
  margin: 0 !important;
  padding: 18px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 13.5px !important;
  line-height: 1.6;
  overflow-x: auto;
  color: #a0a0a0; /* Thayer Foreground */
}

/* Custom Scrollbar */
.post-main-content .highlight pre::-webkit-scrollbar {
  height: 8px;
}
.post-main-content .highlight pre::-webkit-scrollbar-track {
  background: #1b1d1e;
}
.post-main-content .highlight pre::-webkit-scrollbar-thumb {
  background: #3b3d3f;
  border-radius: 4px;
}
.post-main-content .highlight pre::-webkit-scrollbar-thumb:hover {
  background: #4b4d4f;
}

/* Code Block Header */
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px;
  background-color: #2b2d2e; /* Thayer Bold Black */
  border-bottom: 1px solid #1b1d1e;
  user-select: none;
}

.code-lang {
  color: #808384;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: var(--font-family);
}

.copy-btn {
  background: transparent;
  border: 1px solid #3b3d3f;
  color: #808384;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-family: var(--font-family);
}

.copy-btn:hover {
  background-color: #3b3d3f;
  border-color: #5b5d5f;
  color: #ffffff;
}

.copy-btn.copied {
  color: #82b414;
  border-color: #82b414;
}

/* ─── Thayer Syntax Highlighting Theme ─── */
.highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { color: #808384; font-style: italic; } /* Comments (Grey) */
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kp, .highlight .kr, .highlight .kt { color: #f92672; } /* Keywords (Vibrant Red) */
.highlight .n, .highlight .nx { color: #a0a0a0; } /* Identifiers */
.highlight .na, .highlight .nb, .highlight .nc, .highlight .no, .highlight .nd, .highlight .ni, .highlight .ne, .highlight .nf, .highlight .nl, .highlight .nn, .highlight .nt, .highlight .nv { color: #56c2d6; } /* Names/Functions (Cyan-Blue) */
.highlight .s, .highlight .sa, .highlight .sb, .highlight .sc, .highlight .dl, .highlight .sd, .highlight .s2, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .s1, .highlight .ss { color: #82b414; } /* Strings (Green) */
.highlight .m, .highlight .mb, .highlight .mf, .highlight .mh, .highlight .mi, .highlight .il, .highlight .mo { color: #fd971f; } /* Numbers (Orange) */
.highlight .o, .highlight .ow { color: #f92672; } /* Operators */
.highlight .p { color: #a0a0a0; } /* Punctuation */
.highlight .gh { color: #fd971f; font-weight: bold; } /* Markdown Headings */
.highlight .gu { color: #fd971f; font-weight: bold; } /* Markdown Subheadings */
.highlight .gd { color: #f8f8f2; background-color: #490202; } /* Diff Deleted */
.highlight .gi { color: #f8f8f2; background-color: #033a16; } /* Diff Inserted */
/* Language Specifics */
.highlight .l, .highlight .ld { color: #fd971f; }
.highlight .l-Scalar-Plain { color: #a0a0a0; }
.highlight .pi { color: #f92672; } /* YAML punctuation */
.highlight .kc { color: #f92672; } /* Boolean/Null */
.highlight .err { color: #f92672; border-bottom: 1px dotted #f92672; } /* Error */



.post-main-content a { color: var(--accent-color); text-decoration: none; }
.post-main-content a:hover { text-decoration: underline; }

/* ─── Footer ─────────────────────────────────────────── */
.gh-footer {
  background: #24292f;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top: brand + nav */
.footer-top {
  display: flex;
  gap: 64px;
  padding: 64px 0 48px;
}

.footer-brand {
  flex-shrink: 0;
  width: 220px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
}
.footer-logo:hover { color: var(--accent-color); }

.footer-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin: 8px 0 0;
}

/* Nav columns */
.footer-nav {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
  flex: 1;
}

.footer-col { min-width: 120px; }

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin: 0 0 16px;
}

.footer-col-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-links a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  transition: color 0.15s ease;
}
.footer-col-links a:hover { color: #ffffff; }

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--text-secondary);
}

.footer-legal-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-legal-link:hover { color: var(--accent-color); text-decoration: underline; }

/* Social icons */
.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 4px;
}
.footer-social-icon:hover { color: var(--text-primary); }

/* Responsive */
@media (max-width: 768px) {
  .footer-top { flex-direction: column; gap: 40px; }
  .footer-brand { width: auto; }
  .footer-nav { gap: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ════════════════════════════════════════════════════════════════
   HERO BANNER — Home page gradient + glow section
   ════════════════════════════════════════════════════════════════ */
.hero-banner {
  position: relative;
  background-color: #24292f; /* Sophisticated Dark Grey matching header */
  overflow: hidden;
  min-height: 520px;
  display: flex;
  align-items: center;
}

#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Glow blobs - hidden for Matrix theme */
.hero-glow {
  display: none;
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 80px 24px 88px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* Hero text column */
.hero-cat-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7ec8ff;
  margin-bottom: 18px;
  text-decoration: none;
}
.hero-cat-badge[data-cat="security"]   { color: #ff6b6b; }
.hero-cat-badge[data-cat="engineering"] { color: #7ec8ff; }
.hero-cat-badge[data-cat="ai & ml"]    { color: #d97ef6; }
.hero-cat-badge[data-cat="career"]     { color: #4ecdc4; }
.hero-cat-badge[data-cat="tools"]      { color: #ffa500; }
.hero-cat-badge[data-cat="personal"]   { color: #ff9d3d; }

.hero-title {
  font-size: 44px;
  font-weight: 800;
  color: #e8f1ff;
  letter-spacing: -1.2px;
  line-height: 1.15;
  margin: 0 0 20px;
}

.hero-excerpt {
  font-size: 17px;
  color: #a8b9d1;
  line-height: 1.65;
  margin: 0 0 32px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff9d3d;
  color: #0f1419;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 157, 61, 0.4);
}
.hero-cta:hover {
  background: #ffb366;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255, 157, 61, 0.5);
}
.hero-cta .material-symbols-outlined { font-size: 18px; }

.hero-date {
  font-size: 13px;
  color: #a8b9d1;
}

/* Hero image column */
.hero-featured-image {
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #30414d;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 8px 20px rgba(0, 0, 0, 0.3);
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-featured-image:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6), 0 12px 24px rgba(0, 0, 0, 0.4);
}
.hero-featured-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}
.hero-featured-placeholder {
  width: 100%;
  height: 300px;
  background: linear-gradient(135deg, #1c2128 0%, #21262d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-featured-placeholder .material-symbols-outlined {
  font-size: 72px;
  color: #30363d;
}

/* ════════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT — Latest + Popular
   ════════════════════════════════════════════════════════════════ */
.home-two-col {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 56px;
  margin-top: 56px;
}

/* Latest column uses a 2-col post grid */
.post-grid-2 {
  grid-template-columns: repeat(2, 1fr) !important;
}

/* ── Popular sidebar ─────────────────── */
.home-col-sidebar .section-header {
  margin-bottom: 24px;
}

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

.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.popular-item:first-child { padding-top: 0; }
.popular-item:last-child  { border-bottom: none; }
.popular-item:hover { opacity: 0.8; }

.popular-rank {
  font-size: 26px;
  font-weight: 800;
  color: var(--border-color);
  min-width: 28px;
  line-height: 1;
  letter-spacing: -1px;
  flex-shrink: 0;
  margin-top: 2px;
}

.popular-item-content { flex: 1; min-width: 0; }

.popular-item-category {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-color);
  margin-bottom: 5px;
}
.popular-item-category[data-cat="security"]   { color: #ff6b6b; }
.popular-item-category[data-cat="engineering"] { color: #7ec8ff; }
.popular-item-category[data-cat="ai & ml"]    { color: #d97ef6; }
.popular-item-category[data-cat="career"]     { color: #4ecdc4; }
.popular-item-category[data-cat="tools"]      { color: #ffa500; }
.popular-item-category[data-cat="personal"]   { color: #ff9d3d; }

.popular-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 5px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.2s ease;
}
.popular-item:hover .popular-item-title { color: var(--accent-color); }

.popular-item-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.popular-item-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.post-meta-extra {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

/* ════════════════════════════════════════════════════════════════
   CATEGORY HERO — github.blog/ai-and-ml/ style
   ════════════════════════════════════════════════════════════════ */
.cat-hero {
  position: relative;
  overflow: hidden;
  padding: 100px 0 80px;
  background: #0d1117; /* Fallback */
}

/* Developer Theme Inspired Gradients */
.cat-hero--security {
  background: linear-gradient(135deg, #282a36 0%, #44475a 40%, #6272a4 100%); /* Dracula */
}
.cat-hero--engineering {
  background: linear-gradient(135deg, #282c34 0%, #3e4451 40%, #abb2bf 100%); /* One Dark */
}
.cat-hero--ai-ml {
  background: linear-gradient(135deg, #1a1b26 0%, #24283b 40%, #7aa2f7 100%); /* Tokyo Night */
}
.cat-hero--career {
  background: linear-gradient(135deg, #011627 0%, #0b2942 40%, #82aaff 100%); /* Night Owl */
}
.cat-hero--tools {
  background: linear-gradient(135deg, #272822 0%, #3e3d32 40%, #f92672 100%); /* Monokai */
}
.cat-hero--personal {
  background: linear-gradient(135deg, #002b36 0%, #073642 40%, #268bd2 100%); /* Solarized Dark */
}

/* Glow blob */
.cat-hero-glow-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.cat-hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 500px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
}

/* Per-category glow color */
.cat-hero--security       .cat-hero-glow { background: rgba(255, 107, 107, 0.3); }
.cat-hero--engineering    .cat-hero-glow { background: rgba(126, 200, 255, 0.3); }
.cat-hero--ai-ml          .cat-hero-glow { background: rgba(217, 126, 246, 0.3); }
.cat-hero--ai---ml        .cat-hero-glow { background: rgba(217, 126, 246, 0.3); }
.cat-hero--career         .cat-hero-glow { background: rgba(78, 205, 196, 0.3); }
.cat-hero--tools          .cat-hero-glow { background: rgba(255, 165, 0, 0.3); }
.cat-hero--personal       .cat-hero-glow { background: rgba(255, 157, 61, 0.3); }

.cat-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.cat-hero-eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 16px;
}

.cat-hero-title {
  font-size: 72px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -3px;
  line-height: 1;
  margin: 0 0 24px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cat-hero-desc {
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  line-height: 1.6;
  margin: 0 0 36px;
}

/* Sub-category pills */
.cat-subcategory-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(232, 241, 255, 0.08);
  color: rgba(232, 241, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid rgba(232, 241, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.cat-pill:hover {
  background: rgba(232, 241, 255, 0.16);
  border-color: rgba(232, 241, 255, 0.25);
  color: #e8f1ff;
}

/* ════════════════════════════════════════════════════════════════
   CATEGORY FEATURED POST — Large hero card
   ════════════════════════════════════════════════════════════════ */
.cat-content-wrap { padding-top: 0; }

.cat-featured-wrap {
  padding: 56px 0 0;
}

.cat-featured-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg-color);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.cat-featured-card:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.13);
  transform: translateY(-3px);
}

.cat-featured-img {
  min-height: 320px;
  background-size: cover;
  background-position: center;
  background-color: var(--surface-color);
}
.cat-featured-img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0f2f5 0%, #dfe3e8 100%);
}
.cat-featured-img--placeholder .material-symbols-outlined {
  font-size: 72px;
  color: #8c959f;
}

.cat-featured-content {
  padding: 44px 44px 44px 40px;
  display: flex;
  flex-direction: column;
}

.cat-featured-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-color);
  margin-bottom: 16px;
}
.cat-featured-label[data-cat="security"]   { color: #cf222e; }
.cat-featured-label[data-cat="engineering"] { color: #0969da; }
.cat-featured-label[data-cat="ai & ml"]    { color: #8250df; }
.cat-featured-label[data-cat="genai"]      { color: #8250df; }
.cat-featured-label[data-cat="career"]     { color: #1a7f37; }
.cat-featured-label[data-cat="tools"]      { color: #9a6700; }
.cat-featured-label[data-cat="personal"]   { color: #bf4b8a; }

.cat-featured-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 0 0 16px;
  letter-spacing: -0.5px;
  transition: color 0.2s ease;
}
.cat-featured-card:hover .cat-featured-title { color: var(--accent-color); }

.cat-featured-excerpt {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 24px;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-featured-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.cat-featured-readmore {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-color);
  margin-top: auto;
}
.cat-featured-readmore .material-symbols-outlined { font-size: 16px; }

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .home-two-col {
    grid-template-columns: 1fr;
  }
  .home-col-sidebar {
    display: grid;
    grid-template-columns: 1fr;
  }
  .popular-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 32px;
  }
}

@media (max-width: 900px) {
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-featured-image { display: none; }
  .hero-title { font-size: 34px; }

  .cat-featured-card {
    grid-template-columns: 1fr;
  }
  .cat-featured-img { min-height: 240px; }
  .cat-featured-content { padding: 32px; }

  .cat-hero-title { font-size: 44px; }
}

@media (max-width: 640px) {
  .hero-banner-inner { padding: 56px 16px 64px; }
  .hero-title { font-size: 28px; }
  .hero-excerpt { font-size: 15px; }

  .post-grid-2 { grid-template-columns: 1fr !important; }
  .popular-list { grid-template-columns: 1fr; }

  .cat-hero { padding: 56px 0 48px; }
  .cat-hero-title { font-size: 36px; letter-spacing: -1px; }
  .cat-hero-desc { font-size: 16px; }

  .cat-featured-content { padding: 24px; }
  .cat-featured-title { font-size: 22px; }
}

/* ════════════════════════════════════════════════════════════════
   PROFILE / ABOUT PAGE — Hero, Tabs, Skills, Experience
   ════════════════════════════════════════════════════════════════ */

/* ── Profile Hero ─────────────────────────────────────────────── */
.profile-hero {
  position: relative;
  background: linear-gradient(135deg, #0d1117 0%, #161b22 60%, #1c2128 100%);
  overflow: hidden;
  padding: 72px 0 64px;
}

.profile-hero-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(90px);
}
.profile-hero-glow-1 {
  width: 600px; height: 400px;
  top: -100px; left: -50px;
  background: radial-gradient(ellipse, rgba(9,105,218,0.2) 0%, transparent 70%);
}
.profile-hero-glow-2 {
  width: 500px; height: 400px;
  bottom: -150px; right: 0;
  background: radial-gradient(ellipse, rgba(130,80,223,0.15) 0%, transparent 70%);
}

.profile-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.profile-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.profile-avatar-img {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.profile-avatar-fallback {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0969da 0%, #8250df 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  font-weight: 800;
  color: #ffffff;
  border: 3px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.profile-status-dot {
  position: absolute;
  bottom: 6px; right: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #56d364;
  border: 2px solid #0d1117;
  box-shadow: 0 0 0 2px rgba(86,211,100,0.4);
}

.profile-info { flex: 1; }

.profile-name {
  font-size: 36px;
  font-weight: 800;
  color: #f0f6fc;
  letter-spacing: -0.8px;
  margin: 0 0 6px;
}

.profile-title {
  font-size: 16px;
  color: rgba(255,255,255,0.55);
  margin: 0 0 14px;
  font-weight: 400;
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.profile-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}
.profile-badge--red    { color: #ff7b72; border-color: rgba(255,123,114,0.3); background: rgba(255,123,114,0.1); }
.profile-badge--purple { color: #bc8cff; border-color: rgba(188,140,255,0.3); background: rgba(188,140,255,0.1); }
.profile-badge--blue   { color: #58a6ff; border-color: rgba(88,166,255,0.3);  background: rgba(88,166,255,0.1);  }
.profile-badge--green  { color: #56d364; border-color: rgba(86,211,100,0.3);  background: rgba(86,211,100,0.1);  }

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}
.profile-btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.3);
}
.profile-btn--primary {
  background: #238636;
  color: #ffffff;
  border-color: rgba(35,134,54,0.4);
}
.profile-btn--primary:hover { background: #2ea043; }
.profile-btn .material-symbols-outlined { font-size: 16px; }

/* ── Profile Tab Navigation ─────────────────────────────────── */
.profile-tab-nav {
  background: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.profile-tab-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
}

.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.profile-tab:hover { color: var(--text-primary); border-bottom-color: var(--border-color); }
.profile-tab--active { color: var(--text-primary); border-bottom-color: var(--accent-color); }
.profile-tab .material-symbols-outlined { font-size: 16px; }

/* ── Profile Content Wrapper ─────────────────────────────────── */
.profile-content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ── Stats Strip ─────────────────────────────────────────────── */
.profile-stats-strip {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 120px;
  padding: 0 16px;
}

.profile-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.8px;
  margin-bottom: 4px;
}

.profile-stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.4;
}

.profile-stat-divider {
  width: 1px;
  height: 48px;
  background: var(--border-color);
  flex-shrink: 0;
}

/* ── Main Grid (Left + Right) ────────────────────────────────── */
.profile-main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* ── Profile Sections ────────────────────────────────────────── */
.profile-section {
  margin-bottom: 48px;
}

.profile-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.profile-section-title .material-symbols-outlined { font-size: 20px; color: var(--accent-color); }

/* Bio */
.profile-bio p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 16px; }
.profile-bio p:last-child { margin-bottom: 0; }
.profile-bio strong { color: var(--text-primary); font-weight: 600; }
.profile-bio em { color: var(--text-primary); font-style: normal; font-weight: 500; }

.profile-quote {
  border-left: 3px solid var(--accent-color);
  margin: 24px 0 0;
  padding: 12px 20px;
  background: var(--surface-color);
  border-radius: 0 6px 6px 0;
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
}

/* ── Skills ──────────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.skill-group {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
}

.skill-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #ffffff;
}
.skill-group-header .material-symbols-outlined { font-size: 16px; }
.skill-group--red    { background: #cf222e; }
.skill-group--purple { background: #8250df; }
.skill-group--blue   { background: #0969da; }
.skill-group--green  { background: #1a7f37; }

.skill-chips {
  padding: 14px 14px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Default (red) chip colors */
.skill-chip {
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
  cursor: default;
}

.chip--expert  { background: rgba(207,34,46,0.12);  color: #cf222e; border-color: rgba(207,34,46,0.25); }
.chip--advanced{ background: rgba(207,34,46,0.06);  color: #99424a; border-color: rgba(207,34,46,0.15); }
.chip--familiar{ background: transparent; color: #9a6700; border-color: var(--border-color); }

/* Purple variant (AI) */
.chip--purple.chip--expert  { background: rgba(130,80,223,0.12); color: #8250df; border-color: rgba(130,80,223,0.25); }
.chip--purple.chip--advanced{ background: rgba(130,80,223,0.06); color: #6b3dbf; border-color: rgba(130,80,223,0.15); }
.chip--purple.chip--familiar{ background: transparent; color: #8250df; border-color: var(--border-color); }

/* Blue variant (stack) */
.chip--blue.chip--expert  { background: rgba(9,105,218,0.12); color: #0969da; border-color: rgba(9,105,218,0.25); }
.chip--blue.chip--advanced{ background: rgba(9,105,218,0.06); color: #054fa0; border-color: rgba(9,105,218,0.15); }
.chip--blue.chip--familiar{ background: transparent; color: #0969da; border-color: var(--border-color); }

/* Green variant (leadership) */
.chip--green.chip--expert  { background: rgba(26,127,55,0.12); color: #1a7f37; border-color: rgba(26,127,55,0.25); }
.chip--green.chip--advanced{ background: rgba(26,127,55,0.06); color: #145c28; border-color: rgba(26,127,55,0.15); }
.chip--green.chip--familiar{ background: transparent; color: #1a7f37; border-color: var(--border-color); }

.skill-level-legend {
  display: flex;
  gap: 12px;
  padding: 4px 14px 12px;
}

.legend-item { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--text-secondary); }

.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--expert  { background: #cf222e; }
.dot--advanced{ background: #99424a; }
.dot--familiar{ background: var(--border-color); }

/* ── Philosophy ──────────────────────────────────────────────── */
.profile-philosophy {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.philosophy-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface-color);
  border-radius: 8px;
  padding: 16px 20px;
  border: 1px solid var(--border-color);
}

.philosophy-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.philosophy-item p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-secondary); padding-top: 4px; }

/* ── Right Column Boxes ──────────────────────────────────────── */
.profile-card-box {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.profile-card-box:last-child { margin-bottom: 0; }

.profile-card-box--highlight {
  border-color: rgba(9,105,218,0.3);
  background: linear-gradient(135deg, rgba(9,105,218,0.03) 0%, rgba(130,80,223,0.03) 100%);
}

.profile-card-box-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.profile-card-box-link {
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.profile-card-box-link:hover { text-decoration: underline; }
.profile-card-box-link .material-symbols-outlined { font-size: 14px; }

/* Info list */
.profile-info-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-info-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.profile-info-list .material-symbols-outlined { font-size: 16px; color: var(--accent-color); flex-shrink: 0; }
.profile-info-list a { color: var(--accent-color); text-decoration: none; }
.profile-info-list a:hover { text-decoration: underline; }

/* Certifications */
.profile-cert-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }

.profile-cert {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.profile-cert-icon {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  flex-shrink: 0;
}

.profile-cert-name { font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.profile-cert-org  { font-size: 12px; color: var(--text-secondary); }

/* Experience Timeline */
.exp-timeline { display: flex; flex-direction: column; gap: 0; }

.exp-item {
  display: flex;
  gap: 14px;
  padding-bottom: 20px;
  position: relative;
}
.exp-item:last-child { padding-bottom: 0; }
.exp-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.exp-dot {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--border-color);
  border: 2px solid var(--bg-color);
  box-shadow: 0 0 0 2px var(--border-color);
  flex-shrink: 0;
  margin-top: 2px;
}
.exp-dot--current {
  background: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(9,105,218,0.3);
}

.exp-content { flex: 1; }

.exp-period { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.06em; }
.exp-role   { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.exp-company{ font-size: 13px; color: var(--accent-color); margin-bottom: 8px; font-weight: 500; }

.exp-bullets {
  padding-left: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.exp-bullets li { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Currently Exploring */
.exploring-list { display: flex; flex-direction: column; gap: 10px; }

.exploring-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-primary);
}
.exploring-item .material-symbols-outlined { font-size: 16px; color: var(--accent-color); flex-shrink: 0; }

/* ════════════════════════════════════════════════════════════════
   PROJECTS PAGE
   ════════════════════════════════════════════════════════════════ */
.projects-header {
  margin-bottom: 40px;
}
.projects-heading {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.projects-subheading {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

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

.project-card {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.1);
}

.project-card-header {
  padding: 24px 24px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.project-card-header--purple { background: linear-gradient(135deg, rgba(130,80,223,0.1) 0%, rgba(130,80,223,0.05) 100%); border-bottom: 1px solid rgba(130,80,223,0.15); }
.project-card-header--red    { background: linear-gradient(135deg, rgba(207,34,46,0.1)  0%, rgba(207,34,46,0.05)  100%); border-bottom: 1px solid rgba(207,34,46,0.15); }
.project-card-header--blue   { background: linear-gradient(135deg, rgba(9,105,218,0.1)  0%, rgba(9,105,218,0.05)  100%); border-bottom: 1px solid rgba(9,105,218,0.15); }
.project-card-header--orange { background: linear-gradient(135deg, rgba(154,103,0,0.1)  0%, rgba(154,103,0,0.05)  100%); border-bottom: 1px solid rgba(154,103,0,0.15); }
.project-card-header--green  { background: linear-gradient(135deg, rgba(26,127,55,0.1)  0%, rgba(26,127,55,0.05)  100%); border-bottom: 1px solid rgba(26,127,55,0.15); }

.project-icon { font-size: 32px; color: var(--text-secondary); }
.project-card-header--purple .project-icon { color: #8250df; }
.project-card-header--red    .project-icon { color: #cf222e; }
.project-card-header--blue   .project-icon { color: #0969da; }
.project-card-header--orange .project-icon { color: #9a6700; }
.project-card-header--green  .project-icon { color: #1a7f37; }

.project-type-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(0,0,0,0.08);
  color: var(--text-secondary);
}

.project-card-body { padding: 20px 24px 24px; display: flex; flex-direction: column; flex: 1; }

.project-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  line-height: 1.4;
}

.project-desc {
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 0 16px;
  flex: 1;
}
.project-desc strong { color: var(--text-primary); }

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 16px;
}

.stack-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.project-highlights {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: auto;
}

.project-highlight { display: flex; flex-direction: column; }
.highlight-val { font-size: 18px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.4px; }
.highlight-lbl { font-size: 11px; color: var(--text-secondary); }

.project-links {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-color);
  text-decoration: none;
  padding: 4px 0;
}
.project-link:hover { text-decoration: underline; }
.project-link .material-symbols-outlined { font-size: 14px; }

/* Add more card */
.project-card--add {
  border-style: dashed;
  cursor: default;
}
.project-card-add-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 24px;
  color: var(--border-color);
}
.project-card-add-inner .material-symbols-outlined { font-size: 40px; }
.project-card-add-inner p { margin: 0; font-size: 13px; }

/* ════════════════════════════════════════════════════════════════
   CTF PAGE
   ════════════════════════════════════════════════════════════════ */
.ctf-platforms {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.ctf-platform-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 240px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ctf-platform-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 16px rgba(9,105,218,0.1);
}
.ctf-platform-card--static { cursor: default; }
.ctf-platform-card--static:hover { border-color: var(--border-color); box-shadow: none; }

.ctf-platform-logo {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: #0d1117;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ctf-platform-logo--htb  { background: #141d2b; }
.ctf-platform-logo--oscp { background: #2d0000; }

.ctf-platform-info { flex: 1; }
.ctf-platform-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.ctf-platform-sub  { font-size: 12px; color: var(--text-secondary); }
.ctf-platform-arrow { font-size: 18px; color: var(--text-secondary); }

.ctf-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Approach */
.ctf-approach-list { display: flex; flex-direction: column; gap: 16px; }
.ctf-approach-item { display: flex; gap: 14px; align-items: flex-start; }

.ctf-approach-num {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-color);
  flex-shrink: 0;
}
.ctf-approach-item strong { font-size: 14px; color: var(--text-primary); display: block; margin-bottom: 4px; }
.ctf-approach-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* Focus chips */
.ctf-focus-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ctf-focus-chip {
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
}
.ctf-focus-chip--red    { background: rgba(207,34,46,0.08);  color: #cf222e; border-color: rgba(207,34,46,0.2);  }
.ctf-focus-chip--blue   { background: rgba(9,105,218,0.08);  color: #0969da; border-color: rgba(9,105,218,0.2);  }
.ctf-focus-chip--purple { background: rgba(130,80,223,0.08); color: #8250df; border-color: rgba(130,80,223,0.2); }
.ctf-focus-chip--green  { background: rgba(26,127,55,0.08);  color: #1a7f37; border-color: rgba(26,127,55,0.2);  }

/* Writeups */
.ctf-writeup-list { display: flex; flex-direction: column; }
.ctf-writeup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}
.ctf-writeup-item:last-child { border-bottom: none; }
.ctf-writeup-item:hover { opacity: 0.75; }

.ctf-writeup-icon {
  width: 32px; height: 32px;
  background: rgba(9,105,218,0.08);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-color);
  flex-shrink: 0;
}
.ctf-writeup-icon .material-symbols-outlined { font-size: 16px; }
.ctf-writeup-info { flex: 1; }
.ctf-writeup-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.ctf-writeup-date  { font-size: 11px; color: var(--text-secondary); }
.ctf-writeup-arrow { font-size: 16px; color: var(--border-color); }

.ctf-empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
}
.ctf-empty-state .material-symbols-outlined { font-size: 40px; margin-bottom: 8px; display: block; }
.ctf-empty-state p { margin: 0; font-size: 14px; }
.ctf-empty-state a { color: var(--accent-color); }

/* Toolkit grid */
.ctf-toolkit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.ctf-tool {
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}
.ctf-tool:nth-last-child(-n+2):nth-child(odd),
.ctf-tool:nth-last-child(-n+2):nth-child(even) { border-bottom: none; }
.ctf-tool:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--border-color); }
.ctf-tool:nth-child(even){ padding-left: 16px; }
.ctf-tool-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.ctf-tool-use  { font-size: 11px; color: var(--text-secondary); }

/* ════════════════════════════════════════════════════════════════
   PROFILE PAGE RESPONSIVE
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .profile-main-grid { grid-template-columns: 1fr; }
  .profile-right { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .profile-right .profile-card-box { margin-bottom: 0; }
  .skills-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .ctf-main-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .profile-hero-inner { flex-direction: column; text-align: center; gap: 20px; }
  .profile-badges { justify-content: center; }
  .profile-links { justify-content: center; }
  .profile-stats-strip { gap: 0; }
  .profile-stat-divider { width: 100%; height: 1px; }
  .profile-stat { padding: 14px 0; }
  .profile-right { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .profile-name { font-size: 28px; }
  .profile-content-wrap { padding: 24px 16px 60px; }
  .ctf-toolkit-grid { grid-template-columns: 1fr; }
  .ctf-tool:nth-child(odd) { border-right: none; padding-right: 0; }
  .ctf-tool:nth-child(even) { padding-left: 0; }
}

/* ════════════════════════════════════════════════════════════════
   LANGUAGE TOGGLE
   ════════════════════════════════════════════════════════════════ */
.lang-toggle-group {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.lang-toggle-btn {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #c9d1d9;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.lang-toggle-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.lang-toggle-btn.lang-active {
  background: #ffffff;
  color: var(--header-bg);
}

/* Language sections */
.lang-section {
  transition: opacity 0.3s ease;
}

.lang-section.lang-hidden {
  display: none;
}

/* ════════════════════════════════════════════════════════════════
   POST LAYOUT - 2 COLUMN WITH TOC SIDEBAR
   ════════════════════════════════════════════════════════════════ */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.post-article {
  flex: 1;
}

/* TOC Sidebar */
.post-toc-sidebar {
  position: relative;
}

.post-toc-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 20px;
  padding: 0;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.post-toc-toggle:hover {
  background: var(--surface-color);
}

.post-toc-box {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 20px;
  background: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(4px);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body.security-theme .post-toc-box {
  background: var(--surface-color);
  border-color: var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 255, 204, 0.1);
}

.post-toc-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-color);
  margin: 0 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-color);
  opacity: 0.9;
}

.post-toc-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc-item {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 2px;
}

.toc-item.toc-level-3 {
  padding-left: 16px;
  border-left: 2px solid rgba(9, 105, 218, 0.15); /* Muted professional blue */
  margin-left: 6px;
}

.toc-link {
  color: var(--text-secondary);
  text-decoration: none;
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 3px solid transparent;
  margin-left: -3px;
  position: relative;
}

.toc-link:hover {
  color: var(--accent-color);
  background: rgba(9, 105, 218, 0.08); /* Use professional blue tint */
  padding-left: 14px;
}

.toc-link.active {
  color: var(--accent-color);
  font-weight: 600;
  border-left-color: var(--accent-color);
  background: rgba(255, 157, 61, 0.15);
  padding-left: 14px;
  box-shadow: inset 0 0 8px rgba(255, 157, 61, 0.1);
}

/* TOC Scrollbar */
.post-toc-box::-webkit-scrollbar {
  width: 6px;
}

.post-toc-box::-webkit-scrollbar-track {
  background: transparent;
}

.post-toc-box::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.post-toc-box::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ════════════════════════════════════════════════════════════════
   RELATED POSTS SECTION
   ════════════════════════════════════════════════════════════════ */
.related-posts-section {
  max-width: 1200px;
  margin: 80px auto 0;
  padding: 0 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 80px;
}

.related-posts-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 32px 0;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.related-post-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  background: var(--surface-color);
}

.related-post-card:hover {
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(255, 157, 61, 0.15);
  transform: translateY(-2px);
}

.related-post-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: var(--border-color);
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.related-post-image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 40px;
}

.related-post-content {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.related-post-categories {
  margin-bottom: 8px;
}

.related-post-category {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.related-post-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.4;
}

/* ════════════════════════════════════════════════════════════════
   POST RESPONSIVE LAYOUT
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .post-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .post-toc-sidebar {
    display: none;
  }

  .post-toc-toggle {
    display: block;
  }

  .post-toc-box {
    position: fixed;
    top: 80px;
    right: 0;
    left: 0;
    max-width: 100%;
    max-height: calc(100vh - 100px);
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-color);
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    padding: 24px;
    overflow-x: hidden;
  }

  .post-toc-box.visible {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .post-layout {
    padding: 0 16px;
  }

  .post-toc-box {
    padding: 20px 16px;
  }

  .related-posts-section {
    padding: 0 16px;
  }

  .related-posts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .related-post-image {
    height: 120px;
  }

  .post-toc-title {
    font-size: 13px;
  }

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

/* Post Cover Image */
.post-cover-image {
  width: 100%;
  height: 0;
  padding-bottom: 40%; /* Aspect ratio for wide cover */
  background-color: var(--surface-color);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 2rem 0 3rem 0;
}

/* Category tag in post header */
.post-category-tag {
  background-color: var(--surface-color);
  color: var(--accent-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

body.security-theme .post-category-tag {
  background-color: rgba(16, 185, 129, 0.1);
  border-color: var(--accent-color);
}
