/* Home v2: motion layer on top of the matched home page.
   Same content and brand tokens; only layout of the works section and the
   motion change. Every effect states its purpose next to it. */
:root{
  --ease-out-strong:cubic-bezier(.23,1,.32,1);
  --ease-io:cubic-bezier(.77,0,.175,1);
}
/* Lenis drives wheel scrolling; native smooth-scroll would fight it. */
html.lenis,html.lenis body{height:auto}
html.lenis{scroll-behavior:auto}
.lenis.lenis-stopped{overflow:hidden}

/* Split text: letters sit in a clipping line so they rise from behind
   the baseline instead of fading in from nowhere. */
.split-line{display:inline-block;overflow:clip;overflow-clip-margin:.12em;vertical-align:top;padding-bottom:.06em}
.split-ch{display:inline-block;will-change:transform}

/* Hero name: letters react to the pointer (invites play, shows the page is
   alive before the first scroll). */
.hero-name .hn-word{display:inline-block;white-space:nowrap}
.hero-name .sc{display:inline-block}
.hero-name .split-ch{transition:color .3s ease}
@media (hover:hover) and (pointer:fine){.hero-name .split-ch:hover{color:var(--text)}}
.hero .badge-tilt{touch-action:none;-webkit-user-select:none;user-select:none}
.hero .badge-img{-webkit-user-drag:none}
.hero .badge-tilt.dragging .badge-img{cursor:grabbing}
.hero .badge-img{cursor:grab}

/* ---------- Spacing rhythm ----------
   The matched page carries Framer's 300-344px gaps. With the hero name
   leaving on scroll, that read as an empty screen; tighten the hero-to-stats
   and stats-to-works joins, keep the generous gaps between the big chapters. */
.experience{margin-top:200px}
@media (max-width:1379.98px){.experience{margin-top:160px}}
@media (max-width:809.98px){.experience{margin-top:96px}}

/* Owner override (2026-11-26): white text stays on the orange buttons and
   card, although it is 2.3:1 against #FF9019 (WCAG AA asks 4.5:1). */

/* ---------- Featured works: the plain 2-column grid ----------
   All four works are visible at once, so there is nothing to scroll past to
   compare them. Hover keeps the work visible (the old 0.2 opacity hid the
   very thing the cursor invites you to open); the media leans in instead. */
.work-visual:hover .work-media{opacity:1}
/* The mask makes Safari/iOS clip videos to the rounded corners; without it the
   radius stops clipping while the card is transformed (entrance scale). */
.work-visual{display:block;transform:translateZ(0);-webkit-mask-image:-webkit-radial-gradient(white,black);mask-image:radial-gradient(white,black)}
.work-media{transition:transform .6s var(--ease-out-strong)}
@media (hover:hover) and (pointer:fine){
  .work-visual:hover .work-media{transform:scale(1.04)}
}
/* Only the media and the button link to the case study (2026-11-27): the card itself filled the screen, so a trackpad tap or force click while scrolling opened the project. */

/* Skill cards 2 and 3 (were .tilt): same layout without the tilt class. */
.skill-card[data-tilt]{justify-content:space-between;gap:0}
.skill-card[data-tilt] .skill-title img{width:44px;height:44px}
.skill-card{transform-origin:50% 0;transition:none}
@media (max-width:809.98px){
  .skill-card[data-tilt]{gap:24px}
  .skill-card[data-tilt] .skill-title img{width:27px;height:27px}
}

/* Tools: icons lift on hover (tactile, tells you each is a thing). */
.tools-icons img{transition:transform .35s var(--spring)}
@media (hover:hover) and (pointer:fine){.tools-icons img:hover{transform:translateY(-6px) rotate(-6deg)}}


/* ---------- Pointer ----------
   The cursor (32px glass dot) and the click spark are shared: styles.css
   and app.js, so every page gets both. */

/* ---------- Experience figures ----------
   Each figure sits in a clipping line and rises out of it once. */
.exp-num{display:inline-block}
.exp-line{display:inline-block;overflow:clip;overflow-clip-margin:.1em;vertical-align:top}
.exp-in{display:inline-block}

/* ---------- First-visit entrance ----------
   The black stage covers the page; the hero text is lifted above it until
   it has glided into place. While held, the hero copy and badges keep their
   start state so their own transitions play when the stage lifts. */
.intro-veil{position:fixed;inset:0;z-index:150;background:var(--bg)}
.hero-text.intro-lift{z-index:160}
/* The hero video sits above the stage as the circle, then expands into place. */
.hero-video-wrap.intro-lift{z-index:155}
.intro-ring{position:fixed;border-radius:50%;border:1px solid rgba(255,255,255,.22);background:#141414;pointer-events:none;z-index:2}
.hero-hi .split-line{overflow:clip}
.hi-w{display:inline-block}
html.intro-hold .hero .mount.in{opacity:0;transform:translateY(40px)}
html.intro-hold .hero .badge-tilt.in{transform:rotate(var(--r)) perspective(1200px) rotateY(-180deg)}
/* While the video expands above the stage, the badges and copy sit above it
   too, so they can land during the move instead of being sliced by its edge. */
.hero-video-wrap.intro-lift ~ .badge-tilt,.hero-video-wrap.intro-lift ~ .hero-copy{z-index:157}
html.intro-hold .hero .badge-tilt{visibility:hidden}


/* ---------- Hero badges ----------
   Clicks flip them in 3D from JS, so the flat hover rotate goes. The focus
   ring follows the circle and only shows for keyboard focus. */
html.v2-motion .hero .badge-img:hover{transform:none}
.badge-img:focus-visible{outline:2px solid var(--accent);outline-offset:4px;border-radius:50%}
.badge-img:focus:not(:focus-visible){outline:none}

/* ---------- Work history card (Framer "Work Experience Card") ----------
   One glass card (rgba(50,49,57,.7), 4px blur) with the shared card outline.
   The narrower card that peeked out below it was removed (owner, 2026-11-27).
   The blur stays on its own layer. */
html .history-card{background:none;-webkit-backdrop-filter:none;backdrop-filter:none;isolation:isolate}
.history-card::before{content:"";position:absolute;inset:0;z-index:-1;border-radius:inherit;background:rgba(50,49,57,.7);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}

/* ---------- Entrance: the big "HI!" ---------- */
.intro-hi{position:absolute;inset:0;display:grid;place-items:center;margin:0;font-family:var(--display);font-size:clamp(56px,13vw,220px);white-space:nowrap;line-height:1;letter-spacing:-.02em;text-transform:uppercase;color:var(--text)}
.intro-hi .split-line{overflow:clip}
.intro-hi-in{display:inline-block}
.intro-hi > span{display:block}

/* ---------- Featured works: one project per screen ----------
   Each project fills one screen: the media on the left at the original
   542:362 ratio, and on the right the year, title, three result cards
   (styled as on the case study pages) and "View case study". */
html.v2-motion .works-v2 .works-grid{display:block;margin-top:0;padding:0}
html.v2-motion .works-v2 .work-card{min-height:100svh;display:grid;grid-template-columns:minmax(0,6fr) minmax(0,4fr);align-content:center;align-items:stretch;gap:48px;width:100%;padding:110px 0 40px}
/* The details column is as tall as the media: year at its top edge, button
   at its bottom edge, flexible space between (Framer: Fill). */
html.v2-motion .works-v2 .work-info{display:flex;flex-direction:column;align-items:flex-start;gap:28px;min-width:0}
html.v2-motion .works-v2 .work-info .view-projects.btn{margin-top:auto}
html.v2-motion .works-v2 .year-pill{position:static}
html.v2-motion .works-v2 .work-title{margin-top:-12px;font-size:26px;line-height:1.4;text-wrap:balance}
.work-stats{display:flex;gap:12px;width:100%}
.work-stat{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;gap:6px;padding:22px 14px;border-radius:28px;background:var(--panel,#262529)}
.work-stat-num{display:flex;align-items:center;gap:4px;font-family:var(--display);font-size:28px;line-height:1.2;color:var(--accent)}
.work-stat-num svg{width:26px;height:26px;flex:none}
/* Role and scope use the case study pages' .cs-label / .cs-body sizes (16px, 13px below desktop). */
.work-meta{display:flex;flex-direction:column;gap:12px;margin:0}
.work-meta dt{font-family:var(--display);font-size:16px;line-height:1.6;letter-spacing:-.02em;text-transform:uppercase;color:var(--accent)}
.work-meta dd{margin:0;font-size:16px;line-height:1.6;letter-spacing:-.02em;color:var(--text)}
.work-stat-num .up{color:#34C759}
.work-stat-num .down{color:#FF383C}
.work-stat p{margin:0;font-size:14px;font-weight:700;line-height:1.4;letter-spacing:-.02em;text-wrap:balance;color:#fff}
/* "View case study" is the white secondary button (Framer Button-secondary).
   It lifts only under the pointer itself: lifting on card hover made it bob
   as cards scrolled under a resting cursor. */
html.v2-motion .works-v2 .view-projects.btn{color:rgba(0,0,0,.8);gap:10px}
@media (hover:hover) and (pointer:fine){html.v2-motion .works-v2 .work-card .view-projects.btn:hover{translate:0 -4px;box-shadow:0 10px 0 0 var(--shadow-grey)}}
/* A minimum, not a fixed height: when the details run taller (Big Guts), the media
   stretches to the row so both columns end level. */
html.v2-motion .works-v2 .work-visual{order:-1;width:100%;min-height:clamp(360px,calc(100svh - 220px),680px)}
.work-index{display:none}
/* Work card variants (component options). Default: media left, details right
   (60/40), as above. .is-media-top: media above the details at full width,
   the layout from the first home v2 pass, for media that reads better wide.
   The details column keeps the same order and spacing in both. */
html.v2-motion .works-v2 .work-card.is-media-top{grid-template-columns:minmax(0,1fr);gap:28px}
html.v2-motion .works-v2 .work-card.is-media-top .work-visual{min-height:0;height:max(320px,calc(100svh - 440px))}
html.v2-motion .works-v2 .work-card.is-media-top .work-info .view-projects.btn{margin-top:4px}
@media (max-width:809.98px){html.v2-motion .works-v2 .work-card.is-media-top .work-visual{height:auto}}
/* The design-system card is a page screenshot: show it from the top left. */
.work-visual[href="case-study-design-system/index.html"] .work-media>img{object-position:left top}
/* Big Guts: crop from the top right, so the logo keeps the same inset at every size. */
.work-visual[href="bigguts-page.html"] .work-media>img{object-position:right top}
@media (max-width:1379.98px){
  html.v2-motion .works-v2 .work-card{gap:40px}
  html.v2-motion .works-v2 .work-info{gap:20px}
  html.v2-motion .works-v2 .work-title{font-size:24px}
  .work-stats{gap:10px}
  .work-stat{padding:14px 10px;border-radius:22px;gap:4px}
  .work-stat-num{font-size:20px}
  .work-stat-num svg{width:18px;height:18px}
  .work-stat p{font-size:11px}
  .work-meta{gap:8px}
  .work-meta dt,.work-meta dd{font-size:13px}
}
@media (max-width:809.98px){
  html.v2-motion .works-v2 .work-card{min-height:0;grid-template-columns:1fr;gap:20px;padding:32px 0}
  html.v2-motion .works-v2 .work-visual{min-height:0;aspect-ratio:542/362}
  html.v2-motion .works-v2 .work-info .view-projects.btn{margin-top:4px}
  html.v2-motion .works-v2 .work-info{gap:14px}
  html.v2-motion .works-v2 .work-title{margin-top:0;font-size:18px}
  .work-stat{padding:14px 8px}
  .work-stat-num{font-size:18px}
  .work-stat-num svg{width:16px;height:16px}
  .work-stat p{font-size:10px}
}


/* ---------- About: hover peeks (thakursameershetty.com resume peek) ----------
   Hovering a button lifts a preview of where it goes out of it: it rises
   16px, grows from 0.92 and tilts -3deg on a slight overshoot. */
.peek-wrap{position:relative;flex:1;display:flex}
/* Both about buttons take exactly half of the row less half the 16px gap. Fixed, not
   grown or shrunk: flexbox weights both by width minus padding, and only the orange
   button has its own padding (the resume one sits in a wrapper). */
.about-buttons > .btn,.about-buttons > .peek-wrap{flex:0 0 calc(50% - 8px);min-width:0}
.peek-wrap .btn{flex:1}
.peek{position:absolute;z-index:5;left:-8px;bottom:calc(100% + 18px);width:140px;border-radius:4px;overflow:hidden;background:#fff;opacity:0;pointer-events:none;transform-origin:30% 100%;transform:translateY(16px) scale(.92);transition:opacity .18s,transform .36s cubic-bezier(.34,1.3,.64,1);box-shadow:0 24px 48px rgba(0,0,0,.5)}
.peek img{display:block;width:100%;height:auto}
@media (hover:hover) and (pointer:fine){
  .peek-wrap:hover .peek,.peek-wrap:has(:focus-visible) .peek{opacity:1;transform:translateY(0) rotate(-3deg) scale(1)}
}
@media (max-width:1379.98px){.peek{width:110px}}

@media (prefers-reduced-motion:reduce){
  .peek{transition:opacity .15s;transform:none}
  .work-media,.tools-icons img,.rb-arm,.rb-fill,.rb-a3 span{transition:none}
  .work-visual:hover .work-media{transform:none}
}
