/* ═══════════════════════════════════════════════════════════
   Karen Lin — portfolio
   ═══════════════════════════════════════════════════════════ */

:root{
  --green:      #4D653E;
  --green-deep: #34452A;
  --green-soft: #7E9469;
  --cream:      #F2EDE4;
  --cream-2:    #EAE3D6;
  --ink:        #1B2016;
  --ink-2:      #4A5142;
  --ink-3:      #8B9182;
  --line:       rgba(27,32,22,.13);
  --dark:       #0E1310;

  --f-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --f-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1320px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior:auto; } }

body{
  margin:0;
  background:var(--cream);
  color:var(--ink);
  font-family:var(--f-body);
  font-size:clamp(1rem,.95rem + .2vw,1.075rem);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
body.is-locked{ overflow:hidden; }

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

.wrap{ max-width:var(--maxw); margin-inline:auto; padding-inline:var(--pad); }

.visually-hidden{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip{
  position:absolute; left:-9999px; top:0; z-index:200;
  background:var(--ink); color:var(--cream); padding:.7rem 1.1rem; border-radius:0 0 .5rem 0;
}
.skip:focus{ left:0; }

:focus-visible{ outline:2px solid var(--green); outline-offset:3px; border-radius:2px; }

/* ─────────────────── reveal ─────────────────── */
.reveal{ opacity:0; transform:translateY(26px); transition:opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in{ opacity:1; transform:none; }
@media (prefers-reduced-motion: reduce){ .reveal{ opacity:1; transform:none; transition:none; } }

/* ═══════════════════════ NAV ═══════════════════════ */
.nav{
  position:fixed; inset:0 0 auto 0; z-index:80;
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  padding:1.15rem var(--pad);
  color:var(--cream);
  transition:color .5s var(--ease), background-color .5s var(--ease), backdrop-filter .5s var(--ease), border-color .5s var(--ease);
  border-bottom:1px solid transparent;
  mix-blend-mode:normal;
}
.nav.is-solid{
  color:var(--ink);
  background:rgba(242,237,228,.82);
  backdrop-filter:saturate(1.4) blur(14px);
  -webkit-backdrop-filter:saturate(1.4) blur(14px);
  border-bottom-color:var(--line);
}
.nav__mark{
  font-family:var(--f-display); font-size:1.02rem; letter-spacing:.01em;
  text-decoration:none; font-weight:500;
  opacity:0; transform:translateY(-6px);
  transition:opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events:none;
}
.nav.is-solid .nav__mark{ opacity:1; transform:none; pointer-events:auto; }
.nav__links{ display:flex; align-items:center; gap:clamp(.9rem,2.2vw,2rem); margin-left:auto; }
.nav__links a{
  text-decoration:none; font-size:.83rem; letter-spacing:.05em; text-transform:uppercase;
  font-weight:500; opacity:.82; position:relative; padding-block:.25rem;
}
.nav__links a::after{
  content:""; position:absolute; left:0; right:100%; bottom:0; height:1px;
  background:currentColor; transition:right .45s var(--ease);
}
.nav__links a:hover{ opacity:1; }
.nav__links a:hover::after{ right:0; }
.nav__cta{ border:1px solid currentColor; border-radius:999px; padding:.42rem 1rem!important; opacity:1!important; }
.nav__cta::after{ display:none!important; }
.nav__cta:hover{ background:currentColor; }
.nav.is-solid .nav__cta:hover{ color:var(--cream); }
.nav:not(.is-solid) .nav__cta:hover{ color:var(--green); }
@media (max-width:520px){
  .nav__links a{ font-size:.72rem; letter-spacing:.04em; }
  .nav__cta{ display:none; }
}

/* ═══════════════════════ HERO ═══════════════════════ */
.hero{
  position:relative; height:100svh; min-height:520px;
  background:var(--green); overflow:hidden; isolation:isolate;
}
#liquid{ position:absolute; inset:0; width:100%; height:100%; display:block; }
.hero__noscript, .hero.is-fallback::before{
  content:""; position:absolute; inset:0;
  background:
    radial-gradient(120% 90% at 30% 25%, #5D7A4A 0%, transparent 60%),
    radial-gradient(100% 80% at 78% 78%, #3E5432 0%, transparent 65%),
    var(--green);
}
.hero.is-fallback .hero__fallback-type{
  position:absolute; inset:0; display:grid; place-items:center;
  font-family:var(--f-display); font-weight:500;
  font-size:clamp(4rem,18vw,15rem); letter-spacing:-.02em;
  color:transparent;
  text-shadow:0 1px 0 rgba(255,255,255,.055), 0 -1px 0 rgba(0,0,0,.16);
  -webkit-text-stroke:0;
  user-select:none; pointer-events:none;
}

.hero__inner{
  position:relative; z-index:2; height:100%;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:calc(4.6rem + env(safe-area-inset-top)) var(--pad) clamp(2.2rem,5vh,3.6rem);
  color:#EFEADF; pointer-events:none;
}
.hero__eyebrow{
  margin:0; display:inline-flex; align-items:center; gap:.55rem;
  font-size:.76rem; letter-spacing:.16em; text-transform:uppercase;
  color:rgba(239,234,223,.62); font-weight:500;
}
.dot{ width:6px; height:6px; border-radius:50%; background:#C8D9B2; box-shadow:0 0 0 0 rgba(200,217,178,.5); animation:pulse 3.2s var(--ease-io) infinite; }
@keyframes pulse{ 0%,100%{ box-shadow:0 0 0 0 rgba(200,217,178,.45);} 55%{ box-shadow:0 0 0 8px rgba(200,217,178,0);} }

.hero__bottom{ max-width:min(100%,60ch); }
.hero__name{
  margin:0;
  font-family:var(--f-display);
  font-weight:400;
  font-size:clamp(3.2rem,11.5vw,9.5rem);
  line-height:.9; letter-spacing:-.035em;
  font-variation-settings:"SOFT" 0,"WONK" 1;
  text-shadow:0 2px 30px rgba(0,0,0,.22);
}
.hero__roles{
  margin:clamp(.9rem,2vh,1.4rem) 0 0;
  display:flex; flex-wrap:wrap; align-items:baseline; gap:.55rem .8rem;
  font-size:clamp(.86rem,1.5vw,1.02rem);
  letter-spacing:.055em; text-transform:uppercase; font-weight:400;
  color:rgba(239,234,223,.9);
}
.hero__roles em{ font-style:normal; color:rgba(239,234,223,.4); }
.hero__hint{
  margin:clamp(1.4rem,3.5vh,2.4rem) 0 0;
  font-size:.74rem; letter-spacing:.15em; text-transform:uppercase;
  color:rgba(239,234,223,.42);
  transition:opacity .7s var(--ease);
}
.hero__hint.is-gone{ opacity:0; }

@media (prefers-reduced-motion: reduce){ .dot{ animation:none; } }

/* ═══════════════════════ SECTIONS ═══════════════════════ */
.section{ position:relative; padding-block:clamp(5rem,13vh,10rem); }
.section--projects{ background:var(--cream); }
.section--photo{ background:var(--cream-2); }
.section--about{ background:var(--cream); }

.sec-head{ margin-bottom:clamp(2.6rem,6vh,4.5rem); max-width:44ch; }
.sec-head__title{
  margin:0; font-family:var(--f-display); font-weight:400;
  font-size:clamp(2.4rem,6.5vw,4.6rem); line-height:1; letter-spacing:-.03em;
}
.sec-head__note{ margin:1.15rem 0 0; color:var(--ink-2); max-width:38ch; font-size:1.02rem; }

/* ═══════════════════════ PROJECTS ═══════════════════════ */
/*
   Each project:   title  │  UI display
                   anim   │  (spans both rows)
                   ───────┴──────────────
                   description + link
*/
.projects{ list-style:none; margin:0; padding:0; display:grid; gap:clamp(3rem,7vw,5.5rem); }

.project{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,.36fr) minmax(0,.64fr);
  grid-template-rows:auto 1fr auto;
  grid-template-areas:
    "title ui"
    "anim  ui"
    "desc  desc";
  column-gap:clamp(1.5rem,5vw,4rem);
  border-top:1px solid var(--line);
  padding-top:clamp(2.4rem,5vw,4rem);
}
.project:first-child{ border-top:0; padding-top:0; }

.project__title{
  grid-area:title; align-self:start; margin:0;
  font-family:var(--f-display); font-weight:400; letter-spacing:-.03em;
  font-size:clamp(2rem,4.2vw,3.5rem); line-height:1.02;
}
.project__title span{
  background-image:linear-gradient(var(--green),var(--green));
  background-size:0% 1px; background-position:0 100%; background-repeat:no-repeat;
  transition:background-size .6s var(--ease);
  padding-bottom:.08em;
}
.project:hover .project__title span,
.project:focus-within .project__title span{ background-size:100% 1px; }

/* a project title that is also a link to the live site: it sits above the
   stretched "read case study" overlay so it can be clicked on its own */
.project__title a{
  position:relative; z-index:2; text-decoration:none; color:inherit;
  background-image:linear-gradient(var(--green),var(--green));
  background-size:0% 1px; background-position:0 100%; background-repeat:no-repeat;
  transition:background-size .6s var(--ease), color .4s var(--ease);
  padding-bottom:.08em;
}
.project:hover .project__title a{ background-size:100% 1px; }
.project__title a:hover{ color:var(--green); }
.project__title a:focus-visible{ outline:2px solid var(--green); outline-offset:4px; border-radius:2px; }

/* a project with no case study yet: nothing to hover, nothing to click */
.project--closed .project__title span{ background-image:none; }

/* matte cover over a project still in research */
.project__matte{
  position:absolute; inset:0; z-index:3; display:grid; place-items:center;
  background:rgba(242,237,228,.82);
  pointer-events:none;                 /* the project stays clickable underneath */
  backdrop-filter:saturate(.6) blur(2px);
  -webkit-backdrop-filter:saturate(.6) blur(2px);
}
.project__matte-label{
  font-size:.78rem; letter-spacing:.16em; text-transform:uppercase; font-weight:500;
  color:var(--ink-2); background:var(--cream);
  border:1px solid var(--line); border-radius:999px; padding:.62rem 1.2rem;
  box-shadow:0 1px 2px rgba(27,32,22,.04);
}

/* the two stages: canvases drawn straight onto the page */
.project__stage{ position:relative; }
.project__stage canvas{
  position:absolute; inset:0; width:100%; height:100%; display:block;
  opacity:0; transition:opacity .6s var(--ease);
}
.project__stage.is-live canvas{ opacity:1; }
.project__stage img{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; border-radius:6px; }

.project__anim{ grid-area:anim; aspect-ratio:4/5; margin-top:clamp(1.2rem,2.6vw,2.2rem); }
.project__ui{ grid-area:ui; min-height:100%; }

.project__desc{
  grid-area:desc;
  display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end;
  column-gap:clamp(1.5rem,5vw,4rem); row-gap:1.4rem;
  margin-top:clamp(1.8rem,4vw,3rem);
  padding-top:clamp(1.2rem,2.5vw,1.8rem);
  border-top:1px dashed var(--line);
}
.project__sub{ margin:0; color:var(--ink-2); max-width:62ch; font-size:1.02rem; }
.project__tags{ display:flex; flex-wrap:wrap; gap:.45rem; margin:1rem 0 0; padding:0; list-style:none; }
.project__tags li{
  font-size:.73rem; letter-spacing:.03em; padding:.32rem .72rem;
  border:1px solid var(--line); border-radius:999px; color:var(--ink-2);
}

/* One real control per project, stretched so the whole project is clickable. */
.project__link{
  all:unset; cursor:pointer; white-space:nowrap;
  font-size:.82rem; letter-spacing:.09em; text-transform:uppercase; font-weight:500;
  color:var(--green); display:inline-flex; gap:.5rem; align-items:center;
  padding:.35rem 0;
}
.project__link::after{ content:""; position:absolute; inset:0; z-index:1; }
.gbcs-live{ overflow:hidden; border-radius:6px; background:#000; }
.gbcs-live iframe{ position:absolute; left:50%; top:50%; width:1440px; height:900px; border:0; max-width:none;
  transform:translate(-50%,-50%) scale(var(--s,.5)); transform-origin:center center; pointer-events:none;
  opacity:0; transition:opacity .8s var(--ease); }
.gbcs-live.is-ready iframe{ opacity:1; }
.project__ext{ position:relative; z-index:2; display:inline-flex; gap:.4rem; align-items:center; margin-top:1rem;
  font-size:.82rem; letter-spacing:.09em; text-transform:uppercase; font-weight:500; color:var(--ink-2);
  text-decoration:none; border-bottom:1px solid var(--line); padding-bottom:.15rem; }
.project__ext:hover,.project__ext:focus-visible{ color:var(--green); border-bottom-color:var(--green); }
.project__link:focus-visible{ outline:2px solid var(--green); outline-offset:4px; border-radius:2px; }
.project__link span[aria-hidden]{ transition:transform .5s var(--ease); }
.project:hover .project__link span[aria-hidden]{ transform:translateX(5px); }

@media (max-width:900px){
  .project{ grid-template-columns:minmax(0,.42fr) minmax(0,.58fr); }
}
@media (max-width:640px){
  .project{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto;
    grid-template-areas: "title" "ui" "anim" "desc";
  }
  .project__ui{ aspect-ratio:1/1; min-height:0; margin-top:1.2rem; }
  .project__anim{ aspect-ratio:4/3; margin-top:1rem; }
  .project__desc{ grid-template-columns:minmax(0,1fr); }
}

/* ═══════════════════════ PHOTOGRAPHY ═══════════════════════ */
.photo-tabs { display: flex; gap: 2rem; border-bottom: 1px solid rgba(0,0,0,0.1); }
.tab-btn { background: none; border: none; padding: 0.75rem 0; font-family: Inter, sans-serif;
  letter-spacing: 0.05em; color: #999; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-btn.active { color: #2b2b26; border-bottom-color: #4D653E; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-top: 1.5rem; }
.photo-grid img { width: 100%; height: 220px; object-fit: cover; cursor: pointer;
  user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }

/* hearts wandering across the Heart Collection (heart-decor.js): they float
   above the photos but let every click through */
.section--photo{ overflow:hidden; }
.section--photo > .wrap{ position:relative; z-index:1; }
.heart-decor{ position:absolute; inset:0; z-index:2; pointer-events:none; }
.heart-decor__item{ position:absolute; left:0; top:0; }
.heart-decor__body{ opacity:0; }   /* popped in and out from heart-decor.js */
.heart-decor__body img{
  display:block; width:100%; height:auto; user-select:none; -webkit-user-drag:none;
  filter:drop-shadow(0 8px 12px rgba(60,30,15,.22));
}

/* additions: each photo is a button so it can be reached from the keyboard */
.tab-btn:focus-visible { outline: 2px solid #4D653E; outline-offset: 4px; }
.tab-desc { margin: 1.5rem 0 0; max-width: 52ch; color: var(--ink-2); }
.tab-desc:empty { display: none; }
.photo-btn { display: block; padding: 0; border: 0; background: var(--cream); cursor: pointer; }
.photo-btn[hidden] { display: none; }
.photo-btn img { display: block; }
.photo-btn:focus-visible { outline: 2px solid #4D653E; outline-offset: 3px; }
.photo-more {
  display: block; margin: 1.8rem auto 0; padding: .8rem 1.6rem; cursor: pointer;
  background: none; border: 1px solid rgba(0,0,0,0.12); border-radius: 999px;
  font: 500 .8rem/1 Inter, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: #2b2b26;
}
.photo-more:hover { border-color: #4D653E; color: #4D653E; }

/* ═══════════════════════ ABOUT ═══════════════════════ */
/* watercolour flowers growing around the text (flower-bloom.js):
   behind the content, never clickable */
.section--about{ position:relative; overflow:hidden; }
.section--about > .wrap{ position:relative; z-index:1; }
.flower-bloom{ position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; }

.about{ display:grid; grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr); gap:clamp(2rem,5vw,4.5rem); align-items:start; }
@media (max-width:860px){ .about{ grid-template-columns:1fr; } }
/* The frame takes the photo's own shape, so the whole picture shows, uncropped.
   With no photo yet it falls back to a 4:5 monogram tile. */
.portrait{
  position:relative; border-radius:14px; overflow:hidden;
  background:linear-gradient(160deg,#DDD6C6,#C6CDB6);
  max-width:420px;
}
.portrait.is-empty{ aspect-ratio:4/5; }
.portrait img{ display:block; width:100%; height:auto; }
.portrait__fallback{
  position:absolute; inset:0; display:none; place-items:center;
  font-family:var(--f-display); font-size:3.6rem; color:rgba(27,32,22,.3); letter-spacing:.06em;
}
.portrait.is-empty .portrait__fallback{ display:grid; }
.about__lead{
  font-family:var(--f-display); font-weight:300; font-size:clamp(1.35rem,2.6vw,1.85rem);
  line-height:1.38; letter-spacing:-.015em; margin:0 0 1.4rem;
}
.about__text p{ margin:0 0 1.15rem; color:var(--ink-2); max-width:62ch; }
.about__text em{ color:var(--ink); font-style:italic; }
.about__cols{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:2rem; margin-top:2.6rem; padding-top:2rem; border-top:1px solid var(--line); }
.about__col h3{ margin:0 0 .9rem; font-size:.74rem; letter-spacing:.18em; text-transform:uppercase; color:var(--green); font-weight:600; }
.about__col ul{ margin:0; padding:0; list-style:none; }
.about__col li{ padding:.32rem 0; color:var(--ink-2); font-size:.94rem; border-bottom:1px solid rgba(27,32,22,.06); }

/* ═══════════════════════ CONTACT ═══════════════════════ */
/* Green glazed tiles (assets/images/green-tiles.*, cut on the grout lines so it
   repeats seamlessly) under a dark green wash, so the cream text stays crisp. */
.section--contact{
  --on-tile:#F7F3EA;
  /* darkest behind the left-aligned text, lighter to the right so the glaze shows;
     a second wash settles the bottom behind the footer line */
  --tile-wash:
    linear-gradient(180deg, rgba(9,15,7,0) 55%, rgba(9,15,7,.72) 100%),
    linear-gradient(90deg, rgba(12,20,9,.68) 0%, rgba(12,20,9,.5) 40%, rgba(12,20,9,.16) 100%);
  color:var(--on-tile); padding-bottom:0; position:relative;
  background-color:#2C3A23;
  background-image:var(--tile-wash), url("../images/green-tiles.jpg");
  background-image:var(--tile-wash),
    image-set(url("../images/green-tiles.webp") type("image/webp"), url("../images/green-tiles.jpg") type("image/jpeg"));
  background-size:auto, auto, 411px auto;    /* tiles at half the file's width: sharp on retina */
  background-repeat:no-repeat, no-repeat, repeat;
  background-position:0 0, 0 0, center top;
}
@media (max-width:700px){
  /* on phones the text runs the full width, so the wash stays even */
  .section--contact{
    --tile-wash:
      linear-gradient(180deg, rgba(9,15,7,0) 55%, rgba(9,15,7,.72) 100%),
      linear-gradient(rgba(12,20,9,.6), rgba(12,20,9,.6));
  }
}
.section--contact ::selection{ background:var(--on-tile); color:#1B2016; }
.contact__eyebrow{
  margin:0 0 1.6rem; font-size:.76rem; letter-spacing:.16em; text-transform:uppercase; font-weight:500;
  color:rgba(247,243,234,.9); text-shadow:0 1px 10px rgba(0,0,0,.55);
}
.contact__title{
  margin:0; font-family:var(--f-display); font-weight:400;
  font-size:clamp(2.6rem,9vw,7rem); line-height:.98; letter-spacing:-.035em;
  color:var(--on-tile);
  text-shadow:0 2px 3px rgba(0,0,0,.35), 0 8px 40px rgba(0,0,0,.45);
}
.contact__mail{
  display:inline-block; margin-top:clamp(2rem,5vh,3.2rem);
  font-size:clamp(1.05rem,2.4vw,1.5rem); text-decoration:none; letter-spacing:-.01em; font-weight:500;
  color:var(--on-tile); text-shadow:0 1px 12px rgba(0,0,0,.55);
  border-bottom:1px solid rgba(247,243,234,.6); padding-bottom:.2rem;
  transition:border-color .4s var(--ease), color .4s var(--ease);
}
.contact__mail:hover{ border-color:var(--on-tile); }
.contact__links{ list-style:none; display:flex; gap:1.6rem; margin:2.4rem 0 0; padding:0; }
.contact__links a{
  text-decoration:none; font-size:.82rem; letter-spacing:.1em; text-transform:uppercase; font-weight:500;
  color:rgba(247,243,234,.92); text-shadow:0 1px 10px rgba(0,0,0,.55);
  transition:color .4s var(--ease);
}
.contact__links a:hover{ color:#fff; }
.section--contact a:focus-visible{ outline:2px solid var(--on-tile); outline-offset:4px; border-radius:2px; }
.foot{
  margin-top:clamp(4rem,12vh,8rem); border-top:1px solid rgba(247,243,234,.28);
  padding:1.5rem var(--pad) calc(1.5rem + env(safe-area-inset-bottom));
  display:flex; justify-content:space-between; gap:1rem; flex-wrap:wrap;
  max-width:var(--maxw); margin-inline:auto;
  font-size:.78rem; letter-spacing:.06em; color:rgba(247,243,234,.85);
  text-shadow:0 1px 8px rgba(0,0,0,.6);
}
.foot p{ margin:0; }
.foot__be{ font-family:var(--f-display); font-style:italic; letter-spacing:.02em; }

/* ═══════════════════════ READER (case study) ═══════════════════════ */
.reader{ position:fixed; inset:0; z-index:120; }
.reader[hidden]{ display:none; }
.reader__scrim{ position:absolute; inset:0; background:rgba(14,19,16,.5); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); opacity:0; transition:opacity .5s var(--ease); }
.reader__panel{
  position:absolute; inset:0 0 0 auto; width:min(980px,100%);
  background:var(--cream); box-shadow:-30px 0 80px -30px rgba(0,0,0,.45);
  transform:translateX(100%); transition:transform .62s var(--ease);
  display:flex; flex-direction:column;
}
.reader.is-open .reader__scrim{ opacity:1; }
.reader.is-open .reader__panel{ transform:none; }
@media (prefers-reduced-motion: reduce){
  .reader__panel{ transition:none; } .reader__scrim{ transition:none; }
}
.reader__scroll{ overflow-y:auto; overscroll-behavior:contain; height:100%; -webkit-overflow-scrolling:touch; }
.reader__close{
  all:unset; position:absolute; top:1rem; right:1rem; z-index:5; cursor:pointer;
  width:44px; height:44px; border-radius:50%; display:grid; place-items:center;
  background:rgba(242,237,228,.9); backdrop-filter:blur(8px);
  box-shadow:0 2px 14px rgba(27,32,22,.16);
  transition:transform .4s var(--ease), background-color .4s var(--ease);
}
.reader__close:hover{ transform:rotate(90deg); background:var(--cream); }
.reader__close span{ position:relative; width:15px; height:15px; display:block; }
.reader__close span::before,.reader__close span::after{
  content:""; position:absolute; top:7px; left:0; width:15px; height:1.5px; background:var(--ink);
}
.reader__close span::before{ transform:rotate(45deg); }
.reader__close span::after{ transform:rotate(-45deg); }

.cs{ padding:0 0 6rem; }
.cs__hero{ padding:clamp(3.4rem,7vw,5rem) clamp(1.5rem,5vw,4rem) clamp(2rem,4vw,3rem); }
.cs__kicker{ margin:0 0 1rem; font-size:.74rem; letter-spacing:.2em; text-transform:uppercase; color:var(--green); font-weight:600; }
.cs__title{ margin:0; font-family:var(--f-display); font-weight:400; font-size:clamp(2.2rem,6vw,3.8rem); line-height:1.02; letter-spacing:-.03em; }
.cs__deck{ margin:1.1rem 0 0; font-size:clamp(1.05rem,2vw,1.25rem); color:var(--ink-2); max-width:52ch; line-height:1.5; }
.cs__meta{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:1.4rem;
  margin-top:2.4rem; padding-top:1.6rem; border-top:1px solid var(--line);
}
.cs__meta dt{ font-size:.7rem; letter-spacing:.15em; text-transform:uppercase; color:var(--ink-3); margin-bottom:.4rem; }
.cs__meta dd{ margin:0; font-size:.94rem; color:var(--ink); }
.cs__body{ padding-inline:clamp(1.5rem,5vw,4rem); }
.cs h3{
  margin:clamp(2.8rem,6vw,4rem) 0 .9rem; font-family:var(--f-display); font-weight:400;
  font-size:clamp(1.45rem,3vw,2rem); letter-spacing:-.02em; line-height:1.15;
}
.cs h4{ margin:2rem 0 .6rem; font-size:.76rem; letter-spacing:.16em; text-transform:uppercase; color:var(--green); font-weight:600; }
.cs p{ margin:0 0 1.05rem; color:var(--ink-2); max-width:60ch; }
.cs ul{ margin:0 0 1.2rem; padding-left:1.1rem; color:var(--ink-2); max-width:60ch; }
.cs li{ margin-bottom:.42rem; }
.cs strong{ color:var(--ink); font-weight:600; }
.cs figure{ margin:clamp(1.8rem,4vw,2.8rem) 0; }
.cs figure img{ width:100%; border-radius:10px; box-shadow:0 1px 2px rgba(27,32,22,.06), 0 20px 44px -30px rgba(27,32,22,.5); }
.cs figcaption{ margin-top:.7rem; font-size:.8rem; color:var(--ink-3); }
.cs__stats{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:1.2rem; margin:2rem 0 1rem; }
.cs__stat{ padding:1.2rem 1.1rem; background:var(--cream-2); border-radius:10px; }
.cs__stat b{ display:block; font-family:var(--f-display); font-weight:400; font-size:clamp(1.7rem,4vw,2.3rem); line-height:1; color:var(--green); letter-spacing:-.02em; }
.cs__stat span{ display:block; margin-top:.5rem; font-size:.83rem; color:var(--ink-2); line-height:1.4; }
.cs__quote{
  margin:2rem 0; padding:1.4rem 0 1.4rem 1.4rem; border-left:2px solid var(--green-soft);
  font-family:var(--f-display); font-style:italic; font-size:clamp(1.1rem,2.2vw,1.35rem);
  line-height:1.45; color:var(--ink); max-width:52ch;
}
.cs__quote cite{ display:block; margin-top:.7rem; font:500 .76rem/1 var(--f-body); font-style:normal; letter-spacing:.12em; text-transform:uppercase; color:var(--ink-3); }
.cs__cta{ margin-top:clamp(2.6rem,6vw,4rem); padding-top:1.8rem; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:.8rem; }
.cs__cta a{
  display:inline-flex; align-items:center; gap:.6rem; text-decoration:none;
  padding:.8rem 1.4rem; border-radius:999px; font-size:.84rem; letter-spacing:.05em; font-weight:500;
  background:var(--green); color:var(--cream); transition:background-color .4s var(--ease), transform .4s var(--ease);
}
.cs__cta a:hover{ background:var(--green-deep); transform:translateY(-2px); }
.cs__cta a.is-ghost{ background:transparent; color:var(--ink); border:1px solid var(--line); }
.cs__cta a.is-ghost:hover{ background:var(--cream-2); }
.cs__wip{
  margin:1.6rem 0 0; padding:1.1rem 1.2rem; border-radius:10px;
  background:#F6EFE1; border:1px dashed rgba(27,32,22,.2);
  font-size:.88rem; color:var(--ink-2);
}
.cs__grid2{ display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:1.2rem; margin:1.6rem 0 .6rem; }
.cs__card{ padding:1.3rem; border:1px solid var(--line); border-radius:10px; }
.cs__card h5{ margin:0 0 .6rem; font-size:.95rem; font-weight:600; }
.cs__card p{ margin:0; font-size:.9rem; }

/* ═══════════════════════ LIGHTBOX ═══════════════════════ */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9);
  z-index: 999; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; user-select: none;
  -webkit-user-drag: none; -webkit-touch-callout: none; }
.lightbox-close { position: absolute; top: 24px; right: 32px; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; }

/* additions: previous / next */
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none;
  color: rgba(255,255,255,.7); font-size: 3rem; line-height: 1; padding: 1rem; cursor: pointer; }
.lightbox-nav:hover, .lightbox-close:hover { color: #fff; }
.lightbox-prev { left: 12px; }
.lightbox-next { right: 12px; }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
