/* ==========================================================================
   Minimal Mistakes Inspired Layout & Design System (Contrast & Dark Skins)
   ========================================================================== */

:root {
  /* Minimal Mistakes "Contrast" Light Skin Variables */
  --bg-color: #ffffff;
  --bg-subtle: #f6f8fa;
  --bg-card: #ffffff;
  --bg-toc: #f8f9fa;
  --bg-code: #f3f4f6;
  --text-color: #212529;
  --text-muted: #57606a;
  --text-light: #6e7781;
  --heading-color: #111827;
  --primary-color: #0969da;
  --primary-hover: #0550ae;
  --primary-soft: rgba(9, 105, 218, 0.08);
  --accent-color: #1f2328;
  --border-color: #d8dee4;
  --border-light: #eaeef2;
  --masthead-bg: rgba(255, 255, 255, 0.96);
  --shadow-sm: 0 1px 3px rgba(27, 31, 36, 0.06);
  --shadow-md: 0 4px 12px rgba(27, 31, 36, 0.08);
  --shadow-lg: 0 10px 28px rgba(27, 31, 36, 0.12);
  --toc-header-bg: #eef1f5;
  --tag-bg: #eef2f6;
  --tag-text: #24292f;
  --badge-active-bg: #0969da;
  --badge-active-text: #ffffff;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, Cambria, "Times New Roman", Times, serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  /* Layout Dimensions */
  --max-width: 1320px;
  --masthead-height: 68px;
  --sidebar-left-width: 250px;
  --sidebar-right-width: 230px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Minimal Mistakes "Dark" Skin Variables */
body.dark-skin {
  --bg-color: #161b22;
  --bg-subtle: #0d1117;
  --bg-card: #1c2128;
  --bg-toc: #1c2128;
  --bg-code: #22272e;
  --text-color: #e6edf3;
  --text-muted: #9198a1;
  --text-light: #7d8590;
  --heading-color: #f0f6fc;
  --primary-color: #58a6ff;
  --primary-hover: #79c0ff;
  --primary-soft: rgba(88, 166, 255, 0.12);
  --accent-color: #f0f6fc;
  --border-color: #30363d;
  --border-light: #21262d;
  --masthead-bg: rgba(22, 27, 34, 0.96);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --toc-header-bg: #22272e;
  --tag-bg: #262c36;
  --tag-text: #c9d1d9;
  --badge-active-bg: #58a6ff;
  --badge-active-text: #0d1117;
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--masthead-height) + 24px);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition), color var(--transition);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

p {
  margin-bottom: 1.1rem;
}

ul,
ol {
  padding-left: 1.35rem;
}

/* ==========================================================================
   Masthead (Top Navigation Bar — Minimal Mistakes .masthead)
   ========================================================================== */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--masthead-height);
  background: var(--masthead-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.masthead__inner-wrap {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--heading-color);
  text-decoration: none !important;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
}

.site-title__badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.greedy-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
  justify-content: flex-end;
}

.visible-links {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.15rem;
}

.masthead__menu-item a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

/* Signature Minimal Mistakes bottom-bar hover & active indicator */
.masthead__menu-item a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0.75rem;
  right: 0.75rem;
  height: 3px;
  background: var(--primary-color);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition);
  border-radius: 2px;
}

.masthead__menu-item a:hover,
.masthead__menu-item a.active {
  color: var(--heading-color);
}

.masthead__menu-item a:hover::after,
.masthead__menu-item a.active::after {
  transform: scaleX(1);
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.5rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--border-color);
}

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition);
}

.icon-btn:hover {
  color: var(--heading-color);
  background: var(--tag-bg);
  border-color: var(--border-color);
}

.nav-toggle {
  display: none;
}

/* ==========================================================================
   Main 3-Column Minimal Mistakes Container (#main)
   ========================================================================== */

#main {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  padding: 2.25rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: var(--sidebar-left-width) minmax(0, 1fr) var(--sidebar-right-width);
  gap: 2.5rem;
  flex: 1;
  align-items: start;
}

#main.no-toc {
  grid-template-columns: var(--sidebar-left-width) minmax(0, 1fr);
}

/* ==========================================================================
   Left Sidebar: Author Profile (.sidebar)
   ========================================================================== */

.sidebar {
  position: sticky;
  top: calc(var(--masthead-height) + 2rem);
  font-size: 0.88rem;
}

.author__avatar {
  margin-bottom: 1rem;
}

.author__avatar img {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  object-fit: cover;
  padding: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.author__avatar img:hover {
  transform: scale(1.02);
}

.author__content {
  margin-bottom: 1rem;
}

.author__name {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--heading-color);
  margin-bottom: 0.2rem;
}

.author__role {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 0.6rem;
}

.author__bio {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.author__urls-wrapper {
  position: relative;
}

.btn--follow {
  display: none;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--heading-color);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.author__urls {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.author__urls li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.author__urls li i {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
  flex-shrink: 0;
}

.author__urls a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  padding: 0.15rem 0;
}

.author__urls a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.author__urls a:hover i {
  color: var(--primary-color);
}

.author__urls-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.35rem 0;
}

/* ==========================================================================
   Center Column: Page Content (.page)
   ========================================================================== */

.page {
  min-width: 0;
}

/* Breadcrumbs (Minimal Mistakes nav.breadcrumbs) */
.breadcrumbs {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.breadcrumbs ol {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs .sep {
  color: var(--text-light);
}

.page__header {
  margin-bottom: 1.75rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--border-color);
}

.page__title {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--heading-color);
  margin-bottom: 0.4rem;
}

.page__lead {
  font-size: 1.04rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.55;
}

.page__content h2 {
  font-size: 1.38rem;
  margin-top: 2.1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.page__content h2:first-child {
  margin-top: 0;
}

.page__content h3 {
  font-size: 1.12rem;
  margin-top: 1.35rem;
  margin-bottom: 0.45rem;
}

/* ==========================================================================
   Right Column: Sticky Table of Contents (.sidebar__right / .toc)
   ========================================================================== */

.sidebar__right {
  position: sticky;
  top: calc(var(--masthead-height) + 2rem);
}

.toc {
  background: var(--bg-toc);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.nav__title {
  background: var(--toc-header-bg);
  color: var(--heading-color);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.65rem 0.9rem;
  margin: 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.toc__menu {
  list-style: none;
  padding: 0.5rem 0;
  margin: 0;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
}

.toc__menu li a {
  display: block;
  padding: 0.35rem 0.9rem;
  font-size: 0.81rem;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  line-height: 1.35;
  transition: all var(--transition);
}

.toc__menu li.toc-h3 a {
  padding-left: 1.55rem;
  font-size: 0.77rem;
}

.toc__menu li a:hover,
.toc__menu li a.active {
  color: var(--primary-color);
  background: var(--primary-soft);
  border-left-color: var(--primary-color);
  font-weight: 600;
}

/* ==========================================================================
   Minimal Mistakes Components: Notices, Feature Rows, Skill Matrices
   ========================================================================== */

.notice--primary {
  background: var(--primary-soft);
  border-left: 4px solid var(--primary-color);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

.feature-card__title {
  font-size: 0.98rem;
  font-weight: 700;
  margin-top: 0 !important;
  margin-bottom: 0.45rem !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--heading-color);
}

.feature-card__title i {
  color: var(--primary-color);
}

.feature-card p {
  font-size: 0.87rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.5;
}

/* Skills Matrix */
.skills-matrix {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.skill-group {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
}

.skill-group__header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.skill-group__header i {
  color: var(--primary-color);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.page__taxonomy-item {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--tag-bg);
  color: var(--tag-text);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  line-height: 1.3;
}

/* ==========================================================================
   Experience Timeline Cards (layout: single)
   ========================================================================== */

.experience-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.archive-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.archive-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.archive-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.archive-card__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0 !important;
}

.archive-card__org {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 0.15rem;
}

.archive-card__meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.archive-card__bullets {
  margin: 0.75rem 0 1rem;
  padding-left: 1.2rem;
  color: var(--text-color);
  font-size: 0.92rem;
}

.archive-card__bullets li {
  margin-bottom: 0.42rem;
}

/* ==========================================================================
   Projects Archive & Grid View (Major & Mini Subsections)
   ========================================================================== */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--badge-active-bg);
  color: var(--badge-active-text);
  border-color: var(--badge-active-bg);
}

.major-projects-list {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-bottom: 2.25rem;
}

.project-item--major {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.3rem 1.45rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.project-item--major:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.project-item__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.project-item__subtitle {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

/* Minimal Mistakes Grid Wrapper for Mini Projects */
.entries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.grid__item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.grid__item:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.grid__item h3 {
  margin-top: 0 !important;
  font-size: 1rem !important;
  margin-bottom: 0.4rem !important;
}

.grid__item p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}

/* Minimal Mistakes Buttons (.btn) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-subtle);
  color: var(--heading-color);
  text-decoration: none !important;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-soft);
}

.btn--primary {
  background: var(--primary-color);
  color: #ffffff !important;
  border-color: var(--primary-color);
}

.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: #ffffff !important;
}

/* ==========================================================================
   Blogs Archive & Reader (layout: archive / single)
   ========================================================================== */

.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.65rem 1.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.blog-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.blog-card__title {
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
  margin-top: 0.2rem !important;
  margin-bottom: 0.35rem !important;
}

.blog-card__title a {
  color: var(--heading-color);
  text-decoration: none;
}

.blog-card__title a:hover {
  color: var(--primary-color);
}

.blog-card__subtitle {
  font-size: 0.98rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.blog-card__summary {
  font-size: 0.94rem;
  color: var(--text-color);
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
}

/* Reading Progress Bar */
.reading-progress-bar {
  position: fixed;
  top: var(--masthead-height);
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-color), #38bdf8);
  z-index: 99;
  transition: width 0.1s ease-out;
}

/* GitHub / VS Code Exact Markdown Preview Styling (.markdown-body) */
.blog-article-view.markdown-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  font-size: 16px;
  line-height: 1.5;
  word-wrap: break-word;
  background: var(--bg-card);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 32px;
}

.markdown-body > *:first-child {
  margin-top: 0 !important;
}

.markdown-body > *:last-child {
  margin-bottom: 0 !important;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--heading-color);
}

.markdown-body h1 {
  padding-bottom: 0.3em;
  font-size: 2em;
  border-bottom: 1px solid var(--border-color);
}

.markdown-body h2 {
  padding-bottom: 0.3em;
  font-size: 1.5em;
  border-bottom: 1px solid var(--border-color);
}

.markdown-body h3 {
  font-size: 1.25em;
}

.markdown-body h4 {
  font-size: 1em;
}

.markdown-body p,
.markdown-body blockquote,
.markdown-body ul,
.markdown-body ol,
.markdown-body dl,
.markdown-body table,
.markdown-body pre {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-body ul,
.markdown-body ol {
  padding-left: 2em;
}

.markdown-body li + li {
  margin-top: 0.25em;
}

.markdown-body blockquote {
  padding: 0 1em;
  color: var(--text-muted);
  border-left: 0.25em solid var(--border-color);
  background: transparent;
  font-style: normal;
}

.markdown-body blockquote > :first-child {
  margin-top: 0;
}

.markdown-body blockquote > :last-child {
  margin-bottom: 0;
}

.markdown-body hr {
  height: 0.25em;
  padding: 0;
  margin: 24px 0;
  background-color: var(--border-color);
  border: 0;
}

.markdown-body code {
  padding: 0.2em 0.4em;
  margin: 0;
  font-size: 85%;
  white-space: break-spaces;
  background-color: var(--bg-code);
  border-radius: 6px;
  font-family: var(--font-mono);
}

.markdown-body pre {
  padding: 16px;
  overflow: auto;
  font-size: 85%;
  line-height: 1.45;
  color: var(--text-color);
  background-color: var(--bg-code);
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.markdown-body pre code {
  display: inline;
  padding: 0;
  margin: 0;
  overflow: visible;
  line-height: inherit;
  word-wrap: normal;
  background-color: transparent;
  border: 0;
  font-size: 100%;
}

.markdown-body table {
  border-spacing: 0;
  border-collapse: collapse;
  display: table;
  width: 100%;
  margin-top: 16px;
  margin-bottom: 20px;
  overflow: auto;
}

.markdown-body table tr {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.markdown-body table tr:nth-child(2n) {
  background-color: var(--bg-subtle);
}

.markdown-body table th,
.markdown-body table td {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.markdown-body table th {
  font-weight: 700;
  color: var(--heading-color);
  background-color: var(--bg-subtle);
}

@media (max-width: 860px) {
  .blog-article-view.markdown-body {
    padding: 18px;
  }
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.blog-search-input {
  padding: 0.42rem 0.8rem;
  font-size: 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-color);
  min-width: 230px;
  outline: none;
}

.blog-search-input:focus {
  border-color: var(--primary-color);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
}

/* Certification Embed Cards */
.cert-embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.15rem;
}

.cert-embed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.cert-embed-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.cert-embed-card iframe,
.cert-embed-card img {
  max-width: 100%;
  border-radius: var(--radius-sm);
}

.cert-embed-card--drive a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 270px;
  text-decoration: none;
  color: var(--text-main);
  gap: 0.65rem;
}

.cert-embed-card--drive img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.25rem;
}

.cert-embed-caption {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Digital CV & Embedded PDF Viewer (layout: single)
   ========================================================================== */

.cv-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 1.35rem;
}

.cv-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Crisp Digital Resume Paper Sheet matching the uploaded resume */
.digital-cv-sheet {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-md);
}

.cv-header {
  text-align: center;
  padding-bottom: 1.15rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--primary-color);
}

.cv-header__name {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--primary-color);
  margin-bottom: 0.3rem;
}

.cv-header__contact {
  font-size: 0.86rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem 0.9rem;
}

.cv-section {
  margin-bottom: 1.45rem;
}

.cv-section__title {
  font-size: 0.92rem !important;
  font-weight: 800 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-color) !important;
  border-bottom: 1.5px solid var(--primary-color) !important;
  padding-bottom: 0.25rem !important;
  margin-top: 1.25rem !important;
  margin-bottom: 0.75rem !important;
}

.cv-entry {
  margin-bottom: 1rem;
}

.cv-entry__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.cv-entry__title {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--heading-color);
}

.cv-entry__org {
  color: var(--primary-color);
  font-weight: 600;
}

.cv-entry__date {
  font-size: 0.84rem;
  font-style: italic;
  color: var(--text-muted);
}

.cv-entry ul {
  margin: 0.3rem 0 0.5rem;
  padding-left: 1.25rem;
  font-size: 0.88rem;
}

.cv-entry ul li {
  margin-bottom: 0.25rem;
}

.cv-skills-list {
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.cv-pdf-frame {
  width: 100%;
  height: 820px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
}

/* ==========================================================================
   Instant Search Overlay (Minimal Mistakes .search-content)
   ========================================================================== */

.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 17, 23, 0.72);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 5rem 1rem 2rem;
}

.search-modal.open {
  display: flex;
}

.search-modal__box {
  width: 100%;
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.search-modal__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
}

.search-modal__input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--heading-color);
  font-size: 1rem;
  font-family: inherit;
}

.search-modal__results {
  max-height: 420px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-item {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  text-decoration: none !important;
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--primary-soft);
}

.search-result-item__title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--heading-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.search-result-item__badge {
  font-size: 0.72rem;
  padding: 0.12rem 0.45rem;
  border-radius: var(--radius-sm);
  background: var(--tag-bg);
  color: var(--text-muted);
}

.search-result-item__desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  margin-bottom: 0;
}

/* ==========================================================================
   Footer (Minimal Mistakes .page__footer)
   ========================================================================== */

.page__footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  padding: 1.75rem 1.5rem;
  margin-top: auto;
}

.page__footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.page__footer-follow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page__footer-follow a {
  color: var(--text-muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.page__footer-follow a:hover {
  color: var(--primary-color);
}

/* ==========================================================================
   Responsive Breakpoints (Minimal Mistakes Responsive Behavior)
   ========================================================================== */

@media (max-width: 1120px) {
  #main {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .sidebar__right {
    display: none;
  }
}

@media (max-width: 860px) {
  #main,
  #main.no-toc {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-top: 1.25rem;
  }

  /* Minimal Mistakes Mobile Author Bar */
  .sidebar {
    position: relative;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
  }

  .author__avatar {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .author__avatar img {
    width: 64px;
    height: 64px;
  }

  .author__content {
    margin-bottom: 0;
    flex: 1;
  }

  .author__bio {
    display: none;
  }

  .btn--follow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
  }

  .author__urls {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    min-width: 210px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
  }

  .author__urls.open {
    display: flex;
  }

  /* Mobile Nav Dropdown */
  .nav-toggle {
    display: inline-flex;
  }

  .visible-links {
    display: none;
    position: absolute;
    top: var(--masthead-height);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-md);
  }

  .visible-links.open {
    display: flex;
  }

  .masthead__menu-item a {
    width: 100%;
    padding: 0.65rem 0.5rem;
  }

  .feature-grid,
  .entries-grid {
    grid-template-columns: 1fr;
  }

  .digital-cv-sheet {
    padding: 1.25rem;
  }
}

/* ==========================================================================
   Print Stylesheet (Clean 1-2 Page CV Printout)
   ========================================================================== */

@media print {
  .masthead,
  .sidebar,
  .sidebar__right,
  .breadcrumbs,
  .page__header,
  .cv-toolbar,
  .page__footer,
  .search-modal {
    display: none !important;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  #main {
    display: block !important;
    padding: 0 !important;
    max-width: 100% !important;
  }

  .digital-cv-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
}
