:root {
  /* Accent is injected per request from SiteSettings. */
  --jade: #12e0a8;
  --jade-rgb: 18, 224, 168;
  --coral: #ff8a68;
  --coral-rgb: 255, 138, 104;
  --gold: #ffd9a0;
  --azure: #3d8bff;
  --azure-rgb: 61, 139, 255;

  /* Substrate */
  --ground: #eef3f1;
  --ground-deep: #e2ebe7;

  /* Glass: tint colour + per-depth alpha, composited over the substrate. */
  --pane-tint: 255, 255, 255;
  --pane-thin: 0.42;
  --pane-mid: 0.58;
  --pane-thick: 0.68;

  /* Bevel — a real pane catches light on its top edge and casts on its bottom. */
  --bevel-light: rgba(255, 255, 255, 0.9);
  --bevel-dark: rgba(10, 23, 20, 0.10);
  --edge: rgba(10, 23, 20, 0.12);
  --edge-strong: rgba(10, 23, 20, 0.2);

  --cast-sm: 0 1px 2px rgba(10, 23, 20, .05), 0 4px 14px rgba(10, 23, 20, .05);
  --cast-md: 0 2px 6px rgba(10, 23, 20, .06), 0 18px 44px rgba(10, 23, 20, .09);
  --cast-lg: 0 4px 12px rgba(10, 23, 20, .08), 0 36px 90px rgba(10, 23, 20, .13);

  /* Ink */
  --ink: #0a1714;
  --ink-muted: #47605a;
  --ink-faint: #556c63;

  --accent-text: #0a6b52;
  --coral-text: #a83c1e;
  --azure-text: #1a5fc4;
  --on-accent: #e6e6e6;

  /* Surface texture strength — the fine grain on the glass itself. */
  --frost: 0.05;
  --substrate-alpha: 0.62;

  --font-display: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --section-y: clamp(1.75rem, 2.2vw, 2.5rem);
  --container: 1400px;
  --measure: 64ch;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);

  --nav-h: 74px;
  color-scheme: light;
}

[data-theme='dark'] {
  --ground: #04080b;
  --ground-deep: #02070a;

  --pane-tint: 190, 240, 225;
  --pane-thin: 0.045;
  --pane-mid: 0.06;
  --pane-thick: 0.075;

  --bevel-light: rgba(214, 255, 240, 0.16);
  --bevel-dark: rgba(0, 0, 0, 0.4);
  --edge: rgba(190, 240, 225, 0.12);
  --edge-strong: rgba(190, 240, 225, 0.24);

  --cast-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --cast-md: 0 2px 8px rgba(0, 0, 0, .5), 0 20px 50px rgba(0, 0, 0, .45);
  --cast-lg: 0 4px 14px rgba(0, 0, 0, .55), 0 40px 100px rgba(0, 0, 0, .55);

  --ink: #eaf4f0;
  --ink-muted: #afc4bd;
  --ink-faint: #a5bab3;

  --accent-text: #12e0a8;
  --coral-text: #ff8a68;
  --azure-text: #6db3ff;
  --on-accent: #04120d;

  --frost: 0.075;
  --substrate-alpha: 0.75;

  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0125rem;
  line-height: 1.68;
  color: var(--ink);
  background: var(--ground);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .5s var(--ease), color .5s var(--ease);
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.028em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 600; letter-spacing: -.022em; }

h4, h5, h6 {
  font-family: var(--font-body);
  font-size: .95rem; font-weight: 600;
  margin: 0 0 .5em; color: var(--ink);
}

p { margin: 0 0 1.15em; color: var(--ink-muted); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-text); text-decoration: none; transition: color .3s var(--ease); }
a:hover { color: var(--coral-text); }

img { max-width: 100%; height: auto; display: block; }
code, pre, kbd { font-family: var(--font-mono); font-size: .88em; font-weight: 500; }
hr { border: 0; border-top: 1px solid var(--edge); margin: 2.5rem 0; }

::selection { background: rgba(var(--jade-rgb), .28); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 3px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--edge-strong); border-radius: 99px;
  border: 3px solid var(--ground);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-text); }

.skip-link {
  position: absolute; left: 14px; top: -100px; z-index: 2000;
  padding: .8rem 1.3rem; border-radius: var(--r-sm);
  background: var(--accent-text); color: var(--on-accent);
  font-weight: 600; font-size: .85rem;
  transition: top .25s var(--ease);
}
.skip-link:focus { top: 14px; color: var(--on-accent); }

/* ==========================================================================
   The substrate — a live caustic field, drawn to canvas by glass.js
   ========================================================================== */

.substrate {
  position: fixed; inset: 0; z-index: -3;
  width: 100%; height: 100%;
  display: block;
  opacity: var(--substrate-alpha);
  pointer-events: none;
  transition: opacity .6s var(--ease);
}

/* Static fallback so the page is never a flat void before canvas paints. */
.substrate-fallback {
  position: fixed; inset: 0; z-index: -4; pointer-events: none;
  opacity: var(--substrate-alpha);
  transition: opacity .8s var(--ease);
  background:
    radial-gradient(38% 32% at 20% 16%, rgba(var(--jade-rgb), .34), transparent 72%),
    radial-gradient(32% 30% at 84% 30%, rgba(var(--coral-rgb), .24), transparent 72%),
    radial-gradient(42% 34% at 56% 96%, rgba(var(--jade-rgb), .18), transparent 72%);
}
/* Once the canvas is painting, the static layer is redundant. */
.substrate-live .substrate-fallback { opacity: 0; }

/* Fine grain over everything so gradients never band on a large display. */
.grain {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   THE PANE — the one component everything else is built from
   ========================================================================== */

.pane {
  position: relative;
  background: rgba(var(--pane-tint), var(--pane-mid));
  backdrop-filter: blur(22px) saturate(165%);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  border-radius: var(--r);
  box-shadow:
    inset 0 1px 0 0 var(--bevel-light),          /* top bevel catches light */
    inset 0 -1px 0 0 var(--bevel-dark),          /* bottom edge falls away  */
    0 0 0 1px var(--edge),
    var(--cast-md);
  isolation: isolate;
}

/* Frosted texture sitting *on* the glass, not behind it. */
.pane::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--frost);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  z-index: 0;
}

/* The specular edge. A light source at --lx/--ly (set by glass.js) brightens
   the rim facing it, exactly as a bevelled edge would. */
.pane::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  /* The bright core is the owner-editable "specular highlight tint"
     (SiteSettings.accent_tertiary); it falls back to white when unset. */
  background: radial-gradient(
    240px circle at var(--lx, 50%) var(--ly, 0%),
    rgba(var(--specular-rgb, 255, 255, 255), .85),
    rgba(var(--jade-rgb), .35) 38%, transparent 72%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s var(--ease);
  z-index: 2;
}
.pane:hover::after, .pane:focus-within::after { opacity: 1; }
[data-theme='dark'] .pane::after {
  background: radial-gradient(
    240px circle at var(--lx, 50%) var(--ly, 0%),
    rgba(var(--specular-rgb, 214, 255, 240), .9),
    rgba(var(--jade-rgb), .45) 38%, transparent 72%);
}

.pane > * { position: relative; z-index: 1; }

/* Depth variants ---------------------------------------------------------- */
.pane--thin {
  background: rgba(var(--pane-tint), var(--pane-thin));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-sm);
}
.pane--thick {
  background: rgba(var(--pane-tint), var(--pane-thick));
  backdrop-filter: blur(34px) saturate(180%);
  -webkit-backdrop-filter: blur(34px) saturate(180%);
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1.5px 0 0 var(--bevel-light),
    inset 0 -1.5px 0 0 var(--bevel-dark),
    inset 1px 0 0 0 rgba(255, 255, 255, .18),
    0 0 0 1px var(--edge),
    var(--cast-lg);
}
.pane--flush { box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge); }

/* Panes that lift on hover — the shadow grows because the pane moves up. */
.pane--lift { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.pane--lift:hover {
  transform: translateY(-5px);
  box-shadow:
    inset 0 1px 0 0 var(--bevel-light),
    inset 0 -1px 0 0 var(--bevel-dark),
    0 0 0 1px var(--edge-strong),
    var(--cast-lg);
}

/* Where a browser lacks backdrop-filter, fall back to an opaque pane so text
   never lands on raw substrate. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .pane, .pane--thin, .pane--thick {
    background: var(--ground);
    box-shadow: 0 0 0 1px var(--edge), var(--cast-md);
  }
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container-x {
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 4vw, 2.25rem);
}
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * .55); }

.section-head { max-width: 100%; margin-bottom: clamp(1.25rem, 2vw, 2.5rem); }
/* In a heading row the display margin fights bottom alignment, so drop it. */
.section-head[style*="margin-bottom:0"] > :last-child { margin-bottom: 0; }
.section-head--center { margin-inline: auto; text-align: center; }

.label {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-mono);
  font-size: 1.2rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
}
.label--accent { color: var(--accent-text); }
.label::before {
  content: ''; width: 18px; height: 1px;
  background: currentColor; opacity: .5;
}
.section-head--center .label::before { display: none; }

.lead { font-size: clamp(1.03rem, 1.4vw, 1.16rem); color: var(--ink-muted); max-width: var(--measure); }
.text-muted-x { color: var(--ink-muted) !important; }
.text-faint { color: var(--ink-faint) !important; }

/* The one gradient in the system, used only on a few display words. */
.grad-text {
  background: linear-gradient(104deg, var(--accent-text) 0%, var(--coral-text) 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
[data-theme='dark'] .grad-text {
  background: linear-gradient(104deg, var(--jade) 0%, var(--coral) 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

.rule, .divider-glow { border: 0; border-top: 1px solid var(--edge); margin: 0; }

.grid-auto {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(1rem, 2vw, 1.6rem);
}
.grid-auto--sm { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ==========================================================================
   Buttons and chips
   ========================================================================== */

.btn-x {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .92rem 1.6rem;
  font-family: var(--font-body);
  font-size: .9rem; font-weight: 600; line-height: 1;
  border-radius: 99px; border: 0;
  cursor: pointer; white-space: nowrap;
  position: relative; overflow: hidden;
  transition: transform .35s var(--spring), box-shadow .35s var(--ease), color .3s var(--ease);
}
.btn-x:active { transform: scale(.975); }

.btn-x--primary {
  background: var(--accent-text);
  color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 22px rgba(var(--jade-rgb), .26);
}
.btn-x--primary:hover {
  color: var(--on-accent);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 12px 32px rgba(var(--jade-rgb), .36);
}

/* A ghost button is literally a pane. */
.btn-x--ghost {
  background: rgba(var(--pane-tint), var(--pane-thin));
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  color: var(--ink);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-sm);
}
.btn-x--ghost:hover {
  color: var(--ink); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge-strong), var(--cast-md);
}
.btn-x--sm { padding: .62rem 1.15rem; font-size: .82rem; }
.btn-x--lg { padding: 1.2rem 2.2rem; font-size: 1.05rem; gap: .8rem; }
.btn-x--block { width: 100%; }

.chip {
  display: inline-flex; align-items: center; gap: .38rem;
  padding: .34rem .78rem;
  font-family: var(--font-mono);
  font-size: .69rem; font-weight: 500; letter-spacing: .05em;
  color: var(--ink-muted);
  background: rgba(var(--pane-tint), var(--pane-thin));
  border-radius: 99px;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  transition: color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
a.chip:hover, .chip--active {
  color: var(--accent-text);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .5);
  transform: translateY(-1px);
}
.chip__count { opacity: .6; font-size: .62rem; }

.skill-cat__icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center; border-radius: 12px;
  color: var(--accent-text); font-size: 1.05rem;
  background: rgba(var(--jade-rgb), .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--jade-rgb), .22);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
  gap: .7rem;
}
.skill-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .65rem;
  padding: 1.15rem .5rem;
  text-align: center;
  border-radius: var(--r);
  background: rgba(var(--jade-rgb), .07);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .16);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .4s var(--ease);
}
.skill-tile:hover {
  transform: translateY(-3px);
  background: rgba(var(--jade-rgb), .12);
}
.skill-tile__icon {
  display: grid; place-items: center; flex: none;
  width: 46px; height: 46px; border-radius: 13px;
  font-size: 1.35rem;
  color: var(--tile-color, var(--accent-text));
  background: rgba(var(--jade-rgb), .14);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .22);
  transition: box-shadow .4s var(--ease);
}
.skill-tile__name {
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .03em; color: var(--ink-muted);
  transition: color .3s var(--ease);
}
.skill-tile:hover .skill-tile__name { color: var(--ink); }

@supports (background: color-mix(in srgb, red 50%, blue)) {
  .skill-tile__icon {
    background: color-mix(in srgb, var(--tile-color, var(--jade)) 18%, rgba(var(--jade-rgb), .14));
  }
  .skill-tile:hover .skill-tile__icon {
    box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px color-mix(in srgb, var(--tile-color, var(--jade)) 55%, var(--edge));
  }
  .skill-tile:hover {
    box-shadow: inset 0 1px 0 0 var(--bevel-light),
      0 0 0 1px color-mix(in srgb, var(--tile-color, var(--jade)) 35%, var(--edge)),
      0 14px 30px -12px color-mix(in srgb, var(--tile-color, var(--jade)) 60%, transparent);
  }
}

.badge-x {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .3rem .7rem; border-radius: 99px;
  font-family: var(--font-mono);
  font-size: .65rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent-text);
  background: rgba(var(--jade-rgb), .12);
  box-shadow: 0 0 0 1px rgba(var(--jade-rgb), .3);
}
.badge-x--teal { color: var(--accent-text); }
.badge-x--pink {
  color: var(--coral-text);
  background: rgba(var(--coral-rgb), .12);
  box-shadow: 0 0 0 1px rgba(var(--coral-rgb), .3);
}

.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--jade); flex: none;
  box-shadow: 0 0 0 0 rgba(var(--jade-rgb), .6), 0 0 10px rgba(var(--jade-rgb), .8);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(var(--jade-rgb), .55), 0 0 10px rgba(var(--jade-rgb), .8); }
  70% { box-shadow: 0 0 0 10px rgba(var(--jade-rgb), 0), 0 0 10px rgba(var(--jade-rgb), .8); }
  100% { box-shadow: 0 0 0 0 rgba(var(--jade-rgb), 0), 0 0 10px rgba(var(--jade-rgb), .8); }
}

/* ==========================================================================
   Navigation — the thinnest glass on the page
   ========================================================================== */

.nav-x {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background-color .45s var(--ease), box-shadow .45s var(--ease),
              backdrop-filter .45s var(--ease);
}
.nav-x.is-stuck {
  background: rgba(var(--pane-tint), var(--pane-thin));
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: inset 0 -1px 0 0 var(--edge), 0 8px 30px rgba(10, 23, 20, .06);
}
[data-theme='dark'] .nav-x.is-stuck { box-shadow: inset 0 -1px 0 0 var(--edge), 0 10px 34px rgba(0, 0, 0, .4); }

.nav-x__inner {
  width: 100%; max-width: var(--container);
  margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.25rem);
  display: flex; align-items: center; gap: 1.1rem;
}

.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.03em;
  color: var(--ink); margin-right: auto;
}
.brand:hover { color: var(--ink); }
.brand__mark {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  font-family: var(--font-mono); font-size: .72rem; font-weight: 600;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--jade), var(--coral));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 14px rgba(var(--jade-rgb), .3);
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

.brand__logo-wrap { display: inline-flex; align-items: center; height: 40px; flex: none; }
.brand__logo { height: 100%; width: auto; display: block; object-fit: contain; }
.brand__logo--dark { display: none; }
[data-theme='dark'] .brand__logo--light { display: none; }
[data-theme='dark'] .brand__logo--dark { display: block; }

.nav-links {
  display: flex; align-items: center; gap: .2rem;
  list-style: none; margin: 0; padding: .25rem;
  border-radius: 99px;
}
.nav-links a {
  position: relative; display: block;
  padding: .48rem .9rem; border-radius: 99px;
  font-size: .875rem; font-weight: 500;
  color: var(--ink-muted);
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); background: rgba(var(--pane-tint), var(--pane-thin)); }
.nav-links a.active {
  color: var(--ink);
  background: rgba(var(--pane-tint), var(--pane-mid));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
}

.nav-actions { display: flex; align-items: center; gap: .55rem; }

.icon-btn {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px; cursor: pointer;
  font-size: 1rem; color: var(--ink-muted);
  background: rgba(var(--pane-tint), var(--pane-thin));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 0;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  transition: color .25s var(--ease), transform .3s var(--spring), box-shadow .3s var(--ease);
}
.icon-btn:hover {
  color: var(--accent-text); transform: translateY(-2px);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .45);
}

.theme-toggle { position: relative; overflow: hidden; }
.theme-toggle i { position: absolute; transition: transform .5s var(--spring), opacity .3s var(--ease); }
.theme-toggle .bi-moon-stars { transform: none; opacity: 1; }
.theme-toggle .bi-brightness-high { transform: translateY(140%); opacity: 0; }
[data-theme='dark'] .theme-toggle .bi-moon-stars { transform: translateY(-140%); opacity: 0; }
[data-theme='dark'] .theme-toggle .bi-brightness-high { transform: none; opacity: 1; }

.nav-burger { display: none; }

.drawer {
  position: fixed; inset: 0; z-index: 1040;
  display: grid; grid-template-rows: var(--nav-h) 1fr;
  background: rgba(var(--pane-tint), var(--pane-thick));
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  transform: translateX(100%);
  transition: transform .5s var(--ease);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__body { padding: 1.5rem clamp(1.15rem, 4vw, 2.25rem) 2.5rem; overflow-y: auto; }
.drawer__links { list-style: none; margin: 0 0 2rem; padding: 0; }
.drawer__links a {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem .2rem;
  font-family: var(--font-display);
  font-size: 1.45rem; font-weight: 600; letter-spacing: -.028em;
  color: var(--ink);
  border-bottom: 1px solid var(--edge);
}
.drawer__links a i { color: var(--accent-text); font-size: 1rem; width: 1.3rem; }
.drawer__links a.active { color: var(--accent-text); }

.progress-x {
  position: fixed; top: 0; left: 0; z-index: 1035;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--jade), var(--coral));
  box-shadow: 0 0 12px rgba(var(--jade-rgb), .7);
  transition: width .1s linear;
}

/* ==========================================================================
   Hero — one thick pane, floating over the substrate
   ========================================================================== */

.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(1.5rem, 3.5vh, 3rem));
  padding-bottom: var(--section-y);
}

.hero__pane { padding: clamp(1.75rem, 4vw, 3.4rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}

.hero__status {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem .95rem .42rem .7rem;
  margin-bottom: 1.5rem;
  border-radius: 99px;
  font-family: var(--font-mono);
  font-size: .7rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-muted);
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
}

.hero__title { margin-bottom: 1.15rem; font-size: 40px; }
.hero__rotator {
  display: inline-block;
  transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s var(--ease);
}
.hero__rotator.is-swapping { opacity: 0; transform: translateY(-.1em); filter: blur(6px); }

.hero__sub { font-size: clamp(1rem, 1.4vw, 1.14rem); max-width: 46ch; margin-bottom: 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.hero__socials { display: flex; gap: .55rem; align-items: center; flex-wrap: wrap; }

/* Portrait sits under its own pane, like a screen under cover glass. */
.hero__portrait { position: relative; justify-self: center; width: min(100%, 380px); }
.hero__portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-lg);
  background: rgba(var(--pane-tint), var(--pane-mid));
}
.hero__portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__portrait-frame--empty {
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 4.2rem; font-weight: 700;
  color: var(--accent-text);
}
/* A sheen that slides across the portrait, as light does across a screen. */
.hero__portrait-frame::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .30) 46%, transparent 62%);
  transform: translateX(-120%);
  animation: sheen 7s var(--ease) infinite;
  pointer-events: none;
}
@keyframes sheen {
  0%, 62% { transform: translateX(-120%); }
  86%, 100% { transform: translateX(120%); }
}
.hero__ring { display: none; }

.hero__float {
  position: absolute; z-index: 3;
  display: flex; align-items: center; gap: .6rem;
  padding: .7rem 1rem; border-radius: var(--r-sm);
  background: rgba(var(--pane-tint), var(--pane-thick));
  backdrop-filter: blur(20px) saturate(170%);
  -webkit-backdrop-filter: blur(20px) saturate(170%);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-md);
  font-size: .8rem; font-weight: 600; color: var(--ink);
  animation: bob 6s ease-in-out infinite;
}
.hero__float i { color: var(--accent-text); font-size: 1rem; }
.hero__float--tl { top: 6%; left: -12%; }
.hero__float--br { bottom: 8%; right: -10%; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.scroll-hint {
  display: inline-flex; align-items: center; gap: .65rem;
  margin-top: clamp(1.5rem, 4vw, 2.75rem);
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-faint);
}
.scroll-hint__line {
  width: 42px; height: 1px; background: var(--edge-strong);
  transform-origin: left;
  animation: draw 2.8s var(--ease) infinite;
}
@keyframes draw { 0%, 100% { transform: scaleX(.3); } 50% { transform: scaleX(1); } }

/* ==========================================================================
   Stats — small panes in a row
   ========================================================================== */

.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(.75rem, 1.5vw, 1.1rem);
}
.stat-card { padding: 1.35rem 1.4rem; border-radius: var(--r); overflow: hidden; }
.stat-card i {
  position: absolute; top: 50%; right: .65rem; z-index: 0;
  transform: translateY(-50%);
  font-size: 3.75rem; line-height: 1;
  color: var(--accent-text); opacity: .14;
  pointer-events: none;
}
.stat-card__value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.7rem); font-weight: 700;
  letter-spacing: -.04em; line-height: 1;
  margin: .55rem 0 .3rem;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, var(--ink), var(--accent-text));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-card__label {
  font-family: var(--font-mono);
  font-size: .67rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0;
}

/* ==========================================================================
   Project & post cards
   ========================================================================== */

.project-card__media, .post-card__media, .achv-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--r) - 5px);
  margin: 5px 5px 0;
  background: rgba(var(--pane-tint), var(--pane-thin));
}
.project-card__media img, .post-card__media img, .achv-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
/* Project screenshots come in all sorts of native ratios (phone mockups,
   full-page captures, square app icons) — cover-cropping them chops off
   real content, so show the whole image letterboxed within the card. */
.project-card__media img { object-fit: contain; }
.pane--lift:hover .project-card__media img,
.pane--lift:hover .post-card__media img,
.pane--lift:hover .achv-card__media img { transform: scale(1.05); }

.project-card__media-empty {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 2.4rem; font-weight: 700;
  color: var(--accent-text); opacity: .5;
}
.project-card__type, .project-card__year, .project-card__platform {
  position: absolute; top: .8rem; z-index: 2;
  padding: .3rem .7rem; border-radius: 99px;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
  color: #f2fbf8;
  background: rgba(5, 16, 13, .55);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.project-card__type { left: .8rem; }
.project-card__platform { right: .8rem; }
.project-card__year { right: .8rem; top: 2.6rem; }

.card-x { display: flex; flex-direction: column; }
.card-x__body { padding: clamp(1.15rem, 2.2vw, 1.6rem); display: flex; flex-direction: column; flex: 1; }
.card-x__footer {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding-top: 1rem; margin-top: auto;
  border-top: 1px solid var(--edge);
  font-family: var(--font-mono);
  font-size: .66rem; font-weight: 500; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint);
}
.project-card__platform-link { width: 42px; height: 42px; border-radius: 12px; font-size: 1.3rem; }
.project-card__platform-link--android {
  color: #3ddc84;
  background: rgba(61, 220, 132, .14);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(61, 220, 132, .3);
}
.project-card__platform-link--android:hover {
  color: #3ddc84;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(61, 220, 132, .55);
}
.project-card__platform-link--ios {
  color: #0a84ff;
  background: rgba(10, 132, 255, .14);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(10, 132, 255, .3);
}
.project-card__platform-link--ios:hover {
  color: #0a84ff;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(10, 132, 255, .55);
}
.project-card__platform-link--web {
  color: var(--accent-text);
  background: rgba(var(--jade-rgb), .14);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .3);
}
.project-card__platform-link--web:hover {
  color: var(--accent-text);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .55);
}
.project-card__title {
  font-size: 1.28rem; margin-bottom: .45rem; letter-spacing: -.024em;
  line-height: 1.3; height: calc(1.28rem * 1.3 * 2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.project-card__title a { color: var(--ink); }
.pane--lift:hover .project-card__title a { color: var(--accent-text); }
.project-card__summary {
  font-size: .91rem; margin-bottom: 1.1rem;
  line-height: 1.5; height: calc(.91rem * 1.5 * 2);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.tech-row { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: 1.1rem; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .85rem; font-weight: 600; color: var(--accent-text);
}
.arrow-link i { transition: transform .4s var(--spring); }
.arrow-link:hover i, .pane--lift:hover .arrow-link i { transform: translateX(4px); }

.faq-list-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 1.3rem;
}
.faq-list { display: flex; flex-direction: column; gap: 1rem; }
.faq-card__header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; border: 0; background: none; text-align: left; cursor: pointer;
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
}
.faq-card__question { font-size: 1rem; font-weight: 600; color: var(--ink); }
.faq-card__arrow { flex: none; pointer-events: none; position: relative; overflow: hidden; }
.faq-card__arrow-icon {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: opacity .3s var(--ease), transform .35s var(--spring);
}
.faq-card__arrow-icon--minus { opacity: 0; transform: rotate(-90deg); }
.faq-card__header[aria-expanded='true'] .faq-card__arrow {
  color: var(--accent-text);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .45);
}
.faq-card__header[aria-expanded='true'] .faq-card__arrow-icon--plus { opacity: 0; transform: rotate(90deg); }
.faq-card__header[aria-expanded='true'] .faq-card__arrow-icon--minus { opacity: 1; transform: rotate(0deg); }
.faq-card__body { padding: 0 clamp(1.1rem, 2.2vw, 1.5rem) clamp(1.1rem, 2.2vw, 1.5rem); color: var(--ink-muted); font-size: .91rem; }

.post-card__meta {
  display: flex; align-items: center; gap: .9rem;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: .8rem;
}
.post-card__meta span { display: inline-flex; align-items: center; gap: .3rem; }

/* ==========================================================================
   Filters
   ========================================================================== */

.tabs {
  display: flex; flex-wrap: wrap; gap: .3rem;
  padding: .3rem;
  border-radius: 99px;
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  margin-bottom: 1.5rem;
}
.tabs--bottom { margin: 2rem 0 0; }
.tabs__item {
  position: relative;
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .7rem 1.1rem;
  border-radius: 99px;
  font-family: var(--font-mono); font-size: 1rem; font-weight: 500;
  letter-spacing: .02em;
  text-align: center;
  color: var(--ink-faint);
  transition: color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.tabs__item:hover { color: var(--ink); }
.tabs__item.is-active {
  color: var(--on-accent);
  background: var(--accent-text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 18px rgba(var(--jade-rgb), .3);
}
.tabs__count {
  font-size: .82rem; opacity: .55; font-variant-numeric: tabular-nums;
  transition: opacity .3s var(--ease);
}
.tabs__item.is-active .tabs__count { opacity: .85; }

.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.4rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r);
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}
.filter-group { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.filter-label {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-right: .3rem;
}
.filter-search { position: relative; margin-left: auto; min-width: 200px; }
.filter-search i {
  position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--ink-faint); font-size: .85rem; pointer-events: none;
}
.filter-search input {
  width: 100%; padding: .55rem 1rem .55rem 2.3rem;
  font-family: var(--font-body); font-size: .86rem; color: var(--ink);
  background: rgba(var(--pane-tint), var(--pane-thin));
  border: 0; border-radius: 99px;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  transition: box-shadow .3s var(--ease);
}
.filter-search input:focus {
  outline: none;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .55);
}
.filter-search input::placeholder { color: var(--ink-faint); }

/* ==========================================================================
   Services, skills, timeline
   ========================================================================== */

.service-card__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px; font-size: 1.2rem;
  color: var(--accent-text);
  background: rgba(var(--jade-rgb), .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--jade-rgb), .25);
  margin-bottom: 1.1rem;
  transition: transform .45s var(--spring);
}
.pane--lift:hover .service-card__icon { transform: rotate(-6deg) scale(1.06); }
.service-list { list-style: none; margin: .9rem 0 0; padding: 0; font-size: .87rem; }
.service-list li {
  display: flex; gap: .55rem; align-items: flex-start;
  padding: .28rem 0; color: var(--ink-muted);
}
.service-list i { color: var(--accent-text); font-size: .72rem; margin-top: .42rem; flex: none; }

.timeline { position: relative; padding-left: 1.9rem; }
.timeline::before {
  content: ''; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, var(--accent-text), var(--coral-text), transparent);
  opacity: .5;
}
.timeline__item { position: relative; padding-bottom: 2rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__dot {
  position: absolute; left: -1.9rem; top: 6px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ground);
  box-shadow: 0 0 0 2px var(--accent-text), 0 0 12px rgba(var(--jade-rgb), .4);
}
.timeline__item--current .timeline__dot { background: var(--accent-text); animation: pulse 2.6s infinite; }
.timeline__period {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-text); margin-bottom: .3rem;
}
.timeline__title { font-size: 1.1rem; margin-bottom: .2rem; }
.timeline__org { font-size: .88rem; color: var(--ink-muted); margin-bottom: .7rem; }
.timeline__bullets { list-style: none; margin: 0 0 .8rem; padding: 0; font-size: .88rem; }
.timeline__bullets li { position: relative; padding-left: 1.05rem; margin-bottom: .35rem; color: var(--ink-muted); }
.timeline__bullets li::before {
  content: ''; position: absolute; left: 0; top: .6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--coral-text);
}

/* ==========================================================================
   Testimonials, gallery, achievements
   ========================================================================== */

.testimonial-rail {
  display: flex; gap: 1.1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .4rem .2rem 1.4rem; scrollbar-width: none;
}
.testimonial-rail::-webkit-scrollbar { display: none; }
.testimonial-card { flex: 0 0 min(400px, 84vw); scroll-snap-align: start; padding: 1.6rem; }
.testimonial-card__quote {
  font-size: 1rem; line-height: 1.68; color: var(--ink); margin-bottom: 1.3rem;
}
.testimonial-card__quote::before {
  content: '\201C'; display: block;
  font-family: var(--font-display); font-size: 2.8rem; font-weight: 700;
  line-height: .55; color: var(--accent-text); opacity: .45; margin-bottom: .5rem;
}
.testimonial-card__who { display: flex; align-items: center; gap: .8rem; }
.avatar {
  width: 42px; height: 42px; flex: none; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 var(--bevel-light);
}
.avatar--letter {
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: .85rem;
  color: var(--on-accent);
  background: linear-gradient(140deg, var(--jade), var(--coral));
}
.stars { color: var(--gold); font-size: .78rem; letter-spacing: .1em; margin-bottom: .9rem; }
[data-theme='light'] .stars, :root:not([data-theme='dark']) .stars { color: #b8860b; }
.rail-nav { display: flex; gap: .45rem; }

.masonry { columns: 3 290px; column-gap: clamp(.8rem, 1.6vw, 1.2rem); }
.masonry > * { break-inside: avoid; margin-bottom: clamp(.8rem, 1.6vw, 1.2rem); }

.gallery-rail {
  display: flex; gap: 1.1rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: .4rem .2rem 1.4rem; scrollbar-width: none;
}
.gallery-rail::-webkit-scrollbar { display: none; }
.gallery-rail__item { flex: 0 0 min(320px, 78vw); scroll-snap-align: start; }
.gallery-rail__item img { aspect-ratio: 4 / 3; object-fit: cover; }

.gallery-item {
  position: relative; display: block;
  border-radius: var(--r); overflow: hidden; cursor: zoom-in;
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 0 0 1px var(--edge-strong), var(--cast-lg); }
.gallery-item img { width: 100%; transition: transform .8s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1rem;
  background: linear-gradient(180deg, transparent 45%, rgba(3, 12, 10, .85));
  opacity: 0; transition: opacity .4s var(--ease);
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }
.gallery-item__title { color: #f2fbf8; font-weight: 600; font-size: .93rem; margin: 0; }
.gallery-item__meta {
  color: rgba(242, 251, 248, .72); margin: .2rem 0 0;
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
}

.lightbox {
  position: fixed; inset: 0; z-index: 1060;
  display: none; place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(3, 10, 8, .82);
  backdrop-filter: blur(26px) saturate(140%);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
}
.lightbox.is-open { display: grid; }
.lightbox__img {
  max-width: 100%; max-height: 78vh; border-radius: var(--r);
  box-shadow: 0 40px 100px rgba(0, 0, 0, .7);
  animation: zoom-in .4s var(--ease);
}
@keyframes zoom-in { from { opacity: 0; transform: scale(.95); } }
.lightbox__caption {
  color: rgba(242, 251, 248, .82); text-align: center; margin-top: 1rem;
  font-family: var(--font-mono); font-size: .7rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
}
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 14px; cursor: pointer; font-size: 1.05rem;
  color: #f2fbf8; border: 0;
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 1px rgba(255, 255, 255, .14);
  transition: background-color .3s var(--ease);
}
.lightbox__close:hover, .lightbox__prev:hover, .lightbox__next:hover { background: rgba(255, 255, 255, .18); }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1.2rem; top: 50%; transform: translateY(-50%); }

.achv-card { display: flex; gap: 1.05rem; padding: 1.4rem; align-items: flex-start; }
.achv-card__icon {
  width: 48px; height: 48px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px; font-size: 1.2rem;
  color: var(--coral-text);
  background: rgba(var(--coral-rgb), .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--coral-rgb), .25);
  overflow: hidden;
}
.achv-card__icon img { width: 100%; height: 100%; object-fit: contain; }
.achv-card__title { font-size: 1.05rem; margin-bottom: .25rem; }
.card-x__body .achv-card__title { font-size: 1.28rem; letter-spacing: -.024em; margin-bottom: .45rem; }
.achv-card__issuer { font-size: .86rem; color: var(--ink-muted); margin-bottom: .55rem; }
.achv-card__date {
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .11em; text-transform: uppercase; color: var(--ink-faint);
}

/* ==========================================================================
   Prose
   ========================================================================== */

.prose { font-size: 1.04rem; line-height: 1.8; color: var(--ink-muted); max-width: 100%; text-align: justify; }
/* Smaller than the sitewide `p` margin (1.15em) — CKEditor authors add a
   blank `&nbsp;` paragraph between sections for extra breathing room, and
   at the full margin that stacks into a very tall gap. */
.prose p { margin-bottom: .6em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.05rem); margin: 2.5rem 0 .9rem; }
.prose h3 { font-size: 1.28rem; margin: 2rem 0 .65rem; }
.prose ul, .prose ol { padding-left: 1.3rem; margin-bottom: 1.25rem; }
.prose li { margin-bottom: .45rem; }
.prose img { border-radius: var(--r); margin: 1.9rem 0; box-shadow: var(--cast-md); }
.prose blockquote {
  margin: 1.9rem 0; padding: 1.1rem 1.35rem;
  border-radius: var(--r-sm);
  border-left: 2px solid var(--accent-text);
  background: rgba(var(--pane-tint), var(--pane-thin));
  font-size: 1.05rem; color: var(--ink);
}
.prose code {
  padding: .13em .42em; border-radius: 6px;
  background: rgba(var(--jade-rgb), .12);
  color: var(--accent-text); font-size: .87em;
}
.prose pre {
  padding: 1.2rem 1.4rem; margin: 1.7rem 0;
  border-radius: var(--r); overflow-x: auto;
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
}
.prose pre code { padding: 0; background: none; color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: .92rem; }
.prose th, .prose td { padding: .65rem .9rem; border-bottom: 1px solid var(--edge); text-align: left; }
.prose th {
  font-family: var(--font-mono); font-size: .66rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); font-weight: 600;
}
.prose a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ==========================================================================
   Forms — inputs are recessed panes, pressed into the glass
   ========================================================================== */

.field { margin-bottom: 1.2rem; }
.field__label {
  display: block; margin-bottom: .45rem;
  font-family: var(--font-mono); font-size: .67rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint);
}
.field__label .req { color: var(--coral-text); }
.field__help { font-size: .79rem; color: var(--ink-faint); margin-top: .4rem; }
.field__error {
  display: flex; align-items: flex-start; gap: .4rem;
  font-size: .8rem; color: #d1442e; margin-top: .4rem;
}
[data-theme='dark'] .field__error { color: #ff9a80; }

.form-control, .form-select {
  width: 100%;
  padding: .78rem 1.05rem;
  font-family: var(--font-body); font-size: .93rem; color: var(--ink);
  background: rgba(var(--pane-tint), var(--pane-thin));
  border: 0; border-radius: var(--r-sm);
  box-shadow: inset 0 2px 4px var(--bevel-dark), 0 0 0 1px var(--edge);
  transition: box-shadow .3s var(--ease), background-color .3s var(--ease);
}
.form-control:focus, .form-select:focus {
  outline: none;
  color: var(--ink);
  background: rgba(var(--pane-tint), var(--pane-mid));
  box-shadow: inset 0 2px 4px var(--bevel-dark), 0 0 0 1px rgba(var(--jade-rgb), .6),
              0 0 0 4px rgba(var(--jade-rgb), .14);
}
.form-control::placeholder { color: var(--ink-faint); }
.form-control.is-invalid, .form-select.is-invalid { box-shadow: inset 0 2px 4px var(--bevel-dark), 0 0 0 1px #d1442e; }
textarea.form-control { resize: vertical; min-height: 140px; }
.form-select {
  appearance: none; cursor: pointer;
  padding-right: 2.5rem;
}
.form-select option { background: var(--ground); color: var(--ink); }
.select-wrap { position: relative; }
.select-wrap::after {
  content: ''; position: absolute; top: 0; right: 1rem; bottom: 0; width: 13px;
  margin: auto 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23556c63' d='M8 10.5 3.5 6h9z'/%3E%3C/svg%3E") no-repeat center / 13px;
}
[data-theme='dark'] .select-wrap::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23a5bab3' d='M8 10.5 3.5 6h9z'/%3E%3C/svg%3E");
}
.form-check-input { width: 16px; height: 16px; margin-top: .22rem; accent-color: var(--accent-text); flex: none; }

.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.captcha-box { display: flex; align-items: stretch; gap: .6rem; flex-wrap: wrap; }
.captcha-question {
  display: flex; align-items: center; gap: .55rem;
  padding: .55rem 1.05rem; border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: 1rem; font-weight: 600;
  color: var(--ink); white-space: nowrap; user-select: none;
  background: rgba(var(--jade-rgb), .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--jade-rgb), .3);
}
.captcha-question i { color: var(--accent-text); }
.captcha-box .form-control { max-width: 120px; }
.captcha-refresh { flex: none; width: 42px; height: auto; }

.alert-x {
  display: flex; gap: .8rem; align-items: flex-start;
  padding: 1rem 1.15rem; border-radius: var(--r-sm);
  font-size: .9rem; margin-bottom: 1.25rem;
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  color: var(--ink-muted);
}
.alert-x i { font-size: 1.05rem; margin-top: .08rem; }
.alert-x--success { box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .45); }
.alert-x--success i { color: var(--accent-text); }
.alert-x--error { box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(209, 68, 46, .45); }
.alert-x--error i { color: #d1442e; }
.alert-x--info i { color: var(--accent-text); }

.contact-method {
  display: flex; align-items: center; gap: .85rem;
  padding: .85rem 0; border-bottom: 1px solid var(--edge); color: var(--ink);
}
.contact-method:last-of-type { border-bottom: 0; }
.contact-method__icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center; border-radius: 12px;
  color: var(--accent-text); font-size: 1rem;
  background: rgba(var(--jade-rgb), .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--jade-rgb), .22);
}
.contact-method__label {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .15em; text-transform: uppercase; color: var(--ink-faint);
}
.contact-method__value { font-weight: 600; font-size: .93rem; }
.contact-method:hover .contact-method__value { color: var(--accent-text); }

.faq-link-card {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.2rem; color: var(--ink); text-decoration: none;
}
.faq-link-card__go { margin-left: auto; color: var(--ink-faint); transition: transform .4s var(--spring), color .3s var(--ease); }
.faq-link-card:hover .faq-link-card__go { color: var(--accent-text); transform: translateX(4px); }
.faq-link-card:hover .contact-method__value { color: var(--accent-text); }

/* ==========================================================================
   Footer, pagination, misc
   ========================================================================== */

.footer-x {
  position: relative; margin-top: var(--section-y);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--edge);
}
.footer-x__grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem); padding-bottom: 2.5rem;
}
.footer-x__statement {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.9rem); font-weight: 700;
  letter-spacing: -.032em; line-height: 1.15;
  color: var(--ink); max-width: 20ch; margin: 0 0 1.3rem;
}
.footer-x__heading {
  font-family: var(--font-mono); font-size: .65rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1rem;
}
.footer-x__socials { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.75rem; }
.footer-x__links { list-style: none; margin: 0; padding: 0; }
.footer-x__links li { margin-bottom: .55rem; }
.footer-x__links a { font-size: .88rem; color: var(--ink-muted); }
.footer-x__links a:hover { color: var(--accent-text); }
.footer-x__links--split {
  display: grid;
  grid-template-columns: repeat(2, minmax(80px, 1fr));
  column-gap: 1.25rem;
}
.footer-x__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1rem; padding: 1.4rem 0; border-top: 1px solid var(--edge);
  font-family: var(--font-mono); font-size: 1rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  font-weight: 700;
}

.social-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px; font-size: .95rem; color: var(--ink-muted);
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  transition: all .35s var(--spring);
}
.social-btn:hover {
  color: var(--on-accent); transform: translateY(-3px);
  background: linear-gradient(140deg, var(--jade), var(--coral));
  box-shadow: 0 8px 22px rgba(var(--jade-rgb), .35);
}

.pagination-x { display: flex; justify-content: center; align-items: center; gap: .35rem; margin-top: 2.75rem; flex-wrap: wrap; }
.pagination-x a, .pagination-x span {
  min-width: 40px; height: 40px;
  display: grid; place-items: center; padding-inline: .7rem;
  border-radius: 12px; font-size: .85rem; font-weight: 500; color: var(--ink-muted);
  background: rgba(var(--pane-tint), var(--pane-thin));
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge);
  transition: all .3s var(--ease);
}
.pagination-x a:hover { color: var(--accent-text); box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px rgba(var(--jade-rgb), .5); }
.pagination-x .is-current {
  color: var(--on-accent); font-weight: 700;
  background: linear-gradient(140deg, var(--jade), var(--coral));
  box-shadow: 0 6px 18px rgba(var(--jade-rgb), .3);
}
.pagination-x .is-disabled { opacity: .35; pointer-events: none; }

.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  font-family: var(--font-mono); font-size: .66rem; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); margin-bottom: 1rem;
}
.breadcrumbs a { color: var(--ink-muted); }
.breadcrumbs a:hover { color: var(--accent-text); }
.breadcrumbs i { font-size: .58rem; opacity: .5; }

.empty-state {
  text-align: center; padding: clamp(3rem, 8vw, 5rem) 1.5rem;
  border-radius: var(--r-lg); color: var(--ink-muted);
}
.empty-state i { font-size: 2.2rem; color: var(--ink-faint); margin-bottom: .9rem; display: block; }

/* The closing call to action: a thick pane with a slow light sweeping over it. */
.cta-panel {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: var(--r-xl); text-align: center;
}
.cta-panel::before {
  content: ''; position: absolute; inset: -60%;
  background: conic-gradient(from 0deg,
    transparent, rgba(var(--jade-rgb), .16), transparent 32%,
    rgba(var(--coral-rgb), .14), transparent 68%);
  animation: sweep 26s linear infinite;
  pointer-events: none; z-index: 0;
  opacity: var(--frost); filter: none; mix-blend-mode: normal;
}
@keyframes sweep { to { transform: rotate(360deg); } }
.cta-panel > * { position: relative; z-index: 1; }

.to-top {
  position: fixed; right: clamp(1rem, 3vw, 1.6rem); bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 1020; width: 44px; height: 44px;
  display: grid; place-items: center; cursor: pointer;
  border-radius: 14px; font-size: 1rem; color: var(--ink); border: 0;
  background: rgba(var(--pane-tint), var(--pane-mid));
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-md);
  opacity: 0; transform: translateY(14px) scale(.92); pointer-events: none;
  transition: all .45s var(--spring);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--accent-text); }

/* Detail pages ------------------------------------------------------------ */
.detail-hero { padding-top: calc(var(--nav-h) + clamp(.9rem, 2vw, 1.6rem)); }
.detail-hero__title { margin-bottom: 1rem; }
.detail-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.6rem;
  font-family: var(--font-mono); font-size: 1rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  padding: 1rem 0; margin-bottom: 2rem;
  border-block: 1px solid var(--edge);
}
.detail-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.detail-meta i { color: var(--accent-text); }

.cover-frame {
  border-radius: var(--r-lg); overflow: hidden;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  box-shadow: inset 0 1px 0 0 var(--bevel-light), 0 0 0 1px var(--edge), var(--cast-lg);
  /* Cover images arrive in all sorts of native shapes — portrait phone
     screenshots included — and at full container width those can render
     enormous without a height cap. Cap it and show the whole image inside.
     (A `height`, not just `max-height`, is required here — the img's
     `height: 100%` below can't resolve against an auto-height parent.) */
  height: min(70vh, 640px);
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--pane-tint), var(--pane-thin));
}
.cover-frame img { width: 100%; height: 100%; object-fit: contain; }

.sidebar-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.sidebar-cover img { width: 100%; height: 100%; object-fit: contain; }
.case-block {
  padding: clamp(1.4rem, 2.8vw, 2rem);
  margin-bottom: 1.25rem;
  --case-accent: var(--coral-text);
  --case-accent-rgb: var(--coral-rgb);
}
.case-block--outcome {
  --case-accent: var(--accent-text);
  --case-accent-rgb: var(--jade-rgb);
}
.case-block--approach {
  --case-accent: var(--azure-text);
  --case-accent-rgb: var(--azure-rgb);
}
.case-block__head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.2rem; }
.case-block__icon {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 13px; font-size: 1.1rem;
  color: var(--case-accent);
  background: rgba(var(--case-accent-rgb), .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 0 0 1px rgba(var(--case-accent-rgb), .28);
}
.case-block__label {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--case-accent); margin: 0;
}
/* The challenge/approach/outcome copy leans on bold "mini-headings" inside a
   single paragraph (a line of <strong> text, then a <br>, then the body) —
   a common CKEditor authoring pattern that otherwise has nowhere to breathe
   since a <br> can't carry margin the way a real paragraph break can. */
.case-block .prose { text-align: left; }
.case-block .prose strong {
  display: inline;
  margin: 1.3em 0 .35em;
  font-family: var(--font-display); font-weight: 700; letter-spacing: -.012em;
  font-size: 1.08em; color: var(--ink);
}
.case-block .prose p:first-child strong:first-child { margin-top: 0; }
.sticky-side { position: sticky; top: calc(var(--nav-h) + 1.4rem); }

.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline;
  padding: .7rem 0; border-bottom: 1px solid var(--edge);
}
.info-list li:last-child { border-bottom: 0; }
.info-list .k {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--ink-faint);
}
.info-list .v { font-size: .89rem; font-weight: 600; color: var(--ink); text-align: right; }
.client-badge { display: inline-flex; align-items: center; gap: .5rem; }
.client-badge__logo {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--edge);
}
.client-badge__logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }

/* Project-card footer variant: fixed height, width follows the logo's own
   aspect ratio instead of being forced into a square. Still a flex item of
   .card-x__footer, so `flex: 0 1 auto` (the default) lets it shrink rather
   than crowd out the platform icon or the "View" link if space is tight.

   The img's height is a literal 36px, not a percentage: a percentage height
   combined with `max-width: 100%` hits a CSS replaced-element sizing rule
   where, once max-width clamps the width, the browser recomputes height from
   that width to preserve the image's intrinsic ratio — silently overriding
   the explicit height. The badge's `overflow: hidden` then clipped whatever
   didn't fit, cropping the bottom of the logo. A fixed px height has no such
   rule to trigger, so it stays exactly 36px regardless of width clamping. */
.client-badge__logo--fit { width: auto; max-width: 110px; flex: 0 1 auto; }
.client-badge__logo--fit img { width: auto; height: 36px; object-fit: contain; padding: 3px; }

/* ==========================================================================
   Hero vectors — contact, blog, work, gallery & achievements
   Small hand-drawn motifs (envelope / page+pen / browser / photo frame /
   trophy, each with broadcast arcs and a pulsing origin node) rather than
   stock illustrations, sharing one visual vocabulary across pages. The
   pulse echoes .dot-pulse, the site's existing "available" indicator.
   ========================================================================== */

.contact-hero-svg, .blog-hero-svg, .work-hero-svg, .gallery-hero-svg, .achievements-hero-svg, .faq-hero-svg {
  width: 100%; height: auto; max-width: 300px;
}

.signal-dot {
  transform-box: fill-box;
  transform-origin: center;
  animation: signal-pulse 2.6s ease-in-out infinite;
}
.signal-arc { animation: signal-fade 2.6s ease-in-out infinite; }
.signal-arc--2 { animation-delay: .22s; }
.signal-arc--3 { animation-delay: .44s; }

@keyframes signal-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}
@keyframes signal-fade {
  0%, 100% { opacity: var(--rest-opacity, 1); }
  50% { opacity: calc(var(--rest-opacity, 1) * .35); }
}

/* ==========================================================================
   Motion
   ========================================================================== */

[data-reveal] {
  opacity: 0; transform: translateY(20px) scale(.995);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

.spinner {
  display: inline-block; width: 13px; height: 13px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin .75s linear infinite;
  vertical-align: -2px; margin-right: .4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.is-copied { color: var(--accent-text) !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
  .nav-links { display: none; }
  .nav-burger { display: grid; }
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__cta, .hero__socials { justify-content: center; }
  .hero__portrait { order: -1; width: min(100%, 290px); margin-bottom: .5rem; }
  .hero__float { display: none; }
  .sticky-side { position: static; }
  .masonry { columns: 2 230px; }
}

@media (max-width: 767.98px) {
  :root { --section-y: 2.5rem; --nav-h: 64px; }
  .hero__pane { padding: 1.4rem; }
  .filter-search { margin-left: 0; width: 100%; }
  .footer-x__grid { grid-template-columns: 1fr 1fr; }
  .masonry { columns: 1; }
  .grid-auto { grid-template-columns: 1fr; }
  .detail-meta { gap: .6rem 1.1rem; }
  /* Layered blur is expensive on phones; thin it out. */
  .pane, .pane--thick {
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
  }
}

@media (max-width: 479.98px) {
  .footer-x__grid { grid-template-columns: 1fr; }
  .hero__cta .btn-x { width: 100%; }
  .captcha-box .form-control { max-width: none; flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .substrate { display: none; }
  .hero__portrait-frame::after { display: none; }
}

@media print {
  .nav-x, .drawer, .footer-x, .to-top, .substrate, .substrate-fallback, .grain,
  .scroll-hint, .filter-bar, .progress-x, .btn-x { display: none !important; }
  body { background: #fff; color: #000; }
  .pane, .pane--thin, .pane--thick {
    background: #fff !important; box-shadow: 0 0 0 1px #ddd !important;
    backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  }
  a { color: #000; }
}

.ck-content p, .ck-content ul, .ck-content ol, .ck-content strong {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
}