/* ============================================================
   main.css — Andrea Moro personal site
   Structure:
     1. Design tokens (CSS variables)
     2. Reset & base
     3. Site wrapper
     4. Navigation
     5. Page header  (blog, work)
     6. Filter bar   (blog, work)
     7. Cards macro  (post-card, teaser-card, cat-pill)
     8. Footer strip (work, blog)
     9. Home page
    10. Blog listing
    11. Article page
    12. Work / timeline
    13. Responsive
   ============================================================ */


/* ── 1. Design tokens ─────────────────────────────────────── */

:root {
  --navy:    #1e2d4f;
  --navy2:   #253662;
  --steel:   #6b9bc3;
  --warm:    #c49a6c;
  --bg:      #f5f4f0;
  --surface: #ffffff;
  --text:    #111827;
  --muted:   #6b7280;
  --rule:    rgba(30,45,79,0.12);
  --line:    rgba(30,45,79,0.18);

  /* category colours */
  --cat-seo:                #1e2d4f;
  --cat-digital-marketing:  #6b9bc3;
  --cat-nix:                #4a7c59;
  --cat-tips:               #b07840;
  --cat-web:                #8b5aa6;
  --cat-ai-llm:             #0e7c6b;

  /* article prose */
  --prose-max: 680px;
}


/* ── 2. Reset & base ──────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { background: var(--navy); }
body  { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); }
img   { max-width: 100%; display: block; }
a     { color: inherit; }
/* Kill the translucent grey blob mobile browsers paint on tap — our
   :active/:hover styles give clearer feedback without the halo. */
a, button, [role="button"], input, textarea, select { -webkit-tap-highlight-color: transparent; }


/* ── 3. Site wrapper ──────────────────────────────────────── */

.site-wrap {
  max-width: 1060px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 60px rgba(0,0,0,0.12);
}


/* ── 4. Navigation ────────────────────────────────────────── */

.site-wrap > nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
}
.logo {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--navy);
  text-decoration: none;
}
.links {
  display: flex;
  gap: 2.25rem;
  list-style: none;
}
/* .link-btn is a <button> rendered in place of an <a> for modal-only
   items (Contact). Reset every scrap of default button chrome so the
   element reads as inline text — identical in every rendering context
   to the sibling <a> links. Container-scoped rules below apply the
   same typography (colour, size, tracking) as the adjacent links. */
.link-btn {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  line-height: inherit;
  text-align: inherit;
  cursor: pointer;
  user-select: text;
}
.links a,
.links .link-btn {
  text-decoration: none;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .2s;
}
.links a:hover,
.links a.active,
.links .link-btn:hover { color: var(--navy); }

/* Blog submenu — hidden on desktop (Blog is a plain link to /blog/);
   only revealed inside the mobile burger panel by the ≤767px rules.
   The caret/submenu block is styled there, not here. */
.links .has-submenu { position: relative; }
.submenu, .submenu-caret { display: none; }

.lang {
  display: flex;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
}
.lang button {
  font-size: 11px;
  padding: 5px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  text-transform: uppercase;
  font-family: inherit;
}
.lang button.on { background: var(--navy); color: #fff; }
.lang .lang-full { display: none; }

/* Desktop keeps the previous 3-child flex layout; the wrapper is
   invisible to layout so logo / links / lang still flex as siblings.
   Same for .nav-slider — only the mobile rules treat it as a flex
   container that can horizontally slide between two panels. */
.nav-menu   { display: contents; }
.nav-slider { display: contents; }

/* Burger button — hidden on desktop, shown ≤767px */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 32px;
  height: 32px;
  padding: 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--navy);
  border-radius: 1px;
  transition: transform .25s ease, opacity .2s ease;
}
.site-wrap > nav.open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-wrap > nav.open .burger span:nth-child(2) { opacity: 0; }
.site-wrap > nav.open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── 4b. Blog search (in filter bar) ─────────────────────── */

.blog-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.filter-tabs {
  transition: opacity .25s ease;
}
.filter-bar:has(.blog-search-input:focus) .filter-tabs {
  opacity: 0;
  pointer-events: none;
  width: 0;
  overflow: hidden;
}
.filter-bar:has(.blog-search-input:focus) .blog-search {
  flex: 1;
}
.blog-search-icon {
  position: absolute;
  left: 10px;
  pointer-events: none;
  color: var(--muted);
}
.blog-search-input {
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 7px 10px 7px 30px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--surface);
  color: var(--text);
  width: 240px;
  transition: width .35s ease, border-color .2s;
}
.blog-search-input:focus {
  outline: none;
  border-color: var(--navy);
  width: 100%;
}
.blog-search-input::placeholder {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
}

/* Search results (replaces post grid when active) */
.search-result-card {
  padding: 1.25rem 1.5rem;
}
.search-result-card .card-title {
  font-family: 'Fraunces', serif;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.search-result-card .card-excerpt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.search-result-card mark {
  background: #fde68a;
  color: inherit;
  padding: 1px 2px;
  border-radius: 2px;
}
.search-empty {
  font-size: 14px;
  color: var(--muted);
  padding: 2rem 0;
}


/* ── 5. Page header ───────────────────────────────────────── */

.page-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  min-height: 140px;
}
.ph-left {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.ph-eyebrow {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.6rem;
}
.ph-title {
  font-family: 'Fraunces', serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
}
.ph-title em { font-style: italic; color: var(--steel); }

.ph-right {
  padding: 2.75rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}
.ph-stats     { display: flex; gap: 2.5rem; }
.ph-stat-n    { font-family: 'Fraunces', serif; font-size: 26px; color: #fff; line-height: 1; }
.ph-stat-l    { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(107,155,195,0.7); margin-top: 3px; }
.ph-tagline   { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,0.5); max-width: 380px; border-left: 2px solid rgba(107,155,195,0.35); padding-left: 1rem; }


/* ── 6. Filter bar ────────────────────────────────────────── */

.filter-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--rule);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.25rem;
}
.filter-tabs  { display: flex; gap: 0.75rem; }
.filter-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  text-decoration: none;
}
.filter-btn:hover         { color: var(--navy); }
.filter-btn.active        { color: var(--navy); border-bottom-color: var(--navy); }
.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  background: var(--rule);
  border-radius: 50%;
  font-size: 9px;
  margin-left: 5px;
  vertical-align: middle;
  color: var(--muted);
}
.sort-select {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 5px 10px;
  cursor: pointer;
}

/* hidden (filter targets) */
.hidden { display: none !important; }


/* ── 7. Cards & pills ─────────────────────────────────────── */

.cat-pill {
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  font-weight: 500;
  background: rgba(60,60,60,0.10);
  color: var(--ink);
}
.cat-pill.seo-geo            { background: rgba(30,45,79,0.08);    color: var(--cat-seo); }
.cat-pill.digital-marketing  { background: rgba(107,155,195,0.15); color: var(--cat-digital-marketing); }
.cat-pill.nix                { background: rgba(74,124,89,0.15);   color: var(--cat-nix); }
.cat-pill.tips               { background: rgba(176,120,64,0.15);  color: var(--cat-tips); }
.cat-pill.web                { background: rgba(139,90,166,0.15);  color: var(--cat-web); }
.cat-pill.ai-llm             { background: rgba(14,124,107,0.12);  color: var(--cat-ai-llm); }

/* post-card grid card — the card itself is inert; only the title is a link */
.post-card {
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: inherit;
  border-top: 3px solid var(--rule);
}
.post-card.seo-geo            { border-top-color: var(--cat-seo); }
.post-card.digital-marketing  { border-top-color: var(--cat-digital-marketing); }
.post-card.nix                { border-top-color: var(--cat-nix); }
.post-card.tips               { border-top-color: var(--cat-tips); }
.post-card.web                { border-top-color: var(--cat-web); }
.post-card.ai-llm             { border-top-color: var(--cat-ai-llm); }

.post-body    { padding: 1.25rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-header  { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.post-date    { font-size: 11px; color: var(--muted); }
.post-title   { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 400; line-height: 1.3; margin: 0 0 0.6rem; }
.post-title a {
  color: var(--navy);
  text-decoration: none;
  transition: color .15s ease;
}
.post-title a:hover,
.post-title a:focus,
.post-title a:active { color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.post-excerpt {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-footer  { padding: 0.75rem 1.5rem; border-top: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; }
.read-time    { font-size: 11px; color: var(--muted); }

/* shared link style */
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
}
.read-link:hover { color: var(--steel); }

/* shared buttons — classes apply identically to <a> and <button>.
   -webkit-appearance + appearance: none strips iOS Safari's native
   button chrome when rendered on an actual <button> element. */
.btn-p {
  -webkit-appearance: none;
  appearance: none;
  background: var(--navy);
  color: #fff;
  padding: 9px 20px;
  border-radius: 3px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  margin: 0;
}
.btn-o {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  color: var(--navy);
  padding: 9px 20px;
  border-radius: 3px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--rule);
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  margin: 0;
}


/* ── 8. Footer strip ──────────────────────────────────────── */

.footer-strip {
  background: var(--surface);
  border-top: 1px solid var(--rule);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-strip p        { font-size: 13px; color: var(--muted); }
.footer-strip p strong { color: var(--text); font-weight: 500; }
.footer-cta            { display: flex; gap: 0.75rem; }


/* ── 9. Home page ─────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr 420px;
  min-height: 560px;
  background: var(--surface);
}
.hero-l {
  padding: 5rem 3rem 5rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 1.5rem;
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--steel); }

h1 {
  font-family: 'Fraunces', serif;
  font-size: 62px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin-bottom: 1.5rem;
}
h1 em { font-style: italic; color: var(--steel); font-size: 0.88em; }

.bio         { font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 430px; margin-bottom: 2.5rem; }
.bio strong  { color: var(--text); font-weight: 500; }
.ctas        { display: flex; gap: 0.875rem; margin-bottom: 3.5rem; }

.stats       { display: flex; border-top: 1px solid var(--rule); padding-top: 1.25rem; gap: 2rem; }
.stat        { border-right: 1px solid var(--rule); padding-right: 2rem; }
.stat:last-child { border-right: none; padding-right: 0; }
.stat-n      { font-family: 'Fraunces', serif; font-size: 30px; color: var(--navy); line-height: 1; }
.stat-l      { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 4px; }

.hero-r {
  background: linear-gradient(to right,
              var(--surface) 0%,
              var(--surface) 58%,
              var(--navy)    58%,
              var(--navy)    100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}
.grid {
  position: absolute;
  inset: 0 0 0 55%;
  background-image:
    linear-gradient(rgba(107,155,195,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(107,155,195,0.07) 1px, transparent 1px);
  background-size: 32px 32px;
}
.arc {
  position: absolute;
  bottom: -100px;
  right: 0;
  transform: translateX(25%);
  width: 480px;
  height: 480px;
  border-radius: 50%;
  border: 1px solid rgba(107,155,195,0.1);
}
.corner {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 3;
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(107,155,195,0.45);
  text-align: right;
  line-height: 1.8;
}
.illu         { position: relative; z-index: 2; width: 100%; display: flex; justify-content: flex-end; align-items: flex-end; padding: 0; }
.illu img     { width: 360px; display: block; margin-right: -8px; filter: drop-shadow(0 0 22px rgba(255,255,255,0.4)); }

/* home teaser strip */
.strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--surface);
  border-top: 1px solid var(--rule);
}
.card         { padding: 1.5rem 1.75rem; border-right: 1px solid var(--rule); }
.card:last-child { border-right: none; }
.card-type    { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--steel); margin-bottom: 0.6rem; }
.card-title   { font-family: 'Fraunces', serif; font-size: 17px; color: var(--navy); line-height: 1.35; margin-bottom: 0.4rem; }
.card-meta    { font-size: 12.5px; color: var(--muted); }
.arr          { color: var(--steel); margin-left: 4px; }


/* ── 10. Blog listing ─────────────────────────────────────── */

.blog-wrap      { padding: 2.5rem 2.5rem 4rem; }
.section-label  { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0 0 1rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.5rem; }

/* featured post */
.featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--surface);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
  transition: box-shadow .2s;
}
.featured:hover       { box-shadow: 0 6px 32px rgba(30,45,79,0.12); }
.featured-label       { background: var(--navy); padding: 2.5rem; display: flex; flex-direction: column; justify-content: space-between; min-height: 240px; }
.featured-badge       { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--steel); margin-bottom: auto; }
.featured-badge-dot   { width: 5px; height: 5px; background: var(--steel); border-radius: 50%; }
.featured-title       { font-family: 'Fraunces', serif; font-size: 26px; font-weight: 400; line-height: 1.2; color: #fff; margin: 1rem 0 0.5rem; }
.featured-title a     { color: inherit; text-decoration: none; }
.featured-title a:hover,
.featured-title a:focus,
.featured-title a:active { text-decoration: underline; text-underline-offset: 3px; }
.featured-meta        { display: flex; align-items: center; gap: 0.75rem; font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 1rem; flex-wrap: wrap; }
.featured-label .cat-pill { background: rgba(107,155,195,0.2); color: var(--steel); }
.featured-body        { padding: 2.5rem; display: flex; flex-direction: column; justify-content: center; border-top: 3px solid var(--navy); }
.featured-toc         { list-style: none; padding: 0; margin: 0 0 1.25rem; display: flex; flex-direction: column; gap: 0.3rem; }
.featured-toc li      { font-size: 12.5px; color: var(--muted); padding-left: 0.9rem; position: relative; line-height: 1.5; }
.featured-toc li::before { content: '—'; position: absolute; left: 0; color: var(--rule); font-size: 11px; }
.featured-excerpt     { font-size: 13.5px; line-height: 1.7; color: var(--muted); }
.featured-excerpt strong { color: var(--text); font-weight: 500; }

/* post grid */
.post-grid      { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.load-more-wrap { text-align: center; margin-top: 2.5rem; }
.btn-load {
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 10px 24px;
  cursor: pointer;
}
.btn-load:hover { border-color: var(--navy); }

/* ── pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 3rem 0 1rem;
  flex-wrap: wrap;
}

/* « ‹ › » chevron buttons */
.pagination-jump {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 1;
  color: var(--navy);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 3px;
  text-decoration: none;
  transition: border-color .2s, background .2s;
}
.pagination-jump:hover { border-color: var(--navy); background: rgba(30,45,79,0.04); }
.pagination-jump.disabled {
  color: var(--rule);
  background: transparent;
  cursor: not-allowed;
}
.pagination-jump.disabled:hover { border-color: var(--rule); background: transparent; }

.pagination-pages {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0 0.4rem;
}
.pagination-num {
  display: inline-block;
  min-width: 32px;
  padding: 6px 10px;
  font-size: 12.5px;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  border-radius: 3px;
  transition: background .2s, color .2s;
}
.pagination-num:hover { background: rgba(30,45,79,0.06); color: var(--navy); }
.pagination-num.current {
  background: var(--navy);
  color: #fff;
  font-weight: 500;
}

.section-label-page { color: var(--muted); font-weight: 400; margin-left: 0.5rem; }

@media (max-width: 767px) {
  .pagination { gap: 0.25rem; }
  /* Narrow viewports can't fit 10 numbered buttons without wrapping to
     two+ rows and overflowing the container. Show only current ± 1; the
     « ‹ › » jump controls cover the rest. */
  .pagination-pages { flex-wrap: nowrap; justify-content: center; }
  .pagination-pages li { display: none; }
  .pagination-pages li:has(> .current),
  .pagination-pages li:has(> .current) + li,
  .pagination-pages li:has(+ li > .current) { display: inline-block; }
}


/* ── 11. Article page ─────────────────────────────────────── */

.article-wrap   { padding: 2.5rem 2.5rem 2rem; }

.article-topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; position: relative; min-height: 2rem; }
.article-topbar .breadcrumb { margin-bottom: 0; transition: opacity .25s ease; flex: 1 1 auto; min-width: 0; }
.article-topbar .blog-search { flex-shrink: 0; }
.article-topbar .blog-search-input { width: 240px; }
.article-topbar:has(.blog-search-input:focus) .breadcrumb {
  visibility: hidden;
}
.article-topbar:has(.blog-search-input:focus) .blog-search {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}
.article-topbar .blog-search-input:focus { width: 100%; }
.breadcrumb     { font-size: 13px; color: var(--muted); margin-bottom: 2rem; display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; overflow: hidden; min-width: 0; }
.breadcrumb > * { flex-shrink: 0; white-space: nowrap; }
.breadcrumb a   { color: var(--muted); text-decoration: none; cursor: pointer; }
.breadcrumb a:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumb span[aria-current="page"] { color: var(--text); overflow: hidden; text-overflow: ellipsis; min-width: 0; flex-shrink: 1; }
.bc-sep         { color: var(--rule); }
.bc-collapsed   { color: var(--muted); cursor: help; padding: 0 2px; letter-spacing: 0.05em; }
.bc-collapsed:hover { color: var(--navy); }
/* Doubled class raises specificity so the mobile `.blog-wrap` rule
   can't reset padding-bottom to 3rem — which opened a visible gap
   between the breadcrumb and the filter bar underneath. */
.blog-wrap.blog-wrap--breadcrumb { padding: 2rem 2.5rem 0; }

.article-header      { max-width: var(--prose-max); margin-bottom: 2.5rem; }
.article-header-meta { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1rem; flex-wrap: wrap; }
.article-header-meta .cat-pill { font-size: 11px; padding: 4px 10px; letter-spacing: 0.1em; }
.article-date        { font-size: 13.5px; color: var(--muted); }
.article-sep         { color: var(--rule); }
.article-read-time   { font-size: 13.5px; color: var(--muted); }
.article-title       { font-family: 'Fraunces', serif; font-size: 36px; font-weight: 400; line-height: 1.15; color: var(--navy); letter-spacing: -0.02em; }

.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: 4rem; align-items: start; }

/* TL;DR */
.tldr           { background: var(--navy); border-left: 3px solid var(--warm); border-radius: 4px; padding: 1.5rem 1.75rem; margin-bottom: 2.5rem; box-shadow: 0 1px 3px rgba(30,45,79,0.08); }
.tldr-label     { display: flex; align-items: center; gap: 7px; font-family: 'Fraunces', serif; font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--warm); margin-bottom: 1rem; font-weight: 500; }
.tldr-icon      { color: var(--warm); font-size: 14px; flex-shrink: 0; margin-right: 4px; }
.tldr-list      { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.55rem; }
.tldr-list li   { font-size: 15px; color: rgba(255,255,255,0.9); padding-left: 1.15rem; position: relative; line-height: 1.55; }
.tldr-list li::before { content: '—'; position: absolute; left: 0; color: var(--warm); font-size: 12px; top: 2px; }

/* prose */
.article-body     { min-width: 0; }
.article-content  { max-width: var(--prose-max); }
.article-content p          { font-size: 16px; line-height: 1.75; color: #374151; margin-bottom: 1.4rem; }
.article-content h2         { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 400; color: var(--navy); margin: 2.5rem 0 1rem; line-height: 1.2; }
.article-content h3         { font-family: 'Fraunces', serif; font-size: 19px; font-weight: 400; color: var(--navy); margin: 2rem 0 0.75rem; line-height: 1.25; }
.article-content a          { color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover    { color: var(--navy); }
.article-content ul,
.article-content ol         { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.article-content li         { font-size: 16px; line-height: 1.75; color: #374151; margin-bottom: 0.3rem; }
.article-content code       { font-family: 'SF Mono', 'Fira Code', monospace; font-size: 13px; background: rgba(30,45,79,0.06); color: var(--navy); padding: 2px 6px; border-radius: 3px; }
.article-content pre        { background: rgba(30,45,79,0.04); border: 1px solid var(--rule); border-radius: 4px; padding: 1.1rem 1.35rem; overflow-x: auto; margin-bottom: 1.4rem; }
.article-content pre code   { background: none; color: var(--text); padding: 0; font-size: 13px; line-height: 1.7; }
.article-content img        { max-width: 100%; border-radius: 4px; margin: 1.5rem 0; border: 1px solid var(--rule); }
.article-content blockquote { border-left: 3px solid var(--steel); padding: 0.75rem 1.25rem; margin: 1.5rem 0; background: rgba(107,155,195,0.06); border-radius: 0 4px 4px 0; }
.article-content blockquote p { margin: 0; color: var(--muted); font-style: italic; }
.article-content strong     { color: var(--text); font-weight: 500; }

/* Tables inside article bodies — fixed layout so every post renders
   with evenly-distributed columns regardless of cell content length.
   A wrapping `overflow-x: auto` keeps wide tables readable on mobile. */
.article-content table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin: 1.75rem 0;
  font-size: 14px;
  line-height: 1.55;
}
.article-content th,
.article-content td {
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.article-content thead th {
  background: rgba(30,45,79,0.04);
  font-weight: 500;
  color: var(--navy);
  font-size: 12.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.article-content tbody tr:nth-child(2n) td {
  background: rgba(30,45,79,0.015);
}
.article-content hr {
  border: 0;
  height: 0;
  overflow: visible;
  text-align: center;
  margin: 3rem 0;
}
.article-content hr::before {
  content: '· · ·';
  display: inline-block;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: var(--steel);
  letter-spacing: 0.6em;
  padding-left: 0.6em;
  line-height: 1;
}

/* paper note / pullquote / info box / ASCII diagram — used by research-style posts */
.article-content .paper-label {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--warm); margin-bottom: 0.75rem;
}
.article-content .paper-byline {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px; color: var(--muted); letter-spacing: 0.05em;
  margin-bottom: 2rem;
}
.article-content .paper-citation {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px; line-height: 1.7; color: var(--muted);
  margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--rule);
}
.article-content .pullquote {
  font-family: 'Fraunces', serif;
  font-size: 22px; font-style: italic; line-height: 1.5;
  color: var(--navy); border-left: 3px solid var(--warm);
  padding: 0.5rem 0 0.5rem 1.5rem; margin: 2rem 0;
}
.article-content .note {
  background: rgba(30,45,79,0.04); border-radius: 4px;
  padding: 1.1rem 1.35rem; margin: 1.75rem 0;
  font-size: 14px; line-height: 1.7; color: var(--text);
}
.article-content .note strong:first-child {
  display: block; margin-bottom: 0.4rem;
  font-family: 'DM Sans', sans-serif; font-weight: 500;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy);
}
.article-content pre.diagram {
  border: 1px solid var(--rule); border-radius: 4px;
  padding: 1.25rem 1.25rem; margin: 1.75rem 0;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12.5px; line-height: 1.7; color: var(--muted);
  background: var(--surface); overflow-x: auto;
}
.article-content pre.diagram code { background: none; color: inherit; padding: 0; }
.article-content .diagram .accent { color: var(--warm); }
.article-content .diagram .dim    { opacity: 0.55; }

/* references section */
.article-content .references        { margin-top: 2.5rem; padding-top: 1.5rem; }
.article-content .references-label  { font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.75rem; }
.article-content .references-list   { list-style: none; padding-left: 0; }
.article-content .references-list li {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px; line-height: 1.7; color: var(--muted); margin-bottom: 0.5rem;
}
.article-content .references-list a { color: var(--steel); }

/* prev/next */
.article-nav        { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); max-width: var(--prose-max); }
.article-nav-link   { display: flex; flex-direction: column; gap: 0.25rem; text-decoration: none; max-width: 45%; }
.article-nav-link.next { text-align: right; margin-left: auto; }
.article-nav-dir    { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--steel); }
.article-nav-title  { font-family: 'Fraunces', serif; font-size: 14px; color: var(--navy); line-height: 1.3; }
.article-nav-link:hover .article-nav-title { text-decoration: underline; }

/* author bio */
.author-bio          { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--rule); max-width: var(--prose-max); }
.author-bio-monogram { width: 52px; height: 52px; border-radius: 4px; background: var(--navy); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 15px; color: var(--steel); letter-spacing: 0.05em; user-select: none; }
.author-bio-name     { font-family: 'Fraunces', serif; font-size: 15px; color: var(--navy); margin-bottom: 0.3rem; }
.author-bio-text     { font-size: 13px; line-height: 1.6; color: var(--muted); margin-bottom: 0.5rem; }

/* sidebar */
.article-sidebar      { position: sticky; top: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.sidebar-card         { background: var(--surface); border-radius: 4px; padding: 1.25rem; border-top: 3px solid var(--navy); }
.sidebar-card-label   { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.875rem; }
.sidebar-meta-row     { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0; border-bottom: 1px solid var(--rule); gap: 0.5rem; }
.sidebar-meta-row:last-child { border-bottom: none; }
.sidebar-meta-key     { font-size: 11.5px; color: var(--muted); }
.sidebar-meta-val     { font-size: 11.5px; color: var(--text); text-align: right; }
.toc-list             { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.1rem; counter-reset: toc; }
.toc-item a           { font-size: 12.5px; color: var(--muted); text-decoration: none; line-height: 1.5; display: block; padding: 0.3rem 0 0.3rem 0.75rem; border-left: 2px solid var(--rule); transition: color .15s, border-color .15s; }
.toc-item a::before   { counter-increment: toc; content: counter(toc) ". "; color: var(--rule); font-size: 11px; }
.toc-item a:hover     { color: var(--navy); border-left-color: var(--navy); }
.toc-item a.active    { color: var(--navy); border-left-color: var(--navy); }
.toc-item.toc-h3 a   { padding-left: 1.5rem; font-size: 12px; }
.toc-item.toc-h3 a::before { content: none; }
.related-list         { list-style: none; padding: 0; }
.related-item         { padding: 0.5rem 0; border-bottom: 1px solid var(--rule); }
.related-item:last-child { border-bottom: none; }
.related-item a       { font-size: 12.5px; color: var(--navy); text-decoration: none; line-height: 1.4; display: block; margin-bottom: 0.2rem; }
.related-item a:hover { text-decoration: underline; }
.related-meta         { font-size: 10.5px; color: var(--muted); }
.sidebar-back         { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.sidebar-back:hover   { color: var(--navy); }


/* ── 12. Work / timeline ──────────────────────────────────── */

.timeline-wrap { padding: 4rem 2.5rem 5rem; position: relative; }
.timeline-wrap::before {
  content: '';
  position: absolute;
  left: calc(2.5rem + 140px);
  top: 4rem;
  bottom: 2rem;
  width: 1px;
  background: var(--line);
}

.timeline-entry { display: grid; grid-template-columns: 140px 1fr; gap: 0 3rem; position: relative; }

.te-left        { padding-top: 1.5rem; text-align: right; position: relative; }
.te-left::after { content: ''; position: absolute; right: -3rem; top: 1.9rem; width: 8px; height: 1px; background: var(--line); }
.te-year        { font-family: 'Fraunces', serif; font-size: 14px; color: var(--muted); line-height: 1; display: block; padding-right: 1rem; }
.te-dot         { display: none; }

.te-card        { background: var(--surface); border-radius: 4px; margin-bottom: 1.25rem; transition: box-shadow .2s, transform .2s; overflow: hidden; }
.te-card:hover  { box-shadow: 0 4px 24px rgba(30,45,79,0.10); transform: translateY(-1px); }
.te-card.role   { border-left: 3px solid var(--navy); padding: 1.5rem 1.75rem; }
.te-card.cert   { border-left: 3px solid var(--steel); padding: 1.25rem 1.75rem; background: var(--surface); }
.cert-head      { display: flex; align-items: flex-start; gap: 1rem; }
.cert-desc      { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 0.85rem; }
.cert-desc p    { margin-bottom: 0.5rem; }
.cert-desc p:last-child { margin-bottom: 0; }

.te-role-title  { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 400; color: var(--navy); margin-bottom: 0.3rem; line-height: 1.25; }
.te-company     { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.te-company-name { font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--text); }
.te-sep         { color: var(--rule); font-size: 10px; }
.te-location    { font-size: 11px; color: var(--muted); }
.te-period      { font-size: 11px; color: var(--steel); letter-spacing: 0.04em; }
.te-desc        { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin-bottom: 0.9rem; }
.te-desc strong { color: var(--text); font-weight: 500; }
.te-desc p      { margin-bottom: 0.5rem; }
.te-desc p:last-child { margin-bottom: 0; }
.te-desc ul,
.cert-desc ul   { list-style: none; padding: 0; margin: 0.5rem 0 0.5rem; }
.te-desc li,
.cert-desc li   { font-size: 13px; line-height: 1.6; color: var(--muted); padding-left: 1.1rem; position: relative; margin-bottom: 0.25rem; }
.te-desc li::before,
.cert-desc li::before { content: '—'; position: absolute; left: 0; color: var(--rule); font-size: 11px; }
.te-bullets     { list-style: none; padding: 0; margin: 0.5rem 0 0.25rem; }
.te-bullets li  { font-size: 13px; line-height: 1.6; color: var(--muted); padding-left: 1.1rem; position: relative; margin-bottom: 0.25rem; }
.te-bullets li::before { content: '—'; position: absolute; left: 0; color: var(--rule); font-size: 11px; }
.te-tags        { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.te-tag         { font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg); padding: 3px 8px; border-radius: 2px; }

.cert-icon      { flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: rgba(107,155,195,0.12); display: flex; align-items: center; justify-content: center; margin-top: 2px; }
.cert-icon svg  { width: 14px; height: 14px; fill: none; stroke: var(--steel); stroke-width: 1.5; }
.cert-body      { flex: 1; }
.cert-title     { font-family: 'Fraunces', serif; font-size: 14px; color: var(--navy); margin-bottom: 0.25rem; }
.cert-meta      { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.cert-link      { font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--steel); text-decoration: none; margin-left: auto; white-space: nowrap; }
.cert-link:hover { text-decoration: underline; }


/* ── 13. Responsive ───────────────────────────────────────── */

@media (max-width: 1024px) {
  /* hero */
  .hero                   { grid-template-columns: 1fr; min-height: auto; }
  .hero-l                 { border-right: none; border-bottom: 1px solid var(--rule); }
  .hero-r                 { min-height: 380px; background: var(--navy); }
  .grid                   { inset: 0; }
  .corner                 { top: 1.5rem; right: auto; left: 1.5rem; text-align: left; }
  .illu                   { justify-content: flex-end; }
  .illu img               { width: 260px; margin-right: 0; }
  h1                      { font-size: 52px; }

  /* page header */
  .page-header            { grid-template-columns: 1fr; }
  .ph-left                { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }

  /* blog */
  .post-grid              { grid-template-columns: repeat(2, 1fr); }
  .featured               { grid-template-columns: 1fr; }
  .featured-label         { min-height: auto; }

  /* article */
  .article-layout         { grid-template-columns: 1fr; gap: 2.5rem; }
  .article-sidebar        { position: static; flex-direction: row; flex-wrap: wrap; }
  .sidebar-card           { flex: 1; min-width: 200px; }
}

@media (max-width: 767px) {
  /* ── Burger-menu nav ──────────────────────────────────────── */
  /* Keep the top bar itself as a single horizontal row (logo left,
     burger right) so the dropped panel can *overlay* the page below
     rather than push it. */
  .site-wrap > nav        { padding: 1rem 1.25rem; flex-wrap: nowrap; gap: 0.75rem; position: relative; }
  .burger                 { display: flex; }

  /* The links + lang become a floating panel anchored to the nav's
     bottom edge; hidden until nav.open. On mobile the Blog submenu is
     a second "screen" that slides in from the right over the same
     panel — no peek preview, no horizontal track. */
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0 1.25rem 1rem;
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 8px 22px rgba(30,45,79,0.12);
    z-index: 150;
    overflow: hidden;
  }
  .site-wrap > nav.open .nav-menu {
    display: flex;
  }

  /* Slider: both panels live in the SAME grid cell so the container
     sizes to the taller of the two. overflow: hidden clips whichever
     panel is translated off-screen, so neither peeks. */
  .nav-menu .nav-slider {
    display: grid;
    grid-template-columns: 100%;
    overflow: hidden;
  }
  .nav-menu .nav-slider > .links,
  .nav-menu .nav-slider > .submenu {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    transition: transform .28s ease;
  }

  .nav-menu .links {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .nav-menu .links > li {
    border-top: 1px solid var(--rule);
  }
  .nav-menu .links > li:first-child { border-top: none; }
  .nav-menu .links > li > a,
  .nav-menu .links > li > .link-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0.25rem;
    font-size: 13px;
    width: 100%;
  }
  /* When the submenu is open, the primary list slides off to the left
     and the submenu slides in from the right (see .submenu rules). */
  .nav-menu.submenu-open .links { transform: translateX(-100%); }
  /* On mobile the language switch is its own boxed pill sitting below
     the link list with breathing room both above and below. No rule,
     no edge-to-edge row — it reads as a separate, optional action. */
  .nav-menu .lang {
    align-self: flex-start;
    margin: 1.25rem 0 1.5rem;
    border: 1px solid var(--rule);
    border-radius: 4px;
    overflow: hidden;
  }
  .nav-menu .lang button {
    padding: 0.55rem 1rem;
    font-size: 12px;
    letter-spacing: 0.04em;
  }
  .nav-menu .lang .lang-short { display: none; }
  .nav-menu .lang .lang-full  { display: inline; }

  /* Blog category panel — stacks on top of .links in the same grid
     cell. Off-screen right by default, slides to 0 on .submenu-open.
     Same row styling as .links for visual continuity. */
  .nav-menu .submenu {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--surface);
    transform: translateX(100%);
    visibility: hidden;
    opacity: 1;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
  }
  .nav-menu.submenu-open .submenu {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-menu .submenu > li {
    border-top: 1px solid var(--rule);
  }
  .nav-menu .submenu > li:first-child,
  .nav-menu .submenu > li.submenu-back { border-top: none; }
  .nav-menu .submenu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0.25rem;
    font-size: 13px;
  }
  .nav-menu .submenu-count {
    font-size: 11px;
    color: var(--muted);
    margin-left: 0.5rem;
  }

  /* Back row: chevron + label, matches primary row padding/height so
     the return to the main menu feels like a true back-step. */
  .nav-menu .submenu-back-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    background: transparent;
    border: none;
    padding: 0.9rem 0.25rem;
    font-family: inherit;
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
  }
  .nav-menu .submenu-back-caret { font-size: 18px; line-height: 1; }

  /* Right-chevron on the Blog row — indicates a slide-in second panel. */
  .nav-menu .submenu-caret {
    display: inline-block;
    font-size: 18px;
    line-height: 1;
    color: var(--muted);
  }

  .blog-search            { width: 100%; }
  .blog-search-input      { width: 100%; }
  .blog-search-input:focus { width: 100%; }

  .ph-left, .ph-right     { padding: 2rem 1.25rem; }
  .ph-title               { font-size: 34px; }

  .blog-wrap              { padding: 1.5rem 1.25rem 3rem; }
  .blog-wrap.blog-wrap--breadcrumb { padding: 1.25rem 1.25rem 0; }
  /* Tight gap below the breadcrumb on narrow screens — desktop keeps
     the larger 2rem rhythm that matches the article layout. */
  .blog-wrap--breadcrumb .breadcrumb { margin-bottom: 0.5rem; }
  .post-grid              { grid-template-columns: 1fr; }
  /* Mobile: drop the category tabs (burger menu carries them) and
     let the search bar claim the full row. */
  .filter-bar             { padding: 0 1.25rem; flex-direction: row; align-items: center; }
  .filter-tabs            { display: none; }
  .filter-bar .blog-search { flex: 1; width: 100%; margin-left: 0; }
  .sort-select            { display: none; }

  .article-wrap           { padding: 1.5rem 1.25rem 1.5rem; }
  .article-title          { font-size: 26px; }
  .article-sidebar        { flex-direction: column; }

  .hero-l                 { padding: 2.5rem 1.25rem; }
  h1                      { font-size: 42px; }
  .ctas                   { flex-direction: column; gap: 0.625rem; }
  .stats                  { gap: 1.25rem; }
  .stat                   { padding-right: 1.25rem; }
  .hero-r                 { min-height: 300px; }
  .illu img               { width: 220px; }
  .strip                  { grid-template-columns: 1fr; }
  .card                   { border-right: none; border-bottom: 1px solid var(--rule); }
  .card:last-child        { border-bottom: none; }

  .timeline-wrap          { padding: 2.5rem 1.25rem; }
  .timeline-wrap::before  { left: calc(1.25rem + 80px); }
  .timeline-entry         { grid-template-columns: 80px 1fr; gap: 0 2rem; }
  .te-year                { padding-right: 0.5rem; }
  .te-left::after         { right: -2.25rem; }

  .footer-strip           { flex-direction: column; gap: 1rem; align-items: flex-start; }
}

/* Portrait phones: drop the left year gutter and the vertical rule so
   the role card can take the full width. The period inside .te-company
   already carries the date and wraps to multiple lines when needed. */
@media (max-width: 640px) {
  .timeline-wrap          { padding: 2rem 1rem 3rem; }
  .timeline-wrap::before  { display: none; }
  .timeline-entry         { grid-template-columns: 1fr; gap: 0; }
  .te-left                { display: none; }
  .te-card.role           { border-left-width: 4px; padding: 1.1rem 1rem 1.1rem 1.1rem; }
  .te-card.cert           { padding: 1rem 1rem 1rem 1.1rem; }
  .te-role-title          { font-size: 16px; }
  .te-company             { gap: 0.35rem 0.55rem; margin-bottom: 0.7rem; }
  .te-desc                { font-size: 13px; }
}

@media (max-width: 400px) {
  h1                      { font-size: 34px; }
  .stat-n                 { font-size: 24px; }
  .illu img               { width: 180px; }
}

/* ── contact modal ──────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay[aria-hidden="true"] {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.modal-overlay[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-dialog {
  position: relative;
  background: var(--surface);
  border-radius: 8px;
  padding: 2.5rem;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: color .15s;
}
.modal-close:hover { color: var(--navy); }
.modal-title {
  font-family: 'Fraunces', serif;
  font-size: 24px;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.modal-intro {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

/* honeypot — invisible to humans */
.contact-hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

.form-field {
  margin-bottom: 1.25rem;
}
.form-field label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 14px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .2s;
  resize: vertical;
}
.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.form-submit {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 24px;
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s;
  width: 100%;
}
.form-submit:hover { background: #1a2a3e; }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-status {
  font-size: 13px;
  margin-top: 0.75rem;
  text-align: center;
}
.form-status.success { color: #16a34a; }
.form-status.error   { color: #dc2626; }

@media (max-width: 767px) {
  .modal-dialog { padding: 2rem 1.5rem; }
}


/* ── site footer ────────────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: #fff;
  margin-top: 0;
}
.site-footer-inner {
  padding: 3rem 2.5rem 2.25rem;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}
.site-footer-name {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: #fff;
  margin-bottom: 0.45rem;
}
.site-footer-tag {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.58);
  max-width: 440px;
}
.site-footer-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding: 0;
  margin: 0;
  justify-self: end;
}
.site-footer-links a,
.site-footer-links .link-btn {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color .2s;
}
.site-footer-links a:hover,
.site-footer-links .link-btn:hover { color: var(--steel); }
.site-footer-meta {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255,255,255,0.09);
  padding-top: 1.25rem;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.site-footer-sep { color: rgba(255,255,255,0.25); }

@media (max-width: 767px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    padding: 2.25rem 1.25rem 1.5rem;
    gap: 1.5rem;
  }
  .site-footer-links { justify-self: start; }
}

/* ── empty state ────────────────────────────────────────────── */
.empty-state {
  padding: 4rem 2.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ── static pages (/about, /contact, …) ─────────────────────── */
.page-wrap { padding: 3rem 2.5rem 4.5rem; max-width: 820px; margin: 0 auto; }
.page-wrap .article-content .about-illu {
  float: right;
  width: 120px;
  height: auto;
  margin: 0 0 1.25rem 2rem;
  shape-outside: inset(0 round 8px);
}
@media (max-width: 767px) {
  .page-wrap .article-content .about-illu {
    float: none;
    display: block;
    width: 140px;
    margin: 0 auto 1.5rem;
  }
}
.page-wrap .article-content em {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 0.5rem;
}
@media (max-width: 767px) {
  .page-wrap { padding: 1.5rem 1.25rem 3rem; }
}

/* inline image with click-to-expand (lightbox) */
.article-content a.image-content {
  display: inline-block;
  line-height: 0;
  border: 0;
  text-decoration: none;
  cursor: zoom-in;
  position: relative;
}
.article-content a.image-content img {
  margin: 1.5rem 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.article-content a.image-content:hover img {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(30,45,79,0.12);
}

.lightbox {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(15,23,42,0.88);
  z-index: 1000;
  padding: 2rem;
  cursor: zoom-out;
  animation: lightbox-fade 0.15s ease-out;
}
.lightbox.is-open { display: flex; }
.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  cursor: default;
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.25rem;
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 0;
  border-radius: 50%;
  font-size: 28px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-close:focus { outline: 2px solid #fff; outline-offset: 2px; }
html.lightbox-lock { overflow: hidden; }
@keyframes lightbox-fade {
  from { opacity: 0; } to { opacity: 1; }
}
