/* ==========================================================
   responsive.css  -  MOBILE + TABLET OVERRIDES (<= 1280px)
   Load this LAST on every page. Desktop is untouched.
   Everything here is fluid (vw / clamp / grid / flex) instead of
   hard-coded pixel offsets, so it adapts to any screen width.
   ========================================================== */

@media (max-width: 1280px) {

  /* ---- TUNING KNOBS (the two background SVGs) ----
     They now stretch to fill their area (cover). These only choose which
     part of the artwork stays in view:  "x% y%"  (0% 0% = top-left).   */
  :root {
    --home1-focus: 50% 50%;
    --home1-width: 125vw;      /* home-1 width (wider than the screen = more room to position) */
    --home1-x: -12.5vw;        /* home-1 left edge: -12.5vw centres a 125vw image; 0 = flush left */
    --home1-up: 0px;           /* 0 = bottom edge sits exactly where the banner starts; raise to lift it further */
    --sectionbg-focus: 50% 0%;
    --media-bg-x: 0px;         /* media page marble: horizontal start (0 = left edge) */
    --media-img-x: 500px;        /* media-img on iPad Pro 13 / Surface Pro 10 / Nest Hub Max: + moves it RIGHT, - moves it LEFT */
    --media-img-x-nest: 0px;   /* Nest Hub Max only: media-img offset from the LEFT edge (0 = starts at the far left, + moves it right)  */
    --media-img-stretch-x-nest: 1.6;   /* Nest Hub Max only: makes the media-img WIDER. 1 = normal, 1.6 = 60% wider (grows to the right from the left edge) */
    --media-img-stretch-y: 3;  /* same three screens: stretches the media-img taller. 1 = normal, 1.3 = 30% taller (grows equally past top and bottom) */
    --marble-bleed: max(24px, 12vw);   /* marble overshoots the screen by this much (split left/right); bigger on narrow phones like the SE */
  }

  /* ---------- 1. PAGE SCROLL FIX (all pages) ---------- */
  html {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
  body {
    height: auto !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    position: relative;
  }
  img { max-width: 100%; }

  /* ---------- 2. NAV (all pages): centred on ANY width ---------- */
  .links-container {
    top: 30px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: max-content !important;
    max-width: 100vw !important;
    gap: clamp(14px, 5vw, 44px) !important;
  }
  .links-container a {
    font-size: clamp(0.95rem, 4.3vw, 1.6rem) !important;
    white-space: nowrap !important;
    padding: 6px 2px;                 /* bigger tap target */
    /* white glow behind the links (now on every screen size, tablets included) */
    text-shadow: 0px 2px 8px rgba(255, 255, 255, 0.9),
                 0px 0px 4px rgba(255, 255, 255, 0.8) !important;
  }

  /* ==========================================================
     3. HOME PAGE  -  one flat grid for the whole page
     cols: 1 margin | 2-3 icon cols | 4 | 5 gap | 6 text | 7-8 social | 9 margin
     rows: 1 title | 2 banner | 3-5 photo+intro | 6 What's New h2
           7-9 links | 10 Follow me | 11 social icons
     ========================================================== */
  body.page-home {
    display: grid !important;
    grid-template-columns:
      5vw
      clamp(40px, 11vw, 72px)
      clamp(40px, 11vw, 72px)
      clamp(60px, 18vw, 300px)
      4vw
      minmax(0, 1fr)
      auto auto
      5vw;
    grid-template-rows: auto auto auto auto 1fr auto auto auto auto auto auto;
    align-content: start;
    min-height: 0 !important;      /* page ends exactly after the social icons */
  }
  /* header would otherwise occupy a grid cell; nav inside is fixed anyway */
  body.page-home > .main-header {
    position: absolute; top: 0; left: 0; width: 0; height: 0;
  }

  /* --- row 1: site title, centred --- */
  body.page-home .site-title {
    grid-column: 1 / -1; grid-row: 1;
    position: static !important;
    top: auto !important; left: auto !important;
    align-items: center !important;
    text-align: center !important;
    padding: clamp(66px, 17vw, 108px) 4vw clamp(10px, 3vw, 24px);   /* space above (menu) and below (banner) */
  }
  body.page-home .site-title p2 {
    margin: 0 !important;
    display: inline-block !important;      /* shrink-wraps "Jhaila" + "Moore" into one block... */
    text-align: left !important;           /* ...whose lines keep your original left-aligned stagger */
    font-size: clamp(54px, 19vw, 150px) !important;
    line-height: 0.9 !important;
    word-spacing: 0.2em !important;
    letter-spacing: 1px !important;
  }
  /* "Moore": indented right of "Jhaila" (your original stagger).
     The whole Jhaila/Moore block is then centred on the page by .site-title. */
  body.page-home .site-title p2 span {
    display: inline-block !important;
    position: static !important;
    left: auto !important;
    margin-left: clamp(70px, 8vw, 90px) !important;   /* the indent: raise/lower to taste */
  }

  /* --- row 2: pink banner, directly under the title --- */
  body.page-home .position-title {
    grid-column: 1 / -1; grid-row: 2;
    width: 100% !important; max-width: none !important;
    height: auto !important; min-height: 56px;
    top: 0 !important; left: 0 !important;
    margin: 0 !important;
    padding: 14px 5vw !important;
    justify-content: flex-end !important;      /* text sits at the far right */
    box-sizing: border-box !important;
  }
  body.page-home .home-position-title {
    margin: 0 !important;
    text-align: right !important;
    font-size: clamp(1.15rem, 5vw, 2.4rem) !important;
    letter-spacing: 2px !important;
    white-space: normal !important;
  }

  /* --- rows 3-5: photo (left) + intro text (right of photo) --- */
  body.page-home .site-container {
    grid-column: 2 / 5; grid-row: 3 / 6;
    padding: 3vw 0 0 !important;       /* breathing room below the banner */
  }
  body.page-home .home-img-container {
    margin: 0 !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; max-width: none !important;
  }
  body.page-home .home-img {
    width: 100% !important; height: auto !important;
    border-radius: 5px !important;
  }
  body.page-home .mobile-only-text,
  body.page-home .mobile-only-text2,
  body.page-home .mobile-only-text3 {
    display: block !important;
    grid-column: 6 / 9;
    width: auto !important;
    top: 0 !important; left: 0 !important;
    margin: 0 !important; padding: 0 !important;
    align-self: start;
    position: relative;
    z-index: 20 !important;
    overflow-wrap: break-word;
  }
  /* original font styling from your style.css (sizes only grow on tablets) */
  body.page-home .mobile-only-text {
    grid-row: 3; margin-top: 3vw !important;
    font-family: "BDRegular", BDRegular !important;
    color: #f48ba1 !important;
    font-size: clamp(2.2rem, 5.6vw, 3.4rem) !important;
    line-height: 30px !important;
  }
  body.page-home .mobile-only-text2 {
    grid-row: 4; margin-top: 2vw !important;
    font-family: "BDRegular", BDRegular !important;
    color: #9d8871 !important;
    font-size: clamp(1rem, 2.4vw, 1.4rem) !important;
    line-height: 20px !important;
  }
  body.page-home .mobile-only-text3 {
    grid-row: 5; margin-top: 2vw !important;
    font-family: "BDRegular", BDRegular !important;
    color: #9d8871 !important;
    font-size: clamp(0.8rem, 2vw, 1.15rem) !important;
    line-height: 20px !important;
    text-decoration-line: underline;
  }
  body.page-home .mobile-only-text span { font-family: inherit; color: inherit; }
  body.page-home .mobile-only-text3 a { color: #9d8871 !important; }

  /* --- What's New: wrappers dissolve so everything sits in the page grid --- */
  body.page-home .scroll-page-home,
  body.page-home .right-news-panel,
  body.page-home .quick-feed,
  body.page-home .feed-item { display: contents !important; }

  body.page-home .right-news-panel h2 {
    grid-column: 2 / 9; grid-row: 6;
    position: static !important; top: auto !important; left: auto !important;
    margin: 2vw 0 0 !important;
    font-size: clamp(2rem, 8.5vw, 3.8rem) !important;
  }
  body.page-home .feed-link-wrapper {
    grid-column: 3 / 9;
    position: static !important; top: auto !important; left: auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: clamp(9px, 2.8vw, 20px) 0 clamp(9px, 2.8vw, 20px) 2vw !important;
    align-self: center;
  }
  body.page-home .feed-item .feed-link-wrapper:nth-child(1) { grid-row: 7; }
  body.page-home .feed-item .feed-link-wrapper:nth-child(2) { grid-row: 8; }
  body.page-home .feed-item .feed-link-wrapper:nth-child(3) { grid-row: 9; }
  body.page-home .feed-item a {
    font-size: clamp(1.6rem, 6.6vw, 2.9rem) !important;
  }

  /* hyperlink icons: middle layer (above blue page colour, below section-bg) */
  body.page-home .hyperlink-1,
  body.page-home .hyperlink-2,
  body.page-home .hyperlink-3 {
    position: static !important;
    left: auto !important; top: auto !important;
    margin: 0 !important;
    width: clamp(28px, 8vw, 54px) !important; height: auto !important;
    grid-column: 2; justify-self: center; align-self: center;
    z-index: -2 !important;
  }
  body.page-home .hyperlink-1 { grid-row: 7; }
  body.page-home .hyperlink-2 { grid-row: 8; }
  body.page-home .hyperlink-3 { grid-row: 9; }

  /* Follow me: right side */
  body.page-home .feed-item-sm {
    grid-column: 2 / 9; grid-row: 10;
    position: static !important; display: block !important;
    width: auto !important; margin: 3vw 0 0 !important;
    text-align: right !important;
  }
  body.page-home .feed-item-sm p {
    position: static !important; left: auto !important; top: auto !important;
    margin: 0 !important; text-align: right !important;
    font-size: clamp(1.1rem, 4.5vw, 1.9rem) !important;
  }
  /* social icons: right side, close together */
  body.page-home .sm-link {
    position: static !important;
    left: auto !important; top: auto !important;
    margin: 0 0 10vw !important; transform: none !important;
    grid-row: 11; justify-self: center;
    display: flex !important; align-items: center; justify-content: center;
    min-width: 40px; min-height: 44px;
  }
  body.page-home .sm-link:first-of-type { grid-column: 7; }
  body.page-home .sm-link:last-of-type  { grid-column: 8; }
  body.page-home .SM-icon-ig,
  body.page-home .SM-icon-li {
    position: static !important; left: auto !important; top: auto !important;
    height: auto !important;
  }
  body.page-home .SM-icon-ig { width: clamp(28px, 8vw, 48px) !important; }
  body.page-home .SM-icon-li { width: clamp(30px, 8.6vw, 52px) !important; }

  /* --- background artwork: each fills an exact grid area --- */
  /* home-1: top of page  ->  where the pink banner starts */
  body.page-home .home-1 {
    position: absolute !important;
    grid-row: 1 / 2; grid-column: 1 / -1;
    top: auto !important;
    bottom: var(--home1-up) !important;     /* anchored to the banner's top edge */
    left: var(--home1-x) !important;
    right: auto !important;
    width: var(--home1-width) !important;
    height: auto !important;               /* full image, never cropped */
    max-width: none !important; max-height: none !important; min-height: 0 !important;
    margin: 0 !important; transform: none !important;
    object-fit: fill !important;
    z-index: -3 !important;
    pointer-events: none;
  }
  /* section-bg: where the banner ends  ->  bottom of page (below social icons) */
  body.page-home .section-bg {
    position: absolute !important;
    grid-row: 3 / 12; grid-column: 1 / -1;
    top: 0 !important; right: 0 !important; bottom: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    max-width: none !important; min-height: 0 !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: var(--sectionbg-focus) !important;
    z-index: -1 !important;
    pointer-events: none;
  }

  /* ==========================================================
     4. ARTIST PAGE
     main becomes a column: title -> photo+bio -> signature
     ========================================================== */
  body.page-artist .site-container {
    position: static !important;            /* so the marble anchors to the full-width <body> */
    margin: 0 !important; max-width: none !important;
    left: auto !important; right: auto !important; transform: none !important;
    display: flex !important; flex-direction: column;
    width: 100%; box-sizing: border-box;
    padding: clamp(70px, 17vw, 110px) 6vw 48px !important;
  }
  /* flatten so p1/p3/p4 can be ordered */
  body.page-artist .main-content-wrapper,
  body.page-artist .page-inner-content-title { display: contents !important; }

  body.page-artist .p2,                       /* desktop bio copy */
  body.page-artist .bio-page-container { display: none !important; }

  body.page-artist .p1 {
    order: 1;
    position: static !important; left: auto !important; top: auto !important;
    width: 100% !important; margin: 0 0 4vw !important;
    text-align: center !important;
    font-size: clamp(2rem, 9vw, 3.6rem) !important;
  }
  body.page-artist .artist-mobile-bio-section {
    order: 2;
    display: block !important;
    position: static !important; left: auto !important; top: auto !important;
    width: 100% !important; margin: 0 !important;
    z-index: 5 !important;
  }
  body.page-artist .mobile-bio-row::after { content: ""; display: table; clear: both; }
  body.page-artist .mobile-bio-img {
    float: left !important;
    width: clamp(190px, 36vw, 300px) !important; height: auto !important;
    font-weight: 800 !important;
    margin: 0 4vw 10px 0 !important;
    border-radius: 5px !important;
  }
  body.page-artist .mobile-p2 {
    inline-size: auto !important; width: auto !important;
    margin: 0 !important;
    font-family: "BDRegular", sans-serif !important;   /* your original mobile bio font */
    color: #726352 !important;
    font-size: clamp(1rem, 2.9vw, 1.2rem) !important;
    line-height: 1.55 !important;
    font-weight: 800 !important;
    text-align: left !important;
    overflow-wrap: break-word;
  }
  /* signature staggered like desktop: "Sincerely" tilted -10deg, "Jhaila" lower and a bit further right */
  body.page-artist .p3 {
    order: 3;
    position: static !important; left: auto !important; top: auto !important;
    margin: 0 !important; padding: 0 9vw 0 0 !important;   /* negative top margin = moves up */
    text-align: right !important;
    font-size: clamp(2rem, 8vw, 3.4rem) !important;
    transform: rotate(-10deg) !important;
    transform-origin: center;
    text-shadow: 2px 3px 6px rgba(0, 0, 0, 0.4) !important;
  }
  body.page-artist .p4 {
    order: 4;
    position: static !important; left: auto !important; top: auto !important;
    margin: -6vw 0 0 !important; padding: 0 15vw 0 0 !important;   /* bigger right padding = further left, tucked under Sincerely */
    text-align: right !important;
    font-size: clamp(1.4rem, 6vw, 2.5rem) !important;
  }
  body.page-artist .marble-bg {
    position: absolute !important;
    top: 0 !important; right: auto !important;
    left: calc(-0.5 * var(--marble-bleed)) !important;
    width: calc(100vw + var(--marble-bleed)) !important;   /* overshoots both edges so no thin blue strip can show */
    height: 100% !important; min-height: 0 !important;
    max-width: none !important; margin: 0 !important;
    object-fit: cover !important; object-position: right top !important;
    z-index: -1 !important;
  }
  body.page-artist::before {                  /* dots always cover the screen */
    --dots-ext: 14vh;                         /* extra length on the left; the 10deg tilt needs more on taller screens */
    position: fixed !important;
    top: -15vh !important; left: calc(-15vw - var(--dots-ext)) !important;
    width: calc(130vw + var(--dots-ext)) !important; height: 130vh !important;
    transform: rotate(10deg) !important;
    background-size: 20px 20px !important;
    background-image:
      radial-gradient(#9d8871 4px, transparent 5px),
      radial-gradient(#9d8871 4px, transparent 5px) !important;
    background-position: 10px 0, 10px 0 !important;
    /* same fade-out on screen as before, shifted by the extra length */
    -webkit-mask-image: linear-gradient(to right,
      #000 var(--dots-ext),
      rgba(0,0,0,0.7) calc(19.5vw + var(--dots-ext)),
      rgba(0,0,0,0.3) calc(45.5vw + var(--dots-ext)),
      rgba(0,0,0,0) calc(78vw + var(--dots-ext))) !important;
    mask-image: linear-gradient(to right,
      #000 var(--dots-ext),
      rgba(0,0,0,0.7) calc(19.5vw + var(--dots-ext)),
      rgba(0,0,0,0.3) calc(45.5vw + var(--dots-ext)),
      rgba(0,0,0,0) calc(78vw + var(--dots-ext))) !important;
  }

  /* ==========================================================
     5. MEDIA PAGE  (existing gallery/lightbox kept, made fluid)
     ========================================================== */
  .media-title p2 {
    display: block !important;
    top: 0 !important; left: 0 !important;
    margin: 0 !important;
    padding: clamp(64px, 16vw, 96px) 0 0;
    font-size: clamp(2rem, 9vw, 3.6rem) !important;
    text-align: center !important;
  }
  body.page-media .site-container { padding-top: 0 !important; }
  body.page-media .main-content-wrapper { padding: 0 0 20px !important; }
  .media-gallery {
    max-width: 860px !important;
    width: 92% !important;
    margin: clamp(10px, 3vw, 24px) auto 8vw !important;   /* first number = gap between the filter buttons and the images */
  }
  /* marble background: starts flush at the LEFT edge of the screen.
     "auto 160%" keeps the artwork's own proportions (the old "583% 160%" box
     centred it inside a wider box, which pushed it away from the left edge). */
  body.page-media .main-content-wrapper::before {
    left: 0 !important;
    background-size: auto 160% !important;
    background-position: var(--media-bg-x) -40px !important;   /* x = 0 -> starts at the left edge; negative = shifts further left */
    background-repeat: no-repeat !important;
  }
  /* dots: oversized box so no top/bottom/side edge is ever visible after the tilt */
  body.page-media::before {
    top: -15vh !important; left: -20vw !important;
    width: 140vw !important; height: 140vh !important;
    transform: rotate(8deg) !important;
  }

  /* ==========================================================
     6. MAIL PAGE
     ========================================================== */
  /* card centred in the middle of the screen (any phone height) */
  body.page-mail .container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    box-sizing: border-box !important;
    padding: 80px 0 !important;            /* equal top/bottom keeps it truly centred, clear of the menu */
  }
  .mail-container {
    width: 92% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    flex: 0 1 auto;
  }
  body.page-mail .mail-img {                /* marble reaches both screen edges */
    left: calc(-0.5 * var(--marble-bleed)) !important;
    width: calc(100vw + var(--marble-bleed)) !important;
    max-width: none !important;
  }
  .mail-container h4 { font-size: clamp(1.6rem, 6.5vw, 2.4rem) !important; }
}

/* 3 columns of artwork on larger phones / tablets */
@media (min-width: 640px) and (max-width: 1280px) {
  .media-gallery { column-count: 3 !important; }
}

/* phones: if the home page is shorter than the screen (tall phones like the Z Fold 6),
   the page stretches to full screen height and section-bg stretches with it, so it
   always touches the bottom. The extra space goes into one empty last row. */
@media (max-width: 599px) {
  body.page-home {
    min-height: 100vh !important;
    min-height: 100dvh !important;
    grid-template-rows: auto auto auto auto auto auto auto auto auto auto auto 1fr;
  }
  body.page-home .section-bg { grid-row: 3 / 13; }
}

/* big phones (Pro Max) + tablets: "Sincerely" sits lower so its tilt never covers the bio text */
@media (min-width: 430px) and (max-width: 1280px) {
  body.page-artist .p3 { margin-top: clamp(12px, 4vw, 36px) !important; }
}

/* tablets: artist marble overshoots top and bottom so no blue band shows at the page edges.
   The extra is cropped by the body (overflow hidden), so it adds no scrolling. */
@media (min-width: 600px) and (max-width: 1280px) {
  body.page-artist { overflow-y: hidden !important; }
  body.page-artist .p3 { margin-top: clamp(36px, 6vw, 56px) !important; }   /* a bit lower than phones */
  body.page-artist .marble-bg {
    top: -3vh !important;
    height: calc(100% + 9vh) !important;
  }
}

/* tablets + large screens: bigger intro text, tighter line spacing, more room between social icons */
@media (min-width: 600px) and (max-width: 1280px) {
  body.page-home .mobile-only-text  { line-height: 1.15 !important; }
  body.page-home .mobile-only-text2 {
    font-size: clamp(1.15rem, 2.9vw, 2rem) !important;
    line-height: 1.2 !important;
  }
  body.page-home .mobile-only-text3 {
    font-size: clamp(1rem, 2.4vw, 1.7rem) !important;
    line-height: 1.2 !important;
  }
  body.page-home .sm-link {
    margin: 0 clamp(8px, 1.6vw, 20px) clamp(40px, 8vw, 90px) !important;   /* side margins = space between the icons */
  }
}

/* wider screens: 4 columns of artwork */
@media (min-width: 1000px) and (max-width: 1280px) {
  .media-gallery { column-count: 4 !important; max-width: 1100px !important; }
}

/* tablets + large screens: contact card a bit larger, sized to the screen height, lifted into the centre */
@media (min-width: 700px) and (max-width: 1280px) {
  body.page-mail .container {
    height: auto !important;
    padding: 72px 0 !important;
  }
  body.page-mail .mail-container {
    position: relative !important;
    top: 0 !important; left: auto !important; transform: none !important;
    max-width: clamp(560px, 60vw, 780px) !important;
    margin: 0 auto 10vh !important;           /* bottom margin lifts the card above true centre */
    padding: clamp(20px, 3vh, 36px) 44px !important;
  }
  .mail-container h4 {
    font-size: clamp(2rem, min(4.4vw, 5.2vh), 3.4rem) !important;
    margin-bottom: clamp(8px, 2vh, 20px) !important;
  }
  .mail-container input[type="text"],
  .mail-container textarea {
    font-size: 1.15rem !important;
    padding: clamp(10px, 1.6vh, 14px) 16px !important;
    margin-bottom: clamp(10px, 1.8vh, 18px) !important;
  }
  .mail-container textarea { height: clamp(110px, 17vh, 190px) !important; }
  .mail-container #submit { max-width: 320px !important; font-size: 1.25rem !important; padding: 14px !important; }
}

/* short landscape phones: don't let the fixed background fill become huge */
@media (max-width: 1280px) and (orientation: landscape) and (max-height: 500px) {
  body.page-home .site-title { padding-top: 60px; }
}

/* large tablets / small laptops (900px+): icons closer together, tighter intro line spacing */
@media (min-width: 900px) and (max-width: 1280px) {
  body.page-home .sm-link { margin-left: 4px !important; margin-right: 4px !important; }
  body.page-home .mobile-only-text2 { line-height: 1.05 !important; }
}

/* tablets + large screens, MAIL page: marble + dots reach the bottom, same look as on phones */
@media (min-width: 700px) and (max-width: 1280px) {
  body.page-mail .mail-img {
    top: auto !important;
    bottom: -3vh !important;                  /* anchored just below the screen's bottom edge */
    height: 125vh !important;
    object-fit: cover !important;
    object-position: 50% 100% !important;     /* artwork's bottom edge pinned to the bottom */
  }
  body.page-mail::before {
    --dots-ext: 10vh;                          /* extra length below the screen so the tilt never shows an edge */
    top: -20vh !important; left: -10vw !important;
    width: 120vw !important; height: 130vh !important;
    transform: rotate(5deg) !important;
    -webkit-mask-image: linear-gradient(to top,
      #000 var(--dots-ext),
      rgba(0,0,0,0.7) calc(15.75vh + var(--dots-ext)),
      rgba(0,0,0,0.3) calc(36.75vh + var(--dots-ext)),
      rgba(0,0,0,0) calc(63vh + var(--dots-ext))) !important;
    mask-image: linear-gradient(to top,
      #000 var(--dots-ext),
      rgba(0,0,0,0.7) calc(15.75vh + var(--dots-ext)),
      rgba(0,0,0,0.3) calc(36.75vh + var(--dots-ext)),
      rgba(0,0,0,0) calc(63vh + var(--dots-ext))) !important;
  }
}

/* iPad Pro 13 / Surface Pro 10 / Nest Hub Max: media-page marble.
   Drawn on <body> itself (not inside .main-content-wrapper), so no parent box can shrink it:
   it uses your media-img artwork, pinned to the screen and stretched to the right and bottom edges. */
@media (min-width: 900px) and (max-width: 1280px) {
  body.page-media .media-img { display: none !important; }                       /* the <img> tag itself is replaced by the body copy below (same artwork) */
  body.page-media .main-content-wrapper::before { background-image: none !important; }  /* old wrapper copy */
  body.page-media::after {
    content: "";
    position: fixed;
    top: -2px; left: -2px;
    width: calc(100vw + 4px); height: calc(100vh + 4px); height: calc(100dvh + 4px);
    background-image: url('/images/media-page-marble.webp');
    /* "cover" scales the artwork up until it reaches ALL four edges, cropping whatever
       overflows. (An SVG asked for "100% 100%" keeps its own proportions and leaves empty
       bands, which is why it never reached the right edge / bottom.) */
    background-size: cover;
    background-position: calc(100% + var(--media-img-x)) center;   /* 100% = right edge; add --media-img-x to push it further right */
    background-repeat: no-repeat;
    transform: scaleY(var(--media-img-stretch-y));   /* makes the artwork LONGER so it reaches the top and bottom of the page */
    transform-origin: center center;
    z-index: -3;
    pointer-events: none;
  }
}

/* same three screens, MAIL page: no scrolling (the page is exactly one screen tall) */
@media (min-width: 900px) and (max-width: 1280px) {
  html:has(body.page-mail),
  body.page-mail {
    overflow: hidden !important;
    height: 100vh !important; height: 100dvh !important;
  }
  body.page-mail .container {
    height: 100vh !important; height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
}

/* short wide screens (Nest Hub Max 1280x800): card sits lower, clear of the menu links, and shrinks to fit */
@media (min-width: 1000px) and (max-width: 1280px) and (max-height: 900px) {
  body.page-mail .container { padding: 120px 0 36px !important; }
  body.page-mail .mail-container { margin: 0 auto !important; }
  .mail-container textarea { height: clamp(90px, 14vh, 150px) !important; }
}

/* iPad Pro 13 / Surface Pro 10 / Nest Hub Max: larger menu links with roomier spacing */
@media (min-width: 900px) and (max-width: 1280px) {
  .links-container {
    top: 36px !important;
    gap: clamp(48px, 6vw, 90px) !important;
  }
  .links-container a {
    font-size: clamp(1.9rem, 2.6vw, 2.4rem) !important;
    padding: 8px 4px;
  }
}

/* Nest Hub Max (1280x800, short wide screen) ONLY: media-img starts at the far LEFT of the page */
@media (min-width: 1250px) and (max-width: 1280px) and (max-height: 900px) {
  body.page-media::after {
    background-position: calc(0% + var(--media-img-x-nest)) center;
    transform: scale(var(--media-img-stretch-x-nest), var(--media-img-stretch-y));   /* wider + taller */
    transform-origin: 0% 50%;                  /* left edge stays put; the art grows to the right */
  }
}

/* ==========================================================
   DESKTOP HOME PAGE ADDITIONS (> 1280px)
   - "Design Portfolio" banner text moved to the right
   - floating white "scroll down" arrow
   ========================================================== */

/* the arrow only exists on desktop */
.scroll-hint { display: none; }

@media (min-width: 1281px) {

  /* banner text: pushed to the right end of the pink banner.
     Change margin-right to move it back left (bigger number = further left). */
  .position-title .home-position-title {
    margin-left: auto !important;
    margin-right: 70px !important;
  }

  .scroll-hint {
    display: block;
    position: absolute;                          /* sits inside the pink banner's box, so it follows it */
    left: 50vw;                                   /* centre of the page. For the centre of the banner use: left: 50%; */
    top: calc(100% + var(--scroll-hint-gap, -13px));   /* gap below the banner: raise/lower the -13px */
    width: 68px; height: 68px;
    transform: translateX(-50%);
    z-index: 5000;
    border-radius: 50%;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.4s ease, transform 0.4s ease;
  }
  .scroll-hint:hover { transform: translateX(-50%) scale(1.1); }
  .scroll-hint.is-hidden {                      /* fades away once the visitor scrolls */
    opacity: 0; pointer-events: none;
    transform: translateX(-50%) translateY(24px);
  }

  /* ---- the CodePen arrow (converted from Sass to plain CSS, scaled to fit the disc) ---- */
  .scroll-hint .arrow,
  .scroll-hint .arrow:before {
    position: absolute;
    left: 50%;
  }
  .scroll-hint .arrow {
    width: 24px;
    height: 24px;
    top: 50%;
    margin: -17px 0 0 -12px;                    /* centres the chevron in the disc */
    -webkit-transform: rotate(45deg);
    transform: rotate(45deg);
    border-left: none;
    border-top: none;
    border-right: 2px #742655 solid;
    border-bottom: 2px #742655 solid;
    /* attention glow: a pink halo that pulses (white glow is invisible on your light-blue page) */
    filter: drop-shadow(0 0 6px rgba(236, 93, 112, 0.8))
            drop-shadow(0 0 14px rgba(236, 93, 112, 0.6));
    animation: scroll-hint-glow 1.8s ease-in-out infinite;
  }
  .scroll-hint .arrow:before {
    content: '';
    width: 12px;
    height: 12px;
    top: 50%;
    margin: -6px 0 0 -6px;
    border-left: none;
    border-top: none;
    border-right: 1px #742655 solid;
    border-bottom: 1px #742655 solid;
    animation-duration: 2s;
    animation-iteration-count: infinite;
    animation-name: scroll-arrow;
  }
  @keyframes scroll-hint-glow {
    0%, 100% {
      filter: drop-shadow(0 0 3px rgba(236, 93, 112, 0.55))
              drop-shadow(0 0 8px rgba(236, 93, 112, 0.35));
    }
    50% {
      filter: drop-shadow(0 0 10px rgba(236, 93, 112, 1))
              drop-shadow(0 0 26px rgba(236, 93, 112, 0.85))
              drop-shadow(0 0 40px rgba(244, 139, 161, 0.7));
    }
  }
  @keyframes scroll-arrow {
    0%   { opacity: 1; }
    100% { opacity: 0; transform: translate(-10px, -10px); }
  }
  @media (prefers-reduced-motion: reduce) {
    .scroll-hint .arrow:before, .scroll-hint .arrow { animation: none; }
  }
}

/* ===== REAL-DEVICE FIXES ===== */

/* a) a solid page colour behind everything, so bounce or toolbar gaps never show white */
@media (max-width: 1280px) {
  html {
    overscroll-behavior-y: none;                /* stops the rubber-band bounce on iOS */
  }
}

/* b) media background overshoots the screen top and bottom */
@media (max-width: 899px) {
  body.page-media .main-content-wrapper::before {
    top: -12vh !important;
    bottom: auto !important;
    height: 124vh !important;                       /* fallback */
    height: calc(100lvh + 24vh) !important;         /* lvh = full screen height with toolbars hidden */
    background-size: auto 130% !important;          /* was 160%; reduced so the taller box doesn't enlarge the art */
  }
}

/* iPads in landscape (e.g. 1180x820): simple full-bleed marble */
@media (min-width: 900px) and (max-width: 1249px) and (orientation: landscape) {
  body.page-media::after {
    background-position: right center;
    transform: none;
  }
}

/* media page: give the page its blue back (html stays transparent so the artwork still shows) */
body.page-media { background-color: #dee8eb !important; }

/* make pages at least as tall as the largest visible screen on iPhone */
@media (max-width: 1280px) {
  body { min-height: 100vh !important; min-height: 100lvh !important; }
}
@media (max-width: 599px) {
  body.page-home { min-height: 100lvh !important; }
}

/* mail page (phones): the fixed marble overshoots the screen top and bottom */
@media (max-width: 899px) {
  body.page-mail .mail-img {
    top: -12vh !important;
    height: calc(100lvh + 24vh) !important;
  }
}