/* EXPERIMENT (full-bleed bands): each teaser owns a theme, and the active theme styles the whole page.
   Loaded after common.css by index.html only. Delete this file and the page to discard.

   - The panel being read is the pure theme colour (Flicket black, Geckoboard #2d294e, Xero light blue).
   - Everything around it (page + other panels) is a shifted version of that theme: lighter grey
     around black, a much darker indigo around Geckoboard, a paler blue around Xero.
   - Text and logo colours follow the active theme too, so every panel stays legible.
   The script in index.html sets --theme / --shade / --fg / --fg-soft on <html> and marks the
   active panel with .is-active. Tune the three theme blocks below. */

:root {
    --theme: #000000;
    --shade: #ffffff;
    --fg: #ffffff;
    --fg-soft: rgba(255, 255, 255, 0.78);
    --glow: rgba(255, 255, 255, 0.17);
    /* "surround" tokens style the panels that are NOT active; they default to the active ones */
    --sfg: #ffffff;
    --sfg-soft: rgba(255, 255, 255, 0.78);
    --sglow: rgba(255, 255, 255, 0.17);
    --mix: 40%;
}

/* the page itself is plain white, which is also what shows when the page is pulled past either end */
body {
    overflow-x: hidden;
    background-color: #ffffff;
}
.portfolio > .divider { display: none; }
.container.portfolio { padding-top: 0; padding-bottom: 0; }
/* single column (under 760px): side padding is a constant 24px up to 540px wide, then 32px; the content column stops growing at 500px
   (so between 540px and 760px the margins widen instead of the text). The menu's container follows the same padding. */
@media screen and (max-width: 759px) {
    .container, #nav-section .container { max-width: 540px; padding-left: 24px; padding-right: 24px; }
}
@media screen and (min-width: 541px) and (max-width: 759px) {
    .container, #nav-section .container { max-width: 564px; padding-left: 32px; padding-right: 32px; }
}
#footer-section { margin-top: 0; }

/* the three themes (read by the script) */
.portfolio .block-flicket    { --t-theme: #000000; --t-shade: #170905; --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.84); --t-glow: rgba(235,80,39,.5); }  /* black, with a splash of Flicket orange */
.portfolio .block-xero       { --t-theme: #e4ebf2; --t-shade: #ffffff; --t-fg: #010852; --t-fg-soft: rgba(1,8,82,.85); --t-glow: rgba(255,255,255,.95); }  /* Xero's current look: pale grey-blue, deep navy */
.portfolio .block-geckoboard {
    --t-theme: #2d294e; --t-shade: #ffffff;
    --t-fg: #ffffff; --t-fg-soft: rgba(255,255,255,.82); --t-glow: rgba(150,135,255,.5);
    --t-sfg: #2b2b2b; --t-sfg-soft: rgba(43,43,43,.82); --t-sglow: rgba(120,105,230,.14);
    --t-mix: 6%;
}
/* the intro is a theme of its own: the original light grey, switching to Flicket's black as it scrolls away */
#intro-section { --t-theme: #f5f5f5; --t-shade: #dedede; --t-fg: #191919; --t-fg-soft: #4e4e4e; --t-glow: rgba(255,255,255,.75); }

.portfolio .article.block {
    position: relative;
    z-index: 0;
    margin: 0;
    padding: 90px 0;
}
.portfolio .article.block::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -1px; /* 1px past each edge, so neighbouring bands overlap: sections end on fractions of a pixel, and an exact meeting */
    bottom: -1px; /* point lets the white page behind show through as a hairline at some widths */
    left: 50%;
    width: calc(max(100vw, 300px) / var(--z, 1) + 4px); /* body has a 300px minimum width; +4px so centring on a half pixel can't leave a sliver at the window's edges (html clips the overhang) */
    transform: translateX(-50%);
    /* inactive panel: between the theme and its shade */
    background-color: color-mix(in srgb, var(--theme) var(--mix), var(--shade));
    transition: background-color 600ms ease;
}
.portfolio .article.block.is-active::before { background-color: var(--theme); }

.portfolio .block .title { color: var(--sfg); transition: color 600ms ease; }
.portfolio .block .description { color: var(--sfg-soft); transition: color 600ms ease; }
.portfolio .block.is-active .title { color: var(--fg); }
.portfolio .block.is-active .description { color: var(--fg-soft); }
.portfolio .block .cta {
    background-color: transparent;
    border-color: var(--sfg-soft);
    color: var(--sfg);
}
.portfolio .block.is-active .cta { border-color: var(--fg-soft); color: var(--fg); }
@media screen and (hover: hover) {
    .portfolio .block a.block-link .cta:hover { background-color: var(--sfg); border-color: var(--sfg); color: var(--theme); }
    .portfolio .block.is-active a.block-link .cta:hover { background-color: var(--fg); border-color: var(--fg); color: var(--theme); }
}
.portfolio .block a.block-link:focus-visible .cta { background-color: var(--sfg); border-color: var(--sfg); color: var(--theme); }
.portfolio .block.is-active a.block-link:focus-visible .cta { background-color: var(--fg); border-color: var(--fg); color: var(--theme); }

/* logos follow the theme: light-on-dark by default, original dark versions on a light theme */
.portfolio .block-flicket .logo { filter: none; } /* reversed logo: white letters, orange full stop */
.portfolio .block-xero .logo { filter: none; }

@media screen and (min-width: 760px) {
    .portfolio .article.block { padding: 150px 0; }
    .portfolio .block .description-wrapper { padding-right: 60px; }
    .portfolio .article.odd.block .description-wrapper { padding-right: 0; padding-left: 60px; }
    /* the two columns share the width equally on every project (they used to size themselves from their contents, so a long nowrap title squeezed the artwork) */
    .portfolio .block .description-wrapper, .portfolio .block .image-wrapper { flex: 1 1 0; min-width: 0; box-sizing: border-box; }
    .portfolio .block .description { margin-top: 22px; margin-bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    body, .portfolio .article.block::before, .portfolio .block .title, .portfolio .block .description { transition: none; }
}

/* A radial glow centred behind the teaser art. It sits on the image column and takes its colour from the active theme (--glow). */
.portfolio .block .image-wrapper { position: relative; }
.portfolio .block .image-wrapper::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -45% -40%;
    background: radial-gradient(closest-side, var(--sglow), transparent);
    pointer-events: none;
    transition: background 600ms ease;
}
.portfolio .block.is-active .image-wrapper::before { background: radial-gradient(closest-side, var(--glow), transparent); }

/* The 15px window-chrome strip above each screenshot is the image's own top padding, so it shows the
   panel colour through it. Give the screenshots a white backing so the chrome reads as a white browser bar. */
.portfolio .block .image-wrapper img.screenshot { background-color: #ffffff; }

/* Intro and footer follow the active theme too: same shade as the inactive panels, with the doodle
   pattern recoloured to the theme's text colour (drawn through a mask) and the name set to match. */
#intro-section,
#footer-section {
    isolation: isolate;
    background-image: none;
    background-color: color-mix(in srgb, var(--theme) var(--mix), var(--shade));
    transition: background-color 600ms ease;
}
#intro-section::before,
#footer-section::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background-repeat: no-repeat;
    /* plain background images (not masks), so the doodles also show when the page is opened from disk;
       they are dark line art, inverted to light on dark themes via --doodle-inv */
    filter: invert(var(--doodle-inv, 0));
}
:root { --doodle-inv: 1; }
html { background: #ffffff; } /* the intro's white, shown when the page is pulled past either end */
html.theme-light { --doodle-inv: 0; }
#intro-section::before { background-image: url("images/doodle-hero-bg-mobile.svg"); background-position: center 50px; background-size: auto; }
#footer-section { position: relative; }
#footer-section::before { background-image: url("images/doodle-footer-bg-mobile.svg"); background-position: center; background-size: auto; }
@media screen and (min-width: 740px) {
    #intro-section::before { background-image: url("images/doodle-hero-bg.svg"); background-position: center 70px; }
}
@media screen and (min-width: 560px) {
    #footer-section::before { background-image: url("images/doodle-footer-bg.svg"); background-position: center -20px; }
}
#intro-section.is-active { background-color: var(--theme); }
/* the name and title are dark artwork: lighten it on dark themes, leave it as drawn on the light one */
html:not(.theme-light) #intro-section picture img { filter: invert(1) brightness(1.4); }
#footer-section h3,
#footer-section p { color: var(--sfg); transition: color 600ms ease; }

/* ---- focus follows scroll: --p (0 = sharp, 1 = fully out of focus) is set per section by the script as you scroll ---- */
.portfolio .block .description-wrapper,
.portfolio .block .image-wrapper,
#intro-section > * {
    filter: blur(calc(var(--p, 0) * 9px));
    opacity: calc(1 - var(--p, 0) * 0.45);
    will-change: filter, opacity;
}
@media (prefers-reduced-motion: reduce) {
    .portfolio .block .description-wrapper,
    .portfolio .block .image-wrapper,
    #intro-section > * { filter: none; opacity: calc(1 - var(--p, 0) * 0.45); }
}

/* with scroll-driven colour there is nothing to ease: the script sets the blended colours every frame */

/* a divider between sections: instead of a line, a soft radial glow that is cut off at the section edge */
.portfolio .article.block::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: calc(max(100vw, 300px) / var(--z, 1)); /* body has a 300px minimum width */
    height: 140px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse 34% 100% at 50% 0, color-mix(in srgb, var(--glow) 40%, transparent), transparent);
    pointer-events: none;
    z-index: -1;
}
/* and the same cut-off glow at the top of the footer, which closes the last section */
#footer-section {
    background-image: radial-gradient(ellipse 34% 140px at 50% 0, color-mix(in srgb, var(--glow) 40%, transparent), transparent);
    background-repeat: no-repeat;
    background-size: 100% 140px;
    background-position: top center;
}

/* ---- intro: positioning line + skills strip ---- */
body #intro-section {
    height: auto;
    min-height: 500px;
    justify-content: flex-start;
    padding: 100px 24px 80px;
    text-align: center;
}

/* ---- static mode (?static, or the toggle bottom-right): every section keeps its own colour, nothing follows the scroll ---- */
html.static #intro-section,
html.static .portfolio .block,
html.static #skills-section,
html.static #testimonials-section,
html.static #hobbies-section {
    --theme: var(--t-theme); --shade: var(--t-shade);
    --fg: var(--t-fg); --fg-soft: var(--t-fg-soft); --glow: var(--t-glow);
    --sfg: var(--t-fg); --sfg-soft: var(--t-fg-soft); --sglow: var(--t-glow);
    --mix: 100%;
}
html.static #footer-section {
    --theme: #0b4f6c; --shade: #08384d;
    --fg: #ffffff; --fg-soft: rgba(255,255,255,.86); --glow: rgba(90,205,235,.45);
    --sfg: #ffffff; --sfg-soft: rgba(255,255,255,.86); --sglow: rgba(90,205,235,.45);
    --mix: 100%;
}
html.static #intro-section,
html.static #footer-section,
html.static .portfolio .block::before,
html.static #skills-section::before,
html.static #testimonials-section::before,
html.static #hobbies-section::before { transition: none; }
html.static #intro-section { background-color: var(--theme); }
/* sections that are out of focus stay sharp, and the colour change itself is the divider */
html.static .portfolio .block .description-wrapper,
html.static .portfolio .block .image-wrapper,
html.static #intro-section > *,
html.static #intro-section::before { filter: none !important; opacity: 1 !important; }
html.static .portfolio .article.block::after,
html.static #skills-section::after,
html.static #testimonials-section::after,
html.static #hobbies-section::after { display: none; }
html.static #footer-section { background-image: none; }
html.static .portfolio .article.block::before { background-color: var(--theme); }
/* logos and artwork are fixed per section */
html.static #intro-section picture img { filter: none; }
html.static .portfolio .block-flicket .logo { filter: none; } /* reversed logo: white letters, orange full stop */

/* Flicket: black with a splash of orange, kept behind the teaser graphic */
.portfolio .block.block-flicket .image-wrapper::before {
    inset: -60% -55%;
    background: radial-gradient(closest-side, rgba(238,86,42,.9), rgba(160,40,14,.5) 55%, transparent);
}
/* text always sits above the glow, which spills across from the artwork */
.portfolio .block .description-wrapper { position: relative; z-index: 1; }

/* intro doodles: invert (dark themes) and blur together, since both use the one filter property */
#intro-section::before {
    filter: invert(var(--doodle-inv, 0)) blur(calc(var(--p, 0) * 9px));
    opacity: calc(1 - var(--p, 0) * 0.45);
}
html.static #intro-section::before { filter: none !important; opacity: 1 !important; }
html.static #footer-section::before { filter: invert(1); }

/* ---- wide screens: type and spacing grow gently, the content column grows faster so the page uses the space ----
   html zoom does the gentle scaling (--z); the container is then sized as a share of the screen (72vw), not zoomed to match. */
@media screen and (min-width: 1440px) { html { zoom: 1.08; --z: 1.08; } } /* text stops growing here, matching the article pages */
@media screen and (min-width: 1440px) {
    .container { max-width: calc(min(72vw, 1200px) / var(--z)); } /* same cap as the article pages: 72vw, never wider than 1200px */
}

/* only the text + button and the artwork are links, not the whole section */
.portfolio .block a.block-link { display: block; color: inherit; text-decoration: none; }
.portfolio .block a.block-link-image { width: 100%; }

/* mobile: teaser image first, then the text and button underneath */
@media screen and (max-width: 759px) {
    .portfolio .article.block { display: flex; flex-direction: column; }
    .portfolio .article.block .image-wrapper { order: -1; margin-bottom: 60px; max-width: 420px; } /* single column: cap the artwork so it stays in proportion with the text */
}

/* mobile: left-align (everything was centred) */
@media screen and (max-width: 759px) {
    body #intro-section { align-items: flex-start; text-align: left; }
    .portfolio .block .description-wrapper,
    .portfolio .block .description-wrapper a.block-link { text-align: left; }
    .portfolio .block .logo { margin-left: 0; margin-right: 0; }
    .portfolio .block .cta { margin-left: 0; }
}
@media screen and (max-width: 759px) {
    /* the TV hangs off the screenshot's left edge like on desktop (just less, to stay on screen) */
    .portfolio .device-pair .tv { left: -6%; }
}

/* ====================== header (#nav-section) ======================
   One fixed bar of frosted glass tinted by the section behind it (the script sets --nav-theme / --nav-fg / --nav-fg-soft and the
   nav-dark / nav-top / nav-name classes). It follows the section closely, so its colours change quicker than the page's own fade.
   Until the big name has scrolled away (.nav-name) it is transparent and sits inline in the intro, links hidden. */
#nav-section {
    position: fixed; top: 0; left: 0;
    background-color: color-mix(in srgb, var(--nav-theme, #f5f5f5) 58%, transparent);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 0 rgba(255,255,255,.14), 0 8px 24px -8px rgba(0,0,0,.25);
    transition: background-color 200ms ease-out, box-shadow 200ms ease-out, transform 280ms cubic-bezier(.2,.7,.2,1);
}
@media (prefers-reduced-motion: reduce) { #nav-section { transition: background-color 150ms ease-out; } }
/* over light sections the glass is whiter (dark sections keep their own tint) */
#nav-section:not(.nav-dark) {
    background-color: color-mix(in srgb, color-mix(in srgb, #ffffff 65%, var(--nav-theme, #f5f5f5)) 72%, transparent);
}
/* at the very top of the page the header is part of the intro: no glass, no shadow */
#nav-section.nav-top { background-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
/* before the name has scrolled away: inline with the intro, no glass, and no swallowing clicks meant for the links under it */
#nav-section:not(.nav-name) {
    position: absolute; top: 0; pointer-events: none;
    background-color: transparent; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
}
@media screen and (min-width: 760px) { #nav-section:not(.nav-name) { top: 122px; } }
#nav-section:not(.nav-name) a.nav { display: none; } /* Portfolio lives in the row under the name until then */
/* returning to the top: switch to the inline state instantly, so the glass bar doesn't fade out in its new position */
#nav-section:not(.nav-name), #nav-section:not(.nav-name) #site-logo { transition: none; }
#nav-section.nav-name { animation: navIn 220ms ease-out; }
@keyframes navIn { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #nav-section.nav-name { animation: none; } }
/* leaving: back at the intro the bar slides up and fades before it drops into its inline spot (class added by the script in index.html) */
/* phones: hidden while scrolling down, back on scroll up (class set by the script in index.html) */
#nav-section.nav-name.nav-away {
    transform: translateY(calc(-100% - 2rem));
    visibility: hidden; /* switched off once it has slid away (as on the article pages), so Safari doesn't keep a bar at the top of the screen */
    transition: transform 280ms cubic-bezier(.2,.7,.2,1), visibility 0s linear 280ms;
}
#nav-section.nav-out { transform: translateY(calc(-100% - 2rem)); opacity: 0; animation: none; transition: transform 280ms cubic-bezier(.2,.7,.2,1), opacity 220ms ease-out; }

/* links: follow the section colour */
#nav-section a.nav { color: var(--nav-fg-soft, #666); }
#nav-section a.current { color: var(--nav-fg, #333); border-bottom-color: var(--nav-fg, #333); }
#nav-section a.nav, #nav-section a.current { transition: color 150ms ease-out, border-color 150ms ease-out; }
#nav-section a:hover:not(.current) { color: var(--nav-fg, #191919); }

/* small serif name in the header: hidden while the big one is on screen, fades in once it scrolls past */
#nav-section #site-logo {
    font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 21px; line-height: 60px;
    height: auto; padding-top: 0; white-space: nowrap; text-decoration: none; letter-spacing: -0.005em;
    color: var(--nav-fg, #4a4a4a);
    opacity: 0; transform: translateY(6px); pointer-events: none;
    transition: opacity 200ms ease-out, transform 200ms ease-out, color 150ms ease-out;
}
#nav-section.nav-name #site-logo { opacity: 1; transform: none; pointer-events: auto; }
/* selected underline on the small name while the intro is behind the header */
#nav-section #site-logo.current { line-height: 57px; border-bottom: 3px solid var(--nav-fg, #333); }

/* single scrolling page: smooth in-page nav */
/* smooth scrolling is applied per click in index.html, so arriving on a #hash never animates */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* keep the artwork glow inside its own section (it was spilling up into the previous one on mobile) */
/* clip-path rather than overflow-y: clip, which Safari also applies sideways and cuts the full-width colour bands down to the column */
.portfolio .article.block { clip-path: inset(-1px -100vw); } /* -1px keeps the band overlap above */

/* ---- intro: left-aligned statement + photo (replaces the centred avatar / name layout) ---- */
body #intro-section {
    display: block; height: auto; min-height: 0; text-align: left;
    padding: 90px 0 90px;
}
#intro-section::before { background-image: none; }
#intro-section .intro-inner { padding-top: 0; padding-bottom: 0; }
.intro-columns { display: flex; flex-direction: column; gap: 40px; }
.intro-large { font-family: "Fraunces", Georgia, serif; font-weight: 650; font-size: 32px; line-height: 1.25; letter-spacing: -.01em; color: var(--fg); margin: 0 0 28px; transition: color 600ms ease; } /* the lead line uses the same Fraunces style as the case studies' sub-headings (weight 650, the headings' optical size), just larger */
@media (max-width: 540px) { .intro-large { font-size: 26px; } }
.intro-medium { font-family: "Instrument Sans"; font-size: 22px; line-height: 1.6; color: var(--fg-soft); margin: 0; transition: color 600ms ease; }
.intro-photo img { display: block; width: 100%; height: auto; border-radius: 6px; }
@media screen and (min-width: 760px) {
    body #intro-section { padding: 110px 0 110px; }
    .intro-columns { flex-direction: row; align-items: center; gap: 140px; }
    .intro-text { flex: 1.3; }
    .intro-photo { flex: 1; }
}

/* ---- name heading in the CV's serif ---- */
/* Fraunces with its optical-size axis: it draws finer, higher-contrast letters at large sizes and sturdier ones at small sizes (font-optical-sizing is on by default) */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2?v=2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
#intro-section .intro-name {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--fg);
    margin: 0 0 32px;
    text-transform: none;
    transition: color 600ms ease;
}
@media screen and (min-width: 760px) {
    #intro-section .intro-name { font-size: 60px; margin-bottom: 48px; }
}

/* no doodles in the footer banner */
#footer-section::before { background-image: none !important; }

/* ---- section headings in Fraunces, like the CV's job and skill titles ---- */
.portfolio .block .title,
#skills-section .skill h4 {
    font-family: "Fraunces", Georgia, serif;
    font-weight: 650;
    letter-spacing: -0.01em;
}
.portfolio .block .title { line-height: 1.15; }
@media screen and (min-width: 760px) { .portfolio .block .title { font-size: 32px; } }

/* Geckoboard wordmark at full size */
.portfolio .block-geckoboard .logo { zoom: 1; height: 38px; width: auto; }
/* Xero badge: a touch larger than the default */
.portfolio .block-xero .logo { zoom: 1; height: 24px; width: auto; }

/* Flicket: a touch more room under the logo */
.portfolio .logo.logo-flicket { margin-bottom: 52px; }

/* Mobile: keep the headshot modest relative to the text */
@media (max-width: 759px) {
    .intro-inner { display: flex; flex-direction: column; }
    .intro-columns { display: contents; }
    .intro-photo { max-width: 180px; order: -1; margin-bottom: 36px; }
}

/* The glows extend past the screen edge; clip them at the page so phones do not widen the layout viewport */
html, body { overflow-x: clip; }

/* wide screens: top-align the text with the photo and stop the photo growing with the window, so the text doesn't float in a tall column */
@media screen and (min-width: 760px) {
    .intro-columns { align-items: flex-start; }
    .intro-photo { max-width: 360px; margin-left: auto; }
}

/* intro call to action: outlined like the Read more buttons, fills on hover */
.intro-cta {
    display: inline-block; margin-top: 32px;
    padding: 0.7em 1.6em; border: 1px solid var(--fg-soft); border-radius: 999px;
    background-color: transparent; color: var(--fg);
    font-family: "Instrument Sans"; font-size: 17px; line-height: 1em; text-decoration: none;
    transition: background-color 250ms, border-color 250ms, color 250ms;
}
@media screen and (hover: hover) {
    .intro-cta:hover { background-color: var(--fg); border-color: var(--fg); color: var(--theme); }
}
.intro-cta:focus-visible { background-color: var(--fg); border-color: var(--fg); color: var(--theme); outline: none; }

/* both intro paragraphs share the main text colour */
#intro-section .intro-medium { color: var(--fg); }

/* intro contact buttons: the footer's Email / LinkedIn / Resume pills, in place of the single CTA */
.intro-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.intro-buttons .intro-cta { margin-top: 0; }
.intro-cta .ico {
    display: inline-block; padding-left: 32px; line-height: 20px;
    background-size: 20px 20px; background-position: left center; background-repeat: no-repeat;
}
.ico-email    { background-image: url("images/icon-email-dark.svg"); }
.ico-linkedin { background-image: url("images/icon-linkedin-dark.svg"); }
.ico-cv       { background-image: url("images/icon-cv-dark.svg"); }
@media screen and (hover: hover) {
    .intro-cta:hover .ico-email    { background-image: url("images/icon-email-white.svg"); }
    .intro-cta:hover .ico-linkedin { background-image: url("images/icon-linkedin-white.svg"); }
    .intro-cta:hover .ico-cv       { background-image: url("images/icon-cv-white.svg"); }
}
/* on wider screens keep the three pills on one row, even if that runs a little past the text column (the gap to the photo absorbs it) */
@media screen and (min-width: 760px) {
    .intro-buttons { flex-wrap: nowrap; width: max-content; max-width: none; }
}

/* intro contact buttons become simple text links */
.intro-buttons { gap: 28px; margin-top: 28px; }
.intro-buttons .intro-cta,
.intro-buttons .intro-cta:hover,
.intro-buttons .intro-cta:focus-visible {
    padding: 0; border: 0; border-radius: 0; background: none; color: var(--fg);
    font-size: 19px; line-height: 1.4;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
    text-decoration-color: var(--fg-soft);
    transition: text-decoration-color 200ms;
}
.intro-buttons .intro-cta:hover,
.intro-buttons .intro-cta:focus-visible { text-decoration-color: var(--fg); }
.intro-buttons .ico,
.intro-buttons .intro-cta:hover .ico { background-image: none; padding-left: 0; }
.intro-buttons .ico { display: inline; }

/* contact links sit directly under the name */
#intro-section .intro-name { margin-bottom: 18px; }
@media screen and (min-width: 760px) { #intro-section .intro-name { margin-bottom: 22px; } }
.intro-inner > .intro-buttons { margin-top: 0; margin-bottom: 48px; }

/* no underline on the intro links until hover (or keyboard focus) */
.intro-buttons .intro-cta { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 7px; transition: text-decoration-color 200ms; }
.intro-buttons .intro-cta:hover,
.intro-buttons .intro-cta:focus-visible { text-decoration: underline; text-decoration-color: currentColor; text-underline-offset: 7px; outline: none; }

/* links above the name */
.intro-inner > .intro-buttons { margin-top: 0; margin-bottom: 20px; }
#intro-section .intro-name { margin-bottom: 36px; }
@media screen and (min-width: 760px) { #intro-section .intro-name { margin-bottom: 44px; } }

/* mobile: the links come first, above the photo */
@media (max-width: 759px) {
    .intro-inner > .intro-buttons { order: -2; margin-bottom: 32px; }
}

/* mobile: links sit near the very top; more room between the photo and the name */
@media (max-width: 759px) {
    body #intro-section { padding-top: 26px; }
    .intro-photo { margin-bottom: 64px; }
}

/* mobile spacing: links, then a clear gap, photo, a clear gap, and the name grouped tightly with the text under it */
@media (max-width: 759px) {
    body #intro-section { padding-top: 30px; }
    .intro-inner > .intro-buttons { margin-bottom: 42px; gap: 24px; }
    .intro-buttons .intro-cta, .intro-buttons .intro-cta:hover, .intro-buttons .intro-cta:focus-visible { font-size: 17px; }
    .intro-photo { margin-bottom: 50px; }
    #intro-section .intro-name { margin-bottom: 20px; }
}

/* desktop spacing, same idea as mobile: links up top with a clear gap, then the name grouped tightly with the text under it */
@media screen and (min-width: 760px) {
    body #intro-section { padding-top: 84px; }
    .intro-inner > .intro-buttons { margin-bottom: 64px; }
    #intro-section .intro-name { margin-bottom: 28px; }
}

/* desktop: the photo starts level with the top of the name (the name and the text share the left column, the photo spans both rows on the right) */
@media screen and (min-width: 760px) {
    .intro-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); column-gap: 140px; align-items: start; }
    .intro-inner > .intro-buttons { grid-column: 1 / -1; grid-row: 1; justify-self: start; }
    .intro-inner > .intro-name { grid-column: 1; grid-row: 2; }
    .intro-columns { display: contents; }
    .intro-text { grid-column: 1; grid-row: 3; }
    .intro-photo { grid-column: 2; grid-row: 2 / span 2; justify-self: end; width: 100%; max-width: 360px; margin-left: 0; margin-top: var(--photo-nudge, 0px); }
}
/* the name's glyphs start a little below its line box, so nudge the photo down to meet the letters */
@media screen and (min-width: 760px) { .intro-photo { --photo-nudge: 10px; } }

/* menu is there from the first frame on arrival (see the script at the end of index.html) */
html.nav-still #nav-section, html.nav-still #nav-section * { transition: none !important; animation: none !important; }
#nav-section.no-in { animation: none !important; }


/* ================= intro redesign (Dec 2026): giant display name, light grey rules, photo centred with a colour glow ================= */
#intro-section { --t-theme: #ffffff; --t-shade: #f0f0f0; } /* crisp white, so the hand-over to the dark project block is sharp */
#intro-section .intro-name {
    font-variation-settings: "opsz" 144; font-weight: 900; letter-spacing: -.045em;
    font-size: clamp(64px, 10.5vw, 150px); line-height: .84; padding-bottom: .04em; margin-bottom: 0;
}
#intro-section .intro-name span { display: block; }
.intro-text { max-width: 34rem; }
.intro-large {
    font-family: "Instrument Sans", sans-serif; font-variation-settings: normal; font-weight: 600;
    font-size: clamp(24px, 2.4vw, 32px); line-height: 1.15; letter-spacing: -.02em;
    margin: 40px 0 0; padding-top: 16px; border-top: 1px solid #d4d4d4;
}
#intro-section .intro-medium { font-size: 18px; line-height: 1.6; color: #333; margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #d4d4d4; }
/* soft light in the project colours behind the photo */
.intro-photo { position: relative; }
.intro-photo::before {
    content: ""; position: absolute; left: -18%; right: -18%; top: 8%; bottom: -12%; z-index: 0; border-radius: 50%; pointer-events: none;
    background: radial-gradient(40% 45% at 30% 35%, rgba(255,90,31,.75), transparent 70%), radial-gradient(40% 45% at 75% 40%, rgba(122,76,240,.65), transparent 70%), radial-gradient(45% 40% at 50% 85%, rgba(19,181,234,.55), transparent 70%);
    filter: blur(30px);
}
.intro-photo img { position: relative; z-index: 1; }
@media screen and (min-width: 760px) {
    .intro-inner > .intro-buttons { justify-self: end; }
    .intro-buttons .intro-cta, .intro-buttons .intro-cta:hover, .intro-buttons .intro-cta:focus-visible { font-size: 17px; }
    .intro-photo { align-self: center; --photo-nudge: 0px; } /* centred against the name and text together */
}
/* phones: links, name, photo, then the text */
@media (max-width: 759px) {
    #intro-section .intro-name { order: -1; font-size: min(calc((max(100vw, 300px) - 48px) / 3.05), 160px); } /* "Denton" spans the column */
    .intro-photo { order: -1; margin: 30px 0 0; max-width: none; width: 100%; } /* full column width */
}
