/* dustincremascoli.com
   Hand-written, no framework, no webfonts, no network requests.
   Replaces the original site's HTML5 UP template + jQuery + 2.8 MB FontAwesome.
   ------------------------------------------------------------------------- */

/* ----------------------------------------------------------------- tokens */
:root {
  color-scheme: light dark;

  --bg:          #ffffff;
  --bg-alt:      #f5f7fa;
  --bg-raise:    #ffffff;
  --fg:          #17202a;
  --fg-muted:    #5a6672;
  --fg-faint:    #7d8894;
  --border:      #e2e8f0;
  --border-firm: #cbd5e1;

  --accent:      #0b6bcb;
  --accent-fg:   #ffffff;
  --accent-soft: #e8f1fd;
  --accent-hover:#0956a8;
  --live:        #16a34a;
  --live-halo:   rgba(22,163,74,.20);

  --ok:          #0f7b4f;
  --ok-soft:     #e6f6ee;
  --err:         #b3261e;
  --err-soft:    #fdeceb;

  --radius:      14px;
  --radius-sm:   9px;
  --radius-lg:   22px;

  --shadow-sm: 0 1px 2px rgb(16 24 40 / .06), 0 1px 3px rgb(16 24 40 / .05);
  --shadow-md: 0 4px 6px -2px rgb(16 24 40 / .05), 0 12px 16px -4px rgb(16 24 40 / .08);
  --shadow-lg: 0 8px 8px -4px rgb(16 24 40 / .04), 0 20px 24px -4px rgb(16 24 40 / .10);

  --step--1: clamp(.83rem, .8rem + .12vw, .9rem);
  --step-0:  clamp(1rem, .96rem + .18vw, 1.09rem);
  --step-1:  clamp(1.18rem, 1.1rem + .38vw, 1.42rem);
  --step-2:  clamp(1.45rem, 1.3rem + .75vw, 2rem);
  --step-3:  clamp(1.8rem, 1.5rem + 1.5vw, 2.85rem);
  --step-4:  clamp(2.2rem, 1.7rem + 2.6vw, 3.9rem);

  --container: 1140px;
  --gutter: clamp(1.15rem, 3vw, 2.25rem);
  --section-y: clamp(3.6rem, 8vw, 7rem);

  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;
}

/* Dark theme: follows the OS by default, and the toggle's data-theme wins in
   both directions so a visitor can override their system preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:          #0e1116;
    --bg-alt:      #141a22;
    --bg-raise:    #171e27;
    --fg:          #e8edf4;
    --fg-muted:    #a2aebd;
    --fg-faint:    #7d8a9a;
    --border:      #242e3a;
    --border-firm: #33404f;

    --accent:      #61a8ff;
    --accent-fg:   #06121f;
    --accent-soft: #14293f;
    --accent-hover:#8cc0ff;
    --live:        #34d399;
    --live-halo:   rgba(52,211,153,.22);

    --ok:          #4ecb8f;
    --ok-soft:     #10291f;
    --err:         #ff8b82;
    --err-soft:    #2d1614;

    --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
    --shadow-md: 0 6px 18px rgb(0 0 0 / .45);
    --shadow-lg: 0 14px 34px rgb(0 0 0 / .5);
  }
}

/* Tell the browser which scheme is active so native widgets — form controls,
   scrollbars, the canvas behind the page — match the theme we picked, rather
   than following the OS. */
:root[data-theme="dark"]  { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] {
  --bg:          #0e1116;
  --bg-alt:      #141a22;
  --bg-raise:    #171e27;
  --fg:          #e8edf4;
  --fg-muted:    #a2aebd;
  --fg-faint:    #7d8a9a;
  --border:      #242e3a;
  --border-firm: #33404f;

  --accent:      #61a8ff;
  --accent-fg:   #06121f;
  --accent-soft: #14293f;
  --accent-hover:#8cc0ff;
  --live:        #34d399;
  --live-halo:   rgba(52,211,153,.22);

  --ok:          #4ecb8f;
  --ok-soft:     #10291f;
  --err:         #ff8b82;
  --err-soft:    #2d1614;

  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --shadow-md: 0 6px 18px rgb(0 0 0 / .45);
  --shadow-lg: 0 14px 34px rgb(0 0 0 / .5);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  background: var(--bg);
  color: var(--fg);
  font: var(--step-0)/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
code { font-family: var(--mono); font-size: .9em; background: var(--bg-alt);
       padding: .12em .38em; border-radius: 5px; border: 1px solid var(--border); }

h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.018em; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); }
p  { text-wrap: pretty; }

:where(a, button, input, textarea, [tabindex]):focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--accent-fg);
  padding: .7rem 1.1rem; border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------- layout */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section--page { padding-top: clamp(2.4rem, 6vw, 4rem); }

.section-head { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head--wide { max-width: 80ch; }
.section-tagline { color: var(--fg-muted); font-size: var(--step-1); margin-top: .7rem; }
.section-more { margin-top: clamp(1.8rem, 3vw, 2.6rem); }

/* Closing prompt that walks the reader into the next section. */
.section-outro { margin-top: clamp(2rem, 4vw, 3rem); max-width: 62ch; }
.section-outro p { color: var(--fg-muted); font-size: var(--step-1); }
.section-outro .btn { margin-top: 1.1rem; }

.eyebrow {
  font-size: var(--step--1); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .5rem;
}

.ico { width: 1.25em; height: 1.25em; flex: none; }
.ico--xs { width: 1em; height: 1em; }

/* ---------------------------------------------------------------- banner */
/* The strip above the header pointing at the SQL explorer demo.
   Markup: partials/banner.html. Switched off via content.BANNER = None.

   NOT sticky, deliberately. .site-header below is `position: sticky; top: 0`,
   and making the banner sticky too would need both to agree on their heights
   forever -- the header would either overlap the banner or leave a gap under it
   the moment the banner wraps to two lines on a phone. This scrolls away and the
   header stays; the nav carries a "SQL Explorer" link for anyone who wants it
   after scrolling. */
.site-banner {
  display: block;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  text-decoration: none;
  font-size: .875rem;
}
.site-banner:hover {
  background: color-mix(in srgb, var(--accent-soft) 70%, var(--accent) 30%);
  color: var(--fg);
}
.site-banner-inner {
  display: flex; align-items: center; gap: .625rem;
  min-height: 40px; padding-block: .375rem;
  /* Wraps rather than truncating: the detail line is the part that identifies
     what the demo actually is, so it must not be the bit that disappears. */
  flex-wrap: wrap;
}
.site-banner-tag {
  flex: none;
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--accent); color: var(--accent-fg);
  font-size: .6875rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase;
  padding: .125rem .4rem; border-radius: 999px;
}
/* The tag sits on a solid accent fill, so the green live dot would sink into it.
   --accent-fg is the one colour guaranteed to contrast with --accent in BOTH
   themes, since that pairing is what makes the tag's own text readable. */
.site-banner-tag .nav-dot {
  background: var(--accent-fg);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-fg) 28%, transparent);
}
.site-banner-text   { font-weight: 600; }
.site-banner-detail { color: var(--fg-muted); font-size: .8125rem; }
.site-banner .ico--xs { flex: none; transition: transform .15s; }
.site-banner:hover .ico--xs { transform: translateX(3px); }

@media (max-width: 640px) {
  /* The stack identifiers are the first thing to go on a narrow screen — the
     headline sentence already says what it is. */
  .site-banner-detail { display: none; }
}

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.is-stuck { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }

.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #7b4bff));
  color: #fff; font-weight: 800; font-size: .88rem; letter-spacing: .02em;
  display: grid; place-items: center;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; flex: none; }
/* Both lines stay on one line each. The header gained three app pills in
   2026-08, and the brand was the only shrinkable item in the row -- it
   wrapped to four lines rather than letting the nav overflow. The nav now
   collapses to the mobile menu earlier instead (see the 1040px breakpoint). */
.brand-text strong, .brand-text small { white-space: nowrap; }
.brand-text strong { font-size: .97rem; }
.brand-text small { color: var(--fg-muted); font-size: .78rem; }

/* Accessible-only text. Used to tell a screen reader what a nav pill's dot and
   arrow convey visually — that the target is a separate running application. */
.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;
}

.nav-groups { display: flex; align-items: center; gap: .1rem; }
.primary-nav ul { display: flex; align-items: center; gap: .2rem; list-style: none; padding: 0; margin: 0; }
.primary-nav a {
  display: inline-flex; align-items: center; gap: .32rem;
  padding: .5rem .6rem; border-radius: var(--radius-sm);
  color: var(--fg-muted); text-decoration: none; font-size: .93rem; font-weight: 550;
  white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.primary-nav a:hover { color: var(--fg); background: var(--bg-alt); }

/* The separation between "moves you around this page" and "launches a separate
   application". On a wide screen that is a rule; the heading below replaces it
   in the mobile menu. */
.nav-divider {
  flex: none; width: 1px; height: 20px;
  background: var(--border-firm); margin-inline: .6rem;
}
.nav-group-heading { display: none; }

/* App pills. The outline says "this is a destination, not a section", and the
   dot says "it is running right now" — this site's whole point is that these
   are live services, not screenshots. */
.primary-nav .nav-link--app {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding-inline: .6rem .55rem;
}
.primary-nav .nav-link--app:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--fg);
}
.nav-dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: var(--live); box-shadow: 0 0 0 3px var(--live-halo);
}
/* Nudged down a hair: the arrow glyph sits high in its box next to a dot. */
.primary-nav .nav-link--app .ico--xs { opacity: .65; }
.primary-nav .nav-link--app:hover .ico--xs { opacity: 1; }

/* Résumé, alone between the two dividers. The only accent-filled item in the
   header: a recruiter's whole visit can be this one link, and it was previously
   the fifth of five identical grey text links. Deliberately NOT a solid
   --accent fill -- that would compete with the brand mark and the hero button.
   Scoped under .primary-nav because `.primary-nav a` is (0,1,1) and would
   otherwise win `color`, `padding` and the hover background. */
.primary-nav .nav-link--doc {
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  padding-inline: .7rem .78rem;
}
.primary-nav .nav-link--doc:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}
.primary-nav .nav-link--doc .ico--xs { opacity: .8; }
.primary-nav .nav-link--doc:hover .ico--xs { opacity: 1; }

.theme-toggle, .nav-toggle {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  background: transparent; border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--fg-muted); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover, .nav-toggle:hover { color: var(--fg); border-color: var(--border-firm); background: var(--bg-alt); }
.theme-toggle .ico { grid-area: 1 / 1; }

/* Show the icon for the mode you'd switch *to*. */
.theme-toggle .ico--moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ico--moon { display: block; }
:root[data-theme="dark"] .theme-toggle .ico--sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ico--moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .ico--sun { display: none; }
}

.nav-toggle { display: none; }
.nav-toggle .ico { grid-area: 1 / 1; }
.nav-toggle .ico--close { display: none; }
.nav-toggle[aria-expanded="true"] .ico--close { display: block; }
.nav-toggle[aria-expanded="true"] .ico--menu { display: none; }

@media (max-width: 1040px) {
  .nav-toggle { display: grid; order: 3; }
  .theme-toggle { order: 2; }
  /* Keep the name on one line; the role subtitle is redundant once the
     hero states it, and at narrow widths it wraps to three lines. */
  .brand-text strong { white-space: nowrap; }
  .brand-text small { display: none; }
  /* flex-basis:100% only moves the nav to its own line if the row can wrap. */
  .header-inner { flex-wrap: wrap; }
  .primary-nav {
    order: 4; flex-basis: 100%;
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .28s ease;
  }
  .primary-nav > .nav-groups { overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav.is-open { grid-template-rows: 1fr; }
  .primary-nav.is-open > .nav-groups { padding-block: .5rem 1rem; }
  .primary-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-nav a { padding: .72rem .6rem; font-size: 1rem; border-radius: var(--radius-sm); }

  /* A vertical rule means nothing in a stacked menu; a heading does. */
  .nav-divider { display: none; }
  .nav-group--apps { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--border); }
  .nav-group-heading {
    display: block; padding: .5rem .6rem .25rem;
    font-size: .72rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--fg-faint);
  }
  /* Full-width rows read better than pills in a stacked menu, but the dot stays
     -- it is the part that says these are running services. */
  .primary-nav .nav-link--app { border: 0; border-radius: var(--radius-sm); padding-inline: .6rem; }
  .primary-nav .nav-link--app:hover { background: var(--bg-alt); }
  /* Same reasoning as the pills: a full-width row reads better than a lozenge in
     a stacked menu. The accent colour is what carries the prominence here. */
  .nav-group--doc { margin-top: .35rem; padding-top: .35rem; border-top: 1px solid var(--border); }
  .primary-nav .nav-link--doc {
    border: 0; border-radius: var(--radius-sm); background: transparent;
    padding-inline: .6rem;
  }
  .primary-nav .nav-link--doc:hover { background: var(--accent-soft); color: var(--accent); }
}

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative;
  padding-block: clamp(2.8rem, 7vw, 5.5rem) clamp(2.4rem, 5vw, 4rem);
  background:
    radial-gradient(120% 90% at 88% -20%, var(--accent-soft), transparent 62%),
    radial-gradient(90% 70% at -10% 10%, color-mix(in srgb, var(--accent-soft) 70%, transparent), transparent 60%);
}
.hero-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr);
}
.hero h1 { margin-block: .3rem .8rem; }
.lede { font-size: var(--step-1); color: var(--fg); font-weight: 500; }
.hero-body { color: var(--fg-muted); margin-top: .9rem; max-width: 56ch; }

.hero-portrait img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  filter: grayscale(1);
}

.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.7rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.3rem; border-radius: 999px;
  font-weight: 620; font-size: .96rem; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:active { transform: translateY(1px); }
.btn .ico { transition: transform .18s; }
.btn:hover .ico { transform: translateX(3px); }

.btn--primary { background: var(--accent); color: var(--accent-fg); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-fg); box-shadow: var(--shadow-md); }
.btn--ghost { border-color: var(--border-firm); color: var(--fg); background: var(--bg-raise); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.stat-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; margin-top: clamp(2.4rem, 5vw, 3.6rem);
  background: var(--border); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.stat { background: var(--bg-raise); padding: 1.2rem 1.35rem; }
.stat dt { font-size: var(--step-2); font-weight: 750; letter-spacing: -.02em; color: var(--accent); }
.stat dd { color: var(--fg-muted); font-size: var(--step--1); margin-top: .2rem; }

/* ----------------------------------------------------------------- cards */
.card-grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.7rem); }
/* Expertise runs 2x2, not 3-up. Four cards in the portfolio's auto-fit 3-column
   grid would strand a lone card on a second row; a wider minmax gives two roomy
   columns on a laptop and still collapses to one on a phone. It also keeps the
   two sections visually distinct instead of stacking two identical 3-up grids. */
.card-grid--2x2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }

.card-grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 292px), 1fr));
  /* Every row the same height, not just every card within a row. Grid rows are
     sized independently by default, so a wordier card in the top row left the
     portfolio with three tall cards above three short ones. Card actions
     already pin to the bottom via `margin-top: auto`, so the extra space lands
     as padding rather than stranding the links mid-card.

     This equalises rows, it does not cap them: one overlong blurb now grows
     every row instead of one. Keep card copy to roughly 100-175 characters. */
  grid-auto-rows: 1fr;
}

.card {
  display: flex; flex-direction: column;
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.card:hover { border-color: var(--border-firm); box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.05rem;
}
.card-icon .ico { width: 1.45rem; height: 1.45rem; }
/* Expertise cards carry a line-art motif in the bottom-right corner: ornament
   that says what the card says, sitting behind the copy. The card clips it so
   the drawing can bleed past the corner, `isolation` keeps the stacking to this
   card, and the copy is lifted a layer above it — an absolutely positioned
   element otherwise paints over in-flow text. */
.card--expertise { position: relative; overflow: hidden; isolation: isolate; }
.card--expertise > :not(.card-motif) { position: relative; z-index: 1; }

.card-motif {
  /* Inset rather than bled off the corner: the drawings end in something
     legible — a rack, a terminal, a database — and slicing that reads as a
     rendering bug rather than a flourish. */
  position: absolute; z-index: 0; right: .6rem; bottom: .55rem;
  width: clamp(112px, 38%, 152px); aspect-ratio: 150 / 110;
  color: var(--accent); opacity: .17; pointer-events: none;
  /* Fades outward from the corner it occupies, so no text ever sits on a
     stroke dark enough to fight it. Radial, not diagonal: a linear fade cuts
     the far side of each drawing clean off mid-stroke. */
  -webkit-mask-image: radial-gradient(140% 140% at 100% 100%, #000 45%, transparent 100%);
          mask-image: radial-gradient(140% 140% at 100% 100%, #000 45%, transparent 100%);
  transition: opacity .18s, transform .18s;
}
.card--expertise:hover .card-motif { opacity: .26; transform: translate(-2px, -3px); }

/* Thin light strokes on a dark card read fainter than the same strokes on a
   white one, so the dark theme gets a little more of them. */
:root[data-theme="dark"] .card-motif { opacity: .2; }
:root[data-theme="dark"] .card--expertise:hover .card-motif { opacity: .32; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .card-motif { opacity: .2; }
  :root:not([data-theme="light"]) .card--expertise:hover .card-motif { opacity: .32; }
}

.card h3 { margin-bottom: .55rem; }
.card p { color: var(--fg-muted); font-size: .97rem; }

.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin-top: 1.05rem; }
.tag-list li {
  font-size: .76rem; font-weight: 600; letter-spacing: .015em;
  color: var(--fg-muted); background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 999px; padding: .24rem .6rem;
}
.section--alt .tag-list li { background: var(--bg); }

.card-link {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1.15rem; font-weight: 600; font-size: .93rem; text-decoration: none;
}
.card-link:hover { text-decoration: underline; }

/* project cards */
.card--project { padding: 0; overflow: hidden; }
.card--featured { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.card-media { display: block; background: var(--bg-alt); }
.card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .35s ease; }
.card--project:hover .card-media img { transform: scale(1.035); }
.card-body { padding: 1.35rem 1.45rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 a { color: inherit; text-decoration: none; }
.card-body h3 a:hover { color: var(--accent); }
.card-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: auto; padding-top: 1.15rem; }
.card-actions a {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .89rem; font-weight: 600; text-decoration: none;
}
.card-actions a:hover { text-decoration: underline; }

/* --------------------------------------------------------------- viz grid */
.viz-grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.7rem);
            grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }

.viz-tile {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.viz-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-md); transform: translateY(-2px); color: inherit; }
.viz-tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.viz-tile-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.viz-tile-body h2, .viz-tile-body h3 { font-size: var(--step-1); margin-bottom: .5rem; }
.viz-tile-body p { color: var(--fg-muted); font-size: .95rem; }
.viz-tile-cta {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: auto; padding-top: 1.1rem;
  color: var(--accent); font-weight: 650; font-size: .92rem;
}
.viz-tile:hover .viz-tile-cta { text-decoration: underline; }

.note-list { list-style: none; padding: 0; margin-top: 1.4rem; display: grid; gap: .6rem; }
.note-list li { display: flex; gap: .6rem; color: var(--fg-muted); font-size: .97rem; }
.note-list .ico { color: var(--ok); margin-top: .35em; }

.notice {
  display: flex; gap: .6rem; margin-top: 1.6rem; padding: .85rem 1.05rem;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius-sm); color: var(--fg); font-size: .92rem;
}
.notice .ico { margin-top: .3em; color: var(--accent); }

/* --------------------------------------------------------------- contact */
.section--contact { background: var(--bg-alt); border-top: 1px solid var(--border); }
.contact-grid {
  display: grid; gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start;
}
.contact-copy h2 { margin-block: .3rem .8rem; }
.contact-list { list-style: none; padding: 0; margin-top: 1.7rem; display: grid; gap: .85rem; }
.contact-list li { display: flex; align-items: center; gap: .7rem; }
.contact-list .ico { color: var(--accent); }
.contact-list a { font-weight: 550; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.contact-form {
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: var(--radius); padding: clamp(1.3rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-sm); display: grid; gap: 1rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 620; color: var(--fg-muted); }
.field input, .field textarea {
  width: 100%; padding: .72rem .9rem;
  background: var(--bg); color: var(--fg);
  border: 1px solid var(--border-firm); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 20%, transparent);
}
.field textarea { resize: vertical; min-height: 120px; }
/* Honeypot — off-screen rather than display:none, which some bots detect. */
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; margin-top: .3rem; }

/* ---------------------------------------------------------------- flashes */
.flash-wrap { display: grid; gap: .6rem; padding-top: 1.4rem; }
.flash {
  display: flex; align-items: center; gap: .6rem;
  padding: .8rem 1.05rem; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 520; border: 1px solid transparent;
}
.flash--success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 32%, transparent); }
.flash--error   { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 32%, transparent); }

/* ----------------------------------------------------------------- error */
.error-page { text-align: center; padding-block: clamp(4rem, 12vw, 8rem); }
.error-code { font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; line-height: 1;
              color: var(--accent); opacity: .22; letter-spacing: -.04em; }
.error-page h1 { font-size: var(--step-3); margin-block: .3rem 1rem; }
.error-page .lede { color: var(--fg-muted); }
.error-page .cta-row { justify-content: center; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg); padding-block: 2.2rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 1.6rem; align-items: center; justify-content: space-between; }
.footer-meta { color: var(--fg-faint); font-size: .88rem; }
.footer-meta .sep { margin-inline: .45rem; }
/* Mixed row: some links carry an icon (GitHub, LinkedIn), some are text only
   (Visualizations, API). Without an explicit align-items the list items stretch
   and the two kinds sit on different center lines, so center them all and give
   every item a shared line-height. */
.footer-links {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .55rem 1.35rem; list-style: none; padding: 0; margin: 0;
}
.footer-links li { display: flex; align-items: center; }
.footer-links a {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--fg-muted); text-decoration: none; font-size: .88rem; font-weight: 550;
  line-height: 1.5; padding-block: .15rem;
}
/* Slightly smaller than the global 1.25em so an icon+text link is the same
   optical height as a text-only one. */
.footer-links .ico { width: 1.05em; height: 1.05em; }
.footer-links a:hover { color: var(--accent); }

/* The footer's two navigation rows. Same job as .primary-nav at the top of the
   page, and the same data behind it — see partials/footer.html.

   Two columns on a wide screen and stacked below 620px. They are NOT a single
   flat list: "This page" and "Everything here" make different promises (an
   anchor on this document vs. a separate running service), which is the same
   distinction the header draws with its dividers. */
.footer-nav {
  display: flex; flex-wrap: wrap; gap: 1.4rem 3.2rem;
  padding-bottom: 1.5rem; margin-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.footer-nav-group { min-width: 0; }
.footer-nav-label {
  margin: 0 0 .5rem; color: var(--fg-faint);
  font-size: .68rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase;
}
.footer-nav-list {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .35rem 1.35rem; list-style: none; padding: 0; margin: 0;
}
.footer-nav-list li { display: flex; align-items: center; }
.footer-nav-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--fg-muted); text-decoration: none;
  font-size: .9rem; font-weight: 550; line-height: 1.5; padding-block: .15rem;
}
.footer-nav-link:hover { color: var(--accent); }
.footer-nav-link .ico--xs { opacity: .55; }
.footer-nav-link:hover .ico--xs { opacity: 1; }
/* The live dot is the header's, and it means the same thing here: a running
   service on the other end, not another part of this document. */
.footer-nav-link--site .nav-dot { box-shadow: 0 0 0 2px var(--live-halo); }
/* The property you are already on. Still a link — muted rather than removed, so
   the row is the same five items on every site that renders it. */
.footer-nav-link.is-current { color: var(--fg-faint); font-weight: 650; }
.footer-nav-link.is-current .nav-dot { background: var(--fg-faint); box-shadow: none; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 620px) {
  /* One-column cards: the copy wraps to more lines and the tag list to more
     rows, so the motif gives up some of the corner rather than sitting under
     half the pills. */
  .card-motif { width: clamp(96px, 32%, 124px); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 260px; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* Entrance animation, opt-out respected via the reduced-motion block above. */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

@media print {
  .site-banner, .site-header, .site-footer, .contact-form, .cta-row, .theme-toggle { display: none !important; }
  .card-motif { display: none !important; }
  body { background: #fff; color: #000; }
  .section, .hero { padding-block: 1rem; }
}
