/* ==========================================================================
   gumbley.ca — Benjamin Gumbley personal site
   Light theme · Navy + Electric Blue palette
   Two-column layout with sticky left profile sidebar
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7faff;
  --surface: #f4f8fd;
  --surface-2: #e9f1fa;
  --line: #e1e8f1;
  --line-strong: #c5d2e3;

  --ink: #0a1530;
  --ink-soft: #2c3955;
  --ink-mute: #5a6680;
  --ink-faint: #8c95a8;

  --accent: #1ba6e7;
  --accent-2: #0d6fb8;
  --accent-3: #59c2f0;
  --accent-glow: rgba(27,166,231,0.12);
  --accent-soft: rgba(27,166,231,0.08);

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

  --max: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --nav-h: 72px;
  --sidebar-w: 360px;

  --shadow-sm: 0 1px 2px rgba(10,21,48,0.04), 0 4px 14px rgba(10,21,48,0.06);
  --shadow: 0 4px 12px rgba(10,21,48,0.05), 0 30px 60px -30px rgba(10,21,48,0.18);
  --shadow-lg: 0 20px 40px -20px rgba(13,111,184,0.18);

  --serif: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  background-image:
    radial-gradient(1100px 600px at 85% -10%, rgba(27,166,231,0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(13,111,184,0.05), transparent 60%);
  /* NOTE: overflow on <body> breaks position:sticky for descendants. Use overflow-x:clip on <html> instead. */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s var(--ease), opacity .25s var(--ease); }
a:hover { color: var(--accent-2); }

.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
.italic { font-style: italic; }

.grain { display: none; }

/* ==========================================================================
   Top nav
   ========================================================================== */

.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px clamp(20px, 4vw, 48px);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid var(--line);
  height: var(--nav-h);
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  display: inline-grid; place-items: center;
  width: 32px; height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font-family: var(--serif);
  font-size: 16px;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 1px 2px rgba(13,111,184,0.18), inset 0 1px 0 rgba(255,255,255,0.18);
}
.brand-name { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); }

/* Signature image used as the wordmark in the top nav */
.brand-signature {
  display: block;
  height: 60px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.brand:hover .brand-signature { opacity: 0.82; transform: translateY(-1px); }

@media (max-width: 720px) {
  .brand-signature { height: 48px; max-width: 220px; }
}

.nav-links {
  display: flex; gap: clamp(18px, 2.6vw, 32px);
  font-size: 16px;
  color: var(--ink-soft);
}
.nav-links a { position: relative; padding: 6px 0; font-weight: 600; letter-spacing: -0.005em; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta {
  font-size: 13px; font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 2px rgba(13,111,184,0.18);
  transition: all .25s var(--ease);
}
.nav-cta:hover { background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-1px); box-shadow: var(--shadow-lg); }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .brand-name { display: none; }
}

/* ==========================================================================
   Two-column layout: sticky sidebar + scrolling content
   ========================================================================== */

.layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) var(--gutter) 0;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: clamp(28px, 4vw, 56px);
  /* NOTE: do not set align-items:start — sticky child needs the aside to stretch
     to the full row height so it has scroll range to "stick" within. */
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ==========================================================================
   Sticky profile sidebar
   ========================================================================== */

.profile-aside {
  position: relative;
  /* Do NOT set align-self:start — we want the aside to stretch to the full grid
     row height so the sticky card has scroll range to stick within. */
}

.profile-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent));
}
.profile-card::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(500px 240px at 50% 0%, var(--accent-glow), transparent 60%);
  pointer-events: none;
}

/* Photo frame — square card, holds the photo, falls back to BG monogram */
.profile-photo-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0 auto 22px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid var(--line);
  box-shadow: 0 8px 22px rgba(13,111,184,0.18), inset 0 1px 0 rgba(255,255,255,0.2);
  z-index: 2;
}
.profile-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 2;
}
.profile-monogram {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 80px;
  font-style: italic;
  color: #ffffff;
  letter-spacing: 0.02em;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}
/* When photo loads, monogram is hidden behind it; when photo errors,
   onerror handler adds .no-photo and we hide the failed <img> via display:none. */
.profile-photo-frame.no-photo .profile-photo { display: none; }

.profile-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
  position: relative;
  z-index: 2;
}
.profile-role {
  font-size: 14px;
  color: var(--accent-2);
  font-weight: 500;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}
.profile-loc {
  font-size: 12px;
  color: var(--ink-mute);
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

/* Continuous-scroll certification badge carousel */
.profile-badges {
  position: relative;
  z-index: 2;
  margin: 18px -24px 22px;        /* bleed to card edges past 24px padding */
  padding: 8px 0;
  overflow: hidden;
  /* Soft fade on left/right edges so badges enter/exit gracefully */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.profile-badges-track {
  display: flex;
  gap: 18px;
  width: max-content;
  align-items: center;
  animation: badge-scroll 32s linear infinite;
}
.profile-badges:hover .profile-badges-track { animation-play-state: paused; }

@keyframes badge-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* exactly half because we render the set twice */
}

.badge {
  height: 64px;
  width: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(10,21,48,0.08));
  transition: transform .25s var(--ease);
}
.badge:hover { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .profile-badges-track { animation: none; }
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: all .25s var(--ease);
}
.profile-btn svg { width: 14px; height: 14px; }
.profile-btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.profile-btn-ghost:hover {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--ink);
  transform: translateY(-1px);
}
.profile-btn-primary {
  background: var(--accent);
  color: #ffffff !important;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 12px rgba(27,166,231,0.28);
}
.profile-btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(13,111,184,0.32);
  color: #ffffff !important;
}

@media (max-width: 960px) {
  .profile-card {
    position: static;
    max-width: 380px;
    margin: 0 auto;
  }
}

/* ==========================================================================
   Right column content
   ========================================================================== */

.content {
  min-width: 0; /* prevent overflow inside grid */
}

/* ==========================================================================
   Hero (right column)
   ========================================================================== */

.hero {
  padding: clamp(20px, 3vw, 48px) 0 clamp(16px, 2vw, 28px);
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  margin-bottom: 24px;
  font-weight: 600;
  text-transform: uppercase;
}
.eyebrow .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2bb673;
  box-shadow: 0 0 0 4px rgba(43,182,115,0.18);
}

.display {
  font-family: var(--sans);
  font-size: clamp(38px, 5.4vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 24px;
}
.display .serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
}
.display-accent {
  color: var(--accent);
  font-weight: 600;
}
.display-soft {
  color: var(--ink-soft);
  font-weight: 500;
}

.lede {
  max-width: 60ch;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--ink-soft);
  line-height: 1.7;
  margin-bottom: 36px;
}

/* Hero stats grid */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
.stat-num {
  font-size: clamp(26px, 3.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   Section shell (no longer max-width — constrained by parent grid)
   ========================================================================== */

.section {
  padding: clamp(32px, 5vw, 60px) 0;
  border-top: 1px solid var(--line);
}
/* The first section after the hero stats already has the stats' bottom border
   immediately above it — drop the redundant top border to avoid a double rule. */
.hero + .section { border-top: none; }

.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-num { display: none; }
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
  color: var(--accent);
}
/* unify the serif/italic first word with the rest of the title */
.section-title .serif {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  color: inherit;
  letter-spacing: inherit;
}
.section-sub {
  margin-top: 14px;
  max-width: 56ch;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ==========================================================================
   Buttons (general)
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600;
  padding: 12px 20px;
  border-radius: 999px;
  transition: all .25s var(--ease);
}
.btn svg { width: 16px; height: 16px; transition: transform .3s var(--ease); }
.btn:hover { transform: translateY(-1px); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  box-shadow: 0 4px 14px rgba(27,166,231,0.28);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); color: #ffffff; box-shadow: 0 6px 20px rgba(13,111,184,0.32); }

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--accent); color: var(--accent-2); }

/* ==========================================================================
   About
   ========================================================================== */

.about-copy { max-width: 64ch; margin-bottom: 36px; }
.about-copy p { color: var(--ink-soft); margin-bottom: 18px; font-size: 16px; }

.subsection-title {
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.big-quote {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px) !important;
  line-height: 1.4;
  color: var(--ink) !important;
  margin-bottom: 28px !important;
  letter-spacing: -0.01em;
}
.big-quote em { color: var(--accent); font-style: italic; }

.stack-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 600px) { .stack-grid { grid-template-columns: 1fr; } }

.stack-card {
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.stack-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.stack-label {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 10px;
  font-weight: 600;
}
.stack-card p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.55;
}

/* ==========================================================================
   Experience timeline
   ========================================================================== */

.timeline { display: flex; flex-direction: column; gap: 4px; }

.role {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: clamp(16px, 3vw, 36px);
  padding: 28px 0;
  border-top: 1px solid var(--line);
  position: relative;
  transition: background .3s var(--ease);
}
.role:hover { background: linear-gradient(90deg, transparent, var(--bg-soft), transparent); }
.role:first-child { border-top: none; padding-top: 0; }

@media (max-width: 720px) {
  .role { grid-template-columns: 1fr; gap: 10px; }
}

.role-meta { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.role-dates {
  font-family: var(--serif);
  font-size: 17px;
  color: var(--accent-2);
  letter-spacing: 0;
  font-style: italic;
}
.role-loc {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 500;
}

.role-title {
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 4px;
}
.role-company {
  font-size: 14px;
  color: var(--accent-2);
  margin-bottom: 16px;
  font-weight: 600;
}

.role-bullets { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.role-bullets li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.role-bullets li::before {
  content: '';
  position: absolute; left: 0; top: 11px;
  width: 12px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.role-bullets li strong { color: var(--ink); font-weight: 600; }

/* ==========================================================================
   Education
   ========================================================================== */

.edu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) { .edu-grid { grid-template-columns: 1fr; } }

.edu-card {
  padding: 24px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.edu-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.edu-dates {
  font-family: var(--serif);
  font-style: italic;
  color: var(--accent-2);
  font-size: 14px;
  margin-bottom: 12px;
}
.edu-degree {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 6px;
}
.edu-school { color: var(--ink-soft); font-size: 14px; margin-bottom: 4px; font-weight: 500; }
.edu-detail { color: var(--ink-mute); font-size: 13px; }

/* ==========================================================================
   Achievements
   ========================================================================== */

.ach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
@media (max-width: 880px) { .ach-grid { grid-template-columns: 1fr; } }

.ach-card {
  padding: 28px;
  background: linear-gradient(180deg, var(--bg), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.ach-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
}
.ach-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }

.ach-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 48px;
  line-height: 1;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

/* Icon variant of .ach-num — renders an SVG glyph in place of the number/symbol */
.ach-num.ach-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  color: var(--accent-2);
  font-size: 0;          /* suppress any italic-text inheritance */
  letter-spacing: 0;
}
.ach-num.ach-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}
.ach-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.ach-card p {
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.6;
}

.cert-block {
  padding: clamp(24px, 3.5vw, 36px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.cert-head {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  color: var(--accent-2);
  margin-bottom: 22px;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.cert-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 700px) { .cert-grid { grid-template-columns: 1fr; } }
.cert-cat {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 700;
}
.cert-grid p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; }

/* Continuous-scroll badge wall at the bottom of the Certifications card */
.cert-badges {
  position: relative;
  margin: clamp(24px, 3vw, 36px) calc(-1 * clamp(24px, 3.5vw, 36px)) calc(-1 * clamp(24px, 3.5vw, 36px));
  padding: 22px 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: var(--surface);
  border-radius: 0 0 var(--radius) var(--radius);
  /* Soft fade edges so badges enter/exit gracefully */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.cert-badges-track {
  display: flex;
  gap: 28px;
  width: max-content;
  align-items: center;
  animation: cert-badge-scroll 50s linear infinite;
}
.cert-badges:hover .cert-badges-track { animation-play-state: paused; }

@keyframes cert-badge-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.cert-badge {
  height: 88px;
  width: auto;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(10,21,48,0.10));
  transition: transform .25s var(--ease);
}
.cert-badge:hover { transform: scale(1.08); }

@media (max-width: 720px) {
  .cert-badge { height: 70px; }
  .cert-badges-track { gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .cert-badges-track { animation: none; }
}

/* ==========================================================================
   Publications
   ========================================================================== */

.post-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 700px) { .post-grid { grid-template-columns: 1fr; } }

.post {
  display: block;
  padding: 26px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
  position: relative;
  overflow: hidden;
}
.post:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.post-tag {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  padding: 4px 10px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-weight: 700;
}
.post-platform {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  font-weight: 500;
}

/* "Coming soon" state — non-clickable, slightly muted */
.post.post-coming {
  cursor: default;
  background: var(--surface);
  border-style: dashed;
}
.post.post-coming:hover {
  transform: none;
  border-color: var(--line-strong);
  box-shadow: none;
}
.post.post-coming .post-title { color: var(--ink-soft); }
.post.post-coming .post-excerpt { color: var(--ink-mute); }
.post-link-pending {
  color: var(--ink-mute) !important;
  font-style: italic;
  font-weight: 500 !important;
}
.post.post-coming:hover .post-link-pending { transform: none !important; }
.post-title {
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.3;
  margin-bottom: 10px;
}
.post-excerpt {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 18px;
}
.post-link {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform .3s var(--ease);
}
.post:hover .post-link { transform: translateX(4px); color: var(--accent-2); }

/* ==========================================================================
   Contact
   ========================================================================== */

.section-contact { padding-bottom: clamp(56px, 8vw, 100px); }

.contact-card {
  padding: clamp(28px, 4vw, 48px);
  background: linear-gradient(180deg, var(--bg), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contact-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent));
}
.contact-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(800px 400px at 50% 100%, var(--accent-glow), transparent 60%);
  pointer-events: none;
}

.contact-lede {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--ink);
  max-width: 50ch;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
}

.reach-out-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 22px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  color: #ffffff !important;
  position: relative;
  z-index: 1;
  box-shadow: 0 6px 18px rgba(13,111,184,0.22);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
}
.reach-out-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(13,111,184,0.32);
  color: #ffffff !important;
}
.reach-out-label {
  font-size: inherit;
  font-weight: inherit;
}
.reach-out-cta svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform .3s var(--ease);
}
.reach-out-cta:hover svg { transform: translateX(4px); }

/* Sign-off block: signature image as a personal letter-style closer */
.contact-signoff {
  margin-top: 20px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.contact-signature {
  height: clamp(160px, 22vw, 240px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

@media (max-width: 540px) {
  .contact-signature { height: 140px; }
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  position: relative;
  z-index: 1;
}
@media (max-width: 700px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.contact-grid > .contact-row:nth-child(1),
.contact-grid > .contact-row:nth-child(2) { border-top: none; }
@media (max-width: 700px) { .contact-grid > .contact-row:nth-child(2) { border-top: 1px solid var(--line); } }

.contact-key {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 600;
}
.contact-val {
  font-size: 15px;
  color: var(--ink);
  font-weight: 500;
  word-break: break-all;
}
a.contact-row:hover .contact-val { color: var(--accent-2); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  padding: 28px clamp(20px, 4vw, 48px);
  margin-top: clamp(40px, 6vw, 80px);
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-mute);
  background: var(--surface);
}
.foot-left { display: inline-flex; align-items: center; gap: 14px; }
.foot-signature {
  height: 40px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  opacity: 0.85;
}
.foot-right { display: inline-flex; gap: 22px; font-weight: 500; }
.foot-right a:hover { color: var(--accent-2); }

/* ==========================================================================
   Reveal on scroll
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* === Work-experience role: slide in from the right ===
   The section title above still fades up via its own .reveal on .section.
   Each .role then slides in horizontally; once it lands, the date fades in
   on a small delay for a layered "land then label" reveal. */
.role.reveal {
  transform: translateX(64px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.role.reveal.in {
  transform: none;
}

/* Date inside the role: hidden until the role lands, then fades in delayed */
.role .role-meta {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity .55s var(--ease) .55s, transform .55s var(--ease) .55s;
}
.role.in .role-meta {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .role.reveal { transform: none; }
  .role .role-meta { opacity: 1; transform: none; transition: none; }
}

/* === Expertise & Capabilities cards: staggered fade-up ===
   Each card rises ~20px and fades in. Delay scales by position so the
   six cards arrive ~90ms apart, like a deck being laid down. */
.stack-grid > .stack-card.reveal {
  transform: translateY(20px);
  transition: opacity .65s var(--ease), transform .65s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.stack-grid > .stack-card.reveal.in { transform: none; }

.stack-grid > .stack-card.reveal:nth-child(1) { transition-delay: 0ms; }
.stack-grid > .stack-card.reveal:nth-child(2) { transition-delay: 90ms; }
.stack-grid > .stack-card.reveal:nth-child(3) { transition-delay: 180ms; }
.stack-grid > .stack-card.reveal:nth-child(4) { transition-delay: 270ms; }
.stack-grid > .stack-card.reveal:nth-child(5) { transition-delay: 360ms; }
.stack-grid > .stack-card.reveal:nth-child(6) { transition-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  .stack-grid > .stack-card.reveal {
    transform: none;
    transition-delay: 0ms !important;
  }
}

/* ==========================================================================
   Article pages (single-column shell)
   ========================================================================== */

.article-shell {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(56px, 9vw, 110px) var(--gutter);
}
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  margin-bottom: 36px;
  font-weight: 500;
}
.article-back:hover { color: var(--accent-2); }
.article-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 700;
}
.article-title {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 14px;
  font-weight: 400;
}
.article-byline {
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.04em;
  margin-bottom: 44px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.article-body { color: var(--ink-soft); font-size: 17px; line-height: 1.75; }
.article-body p { margin-bottom: 22px; }
.article-body h2 {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--ink);
  margin: 44px 0 14px;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.article-body h3 {
  font-size: 19px;
  color: var(--ink);
  margin: 30px 0 12px;
  font-weight: 600;
}
.article-body ul, .article-body ol { margin: 0 0 22px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body em { color: var(--accent-2); }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 22px;
  margin: 24px 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 21px;
  color: var(--ink);
  line-height: 1.4;
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body code {
  font-family: ui-monospace, 'SF Mono', Consolas, monospace;
  font-size: 0.9em;
  color: var(--accent-2);
  background: var(--accent-soft);
  padding: 2px 6px;
  border-radius: 4px;
}
.article-body a:not(.article-back) {
  color: var(--accent-2);
  border-bottom: 1px solid var(--accent-glow);
  transition: border-color .25s var(--ease);
}
.article-body a:not(.article-back):hover { border-bottom-color: var(--accent-2); }
