/* ===================== Base & Tokens ===================== */
:root{
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #0e1116;
  --muted: #5f6b7a;
  --border: rgba(15, 23, 42, .08);
  --accent: #3b82f6;  /* blue */
  --accent-2: #8b5cf6; /* purple */
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

*{ box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===================== Layout Helpers ===================== */
.container{
  width: min(100%, 1100px);
  margin-inline: auto;
  padding: clamp(16px, 2.5vw, 28px);
}
header, main, section, footer { position: relative; z-index: 1; }
.section{ padding: clamp(32px, 5vw, 72px) 0; }
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.2vw, 28px);
}
.muted{ color: var(--muted); }

/* ===================== Top Navigation ===================== */
.topnav{
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.7);
  border-bottom: 1px solid var(--border);
}
.nav-inner{ display:flex; align-items:center; justify-content:space-between; }
.brand{ font-weight: 800; font-size: 20px; color: var(--text); letter-spacing:.2px; }
.brand span{ color: var(--accent); }
.nav-links{ display:flex; gap:18px; align-items:center; flex-wrap:wrap; }
.nav-links a{ color: var(--text); opacity:.85; }
.btn{
  display:inline-block;
  padding:10px 16px;
  border-radius:999px;
  border:2px solid var(--accent);
  background: transparent;
  /* gradient-filled text */
  color: transparent;
  background-image: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.6px var(--accent);
  font-weight:600;
  box-shadow: var(--shadow);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    -webkit-text-fill-color .18s ease,
    -webkit-text-stroke .18s ease;
}
.btn:hover,
.btn:focus-visible{
  transform: translateY(-2px) scale(1.03);
  background: var(--accent);
  color:#fff;
  -webkit-text-fill-color:#fff;
  -webkit-text-stroke:0 transparent;
  background-image:none;
  text-decoration:none;
}
.btn.small{ padding:8px 12px; font-size:.9rem; }
.btn.btn-secondary{
  border-color: var(--accent);
  background: transparent;
}

/* ===================== Hero (split + parallax-ready) ===================== */
.hero{
  padding: clamp(48px, 8vw, 120px) 0 clamp(28px, 4vw, 48px);
  position: relative;
  background: transparent;
  border-bottom: 1px solid var(--border);
  isolation: isolate; /* ensure pseudo sits behind content but above bg */
}
.hero-grid{ display:grid; gap:28px; grid-template-columns: 1fr; align-items:center; }
@media (min-width: 900px){ .hero-grid{ grid-template-columns: 1.2fr .8fr; } }
.hero-copy h1{ font-size: clamp(28px, 5vw, 48px); margin:0 0 8px; }
.subtitle{ color: var(--muted); margin: 0 0 14px; }
.meta-row{ margin-top:10px; color: var(--muted); display:flex; gap:16px; flex-wrap:wrap; justify-content:flex-start; }
.hero-media img{
  width:100%; height:auto; display:block;
  border-radius: 16px; box-shadow: var(--shadow); background:#eaeef7;
}
/* subtle parallax hooks (script in HTML already handles transforms) */
.hero.parallax .hero-media, .hero.parallax .hero-copy{ will-change: transform, opacity; transform: translateZ(0); }
.scroll-cue{
  position:absolute; left:50%; bottom:12px; transform:translateX(-50%);
  font-size:.85rem; color:var(--muted); opacity:.8;
}
.scroll-cue::after{ content:"↓"; display:block; text-align:center; animation: bob 1.6s ease-in-out infinite; }
@keyframes bob{ 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(6px);} }

/* ===================== Grids & Lists ===================== */
.feature-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.about-grid{ display:grid; gap:20px; grid-template-columns: 1fr; }
@media (min-width: 860px){ .about-grid{ grid-template-columns: 1.2fr .8fr; } }
.projects-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.tags{ display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.tags span{ font-size:.85rem; padding:6px 10px; border:1px solid var(--border); border-radius:999px; color: var(--muted); }
.blog-grid{ display:grid; gap:16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ===================== Forms ===================== */
.form-grid{ display:grid; grid-template-columns: 1fr; gap:10px; }
@media (min-width: 700px){ .form-grid{ grid-template-columns: 1fr auto; } }
.field{
  width:100%; padding:12px 14px; border-radius:10px;
  border:1px solid var(--border); background:#fff; color: var(--text);
}
textarea.field{ resize: vertical; }

/* ===================== Gallery (photo page) ===================== */
.gallery{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}
.gallery figure{ margin:0; border-radius:12px; overflow:hidden; border:1px solid var(--border); box-shadow: var(--shadow); background:#fff; }
.gallery img{ display:block; width:100%; height:auto; object-fit:cover; }
.gallery figcaption{ padding:8px 10px; color: var(--muted); font-size:.9rem; }

/* ===================== Reveal on Scroll ===================== */
.reveal{ opacity:0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view{ opacity:1; transform:none; }

/* ===================== Footer ===================== */
.site-footer{
  border-top: 1px solid var(--border);
  color: var(--muted);
  text-align:center;
  padding: 24px 0 40px;
}

/* ===================== Motion Blur Background (single image) ===================== */
.showcase-mb{
  position:relative;
  height: min(92vh, 820px);
  margin: clamp(16px, 4vw, 36px) auto;
  max-width: 1100px;
  border-radius: 20px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  isolation:isolate;
}
.showcase-mb .mb-bg{
  position:absolute; inset:-10%;
  background: url("background-photos/black.jpeg") center / cover no-repeat;
  filter: blur(2px) saturate(1.05) contrast(1.03);
  transform: translate3d(0,0,0) scale(1.08);
  animation: bgDrift 26s ease-in-out infinite alternate;
  will-change: transform, filter;
}
@keyframes bgDrift{
  0%   { transform: scale(1.05) translate3d(-1vw,-1vh,0); filter: blur(1px); }
  100% { transform: scale(1.12) translate3d( 2vw, 1vh,0); filter: blur(2px); }
}
.showcase-mb .mb-overlay{
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.35));
  pointer-events:none;
}
.showcase-mb .mb-slide{
  position:relative; display:grid; place-items:center; height:100%;
}
.showcase-mb .mb-slide figcaption{
  position:absolute; left:50%; bottom: 22px; transform: translateX(-50%);
  background: rgba(0,0,0,.38);
  border:1px solid rgba(255,255,255,.28);
  padding: 10px 14px; border-radius: 999px;
  color: #fff; font-weight:600; font-size: 1rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@media (prefers-reduced-motion: reduce){
  .showcase-mb .mb-bg{ animation: none !important; transform: none !important; filter: none !important; }
}

/* ===== Centered hero title over motion-blur background ===== */
.mb-center{
  position:absolute; inset:0;
  display:grid; place-items:center;
  text-align:center; padding: clamp(16px, 4vw, 32px);
  pointer-events:none; /* allow clicks to pass through, except buttons */
}
.mb-center .mb-cta{ margin-top: clamp(10px, 2.5vw, 18px); display:flex; gap:12px; justify-content:center; pointer-events:auto; }
.mb-heading{
  margin:0;
  font-weight:800;
  font-size: clamp(28px, 5.6vw, 56px);
  line-height:1.1;
  color:#fff;
  text-shadow: 0 8px 30px rgba(0,0,0,.35);
  opacity:0; transform: translateY(12px) scale(.985);
  animation: fadeUp 800ms cubic-bezier(.22,.61,.36,1) 120ms forwards;
}
.mb-sub{
  margin: 8px 0 0 0;
  font-size: clamp(14px, 2.2vw, 18px);
  color: rgba(255,255,255,.92);
  text-shadow: 0 4px 20px rgba(0,0,0,.35);
  opacity:0; transform: translateY(12px) scale(.985);
  animation: fadeUp 800ms cubic-bezier(.22,.61,.36,1) 260ms forwards;
}
@keyframes fadeUp{
  to{ opacity:1; transform:none; }
}
@media (prefers-reduced-motion: reduce){
  .mb-heading, .mb-sub{ animation:none; opacity:1; transform:none; }
}
/* ===================== Scroll-Driven Chapters ===================== */
.chapters{
  position: relative;
  /* Each marker is 120vh; total height is markers * 120vh plus a bit of slack */
  padding: 0;
}
.chapter{ height: 120vh; }
.chapters-sticky{
  position: sticky; top: 0; height: 100vh;
  overflow: hidden; isolation: isolate;
}
.chapters-stage{
  position:absolute; inset:0; z-index:0;
}
.chapters-bg{
  position:absolute; inset:-12%;
  background-position: center; 
  background-repeat: no-repeat; 
  background-size: cover;
  filter: saturate(1.05) contrast(1.03) blur(1.5px);
  transform: translate3d(0,0,0) scale(1.08);
  animation: bgDrift 28s ease-in-out infinite alternate;
  will-change: transform, filter, opacity;
  opacity: 0;
  transition: opacity 600ms ease;
}
.chapters-bg.is-active{ opacity: 1; }
.chapters-overlay{
  position:absolute; inset:0;
  background: radial-gradient(60% 50% at 50% 50%, rgba(0,0,0,.25), rgba(0,0,0,.55));
  mix-blend-mode: normal;
  transition: background 500ms ease;
}
/* Tint changes per active chapter (controlled by data-active on .chapters) */
.chapters[data-active="1"] .chapters-overlay{
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(59,130,246,.20), rgba(0,0,0,.55)),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
}
.chapters[data-active="2"] .chapters-overlay{
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(139,92,246,.20), rgba(0,0,0,.55)),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
}
.chapters[data-active="3"] .chapters-overlay{
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(16,185,129,.20), rgba(0,0,0,.55)),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
}
.chapters-center{
  position:relative; z-index:1;
  height:100%; display:grid; place-items:center; text-align:center;
  padding: clamp(16px, 4vw, 32px);
}
.chap-content{
  position:absolute; inset:auto 0 20vh 0; /* slightly lower than center for Apple-ish feel */
  margin-inline:auto;
  max-width:min(90%, 780px);
  opacity:0; transform: translateY(10px);
  transition: opacity 600ms ease, transform 600ms ease;
}
@media (min-width: 900px){
  .chap-content{ inset:auto 0 24vh 0; }
}
/* Active chapter content */
.chapters[data-active="1"] .chap-content[data-idx="1"],
.chapters[data-active="2"] .chap-content[data-idx="2"],
.chapters[data-active="3"] .chap-content[data-idx="3"]{
  opacity:1; transform:none;
}
.chap-content.is-active{ opacity:1; transform:none; }
.chap-content h2{
  margin:0 0 6px 0;
  color:#fff; font-weight:800;
  font-size: clamp(28px, 5vw, 56px);
  text-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.chap-content p{
  margin:0;
  color: rgba(255,255,255,.92);
  font-size: clamp(14px, 2.2vw, 18px);
  text-shadow: 0 6px 20px rgba(0,0,0,.35);
}
@media (prefers-reduced-motion: reduce){
  .chapters-bg{ animation: none !important; transform: none !important; filter: none !important; }
  .chap-content{ transition: none !important; opacity: 1 !important; transform: none !important; }
}
/* ===================== JS Interaction Hooks ===================== */
/* Fade reveal controlled by JS (.in-view toggled on .reveal) */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

/* Parallax hero image and copy transitions controlled by JS */
.hero.parallax .hero-media img,
.hero.parallax .hero-copy { will-change: transform, opacity; transition: transform 0.25s ease-out, opacity 0.25s ease-out; }

/* Global background cross-fade layers updated by JS (.is-active toggled) */
.global-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
.g-bg {
  position: absolute; inset: -12%;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.03) blur(1.2px);
  transform: translate3d(0,0,0) scale(1.08);
  animation: bgDrift 28s ease-in-out infinite alternate;
  will-change: transform, filter, opacity;
  opacity: 0; transition: opacity 0.8s ease;
}
.g-bg.is-active { opacity: 1; }
.g-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 50%, var(--bg-tint, rgba(0,0,0,.10)), rgba(0,0,0,.45)),
              linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.10));
  mix-blend-mode: normal;
}
.bg-chapter { height: 120px; width: 100%; }

/* Chapters cross-fade layers controlled by JS (.is-active toggled) */
.chapters-bg { transition: opacity 0.8s ease; }
.chapters-bg.is-active { opacity: 1; }

/* ===================== Extra Sections Styling ===================== */
/* Skills */
.skills-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:16px;
}
.skill-card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.skills h3, .experience h3, .statement h3, .gallery-section h3, .education h3, .testimonials h3{
  margin: 0 0 12px 0;
}

/* Experience Timeline */
.timeline{
  list-style:none; margin:0; padding:0 0 0 18px;
  border-left: 2px solid var(--border);
}
.timeline li{
  position:relative;
  padding: 12px 0 12px 8px;
}
.timeline li::before{
  content:"";
  position:absolute; left:-7px; top:18px;
  width:10px; height:10px; border-radius:50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,.15);
}
.timeline li span{
  display:inline-block; min-width: 110px; margin-right:8px;
  font-weight:600; color: var(--muted);
}

/* Gallery section */
.gallery-section .gallery-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
}
.gallery-section img{
  width:100%; height:auto; display:block;
  border-radius:12px; box-shadow: var(--shadow);
}

/* Testimonials */
.testimonials blockquote{
  margin:0; padding:16px; border-left:4px solid var(--accent);
  background:#fff; border-radius: 8px;
}
.testimonials cite{ display:block; margin-top:8px; color: var(--muted); font-style: normal; }
/* ===================== Readability / Contrast Improvements ===================== */

/* Header readability on dark backgrounds */
.header .logo { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.55); }
.header .nav a {
  color: #e5e7eb;
  text-shadow: 0 2px 12px rgba(0,0,0,.55);
}
.header .nav a:hover { color: #fff; }

/* Hero copy pops on the dark bg */
.hero .hero-copy h2,
.hero .hero-copy p {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.55);
}

/* Slightly stronger overlay for better contrast on global background */
.g-overlay{
  background:
    radial-gradient(60% 50% at 50% 50%, var(--bg-tint, rgba(0,0,0,.16)), rgba(0,0,0,.62)),
    linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.18));
}

/* Glass panels behind section content for legibility (exclude hero/chapters) */
section:not(.hero):not(.chapters) > .container{
  background: rgba(255,255,255,0.78);
  -webkit-backdrop-filter: saturate(120%) blur(6px);
  backdrop-filter: saturate(120%) blur(6px);
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  padding: clamp(16px, 3vw, 24px);
}
section:not(.hero):not(.chapters) > .container h3,
section:not(.hero):not(.chapters) > .container p,
section:not(.hero):not(.chapters) > .container li,
section:not(.hero):not(.chapters) > .container a{
  color: #0f172a; /* slate-900 */
}
section:not(.hero):not(.chapters) > .container a:hover{
  color: #1d4ed8; /* blue-700 */
}

/* Chapters text legibility */
.chapters .chap-content h2{ color:#fff; text-shadow: 0 8px 30px rgba(0,0,0,.55); }
.chapters .chap-content p{ color: rgba(255,255,255,.95); text-shadow: 0 6px 24px rgba(0,0,0,.55); }

/* Utility to force white text on dark */
.on-dark{ color:#fff; text-shadow: 0 2px 12px rgba(0,0,0,.6), 0 0 1px rgba(0,0,0,.8); }


/* ===================== Top-of-page White + Nav Buttons + Auto-Invert ===================== */

/* 1) Make the very top appear white (without changing images) */
.hero {
  isolation: isolate; /* ensure pseudo sits behind content but above bg */
}
.hero::before{
  content:"";
  position:absolute; inset:0;
  /* Darkened "white.jpeg" as hero background with soft fade-out */
  background:
    linear-gradient(0deg, rgba(0,0,0,.10), rgba(0,0,0,.10)),
    url("background-photos/white.jpeg") center / cover no-repeat;
  filter: grayscale(20%) brightness(.92) contrast(1.05) saturate(1.02);
  /* Smoothly fade to transparent toward the bottom to avoid a white bar */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 55%, rgba(0,0,0,.7) 72%, rgba(0,0,0,0) 92%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 55%, rgba(0,0,0,.7) 72%, rgba(0,0,0,0) 92%);
  z-index:0; pointer-events:none;
}
.hero > .container { position: relative; z-index: 1; }

/* Hero portrait on the right */
.hero .hero-media{
  background: url("personal_photo/1.jpeg") center / cover no-repeat;
  min-height: clamp(240px, 38vh, 460px);
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,.08);
  box-shadow: 0 20px 40px rgba(15,23,42,.15);
  overflow: hidden;
  position: relative;
}
/* Hide the placeholder <img> inside hero-media since we use CSS bg */
.hero .hero-media img{ display:none; }

/* Soft glossy overlay for the card */
.hero .hero-media::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,0) 40%, rgba(0,0,0,.08) 100%);
  pointer-events:none;
}

/* Make hero headings dark on the new light top gradient */
.hero .hero-copy h2,
.hero .hero-copy p{
  color:#0f172a;      /* slate-900 */
  text-shadow:none;   /* remove white glow */
}

/* 2) Header links become pill buttons that pop on hover */
.header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid var(--border);
}
/* Remove list bullets and lay out nav links horizontally */
.header .nav ul{
  list-style:none;
  display:flex;
  gap:10px;
  padding:0;
  margin:0;
  flex-wrap:wrap;
  align-items:center;
}
.header .nav a{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  background: transparent;             /* outlined by default */
  border: 2px solid var(--accent);
  /* gradient-filled text */
  color: transparent;
  background-image: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0.6px var(--accent); /* subtle outline for legibility */
  box-shadow: 0 4px 12px rgba(15,23,42,.06);
  transition: 
    transform .18s ease,
    box-shadow .18s ease,
    background-color .18s ease,
    color .18s ease,
    -webkit-text-fill-color .18s ease,
    -webkit-text-stroke .18s ease;
  text-shadow: none;
}
.header .nav a:hover,
.header .nav a:focus-visible{
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 10px 22px rgba(59,130,246,.25);
  /* pop to solid blue pill with white text */
  background: var(--accent);
  color:#fff;
  -webkit-text-fill-color:#fff;
  -webkit-text-stroke: 0 transparent;
  background-image: none; /* disable gradient text when filled */
  text-decoration: none;
}
.header .nav a:active{
  transform: translateY(0) scale(0.99);
  box-shadow: 0 6px 16px rgba(59,130,246,.25);
}

/* 3) Auto-invert headings over changing backgrounds using blend modes */
.auto-invert{
  color:#fff;
  mix-blend-mode: difference; /* white on dark, dark on light */
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
/* Apply to key headings where backgrounds vary strongly */
.testimonials h3,
.newsletter h3,
.contact h3 { 
  color:#fff; 
  mix-blend-mode: difference; 
  text-shadow: 0 2px 10px rgba(0,0,0,.25);
}
/* ===================== Header Auto-Theme, Mobile Hero Order, Scroll Cue ===================== */

/* Header theme variants (toggled by small script in index.html) */
.header.theme-light{
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}
.header.theme-solid{
  background: rgba(15,23,42,0.78); /* dark semi-opaque */
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
/* Nav pill overrides per theme */
.header.theme-solid .nav a{
  border-color: rgba(255,255,255,.9);
  /* make text white (no gradient) until hover */
  color:#fff;
  -webkit-text-fill-color:#fff;
  -webkit-text-stroke: 0 transparent;
  background-image: none;
}
.header.theme-solid .nav a:hover,
.header.theme-solid .nav a:focus-visible{
  background: var(--accent);
  color:#fff;
  -webkit-text-fill-color:#fff;
  box-shadow: 0 10px 22px rgba(59,130,246,.35);
}

/* Mobile-first: show portrait above text on small screens */
.media-first-mobile .hero-media{ order: -1; }
@media (min-width: 900px){
  .media-first-mobile .hero-media{ order: initial; }
}

/* Scroll cue styling and animation (center bottom of hero) */
.scroll-cue{
  position: absolute;
  left: 50%;
  bottom: clamp(8px, 2.5vh, 18px);
  transform: translateX(-50%);
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 2px solid rgba(15,23,42,.25);
  background: rgba(255,255,255,.7);
  color: #0f172a;
  z-index: 2; /* above hero ::before */
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.scroll-cue:hover{
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 10px 22px rgba(15,23,42,.15);
  background: #fff;
  border-color: rgba(15,23,42,.35);
}
.header.theme-solid + .hero .scroll-cue{
  /* if header is solid (post-hero), cue may be less visible, so invert */
  background: rgba(15,23,42,.75);
  color:#fff;
  border-color: rgba(255,255,255,.3);
}