/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Selection highlight ripens alongside the cherry — colour and text
   contrast shift from pale peach to deep cherry red as ripeness grows. */
body {
  --selection-bg: #F0A589;
  --selection-fg: #1a1a1a;
}

body[data-ripeness="1"] { --selection-bg: #EC9674; --selection-fg: #1a1a1a; }
body[data-ripeness="2"] { --selection-bg: #E8835F; --selection-fg: #1a1a1a; }
body[data-ripeness="3"] { --selection-bg: #E06A4A; --selection-fg: #fff; }
body[data-ripeness="4"] { --selection-bg: #D4513C; --selection-fg: #fff; }
body[data-ripeness="5"] { --selection-bg: #C43A33; --selection-fg: #fff; }
body[data-ripeness="6"] { --selection-bg: #AD222A; --selection-fg: #fff; }
body[data-ripeness="7"] { --selection-bg: #8E0E20; --selection-fg: #fff; }

::selection {
  background-color: var(--selection-bg, #F0A589);
  color: var(--selection-fg, #1a1a1a);
}
::-moz-selection {
  background-color: var(--selection-bg, #F0A589);
  color: var(--selection-fg, #1a1a1a);
}

body {
  background-color: #fafafa;
  color: #44403c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Layout ────────────────────────────────────────────────── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 120px 32px 48px;
}

/* ─── Profile / Hero ────────────────────────────────────────── */
.profile {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

/* Cherry — wraps stem + avatar */
@property --cherry-top {
  syntax: '<color>';
  inherits: true;
  initial-value: #dd330c;
}
@property --cherry-bottom {
  syntax: '<color>';
  inherits: true;
  initial-value: #e19f21;
}
@property --cherry-highlight {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(255, 120, 60, 0.45);
}
@property --cherry-glow {
  syntax: '<color>';
  inherits: true;
  initial-value: rgba(255, 160, 60, 0.3);
}

/* Stroke-grow progress for hover-animated borders. Registering it as
   <percentage> via @property makes it transitionable. */
@property --stroke-progress {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 0%;
}


.cherry-wrap {
  width: 46px;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.cherry-stem {
  width: 46px;
  height: 42px;
  margin-bottom: -3px;
  pointer-events: none;
  overflow: visible;
}

.cherry-stem-line {
  stroke-dasharray: 50;
  stroke-dashoffset: 50; /* hidden initially */
  transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.cherry-stem-leaf {
  opacity: 0;
  transform: scale(0);
  transform-origin: 28px 9px;
  transition: opacity 0.5s ease 0.4s, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s;
}

/* Avatar (the cherry orb itself) */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background:
    radial-gradient(circle at 40% 35%, var(--cherry-highlight) 0%, transparent 55%),
    linear-gradient(to bottom, var(--cherry-top) 0%, var(--cherry-bottom) 100%);
  box-shadow: inset 0 -3px 8px rgba(0,0,0,0.22), inset 0 2px 6px var(--cherry-glow);
  transition:
    --cherry-top 1.6s ease,
    --cherry-bottom 1.6s ease,
    --cherry-highlight 1.6s ease,
    --cherry-glow 1.6s ease,
    transform 0.25s cubic-bezier(0.2, 0.8, 0.3, 1),
    box-shadow 0.25s ease;
}

/* Hover affordance — glow halo only, no scale. Scale is reserved for
   the click-pulse animation so the two don't fight over `transform`. */
.avatar:hover {
  box-shadow:
    inset 0 -3px 8px rgba(0,0,0,0.22),
    inset 0 2px 6px var(--cherry-glow),
    0 0 0 4px rgba(213, 28, 20, 0.10),
    0 0 18px rgba(213, 28, 20, 0.20);
}

.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  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='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  opacity: 0.3;
  transition: opacity 1.2s ease;
  z-index: 4;
}

body[data-ripeness="4"] .avatar::after { opacity: 0.24; }
body[data-ripeness="5"] .avatar::after { opacity: 0.20; }
body[data-ripeness="6"] .avatar::after { opacity: 0.16; }
body[data-ripeness="7"] .avatar::after { opacity: 0.14; }

/* ─── Ripeness stages (data attribute on <body>) ───────────── */
/* Stage 0 (default) is set in @property initial-values above:
   orange-yellow unripe — top #dd330c, bottom #e19f21              */

body[data-ripeness="1"] {
  --cherry-top: #dc2810;
  --cherry-bottom: #d4801c;
  --cherry-highlight: rgba(255, 115, 75, 0.43);
  --cherry-glow: rgba(255, 150, 70, 0.28);
}
body[data-ripeness="1"] .cherry-stem-line { stroke-dashoffset: 44; }

body[data-ripeness="2"] {
  --cherry-top: #d51c14;
  --cherry-bottom: #c46818;
  --cherry-highlight: rgba(255, 110, 90, 0.42);
  --cherry-glow: rgba(255, 140, 80, 0.26);
}
body[data-ripeness="2"] .cherry-stem-line { stroke-dashoffset: 38; }

body[data-ripeness="3"] {
  --cherry-top: #cc1418;
  --cherry-bottom: #b04818;
  --cherry-highlight: rgba(255, 105, 95, 0.42);
  --cherry-glow: rgba(255, 125, 80, 0.24);
}
body[data-ripeness="3"] .cherry-stem-line { stroke-dashoffset: 31; }

body[data-ripeness="4"] {
  --cherry-top: #c80c1c;
  --cherry-bottom: #b8281c;
  --cherry-highlight: rgba(255, 100, 100, 0.42);
  --cherry-glow: rgba(255, 100, 80, 0.22);
}
body[data-ripeness="4"] .cherry-stem-line { stroke-dashoffset: 25; }

body[data-ripeness="5"] {
  --cherry-top: #c80820;
  --cherry-bottom: #c81820;
  --cherry-highlight: rgba(255, 105, 115, 0.42);
  --cherry-glow: rgba(255, 95, 90, 0.20);
}
body[data-ripeness="5"] .cherry-stem-line { stroke-dashoffset: 18; }

body[data-ripeness="6"] {
  --cherry-top: #a8061e;
  --cherry-bottom: #c01024;
  --cherry-highlight: rgba(255, 130, 140, 0.42);
  --cherry-glow: rgba(180, 30, 50, 0.22);
}
body[data-ripeness="6"] .cherry-stem-line { stroke-dashoffset: 9; }

body[data-ripeness="7"] {
  --cherry-top: #6e0414;
  --cherry-bottom: #b80820;
  --cherry-highlight: rgba(255, 150, 160, 0.55);
  --cherry-glow: rgba(120, 6, 22, 0.45);
}
body[data-ripeness="7"] .cherry-stem-line { stroke-dashoffset: 0; }
body[data-ripeness="7"] .cherry-stem-leaf {
  opacity: 1;
  transform: scale(1.18);
}

/* Hover preview — a soft red multiply tint fades in over the cherry
   while hovering "View Work", giving a tiny taste of more ripeness. */
.avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 60%, rgba(180, 8, 30, 0.55) 0%, rgba(140, 0, 24, 0.55) 100%);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.45s ease;
  z-index: 1;
  pointer-events: none;
}

body.is-hovering-ripen .avatar::before {
  opacity: 0.55;
}

/* Pulse when a click triggers ripening — single subtle bump, no dip,
   ends back at scale(1) so it doesn't fight the hover state. */
.avatar.is-ripening {
  animation: ripen-pulse 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

@keyframes ripen-pulse {
  0%   { transform: scale(1); }
  45%  { transform: scale(1.09); }
  100% { transform: scale(1); }
}

.avatar-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 200, 210, 0.85) 0%, rgba(255, 180, 190, 0.45) 8%, transparent 22%),
    radial-gradient(ellipse at 50% 95%, rgba(60, 0, 10, 0.55) 0%, transparent 55%),
    radial-gradient(circle at 70% 75%, rgba(40, 0, 8, 0.35) 0%, transparent 45%);
  opacity: 0;
  transition: opacity 1.4s ease;
  pointer-events: none;
  z-index: 2;
}

body[data-ripeness="6"] .avatar-inner { opacity: 0.4; }
body[data-ripeness="7"] .avatar-inner,
body.is-fully-ripe .avatar-inner { opacity: 1; }

/* Identity */
.identity {
  margin-bottom: 20px;
}

.name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #1c1917;
  line-height: 1.3;
}

.title {
  font-size: 14px;
  color: #78716c;
  margin-top: 2px;
}

/* Bio */
.bio {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
  color: #44403c;
  font-size: 14px;
  max-width: 480px;
}

/* Bio link */
.bio-link {
  color: #1c1917;
  text-decoration: underline;
  text-decoration-color: rgba(0,0,0,0.25);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s ease;
}

.bio-link:hover {
  text-decoration-color: #1c1917;
}

/* Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #1c1917;
  color: #fafafa;
  font-size: 12px;
  font-weight: 500;
  /* Explicit height so .btn-primary, .btn-secondary, and the
     <button> Copy Email all line up perfectly regardless of border
     width or default <button> styling. */
  height: 36px;
  box-sizing: border-box;
  border: 1px solid transparent;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background-color 0.15s ease, transform 0.1s ease;
  width: fit-content;
  margin-bottom: 28px;
}

.btn-primary:hover {
  background-color: #000;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Meta: location + socials */
.meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: #78716c;
}

.location svg {
  flex-shrink: 0;
  color: #78716c;
}

/* Social Icons */
.social-links {
  display: flex;
  gap: 8px;
}

.social-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #d6d3d1;
  background: #f7f7f7;
  color: #1c1917;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.social-icon:hover {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-color: #1c1917;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

/* ─── Section shared styles ─────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #78716c;
  margin-bottom: 24px;
}

/* ─── Work Grid ─────────────────────────────────────────────── */
.work-section {
  padding: 72px 0;
  border-bottom: 1px solid #e7e5e4;
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.work-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
}

.work-card--wide {
  grid-column: span 2;
}

.work-card--wide .work-card-image {
  height: 180px;
}

/* Alert Labs featured card */
.work-card--alertlabs {
  background: linear-gradient(135deg, #0d46c5 0%, #2969f9 100%);
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.work-card--alertlabs:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(13, 70, 197, 0.25), 0 3px 8px rgba(0,0,0,0.08);
}

.alertlabs-hero {
  position: relative;
  padding: 32px 36px 0;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.alertlabs-copy {
  color: #fff;
  max-width: 80%;
  z-index: 2;
}

.alertlabs-eyebrow {
  font-size: 12px;
  font-weight: 400;
  opacity: 0.85;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.alertlabs-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: #fff;
}

.alertlabs-visual {
  position: relative;
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.alertlabs-image {
  display: block;
  width: 70%;
  max-width: 460px;
  height: auto;
  margin-bottom: -1px;
}

@media (max-width: 520px) {
  .alertlabs-hero {
    padding: 24px 22px 0;
    min-height: 280px;
  }
  .alertlabs-title {
    font-size: 14px;
  }
  .alertlabs-copy {
    max-width: 100%;
  }
}

/* Mappedin featured card */
.work-card--mappedin {
  background: #f3f3f6;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.work-card--mappedin:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08), 0 3px 8px rgba(0,0,0,0.05);
}

.mappedin-hero {
  position: relative;
  padding: 32px 36px;
  min-height: 280px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  overflow: hidden;
}

.mappedin-copy {
  color: #111;
  flex: 1 1 auto;
  max-width: 60%;
  z-index: 2;
  padding-top: 4px;
}

.mappedin-eyebrow {
  font-size: 12px;
  font-weight: 400;
  color: #555;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.mappedin-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: #111;
}

.mappedin-visual {
  position: relative;
  flex: 0 0 auto;
  align-self: flex-end;
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.mappedin-image {
  display: block;
  width: 198px;
  max-width: 100%;
  height: auto;
  margin-right: -4px;
}

@media (max-width: 520px) {
  .mappedin-hero {
    padding: 24px 22px;
    min-height: 240px;
    flex-direction: column;
  }
  .mappedin-copy {
    max-width: 100%;
  }
  .mappedin-image {
    width: 154px;
    margin-right: -3px;
  }
}

/* Mappedin Directory featured card */
.work-card--directory {
  background: #23252f;
  border-radius: 14px;
  overflow: hidden;
  padding: 0;
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.work-card--directory:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.30), 0 3px 8px rgba(0,0,0,0.18);
}

.directory-hero {
  position: relative;
  padding: 32px 36px 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  overflow: hidden;
}

.directory-copy {
  align-self: stretch;
  z-index: 2;
}

.directory-eyebrow {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255,255,255,0.65);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

.directory-title {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: #fff;
  max-width: 70%;
}

.directory-visual {
  position: relative;
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
}

.directory-image {
  display: block;
  width: 60%;
  max-width: 360px;
  height: auto;
  margin-bottom: -90px;
}

@media (max-width: 520px) {
  .directory-hero {
    padding: 24px 22px 0;
    min-height: 340px;
  }
  .directory-title {
    max-width: 100%;
    font-size: 14px;
  }
  .directory-image {
    width: 75%;
    margin-bottom: -70px;
  }
}

.work-card-image {
  height: 140px;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 12px;
}

.work-card-tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(4px);
  padding: 3px 8px;
  border-radius: 4px;
  color: #555;
}

.work-card-body {
  padding: 16px 18px 20px;
}

.work-card-body h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #111;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.work-card-body p {
  font-size: 12.5px;
  color: #888;
  line-height: 1.55;
}

/* ─── About ─────────────────────────────────────────────────── */
.about-section {
  padding: 72px 0;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13.5px;
  color: #44403c;
  line-height: 1.7;
  max-width: 560px;
}

.about-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}

.about-actions .btn-primary,
.about-actions .btn-secondary {
  margin-bottom: 0;
}

/* Copy Email button — swaps label for a checkmark + "Copied" on success.
   The two states share the same hit area; we just toggle visibility. */
.copy-email {
  position: relative;
  cursor: pointer;
  /* Inherit just the font-family so the <button> doesn't fall back to
     the browser's default (Helvetica/Arial). Font size + weight stay
     governed by .btn-primary so it matches the Resume button exactly. */
  font-family: inherit;
  /* Reserve space so width doesn't jump between "Copy Email" and "Copied" */
  min-width: 96px;
}

.copy-email-label {
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-email-confirm {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  opacity: 0;
  transform: translateY(3px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-email.is-copied .copy-email-label {
  opacity: 0;
  transform: translateY(-3px);
}

.copy-email.is-copied .copy-email-confirm {
  opacity: 1;
  transform: translateY(0);
}

/* Secondary button — outlined version of .btn-primary */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
  color: #1c1917;
  font-size: 12px;
  font-weight: 500;
  /* Same fixed height as .btn-primary so the two render identically. */
  height: 36px;
  box-sizing: border-box;
  padding: 0 12px;
  border-radius: 6px;
  text-decoration: none;
  letter-spacing: 0.01em;
  border: 1px solid #d6d3d1;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
  width: fit-content;
}

.btn-secondary:hover {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  color: #1c1917;
  border-color: #1c1917;
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(28, 25, 23, 0.06);
}

/* Cursor-tracking border: a 1px ring whose darkest point follows the
   mouse, fading back to the default border color as you move away.
   Implemented as a masked pseudo-element with a radial-gradient bg.
   --mx / --my are set by JS on mousemove. */
.btn-secondary::before,
.modal-close::before,
.social-icon::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  -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 0.18s ease;
  pointer-events: none;
}

/* All three buttons share a slanted gradient stroke on hover that
   "draws" itself around the perimeter starting from the top. The
   conic-gradient progressively reveals the colored portion as
   --stroke-progress animates from 0% → 100% on hover.
   Opacity stays at 1 so only the gradient progress animates — no
   competing fade-in. */
.btn-secondary::before,
.modal-close::before,
.social-icon::before {
  --stroke-progress: 0%;
  opacity: 1;
  background: conic-gradient(
    from -90deg,
    #666666 0%,
    #2C2926 var(--stroke-progress),
    transparent var(--stroke-progress) 100%
  );
  transition: --stroke-progress 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover::before,
.modal-close:hover::before,
.social-icon:hover::before {
  --stroke-progress: 100%;
}

.btn-secondary:hover::before,
.modal-close:hover::before,
.social-icon:hover::before {
  opacity: 1;
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ─── Footer ────────────────────────────────────────────────── */
.footer {
  padding-top: 32px;
  border-top: 1px solid #e7e5e4;
}

.footer p {
  font-size: 12px;
  color: #78716c;
}

/* ─── Project Page (formerly a modal; now a full-viewport page view) ── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fafafa;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.28s ease, visibility 0s linear 0.28s;
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.28s ease, visibility 0s;
}

/* Backdrop no longer used — kept in the DOM for the click-to-close hit
   target but visually inert. */
.modal-backdrop {
  display: none;
}

.modal-panel {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  transform: translateY(12px);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.25, 1);
}

.modal.is-open .modal-panel {
  transform: translateY(0);
}

.modal-scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: 96px 24px 96px;
  flex: 1 1 auto;
  min-height: 0;
  /* Center the content with a comfortable reading width */
}

.modal-project {
  max-width: 620px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .modal-scroll {
    padding: 112px 48px 120px;
  }
}

/* Close button — fixed to the top-right corner of the viewport */
.modal-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 110;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  color: #1c1917;
  background-color: #f7f7f7;
  border: 1px solid #d6d3d1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.modal-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.modal-close:hover {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-color: #1c1917;
  transform: translateY(-1px);
  /* Stronger hover shadow — matches the work card hover lift. */
  box-shadow: 0 6px 20px rgba(0,0,0,0.09), 0 2px 6px rgba(0,0,0,0.05);
}

.modal-close:active {
  transform: translateY(0);
}

.modal-close:focus-visible {
  outline: 2px solid #a8a29e;
  outline-offset: 2px;
}

/* Modal content */
.modal-header {
  margin-bottom: 28px;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #1c1917;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.modal-meta {
  font-size: 14px;
  color: #78716c;
  letter-spacing: 0.01em;
}

.modal-lead {
  font-size: 15px;
  line-height: 1.7;
  color: #44403c;
  margin-bottom: 16px;
  max-width: 720px;
}

.modal-lead + .modal-lead {
  margin-top: 0;
}

/* Space only the last lead paragraph away from whatever comes next */
.modal-lead:last-of-type {
  margin-bottom: 40px;
}

.modal-figure {
  margin-top: 32px;
  margin-bottom: 32px;
}

.modal-figure-frame {
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 60px 24px 0;
  min-height: 320px;
}

.modal-figure-frame img {
  width: 60%;
  max-width: 380px;
  height: auto;
  display: block;
}

/* Centered variant — smaller, vertically centered phone image with
   even padding top + bottom. */
.modal-figure-frame--center {
  align-items: center;
  padding: 40px 24px;
}

.modal-figure-frame--center img {
  width: 32%;
  max-width: 220px;
}

.modal-figure-frame--duo {
  gap: 24px;
  padding: 40px 20px;
  align-items: center;
  min-height: 480px;
}

.modal-figure-frame--duo img {
  width: auto;
  max-width: 48%;
  height: 400px;
  object-fit: contain;
  filter: none;
}

@media (max-width: 520px) {
  .modal-figure-frame--duo {
    gap: 12px;
    padding: 28px 14px;
    min-height: 0;
  }
  .modal-figure-frame--duo img {
    height: auto;
    width: 48%;
    max-width: 48%;
  }
}

/* Image fills the entire frame — no padding, no width cap. Used for
   hero illustrations that already have their own framing. */
.modal-figure-frame--bleed {
  padding: 0;
  align-items: stretch;
  min-height: 0;
}

.modal-figure-frame--bleed img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

/* Two phones stacked vertically — same neutral frame as --duo, but
   the images sit one above the other rather than side-by-side. */
.modal-figure-frame--stack {
  flex-direction: column;
  gap: 24px;
  padding: 40px 20px;
  align-items: center;
}

.modal-figure-frame--stack img {
  width: auto;
  max-width: 70%;
  height: auto;
  filter: none;
}

@media (max-width: 520px) {
  .modal-figure-frame--stack {
    gap: 18px;
    padding: 28px 14px;
  }
  .modal-figure-frame--stack img {
    max-width: 85%;
  }
}

.modal-figure-frame--screenshot {
  background: #f3f3f6;
  padding: 24px;
  align-items: center;
  min-height: 0;
}

/* Smaller variant — image stays centered but constrained to a narrower
   width, useful for tall portrait screenshots like the previous
   directory shot which would otherwise dominate the page. The
   `.modal-figure-frame--small img` selector matches the same
   specificity as `.modal-figure-frame--screenshot img` above, but
   forces width (not just max-width) so it actually overrides the
   `width: 100%` declared on the screenshot variant. */
.modal-figure-frame--small img,
.modal-figure-frame--screenshot.modal-figure-frame--small img,
.modal-figure-frame--small .modal-annotated,
.modal-figure-frame--screenshot.modal-figure-frame--small .modal-annotated {
  width: 42%;
  max-width: 320px;
}

.modal-figure-frame--small .modal-annotated img,
.modal-figure-frame--screenshot.modal-figure-frame--small .modal-annotated img {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 520px) {
  .modal-figure-frame--small img,
  .modal-figure-frame--screenshot.modal-figure-frame--small img,
  .modal-figure-frame--small .modal-annotated,
  .modal-figure-frame--screenshot.modal-figure-frame--small .modal-annotated {
    width: 65%;
    max-width: 100%;
  }
}

/* Two portrait screenshots sitting side-by-side in one shared
   screenshot frame. Used on the directory project page to show two
   examples of the previous fixed directory layout. */
.modal-figure-frame--pair,
.modal-figure-frame--screenshot.modal-figure-frame--pair,
.modal-figure-frame--trio,
.modal-figure-frame--screenshot.modal-figure-frame--trio {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 36px 28px;
}

.modal-figure-frame--pair img,
.modal-figure-frame--screenshot.modal-figure-frame--pair img {
  width: auto;
  max-width: 44%;
  height: auto;
  border-radius: 8px;
}

.modal-figure-frame--pair .modal-annotated,
.modal-figure-frame--screenshot.modal-figure-frame--pair .modal-annotated {
  max-width: 44%;
  flex-shrink: 0;
}

.modal-figure-frame--pair .modal-annotated img,
.modal-figure-frame--screenshot.modal-figure-frame--pair .modal-annotated img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
}

.modal-figure-frame--trio img,
.modal-figure-frame--screenshot.modal-figure-frame--trio img {
  width: auto;
  max-width: 29%;
  height: auto;
  border-radius: 8px;
}

@media (max-width: 520px) {
  .modal-figure-frame--pair,
  .modal-figure-frame--screenshot.modal-figure-frame--pair,
  .modal-figure-frame--trio,
  .modal-figure-frame--screenshot.modal-figure-frame--trio {
    gap: 12px;
    padding: 20px 14px;
  }
  .modal-figure-frame--pair img,
  .modal-figure-frame--screenshot.modal-figure-frame--pair img {
    max-width: 47%;
  }
  .modal-figure-frame--trio img,
  .modal-figure-frame--screenshot.modal-figure-frame--trio img {
    max-width: 30%;
  }
}

.modal-figure-frame--screenshot img {
  width: 100%;
  max-width: 100%;
  border-radius: 8px;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.12));
}

.modal-figure-frame--placeholder {
  background: repeating-linear-gradient(
    135deg,
    #f3f3f6 0 12px,
    #ebebef 12px 24px
  );
  border: 1px dashed rgba(0,0,0,0.12);
  padding: 0;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.modal-figure-placeholder-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #78716c;
  font-weight: 500;
}

.modal-placeholder {
  font-size: 13px;
  color: #78716c;
  font-style: italic;
  text-align: center;
  padding: 24px;
  border: 1px dashed rgba(0,0,0,0.12);
  border-radius: 10px;
}

/* Subtle "case study available upon request" line for in-progress
   project pages. Centered, muted, no border — quietly informational. */
.modal-disclaimer {
  margin-top: 32px;
  font-size: 13px;
  color: #78716c;
  font-style: italic;
  text-align: center;
}

/* Cross-image arrow overlay */
.modal-figure-frame--annotated {
  position: relative;
}

.pair-arrow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

/* Annotation overlays */
.modal-annotated {
  position: relative;
  display: block;
  line-height: 0;
}

.modal-annotated img {
  width: 100%;
  height: auto;
  display: block;
}

.callout-badge {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1c1917;
  color: #fafaf9;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  line-height: 22px;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.modal-section {
  margin-top: 48px;
}

.modal-section-title {
  font-size: 20px;
  font-weight: 600;
  color: #1c1917;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.modal-body {
  font-size: 15px;
  line-height: 1.7;
  color: #44403c;
  max-width: 720px;
}

.modal-body + .modal-body {
  margin-top: 16px;
}

/* One-notch heavier — used for short emphasis lines like
   "A few decisions worth calling out:" before a bulleted list. */
.modal-body--strong {
  font-weight: 500;
  color: #1c1917;
}

/* Inline emphasis for headline metrics — heavier weight + dark color
   so the number reads as the key takeaway, not just italics-bold. */
.modal-stat {
  font-weight: 600;
  color: #1c1917;
}

/* Caption text below an image figure */
.modal-figcaption {
  margin-top: 14px;
  padding: 0 4px;
  font-size: 13px;
  line-height: 1.5;
  color: #78716c;
  max-width: 720px;
}

/* Title above a row of card variants ("Map card", "Deals card") */
.modal-variants-title {
  margin-top: 28px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1c1917;
  letter-spacing: -0.005em;
}

/* 2×2 grid showing layout variations the flexible system can produce.
   Each cell is a screenshot framed in its own gray panel. */
.modal-grid-examples {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

.modal-grid-example {
  margin: 0;
}

/* Portrait kiosk-shaped frames so the grid layouts read as actual
   directory screens, not just floating screenshots. */
.modal-grid-example .modal-figure-frame {
  padding: 48px 36px;
  aspect-ratio: 3 / 4;
  min-height: 0;
  border-radius: 28px;
}

.modal-grid-example .modal-figure-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: none;
}

.modal-grid-examples--three {
  grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 520px) {
  .modal-grid-examples {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .modal-grid-examples--three {
    grid-template-columns: 1fr;
  }
}

/* One panel containing all three size variants — sized at their actual
   relative proportions so the 1×2 visibly towers and the 2×1 spans
   wider, making the size system self-explanatory. Cards align at the
   bottom of the panel; labels sit beneath each card. */
.modal-variants-frame {
  background: #f3f3f6;
  border-radius: 18px;
  padding: 40px 32px 28px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  margin: 0 0 8px;
}

.modal-variant {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.modal-variant-card {
  border-radius: 10px;
  overflow: hidden;
  display: block;
}

.modal-variant-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Card sizes — 1u base unit drives all three. Adjust --u to scale
   the whole row up or down together. */
.modal-variants-frame { --u: 110px; }
.modal-variant--1x1 .modal-variant-card { width: var(--u);          height: var(--u); }
.modal-variant--1x2 .modal-variant-card { width: var(--u);          height: calc(var(--u) * 2); }
.modal-variant--2x1 .modal-variant-card { width: calc(var(--u) * 2); height: var(--u); }

.modal-variant-label {
  font-size: 13px;
  color: #78716c;
  padding: 0;
}

.modal-variant-label strong {
  color: #1c1917;
  font-weight: 600;
  margin-right: 4px;
}

@media (max-width: 520px) {
  .modal-variants-frame {
    --u: 78px;
    gap: 14px;
    padding: 28px 18px 20px;
  }
  .modal-variant {
    gap: 8px;
  }
  .modal-variant-label {
    font-size: 12px;
  }
}

/* Shipped-list — bordered rows with title + body */
.modal-shipped {
  margin-top: 8px;
  border-top: 1px solid #e6e6e6;
}

.modal-shipped-item {
  padding: 22px 0;
  border-bottom: 1px solid #e6e6e6;
}

.modal-shipped-title {
  font-size: 16px;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.modal-shipped-item .modal-body {
  font-size: 14px;
}

/* Closing remark with extra breathing room */
.modal-body--closing {
  margin-top: 32px;
}

/* Bulleted list inside project pages — matches modal-body type, with
   custom dash markers and tighter line-height per item. */
.modal-list {
  list-style: none;
  padding-left: 0;
  margin: 12px 0 0;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-list li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #44403c;
}

.modal-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #78716c;
}

ol.modal-list {
  counter-reset: modal-ol;
}

ol.modal-list li {
  counter-increment: modal-ol;
  padding-left: 24px;
}

ol.modal-list li::before {
  content: counter(modal-ol) ".";
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  top: 0;
  left: 0;
  font-size: 15px;
  font-weight: 500;
  color: #1c1917;
}

.modal-body + .modal-list {
  margin-top: 12px;
}

.modal-list + .modal-body {
  margin-top: 24px;
}

.modal-subsection {
  margin-top: 28px;
}

.modal-subsection-title {
  font-size: 15px;
  font-weight: 600;
  color: #1c1917;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

/* Make project cards feel clickable */
[data-project] {
  cursor: pointer;
}

[data-project]:focus-visible {
  outline: 2px solid #2969f9;
  outline-offset: 4px;
}

@media (max-width: 640px) {
  .modal {
    padding: 0;
  }
  .modal-panel {
    margin-top: 0;
    max-height: 100vh;
  }
  .modal-scroll {
    /* Pull content up on mobile — less wasted top space. */
    padding: 56px 32px 40px;
  }
  .modal-close {
    top: 12px;
    right: 12px;
  }
  .modal-title {
    font-size: 22px;
  }
  .modal-lead {
    font-size: 14px;
  }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 520px) {
  .container {
    padding: 52px 32px 40px;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

}

/* ─── Cherry Bomb Easter Egg ────────────────────────────────── */
/* Triggered by rage-clicking the fully-ripe cherry. The stem becomes
   a fuse that burns down, then the cherry detonates with a shockwave. */

.cherry-fuse-spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, #ffe26a 25%, #ff8a18 60%, transparent 100%);
  box-shadow:
    0 0 8px 2px rgba(255, 200, 80, 0.95),
    0 0 18px 6px rgba(255, 130, 30, 0.6),
    0 0 30px 10px rgba(255, 80, 20, 0.35);
  pointer-events: none;
  opacity: 0;
  z-index: 10;
  top: 0;
  left: 0;
  /* Centered on the (top,left) coords JS sets each frame */
  transform: translate(-50%, -50%);
}

/* Armed: subtle nervous tremor + dimmed badge, fuse erases, spark travels.
   The cherry also darkens to a near-black bomb red, with the inner glow
   pulled back, so it visually reads as "lit fuse → about to blow". */
body.is-armed {
  --cherry-top: #3a0008;
  --cherry-bottom: #5c0612;
  --cherry-highlight: rgba(180, 30, 40, 0.32);
  --cherry-glow: rgba(80, 0, 12, 0.5);
}

body.is-armed .avatar {
  animation: bomb-tremor 0.16s linear infinite;
}

body.is-armed .avatar-inner {
  opacity: 0.85;
}

/* Stem erasure + spark position are driven by JS rAF loop sampling the
   path with getPointAtLength so they stay perfectly in sync. */

body.is-armed .cherry-stem-line--highlight {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* When the bomb is armed, the SVG leaf hides instantly — a free-flying
   leaf clone is spawned in JS and animated to fall away from the cherry.
   The !important + transition: none beats the 0.9s fade-in transition
   declared on .cherry-stem-leaf, so the swap is invisible. */
body.is-armed .cherry-stem-leaf {
  opacity: 0 !important;
  transition: none !important;
}

@keyframes bomb-tremor {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(0.6px, -0.5px); }
  50%      { transform: translate(-0.6px, 0.5px); }
  75%      { transform: translate(0.5px, 0.6px); }
}

@keyframes leaf-shrivel {
  0%   { opacity: 1; transform: scale(1); }
  60%  { opacity: 0.7; transform: scale(0.9) rotate(8deg); }
  100% { opacity: 0; transform: scale(0.4) rotate(20deg); }
}

/* Detonation */
body.is-exploding .avatar {
  animation: bomb-burst 0.55s cubic-bezier(0.2, 0.7, 0.3, 1.4) forwards;
}

body.is-exploding .cherry-stem,
body.is-exploding .cherry-fuse-spark {
  opacity: 0;
  transition: opacity 0.18s ease;
}

/* The spark snuffs out instantly when the bomb detonates. */
body.is-fuse-out .cherry-fuse-spark {
  opacity: 0 !important;
  transition: opacity 0.12s ease !important;
}

/* The remaining bit of fuse + leaf dissolve away gradually across the
   explosion, so the area above the cherry doesn't go suddenly empty. */
body.is-fuse-out .cherry-stem,
body.is-fuse-out .cherry-stem-line,
body.is-fuse-out .cherry-stem-leaf {
  opacity: 0 !important;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.6, 1) !important;
  filter: blur(0.6px);
}

@keyframes bomb-burst {
  0%   { transform: scale(1);   filter: brightness(1); }
  18%  { transform: scale(1.7); filter: brightness(2.5) saturate(1.4); }
  45%  { transform: scale(2.3); filter: brightness(3.5); opacity: 0.85; }
  100% { transform: scale(0);   filter: brightness(4);   opacity: 0; }
}

/* Shockwave — instead of expanding rings, the wave passes through the
   page itself: each content block briefly pulses (scale/brightness/lift)
   with a delay proportional to its distance from the cherry origin,
   so the wave visibly cascades outward through the layout. */
.ripple-target {
  /* !important on every longhand so the explosion ripple beats both
     the hero-rise reveal animation AND the matching !important on
     the shorthand above (the shorthand sets animation-delay too,
     which would otherwise zero out the per-element ripple stagger). */
  animation-name: ripple-pass !important;
  animation-duration: 0.85s !important;
  animation-timing-function: cubic-bezier(0.3, 0.65, 0.3, 1) !important;
  animation-fill-mode: both !important;
  animation-delay: var(--ripple-delay, 0s) !important;
  will-change: transform, filter;
}

@keyframes ripple-pass {
  0%   { transform: translateY(0)     scale(1)     skewX(0);    filter: brightness(1)   saturate(1)    blur(0); }
  18%  { transform: translateY(-12px) scale(1.07)  skewX(-1deg); filter: brightness(1.55) saturate(1.35) blur(0.4px); }
  42%  { transform: translateY(8px)   scale(0.975) skewX(0.5deg); filter: brightness(1.15) saturate(1.1) blur(0); }
  68%  { transform: translateY(-3px)  scale(1.012) skewX(0);    filter: brightness(1.05) saturate(1.05) blur(0); }
  100% { transform: translateY(0)     scale(1)     skewX(0);    filter: brightness(1)   saturate(1)    blur(0); }
}

/* A brief warm flash at the moment of detonation, originating from the
   cherry — sells the burst without being a hard-edged ring. */
.bomb-flash {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  background: radial-gradient(circle at var(--shockwave-x, 50%) var(--shockwave-y, 50%),
    rgba(255, 220, 180, 0.65) 0%,
    rgba(255, 130, 60, 0.35) 18%,
    rgba(255, 60, 40, 0.12) 38%,
    transparent 62%);
  opacity: 0;
  animation: bomb-flash 0.55s ease-out forwards;
}

@keyframes bomb-flash {
  0%   { opacity: 0; }
  8%   { opacity: 1; }
  100% { opacity: 0; }
}

/* The leaf that gets blown off the cherry, arcs onto the name,
   rests for a beat, then slips off and falls down the page. */
.flying-leaf {
  position: fixed;
  width: 26px;
  height: 14px;
  pointer-events: none;
  z-index: 10000;
  will-change: transform, top, left, opacity;
  filter: drop-shadow(0 1px 1.5px rgba(0,0,0,0.18));
}

.flying-leaf svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

/* Reset state: applied briefly after detonation so the cherry/stem snap
   back to unripe instantly instead of transitioning from red → orange. */
body.is-resetting .avatar,
body.is-resetting .avatar-inner,
body.is-resetting .avatar::before,
body.is-resetting .avatar::after,
body.is-resetting .cherry-stem-line,
body.is-resetting .cherry-stem-leaf,
body.is-resetting .cherry-fuse-spark,
body.is-resetting .cherry-wrap {
  transition: none !important;
  animation: none !important;
}

/* Cherry rebirth — the new unripe cherry gently fades back in after reset. */
body.is-reborn .cherry-wrap {
  animation: cherry-rebirth 1.6s cubic-bezier(0.2, 0.75, 0.3, 1) forwards;
}

@keyframes cherry-rebirth {
  0%   { opacity: 0; transform: scale(0.55); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}

/* ─── Initial page-load reveal ────────────────────────────────
   On first paint, hero content fades + rises into view in a quick
   cascade — text first, then cherry, then everything else. Mirrors
   the cherry-rebirth feel from the bomb explosion sequence.
   Gated behind body:not(.hero-revealed) so the declaration disappears
   once JS marks the page as revealed. Without this, removing the
   .ripple-target class after an explosion would flip animation-name
   back to hero-rise and replay the entrance from scratch. */
body:not(.hero-revealed) .cherry-wrap,
body:not(.hero-revealed) .identity,
body:not(.hero-revealed) .bio,
body:not(.hero-revealed) .profile > .btn-primary,
body:not(.hero-revealed) .meta {
  animation: hero-rise 0.9s cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

body:not(.hero-revealed) .identity                { animation-delay: 0.10s; }
body:not(.hero-revealed) .bio                     { animation-delay: 0.25s; }
body:not(.hero-revealed) .profile > .btn-primary  { animation-delay: 0.40s; }
body:not(.hero-revealed) .meta                    { animation-delay: 0.55s; }
/* Cherry uses its own scale-up timing so it pops in last, as a
   nice grace note after the text has settled. */
body:not(.hero-revealed) .cherry-wrap {
  animation: hero-cherry 1.2s cubic-bezier(0.2, 0.75, 0.3, 1) 0.7s both;
}

@keyframes hero-rise {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes hero-cherry {
  0%   { opacity: 0; transform: scale(0.55); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}

/* Work section reveal — triggered on scroll into view via IntersectionObserver
   in script.js. Uses a keyframe animation (not a CSS transition) so it
   doesn't lock the work-card's `transition` property — that property
   needs to stay free for the snappy hover lift defined elsewhere. */
.work-section:not(.is-revealed) .section-label,
.work-section:not(.is-revealed) .work-card {
  opacity: 0;
}

.work-section.is-revealed .section-label,
.work-section.is-revealed .work-card {
  animation: work-reveal 0.7s cubic-bezier(0.2, 0.75, 0.3, 1) both;
}
.work-section.is-revealed .work-card:nth-child(1) { animation-delay: 0.12s; }
.work-section.is-revealed .work-card:nth-child(2) { animation-delay: 0.22s; }
.work-section.is-revealed .work-card:nth-child(3) { animation-delay: 0.32s; }

@keyframes work-reveal {
  0%   { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  body.is-armed .avatar { animation: none; }
  .ripple-target { animation: none; }
  .bomb-flash { animation-duration: 0.2s; }
}
