/* =============================================================================
   [YOUR NAME] — Security portfolio
   One stylesheet, organized by section. Mobile-first: base rules target small
   screens, min-width media queries layer on larger layouts.

   TABLE OF CONTENTS
     01  Fonts (self-hosted)
     02  Design tokens (:root custom properties) + light theme
     03  Reset & base elements
     04  Type scale & prose
     05  Layout primitives (container, section rhythm)
     06  Accessibility utilities (skip link, focus, sr-only)
     07  Buttons & links
     08  Header & navigation (mobile drawer -> desktop bar)
     09  Hero + REDACTION signature
     10  Logo wall
     11  Credentials (certs + skills)
     12  Field notes (writing)
     13  Contact
     14  Footer
     15  Blog: index list
     16  Blog: article / prose
     17  Scroll reveals & reduced motion
   ========================================================================== */


/* 01  FONTS ================================================================= */
/* Self-hosted, no CDN. Archivo is a variable font (weight + width axes) — one
   file covers every display weight and the expanded cut. */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("../fonts/ibm-plex-sans-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}


/* 02  DESIGN TOKENS ========================================================= */
:root {
  /* Palette — dark is the primary identity.
     accent = "signal amber": the universal elevated/attention state. */
  --ink:        #0B0E14;   /* deep cool near-black (not #000) */
  --surface-1:  #12161F;
  --surface-2:  #1B212D;
  --line:       #2A3342;   /* hairline dividers / borders */
  --text:       #E6E9EF;
  --muted:      #9AA6B8;   /* secondary text — AA on ink & surfaces */
  --accent:     #FFB020;   /* signal amber */
  --accent-2:   #5AD1C4;   /* restrained cool cyan — meta / verify links */

  /* Derived */
  --accent-soft: rgba(255, 176, 32, .12);
  --ink-on-accent: #12100A;        /* dark text placed on amber fills */
  --link:        var(--accent);
  --focus:       #FFD37A;          /* focus ring — lighter amber, high contrast */
  --shadow: 0 1px 0 rgba(255,255,255,.02), 0 18px 40px -24px rgba(0,0,0,.7);

  /* Glass surfaces — the floating header pieces */
  --glass-bg: rgba(18, 22, 31, 0.55);
  --glass-brd: rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 10px 34px -14px rgba(0,0,0,.65);

  /* Type families */
  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Cascadia Code",
               Consolas, "Liberation Mono", monospace;

  /* Fluid type scale (clamp: min @320px, ideal, max). ~1.22 ratio. */
  --step--1: clamp(0.79rem, 0.76rem + 0.14vw, 0.86rem);
  --step-0:  clamp(1.00rem, 0.96rem + 0.20vw, 1.13rem);
  --step-1:  clamp(1.22rem, 1.14rem + 0.38vw, 1.50rem);
  --step-2:  clamp(1.49rem, 1.34rem + 0.72vw, 2.00rem);
  --step-3:  clamp(1.82rem, 1.58rem + 1.20vw, 2.66rem);
  --step-4:  clamp(2.22rem, 1.82rem + 1.98vw, 3.55rem);
  --step-5:  clamp(2.71rem, 2.05rem + 3.28vw, 4.73rem);
  /* min kept low enough that a long single-word surname fits at 320px */
  --step-hero: clamp(1.9rem, 1.05rem + 4.2vw, 4.6rem);

  /* Fluid spacing */
  --space-3xs: clamp(0.25rem, 0.24rem + 0.06vw, 0.31rem);
  --space-2xs: clamp(0.5rem, 0.48rem + 0.11vw, 0.625rem);
  --space-xs:  clamp(0.75rem, 0.71rem + 0.20vw, 0.94rem);
  --space-s:   clamp(1rem, 0.95rem + 0.27vw, 1.25rem);
  --space-m:   clamp(1.5rem, 1.42rem + 0.41vw, 1.88rem);
  --space-l:   clamp(2rem, 1.83rem + 0.87vw, 2.75rem);
  --space-xl:  clamp(3rem, 2.65rem + 1.74vw, 4.5rem);
  --space-2xl: clamp(4rem, 3.3rem + 3.48vw, 7rem);

  /* Layout */
  --container: 74rem;      /* ~1184px */
  --container-narrow: 46rem;
  --gutter: clamp(1.15rem, 0.7rem + 2.2vw, 2.5rem);
  --radius: 4px;           /* engineered, near-square corners */
  --radius-lg: 8px;
  --header-h: 4.25rem;

  color-scheme: dark;
}

/* Light theme — OPT-IN via the header toggle; dark is the default (set on
   <html data-theme> by an inline script before first paint). Kept disciplined:
   amber darkens to an ochre so small text still passes AA. */
:root[data-theme="light"] {
    --ink:        #F4F6FA;
    --surface-1:  #FFFFFF;
    --surface-2:  #EEF1F6;
    --line:       #D3DAE6;
    --text:       #14181F;
    --muted:      #51607A;
    --accent:     #9A5800;          /* darkened amber — AA (>=4.5) as small text on light AND for white-on-accent buttons */
    --accent-2:   #0E7C70;          /* darkened cyan */
    --accent-soft: rgba(154, 88, 0, .10);
    --ink-on-accent: #FFFFFF;
    --focus:      #7A4600;
    --shadow: 0 1px 0 rgba(0,0,0,.02), 0 20px 40px -28px rgba(20,30,60,.35);
    --glass-bg: rgba(255, 255, 255, 0.62);
    --glass-brd: rgba(15, 20, 30, 0.10);
    --glass-shadow: 0 10px 34px -16px rgba(20,30,60,.28);
    color-scheme: light;
}


/* 03  RESET & BASE ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* offset in-page anchors so the fixed header doesn't cover section tops */
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--text);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Offset content below the fixed header. */
  padding-top: var(--header-h);
  /* Clip the off-canvas nav so the closed drawer can never create a
     horizontal scrollbar. Safe here because the header is position:fixed
     (not sticky), so making body a scroll container doesn't detach it. */
  overflow-x: hidden;
  /* subtle vertical wash so the near-black has depth without being flat */
  background-image:
    radial-gradient(120% 60% at 50% -10%, rgba(255,176,32,.05), transparent 60%);
  background-attachment: fixed;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }

ul, ol { list-style: none; padding: 0; }

strong, b { font-weight: 600; }

::selection { background: var(--accent); color: var(--ink-on-accent); }

:where(button, input, textarea, select) { font: inherit; color: inherit; }


/* 04  TYPE SCALE & PROSE =================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 118%;      /* expanded cut — the engineered "letterhead" look */
  line-height: 1.04;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1, h2, h3, h4 { overflow-wrap: break-word; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); font-stretch: 112%; }
h4 { font-size: var(--step-1); font-stretch: 108%; }
p  { text-wrap: pretty; overflow-wrap: break-word; }

/* The mono "eyebrow" label used to name each section (no numbering — these
   sections are not a sequence). Structure that describes content. */
.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
}
.eyebrow::before {
  content: "";
  width: 1.6em; height: 2px;
  background: currentColor;
  flex: none;
}

.lede { font-size: var(--step-1); color: var(--text); max-width: 42ch; }


/* 05  LAYOUT PRIMITIVES ==================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

/* Section vertical rhythm — ONE rule owns section padding so nothing fights
   over it later (see specificity note in the brief). Modifiers only add. */
.section { padding-block: var(--space-2xl); }
.section--tight { padding-block: var(--space-xl); }
.section + .section { padding-top: 0; }        /* avoid doubled gaps */

.section__head {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-l);
  max-width: 60ch;
}

.rule { height: 1px; background: var(--line); border: 0; }


/* 06  ACCESSIBILITY UTILITIES ============================================== */
.skip-link {
  position: fixed;
  top: 0; left: var(--gutter);
  transform: translateY(-120%);
  z-index: 200;
  background: var(--accent);
  color: var(--ink-on-accent);
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: transform .15s ease;
}
.skip-link:focus-visible { transform: translateY(0); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* One consistent, on-brand focus ring everywhere. Never removed without a
   replacement. */
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}


/* 07  BUTTONS & LINKS ====================================================== */
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--ink-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  min-height: 44px;                 /* touch target */
  padding: 0.7rem 1.4rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -12px rgba(255,176,32,.5); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }

.arrow-link {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
}
.arrow-link .arrow { transition: transform .15s ease; color: var(--accent); }
.arrow-link:hover .arrow { transform: translateX(4px); }


/* 08  HEADER — floating glass pill navigation ============================= */
/* The header is a transparent, fixed positioning layer across the top. Only
   its children (brand, centered nav pill, theme toggle) capture pointer
   events; the empty band passes clicks through to the page beneath. */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding-top: max(0.6rem, env(safe-area-inset-top));
  padding-bottom: 0.6rem;
  pointer-events: none;
}
/* 3-column grid: brand | centred pill | theme toggle. The side columns flex
   (1fr) so the auto-width pill stays centred and can grow without clipping. */
.site-header .container {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-s);
  width: 100%;
}
.site-header .container > * { pointer-events: auto; }
.site-header .brand { justify-self: start; }
.site-header .theme-toggle { justify-self: end; }

/* Frosted-glass surface shared by the floating pieces. */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
}
/* Fallback where backdrop-filter is unsupported: a more opaque surface. */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .glass { background: color-mix(in srgb, var(--ink) 90%, transparent); }
  :root[data-theme="light"] .glass { background: color-mix(in srgb, var(--surface-1) 94%, transparent); }
}

/* Brand — small floating chip, top-left */
.brand {
  font-family: var(--font-display);
  font-weight: 800; font-stretch: 118%;
  font-size: var(--step-0);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--text);
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 44px;
  padding: 0 0.95rem;
  border-radius: 999px;
  white-space: nowrap;              /* never wrap the name to two lines */
}
/* Logo mark — two fixed-colour files swapped by theme: white on the dark
   theme, ink on the light theme. The brand is the logo alone (no wordmark),
   so it's sized by height and keeps its natural aspect ratio. */
.brand__logo { display: inline-flex; height: 1.5rem; flex: none; }
.brand__logo img { height: 100%; width: auto; display: block; }
.brand__logo .for-light { display: none; }
:root[data-theme="light"] .brand__logo .for-dark  { display: none; }
:root[data-theme="light"] .brand__logo .for-light { display: block; }

/* Theme toggle — round floating chip, top-right */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  color: var(--text);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle .ico--moon { display: none; }
:root[data-theme="light"] .theme-toggle .ico--sun  { display: none; }
:root[data-theme="light"] .theme-toggle .ico--moon { display: block; }

/* --- The centered nav pill --------------------------------------------- */
.nav-pill {
  position: relative;               /* anchor for the mobile dropdown */
  justify-self: center;             /* centred grid item */
  max-width: 100%;
  display: flex; align-items: center;
  padding: 0.28rem;
  border-radius: 999px;
  z-index: 2;
}

/* Trigger = the catch-word shown while collapsed ("Menu") */
.nav-pill__trigger {
  display: inline-flex; align-items: center; gap: 0;
  min-height: 40px;
  padding: 0 1.05rem;
  background: transparent; border: 0; cursor: pointer;
  color: var(--text);
  font-family: var(--font-mono); font-weight: 500;
  font-size: var(--step--1); letter-spacing: 0.16em;
  text-transform: uppercase; white-space: nowrap;
}
.nav-pill__word {
  overflow: hidden; white-space: nowrap;
  max-width: 7rem; margin-right: 0.55em;
  transition: max-width .4s cubic-bezier(.4,0,.2,1), opacity .25s ease, margin-right .4s ease;
}
.nav-pill__chev {
  width: 12px; height: 12px; flex: none;
  color: var(--accent);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
}

/* Menu links (styling shared across breakpoints) */
.nav-pill__menu a {
  display: inline-flex; align-items: center;
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.nav-pill__menu a:hover,
.nav-pill__menu a[aria-current] { color: var(--text); }
.nav-pill__cta { color: var(--ink-on-accent) !important; background: var(--accent); }

/* ---- Base (phones / small tablets < 64rem): tap-to-open dropdown ------- */
.nav-pill__menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  left: 50%;
  display: flex; flex-direction: column; align-items: stretch;
  min-width: max(56vw, 13rem);
  padding: 0.4rem;
  border-radius: 1.15rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow);
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity .25s ease, transform .3s cubic-bezier(.22,.61,.36,1), visibility .25s;
}
.nav-pill__menu a {
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: 0.7rem;
  font-size: var(--step--1);
}
.nav-pill__menu a:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.nav-pill__cta { justify-content: center; margin-top: 0.2rem; }

.nav-pill[data-open="true"] .nav-pill__menu,
.nav-pill:focus-within .nav-pill__menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-pill[data-open="true"] .nav-pill__chev,
.nav-pill:focus-within .nav-pill__chev { transform: rotate(180deg); }

/* ---- Very narrow screens: tighten so brand + pill + toggle all fit ---- */
@media (max-width: 26rem) {
  .site-header .container { gap: 0.35rem; }
  .brand { padding: 0 0.55rem; }
  .brand__logo { height: 1.2rem; }
  .nav-pill__trigger { padding: 0 0.6rem; letter-spacing: 0.08em; }
}

/* ---- Desktop (>= 64rem): hover-to-expand horizontal morph ------------- */
@media (min-width: 64rem) {
  .nav-pill { overflow: hidden; }   /* clip links during the width morph */

  .nav-pill__menu {
    position: static;
    flex-direction: row; align-items: center;
    min-width: 0; padding: 0; border: 0; box-shadow: none; border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none; backdrop-filter: none;
    max-width: 0; overflow: hidden;
    opacity: 0; visibility: hidden; pointer-events: auto;
    transform: none;
    transition: max-width .5s cubic-bezier(.22,.61,.36,1), opacity .4s ease, visibility .5s;
  }
  .nav-pill__menu a {
    min-height: 34px;
    padding: 0 0.8rem;
    border-radius: 999px;
  }
  .nav-pill__menu a:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
  .nav-pill__cta { margin-top: 0; }

  /* expand on hover, keyboard focus-within, or explicit open */
  .nav-pill:hover .nav-pill__menu,
  .nav-pill:focus-within .nav-pill__menu,
  .nav-pill[data-open="true"] .nav-pill__menu {
    max-width: 62rem; opacity: 1; visibility: visible;
    transform: none;   /* override the base dropdown's translateX(-50%) */
  }
  .nav-pill:hover .nav-pill__word,
  .nav-pill:focus-within .nav-pill__word,
  .nav-pill[data-open="true"] .nav-pill__word {
    max-width: 0; opacity: 0; margin-right: 0;
  }

  /* On desktop the menu opens sideways, so the arrow points RIGHT when
     collapsed (and swings to point left once expanded). On mobile it stays a
     down-chevron — the base rule above — because the menu drops down. */
  .nav-pill__chev { transform: rotate(-90deg); }
  .nav-pill:hover .nav-pill__chev,
  .nav-pill:focus-within .nav-pill__chev,
  .nav-pill[data-open="true"] .nav-pill__chev { transform: rotate(90deg); }
}


/* 09  HERO + REDACTION SIGNATURE ========================================== */
.hero {
  position: relative;
  /* shorter than full-height now that the hero holds only name + one line */
  min-height: calc(72dvh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: var(--space-2xl) var(--space-xl);
  overflow: hidden;
}
.hero__grid {
  display: grid;
  gap: var(--space-l);
  align-items: center;
  width: 100%;
}
.hero__eyebrow { margin-bottom: var(--space-s); }

.hero__name {
  font-size: var(--step-hero);
  line-height: 0.92;
  font-stretch: 122%;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-m);
}

/* A quiet descriptive line under the name: body face, muted, light weight,
   just larger than body so it pairs with the (smaller) title. */
.hero__statement {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step-1);   /* same size as the section ledes */
  line-height: 1.4;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: var(--space-l);
}
.hero__support { color: var(--muted); max-width: 46ch; margin-bottom: var(--space-l); }
/* Stack CTAs full-width on the narrowest screens so a long button label can
   never push past the viewport; sit them side by side once there's room. */
.hero__cta { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-s); }
@media (min-width: 30rem) { .hero__cta { flex-direction: row; align-items: center; flex-wrap: wrap; } }

/* --- The redaction mechanic ---------------------------------------------
   A .redact span shows its text normally (so it's readable with JS off and
   under reduced motion). When JS is present (html.js) an amber bar covers the
   word; on load we add .is-lit to wipe the bars away, right-to-left, staggered
   by --i. This is the site's single signature moment. */
.redact { position: relative; white-space: nowrap; color: var(--accent); }

.js .redact { color: var(--text); }
.js .redact::after {
  content: "";
  position: absolute;
  inset: -0.05em -0.12em;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(1);
  transform-origin: left center;
  transition: transform .5s cubic-bezier(.76, 0, .24, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 250ms);
}
.js .hero.is-lit .redact::after { transform: scaleX(0); transform-origin: right center; }

/* Portrait */
.hero__portrait {
  position: relative;
  justify-self: start;
  width: min(100%, 22rem);
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-1);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.hero__portrait img { width: 100%; height: 100%; object-fit: cover; }
/* mono corner caption on the portrait — a small documentary detail */
.hero__portrait::after {
  content: attr(data-caption);
  position: absolute;
  left: 0; bottom: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  background: rgba(11, 14, 20, 0.72);   /* fallback if color-mix unsupported */
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  padding: 0.35rem 0.6rem;
  border-top-right-radius: var(--radius);
}

/* Single-column hero (portrait removed for now). Copy uses a wider measure so
   it doesn't leave the empty column the portrait used to fill. */
.hero__copy { max-width: 52rem; }


/* 10  LOGO WALL =========================================================== */
.logos__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;                         /* hairline separation via bg */
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  padding: var(--space-s);
  background: var(--surface-1);
  text-decoration: none;
  transition: background-color .18s ease;
}
.logo:hover { background: var(--surface-2); }
/* Logo only, no caption. A fixed box + object-fit:contain gives every mark
   similar visual weight regardless of aspect (icon marks fill the height,
   wordmarks fill the width). Rendered as a monochrome silhouette. */
.logo__mark { width: 100%; height: 54px; display: flex; align-items: center; justify-content: center; }
.logo__mark img {
  width: 100%; height: 100%; max-width: min(158px, 100%);
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.78;
  transition: opacity .18s ease;
}
:root[data-theme="light"] .logo__mark img { filter: brightness(0); opacity: 0.66; }
.logo:hover .logo__mark img { opacity: 1; }
.logo svg { width: 34px; height: 34px; flex: none; color: var(--muted); }
.logo:hover svg { color: var(--accent); }
@media (min-width: 40rem) { .logos__list { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .logos__list { grid-template-columns: repeat(6, 1fr); } }


/* 11  CREDENTIALS (certs + skills) ======================================== */
.credentials__grid { display: grid; gap: var(--space-xl); }
@media (min-width: 60rem) {
  .credentials__grid { grid-template-columns: 1.1fr 1fr; gap: var(--space-2xl); }
}

/* Certs — a scannable record. Mono for the data columns. */
.cert-list { display: flex; flex-direction: column; }
.cert {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.4rem var(--space-s);
  padding: var(--space-s) 0;
  border-top: 1px solid var(--line);
}
/* With a brand logo: a centred logo column on the left, text to its right. */
.cert--logo {
  grid-template-columns: 46px 1fr auto;
  column-gap: var(--space-m);
}
.cert__logo {
  grid-column: 1; grid-row: 1 / -1;
  align-self: center;
  display: flex; align-items: center; justify-content: center;
  height: 46px;
}
.cert__logo img {
  max-width: 100%; height: 34px; width: auto;   /* definite height (viewBox-only SVGs) */
  object-fit: contain;
  filter: brightness(0) invert(1);   /* monochrome, matches the wall */
  opacity: 0.85;
}
:root[data-theme="light"] .cert__logo img { filter: brightness(0); opacity: 0.72; }
.cert:last-child { border-bottom: 1px solid var(--line); }
.cert__name { font-weight: 600; font-size: var(--step-1); font-family: var(--font-display); font-stretch: 105%; }
.cert--logo .cert__name { grid-column: 2; }
.cert__year {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
}
.cert__issuer {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.03em;
}
.cert--logo .cert__issuer { grid-column: 2 / -1; }
.cert--logo .cert__verify { grid-column: 2 / -1 !important; }
.cert__verify {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  width: fit-content;
  min-height: 44px;
}
.cert__verify:hover { text-decoration: underline; }

/* Skills — grouped by domain, no meters. Presence is the signal. */
.skill-group + .skill-group { margin-top: var(--space-m); }
.skill-group__name {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: var(--space-2xs);
  margin-bottom: var(--space-xs);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.skill-group__count { color: var(--accent); }
.skill-group__items { display: flex; flex-wrap: wrap; gap: var(--space-2xs) var(--space-s); }
.skill-group__items li {
  position: relative;
  padding-left: 1em;
  font-size: var(--step-0);
}
.skill-group__items li::before {
  content: "";
  position: absolute; left: 0; top: 0.68em;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 1px;
}


/* 12  FIELD NOTES (writing) =============================================== */
.notes__grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.note {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
  padding: var(--space-l);
  background: var(--surface-1);
  text-decoration: none;
  color: inherit;
  transition: background-color .18s ease;
}
.note:hover { background: var(--surface-2); }
.note:hover .note__title { color: var(--accent); }
.note__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--muted);
}
.note__meta time { color: var(--accent); }
.note__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-stretch: 106%;
  font-size: var(--step-2);
  line-height: 1.1;
  transition: color .18s ease;
}
.note__summary { color: var(--muted); }
.note__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 0.2rem 0.5rem;
}
@media (min-width: 48rem) { .notes__grid { grid-template-columns: repeat(3, 1fr); } }

.notes__foot { margin-top: var(--space-l); display: flex; justify-content: flex-start; }


/* 13  CONTACT ============================================================= */
.contact__grid { display: grid; gap: var(--space-xl); }
@media (min-width: 54rem) { .contact__grid { grid-template-columns: 1.2fr 1fr; gap: var(--space-2xl); } }

.contact__lead { margin-bottom: var(--space-l); }

/* Email as a redaction bar that lifts on hover / focus / tap. This IS the
   anti-scraper obfuscation: the address is assembled by JS and never sits in
   the raw HTML. */
.email-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-s); }
.email {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  max-width: 100%;
  padding: 0.4rem 0.7rem;
  font-family: var(--font-mono);
  /* smaller than the display steps so a long address fits at 320px; can still
     wrap as a last resort rather than force horizontal overflow */
  font-size: clamp(0.86rem, 0.8rem + 0.3vw, 1.05rem);
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  color: var(--text);
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
/* the covering bar */
.js .email::after {
  content: "TAP TO REVEAL";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--ink-on-accent);
  background: var(--accent);
  border-radius: inherit;
  transform: scaleX(1);
  transform-origin: right center;
  transition: transform .3s cubic-bezier(.76,0,.24,1), opacity .2s ease;
}
.js .email:hover::after,
.js .email:focus-visible::after,
.js .email.is-revealed::after { transform: scaleX(0); opacity: 0; }
.js .email:hover, .js .email:focus-visible, .js .email.is-revealed { border-color: var(--accent); }

.copy-btn {
  display: inline-flex; align-items: center; gap: 0.5em;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}
.copy-btn:hover { color: var(--accent); border-color: var(--accent); }
.copy-btn[data-copied="true"] { color: var(--accent-2); border-color: var(--accent-2); }

.contact__links { margin-top: var(--space-l); display: flex; flex-direction: column; }
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding: var(--space-s) 0;
  min-height: 44px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--text);
}
.contact__link:last-child { border-bottom: 1px solid var(--line); }
.contact__link:hover { color: var(--accent); }
.contact__link .arrow { color: var(--accent); }

.contact__card {
  padding: var(--space-l);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  align-self: start;
}
.contact__card h3 { font-size: var(--step-1); margin-bottom: var(--space-s); }
.contact__meta { font-family: var(--font-mono); font-size: var(--step--1); color: var(--muted); display: flex; flex-direction: column; gap: var(--space-2xs); }
.contact__meta b { color: var(--text); font-weight: 500; }


/* 14  FOOTER ============================================================== */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: var(--space-l);
  padding-bottom: max(var(--space-l), env(safe-area-inset-bottom));
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
}
.site-footer p {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--muted);
  letter-spacing: 0.03em;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }


/* 15  BLOG: INDEX LIST ==================================================== */
.page-hero { padding-block: var(--space-2xl) var(--space-l); }
.page-hero h1 { font-size: var(--step-5); margin-block: var(--space-s); }
.page-hero .lede { color: var(--muted); }

.post-list { border-top: 1px solid var(--line); }
.post-item {
  display: grid;
  gap: var(--space-2xs) var(--space-l);
  padding: var(--space-l) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.post-item__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1rem;
  font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: 0.04em; color: var(--muted);
}
.post-item__meta time { color: var(--accent); }
.post-item__title {
  font-family: var(--font-display);
  font-weight: 700; font-stretch: 108%;
  font-size: var(--step-3);
  line-height: 1.08;
  transition: color .18s ease;
}
.post-item:hover .post-item__title { color: var(--accent); }
.post-item__summary { color: var(--muted); max-width: 68ch; }
.post-item__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
@media (min-width: 46rem) {
  .post-item { grid-template-columns: 12rem 1fr; align-items: start; }
  .post-item__meta { flex-direction: column; gap: 0.4rem; }
}


/* 16  BLOG: ARTICLE / PROSE ============================================== */
.article { padding-block: var(--space-xl) var(--space-2xl); }
.article__header { margin-bottom: var(--space-xl); }
.article__meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem;
  font-family: var(--font-mono); font-size: var(--step--1);
  letter-spacing: 0.05em; color: var(--muted);
  margin-bottom: var(--space-m);
}
.article__meta time { color: var(--accent); }
.article__title { font-size: var(--step-5); margin-bottom: var(--space-m); }
.article__standfirst { font-size: var(--step-1); color: var(--muted); max-width: 60ch; }

.prose { max-width: 42rem; }
.prose > * + * { margin-top: var(--space-m); }
.prose h2 { font-size: var(--step-3); margin-top: var(--space-xl); }
.prose h3 { font-size: var(--step-1); margin-top: var(--space-l); }
.prose p, .prose li { color: #D4D9E2; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-left: 1.3em; display: flex; flex-direction: column; gap: var(--space-2xs); }
.prose ul li { list-style: none; position: relative; }
.prose ul li::before { content: ""; position: absolute; left: -1.1em; top: 0.7em; width: 6px; height: 6px; background: var(--accent); border-radius: 1px; }
.prose ol { list-style: decimal; }
.prose ol li::marker { font-family: var(--font-mono); color: var(--accent); }
.prose blockquote {
  border-left: 2px solid var(--accent);
  padding: 0.2rem 0 0.2rem var(--space-m);
  color: var(--muted);
  font-style: italic;
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--line);
}
.prose pre {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  line-height: 1.6;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--space-m);
  overflow-x: auto;              /* wide code scrolls itself, page never does */
}
.prose pre code { background: none; border: 0; padding: 0; }
.prose figure { margin: var(--space-l) 0; }
.prose figcaption {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--muted); margin-top: var(--space-2xs);
}
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.article__back { margin-top: var(--space-2xl); }


/* 17  SCROLL REVEALS & REDUCED MOTION ==================================== */
/* Elements start slightly down + transparent; .is-in (added by Intersection
   Observer) brings them in. Applied only when JS is present. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--rev, 0) * 80ms);
  will-change: opacity, transform;
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  /* Redaction never plays — text is simply present. */
  .js .redact::after { display: none; }
  .js .redact { color: var(--text); }
  .js [data-reveal] { opacity: 1; transform: none; }
  /* Email still reveals, just without the wipe (see main.js: hover/focus). */
}
