/* ========= Mono Theme — style.css Minimalist portfolio theme for Synaptik CMS ========= */
/* ── Reset ───────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design tokens ── */
:root {
  --bg: #fafbf8;
  --text: #3d3939;
  --muted: #a0a0a0;
  --border: #ececeb;
  --accent: #c44b19;
  --hover-bg: #f1f1ef;
  --sidebar-w: 250px;
  --prose-max: 880px;
  --pad: 3.5rem;
  --pad-sm: 1.5rem;
  --font-heading: "DM Sans", sans-serif;
  --font-body: 'Manrope', sans-serif;
  --font-nav: 'DM Sans', sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --dur: 0.22s;
  --progress-color: #c45c1a;
  --text-main: #fff;
  --text-secondary: #666;
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --space-xs: 5px;
  --space-sm: 10px;
  --space-md: 20px;
  --space-lg: 30px;
  --space-xl: 50px;
  --search-overlay-bg: #3d3d3d;
  --search-card-bg: #e2e2e2;
  --search-card-bg-hover: #f3ecec;
  --search-accent: #ec6e1f;
  --search-accent-dark: #d0621b;
  --search-accent-light: #e96e1f;
  --search-text: #222;
  --search-section-heading: #777;
  --border-radius-sm: 4px;
}/* ── Base ─────────── */
html { font-size: 18px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; font-weight: 400; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.75; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.content-single a { color: inherit; text-decoration: underline dotted; text-underline-offset: 4px; }
.content-single a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
/* ── Layout ───────── */
.site-layout { display: flex; min-height: 100vh; }
/* ── Sidebar ──────── */
.site-sidebar { width: var(--sidebar-w); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: none; -ms-overflow-style: none; }
.site-sidebar::-webkit-scrollbar { display: none; }
.sidebar-inner { display: flex; flex-direction: column; padding: 10px 1rem 1rem 3rem; }
/* ── Site title ────── */
.site-title { text-align: center; padding-top: 25px; display: flex; align-items: center; padding-left: 30px; gap: 15px; }
.site-title img { display: inline-block; height: 40px; }
.site-title a { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); line-height: 1.3; transition: opacity var(--dur) var(--ease); font-family: var(--font-heading); }
.site-title a:hover { opacity: 0.6; }
/* ── Navigation ────── */
.site-nav { margin-top: 2.5rem; }
.site-nav ul { display: flex; flex-direction: column; gap: 0; }
.site-nav li { display: block; }
.site-nav a { display: block; padding: 0.1rem 0; font-size: 1rem; font-style: italic; text-transform: lowercase; color: var(--muted); transition: color var(--dur) var(--ease); font-family: var(--font-nav); }
.site-nav a:hover, .site-nav a.is-active { color: var(--text); }
/* Nested nav items (sub-menu) */
.site-nav ul ul { padding-left: 1rem; margin-top: 0; }
/* ── Nav submenu collapsible ─────────────────────────────────── */
.site-nav .has-submenu>a { display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.site-nav .has-submenu>a::after { content: ''; display: inline-block; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0.5; transition: transform var(--dur) var(--ease); flex-shrink: 0; }
.site-nav .has-submenu.is-open>a::after { transform: rotate(180deg); }
.site-nav .has-submenu>ul { display: none; padding-left: 1rem; margin-top: 0.15rem; margin-bottom: 0.25rem; }
.site-nav .has-submenu.is-open>ul { display: flex; flex-direction: column; }
/* ── Main content ──── */
.site-main { flex: 1; min-width: 0; padding: var(--pad); }
/* ── Burger (mobile only) ────────────────────────────────────── */
.burger { display: none; position: fixed; top: 1.1rem; right: 1.1rem; z-index: 200; width: 38px; height: 38px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; transition: background var(--dur) var(--ease); }
.burger:hover { background: var(--hover-bg); }
.burger span { display: block; width: 16px; height: 1.5px; background: var(--text); border-radius: 2px; transition: transform 0.2s var(--ease), opacity 0.2s var(--ease), width 0.2s var(--ease); transform-origin: center; }
.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; width: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
/* ── Mobile overlay ── */
.site-overlay { display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.25); z-index: 150; backdrop-filter: blur(2px); }
.site-overlay.is-visible { display: block; }
/* ========= Content: Homepage ========= */
.home-intro { max-width: var(--prose-max); margin-bottom: 4rem; }
.home-intro h1 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.25; margin-bottom: 1.25rem; font-family: var(--font-heading); }
.home-intro p { color: var(--muted); font-size: 0.95rem; max-width: 480px; }
.home-section { margin-bottom: 4rem; }
.home-section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 0; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border); }
.home-section-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; }
.home-section-all { font-size: 0.75rem; color: var(--muted); font-style: italic; transition: color var(--dur) var(--ease); }
.home-section-all:hover { color: var(--text); }
/* ========= Content: Title list (articles/projects in list pages) ========= */
.content-list-mono { max-width: var(--prose-max); }
.list-header { margin-bottom: 3rem; }
.list-eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; margin-bottom: 0.6rem; }
.list-heading { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 600; letter-spacing: -0.03em; }
/* ── Title list items ── */
.title-list { border-top: 1px solid var(--border); }
.title-item { border-bottom: 1px solid var(--border); }
.title-link { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1.5rem; padding: 0.9rem 0; color: var(--text); position: relative; transition: padding-left var(--dur) var(--ease); }
a.title-link:hover span, a.title-link:hover .title-name { color: var(--accent); }
/* Animated arrow on hover */
.title-arrow { position: absolute; left: 0; top: 50%; transform: translate(-8px, -50%); opacity: 0; font-size: 0.8rem; line-height: 1; color: var(--muted); transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease); pointer-events: none; }
.title-link:hover { padding-left: 1.25rem; }
.title-link:hover .title-arrow { opacity: 1; transform: translate(0, -50%); }
.title-name { font-size: 0.95rem; font-weight: 400; line-height: 1.4; transition: color var(--dur) var(--ease); }
.title-link:hover .title-name { color: var(--text); }
.title-date { font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.title-category-group { margin-bottom: 3rem; }
.title-group-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; margin-bottom: 0; padding-bottom: 0.5rem; }
.empty-state { color: var(--muted); font-size: 0.9rem; font-style: italic; padding: 2rem 0; }
/* ========= Content: Single article / project / page ========= */
.content-single { max-width: var(--prose-max); }
.content-eyebrow { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.content-category-link { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); padding: 0.2rem 0.6rem; border: 1px solid var(--border); border-radius: 4px; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.content-category-link:hover { color: var(--text); border-color: var(--text); }
.content-title { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 1rem; font-family: var(--font-heading); }
.content-meta { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; font-size: 0.78rem; color: var(--muted); padding-bottom: 2.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.content-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.content-tags a { color: var(--muted); transition: color var(--dur) var(--ease); }
.content-tags a::before { content: '#'; }
.content-tags a:hover { color: var(--accent); }
.content-featured-image { margin-bottom: 2.5rem; border-radius: 5px; overflow: hidden; width: 100%; max-height: 500px; }
.content-featured-image img { width: 100%; height: 400px; object-fit: cover; object-position: center; }
/* ── Prose body ── */
.prose-body { font-size: 1rem; line-height: 1.8; }
.prose-body h1, .prose-body h2, .prose-body h3, .prose-body h4 { font-weight: 700; letter-spacing: -0.02em; margin-top: 2.5rem; margin-bottom: 0.75rem; line-height: 1.25; font-family: var(--font-heading); }
.prose-body h1 { font-size: 1.6rem; }
.prose-body h2 { font-size: 1.25rem; }
.prose-body h3 { font-size: 1.05rem; }
.prose-body p { margin-bottom: 1.3rem; }
/* .prose-body a { text-decoration: underline; text-underline-offset: 2px; text-decoration-color: var(--border); transition: text-decoration-color var(--dur) var(--ease); } */
.prose-body a:hover { text-decoration-color: var(--accent); }
.prose-body ul, .prose-body ol { margin-bottom: 1.3rem; padding-left: 1.5rem; }
.prose-body ul { list-style: disc; }
.prose-body ol { list-style: decimal; }
.prose-body li { margin-bottom: 0.35rem; }
.prose-body blockquote { border-left: 4px solid #82827f; padding-left: 1.25rem; color: var(--muted); font-style: italic; margin: 1.5rem 0; }
.prose-body code { font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 0.85em; background: var(--hover-bg); padding: 0.15em 0.4em; border-radius: 3px; }
.prose-body pre { background: var(--hover-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem; overflow-x: auto; margin-bottom: 1.5rem; }
.prose-body pre code { background: none; padding: 0; font-size: 0.85rem; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-link, .hljs-tag { color: #b81e1e; }
.hljs-string, .hljs-title, .hljs-title.function_ { color: #22863a; }
.hljs-attr, .hljs-attribute, .hljs-name, .hljs-built_in, .hljs-builtin-name, .hljs-selector-attr, .hljs-selector-class, .hljs-selector-id { color: #005cc5; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #e36209; }
.hljs-comment, .hljs-quote, .hljs-deletion { color: #6a737d; font-style: italic; }
.hljs-variable, .hljs-template-variable, .hljs-type, .hljs-title.class_ { color: #6f42c1; }
.hljs-operator, .hljs-punctuation, .hljs-meta, .hljs-subst { color: #bd07b8; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: bold; }
/* .prose-body img { border-radius: 4px; margin: 1.5rem 0; } */
.prose-body hr { border: none; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose-body table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1.5rem; }
.prose-body th, .prose-body td { border: 1px solid var(--border); padding: 0.6rem 0.9rem; text-align: left; }
.prose-body th { background: var(--hover-bg); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
/* ── Project description block ── */
.project-desc { background: var(--hover-bg); border: 1px solid var(--border); border-radius: 6px; padding: 1.25rem 1.5rem; margin-bottom: 2rem; font-size: 0.9rem; color: var(--muted); line-height: 1.6; }
/* ── Back link ── */
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--muted); margin-bottom: 2.5rem; transition: color var(--dur) var(--ease); }
.back-link:hover { color: var(--text); }
.back-link::before { content: '←'; }
/* ── Admin edit link ── */
.admin-edit-link { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.admin-edit-link .button { display: inline-block; font-size: 0.78rem; padding: 0.45rem 0.9rem; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.admin-edit-link .button:hover { color: var(--text); border-color: var(--text); }
/* ── Shortcodes overrides ─────────────────────────────────────── */
.sc-callout-danger { background-color: rgb(192 86 86 / 76%); }
.sc-callout-info { background-color: rgba(79, 138, 167, 0.712); }
.sc-callout-warning { background-color: rgba(223, 161, 35, 0.674); border-color: var(--color-warning, #db971a); }
.sc-callout-tip { background-color: rgba(79, 167, 92, 0.649); border-color: var(--color-primary, #4fa75c); }
/* ── [toc] ─────────── */
.sc-toc { display: inline-block; min-width: 200px; max-width: 100%; background: var(--hover-bg); border: 1px solid var(--border); border-left: 2px solid var(--accent); border-radius: var(--border-radius-sm); padding: 14px 18px; margin: 1.5rem 0; }
.sc-toc::before { display: block; font-family: var(--font-heading); font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sc-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sc-toc li a { font-size: 0.85rem; color: var(--text); text-decoration: none; opacity: 0.75; transition: color var(--dur) var(--ease), opacity var(--dur) var(--ease); }
.sc-toc li a:hover { color: var(--accent); opacity: 1; }
.sc-toc .sc-toc-sub { padding-left: 12px; }
.sc-toc .sc-toc-sub a { font-size: 0.8rem; opacity: 0.55; }
/* ── Shortcode: Recent Projects ─────────────────────────────── */
.sc-projects-grid { display: flex; flex-direction: column; gap: 0; margin: 0; }
.sc-projects-grid .project-card { display: grid; grid-template-columns: 140px 1fr; border-bottom: 1px solid var(--border); overflow: hidden; background: var(--hover-bg); transition: background var(--dur) var(--ease); position: static; aspect-ratio: unset; box-shadow: none; border-radius: 0; }
.sc-projects-grid .project-card:first-child { border-top: 1px solid var(--border); }
.sc-projects-grid .project-card:hover { background: var(--bg); transform: none; box-shadow: none; }
.sc-projects-grid .project-thumbnail { position: static; height: 100%; overflow: hidden; }
.sc-projects-grid .project-thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.sc-projects-grid .project-card:hover .project-thumbnail img { transform: scale(1.03); }
.sc-projects-grid .project-overlay { position: static; background: none; opacity: 1; display: flex; flex-direction: column; justify-content: center; padding: 14px 18px; gap: 5px; }
.sc-projects-grid .project-overlay h3 { font-size: 0.95rem; font-weight: 600; font-family: var(--font-heading); color: var(--text); letter-spacing: -0.02em; line-height: 1.35; margin: 0; }
.sc-projects-grid .project-card:hover .project-overlay h3 { color: var(--accent); }
.sc-projects-grid .project-excerpt { font-size: 0.82rem; color: var(--muted); line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-projects-grid .view-project { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--muted); background: none; border-radius: 0; padding: 0; margin-top: 2px; align-self: flex-start; transition: color var(--dur) var(--ease); }
.sc-projects-grid .view-project::after { content: '→'; transition: transform var(--dur) var(--ease); }
.sc-projects-grid .view-project:hover { color: var(--accent); background: none; }
.sc-projects-grid .view-project:hover::after { transform: translateX(3px); }
/* No-image variant */
.sc-projects-grid .project-card-no-image { grid-template-columns: 1fr; min-height: unset; aspect-ratio: unset; }
.sc-projects-grid .project-card-no-image .project-overlay { padding: 0.9rem 0; background: none; }
/* ── Related Items ─── */
.related-items { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-items-title { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-weight: 500; margin-bottom: 0.75rem; }
.related-items-list { display: flex; flex-direction: column; gap: 0; list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
.related-item { border-bottom: 1px solid var(--border); }
.related-item a { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; color: var(--text); font-size: 0.9rem; background: none; border: none; border-radius: 0; box-shadow: none; min-height: unset; transition: padding-left var(--dur) var(--ease), color var(--dur) var(--ease); position: relative; flex-direction: row-reverse; }
.related-item a:hover { padding-left: 1rem; color: var(--accent); transform: none; box-shadow: none; border-color: transparent; }
.related-item-type { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 500; white-space: nowrap; flex-shrink: 0; font-family: var(--font-heading); }
.related-item-type::before { display: none; }
.related-item--article .related-item-type { color: var(--accent); }
.related-item--project .related-item-type { color: var(--muted); }
.related-item--page .related-item-type { color: var(--muted); }
/* ── Custom Fields ─── */
.mono-custom-fields { margin: 0 0 2rem; border: 1px solid var(--border); border-radius: var(--border-radius-md); overflow: hidden; }
.mono-custom-fields .custom-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0; }
.mono-custom-fields .cf-row { display: flex; flex-direction: column; gap: 3px; padding: 10px 14px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background var(--dur) var(--ease); }
.mono-custom-fields .cf-row:hover { background: var(--hover-bg); }
.mono-custom-fields .cf-row dt { font-size: 0.62rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); font-family: var(--font-heading); }
.mono-custom-fields .cf-row dd { font-size: 0.88rem; color: var(--text); font-weight: 500; line-height: 1.4; margin: 0; word-break: break-word; }
.mono-custom-fields .cf-row dd a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: transparent; transition: text-decoration-color var(--dur) var(--ease); }
.mono-custom-fields .cf-row dd a:hover { text-decoration-color: var(--accent); }
/* ── Article Cards grid ─────────────────────────────────────── */
.articles-grid { display: flex; flex-direction: column; gap: 0; }
/* ── Article Card — horizontal layout ──────────────────────── */
.article-card { display: grid; grid-template-columns: 160px 1fr; grid-template-rows: auto auto 1fr auto; transition: background var(--dur) var(--ease); overflow: hidden; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--border-radius-sm); background: var(--hover-bg); }
.article-details { padding: 0 20px 0 20px; }
.article-card:first-child { border-top: 1px solid var(--border); }
.article-card:hover { background: var(--bg); }
.article-thumbnail { align-self: stretch; height: 100%; overflow: hidden; }
.article-thumbnail a { display: block; height: 100%; margin: 0; padding: 0; }
.article-thumbnail img { width: 100%; height: 100%; object-fit: cover; vertical-align: top; margin: 0; }
.article-card:hover .article-thumbnail img { transform: scale(1.03); transition: ease-in-out 0.3s; }
/* When no thumbnail: content spans full width */
.article-card:not(:has(.article-thumbnail)) { grid-template-columns: 1fr; padding: 0.9rem 0; }
/* Title — right column, row 1 */
.article-card h3 { grid-column: 2; grid-row: 1; margin-top: 10px; font-size: 1rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; font-family: var(--font-heading); }
.article-card:not(:has(.article-thumbnail)) h3 { grid-column: 1; padding-top: 0; }
.article-card h3 a { color: var(--text); transition: color var(--dur) var(--ease); }
.article-card h3 a:hover { color: var(--accent); }
.article-tags { grid-column: 2; grid-row: 2; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.35rem; }
.article-card:not(:has(.article-thumbnail)) .article-tags { grid-column: 1; }
.tag-link { font-size: 0.72rem; color: var(--muted); transition: color var(--dur) var(--ease); }
.tag-link::before { content: '#'; }
.tag-link:hover { color: var(--accent); }
.article-summary { grid-column: 2; grid-row: 3; font-size: 0.83rem; color: var(--muted); line-height: 1.6; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-bottom: 0.5rem; align-self: start; }
.article-card:not(:has(.article-thumbnail)) .article-summary { grid-column: 1; }
/* Adjust row when no tags present */
.article-card:not(:has(.article-tags)) .article-summary { grid-row: 2; }
.article-card .read-more, .article-card .view-project { grid-column: 2; grid-row: 4; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; color: var(--muted); text-decoration: none; padding-bottom: 10px; align-self: end; transition: color var(--dur) var(--ease); display: none; }
.article-card:not(:has(.article-thumbnail)) .read-more, .article-card:not(:has(.article-thumbnail)) .view-project { grid-column: 1; padding-bottom: 0; }
.read-more::after, .view-project::after { content: '→'; transition: transform var(--dur) var(--ease); }
.read-more:hover, .view-project:hover { color: var(--accent); }
.read-more:hover::after, .view-project:hover::after { transform: translateX(3px); }
.article-date { grid-column: 2; font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 0.3rem; }
.content-columns { display: flex; flex-wrap: wrap; gap: 20px; margin: 1em 0; width: 100%; box-sizing: border-box; }
.column { padding: 15px; border-radius: 6px; box-sizing: border-box; min-height: 60px; transition: flex-basis 0.3s ease; }
/* Default (large screens): 4 columns */
.columns-4 .column { flex: 0 0 calc(25% - 15px); }
.columns-3 .column { flex: 0 0 calc(33.333% - 14px); }
.columns-2 .column { flex: 0 0 calc(50% - 10px); }
/* ── Mobile: stack vertically ───────────────────────────────── */
@media (max-width: 600px) {
  .article-card { grid-template-columns: 1fr; }
  .article-details { padding: 0 20px; }
  .article-thumbnail { width: 100%; height: 160px; grid-row: 1; }
  .article-card h3 { grid-column: 1; grid-row: 2; }
  .article-tags { grid-column: 1; grid-row: 3; }
  .article-summary { grid-column: 1; grid-row: 4; }
  .read-more, .view-project { grid-column: 1; grid-row: 5; }
}
/* ── 404 ── */
.not-found { max-width: 480px; }
.not-found-code { font-size: 5rem; font-weight: 700; letter-spacing: -0.05em; line-height: 1; color: var(--border); margin-bottom: 1rem; }
.not-found h1 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
.not-found p { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.not-found a { font-size: 0.85rem; text-decoration: underline; text-underline-offset: 2px; }
/* ========= COLLAPSIBLE SECTIONS (up to 4 nested levels) ========= */
.c-col { --c-color: #60a5fa; --c-bg: rgba(96, 165, 250, .08); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; margin: 10px 0; overflow: hidden; background: var(--c-bg); }
.c-col>.c-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; user-select: none; background: rgba(43, 43, 43, 0.664); border: 0; width: 100%; text-align: left; font: inherit; color: inherit; transition: background .2s ease; box-sizing: border-box; }
.c-col>.c-head:hover { background: rgba(43, 43, 43, 0.797); }
.c-col>.c-head .c-icon { flex-shrink: 0; font-size: 20px; line-height: 1; }
.c-col>.c-head .c-title { flex: 1; font-weight: 600; color: var(--c-color); line-height: 1.3; }
/* ── Chevron  ──── ───────────────── */
.c-col>.c-head .c-chevron { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex-shrink: 0; margin-left: auto; font-size: 0; color: transparent; transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1); }
.c-col>.c-head .c-chevron::before { content: ""; display: block; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid var(--c-color); }
.c-col.open>.c-head .c-chevron { transform: rotate(180deg); }
/* ── Body animation ─ ───────────────── */
.c-col>.c-body { display: block; max-height: 0; overflow: hidden; padding: 0 14px; opacity: 0; transform: translateY(-6px); transition: max-height .25s cubic-bezier(0.4, 0, 0.2, 1), opacity .2s ease, transform .2s ease, padding .2s ease; }
.c-col.open>.c-body { max-height: 5000px; padding: 6px 14px 14px; opacity: 1; transform: translateY(0); transition: max-height .4s cubic-bezier(0.4, 0, 0.2, 1), opacity .3s ease .06s, transform .3s ease .06s, padding .25s ease; }
.c-col.open>.c-body p { font-size: 16px; line-height: 1.4; margin: 5px; }
/* Niveaux — tailles et indentation décroissantes */
.c-col[data-level="1"]>.c-head { padding: 14px 16px; }
.c-col[data-level="1"]>.c-head .c-title { font-size: 20px; }
.c-col[data-level="2"] { margin: 8px 0; border-radius: 10px; background: rgba(48, 48, 48, 0.144); }
.c-col[data-level="2"]>.c-head { padding: 11px 13px; }
.c-col[data-level="2"]>.c-head .c-title { font-size: 18px; }
.c-col[data-level="3"] { margin: 6px 0; border-radius: 8px; background: rgba(48, 48, 48, 0.171); border-color: transparent; }
.c-col[data-level="3"]>.c-head { padding: 9px 11px; }
.c-col[data-level="3"]>.c-head .c-title { font-size: 16px; }
.c-col[data-level="4"] { margin: 5px 0; border-radius: 6px; background: rgba(67, 67, 67, 0.164); border-color: transparent; }
.c-col[data-level="4"]>.c-head { padding: 7px 10px; }
.c-col[data-level="4"]>.c-head .c-title { font-size: 16px; }
.c-toggle-bar { display: flex; gap: 8px; margin-left: 20px; margin-top: 10px; }
.c-toggle-bar button { padding: 6px 14px; border-radius: 8px; border: 1px solid rgba(19, 19, 19, 0.1); background: var(--bg-darker); color: var(--text-secondary); font-family: inherit; font-size: 13px; cursor: pointer; opacity: .7; transition: opacity .15s ease, background .15s ease; }
.c-toggle-bar button:hover { opacity: 1; background: var(--bg-accent); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { background: var(--color-background-secondary); color: var(--color-text-secondary); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; padding: 10px 14px; text-align: left; border-bottom: 0.5px solid var(--color-border-tertiary); }
td { padding: 10px 14px; vertical-align: top; border-bottom: 0.5px solid var(--color-border-tertiary); color: var(--color-text-primary); line-height: 1.6; }
tr:last-child td { border-bottom: none; }
.cat { font-weight: 500; color: var(--color-text-secondary); font-size: 12px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; margin-right: 4px; }
.sym { background: #ffd93d22; color: #92740a; }
.para { background: #e1f5ee; color: #085041; }
.note { font-size: 12px; color: var(--color-text-secondary); margin-top: 4px; }
/* ========= TAB GROUPS (regroupent plusieurs sections de niveau 1) ========= */
.tab-group { border: 1px solid rgb(34 34 34 / 30%); border-radius: 12px; margin: 5px 0; overflow: hidden; background: var(--bg-dark); }
.tab-group .tabs { display: flex; gap: 2px; padding: 0 8px 0; background: rgb(0 0 0 / 78%) !important; overflow-x: auto; scrollbar-width: thin; }
.tab-group .tabs::-webkit-scrollbar { height: 4px; }
.tab-group .tab-btn { flex-shrink: 0; padding: 10px 20px; border: 1px solid transparent; border-bottom: none; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-top: 10px; background: rgba(0, 0, 0, .2); color: var(--text-main); font-family: inherit; font-size: 16px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; opacity: .55; transition: opacity .2s ease, background .2s ease, color .2s ease, border-color .2s ease; }
.tab-group .tab-btn:hover { opacity: .85; }
.tab-group .tab-btn.active { opacity: 1; background: var(--bg-darker); border-color: rgba(255, 255, 255, .08); color: var(--tab-color, var(--color-primary)); }
.tab-group .tab-btn .t-icon { font-size: 16px; line-height: 1; }
/* Direct children .c-col become tab panels */
.tab-group>.c-col { border: 0; margin: 0; background: transparent; border-radius: 0; }
.tab-group>.c-col>.c-head { display: none; }
/* Tab panels: always block (max-height/opacity controlled below) */
.tab-group>.c-col>.c-body { display: block; padding: 18px; max-height: none; overflow: visible; opacity: 1; transform: none; transition: none; }
/* Before JS init: show only first panel. After init: show .tab-active */
.tab-group:not(.tab-initialized)>.c-col~.c-col { display: none; }
.tab-group.tab-initialized>.c-col { display: none; }
.tab-group.tab-initialized>.c-col.tab-active { display: block; animation: tabPanelIn .25s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes tabPanelIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
/* ========= Responsive — Mobile ========= */
@media (max-width: 768px) {
  .burger { display: flex; }
  .site-sidebar { position: fixed; top: 0; left: -100%; width: 75vw; width: 100%; height: 100vh; z-index: 175; transition: left 0.3s var(--ease); box-shadow: none; display: block; }
  .site-sidebar.is-open { left: 0; background: white; box-shadow: 8px 0 32px rgba(0, 0, 0, 0.08); }
  .site-title, .site-nav { text-align: center; }
  .site-nav { font-size: 1.2em; }
  .site-nav a { font-size: 1.3em; }
  .site-main { padding: 4.5rem var(--pad-sm) var(--pad-sm); }
  .home-intro h1 { font-size: 1.4rem; }
  .list-heading { font-size: 1.35rem; }
  .content-title { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  :root { --pad-sm: 1.25rem; }
  .title-link { grid-template-columns: 1fr; gap: 0.25rem; }
  .title-date { order: -1; }
}
/* ========= Reading progress bar ========= */
.mono-progress { position: fixed; bottom: 0; left: 0; right: 0; height: 5px; background: var(--border); z-index: 500; opacity: 0; transition: opacity 0.4s var(--ease); pointer-events: none; }
.mono-progress.is-visible { opacity: 1; }
/* The coloured fill that grows left → right */
.mono-progress-fill { position: absolute; top: 0; left: 0; height: 100%; width: 0%; background: var(--progress-color); transition: width 0.08s linear; }
/* The floating indicator positioned above the fill endpoint */
.mono-progress-thumb { position: absolute; bottom: 6px; left: 0%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; transition: left 0.08s linear; pointer-events: none; }
/* Rounded pill bubble with the percentage */
.mono-progress-bubble { position: absolute; bottom: 8px; right: 0; font-size: .6em; border-radius: 5px; border-bottom-right-radius: 0; padding: 2px 6px; background: var(--accent); color: #fff; }
.mono-progress-bubble:after { content: ''; display: block; position: absolute; bottom: -5px; right: 0; width: 0; height: 0; border-left: 5px solid transparent; border-top: 5px solid var(--accent); }
.mono-progress-completed .mono-progress-fill { background-color: #83bd71; }
.mono-progress-completed .mono-progress-bubble { background: #83bd71; }
.mono-progress-completed .mono-progress-bubble:after { border-top: 5px solid #83bd71; }
/* ── Mobile: full-width bar (no sidebar offset) ── */
@media (max-width: 768px) {
  .mono-progress { left: 0; }
}
/* ── Site footer ───── */
.site-footer { border-top: 1px solid var(--border); padding: 1.5rem var(--pad); padding-left: calc(var(--sidebar-w) + var(--pad)); font-size: 0.72rem; color: var(--muted); }
.site-footer-inner { display: flex; justify-content: space-between; align-items: center; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
a.social-icon { margin-right: 10px; }
.site-footer a { color: var(--muted); transition: color var(--dur) var(--ease); }
.site-footer a:hover { color: var(--text); }
.footer-social { display: flex; gap: 0.75rem; align-items: center; }
.footer-social-link { color: var(--muted); transition: color var(--dur) var(--ease); display: flex; }
.footer-social-link:hover { color: var(--text); }
.footer-social-link svg { width: 16px; height: 16px; }
@media (max-width: 768px) {
  .site-footer { padding: 1.25rem var(--pad-sm); }
}