/* ===== Daniel Sarmiento portfolio: paper & pixels ===== */
:root {
  --paper: #f4f9f9;         /* cool river-white canvas (60%) */
  --paper-2: #e8d5c4;       /* warm sandy surface */
  --card: #fcfdfd;          /* card fill (near white) */
  --ink: #6b4423;           /* warm brown text + borders (otter brown) */
  --muted: #8a6a4a;         /* softer brown secondary text */
  --border: #6b4423;        /* brown pixel borders */
  --line: rgba(107, 68, 35, 0.16);
  --shadow: #3d2817;        /* deep brown hard shadow */
  --accent: #1a4b6b;        /* river blue, the signature accent */
  --accent2: #1a4b6b;       /* single-accent system */
  --bg0: #f4f9f9;
  --bgWork: #e8d5c4;
  --bgAbout: #f4f9f9;
  --bgContact: #1a4b6b;     /* deep water */
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --sans: "Geist", -apple-system, "Segoe UI", sans-serif;
  --disp: "Bricolage Grotesque", var(--sans);
  --pix: "Press Start 2P", monospace;
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
/* no CSS scroll-behavior: smooth here; JS owns smooth scrolling (__smoothScrollTo for
   nav, smoothscroll.js for the wheel). CSS smooth would fight the rAF scroll loop. */
body {
  margin: 0;
  position: relative; /* anchor for the quest-trail overlay */
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* clip, not hidden, so <body> does NOT turn into a scroll container.
     overflow-x:hidden forces overflow-y to `auto`, which would pin the sticky
     section panels below to <body> (which never scrolls) instead of the page,
     breaking the stacking effect. `clip` hides horizontal overflow without that. */
  overflow-x: clip;
}
main { position: relative; z-index: 1; }

/* Smooth load: app starts hidden and fades in once fonts are ready (JS adds
   .app-ready). Cream body bg shows underneath, so there's no flash, just a fade. */
#root { opacity: 0; transition: opacity 0.35s ease; }
html.app-ready #root { opacity: 1; }

::selection { background: var(--accent); color: #fff; }
a { color: inherit; }
canvas.px { image-rendering: pixelated; display: block; }

/* ---------- keyboard focus ---------- */
/* Visible focus ring for keyboard users. --ink is redefined per section (charcoal
   on the cream panels, cream on the dark #contact panel), so it always contrasts
   against whatever it sits on. Mouse clicks don't trigger :focus-visible. */
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.navFab:focus-visible, .menuClose:focus-visible, .socBtn:focus-visible { outline-offset: 4px; }

/* ---------- nav ---------- */
.nav2 {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px max(28px, calc((100% - 1180px) / 2 + 28px));
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.5s var(--spring);
}
.nav2.navHide { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.nav2Logo {
  display: flex; align-items: center;
  text-decoration: none;
  font-family: var(--disp); font-weight: 800; font-size: 20px;
  letter-spacing: -0.02em;
}
.nav2Links { display: flex; gap: 10px; }
.nav2Links a {
  font-family: var(--sans); font-size: 15px; font-weight: 500;
  letter-spacing: 0;
  color: var(--ink); text-decoration: none;
  padding: 6px 4px;
  transition: color 0.2s ease;
}
.nav2Links a:hover { color: var(--ink); }
.nav2Links a.active { color: var(--accent2); }
/* rolling label hover */
.rlClip { display: block; overflow: hidden; }
.rlStack { display: block; position: relative; transition: transform 0.38s var(--spring); }
.rlStack span { display: block; }
.rlStack span + span { position: absolute; top: 100%; left: 0; color: var(--accent2); }
.nav2Links a.rl:hover .rlStack { transform: translateY(-100%); }

/* floating circular menu button (shows once hero scrolls away) */
.navFab {
  position: fixed; top: 22px; right: 22px; z-index: 70;
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  background: var(--ink);
  border: none; cursor: pointer;
  box-shadow: 0 10px 26px rgba(61,40,23,0.30);
  opacity: 0; transform: scale(0.55); pointer-events: none;
  transition: opacity 0.3s var(--spring), transform 0.4s var(--spring), background 0.2s ease;
}
.navFab.show { opacity: 1; transform: none; pointer-events: auto; }
.navFab:hover { background: var(--accent); }
.navFab span {
  display: block; width: 24px; height: 3px; border-radius: 2px;
  background: #f4f9f9;
  transition: background 0.2s ease;
}
.navFab:hover span { background: #fff; }

/* slide-in side menu: backdrop dims the page, panel sits on the right */
.menuOverlay {
  position: fixed; inset: 0; z-index: 80; overflow: hidden;
  display: flex; justify-content: flex-end;
  background: color-mix(in oklab, var(--ink) 34%, transparent);
  opacity: 0; visibility: hidden;
  transition: opacity 0.4s ease, visibility 0s linear 0.45s;
}
.menuOverlay.open { opacity: 1; visibility: visible; transition: opacity 0.35s ease; }
.menuPanel {
  position: relative;
  width: clamp(280px, 27vw, 380px);
  height: 100%;
  background: var(--paper);
  border-left: 2.5px solid var(--border);
  box-shadow: -14px 0 44px rgba(30,30,36,0.24);
  padding: 88px 28px 48px;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s var(--spring);
}
.menuOverlay.open .menuPanel { transform: none; }
.menuClose {
  position: absolute; top: 22px; right: 24px;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--accent);
  border: none; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.25s var(--spring), filter 0.2s ease;
}
.menuClose svg { width: 22px; height: 22px; }
.menuClose:hover { transform: rotate(90deg); filter: brightness(1.08); }
.menuInner { flex: 1; align-self: center; width: max-content; max-width: 100%; display: flex; flex-direction: column; }
.menuLinks { display: flex; flex: 1; flex-direction: column; justify-content: space-evenly; align-items: flex-start; }
.menuLinks a {
  display: flex; align-items: baseline; gap: 12px;
  padding: 8px 0;
  text-decoration: none; color: var(--ink);
  font-family: var(--disp); font-weight: 800;
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.02em; line-height: 1;
  text-transform: uppercase;
  opacity: 0; transform: translateX(26px);
  transition: opacity 0.5s var(--spring), transform 0.6s var(--spring), color 0.2s ease;
}
.menuOverlay.open .menuLinks a { opacity: 1; transform: none; }
.menuLinks a.active { color: var(--accent2); }
.menuLinks a:hover { color: var(--accent2); }
.mNum { font-family: var(--pix); font-size: 11px; color: var(--accent); }
.menuFoot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.socBtn {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff;
  text-decoration: none;
  opacity: 0; transform: translateY(22px) scale(0.8);
  transition: opacity 0.45s var(--spring), transform 0.5s var(--spring), filter 0.2s ease;
}
.menuOverlay.open .socBtn { opacity: 1; transform: none; }
.socBtn svg { width: 24px; height: 24px; }
.socBtn:hover { filter: brightness(1.12); transform: translateY(-3px); }

/* ---------- pixel buttons ---------- */
.pbtn {
  display: inline-flex; align-items: center; gap: 10px;
  white-space: nowrap;
  font-family: var(--mono); font-weight: 600; font-size: 15px;
  text-decoration: none; cursor: pointer;
  padding: 14px 24px;
  border: 2.5px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
}
.pbtn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--shadow); }
.pbtn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--shadow); }
.pbtnA { background: var(--accent); color: #fff; }
.pbtnA:hover { background: color-mix(in oklab, var(--accent) 88%, white); }

/* ---------- hero ---------- */
.hero2 {
  /* first panel of the sticky stack: pins to the top of the viewport while the
     following sections slide up and over it as you scroll (z-index 1 = bottom) */
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 100vh;
  /* faint cool wash toward the foot of the hero, a hint of river water */
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg0) 58%, #e7f1f2 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  text-align: center;
  padding: 120px 28px 96px;
  overflow: hidden;
}
.heroCopy {
  position: relative;
  z-index: 2;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.heroCopy .pixLabel { margin-bottom: 28px; }
.pixLabel {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--pix); font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pixLabel .lvlInk { color: var(--muted); }
.hero2 h1 {
  margin: 0;
  font-family: var(--disp);
  font-size: clamp(48px, 7vw, 100px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
  text-wrap: balance;
}
.hero2 h1 .word { display: inline-block; animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero2 h1 .acc { color: var(--accent); }
@keyframes pop {
  0% { opacity: 0; transform: translateY(16px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.hero2Sub {
  margin: 30px auto 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.66;
  color: var(--muted);
  text-wrap: pretty;
  animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both;
}
.hero2Ctas { display: flex; justify-content: center; gap: 16px; margin-top: 42px; animation: pop 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s both; }

/* clouds drifting in the hero background */
.heroClouds { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.cloud { position: absolute; opacity: 0.85; }
.cloudDrift { animation: drift2 var(--cd, 30s) linear infinite alternate; }
@keyframes drift2 {
  from { transform: translateX(0); }
  to { transform: translateX(46px); }
}

/* ---------- sections / level heads ---------- */
/* Sticky "stacking" panels: every full-bleed section pins to the top of the
   viewport, and the next section (with a higher z-index) slides up and overlaps
   it during scroll. min-height (not a fixed height) keeps taller content from
   ever being clipped; each panel's opaque --secbg fully covers the one beneath.
   Incremental z-index on #work / #about / #contact sets the overlap order. */
.sec2 {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: safe center;
  padding: 104px 28px;
  scroll-margin-top: 70px;
  background: var(--secbg, transparent);
}
.secIn { max-width: 1180px; margin: 0 auto; }
/* Work's 2x2 card grid is intrinsically taller than the viewport, so pinning it
   (sticky, like the other panels) froze it on screen for ~1.5 screens of scroll and
   cut the bottom row of cards off below the fold. that "stuck while scrolling" feel.
   Let it scroll through naturally instead: it still slides up over the pinned hero,
   and #about pins to cover it as it exits. */
#work.sec2 { --secbg: var(--bgWork); z-index: 2; position: relative; top: auto; justify-content: flex-start; }
/* About holds a big square portrait + text, so it can run taller than the
   viewport. Pinning it (sticky) would hide its lower half as #contact slides up
   over it, the same trap #work avoids. Let it scroll through naturally; #contact
   still pins and covers it on the way out. */
#about.sec2 { --secbg: var(--bgAbout); z-index: 3; position: relative; top: auto; justify-content: flex-start; }
#contact.sec2 { --secbg: var(--bgContact); --ink: #f4f9f9; --muted: #cdd9de; --border: #3f6c8c; --card: #235877; --shadow: #0d2334; --accent: #6b4423; --accent2: #6b4423; color: #f4f9f9; z-index: 4; }
#contact .pixLabel { color: #f4f9f9; }
.pixEdge {
  height: 20px;
  background:
    repeating-linear-gradient(90deg, var(--c1) 0 20px, var(--c2) 20px 40px) top / 100% 10px no-repeat,
    repeating-linear-gradient(90deg, var(--c2) 0 20px, var(--c1) 20px 40px) bottom / 100% 10px no-repeat;
}
.levelHead { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.levelHead h2 {
  margin: 0;
  font-family: var(--disp);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.rv2 {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s var(--spring), transform 0.8s var(--spring);
}
.rv2.in { opacity: 1; transform: none; }
/* word-by-word heading rise */
.splitH .swLine { display: block; }
.splitH .ww { display: inline-block; overflow: hidden; vertical-align: bottom; margin-right: 0.26em; padding-bottom: 0.07em; margin-bottom: -0.07em; }
.splitH .wi { display: inline-block; transform: translateY(115%); transition: transform 0.85s var(--spring); transition-delay: inherit; }
.rv2.in .splitH .wi { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rv2 { transition: none; opacity: 1; transform: none; }
  .splitH .wi { transition: none; transform: none; }
  .nav2 { transition: none; }
  .hero2 h1 .word, .hero2Sub, .hero2Ctas { animation: none; }
  .cloudDrift { animation: none; }
}

/* ---------- work cards ---------- */
.workGrid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.pCard2 {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 2.5px solid var(--border);
  box-shadow: 7px 7px 0 var(--shadow);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pCard2:hover { transform: translate(-3px, -3px); box-shadow: 11px 11px 0 var(--shadow); }
.pCard2:active { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--shadow); }
.pShot2 { border-bottom: 2.5px solid var(--border); background: var(--paper-2); }
.pShot2 img { width: 100%; height: 250px; object-fit: cover; display: block; }
.pMeta2 { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pTop2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pTop2 h3 { margin: 0; font-family: var(--disp); font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }
.pMeta2 p { margin: 0; color: var(--muted); font-size: 15px; }
.pTags2 { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.pTags2 span {
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  border: 2px solid var(--accent);
  padding: 3px 9px;
  background: var(--accent);
  color: #f4f9f9;
}

/* ---------- about ---------- */
.aboutGrid2 { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 64px; align-items: center; }
.aboutText2 { max-width: 480px; }
.aboutFrame {
  border: 3px solid var(--border);
  box-shadow: 9px 9px 0 var(--shadow);
  background: var(--card);
  padding: 14px;
}
.aboutFrame img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }
.aboutText2 p { margin: 0 0 20px; font-size: 18px; line-height: 1.8; color: var(--ink); }
.aboutText2 p span.soft { color: var(--muted); }
.aboutText2 strong { font-weight: 650; }

/* ---------- contact ---------- */
.contact2 { text-align: center; }
.contact2 h2 {
  margin: 18px 0 0;
  font-family: var(--disp);
  font-size: clamp(40px, 5.6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.contact2 .sub { margin: 22px auto 0; max-width: 440px; color: var(--muted); font-size: 17px; }
.contactCta2 { margin-top: 40px; display: flex; justify-content: center; }
.socials2 { display: flex; justify-content: center; gap: 8px; margin-top: 26px; }
.socials2 a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--mono); font-size: 13px;
  color: var(--muted); text-decoration: none;
  padding: 7px 13px;
  transition: color 0.2s ease;
}
.socials2 a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* availability badge (about section): same retro button look as .pbtn .pbtnA */
.availBadge {
  display: inline-flex; align-items: center; white-space: nowrap;
  margin-top: 24px;
  padding: 14px 22px;
  border: 2.5px solid var(--border);
  background: var(--accent);
  box-shadow: 5px 5px 0 var(--shadow);
  font-family: var(--mono); font-weight: 600; font-size: 15px; color: #fff;
  width: fit-content;
}

/* ---------- footer ---------- */
.footer2 {
  position: relative; z-index: 5; /* above the sticky hero/sections, which would otherwise cover it */
  background: var(--bgContact);
  border-top: 2px solid rgba(244,249,249,0.18);
  padding: 26px 28px 32px;
  font-family: var(--mono); font-size: 12px; color: rgba(244,249,249,0.66);
}
.footIn {
  max-width: 1180px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 16px;
}

/* ---------- project detail page ---------- */
.projTop {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px max(28px, calc((100% - 1180px) / 2 + 28px));
  background: color-mix(in oklab, var(--paper) 90%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.projBack { font-family: var(--mono); font-size: 15.5px; font-weight: 600; color: var(--ink); text-decoration: none; transition: color 0.2s ease; }
.projBack:hover { color: var(--accent); }
.projPage { min-height: 100vh; background: var(--paper); padding: 52px 28px 100px; }
.projIn { max-width: 720px; margin: 0 auto; text-align: center; }
.projTitle { font-family: var(--disp); font-weight: 800; font-size: clamp(44px, 6.4vw, 80px); letter-spacing: -0.025em; line-height: 1.02; margin: 18px 0 0; text-wrap: balance; }
.projTagline { font-size: clamp(20px, 2.5vw, 25px); line-height: 1.5; color: var(--muted); margin: 20px auto 0; max-width: 36ch; text-wrap: pretty; }
.projLinks { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 32px 0 0; }
.projShot { width: min(560px, 100%); aspect-ratio: 1 / 1; margin: 44px auto 0; border: 3px solid var(--border); box-shadow: 9px 9px 0 var(--shadow); background: var(--paper-2); }
.projShot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.projMeta { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 44px; margin: 40px 0 0; }
.projMeta > div { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.projMetaK { font-family: var(--pix); font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.07em; }
.projMeta > div > span:last-child { font-family: var(--mono); font-size: 15px; color: var(--ink); }
.projBody { margin: 40px auto 0; max-width: 60ch; }
.projBody p { font-size: 18px; line-height: 1.8; color: var(--ink); margin: 0 auto 18px; max-width: 54ch; }
.projTags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 0; }
.projNav {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin: 60px 0 0; padding-top: 30px; text-align: left;
  border-top: 2px solid var(--line);
}
.projNavLink {
  display: flex; flex-direction: column; gap: 3px;
  text-decoration: none; color: var(--ink);
  transition: color 0.2s ease;
}
.projNavLink:hover { color: var(--accent); }
.projNavRt { text-align: right; }
.projNavSingle { justify-content: flex-end; }
.projNavDir { font-family: var(--pix); font-size: 10px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.projNavName { font-family: var(--disp); font-weight: 800; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -0.02em; line-height: 1.04; }

/* ---------- quest trail + runner ---------- */
.trailSvg {
  position: absolute; top: 0; left: 0;
  z-index: 2;
  pointer-events: none;
}
.runner {
  position: absolute; top: 0; left: 0;
  z-index: 35;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  will-change: transform;
}
.runner.show { opacity: 1; }
/* soft shadow so the otter's pale belly stays legible on the light background */
.runner canvas { display: block; filter: drop-shadow(0 2px 1px rgba(26,75,107,0.30)); }
/* water splashes the otter leaves in its wake (page-coordinate layer) */
.splashLayer {
  position: absolute; top: 0; left: 0; width: 100%;
  z-index: 34; pointer-events: none;
}
.splash { position: absolute; will-change: transform, opacity; }
.splash svg { display: block; }
@media (prefers-reduced-motion: reduce) { .splashLayer { display: none; } }
.bubble {
  position: absolute;
  bottom: calc(100% + 14px);
  left: -10px;
  background: var(--ink);
  border: 2.5px solid var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 9px 13px;
  font-family: var(--mono); font-size: 12.5px;
  color: var(--paper);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px) scale(0.85);
  transition: opacity 0.25s ease, transform 0.3s var(--spring);
}
.bubble::after {
  content: "";
  position: absolute; top: 100%; left: 22px;
  width: 10px; height: 10px;
  background: var(--ink);
  border-right: 2.5px solid var(--paper);
  border-bottom: 2.5px solid var(--paper);
  transform: translateY(-6px) rotate(45deg);
}
.bubble.show { opacity: 1; transform: translateY(0) scale(1); }
.runner .bubble { left: 50%; transform: translate(-50%, 6px) scale(0.85); }
.runner .bubble.show { transform: translate(-50%, 0) scale(1); }
.runner .bubble::after { left: 50%; margin-left: -5px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .workGrid2 { grid-template-columns: 1fr; }
  .aboutGrid2 { grid-template-columns: 1fr; gap: 36px; }
  .aboutFrame img { aspect-ratio: 1 / 1; }
  /* Below the breakpoint the layout is single-column and runs much taller than
     the viewport, so the sticky stacking would hide the lower content. Drop back
     to normal document flow here, the responsive layout + scroll stay intact. */
  .hero2 { padding: 116px 22px 90px; position: static; min-height: 100svh; z-index: auto; }
  .nav2Links { display: none; }
  .navFab { opacity: 1; transform: none; pointer-events: auto; }
  .sec2 { padding: 84px 22px; position: static; display: block; min-height: 0; z-index: auto; }
  .footIn { flex-direction: column; }
  .hero2Ctas { flex-wrap: wrap; }
}

/* the availability label is long; let it wrap on narrow phones instead of clipping */
@media (max-width: 540px) {
  .availBadge { white-space: normal; }
}

/* Shorter (non-fullscreen) desktop windows: the hero packs a lot into 100vh, so
   compact the headline + spacing here so nothing overflows or collides with the
   otter. Scoped to >960px since below that the hero is static and just scrolls. */
@media (min-width: 961px) and (max-height: 880px) {
  .hero2 { padding: 80px 28px 60px; }
  .hero2 h1 { font-size: clamp(38px, 5.4vw, 68px); }
  .heroCopy .pixLabel { margin-bottom: 18px; }
  .hero2Sub { margin-top: 20px; }
  .hero2Ctas { margin-top: 30px; }
}
@media (min-width: 961px) and (max-height: 720px) {
  .hero2 { padding: 60px 28px 46px; }
  .hero2 h1 { font-size: clamp(32px, 4.6vw, 54px); }
  .hero2Sub { margin-top: 16px; font-size: 16px; max-width: 520px; }
  .hero2Ctas { margin-top: 22px; }
}

/* project page on small screens */
@media (max-width: 700px) {
  .projTitle { font-size: clamp(34px, 11vw, 52px); }
  .projNav { flex-direction: column; gap: 14px; text-align: center; }
}

/* ============================================================
   Polish layer
   ============================================================ */

/* Work cards: the lift is already there, add a slow image push-in and an
   accent title tint so the whole card feels alive on hover. */
.pShot2 { overflow: hidden; }
.pShot2 img { transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pCard2:hover .pShot2 img { transform: scale(1.045); }
.pTop2 h3 { transition: color 0.2s ease; }
.pCard2:hover .pTop2 h3 { color: var(--accent); }

/* Paper grain: a faint fixed noise wash over the flat palette for warmth.
   pointer-events:none so it never intercepts clicks; mix-blend keeps it subtle. */
.grain {
  position: fixed; inset: 0; z-index: 999; pointer-events: none;
  opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E");
}

/* "kayd" easter-egg heart shower */
.heartRain { position: fixed; inset: 0; z-index: 9998; pointer-events: none; overflow: hidden; }
.heart {
  position: absolute; bottom: -8vh; display: block; opacity: 0;
  filter: drop-shadow(0 2px 1px rgba(61, 40, 23, 0.18));
  animation: heartFloat var(--dur, 3s) linear var(--delay, 0s) forwards;
}
@keyframes heartFloat {
  0%   { transform: translate(0, 0) scale(0.5) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translate(var(--sway, 0px), -120vh) scale(1) rotate(var(--rot, 20deg)); opacity: 0; }
}

/* Keyboard focus: a clear pixel-style ring on interactive elements, only for
   keyboard users (not mouse clicks). */
a:focus-visible, button:focus-visible, .pbtn:focus-visible, .pCard2:focus-visible,
.socBtn:focus-visible, .navFab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}
#contact a:focus-visible, #contact button:focus-visible { outline-color: #f4f9f9; }

/* Respect reduced-motion: kill drifts, reveals, and transitions for anyone who
   asks the OS to minimize animation. (The otter already checks this in JS.) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .cloudDrift { animation: none !important; }
}
