:root {
    --bg-1: #1e1e21;
    --bg-2: #34343a;
    --ink: #f4f1ff;
    --muted: #b9b2d6;
    --cyan: #2bd4f0;
    --card-a: #f5ecd7;
    --card-b: #efe2c2;
    --card-c: #e8d6ae;
    --ink-dark: #1d1a33;
  }
  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  /* Keep anchor targets clear of the sticky header */
  #experience, #contact { scroll-margin-top: 84px; }
  html, body { margin: 0; background: var(--bg-1); color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

  .lang { margin-left: 20px; white-space: nowrap; }
  .lang a { color: var(--muted); text-decoration: none; margin-left: 10px; font-size: .85rem; }
  .lang a:hover { color: var(--ink); }

  header.site {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 5vw; background: rgba(30,30,33,.85); backdrop-filter: blur(8px);
  }
  /* Top bar logo grows about half as much as the page when zooming: half fixed, half a share of the window width */
  .logo img { display: block; height: 52px; width: auto; }
  @media (min-width: 721px) { .logo img { height: min(calc(26px + 1.8vw), 72px); }
    header.site { padding-top: calc(4px + .28vw); padding-bottom: calc(4px + .28vw); } }
  /* Header logo appears only after scrolling past the hero (scroll-driven, where supported) */
  @supports (animation-timeline: scroll()) {
    .logo img { opacity: 0; animation: logo-in linear both; animation-timeline: scroll(root); animation-range: calc(max(40vh, 22.5rem) - 3vh) calc(max(40vh, 22.5rem) + 3vh); }
    @keyframes logo-in { to { opacity: 1; } }
  }
  nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: .95rem; }
  nav a:hover { color: var(--ink); }

  .hero {
    position: relative;
    padding: 5vh 5vw 3vh;
    min-height: max(40vh, 22.5rem);   /* rem grows with zoom, vh does not */
    background: linear-gradient(rgba(30,30,33,.30), rgba(30,30,33,.50)), url("fractal.jpg") top / cover no-repeat;
  }
  /* Large logo in the bottom-right of the hero */
  .hero-logo {
    position: absolute; right: 4vw; bottom: 10px;
    width: min(50rem, 92%); height: auto;   /* 800px at normal size, grows with zoom */
    pointer-events: none; opacity: .95;
  }
  @media (max-width: 720px) { .hero-logo { width: clamp(15rem, 62vw, 40rem); } }

  .experience { padding: 4vh 5vw 12vh; }

  /* The stack: each card sticks under the header and the previous cards.
     The offset stops growing after four levels so later cards stay fully visible. */
  .stack { position: relative; }
  .card {
    position: sticky;
    height: clamp(380px, 66vh, 560px);
    margin: 0 auto 6vh;
    max-width: 880px;
    border-radius: 22px;
    padding: clamp(24px, 4vw, 48px);
    color: var(--ink-dark);
    background: linear-gradient(160deg, var(--card-a), var(--card-b));
    box-shadow: 0 -10px 40px rgba(0,0,0,.35);
    display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
    transform-origin: 50% 0%;
    overflow: hidden;
    backdrop-filter: blur(10px);
  }
  /* Intro and skills cards span the full width */
  .card.skills, .card.intro, .card.edu { grid-template-columns: 1fr; }
  .card.edu .skill-grid { grid-template-columns: 1fr; }
  .card.intro p { margin: 0; font-size: 1.1rem; line-height: 1.6; }
  .skill-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: .8rem; }
  .skill { background: rgba(29,26,51,.07); border-radius: 12px; padding: 10px 14px; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .6em; }
  .skill b { display: block; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #6a5a2e; }
  /* Title and date share a line; the description wraps below */
  .skill b { order: 0; }
  .skill small { order: 1; margin-left: auto; font-size: .75rem; text-transform: none; letter-spacing: 0; color: #6a5a2e; }
  .skill > span { order: 2; flex-basis: 100%; font-size: .9rem; line-height: 1.4; margin-top: .3em; }
  @media (max-width: 720px) { .skill-grid { grid-template-columns: 1fr; } }
  /* Each card sticks 8px lower than the one before it, in document order, so every card keeps a visible edge */
  .stack > .card:nth-child(1) { top: 96px; }
  .stack > .card:nth-child(2) { top: 104px; }
  .stack > .card:nth-child(3) { top: 112px; }
  .stack > .card:nth-child(4) { top: 120px; }
  .stack > .card:nth-child(5) { top: 128px; }
  .stack > .card:nth-child(6) { top: 136px; }
  .stack > .card:nth-child(7) { top: 144px; }
  .stack > .card:nth-child(8) { top: 152px; }
  .stack > .card:nth-child(9) { top: 160px; }
  .stack > .card:nth-child(10) { top: 168px; }
  .stack > .card:nth-child(11) { top: 176px; }
  .stack > .card:nth-child(12) { top: 184px; }
  .stack > .card:nth-child(13) { top: 192px; }
  .stack > .card:nth-child(14) { top: 200px; }
  .stack > .card:nth-child(15) { top: 208px; }
  .stack > .card:nth-child(16) { top: 216px; }
  .stack > .card:nth-child(17) { top: 224px; }
  .stack > .card:nth-child(18) { top: 232px; }
  /* Backgrounds: the intro card is pastel cyan at 90%, the skills card pastel orange at 75%.
     The remaining cards darken one step at a time from the cream base, at 75% alpha. */
  .stack > .card:nth-child(1) { background: color-mix(in srgb, #cdf5fc 90%, transparent); }
  .stack > .card:nth-child(2) { background: color-mix(in srgb, #ffe0c2 75%, transparent); }
  .stack > .card:nth-child(3) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 96%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(4) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 94%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(5) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 92%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(6) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 90%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(7) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 88%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(8) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 86%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(9) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 84%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(10) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 82%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(11) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 80%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(12) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 78%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(13) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 76%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(14) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 74%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(15) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 72%, #5a4a22) 75%, transparent); }
  .stack > .card:nth-child(16) { background: color-mix(in srgb, color-mix(in oklab, var(--card-a) 70%, #5a4a22) 75%, transparent); }
  /* Education and training: a cooler tone, slightly apart from the job cards */
  .stack > .card:nth-child(17) { background: color-mix(in srgb, #dce9df 86%, transparent); }
  .stack > .card:nth-child(18) { background: color-mix(in srgb, #cfe0dd 86%, transparent); }
  .card .period { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #6a5a2e; }
  .card h3 { font-size: clamp(1.25rem, 2.3vw, 1.8rem); margin: .3em 0 .4em; line-height: 1.2; }
  .card ul { margin: 0; padding-left: 1.1em; line-height: 1.5; font-size: .95rem; }
  .card li + li { margin-top: .35em; }
  .card .tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
  .card .tags > span { background: rgba(29,26,51,.08); border-radius: 999px; padding: 4px 12px; font-size: .78rem; }
  .card .visual {
    aspect-ratio: 4 / 3; border-radius: 14px;
    background: var(--ink-dark); color: var(--cyan);
    display: grid; place-content: center; text-align: center;
    font-weight: 700; font-size: 1.2rem; padding: 12px;
  }
  .card .visual small { display: block; color: var(--muted); font-weight: 400; font-size: .85rem; margin-top: .3em; }

  /* Scroll-driven refinement: earlier cards shrink and dim as later ones slide over them.
     Browsers without animation-timeline support just keep the sticky stack. */
  @supports (animation-timeline: view()) {
    .card {
      animation: recede linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 100%;
    }
    @keyframes recede {
      to { transform: scale(.92); filter: brightness(.7); }
    }
  }

  @media (max-width: 720px) {
    .card { position: static; grid-template-columns: 1fr; height: auto; min-height: 0; }
    .card .visual { display: none; }
  }
  @media (prefers-reduced-motion: reduce) {
    .card { animation: none !important; }
  }

  /* Footer: fractal background, extra overlay (100% dark at top, 40% at bottom), logo bottom-right */
  footer {
    position: relative; overflow: hidden;
    color: var(--muted); font-size: .85rem;
    padding: max(14vh, 6rem) 5vw 6vh;
    background: linear-gradient(rgba(30,30,33,.55), rgba(30,30,33,.75)), url("fractal.jpg") center / cover no-repeat;
  }
  footer::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(to bottom, rgba(30,30,33,1), rgba(30,30,33,.4));
  }
  .footer-link { position: relative; color: var(--muted); text-decoration: none; font-size: .85rem; }
  .footer-link:hover { color: var(--ink); }
  .footer-logo {
    position: absolute; right: 4vw; bottom: -30px;
    width: clamp(240px, 56vw, 900px); height: auto;
    pointer-events: none; opacity: .95;
  }
  /* Theme switch in the nav: light = stacked cards, dark = git graph, system = follows the OS */
  .theme-input { position: absolute; opacity: 0; pointer-events: none; }
  nav { display: flex; align-items: center; }   /* keep the icons on the same line as the language links */
  .theme { margin-left: 20px; white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; }
  .theme label { cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; padding: 5px;
    border-radius: 9px; line-height: 0; transition: color .15s ease, background-color .15s ease; }
  .theme label svg { width: 18px; height: 18px; }
  .theme label:hover { color: var(--ink); background: rgba(244,241,255,.08); }
  /* The selected icon */
  #theme-light:checked ~ header label[for="theme-light"],
  #theme-dark:checked ~ header label[for="theme-dark"],
  #theme-system:checked ~ header label[for="theme-system"] { color: var(--ink); background: rgba(244,241,255,.12); }
  /* A visible focus ring for keyboard users, since the radios themselves are hidden */
  #theme-light:focus-visible ~ header label[for="theme-light"],
  #theme-dark:focus-visible ~ header label[for="theme-dark"],
  #theme-system:focus-visible ~ header label[for="theme-system"] {
    outline: 2px solid var(--ink); outline-offset: 2px; color: var(--ink); }
  /* Label text stays in the markup for screen readers */
  .vh { position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap; }
  #theme-light:checked ~ * .graph, #theme-system:checked ~ * .graph,
  #theme-light:checked ~ * .dark-head, #theme-system:checked ~ * .dark-head,
  #theme-light:checked ~ * .dark-foot, #theme-system:checked ~ * .dark-foot { display: none; }
  #theme-dark:checked ~ * .stack { display: none; }
  @media (prefers-color-scheme: dark) {
    #theme-system:checked ~ * .graph, #theme-system:checked ~ * .dark-head,
    #theme-system:checked ~ * .dark-foot { display: block; }
    #theme-system:checked ~ * .stack { display: none; }
  }
  .graph, .dark-head, .dark-foot { display: block; }
  /* Intro and core skills, restyled for the dark layout */
  /* Opaque and above the lanes, so their tops are hidden behind it */
  .dark-head { position: relative; z-index: 1; background: var(--bg-1);
    max-width: 720px; margin: 0 auto 5vh; padding: 0 12px; }
  .dark-foot { max-width: 720px; margin: 0 auto 8vh; padding: 0 12px; }
  .gedu ul { margin: 0; padding-left: 1.1em; color: var(--muted); line-height: 1.5; font-size: .9rem; }
  .gedu .tags { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: 8px; }
  .gedu .tags > span { border: 1px solid var(--muted); border-radius: 999px; padding: 3px 11px; font-size: .78rem; color: var(--muted); }
  .gcard .visual { display: none; }   /* the client panel belongs to the light cards */
  .gcard { margin-bottom: 4vh; }
  .gcard h3 { font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin: .2em 0 .5em; line-height: 1.2; color: var(--ink); }
  .gcard .period { color: #f2b233; }
  .gcard p { color: var(--muted); line-height: 1.6; font-size: .95rem; max-width: 64ch; }
  .gcard .skill { background: rgba(246,227,180,.06); border: 1px solid rgba(246,227,180,.14); }
  .gcard .skill b, .gcard .skill small { color: #f2b233; }
  .gcard .skill > span { color: var(--muted); }
  /* The hero sits above the graph lines, so they run behind it (opaque backing under the translucent image) */
  .hero { z-index: 1; background-color: var(--bg-1); }
  .graph { position: relative; z-index: 0; max-width: 720px; margin: 0 auto 8vh; padding: 0 12px; }
  /* The lanes run up past the gap and disappear behind the core-skills block */
  .gw-top { position: absolute; left: 12px; bottom: 100%; width: 140px; height: 15vh; overflow: visible; pointer-events: none; }
  .gw-top path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
  .gw-top path.b { stroke-width: 9px; }
  .gw-top path.g { display: none; }
  .gr { display: grid; grid-template-columns: 52px 22px 22px 22px 22px 1fr; min-height: 46px; }
  .gy { font-size: .85rem; color: var(--muted); text-align: right; padding: 24px 12px 0 0; }   /* level with the row's dot */
  .gl { position: relative; }
  .gr { position: relative; }
  .gw { position: absolute; left: 0; width: 140px; overflow: visible; pointer-events: none; }
  .gw-u { top: 0; height: 32px; }          /* the band above the dot */
  .gw-d { top: 32px; height: calc(100% - 32px); }   /* and the band below it */
  /* Crossings read the same everywhere: orange under red under beige, and the yellow trunk over all */
  .gw-l1 { z-index: 1; }
  .gw-l2 { z-index: 2; }
  .gw-l3 { z-index: 3; }
  .gw-l0 { z-index: 4; }
  .gw path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
  .gw, .gw-top { filter: drop-shadow(4px 4px 4px rgba(0,0,0,.45)); }   /* lifts the tracks off the page */
  .gw path.b { stroke-width: 9px; }
  .gw path.g { display: none; }
  /* Dots look like record labels: coloured disc, dark spindle hole, cream rim */
  .gl i { position: absolute; z-index: 5; left: 50%; top: 32px; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%;
    background: radial-gradient(circle, var(--bg-1) 0 2.5px, var(--c) 3px 100%); box-shadow: 0 0 0 2px var(--bg-1), 0 0 0 3.5px #f6e3b4; }
  .gt { padding: 22px 18px 30px 14px; }
  .gt b { display: block; font-weight: 500; font-size: 1rem; color: var(--ink); }
  .gt small { display: block; font-size: .85rem; color: var(--muted); }
  .gr.now .gt b, .gr.now .gt small { color: var(--ink); }
  .gt em { display: block; font-style: normal; font-size: .9rem; color: var(--ink); margin-top: 4px; }
  .gt p { margin: 4px 0 0; font-size: .85rem; line-height: 1.45; color: var(--muted); }
  .gr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .gr-tags span { font-size: .75rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--muted); color: var(--muted); }
  .gt b a.job-link { color: inherit; text-decoration: none; }
  .gt b a.job-link:hover { text-decoration: underline; text-underline-offset: 3px; }
  /* The commit hash, git-log style: far right of the row, and only on hover.
     It may drop to its own line (still right-aligned) when the row is too narrow, so phones never get a wider page. */
  .gt small { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 1em; }
  .sha { margin-left: auto; white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .72rem; letter-spacing: .04em; color: var(--muted); font-style: italic;
    opacity: 0; transition: opacity .18s ease; }
  .sha i { font-family: inherit; font-style: italic; letter-spacing: 0; opacity: .8; }
  /* Hovering a row brings it forward and quietens the others; the tracks stay solid */
  .gr { transition: background-color .18s ease; scroll-margin-top: 96px; }
  .gt, .gy { transition: opacity .18s ease; }
  .graph:hover .gr:not(:hover) .gt, .graph:hover .gr:not(:hover) .gy { opacity: .45; }
  /* A hovered row takes the same shape as the skill tiles: soft cream panel, thin border, mustard title */
  .gr:hover, .gr:target, .gr.is-target { background: rgba(246,227,180,.06); border-radius: 12px;
    outline: 1px solid rgba(246,227,180,.14); outline-offset: -1px; }
  .gr:hover .gt b, .gr:hover .gt em,
  .gr:target .gt b, .gr:target .gt em,
  .gr.is-target .gt b, .gr.is-target .gt em { color: #f2b233; }
  .gr:hover .sha, .gr:target .sha, .gr.is-target .sha { opacity: .35; }
  /* Job pages: same dark language as the graph */
  body.job .logo img { opacity: 1; animation: none; }
  /* Full width, with the same text column as the job header, so the trunk lines up in every section */
  .job-wrap { position: relative; padding: 6vh calc(max(5vw, (100% - 720px) / 2) + 12px) 8vh; }
  /* Fractal band at the top of a job page, with the title on it: lighter at the top so the colours show,
     dark at the bottom so the text stays readable. It starts under the fixed header bar (68px). */
  .hero.job-hero { min-height: max(40vh, 22.5rem); display: flex; align-items: flex-end; padding: calc(68px + 4vh) 5vw 4vh;
    background: linear-gradient(rgba(30,30,33,.25), rgba(30,30,33,.45) 45%, rgba(30,30,33,.92)), url("fractal.jpg") center / cover no-repeat; }
  .job-head { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 12px; }
  .job-head h1, .job-head .job-meta, .job-head .job-role, .job-head .job-back { text-shadow: 0 1px 10px rgba(0,0,0,.7); }
  .job-head .job-back a, .job-head .job-meta { color: var(--ink); }
  .job-head .job-role { margin-bottom: 0; }
  .job-back a, .job-nav a { color: var(--muted); text-decoration: none; font-size: .88rem; }
  .job-back a:hover, .job-nav a:hover { color: #f2b233; }
  .job-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.12; margin: 0 0 .15em; }
  /* The lane above the job title, drawn like the timeline: the yellow trunk runs down the left of the band,
     the job lane bends out from under it, with the record dot halfway (ongoing) or at its end (ended).
     On demasso (the yellow lane) the trunk itself bends. Narrow screens scale the whole drawing down. */
  .job-hero { overflow: hidden; }
  /* The yellow trunk on job pages: one 9px line at the same x in the header band, the content and the footer.
     x = the text column's left edge minus 22px (the lane SVG starts 33px left of it, the trunk sits at x=11 in it). */
  body.job { --trunk-x: calc(max(5vw, (100% - 720px) / 2) - 14.5px); }
  .job-hero::after, .job-wrap::before, body.job footer::after {
    content: ""; position: absolute; pointer-events: none; filter: drop-shadow(4px 4px 4px rgba(0,0,0,.45)); }
  .job-hero::after, .job-wrap::before { top: 0; bottom: 0; left: var(--trunk-x); width: 9px; background: #f2b233; }
  .job-hero.trunk-bends::after { display: none; }   /* demasso: the trunk itself bends into the lane, drawn in the SVG */
  /* In the footer the trunk stops in a yellow record dot, 44px above the bottom: the initial commit, 1996 */
  body.job footer::after { top: -4px; bottom: 44px; left: var(--trunk-x); width: 9px; z-index: 1; background: #f2b233; }
  .root-commit { position: absolute; z-index: 2; left: calc(var(--trunk-x) + 4.5px - 16px); bottom: calc(44px - 16px);
    width: 32px; height: 32px; overflow: visible; filter: drop-shadow(4px 4px 4px rgba(0,0,0,.45)); }
  .root-commit .d-rim { fill: #f6e3b4; } .root-commit .d-gap { fill: var(--bg-1); } .root-commit .d-disc { fill: #f2b233; }
  .root-label { position: absolute; z-index: 2; left: calc(var(--trunk-x) + 30px); bottom: 38px; white-space: nowrap;
    font: italic .72rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .04em; color: var(--muted); opacity: .6; }
  body.job .footer-logo { bottom: 20px; z-index: 2; }
  /* Tall enough for the whole logo now that it sits higher (the logo is about 0.35 times as tall as it is wide) */
  body.job footer { box-sizing: border-box; }
  @media (max-width: 720px) { body.job footer { min-height: 0; } }
  .job-lane { display: block; overflow: visible; max-width: calc(100% + 33px); height: auto;
    margin: .9em 0 .55em -33px; filter: drop-shadow(4px 4px 4px rgba(0,0,0,.45)); }
  .job-lane path { fill: none; stroke-width: 9px; stroke-linecap: round; }
  .job-lane .a { stroke: var(--accent); }
  .job-lane .t { stroke: #f2b233; }
  .job-lane .d-rim { fill: #f6e3b4; }
  .job-lane .d-gap { fill: var(--bg-1); }
  .job-lane .d-disc { fill: var(--accent); }
  .job-meta { display: flex; align-items: baseline; gap: 1em; margin: 0; color: var(--muted); font-size: .9rem; }
  .job-meta .sha { opacity: .35; }
  .job-role { color: var(--ink); font-size: 1.05rem; margin: .5em 0 2.6em; }
  .job-wrap section { margin-bottom: 2.6em; }
  .job-wrap h2 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent); margin: 0 0 .9em; }
  .job-wrap ul { margin: 0; padding-left: 1.1em; color: var(--muted); line-height: 1.65; }
  .job-wrap li { margin-bottom: .55em; }
  .job-todo { margin: 0; color: var(--muted); opacity: .55; font-style: italic; line-height: 1.6; }
  .job-nav { display: flex; justify-content: space-between; gap: 1.5em;
    border-top: 1px solid rgba(246,227,180,.14); padding-top: 1.5em; }
  .job-nav a { margin-left: 0; }          /* not the header nav's 20px */
  .job-nav .nav-older { text-align: right; }
  /* On a phone the footer logo flows with the content instead of hanging off the edge */
  @media (max-width: 720px) {
    .footer-logo { position: static; display: block; width: min(62vw, 280px); margin: 5vh 0 0 auto; }
  }
  /* Very small phones (320-360px): the top bar must fit logo, languages and the theme icons */
  @media (max-width: 360px) {
    header.site { padding-left: 4vw; padding-right: 4vw; }
    .logo img { height: 40px; }
    .lang, .theme { margin-left: 8px; }
    .lang a { margin-left: 6px; }
    .theme label { padding: 4px; }
    /* the timeline text column is too narrow here for the hash, which only shows on hover anyway */
    .graph .sha { display: none; }
    .gt { padding-right: 10px; hyphens: auto; overflow-wrap: anywhere; }
  }

  /* ===== Job pages in the light style (html[data-look="light"], set by the theme script):
     no git lanes; the content sits in a cream card, like the cards on the home page ===== */
  [data-look="light"] .job-lane, [data-look="light"] .job-hero::after, [data-look="light"] .job-wrap::before,
  [data-look="light"] body.job footer::after, [data-look="light"] .root-commit,
  [data-look="light"] .git-only { display: none; }
  [data-look="light"] .job-head h1 { margin-top: .5em; }
  [data-look="light"] .hero.job-hero { padding-bottom: calc(4vh + 5vh + 8px); }   /* room for the card that overlaps the band */
  [data-look="light"] .root-label { left: 5vw; }
  [data-look="light"] .job-wrap {
    position: relative; z-index: 2; max-width: 880px; margin: -5vh auto 6vh; padding: clamp(24px, 4vw, 48px);
    border-radius: 22px; color: var(--ink-dark); background: linear-gradient(160deg, var(--card-a), var(--card-b));
    box-shadow: 0 -10px 40px rgba(0,0,0,.35); }
  [data-look="light"] .job-wrap h2 { color: #6a5a2e; }
  [data-look="light"] .job-wrap ul { color: var(--ink-dark); }
  [data-look="light"] .job-wrap .gr-tags span { border: 0; background: rgba(29,26,51,.08); color: var(--ink-dark); padding: 4px 12px; }
  [data-look="light"] .job-todo { color: rgba(29,26,51,.55); opacity: 1; }
  [data-look="light"] .job-nav { border-top-color: rgba(29,26,51,.15); }
  [data-look="light"] .job-nav a { color: #6a5a2e; }
  [data-look="light"] .job-nav a:hover { color: var(--ink-dark); }
  @media (max-width: 720px) { [data-look="light"] .job-wrap { margin: -3vh 12px 6vh; }
    [data-look="light"] .hero.job-hero { padding-bottom: calc(4vh + 3vh + 8px); } }
  /* Home cards: link to the job page */
  /* Wider screens: the dark company panel is the link; phones (panel hidden, card grows) get the text link */
  a.visual { text-decoration: none; transition: transform .18s ease, box-shadow .18s ease; }
  a.visual:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,.35); }
  .visual-more { display: block; margin-top: 1.4em; font-size: .8rem; font-weight: 500; color: var(--muted); opacity: .8; }
  a.visual:hover .visual-more { color: var(--ink); opacity: 1; }
  .card-more { display: none; }
  @media (max-width: 720px) { .card-more { display: inline-block; } }
  .card-more { margin-top: 1.2rem; color: #6a5a2e; font-size: .9rem; font-weight: 500; text-decoration: none; }
  .card-more:hover { color: var(--ink-dark); text-decoration: underline; text-underline-offset: 3px; }

  /* ===== Footer links: dark style = `git remote -v` with round icon buttons; light style = "Find demasso" cards ===== */
  /* Logo sizes in rem so they grow with zoom; next to the links while there is room (rem: the links grow too) */
  /* home: room right of the links = window - right margin - (link list's left edge + its ~20rem width + a gap) */
  footer { --logo-w: max(15rem, min(50rem, calc(91vw - max(0px, (90vw - 720px) / 2) - 12px - 21.5rem))); }
  body.job footer { --logo-w: min(50rem, calc(96vw - var(--trunk-x) - 30.625rem));
    min-height: max(calc(var(--logo-w) * .35 + 2.5rem), 19.375rem); }   /* room for the remote list as well */
  .footer-logo { width: var(--logo-w); }
  .ico { width: 18px; height: 18px; flex: none; }
  .social-cards { display: none; }
  [data-look="light"] .social-git { display: none; }
  [data-look="light"] .social-cards { display: block; }

  .social-git { position: relative; z-index: 3; width: max-content;
    font: .82rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
  body.job .social-git { position: absolute; left: calc(var(--trunk-x) + 30px); bottom: 74px; }
  .social-git .prompt { opacity: .6; margin: 0 0 10px; }
  .social-git a { display: grid; grid-template-columns: 34px 9ch auto; align-items: center; column-gap: 12px;
    margin-top: 6px; color: var(--muted); text-decoration: none; }
  .social-git .btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink);
    background: rgba(244,241,255,.08); border: 1px solid rgba(246,227,180,.25);
    transition: background .15s ease, color .15s ease, transform .15s ease; }
  .social-git b { font-weight: 400; color: #f2b233; }
  .social-git a:hover { color: var(--ink); }
  .social-git a:hover .btn { color: var(--ink-dark); background: #f2b233; border-color: #f2b233; transform: translateY(-2px); }
  .social-git a:hover .url::after { content: "  (fetch)"; opacity: .5; }

  .social-cards { position: relative; z-index: 3; max-width: 720px; }
  .social-cards h2 { margin: 0 0 14px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: #f2b233; }
  .social-cards .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
  .social-cards a { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 14px 16px;
    border-radius: 12px; background: rgba(246,227,180,.06); border: 1px solid rgba(246,227,180,.14);
    color: var(--ink); text-decoration: none; font-size: .95rem; transition: background .15s ease, transform .15s ease; }
  .social-cards a small { grid-column: 2; color: var(--muted); font-size: .78rem; }
  .social-cards a:hover { background: rgba(246,227,180,.14); transform: translateY(-2px); }
  .social-cards .ico { grid-row: span 2; width: 24px; height: 24px; color: #f2b233; }
  /* Light: the cards take the space, so the logo flows below them */
  [data-look="light"] .footer-logo { position: static; display: block; width: min(var(--logo-w), 35rem); margin: 5vh 0 0 auto; }
  [data-look="light"] body.job footer { min-height: 0; padding-bottom: 70px; }
  /* Aligned with the text column (720px wide, centred) */
  .social-cards, body:not(.job) .social-git { margin-left: calc(max(0px, (100vw - 10vw - 720px) / 2) + 12px); }

  /* Zoomed in, or a narrower screen: no room beside the links any more, so the logo goes below them and keeps growing */
  @media (max-width: 75rem) and (min-width: 721px) {
    .footer-logo, [data-look="light"] .footer-logo { position: static; display: block; width: min(40rem, 100%); margin: 5vh 0 0 auto; }
    body.job footer { min-height: 0; padding-bottom: 5.5rem; }
    body.job .social-git { position: relative; left: auto; bottom: auto; margin-left: calc(max(5vw, (100vw - 720px) / 2) - 14.5px + 30px - 5vw); }   /* = trunk x + 30px; 100vw, as % means the footer width here */
  }
  /* Phones: everything flows; the job footer keeps room at the bottom for the initial commit */
  @media (max-width: 720px) {
    .footer-logo, [data-look="light"] .footer-logo { position: static; display: block; width: clamp(15rem, 62vw, 25rem); margin: 5vh 0 0 auto; }
    body.job .social-git { position: relative; left: auto; bottom: auto; margin-left: 16px; }
    body.job footer { padding-bottom: 80px; }
    .social-cards, body:not(.job) .social-git { margin-left: 0; }
    .social-git a { grid-template-columns: 34px 9ch; }
    .social-git .url { display: none; }
  }
