/* Connect front page: the same light-and-layers treatment as the case study.
   Panels are lit from above (gradient, top highlight, one deep shadow) instead
   of outlined; sections share one ground instead of hard colour bands. Built
   on the portfolio theme tokens, so it follows the Appearance picker. */
body.portfolio-home {
  --land: cubic-bezier(.2, 1.35, .35, 1);
  --soft: cubic-bezier(.2, .8, .2, 1);
  --h-lit-1: linear-gradient(160deg, #ffffff 0%, #eef2f3 100%);
  --h-lit-2: linear-gradient(160deg, #ffffff 0%, #f1f4f5 100%);
  --h-edge: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 .5px rgba(23, 33, 38, .14);
  --h-drop: 0 26px 50px -30px rgba(23, 33, 38, .32);
  --h-glow: rgba(36, 107, 98, .06);
}
@media (prefers-color-scheme: dark) {
  .portfolio-theme:not([data-theme="light"]) body.portfolio-home {
    --h-lit-1: linear-gradient(160deg, #1c2326 0%, #13181a 100%);
    --h-lit-2: linear-gradient(160deg, #283034 0%, #1e2528 100%);
    --h-edge: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 .5px rgba(255, 255, 255, .09);
    --h-drop: 0 28px 64px -28px rgba(0, 0, 0, .75);
    --h-glow: rgba(255, 255, 255, .06);
  }
}
.portfolio-theme[data-theme="dark"] body.portfolio-home {
  --h-lit-1: linear-gradient(160deg, #1c2326 0%, #13181a 100%);
  --h-lit-2: linear-gradient(160deg, #283034 0%, #1e2528 100%);
  --h-edge: inset 0 1px 0 rgba(255, 255, 255, .07), 0 0 0 .5px rgba(255, 255, 255, .09);
  --h-drop: 0 28px 64px -28px rgba(0, 0, 0, .75);
  --h-glow: rgba(255, 255, 255, .06);
}

/* One ground with light from the top, not banded sections */
.portfolio-theme body.portfolio-home { background: radial-gradient(1200px 560px at 50% -180px, var(--h-glow), transparent 70%), var(--paper) no-repeat; }
.portfolio-theme body.portfolio-home :is(.selected-work, .experience-section) { background: transparent; border: 0; }

/* Portrait */
.portfolio-theme body.portfolio-home .portrait > img { box-shadow: var(--h-edge), 0 40px 80px -40px rgba(0, 0, 0, .6); }
/* Calms the red in the skin tones (blind review, 2026-10-02). A filter, not a new photo, so the file and the LinkedIn share image are unchanged. */
.portfolio-theme body.portfolio-home .portrait > img { filter: saturate(.74) contrast(.97) brightness(1.02); }

/* Leadership numbers as lit cards */
.portfolio-theme body.portfolio-home .leadership-proof dl > div { border: 0; padding: 22px; border-radius: 20px; background: var(--h-lit-2); box-shadow: var(--h-edge), var(--h-drop); }
/* Matches the theme's 'div + div' rule, which would otherwise zero the later cards' padding. */
.portfolio-theme body.portfolio-home .leadership-proof dl > div + div { padding: 22px; }

/* Work images on a mat, lifting a little under the pointer */
.portfolio-theme body.portfolio-home .featured-visual { background: var(--h-lit-1); box-shadow: var(--h-edge), var(--h-drop); transition: transform 500ms var(--land); }
.portfolio-theme body.portfolio-home .featured-visual:hover { transform: translateY(-3px); }
.portfolio-theme body.portfolio-home .featured-visual img { border: 0; box-shadow: 0 0 0 .5px var(--line); }
.portfolio-theme body.portfolio-home .work-story figure > a { display: block; padding: 12px; border-radius: 24px; background: var(--h-lit-1); box-shadow: var(--h-edge), var(--h-drop); transition: transform 500ms var(--land); }
.portfolio-theme body.portfolio-home .work-story figure > a:hover { transform: translateY(-3px); }
.portfolio-theme body.portfolio-home .work-story figure img { border: 0; border-radius: 14px; }

/* Product panels */
.portfolio-theme body.portfolio-home .quicklatch-proof { border: 0; background: var(--h-lit-1); box-shadow: var(--h-edge), var(--h-drop); }
.portfolio-theme body.portfolio-home .aura-capture { box-shadow: var(--h-edge), var(--h-drop); }

/* Skills */
.portfolio-theme body.portfolio-home .sop-example { background: var(--h-lit-2); box-shadow: var(--h-edge), var(--h-drop); }
.portfolio-theme body.portfolio-home .skills-summary ul { display: grid; gap: 8px; }
.portfolio-theme body.portfolio-home .skills-summary li { border: 0; padding: 14px 18px; border-radius: 14px; background: var(--h-lit-2); box-shadow: var(--h-edge); }

/* Soft arrival below the fold. Hidden only while script runs and motion is allowed. */
.h-motion body.portfolio-home main > section.h-arrive > * { opacity: 0; transform: translateY(14px); filter: blur(8px); transition: opacity 600ms var(--soft), transform 600ms var(--soft), filter 600ms var(--soft); transition-delay: calc(var(--i, 0) * 90ms); }
.h-motion body.portfolio-home main > section.h-arrive.in > * { opacity: 1; transform: none; filter: none; }

@media print { .h-motion body.portfolio-home main > section.h-arrive > * { opacity: 1 !important; transform: none !important; filter: none !important; } }
@media (prefers-reduced-motion: reduce) {
  body.portfolio-home :is(.featured-visual, .work-story figure > a) { transition: none; }
  body.portfolio-home :is(.featured-visual, .work-story figure > a):hover { transform: none; }
  .h-motion body.portfolio-home main > section.h-arrive > * { opacity: 1; transform: none; filter: none; }
}

/* Blind-review fixes, 2026-10-02 */
/* One heading style: section headings at 600 with -0.025em, so letters never touch. */
.portfolio-theme body.portfolio-home main :is(h2, h3) { font-weight: 500; letter-spacing: -0.025em; }
/* The page headline matches: weight 500, as the other headings. */
.portfolio-theme body.portfolio-home main h1 { font-weight: 500; }
/* The first skill chip had its top padding removed by an older rule. */
.portfolio-theme body.portfolio-home .skills-summary li:first-child { padding-top: 14px; }
.portfolio-theme body.portfolio-home .skills-summary li { display: flex; align-items: center; }
/* The QuickLatch stage hugs its toolbar instead of a fixed 250px of black. */
.portfolio-theme body.portfolio-home .halo-product { min-height: 0; }
.portfolio-theme body.portfolio-home .halo-stage { padding: 20px 24px; }
/* Small group labels in Tools keep their open tracking. */
.portfolio-theme body.portfolio-home .tool-groups h3 { letter-spacing: .04em; }

/* Hero work card: a compact link to the flagship case study. It sits low on the
   portrait, over the hoodie, so the face stays clear. Added after the first-screen
   comparison (2026-10-03). */
.portfolio-theme body.portfolio-home .hw { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; align-items: center; padding: 10px 16px 10px 10px; border-radius: 20px; background: var(--h-lit-1); box-shadow: var(--h-edge), var(--h-drop); color: var(--ink); text-decoration: none; transition: transform 500ms var(--land); }
.portfolio-theme body.portfolio-home .hw:hover { transform: translateY(-3px); }
.portfolio-theme body.portfolio-home .hw:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.portfolio-theme body.portfolio-home .hw-thumb { position: relative; display: block; overflow: hidden; border-radius: 12px; aspect-ratio: 16 / 10; background: #f4f4f2; }
.portfolio-theme body.portfolio-home .portrait .hw-thumb img { position: absolute; display: block; max-width: none; width: 124%; height: auto; left: -1%; top: -1%; border: 0; border-radius: 0; box-shadow: none; filter: none; object-fit: fill; }
.portfolio-theme body.portfolio-home .hw-body { display: block; min-width: 0; }
.portfolio-theme body.portfolio-home .hw-title { display: block; margin: 0 0 4px; font-family: "Inter Tight", "Inter", system-ui, sans-serif; font-size: 16px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; }
.portfolio-theme body.portfolio-home .hw-result { display: block; margin: 0 0 6px; color: var(--ink); font-size: 12.5px; line-height: 1.4; font-weight: 600; }
.portfolio-theme body.portfolio-home .hw-link { display: block; color: var(--ink); font-size: 12.5px; font-weight: 600; }
.portfolio-theme body.portfolio-home .hw-link::after { content: " \203A"; }
@media (min-width: 901px) {
  .portfolio-theme body.portfolio-home .portrait { margin-bottom: 40px; }
  .portfolio-theme body.portfolio-home .hw { position: absolute; left: -76px; bottom: -38px; width: 360px; }
}
@media (max-width: 900px) {
  .portfolio-theme body.portfolio-home .hw { position: absolute; left: 12px; right: 12px; bottom: 12px; }
}
@media (max-width: 700px) {
  .portfolio-theme body.portfolio-home .hw { grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; }
  .portfolio-theme body.portfolio-home .hw-title { font-size: 14.5px; }
  .portfolio-theme body.portfolio-home .hw-result { font-size: 12px; margin-bottom: 4px; }
  .portfolio-theme body.portfolio-home .hw-link { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-theme body.portfolio-home .hw { transition: none; }
  .portfolio-theme body.portfolio-home .hw:hover { transform: none; }
}

/* ---------- Motion, added 2026-10-03 after comparing with a reference ---------- */
body.portfolio-home { --h-ind: rgba(23, 33, 38, .08); --h-hl: rgba(36, 107, 98, .13); }
@media (prefers-color-scheme: dark) {
  .portfolio-theme:not([data-theme="light"]) body.portfolio-home { --h-ind: rgba(255, 255, 255, .10); --h-hl: rgba(108, 229, 214, .16); }
}
.portfolio-theme[data-theme="dark"] body.portfolio-home { --h-ind: rgba(255, 255, 255, .10); --h-hl: rgba(108, 229, 214, .16); }

/* Anchor jumps land clear of the floating nav. */
html:has(body.portfolio-home) { scroll-padding-top: 88px; }

/* 1 · The first screen arrives in a short sequence. A CSS animation with a
   backwards fill, so nothing can stay hidden: it ends on its own, and a
   browser or setting that skips animation shows the final state. The photo is
   not animated: it is the largest thing on screen and loads on its own. */
@keyframes hw-in { from { opacity: 0; transform: translateY(14px); filter: blur(8px); } }
@keyframes hw-land { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes hl-sweep { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: no-preference) {
  .portfolio-theme body.portfolio-home .profile-intro > * { animation: hw-in 640ms var(--soft) backwards; animation-delay: calc(var(--n, 0) * 90ms + 40ms); }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(2) { --n: 1; }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(3) { --n: 2; }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(4) { --n: 3; }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(5) { --n: 4; }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(6) { --n: 5; }
  .portfolio-theme body.portfolio-home .profile-intro > :nth-child(7) { --n: 6; }
  .portfolio-theme body.portfolio-home .hw { animation: hw-land 700ms var(--land) 520ms backwards; }
}

/* 2 · One highlight, on the word that carries the positioning. It sweeps in
   once, after the headline has arrived. Reduced motion shows it already drawn. */
.portfolio-theme body.portfolio-home .hl { position: relative; isolation: isolate; white-space: nowrap; }
.portfolio-theme body.portfolio-home .hl::before { content: ""; position: absolute; z-index: -1; inset: .1em -.14em 0; border-radius: .22em; background: var(--h-hl); transform-origin: left center; }
@media (prefers-reduced-motion: no-preference) {
  .portfolio-theme body.portfolio-home .hl::before { animation: hl-sweep 700ms var(--soft) 820ms backwards; }
}

/* 3 · A floating nav that follows you once the first screen is behind you,
   with a highlight that slides to the section you are in. */
.portfolio-theme body.portfolio-home .fn { position: fixed; z-index: 50; top: 14px; left: 50%; width: max-content; min-height: 0; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 999px; background: var(--h-lit-2); box-shadow: var(--h-edge), 0 18px 40px -18px rgba(0, 0, 0, .6); opacity: 0; visibility: hidden; transform: translate(-50%, -160%); transition: transform 250ms var(--soft), opacity 200ms var(--soft), visibility 0s 250ms; }
.portfolio-theme body.portfolio-home .fn.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: transform 450ms var(--land), opacity 250ms var(--soft), visibility 0s; }
.portfolio-theme body.portfolio-home .fn a { position: relative; z-index: 1; display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; white-space: nowrap; transition: color 260ms var(--soft); }
.portfolio-theme body.portfolio-home .fn a:hover, .portfolio-theme body.portfolio-home .fn a[aria-current="true"] { color: var(--ink); }
.portfolio-theme body.portfolio-home .fn a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.portfolio-theme body.portfolio-home .fn .fn-ind { position: absolute; inset: 4px; border-radius: 999px; background: var(--h-ind); opacity: 0; pointer-events: none; clip-path: inset(0 var(--r, 100%) 0 var(--l, 0) round 999px); transition: clip-path 450ms var(--land), opacity 200ms var(--soft); }
.portfolio-theme body.portfolio-home .fn.has-active .fn-ind { opacity: 1; }
.portfolio-theme body.portfolio-home .fn a.fn-cta { margin-left: 6px; background: var(--button-bg); color: var(--button-ink); }
.portfolio-theme body.portfolio-home .fn a.fn-cta:hover { background: var(--button-hover); color: var(--button-ink); }
@media (max-width: 700px) {
  .portfolio-theme body.portfolio-home .fn { top: 10px; max-width: calc(100vw - 20px); }
  .portfolio-theme body.portfolio-home .fn a { padding: 0 10px; font-size: 13px; }
  .portfolio-theme body.portfolio-home .fn a.fn-cta { display: none; }
}
@media (max-width: 360px) {
  .portfolio-theme body.portfolio-home .fn a { padding: 0 7px; }
}
@media (prefers-reduced-motion: reduce) {
  .portfolio-theme body.portfolio-home .fn, .portfolio-theme body.portfolio-home .fn.on, .portfolio-theme body.portfolio-home .fn a, .portfolio-theme body.portfolio-home .fn .fn-ind { transition: none; }
}

/* 4 · Polish pass: a way to reach me in the first screen, a shorter phone page. */
.portfolio-theme body.portfolio-home .btn-li { display: inline-flex; align-items: center; gap: 10px; align-self: stretch; padding: 0 20px; border-radius: var(--radius-control); background: var(--h-lit-2); box-shadow: var(--h-edge); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; transition: background-color 200ms var(--soft); }
.portfolio-theme body.portfolio-home .btn-li:hover { background: var(--h-lit-1); }
.portfolio-theme body.portfolio-home .btn-li:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.portfolio-theme body.portfolio-home .btn-li svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
@media (max-width: 700px) {
  /* The button keeps its name for screen readers and shows only the mark. */
  .portfolio-theme body.portfolio-home .btn-li { padding: 0; width: 50px; justify-content: center; }
  .portfolio-theme body.portfolio-home .btn-li-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .portfolio-theme body.portfolio-home .hero-actions { gap: 12px 10px; }

  /* Leadership: each figure sits beside its sentence instead of above it. */
  .portfolio-theme body.portfolio-home .leadership-proof dl { gap: 12px; }
  .portfolio-theme body.portfolio-home .leadership-proof dl > div, .portfolio-theme body.portfolio-home .leadership-proof dl > div + div { padding: 16px 18px; border-radius: 18px; }
  .portfolio-theme body.portfolio-home .leadership-proof dt { font-size: 15px; margin-bottom: 8px; }
  .portfolio-theme body.portfolio-home .leadership-proof dd { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: center; }
  .portfolio-theme body.portfolio-home .leadership-proof .proof-number { display: flex; flex-direction: column; line-height: 1; }
  .portfolio-theme body.portfolio-home .leadership-proof .proof-number > span { margin-top: 4px; font-size: 13px; }
  .portfolio-theme body.portfolio-home .leadership-proof .proof-description { font-size: 14px; line-height: 1.45; }

  /* Skills: two to a row. */
  .portfolio-theme body.portfolio-home .skills-summary ul { grid-template-columns: 1fr 1fr; gap: 8px; }
  .portfolio-theme body.portfolio-home .skills-summary li { padding: 12px 14px; font-size: 14px; line-height: 1.3; }
}

/* 5 · Where I've worked: one line, in order, ending on what I'm seeking. */
.portfolio-theme body.portfolio-home .trail { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 15px; line-height: 1.4; }
.portfolio-theme body.portfolio-home .trail li { display: inline-flex; align-items: center; gap: 12px; }
.portfolio-theme body.portfolio-home .trail li + li::before { content: "\2192"; content: "\2192" / ""; opacity: .55; }
.portfolio-theme body.portfolio-home .trail .now { gap: 8px; color: var(--ink); font-weight: 600; }
.portfolio-theme body.portfolio-home .trail .now::before { margin-right: 4px; }
.portfolio-theme body.portfolio-home .trail .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
@media (max-width: 700px) {
  /* On a phone the line breaks before "Seeking", with no arrow left hanging. */
  .portfolio-theme body.portfolio-home .trail .now { flex-basis: 100%; }
  .portfolio-theme body.portfolio-home .trail .now::before { content: none; }
}

/* 6 · The resume link in the first screen gets the file in one click. */
.portfolio-theme body.portfolio-home .text-link.dl { display: inline-flex; align-items: center; gap: 8px; }
.portfolio-theme body.portfolio-home .text-link.dl svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
