/* ============================================================================
   Portfolio theme — accessible pastel
   Palette designed for WCAG-AA: dark ink text on light pastel surfaces.
   ========================================================================== */

:root {
  /* Surfaces */
  --bg: #F5F4FA;            /* page background (soft lavender-grey) */
  --bg-tint: #EEEDF7;       /* alternate section background */
  --surface: #FFFFFF;       /* cards */
  --surface-2: #FBFAFF;     /* subtle raised surface */

  /* Ink (text) */
  --ink: #1E2230;           /* primary text — ~15:1 on white */
  --ink-2: #454C60;         /* secondary text — ~8:1 on white */
  --muted: #5C6479;         /* meta text — ~6:1 on white */

  /* Lines */
  --line: #E3E1EF;
  --line-strong: #D2CFE6;

  /* Accent (periwinkle) — interactive text passes AA on white & pastel */
  --accent: #4B57A6;
  --accent-strong: #3A4488; /* hover/active, higher contrast */
  --accent-soft: #E8E9F7;   /* pastel accent surface */

  /* Category pastels (background + matching dark ink) */
  --c-data-bg: #E2EEF8;  --c-data-ink: #123A57;
  --c-genai-bg: #ECE6F6; --c-genai-ink: #3A2363;
  --c-ml-bg: #E2F1E6;    --c-ml-ink: #1E3A29;
  --c-finops-bg: #FBEEDB;--c-finops-ink: #5A4012;
  --c-presales-bg:#F8E5EC;--c-presales-ink:#5C2438;
  --c-independent-bg:#DFF4F2;--c-independent-ink:#0F4A45;

  /* STARL row tints */
  --s-s: #E2EEF8;  /* situation */
  --s-t: #ECE6F6;  /* tasks */
  --s-a: #E2F1E6;  /* actions */
  --s-r: #FBEEDB;  /* results */
  --s-l: #F8E5EC;  /* lessons */

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(31, 34, 48, .05), 0 8px 24px rgba(31, 34, 48, .06);
  --shadow-sm: 0 1px 2px rgba(31, 34, 48, .06);
  --maxw: 1160px;
  --header-h: 64px;

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 14px); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-color: color-mix(in srgb, var(--accent) 35%, transparent); text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--ink); }
p { margin: 0 0 1rem; }
code {
  font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: .88em;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: .12em .4em;
  border-radius: 6px;
}

.wrap { width: min(var(--maxw), 100% - 2.5rem); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 200;
  background: var(--accent); color: #fff; padding: 10px 16px;
  border-radius: 0 0 10px 10px; transition: top .15s ease; font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
}
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand__mark {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; font-family: var(--serif); font-weight: 600; font-size: .92rem;
  color: var(--accent-strong);
  background: linear-gradient(135deg, var(--c-genai-bg), var(--c-data-bg));
  border: 1px solid var(--line-strong);
}
.brand__text { letter-spacing: -.01em; }

.site-nav__list { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav__list a {
  display: inline-block; padding: .5rem .8rem; border-radius: 999px;
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.site-nav__list a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.site-nav__list a.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }

/* Scroll-reveal (only active when JS is on; disabled for reduced motion) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 420px at 12% -10%, #ECE6F6 0%, transparent 60%),
    radial-gradient(1000px 380px at 92% 0%, #E2EEF8 0%, transparent 55%),
    linear-gradient(180deg, #F1EFFA 0%, var(--bg) 78%);
  border-bottom: 1px solid var(--line);
}
.hero__inner { padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.4rem, 5vw, 4rem); }
.hero__eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .76rem;
  font-weight: 600; color: var(--accent-strong); margin: 0 0 .9rem;
}
.hero__name {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 4.4rem); margin: 0; letter-spacing: -.02em;
}
.hero__title { font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 600; color: var(--accent-strong); margin: .4rem 0 0; }
.hero__tagline { max-width: 60ch; color: var(--ink-2); font-size: 1.08rem; margin: 1rem 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.hero__stats {
  display: flex; flex-wrap: wrap; gap: 2.2rem; margin: 2.6rem 0 0;
  padding-top: 1.6rem; border-top: 1px solid var(--line-strong);
}
.hero__stats div { margin: 0; }
.hero__stats dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.hero__stats dd { margin: .15rem 0 0; font-family: var(--serif); font-size: 1.7rem; font-weight: 600; color: var(--ink); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); color: #fff; }
.btn--ghost { background: var(--surface); color: var(--accent-strong); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--alt { background: var(--bg-tint); }
.section--summary { padding-top: clamp(2.6rem, 5vw, 4rem); }
.section__title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -.01em;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin: 0 0 .4rem;
}
.section__title::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 4px;
  margin-top: .7rem;
  background: linear-gradient(90deg, var(--accent), #9aa6e0);
}
.section__intro { max-width: 70ch; color: var(--ink-2); margin: .9rem 0 2rem; }
.lede {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem); color: var(--ink-2); max-width: 88ch; margin-top: 1rem;
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .1em; font-size: .72rem;
  color: var(--accent-strong); margin: 0 0 .35rem; font-weight: 700;
}

/* About */
.about { display: grid; grid-template-columns: 1.7fr 1fr; gap: 2.4rem; align-items: start; }
.about__text p { color: var(--ink-2); max-width: 62ch; }
.about__aside {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow-sm);
}
.about__aside-title { margin: 0 0 .8rem; font-size: 1.05rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 1.7rem; color: var(--ink-2); font-size: .96rem; }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 1.2rem; height: 1.2rem; color: var(--c-ml-ink);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Skills
   -------------------------------------------------------------------------- */
.skills { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.3rem; }
.skill-group {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.25rem 1.35rem; box-shadow: var(--shadow-sm);
}
.skill-group__name { margin: 0 0 .85rem; font-size: 1rem; color: var(--accent-strong); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .85rem; font-weight: 500; color: var(--ink-2);
  background: var(--bg-tint); border: 1px solid var(--line);
  padding: .32rem .7rem; border-radius: 999px;
}

/* --------------------------------------------------------------------------
   Category overview cards
   -------------------------------------------------------------------------- */
.cats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem; margin-bottom: 2.4rem;
}
.cat-card {
  display: grid; gap: .35rem; padding: 1.15rem 1.2rem; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); border: 1px solid var(--line-strong);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: var(--ink); }
.cat-card__count { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.cat-card__name { font-weight: 700; font-size: .98rem; }
.cat-card__blurb { font-size: .85rem; color: var(--muted); }
.cat-card--data-platform { background: linear-gradient(160deg, var(--c-data-bg), var(--surface) 70%); }
.cat-card--genai { background: linear-gradient(160deg, var(--c-genai-bg), var(--surface) 70%); }
.cat-card--ml { background: linear-gradient(160deg, var(--c-ml-bg), var(--surface) 70%); }
.cat-card--finops { background: linear-gradient(160deg, var(--c-finops-bg), var(--surface) 70%); }
.cat-card--presales { background: linear-gradient(160deg, var(--c-presales-bg), var(--surface) 70%); }
.cat-card--independent { background: linear-gradient(160deg, var(--c-independent-bg), var(--surface) 70%); }

/* --------------------------------------------------------------------------
   Projects layout (TOC + main)
   -------------------------------------------------------------------------- */
.projects-layout { display: grid; grid-template-columns: 264px 1fr; gap: 2.2rem; align-items: start; }

.toc__inner {
  position: sticky; top: calc(var(--header-h) + 18px);
  max-height: calc(100vh - var(--header-h) - 40px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.1rem; box-shadow: var(--shadow-sm);
}
.toc__heading { text-transform: uppercase; letter-spacing: .1em; font-size: .72rem; font-weight: 700; color: var(--muted); margin: 0 0 .7rem; }
.toc__list, .toc__sublist { list-style: none; margin: 0; padding: 0; }
.toc__group { margin-bottom: .9rem; }
.toc__group-name { display: block; font-weight: 700; font-size: .82rem; color: var(--accent-strong); margin: 0 0 .35rem; }
.toc__sublist li { margin: 0; }
.toc__sublist a {
  display: flex; gap: .5rem; align-items: baseline; padding: .32rem .5rem;
  border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .86rem; line-height: 1.35;
}
.toc__sublist a:hover { background: var(--accent-soft); color: var(--accent-strong); }
.toc__sublist a.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 600; }
.toc__num { font-variant-numeric: tabular-nums; font-size: .72rem; color: var(--muted); font-weight: 600; min-width: 1.4em; }

/* Controls */
.projects-controls {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  margin-bottom: 1.6rem;
}
.filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.filter {
  font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  padding: .42rem .85rem; border-radius: 999px; border: 1.5px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2);
}
.filter:hover { border-color: var(--accent); color: var(--accent-strong); }
.filter.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.search { flex: 1 1 220px; max-width: 340px; }
.search input {
  width: 100%; font: inherit; font-size: .95rem; padding: .55rem .9rem;
  border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.projects-empty { text-align: center; color: var(--muted); padding: 2rem; font-style: italic; }

.project-group { margin-bottom: 1rem; scroll-margin-top: calc(var(--header-h) + 14px); }
.project-group__head { margin: 2.2rem 0 1.2rem; }
.project-group__title { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; margin: 0; }
.project-group__blurb { color: var(--muted); margin: .2rem 0 0; font-size: .95rem; }
.project-group:first-child .project-group__head { margin-top: 0; }

/* --------------------------------------------------------------------------
   Project card
   -------------------------------------------------------------------------- */
.project {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.6rem clamp(1.2rem, 3vw, 2rem);
  box-shadow: var(--shadow); margin-bottom: 1.6rem; scroll-margin-top: calc(var(--header-h) + 14px);
}
.project__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .7rem; }
.tag {
  font-size: .74rem; font-weight: 700; letter-spacing: .02em;
  padding: .28rem .65rem; border-radius: 999px; white-space: nowrap;
}
.tag--sector { background: var(--accent-soft); color: var(--accent-strong); }
.tag--employer { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag--cat.tag--data-platform { background: var(--c-data-bg); color: var(--c-data-ink); }
.tag--cat.tag--genai { background: var(--c-genai-bg); color: var(--c-genai-ink); }
.tag--cat.tag--ml { background: var(--c-ml-bg); color: var(--c-ml-ink); }
.tag--cat.tag--finops { background: var(--c-finops-bg); color: var(--c-finops-ink); }
.tag--cat.tag--presales { background: var(--c-presales-bg); color: var(--c-presales-ink); }
.tag--cat.tag--independent { background: var(--c-independent-bg); color: var(--c-independent-ink); }

.project__title {
  font-family: var(--serif); font-weight: 600; font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  margin: 0 0 .35rem; display: flex; gap: .6rem; align-items: baseline;
}
.project__num {
  font-size: .85rem; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border-radius: 7px; padding: .12em .5em;
  font-family: var(--sans); align-self: center;
}
.project__role { color: var(--muted); font-size: .9rem; margin: 0; }
.project__role-label { font-weight: 600; color: var(--ink-2); }
.project__repo { margin: .35rem 0 0; font-size: .9rem; }
.project__repo a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.project__repo a:hover, .project__repo a:focus-visible { text-decoration: underline; }

.project__summary {
  margin: 1.1rem 0; padding: 1rem 1.2rem;
  background: linear-gradient(120deg, var(--accent-soft), var(--surface-2));
  border-left: 4px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.project__summary p { margin: 0; color: var(--ink); }

.project__tech { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0 0; }
.project__tech li {
  font-size: .76rem; font-weight: 500; color: var(--ink-2);
  background: var(--bg-tint); border: 1px solid var(--line); padding: .24rem .6rem; border-radius: 6px;
}
.project__cta { margin-top: 1.2rem; }

/* STARL */
.project__details { margin-top: 1.2rem; }
.project__details-toggle {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--accent-strong); padding: .4rem .7rem; border-radius: 8px; background: var(--accent-soft);
}
.project__details-toggle::-webkit-details-marker { display: none; }
.project__details-toggle::before { content: "▸"; font-size: .8rem; transition: transform .15s ease; }
.project__details[open] .project__details-toggle::before { transform: rotate(90deg); }
.project__details-toggle:hover { color: var(--accent); }

.starl { margin-top: 1.1rem; display: grid; gap: .7rem; }
.starl__row {
  display: grid; grid-template-columns: 150px 1fr; gap: 1rem;
  border-radius: var(--radius-sm); padding: .85rem 1rem; align-items: start;
  border: 1px solid var(--line);
}
.starl__row--s { background: color-mix(in srgb, var(--s-s) 45%, var(--surface)); }
.starl__row--t { background: color-mix(in srgb, var(--s-t) 45%, var(--surface)); }
.starl__row--a { background: color-mix(in srgb, var(--s-a) 45%, var(--surface)); }
.starl__row--r { background: color-mix(in srgb, var(--s-r) 45%, var(--surface)); }
.starl__row--l { background: color-mix(in srgb, var(--s-l) 45%, var(--surface)); }
.starl__label {
  display: flex; align-items: center; gap: .55rem; font-weight: 700;
  font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ink);
}
.starl__letter {
  display: grid; place-items: center; width: 1.7rem; height: 1.7rem; flex: none;
  border-radius: 7px; font-family: var(--serif); font-size: .9rem; color: #fff; background: var(--accent);
}
.starl__row--s .starl__letter { background: var(--c-data-ink); }
.starl__row--t .starl__letter { background: var(--c-genai-ink); }
.starl__row--a .starl__letter { background: var(--c-ml-ink); }
.starl__row--r .starl__letter { background: var(--c-finops-ink); }
.starl__row--l .starl__letter { background: var(--c-presales-ink); }
.starl__body { color: var(--ink-2); }
.starl__body p { margin: 0; }
.starl__list { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; }
.starl__list li { color: var(--ink-2); }

/* Diagram placeholder */
.diagram { margin: 1.4rem 0 .4rem; }
.diagram__svg-wrap {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.1rem .9rem;
  overflow-x: auto;
}
.diagram__svg { display: block; width: 100%; height: auto; min-width: 540px; }
.diagram__cap-note { color: var(--muted); font-weight: 400; }
.diagram__placeholder {
  display: grid; place-items: center; gap: .25rem; text-align: center;
  padding: 2.2rem 1rem; border: 2px dashed var(--line-strong); border-radius: var(--radius);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in srgb, var(--accent-soft) 40%, transparent) 14px 15px),
    var(--surface-2);
  color: var(--muted);
}
.diagram__icon { color: var(--accent); opacity: .8; }
.diagram__title { font-weight: 600; color: var(--ink-2); margin: .3rem 0 0; }
.diagram__hint { font-size: .82rem; margin: 0; }
.diagram figcaption { margin-top: .55rem; font-size: .82rem; color: var(--muted); text-align: center; }
.diagram img { border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }

.project__top { display: inline-block; margin-top: 1rem; font-size: .82rem; font-weight: 600; text-decoration: none; }

/* --------------------------------------------------------------------------
   Project detail page (projects/<slug>/)
   -------------------------------------------------------------------------- */
.project-detail { padding: clamp(2.2rem, 5vw, 3.5rem) 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin: 0 0 1.2rem; }
.breadcrumb a { color: var(--accent-strong); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover, .breadcrumb a:focus-visible { text-decoration: underline; }

.project-pager {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line);
}
.project-pager__link {
  flex: 1 1 auto; max-width: 48%; font-weight: 600; font-size: .9rem;
  color: var(--accent-strong); text-decoration: none;
}
.project-pager__link:hover, .project-pager__link:focus-visible { text-decoration: underline; }
.project-pager__link--next { text-align: right; margin-left: auto; }

/* --------------------------------------------------------------------------
   Placeholders (certs / writing)
   -------------------------------------------------------------------------- */
.placeholder {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface-2); padding: 1.4rem 1.5rem; color: var(--ink-2); margin-bottom: 1.4rem;
}
.placeholder--sm { padding: 1rem 1.2rem; }
.placeholder__title { font-weight: 700; color: var(--ink); margin: 0 0 .3rem; }
.placeholder p:last-child { margin-bottom: 0; }

.cert-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.cert-card {
  display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow-sm);
}
.cert-card__badge {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: none;
  border-radius: 8px; background: var(--c-ml-bg); color: var(--c-ml-ink); font-weight: 700;
}
.cert-card__name { margin: 0 0 .2rem; font-size: 1.02rem; }
.cert-card__meta { margin: 0; font-size: .85rem; color: var(--muted); }

/* Writing */
.writing { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; }
.writing__col-title { font-size: 1.1rem; margin: 0 0 .9rem; color: var(--accent-strong); }
.media-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.media-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1rem 1.15rem; box-shadow: var(--shadow-sm); }
.media-item__link { font-weight: 600; }
.media-item__meta { font-size: .82rem; color: var(--muted); margin: .2rem 0; }
.media-item__desc { font-size: .9rem; color: var(--ink-2); margin: 0; }

/* --------------------------------------------------------------------------
   Contact / footer
   -------------------------------------------------------------------------- */
.section--contact { background: linear-gradient(180deg, var(--bg-tint), #EBE9F6); }
.contact { text-align: center; }
.contact .section__title::after { margin-inline: auto; }
.contact .section__intro { margin-inline: auto; }
.contact__links { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }

.site-footer { background: #20243a; color: #d8dbe9; padding: 1.6rem 0; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; font-size: .9rem; }
.site-footer__top { color: #c7cbe6; font-weight: 600; text-decoration: none; font-size: .9rem; }
.site-footer__top:hover { color: #fff; }

/* Back-to-top FAB */
.to-top {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 1.2rem; line-height: 1;
  box-shadow: var(--shadow); transition: transform .15s ease, background .15s ease, opacity .2s ease;
}
.to-top:hover { background: var(--accent-strong); transform: translateY(-2px); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .projects-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .about { grid-template-columns: 1fr; }
  .writing { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-grid; place-items: center; width: 42px; height: 42px;
    background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 10px; cursor: pointer;
  }
  .nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
    content: ""; display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative;
  }
  .nav-toggle__bar::before { position: absolute; top: -6px; }
  .nav-toggle__bar::after { position: absolute; top: 6px; }
  .site-nav__list {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0; background: var(--surface);
    border-bottom: 1px solid var(--line); padding: .5rem; box-shadow: var(--shadow);
    display: none;
  }
  .site-nav__list.is-open { display: flex; }
  .site-nav__list a { display: block; padding: .7rem .8rem; border-radius: 8px; }

  .starl__row { grid-template-columns: 1fr; gap: .5rem; }
  .starl__label { font-size: .78rem; }
  .hero__stats { gap: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Motion / print
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

@media print {
  .site-header, .to-top, .projects-controls, .toc, .cats, .hero__actions,
  .contact__links, .nav-toggle, .project__top, .site-footer__top { display: none !important; }
  body { background: #fff; color: #000; }
  .project, .skill-group, .cat-card, .about__aside { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .project__details[open] .starl { display: grid; }
  a { color: #000; text-decoration: underline; }
  .section--alt, .section--contact, .hero { background: #fff !important; }
}
