/* =============================================================
   L. Alex Bean — labean.org  (v3 — off-white + navy, all-Inter)
   Personal résumé. Two-column with sticky sidebar on desktop.
   Off-white surfaces, deep-navy accent, all-sans typography.
   Distinct from 321enterprise.com (dark studio look).
   ============================================================= */

/* -------- 1. Design tokens ---------------------------------- */
:root {
  /* Surfaces — warm paper with depth */
  --bg:           #e9e2cf;     /* page background — deeper warm beige */
  --bg-soft:      #ddd3ba;     /* alt section / sidebar tint */
  --bg-card:      #fbf9f3;     /* card / lifted surface — slightly warm white */
  --edge:         #cec5ac;     /* hairline rules */
  --edge-strong:  #b8ad8e;     /* stronger hairline */

  /* Ink — neutral grays */
  --ink:          #1a1a1a;     /* primary text / display */
  --ink-soft:     #34373c;
  --ink-muted:    #6b6f76;
  --ink-faint:    #9aa0a8;

  /* Accent — deep navy ("classic, polished, restrained") */
  --accent:       #1f3a52;
  --accent-hi:    #2a4d6a;     /* hover lift */
  --accent-soft:  #e6ecf2;     /* tinted accent surface */
  --accent-ink:   #ffffff;

  --focus:        #2b6cff;

  /* Footer — dark warm espresso, distinct from header */
  --footer-bg:     #2a241a;     /* deep warm brown */
  --footer-ink:    #f3ebd6;     /* warm cream (primary footer text) */
  --footer-muted:  #b8ad8e;     /* dimmed footer text */
  --footer-edge:   #3d3528;     /* hairline inside dark footer */

  /* Type — single family, weights for hierarchy */
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Type scale */
  --fs-xs:   0.75rem;     /* 12px — eyebrows, meta */
  --fs-sm:   0.875rem;    /* 14px — UI labels, sidebar list items */
  --fs-md:   0.9375rem;   /* 15px — body */
  --fs-lg:   1.0625rem;   /* 17px — lead */
  --fs-xl:   clamp(1.25rem,  1.05rem + 0.8vw, 1.5rem);
  --fs-2xl:  clamp(1.5rem,   1.2rem  + 1.2vw, 2rem);
  --fs-3xl:  clamp(1.875rem, 1.55rem + 1.6vw, 2.5rem);
  --fs-4xl:  clamp(2.5rem,   2rem    + 2.4vw, 3.75rem);

  /* Spacing */
  --s-1:  0.25rem;
  --s-2:  0.5rem;
  --s-3:  0.75rem;
  --s-4:  1rem;
  --s-5:  1.25rem;
  --s-6:  1.5rem;
  --s-7:  1.75rem;
  --s-8:  2rem;
  --s-10: 2.5rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-20: 5rem;

  /* Layout */
  --maxw:        1200px;
  --sidebar-w:   320px;
  --gutter:      var(--s-12);
  --radius-sm:   4px;
  --radius:      6px;
  --radius-lg:   12px;

  /* Motion */
  --t-fast: 120ms ease;
  --t:      200ms ease;
}

/* -------- 2. Reset & base ----------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-feature-settings: "kern", "ss01";
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-soft);
  background-color: var(--bg);
  /* Subtle edge vignette — darker at corners, lighter at top-center, ties to accent navy.
     Fixed so it stays in place as the user scrolls — feels like a printed page on a desk. */
  background-image:
    radial-gradient(ellipse 90% 60% at 50% 0%,    rgba(255, 252, 240, 0.7) 0%, transparent 70%),
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(31, 58, 82, 0.10)   0%, transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-decoration-color: var(--edge-strong);
  text-underline-offset: 3px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

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

/* Headings — light weights at large sizes for elegance,
   medium/semibold at smaller sizes for confidence */
h1, h2, h3, h4 {
  margin: 0 0 var(--s-4);
  line-height: 1.15;
  letter-spacing: -0.018em;
  color: var(--ink);
  font-family: var(--font-sans);
}
h1 { font-size: var(--fs-4xl); font-weight: 300; letter-spacing: -0.028em; }
h2 { font-size: var(--fs-3xl); font-weight: 400; letter-spacing: -0.022em; }
h3 { font-size: var(--fs-xl);  font-weight: 600; letter-spacing: -0.012em; }
h4 { font-size: var(--fs-lg);  font-weight: 600; }

/* "Italic shift" — used inline on key words for accent/personality */
.h-it { font-style: italic; font-weight: 300; color: var(--ink-muted); }

p  { margin: 0 0 var(--s-4); color: var(--ink-soft); }
ul, ol { margin: 0 0 var(--s-4); padding-left: 1.1rem; color: var(--ink-soft); }
li + li { margin-top: var(--s-1); }
hr { border: 0; border-top: 1px solid var(--edge); margin: var(--s-12) 0; }

::selection { background: var(--accent); color: var(--accent-ink); }

/* -------- 3. Layout primitives ------------------------------ */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s-5);
}
@media (min-width: 768px) { .container { padding-inline: var(--s-8); } }

/* Eyebrow: small caps, letterspaced, accent — labels each section. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--bg);
  z-index: 1000;
}
.skip-link:focus { left: var(--s-4); top: var(--s-4); }

/* -------- 4. Page header ------------------------------------- */
.page-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
          backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--edge);
}
.page-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: var(--s-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.brand__mark {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.brand:hover { color: var(--ink); }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle svg { width: 20px; height: 20px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav {
  position: fixed;
  inset: 60px 0 auto 0;
  background: var(--bg);
  border-bottom: 1px solid var(--edge);
  padding: var(--s-4) var(--s-5) var(--s-6);
  display: none;
}
.nav[data-open="true"] { display: block; }
.nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: var(--s-1);
}
.nav a {
  display: block;
  padding: var(--s-3) var(--s-2);
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav a:hover { color: var(--accent); background: var(--accent-soft); }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    display: block;
    background: transparent;
    border: 0;
    padding: 0;
  }
  .nav ul { flex-direction: row; align-items: baseline; gap: var(--s-2); }
  .nav a {
    padding: var(--s-2) var(--s-3);
    font-size: var(--fs-sm);
    font-weight: 500;
    letter-spacing: 0.01em;
    line-height: 1.4;                   /* explicit, prevents font-metric drift between items */
  }
}

/* -------- 5. CV layout — two-column on desktop -------------- */
.cv {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-10);
  padding-block: var(--s-10) var(--s-16);
}
@media (min-width: 960px) {
  .cv {
    grid-template-columns: var(--sidebar-w) 1fr;
    gap: var(--gutter);
    padding-block: var(--s-16) var(--s-20);
    align-items: start;
  }
}

/* ----- Sidebar ----- */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
  font-family: var(--font-sans);
}
@media (min-width: 960px) {
  .sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    /* IMPORTANT: no max-height + overflow-y here. That was causing the
       portrait to collapse on shorter viewports. Sticky still works —
       when content is taller than the viewport the sidebar simply stops
       sticking and scrolls with the page. That's expected, not a bug. */
  }
}
.sidebar > * { flex-shrink: 0; }            /* belt + suspenders */

/* Portrait — bigger, rectangular, prominent */
.sb-portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-width: 320px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--edge);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.02),
    0 12px 28px -16px rgba(31, 58, 82, 0.15);
}
.sb-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }

.sb-name {
  font-family: var(--font-sans);
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: var(--s-2) 0 var(--s-2);
}
.sb-name .h-it { font-weight: 300; color: var(--ink-muted); }
.sb-role {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  margin: 0;
  font-weight: 400;
}

.sb-status {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
}
.sb-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #1f8a4c;
  box-shadow: 0 0 0 4px rgba(31, 138, 76, 0.15);
}

.sb-block + .sb-block { padding-top: var(--s-6); border-top: 1px solid var(--edge); }
.sb-block h3 {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 var(--s-3);
}

.sb-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.sb-list li {
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.45;
}
.sb-list a { text-decoration: none; }

.sb-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.sb-pill {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: 999px;
  letter-spacing: 0.01em;
}

.sb-edu li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-2);
  align-items: baseline;
  padding-block: var(--s-1);
}
.sb-edu strong { font-weight: 600; color: var(--ink); }
.sb-edu .yr {
  font-feature-settings: "tnum";
  color: var(--ink-faint);
  font-size: var(--fs-xs);
}
.sb-edu .school { font-size: var(--fs-sm); }
.sb-edu .where { font-size: var(--fs-xs); color: var(--ink-muted); display: block; }

.sb-social {
  list-style: none;
  margin: var(--s-3) 0 0; padding: 0;
  display: flex;
  gap: var(--s-2);
}
.sb-social a {
  display: inline-grid;
  place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--edge-strong);
  color: var(--ink-soft);
  text-decoration: none;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.sb-social a:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sb-social svg { width: 16px; height: 16px; }
/* The filled LinkedIn SVG's path content sits in the top of its 24x24 viewBox
   (content runs Y 1–22, no top padding) so the icon visually reads slightly
   higher than the others. Nudge its <li> down by var(--s-1) (4px) — the
   shift is on the list-item, not the SVG, so the link's 36x36 circle
   border keeps its place in the flex row. */
.sb-social li:has(a[aria-label="LinkedIn"]) { margin-top: var(--s-1); }

/* Sidebar download (résumé PDF) */
.sb-download {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.55rem 0.9rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg-card);
  border: 1px solid var(--edge-strong);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast);
}
.sb-download:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.sb-download svg { width: 14px; height: 14px; }

/* ----- Main column ----- */
.main { min-width: 0; }                       /* prevent grid overflow */

.section {
  scroll-margin-top: 80px;
  padding-block: 0 var(--s-12);
}
.section + .section { padding-top: var(--s-12); border-top: 1px solid var(--edge); }

.section__title {
  font-family: var(--font-sans);
  font-size: var(--fs-3xl);
  font-weight: 400;
  margin-bottom: var(--s-3);
  letter-spacing: -0.022em;
}
.section__lede {
  font-size: var(--fs-lg);
  color: var(--ink-muted);
  max-width: 60ch;
  margin-bottom: var(--s-8);
  line-height: 1.55;
  font-weight: 400;
}

/* -------- 6. Hero / Statement -------------------------------- */
.statement {
  padding-bottom: var(--s-12);
}
.statement h1 {
  font-size: var(--fs-4xl);
  font-weight: 300;
  letter-spacing: -0.028em;
  line-height: 1.05;
  margin-bottom: var(--s-5);
  max-width: 18ch;
}
.statement h1 .h-it { color: var(--ink-muted); font-weight: 300; }
.statement__lede {
  font-size: var(--fs-lg);
  line-height: 1.55;
  max-width: 60ch;
  color: var(--ink-soft);
}
.statement__lede em { font-style: italic; color: var(--ink); font-weight: 500; }

.statement__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-7);
}

/* "Currently" — a personal touch unique to labean.org */
.currently {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-3) var(--s-5);
  padding: var(--s-5) var(--s-6);
  margin-top: var(--s-10);
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.currently dt {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  align-self: baseline;
  padding-top: 4px;
}
.currently dd {
  margin: 0;
  font-size: var(--fs-md);
  color: var(--ink-soft);
}

/* -------- 7. Buttons ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0.65rem 1.05rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-sm);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  letter-spacing: 0.01em;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--edge-strong);
}
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn svg { width: 14px; height: 14px; }

/* -------- 8. Experience timeline ---------------------------- */
.timeline { display: flex; flex-direction: column; }
.role {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-2);
  padding: var(--s-7) 0;
  border-top: 1px dashed var(--edge-strong);
}
.role:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 600px) {
  .role { grid-template-columns: 130px 1fr; gap: var(--s-6); }
}
.role__date {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-feature-settings: "tnum";
  padding-top: 4px;
}
.role__date small {
  display: block;
  font-weight: 500;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
  text-transform: none;
  margin-top: 2px;
}
.role__title {
  font-family: var(--font-sans);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  margin: 0 0 var(--s-1);
  color: var(--ink);
}
.role__company {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}
.role__company a {
  text-decoration: none;
  border-bottom: 1px dotted var(--edge-strong);
  color: var(--ink-soft);
}
.role__company a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.role ul {
  margin-top: var(--s-3);
  padding-left: 0;
  list-style: none;
}
.role li {
  padding-left: 1.2rem;
  position: relative;
  font-size: var(--fs-md);
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: var(--s-2);
}
.role li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.role__contracts {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--s-3);
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
}
.role__contracts strong { color: var(--ink); font-weight: 600; }

/* -------- 8.25. Hired-by strip ------------------------------ */
/* A static credential row that sits between the Experience lede and the
   timeline. Layout: 6-column grid → row 1 has 3 logos spanning cols 1-2,
   3-4, 5-6; row 2 has 2 logos centered in cols 2-3 and 4-5. Same on every
   viewport (no responsive reflow). SVG logos inherit color via
   currentColor; PNG logos (Movable Ink, Disney, flexEngage) use a
   brightness filter to flatten to monochrome at the same default opacity
   as the SVG treatment. */
.hired-by {
  margin: 0 0 var(--s-10);
  padding: var(--s-6) 0;
  border-top: 1px dashed var(--edge-strong);
  border-bottom: 1px dashed var(--edge-strong);
}
.hired-by__label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 var(--s-5);
  text-align: center;
}
.hired-by__list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--s-6) var(--s-4);
  justify-items: center;
  align-items: center;
  max-width: 720px;
}
/* Row 1 — three logos, each in a 2-column slot */
.hired-by__list > li:nth-child(1) { grid-column: 1 / span 2; grid-row: 1; }
.hired-by__list > li:nth-child(2) { grid-column: 3 / span 2; grid-row: 1; }
.hired-by__list > li:nth-child(3) { grid-column: 5 / span 2; grid-row: 1; }
/* Row 2 — two logos, each in a 2-column slot, centered (cols 2-3 and 4-5) */
.hired-by__list > li:nth-child(4) { grid-column: 2 / span 2; grid-row: 2; }
.hired-by__list > li:nth-child(5) { grid-column: 4 / span 2; grid-row: 2; }
.hired-by__list > li {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  min-width: 0;
}
/* Container stays a uniform tall slot so year captions all line up at
   the same vertical baseline regardless of per-logo size. The inner
   logo (svg or img) scales to fit --logo-h, with width following the
   aspect ratio. To resize a specific logo, change its --logo-h in the
   per-logo overrides block below — no need to touch container height. */
.hired-by__logo {
  --logo-h: 40px;     /* default; per-logo overrides below */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 110px;      /* matches the tallest logo on the page (Disney) */
  color: var(--ink-soft);
  opacity: 0.55;
  transition: opacity var(--t-fast), color var(--t-fast);
}
.hired-by__logo svg,
.hired-by__logo img {
  max-height: var(--logo-h);
  max-width: 100%;
  width: auto;
  height: auto;
  fill: currentColor;
}
.hired-by__logo--png img {
  object-fit: contain;
  filter: brightness(0);
}

/* ----- Per-logo size overrides ----------------------------------
   Tweak --logo-h on any line to resize that specific logo. The
   container box stays 110px tall for all of them so year captions
   stay aligned across the row. nth-child maps to display order:
   row 1 = (1) Movable Ink, (2) Disney, (3) flexEngage;
   row 2 = (4) Bonnier, (5) StackPath. */
.hired-by__list > li:nth-child(1) .hired-by__logo { --logo-h: 28px;  }  /* Movable Ink */
.hired-by__list > li:nth-child(2) .hired-by__logo { --logo-h: 110px; }  /* Disney */
.hired-by__list > li:nth-child(3) .hired-by__logo { --logo-h: 80px;  }  /* flexEngage */
.hired-by__list > li:nth-child(4) .hired-by__logo { --logo-h: 28px;  }  /* Bonnier */
.hired-by__list > li:nth-child(5) .hired-by__logo { --logo-h: 80px;  }  /* StackPath */
.hired-by__list > li:hover .hired-by__logo,
.hired-by__list > li:focus-within .hired-by__logo {
  opacity: 1;
  color: var(--ink);
}
.hired-by__years {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* -------- 8.5. Projects ------------------------------------- */
.projects {
  display: grid;
  gap: var(--s-4);
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .projects { grid-template-columns: 1fr 1fr; } }

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.project:hover { border-color: var(--accent); transform: translateY(-2px); }

.project__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}
.project__name {
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
}
.project__tag {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.project__desc {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-soft);
  line-height: 1.55;
}
.project__meta {
  margin-top: auto;
  padding-top: var(--s-3);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.project--cta {
  border-style: dashed;
  background: var(--accent-soft);
}
.project__cta-link {
  margin-top: auto;
  padding-top: var(--s-3);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.project__cta-link svg {
  width: 1em;
  height: 1em;
  transition: transform var(--t-fast);
}
.project__cta-link:hover svg { transform: translateX(3px); }

/* -------- 9. Examples -------------------------------------- */
.example-block { padding-bottom: var(--s-10); }
.example-block:last-child { padding-bottom: 0; }
.example-block + .example-block { padding-top: var(--s-10); border-top: 1px dashed var(--edge-strong); }
.example-block__title {
  font-family: var(--font-sans);
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: var(--s-2);
  letter-spacing: -0.018em;
  color: var(--ink);
}
.example-block__lede {
  color: var(--ink-muted);
  margin-bottom: var(--s-6);
  max-width: 60ch;
}

.thumb-grid {
  display: grid;
  gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 600px) { .thumb-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .thumb-grid { grid-template-columns: repeat(5, 1fr); } }
.thumb-grid--logos { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) { .thumb-grid--logos { grid-template-columns: repeat(3, 1fr); } }

/* Masonry layout for the Branding & Print block — each thumb keeps its natural aspect ratio */
.thumb-grid--branding {
  display: block;
  column-count: 2;
  column-gap: var(--s-3);
}
@media (min-width: 700px) { .thumb-grid--branding { column-count: 3; } }
.thumb-grid--branding > .thumb {
  aspect-ratio: auto;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 var(--s-3) 0;
  break-inside: avoid;
}
.thumb-grid--branding > .thumb img {
  width: 100%;
  height: auto;
  object-fit: initial;
  display: block;
}

.thumb {
  /* button reset (since we use <button class="thumb">) */
  font: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
  text-align: left;
  /* layout */
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border: 1px solid var(--edge);
  background: var(--bg-soft);
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: zoom-in;
  position: relative;
  transition: border-color var(--t-fast), transform var(--t-fast);
}
.thumb:hover { border-color: var(--accent); transform: translateY(-2px); }
.thumb:hover .thumb__zoom { opacity: 1; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb--logo { aspect-ratio: 4 / 3; padding: var(--s-5); display: grid; place-items: center; background: var(--bg-card); }
.thumb--logo img { object-fit: contain; }
.thumb--print { aspect-ratio: 4 / 5; }

/* Zoom indicator on hover */
.thumb__zoom {
  position: absolute;
  top: var(--s-2); right: var(--s-2);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  background: rgba(26, 26, 26, 0.78);
  color: white;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--t-fast);
  pointer-events: none;
}
.thumb__zoom svg { width: 14px; height: 14px; }

.site-list {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  margin: 0; padding: 0;
  list-style: none;
  border-top: 1px solid var(--edge);
}
.site-list li { border-bottom: 1px solid var(--edge); }
.site-list a {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--fs-md);
  transition: color var(--t-fast), padding-left var(--t-fast);
}
.site-list a:hover { color: var(--accent); padding-left: var(--s-3); }
.site-list a::after {
  content: "→";
  color: var(--ink-faint);
  font-weight: 400;
  margin-left: auto;
  transition: color var(--t-fast), transform var(--t-fast);
}
.site-list a:hover::after { color: var(--accent); transform: translateX(4px); }
.site-list__fav {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--bg-card);
  border: 1px solid var(--edge);
  padding: 1px;
  object-fit: contain;
}
.site-list__note {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--bg-soft);
  border-radius: 999px;
}
.site-list__cta {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: flex-start;
  margin: var(--s-6) 0 0;
  padding-top: var(--s-5);
  border-top: 1px dashed var(--edge-strong);
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  line-height: 1.55;
}
@media (min-width: 600px) {
  .site-list__cta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-5);
  }
}

/* -------- 10. Contact ---------------------------------------- */
.contact {
  display: grid;
  gap: var(--s-5);
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) { .contact { grid-template-columns: 1fr auto; gap: var(--s-8); } }
.contact h2 { margin: 0 0 var(--s-2); }
.contact p { margin: 0; max-width: 50ch; }
.contact .btn-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
}

/* -------- 11. Footer ---------------------------------------- */
.page-footer {
  border-top: 1px solid var(--footer-bg);
  padding-block: var(--s-10);
  font-size: var(--fs-sm);
  background: var(--footer-bg);
  color: var(--footer-ink);
  color: var(--ink-muted);
}
.page-footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-5);
}
.page-footer__row {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  align-items: center;       /* center the stacked lines on mobile */
  justify-content: space-between;
  text-align: center;
}
@media (min-width: 700px) {
  .page-footer__row { flex-direction: row; align-items: center; text-align: left; }
}
.page-footer p { margin: 0; color: var(--footer-ink); }
.page-footer em {
  font-style: italic;
  color: var(--footer-ink);
  font-weight: 500;
}
.page-footer__logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  line-height: 1.2;
  color: var(--footer-ink);  /* SVG inherits via currentColor */
  text-decoration: none;
  transition: color 160ms ease;
  margin-top: var(--s-2);
}
.page-footer__logo:hover,
.page-footer__logo:focus-visible {
  color: #1d65a7;            /* studio blue accent on hover */
}
.page-footer__logo svg {
  display: block;
  height: 30px;
  width: auto;
  fill: currentColor;
  flex-shrink: 0;
}
.page-footer__caption {
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--footer-muted);
  text-align: center;
  transition: color 160ms ease;
}
.page-footer__logo:hover .page-footer__caption,
.page-footer__logo:focus-visible .page-footer__caption {
  color: #1d65a7;            /* match SVG so the whole link lights up together */
}

/* -------- 12. Lightbox -------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 18, 22, 0.92);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
  padding: var(--s-5);
  overscroll-behavior: contain;
}
.lightbox[data-open="true"] { display: flex; }
.lightbox__inner {
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}
.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  width: auto; height: auto;
  border-radius: var(--radius);
  background: #1a1a1a;
  box-shadow: 0 30px 60px -10px rgba(0,0,0,0.5);
  user-select: none;
}
.lightbox__caption {
  margin: 0;
  color: rgba(255,255,255,0.78);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  text-align: center;
  max-width: 60ch;
}
.lightbox__counter {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.6);
  margin-top: var(--s-1);
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.lightbox__btn:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4); }
.lightbox__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: var(--s-5); right: var(--s-5); }
.lightbox__prev,
.lightbox__next {
  top: 50%;
  transform: translateY(-50%);
}
.lightbox__prev { left: var(--s-5); }
.lightbox__next { right: var(--s-5); }
.lightbox__prev[hidden],
.lightbox__next[hidden] { display: none; }

@media (max-width: 600px) {
  .lightbox__btn { width: 40px; height: 40px; }
  .lightbox__close { top: var(--s-3); right: var(--s-3); }
  .lightbox__prev  { left: var(--s-3); }
  .lightbox__next  { right: var(--s-3); }
}

/* Lock body scroll when lightbox open */
body.is-lightbox-open { overflow: hidden; }

/* -------- 13. Utilities ------------------------------------- */
.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;
}

.tnum { font-feature-settings: "tnum", "lnum"; font-variant-numeric: tabular-nums; }

/* -------- 14. Print ----------------------------------------- */
@media print {
  body { background: #fff; }
  .page-header, .page-footer, .nav-toggle, .statement__cta,
  .contact .btn-row, .lightbox, .sb-download, .thumb__zoom { display: none; }
  .cv { grid-template-columns: var(--sidebar-w) 1fr; gap: var(--s-8); padding: 0; }
  .sidebar { position: static; }
  a { color: var(--ink); text-decoration: none; }
  .currently { background: transparent; border-left-color: var(--ink); }
}


/* =============================================================
   12. DARK MODE — token override + theme toggle   (added 2026-05-31)
   Pure token swap: no light-mode component rules were changed.
   To retune the palette, edit only the values in this block.
   ============================================================= */

:root               { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

[data-theme="dark"] {
  /* Surfaces — warm espresso, not flat black */
  --bg:           #16130d;
  --bg-soft:      #1e1a12;
  --bg-card:      #241f16;
  --edge:         #38301f;
  --edge-strong:  #4a3f29;

  /* Ink — warm cream scale (mirrors footer ink) */
  --ink:          #f3ebd6;
  --ink-soft:     #ddd3ba;
  --ink-muted:    #b3a988;
  --ink-faint:    #877d63;

  /* Accent — studio blue, lifted so it reads on dark */
  --accent:       #7fb1dc;
  --accent-hi:    #9cc6ea;
  --accent-soft:  #1f2d3a;
  --accent-ink:   #11202c;     /* dark ink ON the light-blue accent (buttons) */

  --focus:        #6ea8ff;

  /* Footer — a touch darker so it still separates from the page */
  --footer-bg:    #100d08;
  --footer-ink:   #f3ebd6;
  --footer-muted: #b3a988;
  --footer-edge:  #2a2418;
}

/* Soft top glow. The light-mode body gradient is tuned for warm paper and
   reads as a headlight over espresso, so dark mode gets its own: a low-intensity
   cream lift at the top + the existing faint navy wash at the bottom.
   To dial intensity, change the 0.05 alpha; to remove, drop the first radial. */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%,    rgba(243, 235, 214, 0.05) 0%, transparent 60%),
    radial-gradient(ellipse 70% 100% at 50% 100%, rgba(31, 58, 82, 0.10)    0%, transparent 60%);
}

/* Brand logos: colored PNGs (Disney/Movable Ink/flexEngage) and inline-SVG
   marks (Bonnier/StackPath) both need a cream chip to stay legible on espresso.
   Chip is identical at rest and hover; the container drives the opacity
   dim->brighten, so all five logos behave the same. */
[data-theme="dark"] .hired-by__logo {
  background: #f3ebd6;        /* <- cream chip color */
  border-radius: 6px;
  padding: 4px 8px;
}
/* Inline-SVG logos fill with currentColor — pin them to dark ink at rest AND
   hover, or the base hover rule (li:hover .hired-by__logo) turns them
   cream-on-cream and they vanish. */
[data-theme="dark"] .hired-by__logo:not(.hired-by__logo--png),
[data-theme="dark"] .hired-by__list > li:hover .hired-by__logo:not(.hired-by__logo--png),
[data-theme="dark"] .hired-by__list > li:focus-within .hired-by__logo:not(.hired-by__logo--png) {
  color: #16130d;            /* <- chip ink for inline-SVG logos */
}

/* -------- Theme toggle button (in nav, to the right of "Contact") -------- */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;               /* <- size: edit here */
  height: 38px;
  padding: 0;
  border: 1px solid var(--edge-strong);
  border-radius: 50%;        /* <- 50% = circle; 8px = squircle */
  background: var(--bg-card);
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}
.theme-toggle:hover         { color: var(--accent); border-color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.theme-toggle svg           { width: 19px; height: 19px; }

/* moon shows in light ("go dark"); sun shows in dark ("go light") */
.theme-toggle__sun { display: none; }
[data-theme="dark"] .theme-toggle__moon { display: none; }
[data-theme="dark"] .theme-toggle__sun  { display: inline-block; }

.nav__theme { display: flex; align-items: center; }
@media (min-width: 960px) {
  .nav ul     { align-items: center; }      /* center the circle with the link row */
  .nav__theme { margin-left: var(--s-2); }  /* <- gap from "Contact" */
}
@media (max-width: 959px) {
  .nav__theme { margin-top: var(--s-3); padding-left: var(--s-2); }  /* in opened mobile menu */
}
