/* ==================================================================
   Himanshu Laddhad — portfolio
   Formal blue + white. Space Grotesk + Inter + JetBrains Mono.
   ================================================================== */

:root{
  --paper:#f8fafc;
  --paper-2:#eef2f7;
  --card:#ffffff;
  --ink:#1b2430;
  --ink-2:#475569;
  --ink-3:#5d6c81;
  --rule:#e2e8f0;
  --rule-2:#edf1f6;
  --accent:#1e4fd8;
  --accent-deep:#1739a8;
  --accent-wash:rgba(30,79,216,.08);
  --midnight:#0f172a;
  --focus:#1e4fd8;

  --display:"Space Grotesk","Inter",system-ui,sans-serif;
  --sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"JetBrains Mono",ui-monospace,monospace;

  --gutter:clamp(1.5rem,4vw,4.5rem);
  --measure:64ch;
  --ease:cubic-bezier(.16,1,.3,1);
}

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

html{-webkit-text-size-adjust:100%}

body{
  background:var(--paper);
  color:var(--ink);
  font-family:var(--sans);
  font-size:1rem;
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  min-height:100dvh;
}

/* ---- browser surfaces ------------------------------------------- */
::selection{background:var(--accent);color:#fff}
:focus-visible{outline:2px solid var(--focus);outline-offset:3px;border-radius:2px}
:focus:not(:focus-visible){outline:none}
html{scrollbar-color:#cbd5e1 transparent;scrollbar-width:thin}
::-webkit-scrollbar{width:11px;height:11px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:99px;border:3px solid var(--paper)}
::-webkit-scrollbar-thumb:hover{background:#94a3b8}

img{max-width:100%;display:block}
a{color:inherit}

/* ---- typography -------------------------------------------------- */
h1,h2,h3,h4{font-family:var(--display);font-weight:700;letter-spacing:-.03em;line-height:1.06;text-wrap:balance}
h1{font-size:3.5rem;font-size:clamp(2.6rem,6.2vw,4.75rem)}
h2{font-size:2.25rem;font-size:clamp(1.9rem,3.6vw,2.75rem)}
h3{font-size:1.5625rem;font-size:clamp(1.25rem,1.8vw,1.5625rem);line-height:1.25}
p{max-width:var(--measure)}

.num{font-family:var(--mono);font-size:.92em;font-weight:500;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.date{font-family:var(--mono);font-size:.8rem;letter-spacing:.02em;color:var(--ink-3);font-variant-numeric:tabular-nums}

/* ================= PILL NAVIGATION =============================== */
.nav{position:fixed;inset:0 0 auto 0;z-index:80;padding:1rem var(--gutter);pointer-events:none}
.nav-pill{
  max-width:calc(var(--measure) + 22rem);margin:0 auto;
  display:flex;align-items:center;gap:1.25rem;pointer-events:auto;
  padding:.5rem .5rem .5rem .75rem;border-radius:999px;
  background:rgba(255,255,255,.82);backdrop-filter:blur(10px);
  border:1px solid var(--rule);
  box-shadow:0 1px 2px rgba(15,23,42,.04);
  transition:box-shadow .3s var(--ease),background .3s var(--ease);
}
.nav.scrolled .nav-pill{background:rgba(255,255,255,.94);box-shadow:0 6px 24px rgba(15,23,42,.09)}

.nav-brand{display:flex;align-items:center;gap:.55rem;text-decoration:none;flex-shrink:0}
.nav-avatar{width:2rem;height:2rem;border-radius:50%;object-fit:cover;border:1px solid var(--rule);background:var(--paper-2);transition:transform .3s var(--ease)}
.nav-brand:hover .nav-avatar{transform:scale(1.08)}
.nav-mark{font-family:var(--display);font-weight:700;font-size:1rem;letter-spacing:-.02em}

.nav-links{display:flex;align-items:center;gap:.15rem;margin:0 auto}
.nav-links a{
  position:relative;text-decoration:none;font-size:1rem;color:var(--ink-2);
  padding:.42rem .85rem;border-radius:999px;white-space:nowrap;
  transition:color .2s var(--ease),background .2s var(--ease);
}
.nav-links a:hover{color:var(--ink);background:var(--paper-2)}
.nav-links a[aria-current="true"],.nav-links a[aria-current="page"]{color:#fff;background:var(--accent);font-weight:500}

.nav-end{display:flex;align-items:center;gap:.5rem;flex-shrink:0}
.nav-cv{
  display:inline-flex;align-items:center;gap:.4rem;
  background:var(--ink);color:#fff;text-decoration:none;
  font-size:1rem;font-weight:500;padding:.45rem 1rem;border-radius:999px;
  transition:background .2s var(--ease),transform .15s var(--ease);
}
.nav-cv:hover{background:var(--accent-deep)}
.nav-cv:active{transform:scale(.97)}
.nav-cv svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.7}

.burger{display:none;background:none;border:0;cursor:pointer;padding:.55rem;flex-direction:column;gap:4.5px}
.burger span{display:block;width:19px;height:1.5px;background:var(--ink);border-radius:1px;transition:transform .3s var(--ease),opacity .2s var(--ease)}
.nav-scrim{display:none;position:fixed;inset:0;background:rgba(15,23,42,.4);z-index:70;opacity:0;pointer-events:none;transition:opacity .3s var(--ease)}

/* ================= LANDING ======================================= */
.landing{
  min-height:100dvh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center;
  gap:1.6rem;padding:6rem var(--gutter) 7rem;position:relative;
}
.landing-role{
  font-family:var(--mono);font-size:.8rem;letter-spacing:.22em;
  text-transform:uppercase;color:var(--ink-3);
}
.landing-name{
  font-size:4.5rem;font-size:clamp(2.75rem,9vw,7rem);
  line-height:1;letter-spacing:-.04em;max-width:none;
}
.landing-links{display:flex;gap:.6rem}
.landing-links a{
  width:2.75rem;height:2.75rem;border:1px solid var(--rule);border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:var(--ink-2);background:var(--card);
  transition:color .2s var(--ease),border-color .2s var(--ease),transform .2s var(--ease);
}
.landing-links a svg{width:17px;height:17px;fill:currentColor}
.landing-links a:hover{color:var(--accent-deep);border-color:var(--accent);transform:translateY(-3px)}
.landing-acts{display:flex;flex-wrap:wrap;gap:.7rem;justify-content:center;margin-top:.2rem}
.landing-connect svg{stroke:currentColor;fill:none;stroke-width:1.7}
.landing-connect{background:var(--card)}

.scroll-cue{
  position:absolute;left:50%;bottom:2.5rem;transform:translateX(-50%);
  width:2.75rem;height:2.75rem;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  color:var(--accent);border:1px solid var(--rule);background:var(--card);
  animation:cue 1.9s var(--ease) infinite;
}
.scroll-cue svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.8}
.scroll-cue:hover{border-color:var(--accent)}
@keyframes cue{
  0%,100%{transform:translateX(-50%) translateY(0);opacity:1}
  50%{transform:translateX(-50%) translateY(7px);opacity:.45}
}

/* ================= LAYOUT ======================================== */
.page{margin-left:0}
.band:first-of-type{padding-top:7rem}
@media(min-width:900px){.band:first-of-type{padding-top:9rem}}
.wrap{max-width:calc(var(--measure) + 22rem);margin:0 auto;padding:0 var(--gutter)}
section{scroll-margin-top:5.5rem}

.band{padding:4.5rem 0;padding-block:clamp(4.5rem,9vw,8rem);border-top:1px solid var(--rule-2)}
.band:first-of-type{border-top:0}
.band > h2{margin-bottom:2.75rem}

/* ================= HERO ========================================== */
.hero{min-height:calc(100dvh - 4.5rem);display:grid;grid-template-columns:1fr 22rem;gap:clamp(2rem,5vw,4.5rem);align-items:center;padding:6rem 0 4rem}
.hero-title{margin-bottom:1.6rem}
.hero-title em{font-style:normal;color:var(--accent)}
.hero-sub{font-size:clamp(1rem,1.3vw,1.25rem);color:var(--ink-2);max-width:46ch;margin-bottom:2.2rem}
.hero-acts{display:flex;flex-wrap:wrap;gap:.7rem}

.btn{
  display:inline-flex;align-items:center;gap:.45rem;text-decoration:none;
  font-size:1rem;font-weight:500;padding:.75rem 1.3rem;border-radius:3px;
  border:1px solid var(--rule);background:var(--card);color:var(--ink);
  transition:border-color .2s var(--ease),transform .18s var(--ease),background .2s var(--ease);
}
.btn:hover{border-color:var(--accent);color:var(--accent-deep)}
.btn:active{transform:scale(.98)}
.btn-solid{background:var(--accent);color:#fff;border-color:var(--accent)}
.btn-solid:hover{background:var(--accent-deep);border-color:var(--accent-deep);color:#fff}
.btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.6}

/* image placeholder ------------------------------------------------ */
.ph{
  position:relative;background:var(--paper-2);border:1px solid var(--rule);
  display:flex;align-items:center;justify-content:center;overflow:hidden;padding:1rem;
}
.ph > img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.ph-label{
  font-family:var(--mono);font-size:.8rem;letter-spacing:.09em;text-transform:uppercase;
  color:var(--ink-3);text-align:center;padding:0 1rem;line-height:1.6;
}
.hero-ph{aspect-ratio:4/5;border-radius:2px}

/* ================= STATEMENT (focal motion) ====================== */
.statement{padding:clamp(6rem,13vw,11rem) 0}
.statement p{
  font-family:var(--display);font-size:2.75rem;font-size:clamp(1.9rem,4.1vw,3.15rem);
  line-height:1.3;letter-spacing:-.025em;max-width:20ch;font-weight:500;
}
.statement em{font-style:normal;color:var(--accent)}

/* ---- reveal system ----------------------------------------------
   data-reveal="words"   per-word ink lift   (headline moments)
   data-reveal="rise"    whole block rises   (section headings, blocks)
   data-reveal="stagger" children in sequence (lists and card grids)
   Defaults are the finished state, so no-JS and reduced-motion
   readers get the page intact.
------------------------------------------------------------------ */
.w{display:inline-block}

/* ================= EXPERIENCE ==================================== */
.role{border-top:1px solid var(--rule)}
.role:last-of-type{border-bottom:1px solid var(--rule)}
.role-head{
  width:100%;background:none;border:0;cursor:pointer;text-align:left;font:inherit;color:inherit;
  display:grid;grid-template-columns:9.5rem 2.75rem 1fr auto;gap:1.25rem;align-items:baseline;
  padding:1.75rem .5rem 1.75rem 0;transition:background .2s var(--ease);
}
.role-head:hover{background:var(--paper-2)}
.role-head h3{transition:transform .3s var(--ease)}
.role-head:hover h3{transform:translateX(4px);color:var(--accent-deep)}
.role-org{font-size:1rem;color:var(--ink-2);margin-top:.3rem}
.role-sign{background:var(--card);
  width:1.85rem;height:1.85rem;border:1px solid var(--rule);border-radius:50%;
  display:flex;align-items:center;justify-content:center;flex-shrink:0;align-self:center;
  transition:transform .35s var(--ease),border-color .2s var(--ease),background .2s var(--ease);
}
.role-sign svg{width:11px;height:11px;stroke:var(--ink);stroke-width:1.6;fill:none;transition:stroke .2s var(--ease)}
.role[data-open="true"] .role-sign{transform:rotate(45deg);background:var(--accent);border-color:var(--accent)}
.role[data-open="true"] .role-sign svg{stroke:var(--paper)}

.role-body{display:grid;grid-template-rows:0fr;transition:grid-template-rows .45s var(--ease)}
.role[data-open="true"] .role-body{grid-template-rows:1fr}
.role-body > div{overflow:hidden}
.role-inner{padding:0 0 2rem 11rem;max-width:60rem}
.role-lede{color:var(--ink-2);margin-bottom:1.4rem;font-size:1rem}
.role ul{list-style:none;display:flex;flex-direction:column;gap:.85rem}
.role li{position:relative;padding-left:1.2rem;font-size:1rem;color:var(--ink-2);line-height:1.62;max-width:var(--measure)}
.role li::before{content:"";position:absolute;left:0;top:.66em;width:5px;height:1px;background:var(--ink-3)}
.role li b{font-family:var(--mono);font-size:.9em;font-weight:500;color:var(--accent-deep);letter-spacing:-.02em}

/* ================= PROJECT CARDS (3D flip) ======================= */
.work-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}
/* one column once two would squeeze the back face past the 3:2 box */
@media(max-width:940px){.work-grid{grid-template-columns:1fr}}

.pcard{
  --tint:rgba(30,79,216,.07);
  --tint-line:rgba(30,79,216,.22);
  --tint-ink:#1739a8;
  display:block;aspect-ratio:3/2;perspective:1500px;
  text-decoration:none;color:inherit;border-radius:20px;
}
.pcard:nth-child(3n+2){--tint:rgba(13,124,128,.08);--tint-line:rgba(13,124,128,.24);--tint-ink:#0b5f62}
.pcard:nth-child(3n+3){--tint:rgba(180,83,9,.08);--tint-line:rgba(180,83,9,.24);--tint-ink:#8a4208}

.pcard-3d{
  position:relative;width:100%;height:100%;
  transform-style:preserve-3d;
  transition:transform .6s cubic-bezier(.4,0,.2,1);
}
.pcard:hover .pcard-3d,
.pcard:focus-within .pcard-3d{transform:rotateY(-180deg)}

.pcard-face{
  position:absolute;inset:0;
  backface-visibility:hidden;-webkit-backface-visibility:hidden;
  border-radius:20px;padding:1.6rem;
  display:flex;flex-direction:column;
}

/* front: the artwork is the face, the title sits on top of it */
.pcard-front{
  background:var(--midnight);
  border:1px solid var(--tint-line);
  overflow:hidden;justify-content:flex-end;
}
.pcard-shot{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;object-position:center top;
}
/* the artwork carries its own busy detail, so dim it: an even wash for the
   upper half, deepening to near-solid where the title actually sits */
.pcard-front::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,
    rgba(9,14,26,.52) 0%,
    rgba(9,14,26,.62) 42%,
    rgba(9,14,26,.93) 100%);
}
.pcard-head{position:relative;z-index:1}
.pcard-cat{
  display:block;
  font-size:.8rem;font-weight:600;letter-spacing:.09em;text-transform:uppercase;
  color:rgba(255,255,255,.74);margin-bottom:.45rem;
}
.pcard-front h3{
  font-size:1.25rem;line-height:1.25;letter-spacing:-.02em;color:#fff;
  text-shadow:0 1px 14px rgba(0,0,0,.55);
}

/* back */
.pcard-back{
  transform:rotateY(180deg);
  background:var(--card);
  border:1px solid var(--tint-line);
  box-shadow:0 12px 32px rgba(15,23,42,.09),0 2px 6px rgba(15,23,42,.05);
}
.pcard-back p{font-size:1rem;line-height:1.6;color:var(--ink-2);max-width:none}
.pcard-tags{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:auto;padding-top:1rem}
.pcard-acts{
  display:flex;align-items:center;gap:.55rem;
  margin-top:.9rem;padding-top:.9rem;border-top:1px solid var(--rule-2);
}
.pcard-live{
  display:inline-flex;align-items:center;gap:.4rem;
  padding:.5rem .9rem;border-radius:8px;text-decoration:none;
  background:var(--tint);border:1px solid var(--tint-line);color:var(--tint-ink);
  font-size:.8rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  transition:border-color .2s var(--ease),background .2s var(--ease);
}
.pcard-live:hover{background:var(--card);border-color:var(--tint-ink)}
.pcard-live svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:1.8}
.pcard-repo{
  display:inline-flex;align-items:center;justify-content:center;
  width:2.3rem;height:2.3rem;border-radius:8px;
  border:1px solid var(--rule);color:var(--ink-2);
  transition:border-color .2s var(--ease),color .2s var(--ease);
}
.pcard-repo:hover{border-color:var(--tint-ink);color:var(--tint-ink)}
.pcard-repo svg{width:17px;height:17px;fill:currentColor}

/* touch and reduced motion: no rotation, both faces stacked */
@media (hover:none){
  .pcard{height:auto;aspect-ratio:auto;perspective:none}
  .pcard-3d{transform:none !important;transform-style:flat}
  .pcard-face{
    position:relative;inset:auto;transform:none;
    backface-visibility:visible;-webkit-backface-visibility:visible;
  }
  /* stacked, so the face needs its own height: match the artwork and it never crops */
  .pcard-front{border-radius:20px 20px 0 0;border-bottom:0;aspect-ratio:3/2;min-height:11rem}
  .pcard-back{transform:none;border-radius:0 0 20px 20px;box-shadow:none;border-top:0}
}

.more-head{
  font-family:var(--sans);font-size:.8rem;font-weight:600;
  letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);
  margin-top:3rem;padding-top:1.75rem;border-top:1px solid var(--rule-2);
}

/* ---- secondary repository cards --------------------------------- */
.repo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(13.5rem,1fr));gap:.75rem;margin-top:1.25rem}
.repo{
  display:flex;align-items:center;
  padding:.9rem 1.05rem;border-radius:10px;
  background:var(--card);border:1px solid var(--rule);
  text-decoration:none;color:inherit;
  transition:border-color .2s var(--ease),transform .2s var(--ease),box-shadow .2s var(--ease);
}
.repo:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 6px 20px rgba(15,23,42,.06)}
.repo-name{display:flex;align-items:center;justify-content:space-between;gap:.75rem;width:100%;font-weight:500;font-size:1rem;color:var(--ink)}
.repo:hover .repo-name{color:var(--accent-deep)}
.repo-name svg{width:14px;height:14px;stroke:var(--ink-3);fill:none;stroke-width:1.8;flex-shrink:0;transition:stroke .2s var(--ease),transform .2s var(--ease)}
.repo:hover .repo-name svg{stroke:var(--accent);transform:translate(2px,-2px)}

/* ================= WRITING ======================================= */
.post{display:grid;grid-template-columns:9.5rem 1fr auto;gap:1.5rem;align-items:baseline;
  text-decoration:none;color:inherit;padding:1.6rem .5rem 1.6rem 0;border-top:1px solid var(--rule);transition:background .2s var(--ease)}
.post:last-of-type{border-bottom:1px solid var(--rule)}
.post:hover{background:var(--paper-2)}
.post h3{transition:transform .3s var(--ease)}
.post:hover h3{transform:translateX(4px);color:var(--accent-deep)}
.post p{font-size:1rem;color:var(--ink-2);margin-top:.45rem;max-width:56ch}
.post .go{width:15px;height:15px;stroke:var(--ink-3);fill:none;stroke-width:1.6;align-self:center;transition:stroke .2s,transform .3s var(--ease)}
.post:hover .go{stroke:var(--accent);transform:translate(2px,-2px)}

/* ================= CREDENTIALS (timeline) ======================== */
.timeline{position:relative;display:flex;flex-direction:column;gap:0;max-width:52rem}
.timeline::before{
  content:"";position:absolute;left:5.35rem;top:.6rem;bottom:.6rem;
  width:1px;background:var(--rule);
}

.tl-item{
  position:relative;display:grid;
  grid-template-columns:4.5rem 2.6rem 1fr;
  gap:0 1rem;align-items:start;padding:1.15rem 0;
}
.tl-year{
  font-family:var(--mono);font-size:.8rem;color:var(--ink-3);
  text-align:right;padding-top:.85rem;font-variant-numeric:tabular-nums;
}
.tl-mark{
  position:relative;z-index:1;width:2.6rem;height:2.6rem;border-radius:50%;
  background:var(--card);border:1px solid var(--rule);
  display:flex;align-items:center;justify-content:center;overflow:hidden;
  margin-top:.35rem;
}
.tl-mark img{width:100%;height:100%;object-fit:contain;padding:.3rem}
.tl-item[data-kind="award"] .tl-mark{border-color:var(--accent);background:var(--accent-wash)}

.tl-body{padding-top:.55rem}
.tl-body h3{margin-bottom:.25rem}
.tl-body p{font-size:1rem;color:var(--ink-2);max-width:52ch}
.tl-body .tl-issuer{margin-bottom:.5rem}
.tl-body .tl-issuer{color:var(--ink-3);font-size:1rem}

/* ================= CONTACT / FOOTER ============================== */
.contact{padding:clamp(5rem,10vw,9rem) 0 clamp(3rem,6vw,5rem)}
.contact h2{max-width:16ch;margin-bottom:2rem}
.contact-mail{font-family:var(--display);font-size:1.953rem;font-size:clamp(1.4rem,3vw,2.2rem);text-decoration:none;border-bottom:1px solid var(--rule);padding-bottom:.15rem;transition:border-color .25s var(--ease)}
.contact-mail:hover{border-color:var(--accent);color:var(--accent-deep)}
.foot{border-top:1px solid var(--rule);padding:2.5rem 0 3.5rem}
.foot p{font-size:.8rem;color:var(--ink-3)}

/* ================= RESPONSIVE ==================================== */
@media(max-width:1080px){
  .hero{grid-template-columns:1fr;gap:2.5rem;padding-top:3rem}
  .hero-ph{max-width:17rem;aspect-ratio:1}
  .role-inner{padding-left:0}
  .role-head{grid-template-columns:2.75rem 1fr auto;row-gap:.5rem}
  .role-head .date{grid-column:1/-1;order:-1}
  .post{grid-template-columns:1fr auto}
  .post .date{grid-column:1/-1;order:-1}

  .burger{display:flex}
  .nav-links{
    position:fixed;inset:4.5rem 0 auto 0;z-index:75;
    flex-direction:column;align-items:stretch;gap:0;margin-left:0;
    background:var(--paper);border-bottom:1px solid var(--rule);
    padding:.6rem var(--gutter) 1.4rem;
    transform:translateY(-8px);opacity:0;pointer-events:none;
    transition:transform .3s var(--ease),opacity .25s var(--ease);
  }
  .nav-links.open{transform:none;opacity:1;pointer-events:auto}
  .nav-links a{font-size:1.25rem;padding:.7rem .2rem;border-bottom:1px solid var(--rule-2)}
  .nav-links a::after{display:none}
  .nav-links a:last-child{border-bottom:0}
  .nav-scrim{display:block}
  .nav-scrim.open{opacity:1;pointer-events:auto}
  body.locked{overflow:hidden}
  .burger[aria-expanded="true"] span:nth-child(1){transform:translateY(6px) rotate(45deg)}
  .burger[aria-expanded="true"] span:nth-child(2){opacity:0}
  .burger[aria-expanded="true"] span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}
}

@media(max-width:620px){
  .work-grid{grid-template-columns:1fr}
  .hero{min-height:auto;padding-bottom:2rem}
  .nav-name{display:none}
  .foot-top{flex-direction:column;align-items:flex-start;gap:1.2rem}
  .foot-base{flex-direction:column;align-items:flex-start;gap:.4rem}
  .tl-item{grid-template-columns:2.6rem 1fr;gap:0 .9rem}
  .tl-year{grid-column:1/-1;text-align:left;padding-top:0;margin-bottom:.3rem}
  .timeline::before{left:1.3rem}
  .contact-mail{font-size:1rem;overflow-wrap:anywhere;line-height:1.5}
  .statement p{max-width:none}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{transition-duration:.01ms !important;animation-duration:.01ms !important}
  /* the turn is how the back face is legible, not decoration: snapping
     straight to reversed text reads as a glitch, so keep a shorter turn */
  .pcard-3d{transition-duration:.45s !important}
}

/* ================= FOOTER EXTRAS ================================= */
.foot-top{
  display:flex;flex-wrap:wrap;gap:1.5rem;
  justify-content:space-between;align-items:center;
  padding-bottom:1.6rem;margin-bottom:1.4rem;border-bottom:1px solid var(--rule-2);
}
.foot-avail{font-size:1rem;color:var(--ink-2);max-width:46ch;line-height:1.6}
.foot-avail b{color:var(--ink);font-weight:600}
.foot-social{display:flex;gap:.5rem;flex-shrink:0}
.foot-social a{
  width:2.25rem;height:2.25rem;border:1px solid var(--rule);border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:var(--ink-3);
  transition:color .2s var(--ease),border-color .2s var(--ease),transform .2s var(--ease);
}
.foot-social a svg{width:15px;height:15px;fill:currentColor}
.foot-social a:hover{color:var(--accent-deep);border-color:var(--accent);transform:translateY(-2px)}
.foot-base{display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;align-items:center}

/* ================= SKILLS GRID =================================== */
.sk-legend{display:flex;flex-wrap:wrap;gap:1.25rem;margin-bottom:1.75rem}
.sk-key{display:inline-flex;align-items:center;gap:.5rem;font-size:1rem;color:var(--ink-2)}
.sk-key::before{content:"";width:.7rem;height:.7rem;border-radius:3px;background:var(--sk-line);border:1px solid var(--sk-ink)}

.sk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(10.5rem,1fr));gap:.6rem}
.sk{
  display:flex;align-items:center;justify-content:center;text-align:center;
  min-height:3.1rem;padding:.55rem .7rem;border-radius:8px;
  font-size:1rem;line-height:1.3;color:var(--sk-ink);
  background:var(--sk-bg);border:1px solid var(--sk-line);
  transition:border-color .22s var(--ease),transform .22s var(--ease),box-shadow .22s var(--ease),background .22s var(--ease);
}
.sk:hover{border-color:var(--sk-ink);transform:translateY(-2px);box-shadow:0 4px 14px var(--sk-glow);background:var(--card)}

[data-cat="a"]{--sk-bg:rgba(30,79,216,.055);--sk-line:rgba(30,79,216,.22);--sk-ink:#1739a8;--sk-glow:rgba(30,79,216,.13)}
[data-cat="b"]{--sk-bg:rgba(13,124,128,.06);--sk-line:rgba(13,124,128,.24);--sk-ink:#0b5f62;--sk-glow:rgba(13,124,128,.14)}
[data-cat="c"]{--sk-bg:rgba(180,83,9,.06);--sk-line:rgba(180,83,9,.24);--sk-ink:#8a4208;--sk-glow:rgba(180,83,9,.14)}
[data-cat="d"]{--sk-bg:rgba(109,40,217,.055);--sk-line:rgba(109,40,217,.22);--sk-ink:#5b21b6;--sk-glow:rgba(109,40,217,.13)}

/* ================= CERTIFICATIONS & AWARDS ======================= */
.cred-split{display:grid;grid-template-columns:1.15fr 1fr;gap:clamp(2rem,5vw,4rem);align-items:start}
.cred-label{
  font-family:var(--sans);font-size:.8rem;font-weight:500;
  letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3);
  margin-bottom:1.25rem;padding-bottom:.75rem;border-bottom:1px solid var(--rule);
}
.cert-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:.85rem}
.cert{
  display:flex;align-items:center;gap:.85rem;
  padding:.85rem .95rem;border-radius:10px;
  background:var(--card);border:1px solid var(--rule);
  transition:border-color .2s var(--ease),transform .2s var(--ease),box-shadow .2s var(--ease);
}
.cert:hover{border-color:var(--accent);transform:translateY(-2px);box-shadow:0 6px 20px rgba(15,23,42,.06)}
.cert-mark{
  width:2.75rem;height:2.75rem;border-radius:50%;flex-shrink:0;overflow:hidden;
  border:1px solid var(--rule);background:var(--paper-2);
  display:flex;align-items:center;justify-content:center;
}
.cert-mark img{width:100%;height:100%;object-fit:contain;padding:2px}
.cert-ph{font-family:var(--mono);font-size:.8rem;font-weight:500;color:var(--accent-deep);letter-spacing:-.03em}
.cert h4{font-family:var(--sans);font-size:1rem;font-weight:600;line-height:1.3;letter-spacing:0}
.cert p{font-size:1rem;color:var(--ink-3);margin-top:.15rem}

.award-list{list-style:none;display:flex;flex-direction:column}
.award-list li{
  display:grid;grid-template-columns:5rem 1fr;gap:1rem;align-items:baseline;
  padding:1rem 0;border-bottom:1px solid var(--rule-2);
}
.award-list li:last-child{border-bottom:0}
.award-list h4{font-family:var(--sans);font-size:1rem;font-weight:600;line-height:1.35;letter-spacing:0}
.award-list p{font-size:1rem;color:var(--ink-3);margin-top:.15rem}

/* ================= CONTACT extras ================================ */
.contact-lede{font-size:1rem;color:var(--ink-2);max-width:46ch;margin-bottom:1.75rem}
.contact-links{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:2rem}

/* ================= ABOUT PAGE ==================================== */
.about-band{padding-top:7rem}
@media(min-width:900px){.about-band{padding-top:9.5rem}}
.about-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:clamp(2.5rem,6vw,5rem);align-items:start}
.about-copy h1{font-size:3rem;font-size:clamp(2.25rem,5vw,3.5rem);margin-bottom:1.5rem}
.about-lede{
  font-family:var(--display);font-weight:500;
  font-size:1.5rem;font-size:clamp(1.25rem,2.2vw,1.6rem);
  line-height:1.4;letter-spacing:-.02em;color:var(--ink);margin-bottom:2rem;
}
.about-copy p{color:var(--ink-2);margin-bottom:1.15rem}
.about-copy p a{color:var(--accent-deep);text-decoration-color:var(--rule);text-underline-offset:3px}
.about-copy p a:hover{text-decoration-color:var(--accent)}
.about-acts{display:flex;flex-wrap:wrap;gap:.7rem;margin-top:2rem}
.about-media{position:sticky;top:7rem}

@media(max-width:900px){
  .cred-split{grid-template-columns:1fr}
  .about-grid{grid-template-columns:1fr;gap:2.5rem}
  .about-media{position:static;order:-1;max-width:20rem}
}

/* ==================================================================
   MOTION LAYER
   Durations: 120ms feedback · 260ms cards · 700ms entrances
   1200ms+ ambient. Easing: exponential ease-out, no bounce.
   ================================================================== */

/* ---- ambient background ------------------------------------------ */
.bg-field{position:fixed;inset:0;z-index:-2;overflow:hidden;pointer-events:none}
.bg-orb{
  position:absolute;border-radius:50%;filter:blur(70px);opacity:.5;
}
.bg-orb.o1{width:44vw;height:44vw;left:-10vw;top:-8vw;background:radial-gradient(circle,rgba(30,79,216,.16),transparent 68%)}
.bg-orb.o2{width:38vw;height:38vw;right:-8vw;top:34vh;background:radial-gradient(circle,rgba(13,124,128,.13),transparent 68%)}
.bg-orb.o3{width:34vw;height:34vw;left:22vw;bottom:-10vw;background:radial-gradient(circle,rgba(180,83,9,.10),transparent 68%)}

.bg-grain{
  position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.32;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---- custom cursor (pointer devices only) ------------------------- */
/* the cursor lives in a clipped fixed layer, so it can never extend the
   scrollable area or nudge the page when it nears a viewport edge */
.cursor-layer{position:fixed;inset:0;z-index:200;pointer-events:none;overflow:hidden}
.cursor,.cursor-dot{position:absolute;top:0;left:0;pointer-events:none;border-radius:50%;opacity:0}
.cursor{
  width:38px;height:38px;margin:-19px 0 0 -19px;
  border:1px solid var(--accent);
  display:flex;align-items:center;justify-content:center;
  transition:background-color .3s var(--ease),border-color .3s var(--ease),opacity .25s var(--ease);
}
.cursor-dot{width:5px;height:5px;margin:-2.5px 0 0 -2.5px;background:var(--accent);transition:opacity .25s var(--ease),transform .2s var(--ease)}
.cursor-label{
  font-family:var(--mono);font-size:.8rem;font-weight:500;letter-spacing:.06em;
  color:#fff;opacity:0;transform:scale(.7);
  transition:opacity .22s var(--ease),transform .22s var(--ease);
}
.cursor.is-link{background:var(--accent-wash);border-color:var(--accent)}
.cursor.is-view{background:var(--accent);border-color:var(--accent)}
.cursor.is-view .cursor-label{opacity:1;transform:none}
.cursor.is-view + .cursor-dot,.cursor.is-link + .cursor-dot{opacity:0 !important}

html.has-cursor,html.has-cursor a,html.has-cursor button,html.has-cursor .pcard{cursor:none}

/* ---- masked heading reveal --------------------------------------- */
.band > h2{}

/* ---- magnetic buttons -------------------------------------------- */


@media(hover:none),(max-width:900px){
  .cursor,.cursor-dot{display:none}
  html.has-cursor,html.has-cursor a,html.has-cursor button,html.has-cursor .pcard{cursor:auto}
  .bg-orb{filter:blur(50px);opacity:.36}
  .bg-grain{opacity:.2}
}

@media(prefers-reduced-motion:reduce){
  .cursor,.cursor-dot,.bg-grain{display:none}
  .bg-orb{opacity:.28}
  .scroll-cue{animation:none}
}

/* word masks for headline reveals */
.w-mask{display:inline-block;overflow:hidden;vertical-align:top}
.w{display:inline-block}

/* nav hide-on-scroll */
.nav{transition:transform .45s var(--ease)}
.nav.nav-hidden{transform:translateY(-130%)}

/* GSAP owns the flip when the motion layer is live; the CSS hover flip
   above remains the no-script fallback. */
html.gsap-flip .pcard-3d{transition:none}
html.gsap-flip .pcard:hover .pcard-3d,
html.gsap-flip .pcard:focus-within .pcard-3d{transform:none}
.pcard-face{transition:box-shadow .3s var(--ease)}
.pcard:hover .pcard-face{box-shadow:0 18px 44px rgba(15,23,42,.14)}

/* ================= ABOUT TEASER (landing) ======================== */
.teaser{display:grid;grid-template-columns:1fr 16rem;gap:clamp(2rem,5vw,4rem);align-items:center}
.teaser-copy{max-width:52ch}
.teaser-lede{font-size:1.25rem;line-height:1.55;color:var(--ink);margin-bottom:1rem}
.teaser-copy p{color:var(--ink-2);margin-bottom:1rem}
.teaser-link{
  display:inline-flex;align-items:center;gap:.5rem;margin-top:.4rem;
  font-weight:500;color:var(--accent-deep);text-decoration:none;
  border-bottom:1px solid transparent;padding-bottom:2px;
  transition:border-color .2s var(--ease);
}
.teaser-link svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;transition:transform .3s var(--ease)}
.teaser-link:hover{border-bottom-color:var(--accent)}
.teaser-link:hover svg{transform:translateX(4px)}
.teaser-media{display:block;border-radius:16px;overflow:hidden;transition:transform .4s var(--ease)}
.teaser-media .ph{aspect-ratio:4/5;border-radius:16px}
.teaser-media:hover{transform:translateY(-4px)}

@media(max-width:820px){
  .teaser{grid-template-columns:1fr;gap:2rem}
  .teaser-media{max-width:14rem}
}

/* ---- role logos: one uniform chip regardless of source artwork ---- */
.role-logo{
  width:2.75rem;height:2.75rem;flex-shrink:0;align-self:center;
  border-radius:10px;background:var(--card);border:1px solid var(--rule);
  display:flex;align-items:center;justify-content:center;
  padding:.35rem;overflow:hidden;
  transition:border-color .2s var(--ease);
}
.role-logo img{width:100%;height:100%;object-fit:contain}
.role-head:hover .role-logo{border-color:var(--accent)}

/* ---- about page portrait ---- */
.about-photo{display:block;border-radius:16px;overflow:hidden;background:var(--paper-2)}
.about-photo img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover}

/* ---- snapshots ----
   Each figure grows in proportion to its own aspect ratio, so two
   photographs shot in different orientations share a baseline and a
   height without either being cropped to fit the other.
------------------------------------------------------------------- */
/* not a .band: this is a coda to the story, so no rule line and no top inset */
.snaps{padding-bottom:4.5rem;padding-bottom:clamp(4.5rem,9vw,8rem)}
.snap-row{display:flex;flex-wrap:wrap;gap:1rem;align-items:flex-start}
.snap{flex:var(--ar) 1 0;min-width:13rem;margin:0}
.snap-talk{--ar:1.3333}   /* 1280 x 960 */
.snap-trek{--ar:0.5617}   /* 719 x 1280 */
.snap img{
  display:block;width:100%;aspect-ratio:var(--ar);
  object-fit:cover;border-radius:14px;background:var(--paper-2);
}
.snap figcaption{
  margin-top:.7rem;font-size:.8rem;line-height:1.5;color:var(--ink-3);
}
/* below this the two photographs are too narrow to read: give each the row */
@media(max-width:640px){
  .snap{flex:1 1 100%}
}
