:root {
  /* Palette lifted straight from the logo: the wordmark's black,
     the banner's steel-blue (#53657a, sampled from logo.jpg), and
     the pale arc line (#b9c7d6) — all sit within a few degrees of
     the same 211–214° hue, so every shade below is that one hue at
     a different lightness/saturation rather than an invented
     corporate blue. */
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --card: #ffffff;
  --ink: #0f1216;
  --muted: #5b6675;
  --slate: #53657a;
  --slate-deep: #2b3744;
  --accent: #2f6291;
  --accent-hover: #24506f;
  --accent-soft: #e8eef4;
  --arc: #b9c7d6;
  --border: #e0e5eb;
  /* Fixed-dark panel tokens (contact block): intentionally do not
     flip with color-scheme, since the panel keeps light text on a
     dark fill in both themes. */
  --panel: #232e39;
  --panel-fg: #eef3f8;
  --panel-muted: #b7c4d1;
  /* Contact panel's own background — a fixed near-black, same value in
     both themes (matching --panel/--panel-fg above, this block never
     flips with color-scheme). Defined here rather than only in the
     dark-mode block below, or the light-mode panel would render with no
     background at all (var() with no match falls back to nothing, not
     to some other token). */
  --contact-panel: #0b0d10;
  --shadow: 0 1px 2px rgba(20, 27, 38, 0.04), 0 8px 24px rgba(20, 27, 38, 0.06);
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  /* Badge palette (tag chips, per-card icon accents, status dot):
     fixed values, not redefined under dark mode like the tokens
     above — always paired with white badge text or used alone, so
     they're picked dark/saturated enough (≥4.5:1 against white) to
     read the same on either page background. */
  --tag-blue: var(--accent);
  --tag-green: #15794f;
  --tag-purple: #6d28d9;
  --tag-orange: #b8460c;
  --tag-pink: #a11d54;
  --tag-cyan: #0b6b81;
  /* Sticky header's own rendered height (nav padding + the .brand img's
     clamp(52px, 9vw, 72px) + its 1px border) — tracked with the same
     curve so `section`'s min-height below is computed against what's
     actually left under the header, not a guess. */
  --header-h: clamp(73px, 10vw, 93px);
}
/* :not([data-theme="light"]) lets the manual toggle (nav .theme-toggle,
   wired up in script.js) override the OS preference — picking "light"
   explicitly keeps the page light even when the system is in dark mode.
   No :not() is needed the other way: :root[data-theme="dark"] below has
   no media condition, so it always wins regardless of OS preference. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0e12;
    --bg-alt: #11151b;
    --card: #131820;
    --ink: #e7ecf2;
    --muted: #93a1b1;
    --slate: #7f93a8;
    --slate-deep: #b7c6d6;
    --accent: #65c454;
    --accent-hover: #8ab4dd;
    --accent-soft: #16222e;
    --arc: #7f93a8;
    --border: #232c37;
    --panel: #1a2530;
    --panel-fg: #eef3f8;
    --panel-muted: #a9b8c8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}
:root[data-theme="dark"] {
  --bg: #0b0e12;
  --bg-alt: #11151b;
  --card: #131820;
  --ink: #e7ecf2;
  --muted: #93a1b1;
  --slate: #7f93a8;
  --slate-deep: #b7c6d6;
  --accent: #65c454;
  --accent-hover: #8ab4dd;
  --accent-soft: #16222e;
  --arc: #7f93a8;
  --border: #232c37;
  --panel: #1a2530;
  --panel-fg: #eef3f8;
  --panel-muted: #a9b8c8;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
}
/* .contact-panel's near-black --contact-panel reads fine against an
   already-dark page, but is a much harsher jump against a light one —
   a dark navy alone was still judged too heavy, so light mode instead
   reuses var(--accent) directly (the same blue .btn.primary already
   uses), with panel-fg/-muted set for readability against it. Dark
   mode is untouched. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --contact-panel: var(--accent);
    --panel-fg: #ffffff;
    --panel-muted: #cfe0f0;
  }
}
:root[data-theme="light"] {
  --contact-panel: var(--accent);
  --panel-fg: #ffffff;
  --panel-muted: #cfe0f0;
}
@font-face {
  font-family: "Niamey";
  src: url("Niamey-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
}
.wrap {
  /* Sections are flex columns with default (stretch) cross-axis
     alignment, which only reaches max-width when a section's content
     is intrinsically wide enough on its own to be clamped there — a
     narrow-content section (e.g. a tile grid) would otherwise shrink
     to fit its content instead. Explicit width makes every section's
     wrap reliably fill up to max-width regardless of its content. */
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.4rem 0;
}
.skip-link:focus {
  left: 0;
}

/* Header */
header.site {
  /* Pins every token the nav's own rules read (--bg, --ink, --muted,
     --accent, --accent-hover, --border) to fixed dark-mode values, so
     the nav bar always renders dark regardless of the page's light/dark
     theme — same technique --panel/--panel-fg already use site-wide for
     the always-dark contact panel, just scoped to this subtree instead
     of :root. */
  --bg: #0b0e12;
  --ink: #e7ecf2;
  --muted: #93a1b1;
  --accent: #65c454;
  --accent-hover: #8ab4dd;
  --border: #232c37;
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
/* 3-column grid (not flex + space-between) specifically so the logo can
   sit dead-center in the bar regardless of how wide the toggle button
   vs. the nav-links/CTA cluster are — the two outer columns just get an
   equal share of whatever space is left over, keeping their own content
   pinned to the outer edges. */
.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}
.brand {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
}
.brand img {
  height: clamp(52px, 9vw, 72px);
  width: auto;
  display: block;
}
.theme-toggle {
  grid-column: 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: none;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle svg {
  width: 16px;
  height: 16px;
}
/* Only one of the two icons shows at a time — whichever mode a click
   would switch TO (sun while dark, so "click for light"; moon while
   light, so "click for dark"). Default (no override, OS light) shows
   moon; the three rules below cover OS-dark, explicit light and
   explicit dark respectively, mirroring the :root token overrides
   above so the icon always matches what's actually on screen. */
.theme-toggle .icon-sun {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: inline-flex;
  }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: inline-flex;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="light"] .theme-toggle .icon-moon {
  display: inline-flex;
}
.nav-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.92rem;
  font-weight: 500;
}
.nav-links a {
  text-decoration: none;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--accent);
}
.nav-cta {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.95rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: var(--bg) !important;
  font-weight: 600;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-cta {
    background: var(--accent);
    color: var(--bg) !important;
  }
}
:root[data-theme="dark"] .nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
}
/* .nav-cta's dark styling has a different property/value pairing from
   its light one (background: accent vs. background: ink), not just a
   different resolved value for the same pairing — so header.site's
   pinned tokens above aren't enough on their own; this makes the CTA
   always use the dark pairing regardless of the page's real theme. */
header.site .nav-cta {
  background: var(--accent);
  color: var(--bg) !important;
}
.nav-toggle {
  display: none;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  /* Overrides the generic `section` rule's 60%-of-viewport floor below —
     the hero is the one section meant to fill the whole first screen
     (viewport height minus the sticky header), not just a modest chunk
     of it. */
  min-height: calc(100dvh - var(--header-h));
  padding: clamp(4rem, 9vw, 6.5rem) 0 clamp(3.5rem, 6vw, 5rem);
  background:
    radial-gradient(60% 60% at 85% 0%, var(--accent-soft), transparent 70%),
    var(--bg);
}
.hero-glyph {
  position: absolute;
  top: -3rem;
  right: -1.5rem;
  z-index: 0;
  font-family: var(--mono);
  font-size: clamp(9rem, 22vw, 17rem);
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
  opacity: 0.12;
  pointer-events: none;
  user-select: none;
}
/* Same decorative treatment as .hero-glyph, but in-flow (position:
   relative, not absolute) rather than overlaid — so it doesn't need an
   `overflow: hidden` positioning ancestor of its own. Sections are flex
   columns (see the generic `section` rule), so align-self: flex-end is
   what pushes a direct-child glyph to the right edge. */
.section-glyph {
  position: relative;
  align-self: flex-end;
  z-index: 0;
  font-family: var(--mono);
  font-style: italic;
  font-size: clamp(1rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1;
  color: var(--accent);
  opacity: 0.1;
  pointer-events: none;
  user-select: none;
}
.hero .wrap {
  position: relative;
  z-index: 1;
  max-width: 46rem;
  text-align: center;
}
.hero .cta-row,
.hero .quick-facts {
  justify-content: center;
}
.hero p.lede {
  margin-left: auto;
  margin-right: auto;
}
/* Extra breathing room between the hero's stacked lines specifically —
   the shared .eyebrow/h1/cta-row rules below stay as the site-wide
   defaults other sections also use. */
.hero .eyebrow {
  margin-bottom: 1.3rem;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.eyebrow::before {
  content: "// ";
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0.6;
}
h1 {
  font-family: "Niamey",serif;
  font-style: italic;
  font-weight: bold;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.2;
  letter-spacing: 0.08em;
  padding: 0.2em 0 0.2em 0 ;
  margin: 0 0 0.9rem;
}
.hero h2 {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 500;
  line-height: 1.5;
  color: var(--slate-deep);
  margin: 0 0 1.5rem;
}
.hero p.lede {
  color: var(--muted);
  max-width: 42rem;
  line-height: 1.8;
  margin: 0 0 2.4rem;
  font-size: 1.02rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.3rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn.primary {
  background: var(--accent);
  color: #fff;
}
.btn.primary:hover {
  background: var(--accent-hover);
}
.btn.ghost {
  appearance: none;
  background: none;
  border-color: var(--border);
  color: var(--ink);
}
.btn.ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.86rem;
}
.quick-facts > span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem 0.4rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
  color: var(--ink);
  background: color-mix(in srgb, var(--badge-accent, var(--accent)) 14%, var(--bg-alt));
  border: 1px solid color-mix(in srgb, var(--badge-accent, var(--accent)) 40%, var(--border));
}
.quick-facts > span:nth-of-type(1) {
  --badge-accent: var(--tag-blue);
}
.quick-facts > span:nth-of-type(2) {
  --badge-accent: var(--tag-purple);
}
.quick-facts > span:nth-of-type(3) {
  --badge-accent: var(--tag-green);
}
.quick-facts > span > svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--badge-accent, var(--accent));
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--tag-green);
  flex: none;
  animation: status-pulse 2s infinite;
}
@keyframes status-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--tag-green) 55%, transparent);
  }
  70% {
    box-shadow: 0 0 0 6px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
/* Sections */
section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  /* 60% of the viewport left under the header, capped at 42rem so it
     doesn't keep growing on very tall screens — a lighter-content
     section (About, Contact) gets a modest, deliberate floor instead
     of stretching to fill 80% and leaving a huge empty gap around a
     few short lines; a content-heavy section (Services, Stack) is
     already taller than this floor on its own, so it's unaffected. */
  min-height: min(calc((100dvh - var(--header-h)) * 0.6), 42rem);
  padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}
/* Wave divider — traces the logo's own arc line in its pale
   brand blue, standing in for the plain border-top rule right
   after the hero, where that one recurring brand cue earns its
   keep once rather than as a tic on every section. */
#about {
  border-top: none;
}
.wave-divider {
  line-height: 0;
  color: var(--arc);
}
.wave-divider svg {
  width: 100%;
  height: 32px;
  display: block;
}
.wave-divider path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.section-head {
  max-width: 40rem;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  text-align: center;
}
.section-head .eyebrow {
  margin-bottom: 0.5rem;
}
.section-head h2 {
  font-family: "Niamey";
  font-style: italic;
  font-size: clamp(1.65rem, 3.8vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: 0.04em;
  margin: 0 0 0.6rem;
}
.section-head p {
  color: var(--muted);
  margin: 0;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
}
.about-grid p {
  color: var(--muted);
  margin: 0 0 1rem;
}
.fact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: clamp(0.9rem, 2vw, 1.2rem);
  align-content: start;
}
.fact-list li {
  display: flex;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 0.7rem;
}
.fact-list strong {
  display: block;
  font-size: 0.85rem;
}
.fact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}
.fact-list svg {
  width: 18px;
  height: 18px;
  flex: none;
  color: var(--accent);
  margin-top: 0.15rem;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}
.service-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: transparent;
  border-radius: 0.85rem;
  padding: 1.5rem 1.4rem;
}
.service-card > div:last-child {
  min-width: 0;
}
.service-card:nth-of-type(6n+1) {
  --card-accent: var(--tag-blue);
}
.service-card:nth-of-type(6n+2) {
  --card-accent: var(--tag-green);
}
.service-card:nth-of-type(6n+3) {
  --card-accent: var(--tag-purple);
}
.service-card:nth-of-type(6n+4) {
  --card-accent: var(--tag-orange);
}
.service-card:nth-of-type(6n+5) {
  --card-accent: var(--tag-pink);
}
.service-card:nth-of-type(6n+6) {
  --card-accent: var(--tag-cyan);
}
.service-card .icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.6rem;
  background: var(--card-accent, var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.service-card .icon svg {
  width: 22px;
  height: 22px;
}
.service-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
}
.service-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Skills */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}
.skill-card {
  background: transparent;
  border-radius: 0.85rem;
  padding: 1.25rem 1.3rem;
}
.skill-card:nth-of-type(6n+1) {
  --card-accent: var(--tag-blue);
}
.skill-card:nth-of-type(6n+2) {
  --card-accent: var(--tag-green);
}
.skill-card:nth-of-type(6n+3) {
  --card-accent: var(--tag-purple);
}
.skill-card:nth-of-type(6n+4) {
  --card-accent: var(--tag-orange);
}
.skill-card:nth-of-type(6n+5) {
  --card-accent: var(--tag-pink);
}
.skill-card:nth-of-type(6n+6) {
  --card-accent: var(--tag-cyan);
}
.skill-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.skill-card h3 svg {
  width: 15px;
  height: 15px;
  padding: 5px;
  box-sizing: content-box;
  border-radius: 6px;
  background: var(--card-accent, var(--accent));
  color: #fff;
  flex: none;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.tags span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.28rem 0.65rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--slate-deep);
}
.tags span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--badge-bg, var(--accent));
  flex: none;
}
.tags span:nth-of-type(6n+1) {
  --badge-bg: var(--tag-blue);
}
.tags span:nth-of-type(6n+2) {
  --badge-bg: var(--tag-green);
}
.tags span:nth-of-type(6n+3) {
  --badge-bg: var(--tag-purple);
}
.tags span:nth-of-type(6n+4) {
  --badge-bg: var(--tag-orange);
}
.tags span:nth-of-type(6n+5) {
  --badge-bg: var(--tag-pink);
}
.tags span:nth-of-type(6n+6) {
  --badge-bg: var(--tag-cyan);
}

/* Experience */
.role-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.9rem, 2vw, 1.3rem);
}
.role-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.role-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tile-front,
.tile-back {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 1.1rem;
  transition: opacity 0.18s ease;
}
.tile-front {
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
}
.role-logos {
  display: flex;
  gap: 0.4rem;
}
.role-logos img {
  width: 5.25rem;
  height: 5.25rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  /* Fixed white chip regardless of site theme — client logos are drawn
     for a white background and several (dark wordmarks, white-only
     marks) lose all contrast against the site's own dark-mode card
     background otherwise. */
  background: #fff;
  border: 1px solid var(--border);
  object-fit: contain;
  display: block;
}
/* Interparking's only available mark is solid white artwork (reversed
   for a dark navbar) — invisible on the white chip every other logo
   here uses, so it gets a fixed-dark chip instead. --panel is already
   a fixed-dark-regardless-of-theme token (see :root). */
.role-logos img.on-dark {
  background: var(--panel);
  border-color: var(--panel);
}
.tile-front h3 {
  margin: 0;
  font-size: 0.98rem;
}
.tile-front .when {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}
/* Stacked as an absolute layer under the front face, revealed by
   crossfading opacity on hover/focus rather than resizing the tile —
   keeps every tile in the grid the same height regardless of how much
   description text a given role has. */
.tile-back {
  /* flex-start, not center: centered content that overflows a
     scrollable box clips at both edges with no way to scroll up to
     the clipped top (scrollTop can't go negative) — anchoring to the
     top keeps the whole thing reachable by scrolling down instead. */
  justify-content: flex-start;
  overflow-y: auto;
  overflow-wrap: break-word;
  opacity: 0;
  pointer-events: none;
  scrollbar-width: thin;
}
/* Narrow thumb-only scrollbar so it reads as a hint rather than eating
   into the already-tight text column on small tiles. */
.tile-back::-webkit-scrollbar {
  width: 5px;
}
.tile-back::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.tile-back .role-title {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
}
.tile-back p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.tile-back .stack {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--slate);
  margin-bottom: 0;
}
.role-tile:hover .tile-front,
.role-tile:focus .tile-front,
.role-tile:focus-within .tile-front {
  opacity: 0;
  pointer-events: none;
}
.role-tile:hover .tile-back,
.role-tile:focus .tile-back,
.role-tile:focus-within .tile-back {
  opacity: 1;
  pointer-events: auto;
}
.roles-more {
  display: block;
  margin: 1.6rem auto 0;
  padding: 0;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
  cursor: pointer;
}
.roles-more:hover {
  text-decoration: underline;
}
.employee-tag {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.1rem 0.5rem;
}

/* Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: clamp(1.1rem, 2.5vw, 1.6rem);
}
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-accent, var(--accent));
  border-radius: 0.9rem;
  padding: 1.8rem;
  box-shadow: var(--shadow);
}
.project-card:nth-of-type(6n+1) {
  --card-accent: var(--tag-blue);
}
.project-card:nth-of-type(6n+2) {
  --card-accent: var(--tag-green);
}
.project-card:nth-of-type(6n+3) {
  --card-accent: var(--tag-purple);
}
.project-card:nth-of-type(6n+4) {
  --card-accent: var(--tag-orange);
}
.project-card:nth-of-type(6n+5) {
  --card-accent: var(--tag-pink);
}
.project-card:nth-of-type(6n+6) {
  --card-accent: var(--tag-cyan);
}
.project-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}
.project-card p {
  margin: 0 0 0.9rem;
  color: var(--muted);
}
.project-card .card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-self: flex-start;
  margin-top: auto;
}
/* Added by script.js only once it's confirmed (by probing
   resources/screenshots/<project>/snap1.jpg|png) that this project
   actually has screenshots — a card with none stays visually inert, no
   hint that clicking would do anything. */
.project-card.has-gallery {
  cursor: pointer;
}
.project-card.has-gallery:hover {
  border-color: var(--card-accent, var(--accent));
}
.gallery-hint {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.project-card.has-gallery:hover .gallery-hint {
  opacity: 1;
  transform: translateY(0);
}

/* Project screenshot lightbox */
dialog.lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: none;
  background: rgba(6, 8, 11, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}
dialog.lightbox[open] {
  display: flex;
}
dialog.lightbox::backdrop {
  background: transparent;
}
.lightbox-image {
  max-width: min(92vw, 74rem);
  max-height: 82dvh;
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
  object-fit: contain;
}
.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
}
.lightbox-close svg {
  width: 18px;
  height: 18px;
}
.lightbox-nav {
  top: 50%;
  width: 3rem;
  height: 3rem;
  transform: translateY(-50%);
}
.lightbox-nav svg {
  width: 22px;
  height: 22px;
}
.lightbox-prev {
  left: 1.25rem;
}
.lightbox-next {
  right: 1.25rem;
}
.lightbox-nav[hidden] {
  display: none;
}
.lightbox-counter {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  margin: 0;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
}
@media (max-width: 640px) {
  .lightbox-nav {
    width: 2.5rem;
    height: 2.5rem;
  }
  .lightbox-prev {
    left: 0.5rem;
  }
  .lightbox-next {
    right: 0.5rem;
  }
}

/* Education */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.2rem;
}
.edu-card {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.3rem 1.4rem;
  background: var(--bg-alt);
}
.edu-card .when {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.edu-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1rem;
}
.edu-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

/* Contact */
.contact-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  background: var(--contact-panel);
  color: var(--panel-fg);
  border: 1px solid var(--accent);
  border-radius: 1.1rem;
  padding: clamp(2rem, 5vw, 3rem);
}
.contact-panel h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  margin: 0 0 0.7rem;
  letter-spacing: -0.01em;
}
.contact-panel p {
  color: var(--panel-muted);
  margin: 0 0 1.6rem;
  max-width: 34rem;
}
/* The button column is naturally shorter than the heading+paragraph
   column next to it; centering it in the grid row (rather than pinning
   it to the top) keeps the panel looking balanced instead of leaving a
   block of dead space under the last button. */
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  align-content: center;
}
.contact-trigger {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.7rem;
  padding: 0.8rem 1.1rem;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}
.contact-trigger:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateX(2px);
}
.contact-trigger .icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.16);
  flex: none;
}
.contact-trigger svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: #fff;
}

/* Contact modals */
dialog.contact-modal {
  border: none;
  border-radius: 1rem;
  padding: 0;
  max-width: 28rem;
  width: calc(100% - 2rem);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}
dialog.contact-modal::backdrop {
  background: rgba(10, 14, 20, 0.55);
  backdrop-filter: blur(2px);
}
.contact-form {
  position: relative;
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.5rem, 4vw, 2rem);
}
.contact-form h3 {
  margin: 0;
  padding-right: 2rem;
  font-family: "Niamey";
  font-style: italic;
  font-size: 1.3rem;
}
.contact-form .modal-sub {
  margin: -0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}
.contact-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-deep);
}
.contact-form input[type="email"],
.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form textarea {
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 400;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.contact-form textarea {
  resize: vertical;
  min-height: 6rem;
}
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  color: var(--muted);
  cursor: pointer;
  border-radius: 0.4rem;
}
.modal-close:hover {
  color: var(--ink);
  background: var(--bg-alt);
}
.modal-close svg {
  width: 16px;
  height: 16px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.7rem;
  margin-top: 0.3rem;
}
.form-status {
  min-height: 1.2rem;
  margin: 0;
  font-size: 0.85rem;
}
.form-status.pending {
  color: var(--muted);
}
.form-status.success {
  color: var(--tag-green);
  font-weight: 600;
}
.form-status.error {
  color: #c62828;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .form-status.error {
    color: #ff6b6b;
  }
}
:root[data-theme="dark"] .form-status.error {
  color: #ff6b6b;
}

/* Larger contact popups once there's room to spare — mobile keeps the
   compact calc(100% - 2rem)-wide version above the 640px breakpoint used
   everywhere else in this file. */
@media (min-width: 641px) {
  dialog.contact-modal {
    max-width: 34rem;
  }
  .contact-form {
    gap: 1.2rem;
    padding: 2.5rem 2.75rem;
  }
  .contact-form h3 {
    font-size: 1.5rem;
  }
  .contact-form label {
    font-size: 0.9rem;
  }
  .contact-form input[type="email"],
  .contact-form input[type="text"],
  .contact-form input[type="tel"],
  .contact-form textarea {
    padding: 0.75rem 0.9rem;
    font-size: 0.98rem;
  }
  .contact-form textarea {
    min-height: 8.5rem;
  }
}

footer.site {
  padding: 2rem 0;
  color: var(--muted);
  font-size: 0.85rem;
}
footer.site .prompt {
  font-family: var(--mono);
}
footer.site .prompt::before {
  content: "$ ";
  color: var(--tag-green);
  opacity: 0.85;
}
footer.site .footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
}
footer.site .footer-legal {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  text-align: center;
}
footer.site a {
  text-decoration: none;
  color: var(--muted);
}
footer.site a:hover {
  color: var(--accent);
}

/* Cookie notice — hidden by default so there's no flash before script.js
   decides (from localStorage) whether this visitor has already dismissed
   it; .visible is what actually reveals it. */
.cookie-notice {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 42rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(calc(100% + 1rem));
  pointer-events: none;
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}
.cookie-notice.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.cookie-notice p {
  flex: 1 1 16rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.cookie-notice .btn {
  flex: none;
  padding: 0.5rem 1.1rem;
}

@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .contact-panel {
    grid-template-columns: 1fr;
  }
  .role-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed;
    inset: 60px 0 auto 0;
    /* header.site's backdrop-filter makes it (not the viewport) the
       containing block for this fixed element — against that
       containing block, left:0/right:0 alone resolves to a
       shrink-to-fit width instead of stretching edge-to-edge, so the
       panel renders as a narrow floating box instead of a full-width
       menu. Explicit width forces the stretch. */
    width: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem 1.5rem;
    gap: 1rem;
    /* -100% of its own (short) height plus a fixed buffer, not a flat
       -110% — a percentage-of-self transform alone isn't enough to
       clear a menu shorter than ~600px off-screen when closed (it was
       leaving ~40px of its bottom edge visible above the header). */
    transform: translateY(calc(-100% - 100px));
    transition: transform 0.2s ease;
  }
  .nav-links.open {
    transform: translateY(0);
  }
  .nav-cta {
    display: none !important;
  }
  .nav-toggle {
    grid-column: 3;
    justify-self: end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: none;
    color: var(--ink);
  }
  .role-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* At 2 columns the square 1/1 tiles get too short for their own
     front-face content — the date range wraps to a second line (not
     enough horizontal room) and that second line then clips against
     the tile's overflow:hidden bottom edge. Taller tiles plus smaller
     logo/type give the front face room to spare even when the date
     does wrap, and give the back face more room before it needs to
     scroll. */
  .role-tile {
    aspect-ratio: 3 / 4;
  }
  .tile-front,
  .tile-back {
    padding: 0.85rem;
  }
  .tile-front {
    gap: 0.4rem;
  }
  .role-logos img {
    width: 3.5rem;
    height: 3.5rem;
  }
  .tile-front h3 {
    font-size: 0.88rem;
  }
  .tile-front .when {
    font-size: 0.7rem;
  }
  .tile-back .role-title {
    font-size: 0.78rem;
  }
  .tile-back p {
    font-size: 0.76rem;
  }
  .tile-back .stack {
    font-size: 0.64rem;
  }
}
