/* Shared styles for the homepage (index.html) and the playground (playground.html). */
:root{
  --ink:#212121; --mute:#737373; --faint:#b8b8b8; --line:#212121;
  --chip:#e8e8e8; --ph:#eeeeeb; --bg:#fff;
  --pad:10px; --gap:56px; --left:440px;
  --t-hero:20px; --t-bio:14px; --t-card:20px;
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;overscroll-behavior-y:none} /* no rubber-band bounce, so the pinned column never shifts at the ends */
body{overscroll-behavior-y:none}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}*{transition:none!important}}
body{font-family:"Inter Tight",system-ui,sans-serif;color:var(--ink);background:var(--bg);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible{outline:2px solid var(--ink);outline-offset:3px;border-radius:2px}

/* Layout: split screen */
.page{display:grid;grid-template-columns:var(--left) 1fr;gap:var(--gap);padding:0 var(--pad)}
.side{position:sticky;top:0;height:100vh;display:flex;flex-direction:column;justify-content:space-between;padding:var(--pad) 0}
.work{padding:var(--pad) 0 calc(var(--pad)*3);display:flex;flex-direction:column;gap:48px;min-width:0}
/* Desktop: the left column always fills the window height. GSAP's pin writes a measured pixel height
   inline; these override it with the live window height, so it can never go stale (e.g. after a window
   or zoom change GSAP didn't catch). Tablet and mobile stack, so they keep their natural height. */
@media (min-width:1024px){
  .side{height:100vh!important;max-height:none!important}
  .page>.pin-spacer{height:100vh!important;max-height:none!important}
}

.logo{display:inline-flex;align-items:center;gap:10px}
.logo svg{width:44px;height:44px;flex:none}
.logo span{font-family:"Geist Mono",ui-monospace,monospace;font-weight:500;font-size:22px;line-height:1.2}

.intro{margin-top:28px;display:flex;flex-direction:column;gap:12px}
h1{font-weight:300;font-size:var(--t-hero);line-height:1.3;letter-spacing:-.01em}
.bio{font-size:var(--t-bio);line-height:1.55;max-width:60ch}
.bio s{color:var(--faint)}
.more{display:none}
.chip{align-self:flex-start;background:var(--chip);border-radius:4px;padding:5px 10px;font-size:13px;transition:background .2s}
.chip:hover{background:#dcdcdc}

.index{font-size:13px;color:var(--mute);line-height:1.7;margin-bottom:24px}
.index p{margin-bottom:2px}
.index a{display:flex;gap:12px;transition:color .2s}
.index a:hover,.index a.active{color:var(--ink)}
.index a .n{width:18px;flex:none}
.index a{line-height:1.45;padding:3px 0}
.index a.active .t::after{content:" ←";}
.links{display:flex;gap:20px;font-size:13px;color:var(--mute);flex-wrap:wrap}
.links a:hover{color:var(--ink)}
.copy-email.copied{color:var(--ink)}
.foot .links{justify-content:space-between;gap:12px}

/* Cards */
.card{display:block;scroll-margin-top:var(--pad)}
.media{position:relative;aspect-ratio:16/9;background:var(--ph);border-radius:4px;overflow:hidden}
.media > img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.media .ph{position:absolute;inset:0;display:none;align-items:center;justify-content:center;flex-direction:column;gap:6px;font-size:12px;color:var(--mute);text-align:center;padding:16px}
.media.missing img{display:none}
.media.missing .ph{display:flex}
.cta{position:absolute;left:16px;bottom:16px;background:#fff;padding:7px 12px;border-radius:4px;font-size:13px;opacity:0;transform:translateY(6px);transition:opacity .25s,transform .25s}
.card:hover .media > img{transform:scale(1.025)}
.card:hover .cta,.card:focus-visible .cta{opacity:1;transform:none}
.meta{display:flex;justify-content:space-between;gap:24px;margin-top:12px;align-items:baseline}
.meta h2{font-weight:400;font-size:var(--t-card);line-height:1.3}
.meta .yr{font-size:14px;color:var(--mute);flex:none}
.tags{font-size:13px;color:var(--mute);margin-top:4px}
.sum{font-size:14px;color:var(--mute);margin-top:8px;max-width:62ch;line-height:1.5}


/* Desktop with a mouse or trackpad: hovering a card lights up its row in the index. */
@media (min-width:1024px) and (hover:hover){
  .index a.is-hover{color:var(--ink)}
}

/* Large desktop */
@media (min-width:1500px){
  :root{--pad:10px;--gap:80px;--left:540px;--t-hero:20px;--t-bio:14px;--t-card:24px}
  .intro{margin-top:36px}
  .work{gap:64px;max-width:1400px}
}

/* Tablet: stack */
@media (max-width:1023px){
  :root{--pad:10px}
  .page{display:block}
  .side{position:static;height:auto;display:block;padding:0}
  .topbar{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);display:flex;justify-content:space-between;align-items:center;margin:0 calc(var(--pad)*-1);padding:var(--pad)}
  .intro{margin-top:16px;padding-bottom:56px}
  .side .foot{display:none}
  .worklabel{display:block!important}
  .work{padding-top:0}
}
.worklabel{display:none;border-top:1px solid var(--line);padding:14px 0 0;font-size:15px;color:var(--mute)}

/* ---------- Playground banners ----------
   Animated or live banners sit over the card's still image (which stays as the fallback and the
   index preview). Timelines live in site.js (BANNERS). */
.banner{position:absolute;inset:0;overflow:hidden;container-type:inline-size}
.banner img{position:absolute;display:block;pointer-events:none;will-change:transform}

/* Underground society: the zine's collage and title, in its black and white */
.banner--underground{background:#f4f4f2;color:#0d0d0d}
.banner--underground .b-word{position:absolute;margin:0;font-family:"Anton",Impact,sans-serif;font-weight:400;line-height:.86;letter-spacing:-.02em;text-transform:uppercase;white-space:nowrap}
.banner--underground .b-under{left:3cqw;top:3cqw;font-size:17cqw;z-index:1}
.banner--underground .b-ground{right:3cqw;top:3cqw;font-size:17cqw;z-index:1}
.banner--underground .b-society{left:3cqw;bottom:2cqw;font-size:24cqw;z-index:4}
.banner--underground .b-collage{height:96%;width:auto;left:34%;top:4%;z-index:3}
.banner--underground .b-can{width:17cqw;left:30%;top:40%;z-index:2}
.banner--underground .b-train{width:58cqw;right:0;bottom:-1cqw;z-index:5;filter:drop-shadow(0 8px 14px rgba(0,0,0,.25))}

/* Interactive playground: the live gallery snippet, fading in over its still once loaded.
   pointer-events off so clicks open the project and the page keeps scrolling over it. */
.banner-frame{position:absolute;inset:0;width:100%;height:100%;border:0;pointer-events:none;opacity:0;transition:opacity .6s}
.banner-frame.is-ready{opacity:1}

/* Mobile */
.menubtn{display:none;background:none;border:0;font:inherit;font-size:14px;color:var(--mute);cursor:pointer;padding:8px 0}
@media (max-width:639px){
  :root{--pad:10px;--t-hero:20px;--t-card:17px}
  .logo svg{width:33px;height:33px}.logo span{font-size:16.5px}
  .bio .rest{display:none}
  .bio.open .rest{display:inline}
  .more{display:inline-block;align-self:flex-start;background:none;border:0;font:inherit;font-size:14px;font-weight:500;color:var(--ink);cursor:pointer;padding:0}
  .intro{padding-bottom:40px}
  .work{gap:36px}
  .meta{flex-direction:column;gap:2px}
  .cta{display:none}
}
.mfoot{display:none;flex-direction:column;gap:10px;font-size:14px;color:var(--mute);border-top:1px solid #e5e5e5;padding-top:24px}

/* Tablet and mobile: the "menu" button and the contact links under the cards replace the left column's links */
@media (max-width:1023px){
  .menubtn{display:block}
  .mfoot{display:flex}
}

/* Mobile menu */
.menu{position:fixed;inset:0;background:#fff;z-index:10;padding:var(--pad);display:flex;flex-direction:column;opacity:0;pointer-events:none;transition:opacity .2s}
.menu.open{opacity:1;pointer-events:auto}
.menu .row{display:flex;justify-content:space-between;align-items:center}
.menu nav{margin-top:56px;display:flex;flex-direction:column;gap:14px;font-size:28px;font-weight:300}
.menu nav a{border-bottom:1px solid #eee;padding-bottom:10px}

/* First-visit intro: elements start hidden until GSAP plays them in (see the intro script) */
.is-intro .logo,.is-intro .topbar .menubtn,
.is-intro .intro>*,.is-intro .index>*,.is-intro .foot .links a,
.is-intro .worklabel,.is-intro .card>*,.is-intro .mfoot>*{opacity:0}
.intro-running .media > img{transition:none} /* stop the hover transition fighting the intro zoom */

/* ---------- Page transitions (home <-> playground) ----------
   The browser crossfades between the two pages instead of a hard reload. Elements that are the same on
   both pages get a shared name, so they stay put while the rest fades. Chrome, Edge and Safari 18.2+;
   other browsers just load the page normally. Off for reduced motion. */
@view-transition{navigation:auto}
.topbar .logo{view-transition-name:site-logo}
.topbar .menubtn{view-transition-name:menu-button}
.foot .links{view-transition-name:contact-links}
::view-transition-old(root),::view-transition-new(root){animation-duration:.45s;animation-timing-function:cubic-bezier(.2,.7,.2,1)}
::view-transition-group(*){animation-duration:.45s}
@media (prefers-reduced-motion:reduce){
  @view-transition{navigation:none}
}
