/*
Theme Name: Vinay Portfolio
Theme URI: https://github.com/vinayjadhav355-droid/vinay-portfolio-theme
Author: Vinay Jadhav
Description: Lightweight custom portfolio theme for Vinay Jadhav, The Marketer. Dark hero with pill menu, Space Grotesk headings and DM Sans body text.
Version: 1.8.1
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vinay-portfolio
*/

/* Fonts, stored in the theme for speed (latin letters only; both are "variable" fonts covering all weights we use) */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("assets/fonts/space-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Sans"; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url("assets/fonts/dm-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

  /* Layout: one dark stage, pill nav floating on top, headline centred, Vinay's red polygons in the corners, glow rising from the bottom */
  :root {
    --ink: #1A1A1A;        /* page black */
    --ink-deep: #121212;
    --red: #C1121F;        /* brand red */
    --red-dark: #5A1217;   /* nav pill */
    --white: #FFFFFF;
    --muted: rgba(255,255,255,.72);
    --line: rgba(255,255,255,.12);
    --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
    --body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
    color-scheme: dark;
  }
  * { box-sizing: border-box; }
  html, body { background: var(--ink); color: var(--white); }
  body { margin: 0; font-family: var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

  /* ---------- HERO STAGE ---------- */
  .hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    /* Fills the whole screen (Vinay's choice) */
    min-height: 100vh; min-height: 100svh;
    margin-top: calc(-1 * env(safe-area-inset-top, 0px));
    padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
    padding-bottom: clamp(56px, 7vw, 110px);
    display: flex;
    flex-direction: column;
    background: var(--ink);
  }
  .hero__inner {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    width: 100%;
  }

  /* Background art: corner polygons + bottom glow */
  .bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
  .bg::before { /* soft red glow rising from bottom centre */
    content: ""; position: absolute; left: 50%; bottom: -62%;
    width: 110%; height: 120%; transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(193,18,31,.34), rgba(193,18,31,.10) 55%, transparent 75%);
  }
  /* Vinay's own corner polygons */
  .poly { position: absolute; height: 100%; width: auto; max-width: none; display: block; }
  .poly--tl { top: 0; left: 0; }
  .poly--br { bottom: 0; right: 0; }

  /* ---------- HEADER / PILL NAV ---------- */
  .nav-wrap { position: relative; z-index: 5; display: flex; justify-content: center; }
  .nav { pointer-events: auto; transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .45s ease, border-color .45s ease; }
  /* Header comes forward when you point at it */
  @media (hover: hover) {
    .nav:hover {
      transform: translateY(-2px) scale(1.035);
      border-color: rgba(255,255,255,.26);
      box-shadow: 0 22px 60px rgba(0,0,0,.55), 0 0 0 1px rgba(193,18,31,.35), inset 0 1px 0 rgba(255,255,255,.1);
    }
  }
  .nav {
    width: min(100%, 760px);
    display: flex; align-items: center; justify-content: space-between;
    gap: 24px;
    padding: 10px 14px 10px 26px;
    border-radius: 999px;
    background: linear-gradient(100deg, #4A1014 0%, var(--red-dark) 55%, #48121A 100%);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: 0 10px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06);
  }
  .logo { display: flex; align-items: center; line-height: 0; border-radius: 6px; }
  .logo img { height: 40px; width: auto; display: block; }
  .logo__text { font-family: var(--display); font-weight: 700; font-size: 20px; color: var(--white); text-decoration: none; line-height: 1; }
  .nav__links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
  .nav__links a {
    display: block; padding: 10px 14px; border-radius: 999px;
    font-family: var(--body); font-size: 15px; font-weight: 500; letter-spacing: .01em;
    color: var(--white); text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
  }
  .nav__links a:hover { background: rgba(255,255,255,.08); }
  /* letter-drop hover: each letter falls out the bottom while a copy drops in from the top */
  .lbl { display: inline-flex; overflow: hidden; line-height: 1.25; vertical-align: top; }
  .ch { display: inline-block; text-shadow: 0 -1.25em 0 currentColor; transition: transform .45s cubic-bezier(.6,0,.2,1); transition-delay: calc(var(--i) * 28ms); }
  .nav__links a:hover .ch, .nav__links a:focus-visible .ch { transform: translateY(1.25em); }
  .nav__links a[aria-current="page"] { background: rgba(0,0,0,.25); }
  a:focus-visible, button:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }

  .menu-btn {
    display: none; width: 44px; height: 44px; border-radius: 999px; border: 0;
    background: rgba(0,0,0,.25); color: var(--white); cursor: pointer;
    align-items: center; justify-content: center;
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after {
    display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
    position: relative; transition: transform .25s ease, background-color .25s ease;
  }
  .menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; }
  .menu-btn span::before { top: -6px; }
  .menu-btn span::after { top: 6px; }
  .menu-btn[aria-expanded="true"] span { background: transparent; }
  .menu-btn[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

  /* ---------- HEADLINE ---------- */
  .headline-area {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding-block: 24px 0;
  }
  .roles {
    display: inline-flex; align-items: center; gap: 10px;
    margin: 0 0 26px; padding: 8px 16px 8px 14px; border-radius: 999px;
    border: 1px solid rgba(193,18,31,.6); background: rgba(193,18,31,.12);
    color: var(--red); font-family: var(--body); font-weight: 600;
    font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  }
  .roles__dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--red); flex: none; }
  .roles__dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--red); }
  .kicker {
    margin: 0;
    font-family: var(--display); font-weight: 700;
    font-size: clamp(34px, 5.3vw, 68px); line-height: 1.05; letter-spacing: -.01em;
    text-wrap: balance;
  }
  .title {
    margin: .08em 0 0;
    display: flex; align-items: baseline; justify-content: center; gap: .32em;
    font-family: var(--display); font-weight: 700; line-height: .95;
  }
  .title__the { font-size: clamp(34px, 4.8vw, 62px); letter-spacing: -.01em; }
  .title__word {
    font-size: clamp(80px, 15vw, 212px); color: var(--red); letter-spacing: -.035em;
    position: relative; display: inline-flex; align-items: center;
  }
  .mk {
    background: linear-gradient(100deg, var(--red) 0%, var(--red) 38%, #FF5A5F 44%, #FFB3A7 48%, #FF5A5F 52%, var(--red) 58%, var(--red) 100%);
    background-size: 250% 100%; background-position: 100% 0;
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .trend {
    align-self: center;
    width: .36em; height: .36em; margin-left: .12em;
    font-size: clamp(80px, 15vw, 212px);
    border-radius: .09em; background: var(--red);
    display: grid; place-items: center;
    transform: rotate(-6deg) translateY(.06em);
    box-shadow: 0 .06em .2em rgba(193,18,31,.35);
  }
  .trend svg { width: 62%; height: 62%; overflow: visible; }
  .trend .trace { stroke: #8E0A14; stroke-dasharray: 9 60; stroke-dashoffset: 9; }

  .divider { width: min(100%, 860px); height: 1px; background: var(--line); margin: 34px 0 22px; border: 0; }

  .skills {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
    gap: 10px 0;
    font-family: var(--body); font-weight: 500; font-size: clamp(13px, 1.3vw, 16px);
    letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  }
  .skills li { display: flex; align-items: center; }
  .skills li + li::before {
    content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--white);
    margin: 0 clamp(14px, 2.4vw, 30px); flex: none;
  }

  /* ---------- gentle load fade (only animation for now) ---------- */
  @media (prefers-reduced-motion: no-preference) {
    .nav, .kicker, .title, .divider, .skills { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
    .nav { animation-fill-mode: backwards; }
    .kicker { animation-delay: .08s; }
    .title { animation-delay: .16s; }
    .divider { animation-delay: .26s; }
    .skills { animation-delay: .32s; }
    .roles { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
    .roles__dot::after { animation: ping 1.8s ease-out infinite; }
    @keyframes ping { from { transform: scale(1); opacity: .7; } to { transform: scale(2.8); opacity: 0; } }
    .mk:hover { animation: sheen 1.6s ease-in-out infinite; }
    @keyframes sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }
    .trend { animation: wobble 3.2s ease-in-out infinite; }
    @keyframes wobble {
      0%, 100% { transform: rotate(-6deg) translateY(.06em); }
      25% { transform: rotate(-1deg) translateY(.03em); }
      50% { transform: rotate(-9deg) translateY(.07em); }
      75% { transform: rotate(-3deg) translateY(.04em); }
    }
    .trend .trace { animation: trace 2.2s cubic-bezier(.5,0,.3,1) infinite; }
    @keyframes trace { from { stroke-dashoffset: 9; } to { stroke-dashoffset: -60; } }
    @keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  }




  /* ---------- Smoke reveal (laptop/desktop only), driven by assets/js/xray.js ----------
     Inside the smoke the hero flips to brand red with black text. */
  .reveal {
    position: absolute; inset: 0; z-index: 2; padding: inherit;
    display: flex; flex-direction: column; pointer-events: none;
    background: linear-gradient(160deg, #D0182A 0%, var(--red) 45%, #A50E1A 100%);
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    visibility: hidden;
  }
  .reveal.is-on { visibility: visible; }
  .reveal * { animation: none !important; }
  .reveal .kicker, .reveal .title__the, .reveal .skills { color: #111; }
  .reveal .skills li + li::before { background: #111; }
  .reveal .mk { background: none; color: #111; -webkit-text-fill-color: #111; }
  .reveal .trend { background: #111; box-shadow: none; }
  .reveal .trend svg { stroke: var(--red); }
  .reveal .divider { background: rgba(0,0,0,.25); }
  @media (max-width: 760px), (hover: none) { .reveal { display: none; } }

  /* ---------- Red cursor (desktop) ---------- */
  html, body { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M4 2.5 L4 22 L9.2 17.2 L12.6 25 L16.2 23.4 L12.9 15.8 L20 15.8 Z' fill='%23C1121F' stroke='%23fff' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto; }
  a, button, [role="button"], .menu-btn { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Ccircle cx='16' cy='16' r='13' fill='none' stroke='%23C1121F' stroke-width='2'/%3E%3Ccircle cx='16' cy='16' r='4.5' fill='%23C1121F' stroke='%23fff' stroke-width='1.4'/%3E%3C/svg%3E") 16 16, pointer; }
  input, textarea { caret-color: var(--red); }

  /* ---------- WordPress basics (other pages, blog posts) ---------- */
  .site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; pointer-events: none;
    padding-top: calc(env(safe-area-inset-top, 0px) + 22px);
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .hero { padding-top: calc(env(safe-area-inset-top, 0px) + clamp(110px, 10vw, 150px)); }
  /* Keep the menu below the black WordPress admin bar (only shows when you're logged in) */
  .admin-bar .site-header { top: 32px; }
  @media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
  .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
  .skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 10px 16px; background: var(--white); color: var(--ink); border-radius: 8px; }
  .site-main { padding-top: 140px; padding-bottom: 80px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .content { max-width: 720px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: rgba(255,255,255,.86); }
  .content h1, .content h2, .content h3 { font-family: var(--display); color: var(--white); line-height: 1.15; text-wrap: balance; }
  .content h1 { font-size: clamp(34px, 5vw, 56px); margin: 0 0 .4em; }
  .content a { color: var(--red); }
  .content img { height: auto; border-radius: 12px; }
  .entry + .entry { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
  .entry-title a { color: var(--white); text-decoration: none; }
  .entry-meta { font-size: 14px; color: var(--muted); letter-spacing: .04em; }
  .site-footer { padding-block: 28px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    text-align: center; font-size: 14px; color: var(--muted); }

  /* ---------- TABLET / PHONE ---------- */
  @media (max-width: 760px) {
    .nav { padding: 8px 8px 8px 20px; position: relative; }
    .poly { height: 46%; }
    .logo img { height: 36px; }
    .menu-btn { display: inline-flex; }
    .nav__links {
      position: absolute; left: 0; right: 0; top: calc(100% + 10px);
      flex-direction: column; gap: 2px; padding: 10px;
      border-radius: 24px;
      background: linear-gradient(160deg, #4A1014, var(--red-dark));
      border: 1px solid rgba(255,255,255,.14);
      box-shadow: 0 20px 50px rgba(0,0,0,.5);
      opacity: 0; transform: translateY(-6px); visibility: hidden;
      transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    }
    .nav.is-open .nav__links { opacity: 1; transform: none; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
    .nav__links a { padding: 14px 18px; font-size: 17px; border-radius: 16px; }

    .headline-area { padding-block: 16px 0; }
    .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 120px); padding-bottom: 72px; }
    .site-main { padding-top: 120px; }
    .title__the { font-size: clamp(18px, 6.2vw, 40px); }
    .title__word { font-size: clamp(46px, 16vw, 130px); }
    .trend { font-size: clamp(46px, 16vw, 130px); }
    .divider { margin: 28px 0 20px; }
    /* Phone: skills in two rows of two, side by side, so the text can stay big */
    .skills { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 12px 0;
      font-size: clamp(12px, 3.4vw, 15px); letter-spacing: .1em; white-space: nowrap; }
    .skills li:nth-child(odd) { justify-self: end; }
    .skills li:nth-child(3)::before { display: none; }
    .skills li + li::before { margin: 0 clamp(10px, 3vw, 18px); }
  }

  /* ---------- SECTION 2: INTRO (photo + "I am Vinay Jadhav") ----------
     Without JavaScript (or with "reduce motion" on) it simply sits below the hero.
     With JavaScript the hero and intro share one pinned screen, and scrolling
     plays the smoke transition (assets/js/smoke-intro.js sets --p from 0 to 1). */
  .intro {
    position: relative; background: var(--ink); overflow: hidden;
    display: flex; align-items: flex-end;
    padding: clamp(96px, 9vw, 120px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    min-height: 100vh; min-height: 100svh;
  }
  /* Vinay's layout: "I am Vinay Jadhav" left, photo in the middle, "A Digital Marketer" right */
  .intro__inner {
    width: min(100%, 1400px); margin: 0 auto; height: 100%;
    display: grid; grid-template-columns: auto auto auto; justify-content: center;
    align-items: end; gap: 0;
    /* photo height (plain vh first: older phones that don't know svh would otherwise lose the photo) */
    --ph: min(88vh, calc(100vh - 96px), 46vw);
  }
  .intro__photo {
    position: relative; aspect-ratio: 955 / 1017;
    height: var(--ph); width: auto; justify-self: center;
  }
  .intro__photo::before { /* soft red glow behind him, so the black t-shirt stands out from the page */
    content: ""; position: absolute; left: 50%; top: 42%; width: 100%; aspect-ratio: 1; transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(193,18,31,.32), rgba(193,18,31,.1) 60%, transparent 100%);
  }
  /* The cut-out photo: blends into the dark page and fades away at the bottom */
  .intro__cut {
    position: absolute; inset: 0;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, rgba(0,0,0,.5) 78%, transparent 97%);
    mask-image: linear-gradient(to bottom, #000 55%, rgba(0,0,0,.5) 78%, transparent 97%);
  }
  .intro__photo img { position: relative; width: 100%; height: 100%; object-fit: contain; object-position: bottom; display: block; }

  .intro__heading, .intro__role {
    margin: 0; font-family: var(--display); font-weight: 700; line-height: .98; letter-spacing: -.03em;
    /* Staggered like Vinay's mockup: name high beside his face, role lower beside his shoulder */
    align-self: start; padding-top: calc(var(--ph) * .14);
  }
  /* Text hugs the photo, tucking in beside his head like Vinay's mockup */
  .intro__heading { justify-self: end; margin-right: calc(-1 * clamp(20px, 3.2vw, 70px)); position: relative; z-index: 1; }
  .intro__role { justify-self: start; margin-left: clamp(8px, 1vw, 20px); padding-top: calc(var(--ph) * .5) !important; position: relative; z-index: 1; }
  .intro__iam, .intro__a { display: block; font-size: clamp(22px, 2.1vw, 40px); letter-spacing: -.01em; margin-bottom: .2em; }
  .intro__iam { color: var(--red); }
  .intro__a { color: var(--white); }
  .intro__name, .intro__mk { display: block; font-size: clamp(44px, 4.6vw, 92px); }
  .intro__mk { color: var(--red); }
  .intro__name .intro__w { display: block; }

  /* Pinned scene (turned on by JavaScript) */
  /* --tail: extra scroll at the end, while Featured Work slides up over the pinned intro */
  :root { --tail: 100vh; }
  @supports (height: 1svh) { :root { --tail: 100svh; } }
  .scene.is-live { height: calc(330vh + var(--tail)); position: relative; }
  .scene.is-live.is-lite { height: calc(230vh + var(--tail)); }
  .scene.is-live .scene__pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
  .scene.is-live .hero { height: 100%; min-height: 0; }
  .scene.is-live .intro { position: absolute; inset: 0; background: transparent; pointer-events: none; }
  .scene.is-live .intro.is-on { pointer-events: auto; }
  .smoke-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }

  /* What fades in and out as you scroll (--p goes 0 to 1) */
  .scene.is-live { --hero-a: 1; --bg-a: 1; --photo-a: 0; --name-a: 0; --line-a: 0; }
  .scene.is-live .hero__inner { opacity: var(--hero-a); }
  .scene.is-live .hero .bg { opacity: var(--bg-a); }
  .scene.is-live .intro__photo { opacity: var(--photo-a); transform: scale(calc(.96 + var(--photo-a) * .04)); }
  /* After the smoke forms the photo: name slides in from the left, role from the right */
  .scene.is-live .intro__heading { opacity: var(--name-a); transform: translateX(calc((1 - var(--name-a)) * -60px)); }
  .scene.is-live .intro__role { opacity: var(--line-a); transform: translateX(calc((1 - var(--line-a)) * 60px)); }

  /* Phones and tablets: lighter smoke fade (no particles), CSS only */
  .smoke-lite { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: var(--smoke-a, 0); }
  .smoke-lite i {
    position: absolute; width: 90vw; aspect-ratio: 1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(193,18,31,.5), rgba(193,18,31,.14) 55%, transparent 100%);
    transform: translate(-50%, -50%) scale(var(--s, 1));
  }
  .smoke-lite i:nth-child(1) { left: 30%; top: calc(30% + var(--p, 0) * 30%); --s: calc(.6 + var(--p, 0) * 1.1); }
  .smoke-lite i:nth-child(2) { left: 72%; top: calc(48% + var(--p, 0) * 10%); --s: calc(.5 + var(--p, 0) * 1.3); }
  .smoke-lite i:nth-child(3) { left: 50%; top: calc(70% - var(--p, 0) * 30%); --s: calc(.4 + var(--p, 0) * 1.2); }
  .is-lite .hero__inner { transform: translateY(calc((1 - var(--hero-a)) * -40px)) scale(calc(.94 + var(--hero-a) * .06)); }

  @media (max-width: 760px) {
    /* Phones: photo on top, text stacked below */
    .intro { padding-top: calc(env(safe-area-inset-top, 0px) + 96px); padding-bottom: 32px; align-items: flex-start; }
    .intro__inner { grid-template-columns: 1fr; gap: 10px; text-align: center; justify-items: center; align-items: start; align-content: start; height: auto; }
    .intro__photo { order: -1; height: min(50vh, 108vw); }
    .intro__heading, .intro__role { justify-self: center; padding: 0 !important; margin: 0; }
    .intro__name .intro__w { display: inline-block; }
    .intro__iam, .intro__a { font-size: clamp(18px, 5.4vw, 26px); }
    .intro__name { font-size: clamp(40px, 12vw, 64px); }
    .intro__role { display: flex; gap: .3em; align-items: baseline; font-size: clamp(22px, 6.6vw, 32px); }
    .intro__a, .intro__mk { display: inline; font-size: inherit; margin: 0; }
  }
  .scene.is-live .reveal { opacity: var(--hero-a); }

  /* ---------- Intro photo hover: 3D tilt + red/white glitch (assets/js/photo-fx.js, laptops only) ---------- */
  .intro__photo.has-fx .intro__cut { transform-style: preserve-3d; will-change: transform; transition: none; }
  .glitch {
    position: absolute; inset: 0; pointer-events: none; opacity: 0;
    -webkit-mask: var(--photo) bottom / contain no-repeat; mask: var(--photo) bottom / contain no-repeat;
    mix-blend-mode: screen;
  }
  /* Each glitch slice is a shifted copy of the photo: one tinted brand red, one bright white */
  .glitch--r { background: var(--photo) bottom / contain no-repeat, var(--red); background-blend-mode: multiply; }
  .glitch--w { background: var(--photo) bottom / contain no-repeat; filter: grayscale(1) brightness(1.9) contrast(1.2); mix-blend-mode: screen; }

  /* Newer browsers: use the "small viewport" height so phone address bars don't crop anything */
  @supports (height: 1svh) {
    .intro__inner { --ph: min(88vh, calc(100svh - 96px), 46vw); }
    @media (max-width: 760px) { .intro__photo { height: min(50svh, 108vw); } }
  }
  /* Stop sideways scrolling without turning the page into its own scroll box
     (some phone browsers can't pin the intro screen when that happens) */
  @supports (overflow-x: clip) { body { overflow-x: clip; } }
  /* Phones: shorter scroll for the smoke, so the intro arrives sooner */
  @media (max-width: 760px) { .scene.is-live { height: calc(260vh + var(--tail)); } }

  /* ---------- SECTION 3: FEATURED WORK ----------
     Three big words. Hover one (tap on phones) and a red panel grows out from behind it,
     with a sliding row of screenshots and a "View Projects" button (assets/js/featured-work.js). */
  .fw {
    position: relative;
    padding: clamp(72px, 9vw, 150px) max(16px, env(safe-area-inset-right, 0px)) clamp(80px, 10vw, 160px) max(16px, env(safe-area-inset-left, 0px));
    background: var(--ink);
  }
  /* Featured Work slides up over the intro, which stays still and sinks back a little */
  .scene.is-live + .fw {
    margin-top: calc(-1 * var(--tail)); z-index: 5;
    border-radius: clamp(24px, 3vw, 44px) clamp(24px, 3vw, 44px) 0 0;
    box-shadow: 0 -24px 60px rgba(0,0,0,.55);
  }
  .scene.is-live .scene__pin > * { transform-origin: 50% 30%; }
  .scene.is-live .intro { transform: scale(calc(1 - var(--cover, 0) * .06)); opacity: calc(1 - var(--cover, 0) * .6); }
  /* Keep the intro and Featured Work on their own GPU layers so the slide-over stays smooth */
  .scene.is-live .intro.is-on { will-change: transform, opacity; }
  .scene.is-live + .fw { will-change: transform; }
  .fw__title {
    margin: 0 0 clamp(28px, 3.4vw, 56px); text-align: center;
    font-family: var(--display); font-weight: 600; letter-spacing: -.01em;
    font-size: clamp(22px, 2.2vw, 38px); color: var(--white);
  }
  .fw__title span { color: var(--red); }
  .fw__list { max-width: 1240px; margin: 0 auto; contain: layout style; }

  .fw__item {
    --pad: clamp(22px, 3.4vw, 52px);
    --ease: cubic-bezier(.22, .8, .2, 1);
    position: relative; isolation: isolate;
    transition: margin .4s var(--ease);
  }
  .fw__item.is-open { margin-block: clamp(8px, 1.2vw, 18px); }
  /* The red panel itself: hidden as a small pill behind the word, grows to full size */
  .fw__item::before {
    content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 28px;
    background:
      radial-gradient(120% 90% at 15% 0%, rgba(255,255,255,.12), transparent 55%),
      linear-gradient(180deg, #C1121F 0%, #9E0F1A 55%, #6F0A13 100%);
    clip-path: inset(18% 30% 18% 30% round 999px);
    will-change: clip-path;
    opacity: 0;
    transition: clip-path .4s var(--ease), opacity .3s ease;
  }
  .fw__item.is-open::before { clip-path: inset(0 0 0 0 round 28px); opacity: 1; }
  /* Thin divider lines between the words (hidden around the open panel) */
  .fw__item + .fw__item::after {
    content: ""; position: absolute; top: 0; left: 50%; width: clamp(180px, 32vw, 470px); height: 1px;
    transform: translateX(-50%); background: var(--line); transition: opacity .3s ease;
  }
  .fw__item.is-open::after, .fw__item.is-open + .fw__item::after { opacity: 0; }
  .fw__item.is-open + .fw__item, .fw__item:has(+ .is-open) { z-index: 0; }

  .fw__head {
    position: relative; display: flex; align-items: center;
    padding: clamp(6px, .9vw, 14px) var(--pad);
    transition: padding .4s var(--ease);
  }
  .fw__item.is-open .fw__head { padding-top: calc(var(--pad) * .8); padding-bottom: clamp(14px, 1.6vw, 24px); }
  .fw__h { margin: 0; font: inherit; }
  .fw__word {
    all: unset; cursor: inherit; position: relative; display: inline-block;
    font-family: var(--display); font-weight: 700; letter-spacing: -.02em; line-height: 1.12;
    font-size: clamp(40px, 6.4vw, 104px); color: var(--white);
    transform: translateX(var(--fw-shift, 0px));
    transition: transform .4s var(--ease), color .25s ease;
  }
  .fw:not(.is-ready) .fw__word { transition: none; }
  .fw__item.is-open .fw__word { transform: none; }
  .fw__item:not(.is-open) .fw__word:hover { color: var(--red); }
  .fw__word:focus-visible { outline: 2px solid var(--white); outline-offset: 6px; border-radius: 8px; }
  /* "View Projects" pill: white with red text; fills black on hover and the arrow slides */
  .fw__cta {
    position: absolute; right: var(--pad); top: 50%;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 18px 14px 24px; border-radius: 999px;
    background: var(--white); color: var(--red); text-decoration: none;
    font-family: var(--body); font-weight: 600; font-size: clamp(14px, 1.05vw, 17px); white-space: nowrap;
    opacity: 0; visibility: hidden; transform: translate(14px, -50%);
    transition: opacity .3s ease, transform .45s var(--ease), visibility 0s linear .3s, background-color .25s ease, color .25s ease;
  }
  .fw__item.is-open .fw__cta { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .3s ease .08s, transform .4s var(--ease) .08s, background-color .25s ease, color .25s ease; }
  .fw__arrow { width: 18px; height: 18px; transition: transform .3s var(--ease); }
  .fw__cta:hover, .fw__cta:focus-visible { background: var(--ink); color: var(--white); }
  .fw__cta:hover .fw__arrow, .fw__cta:focus-visible .fw__arrow { transform: translateX(5px); }
  /* Letter drop on hover, same as the menu links */
  .fw__cta:hover .ch, .fw__cta:focus-visible .ch { transform: translateY(1.25em); }
  .fw__cta:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }

  /* Panel body: opens smoothly to its natural height */
  .fw__panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
  .fw__item.is-open .fw__panel { grid-template-rows: 1fr; }
  .fw__panel-in { min-height: 0; overflow: hidden; }
  .fw__marquee {
    padding: 12px 0 calc(var(--pad) * .9);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    opacity: 0; transform: translateY(16px);
    transition: opacity .3s ease, transform .5s var(--ease);
  }
  .fw__item.is-open .fw__marquee { opacity: 1; transform: none; transition: opacity .25s ease, transform .4s var(--ease); }
  .fw__track {
    will-change: transform;
    --gap: clamp(14px, 1.6vw, 24px);
    display: flex; gap: var(--gap); width: max-content; margin: 0; padding: 0 0 0 var(--pad); list-style: none;
  }
  .has-marquee .fw__track { padding-left: 0; animation: fw-slide var(--fw-dur, 40s) linear infinite; animation-play-state: paused; }
  .fw__item.is-open.has-marquee .fw__track { animation-play-state: running; }
  .fw__item.is-open .fw__marquee:hover .fw__track { animation-play-state: paused; }
  @keyframes fw-slide { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

  /* Cards */
  .fw__card { position: relative; flex: none; width: clamp(230px, 25vw, 340px); transition: transform .35s var(--ease); }
  .fw__shot {
    position: relative; display: block; overflow: hidden; border-radius: 10px;
    aspect-ratio: 760 / 361; background: #2a0b0e;
  }
  .fw__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
  .fw__cap {
    position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 28px 14px 12px;
    border-radius: 0 0 10px 10px;
    background: linear-gradient(transparent, rgba(10,10,10,.88));
    font-size: 13px; line-height: 1.3; color: rgba(255,255,255,.8);
    opacity: 0; transform: translateY(6px); transition: opacity .3s ease, transform .3s var(--ease);
    pointer-events: none;
  }
  .fw__cap strong { display: block; font-family: var(--display); font-size: 15px; font-weight: 600; color: var(--white); }
  @media (hover: hover) {
    .fw__card:hover { transform: translateY(-8px) scale(1.02); }
    .fw__card:hover .fw__cap { opacity: 1; transform: none; }
  }
  @media (hover: none) { .fw__cap { opacity: 1; transform: none; } }

  /* Social Media: tall, phone-shaped posts and reels */
  .fw__item--social .fw__card { width: clamp(118px, 10.5vw, 156px); }
  .fw__item--social .fw__shot, .fw__item--social .fw__cap { border-radius: 18px; }
  .fw__item--social .fw__shot { aspect-ratio: 9 / 16; }
  .fw__item--social .fw__cap { border-radius: 0 0 18px 18px; }

  /* Paid Ads: ad creatives (1.91:1, the standard link-ad size) */
  .fw__item--ad .fw__shot { aspect-ratio: 1.91 / 1; }
  .fw__item--ad .fw__shot img { object-position: center; }

  /* Placeholders (until the real pictures arrive) */
  .fw__ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.9); }
  .is-ph--1 .fw__shot { background: linear-gradient(160deg, #262626, #121212); }
  .is-ph--2 .fw__shot { background: linear-gradient(160deg, #F4F1EC, #D9D2C7); }
  .is-ph--2 .fw__ph { color: var(--ink); }
  .is-ph--3 .fw__shot { background: linear-gradient(160deg, #3A0A0F, #140406); }
  .fw__ph-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 8px; }
  .fw__ph-top i { width: 22px; height: 22px; border-radius: 50%; background: currentColor; opacity: .35; }
  .fw__ph-top b, .fw__ph-bars b { display: block; height: 6px; border-radius: 4px; background: currentColor; opacity: .25; }
  .fw__ph-top b { width: 44%; }
  .fw__ph-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 20px; opacity: .7; }
  .fw__ph-bars { position: absolute; left: 12px; right: 12px; bottom: 54px; display: grid; gap: 6px; }
  .fw__ph-bars b:last-child { width: 60%; }
  .fw__item--social .fw__cap { opacity: 1; transform: none; background: linear-gradient(transparent, rgba(10,10,10,.6)); }
  .fw__item--social .is-ph--2 .fw__cap { background: linear-gradient(transparent, rgba(0,0,0,.08)); color: rgba(26,26,26,.7); }
  .fw__item--social .is-ph--2 .fw__cap strong { color: var(--ink); }
  .fw__ph-brand { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.02em; }
  .fw__ph-cta { padding: 6px 14px; border-radius: 999px; border: 1px solid currentColor; font-size: 12px; font-weight: 600; opacity: .8; }

  /* Phones and tablets: tap a word to open it; the button becomes a round arrow */
  @media (max-width: 760px) {
    .fw__item { --pad: 18px; }
    .fw__item::before, .fw__item.is-open::before { border-radius: 22px; }
    .fw__item.is-open::before { clip-path: inset(0 0 0 0 round 22px); }
    .fw__word { font-size: clamp(34px, 10vw, 56px); }
    .fw__cta { width: 46px; height: 46px; padding: 0; justify-content: center; }
    .fw__cta-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .fw__card { width: min(72vw, 280px); }
    .fw__item--social .fw__card { width: min(38vw, 160px); }
    .fw__marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
  }

  /* "Reduce motion" turned on: no sliding; the row can be swiped instead */
  @media (prefers-reduced-motion: reduce) {
    .fw__item::before, .fw__word, .fw__panel, .fw__marquee, .fw__cta, .fw__card { transition-duration: .01s !important; transition-delay: 0s !important; }
    .fw__marquee { overflow-x: auto; }
  }
