/* gervis.cash — portfolio. Shares the type and colour vocabulary of /resume/. */
:root{
  --clay:#1E1B15; --clay-deep:#100E0A; --bark:#EFE9DA;
  --bark-soft:rgba(239,233,218,.60); --bark-faint:rgba(239,233,218,.34);
  --rule:rgba(239,233,218,.16); --hair:rgba(239,233,218,.07); --moss:#A8B08E;
}
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
body{background:var(--clay);color:var(--bark);font-family:'Newsreader',Georgia,serif;
     font-optical-sizing:auto;min-height:100svh;display:flex;flex-direction:column}

main{flex:1 0 auto;padding:0 clamp(1rem,3.4vw,2.75rem) clamp(1.4rem,2.6vw,2rem)}
.wrap{max-width:1320px;margin:0 auto}
.wrap-narrow{max-width:780px;margin:0 auto}

.eyebrow{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 88,'wght' 600;
  font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--bark-faint);
  margin:clamp(1.2rem,3vw,2.2rem) 0 .7rem}
.eyebrow a{color:inherit;text-decoration:none;border-bottom:1px solid transparent}
.eyebrow a:hover{color:var(--bark);border-bottom-color:var(--moss)}
/* Titles stay on ONE line at every width: --w is the title's measured width in em
   (Archivo wdth 118 / wght 800 / tracking -.035em), so the size is derived, not guessed. */
.title{
  --cap:5.4rem;
  --avail:min(1320px, calc(100vw - 2 * clamp(1rem,3.4vw,2.75rem)));
  font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 118,'wght' 800;
  font-size:min(var(--cap), calc(var(--avail) / (var(--w,8) * 1.02)));
  line-height:.92;letter-spacing:-.035em;
  margin:0 0 clamp(.8rem,1.8vw,1.2rem);
  white-space:nowrap;max-width:100%}
.wrap-narrow .title{--cap:3.6rem;
  --avail:min(780px, calc(100vw - 2 * clamp(1rem,3.4vw,2.75rem)))}
.standfirst{font-size:clamp(1.02rem,1.5vw,1.22rem);line-height:1.55;color:var(--bark-soft);
  max-width:58ch;margin:0 0 clamp(1.4rem,3vw,2.2rem)}
.standfirst strong{color:var(--bark);font-weight:500}

/* ---------- index cards ---------- */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(15.5rem,1fr));
  gap:clamp(.9rem,1.8vw,1.5rem);border-top:1px solid var(--rule);padding-top:clamp(1.2rem,2.4vw,1.9rem)}
.card{position:relative;display:flex;flex-direction:column;text-decoration:none;color:inherit;
  border:1px solid var(--rule);background:var(--clay-deep);overflow:hidden;transition:border-color .25s}
.card:hover,.card:focus-visible{border-color:var(--moss);outline:none}
.card-media{position:relative;aspect-ratio:3/4;overflow:hidden;background:#15130F}
.card-media img{width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(.92);transform:scale(1.005);transition:transform .5s ease,filter .4s}
.card:hover .card-media img{transform:scale(1.045);filter:saturate(1)}
.card-body{padding:.95rem 1.05rem 1.1rem;display:flex;flex-direction:column;gap:.32rem;flex:1 0 auto}
.card-title{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 100,'wght' 700;
  font-size:1.02rem;letter-spacing:-.01em}
.card-meta{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 400;
  font-size:.76rem;color:var(--bark-faint);letter-spacing:.04em;text-transform:uppercase}
.card-note{font-size:.97rem;line-height:1.45;color:var(--bark-soft);margin-top:.1rem}

/* ---------- filters ---------- */
.filters{display:flex;flex-wrap:wrap;gap:.45rem;
  padding:clamp(.95rem,2vw,1.45rem) 0 clamp(.7rem,1.4vw,1rem);align-items:center}
.filters button{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 92,'wght' 500;
  font-size:.78rem;color:var(--bark-soft);background:none;border:1px solid var(--rule);
  border-radius:999px;padding:.36rem .78rem;cursor:pointer;transition:all .2s}
.filters button:hover{color:var(--bark);border-color:var(--bark-faint)}
.filters button[aria-pressed="true"]{color:var(--clay);background:var(--bark);border-color:var(--bark)}
.filters .count{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 400;
  font-size:.74rem;color:var(--bark-faint);margin-left:auto;letter-spacing:.04em}

/* ---------- per-category intro (sits under the title, swaps with the filter) ---------- */
.setintro{display:none}
.setintro.on{display:block;border-top:1px solid var(--rule);
  padding:clamp(.9rem,1.8vw,1.3rem) 0 0}
.setintro h2{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 110,'wght' 700;
  font-size:clamp(1.35rem,2.6vw,2rem);letter-spacing:-.022em;line-height:1.05;margin-bottom:.5rem}
.setintro blockquote{font-size:clamp(1.06rem,1.7vw,1.28rem);line-height:1.5;color:var(--bark);
  font-style:italic;max-width:52ch;margin:0}
.setintro .credit{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 400;
  font-size:.76rem;letter-spacing:.06em;color:var(--bark-faint);margin-top:.5rem}

/* ---------- masonry gallery ---------- */
.gallery{columns:4;column-gap:clamp(.55rem,1.1vw,.9rem);margin-top:.2rem}
.gallery .shot{break-inside:avoid;margin:0 0 clamp(.55rem,1.1vw,.9rem);position:relative;
  display:block;width:100%;padding:0;border:0;background:#15130F;cursor:zoom-in;overflow:hidden}
.gallery .shot img{width:100%;height:auto;display:block;
  transition:opacity .35s ease,transform .5s ease;opacity:.94}
.gallery .shot:hover img,.gallery .shot:focus-visible img{opacity:1;transform:scale(1.025)}
.gallery .shot:focus-visible{outline:2px solid var(--moss);outline-offset:2px}
.gallery .shot[hidden]{display:none}
@media (max-width:1180px){.gallery{columns:3}}
@media (max-width:760px){.gallery{columns:2}}
@media (max-width:460px){.gallery{columns:1}}

/* ---------- paintings ---------- */
.works{border-top:1px solid var(--rule);margin-top:.2rem}
.work{display:grid;grid-template-columns:minmax(0,1fr) 15rem;gap:clamp(1rem,2.6vw,2.4rem);
  align-items:start;padding:clamp(1.5rem,3.4vw,2.8rem) 0;border-bottom:1px solid var(--hair)}
.work:last-child{border-bottom:0}
.work-media{margin:0;background:#15130F;cursor:zoom-in;border:0;padding:0;display:block;width:100%;overflow:hidden}
.work-media img{width:100%;height:auto;display:block;transition:transform .5s ease}
.work-media:hover img{transform:scale(1.015)}
.work-media:focus-visible{outline:2px solid var(--moss);outline-offset:3px}
.work-info{position:sticky;top:1.5rem}
.work-info h2{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 108,'wght' 700;
  font-size:clamp(1.3rem,2.2vw,1.75rem);letter-spacing:-.02em;line-height:1.1;margin-bottom:.5rem}
.work-info dl{display:grid;gap:.3rem}
.work-info dt{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 88,'wght' 600;
  font-size:.68rem;letter-spacing:.14em;text-transform:uppercase;color:var(--bark-faint)}
.work-info dd{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 94,'wght' 400;
  font-size:.9rem;color:var(--bark-soft);margin-bottom:.5rem;line-height:1.4}
@media (max-width:860px){
  .work{grid-template-columns:1fr;gap:.9rem}
  .work-info{position:static;order:-1}
}

/* ---------- studio interstitial ---------- */
.studio{border-top:1px solid var(--rule);padding-top:clamp(1.1rem,2.2vw,1.7rem)}
.studio-note{max-width:66ch}
.studio-note p{font-size:clamp(1.02rem,1.5vw,1.16rem);line-height:1.62;color:var(--bark-soft)}
.studio-cta{margin-top:clamp(1rem,2vw,1.5rem)}
.studio-cta a{font-family:'Archivo',system-ui,sans-serif;
  font-variation-settings:'wdth' 96,'wght' 600;font-size:.86rem;letter-spacing:.02em;
  color:var(--clay);background:var(--bark);text-decoration:none;
  display:inline-block;padding:.6rem 1.1rem;transition:background .2s,color .2s}
.studio-cta a:hover,.studio-cta a:focus-visible{background:var(--moss);color:var(--clay-deep)}

.sectionhead{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 88,'wght' 600;
  font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--bark-faint);
  margin:clamp(1.8rem,3.4vw,2.8rem) 0 .9rem}

.ventures{display:grid;grid-template-columns:repeat(auto-fit,minmax(16rem,1fr));
  gap:clamp(.9rem,1.8vw,1.4rem);border-top:1px solid var(--rule);
  padding-top:clamp(1rem,2vw,1.5rem)}
.venture{display:flex;flex-direction:column;gap:.4rem;text-decoration:none;color:inherit;
  border:1px solid var(--rule);background:var(--clay-deep);
  padding:clamp(1rem,2vw,1.4rem);transition:border-color .25s}
.venture:hover,.venture:focus-visible{border-color:var(--moss);outline:none}
.venture-kind{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 500;
  font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--bark-faint)}
.venture-name{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 108,'wght' 700;
  font-size:clamp(1.18rem,2vw,1.45rem);letter-spacing:-.02em;line-height:1.1}
.venture-blurb{font-size:.99rem;line-height:1.5;color:var(--bark-soft);margin-top:.15rem}

/* ---------- blog index ---------- */
.posts{border-top:1px solid var(--rule);padding-top:clamp(1.1rem,2.2vw,1.7rem);
  display:grid;gap:clamp(.9rem,1.8vw,1.4rem)}
/* the newest post leads, stacked and full width */
.post.lead{grid-template-columns:1fr;gap:0}
.post.lead .post-media{aspect-ratio:16/7}
.post.lead .post-body{padding:clamp(1.1rem,2.2vw,1.7rem) clamp(1.1rem,2.2vw,1.6rem) clamp(1.3rem,2.6vw,1.9rem)}
.post.lead .post-title{font-size:clamp(1.6rem,3.2vw,2.5rem)}
.post.lead .post-blurb{font-size:clamp(1.04rem,1.6vw,1.2rem);max-width:62ch}
@media (max-width:760px){.post.lead .post-media{aspect-ratio:4/3}}
.post{display:grid;grid-template-columns:15rem minmax(0,1fr);gap:clamp(1rem,2.4vw,2rem);
  text-decoration:none;color:inherit;border:1px solid var(--rule);background:var(--clay-deep);
  overflow:hidden;transition:border-color .25s;align-items:stretch}
.post:hover,.post:focus-visible{border-color:var(--moss);outline:none}
.post-media{position:relative;aspect-ratio:4/3;overflow:hidden;background:#15130F}
.post-media img{width:100%;height:100%;object-fit:cover;display:block;
  filter:saturate(.92);transition:transform .5s ease,filter .4s}
.post:hover .post-media img{transform:scale(1.045);filter:saturate(1)}
.post-body{padding:clamp(1rem,2vw,1.5rem) clamp(1rem,2vw,1.4rem) clamp(1.1rem,2.2vw,1.6rem) 0;
  display:flex;flex-direction:column;gap:.4rem;justify-content:center}
.post-kind{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 500;
  font-size:.73rem;letter-spacing:.1em;text-transform:uppercase;color:var(--bark-faint)}
.post-title{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 108,'wght' 700;
  font-size:clamp(1.25rem,2.2vw,1.65rem);letter-spacing:-.02em;line-height:1.12}
.post-blurb{font-size:clamp(1rem,1.5vw,1.1rem);line-height:1.5;color:var(--bark-soft);max-width:54ch}
@media (max-width:760px){
  .post{grid-template-columns:1fr;gap:0}
  .post-media{aspect-ratio:16/9}
  .post-body{padding:1rem 1.1rem 1.2rem}
}

/* ---------- essay ---------- */
.essay{border-top:1px solid var(--rule);padding-top:clamp(1.2rem,2.4vw,1.9rem)}
.essay p{font-size:clamp(1.04rem,1.5vw,1.16rem);line-height:1.68;margin-bottom:1.15rem;color:var(--bark)}
.essay p:last-of-type{margin-bottom:0}
.essay figure{margin:clamp(1.6rem,3.2vw,2.6rem) 0}
.essay figure img{width:100%;height:auto;display:block;background:#15130F;cursor:zoom-in}
.essay .lede{font-size:clamp(1.14rem,1.8vw,1.34rem);line-height:1.55;color:var(--bark)}
.byline{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 400;
  font-size:.78rem;color:var(--bark-faint);letter-spacing:.04em;margin-bottom:clamp(1.2rem,2.4vw,1.8rem)}

/* ---------- brand block (apparel) ---------- */
.brandline{display:flex;align-items:center;gap:clamp(1rem,2.4vw,2rem);flex-wrap:wrap;
  border-top:1px solid var(--rule);padding:clamp(1.1rem,2.2vw,1.7rem) 0}
.brandline img{height:clamp(38px,5vw,54px);width:auto;opacity:.92}
.brandline p{font-size:clamp(1rem,1.5vw,1.14rem);line-height:1.58;color:var(--bark-soft);max-width:60ch;flex:1 1 22rem}

/* ---------- lightbox ---------- */
.lb{position:fixed;inset:0;z-index:99;background:rgba(16,14,10,.96);
  display:none;place-items:center;padding:clamp(.6rem,2vw,2.2rem)}
.lb[open],.lb.on{display:grid}
.lb img{max-width:100%;max-height:86svh;width:auto;height:auto;display:block;
  margin:0 auto;object-fit:contain}
.lb-cap{position:absolute;left:0;right:0;bottom:clamp(.5rem,1.4vw,1.1rem);text-align:center;
  font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 400;
  font-size:.76rem;color:var(--bark-faint);letter-spacing:.05em;pointer-events:none}
.lb-btn{position:absolute;background:none;border:0;color:var(--bark-soft);cursor:pointer;
  font-family:'Archivo',system-ui,sans-serif;font-size:1.5rem;line-height:1;padding:.7rem .9rem;
  transition:color .2s}
.lb-btn:hover,.lb-btn:focus-visible{color:var(--bark);outline:none}
.lb-close{top:clamp(.2rem,1vw,.7rem);right:clamp(.2rem,1vw,.7rem);font-size:1.7rem}
.lb-prev{left:clamp(.1rem,.8vw,.6rem);top:50%;transform:translateY(-50%);font-size:2rem}
.lb-next{right:clamp(.1rem,.8vw,.6rem);top:50%;transform:translateY(-50%);font-size:2rem}
body.lb-open{overflow:hidden}

/* ---------- footer ---------- */
.strip{flex:0 0 auto;border-top:1px solid rgba(239,233,218,.18);
  display:grid;grid-template-columns:1fr auto;align-items:end;gap:1.25rem;
  padding:clamp(.8rem,1.5vw,1.2rem) clamp(1rem,3.4vw,2.75rem) clamp(.9rem,1.8vw,1.4rem)}
.role{font-size:clamp(1.1rem,1.8vw,1.6rem);line-height:1.3}
.loc{font-family:'Archivo',system-ui,sans-serif;font-variation-settings:'wdth' 90,'wght' 500;
  font-size:.77rem;color:var(--bark-soft);text-align:right;
  display:flex;gap:clamp(.6rem,1.4vw,1.05rem);flex-wrap:wrap;justify-content:flex-end;align-items:center}
.loc a{color:var(--bark);text-decoration:none;border-bottom:1px solid var(--rule)}
.loc a:hover{border-bottom-color:var(--moss)}
.loc a.soc{border-bottom:0;display:inline-flex;align-items:center;padding:.15rem}
.loc a.soc svg{width:1.02rem;height:1.02rem;fill:var(--bark-soft);transition:fill .2s ease;display:block}
.loc a.soc:hover svg,.loc a.soc:focus-visible svg{fill:var(--bark)}

@media (max-width:760px){
  .strip{grid-template-columns:1fr;align-items:start;gap:.6rem}
  .loc{text-align:left;justify-content:flex-start;gap:.9rem}
  .loc{gap:.5rem}
  .loc a.soc{padding:.72rem;min-width:44px;min-height:44px;justify-content:center}
  .loc a.soc svg{width:1.2rem;height:1.2rem}
  .loc a.mailto{padding:.5rem 0;display:inline-block;min-height:28px}
  .role{font-size:clamp(1rem,4.6vw,1.3rem)}

  /* comfortable targets and a little more air */
  .filters{gap:.5rem;padding:clamp(.9rem,3vw,1.3rem) 0 clamp(.8rem,2.4vw,1rem)}
  .filters button{padding:.6rem 1rem;font-size:.85rem;min-height:42px}
  .filters .count{margin-left:0;flex:1 0 100%;order:3}
  .eyebrow{margin-top:clamp(.9rem,3vw,1.6rem)}
  .eyebrow a{padding:.35rem 0;display:inline-block;min-height:26px}
  .standfirst{font-size:1.02rem}

  /* full-width lightbox controls that are easy to hit */
  .lb-btn{padding:.9rem 1rem}
  .lb-close{font-size:2rem}
  .lb-prev,.lb-next{font-size:2.3rem}
  .lb img{max-height:78svh}
  .lb-cap{font-size:.72rem}

  .card-media{aspect-ratio:16/10}
  .cards{grid-template-columns:1fr;gap:.8rem}
  .ventures{grid-template-columns:1fr}
}
a:focus-visible,button:focus-visible{outline:2px solid var(--moss);outline-offset:3px}
@media (prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
