/* ============================================================================
   Maishat — Portfolio · Screen styles (warm gallery)
   Palette: ivory paper, charcoal ink, terracotta + brass accents.
============================================================================ */
:root{
  --paper:#f4efe4;          /* warm ivory wall            */
  --paper-2:#fbf8f1;        /* lighter card / mat         */
  --ink:#2a2620;            /* charcoal text              */
  --ink-soft:#6f675a;       /* muted warm grey            */
  --line:#ddd3c0;           /* hairline                   */
  --clay:#b1532f;           /* terracotta accent          */
  --brass:#9a7b45;          /* ochre / brass              */
  --shadow:28px 34px 60px -38px rgba(40,32,22,.55);
  --serif:'Cormorant Garamond',Georgia,'Times New Roman',serif;
  --sans:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --maxw:1240px;
}
*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;background:var(--paper);color:var(--ink);
  font-family:var(--sans);font-size:16px;line-height:1.6;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
}
img{display:block;max-width:100%;}
a{color:inherit;text-decoration:none;}

/* subtle paper grain via layered gradients */
body::before{
  content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;opacity:.55;
  background:
    radial-gradient(1200px 800px at 15% -10%, #fbf7ee 0%, transparent 60%),
    radial-gradient(1000px 700px at 110% 10%, #efe7d6 0%, transparent 55%);
}

.label{font-family:var(--sans);text-transform:uppercase;letter-spacing:.26em;
  font-size:.72rem;font-weight:500;color:var(--clay);}

/* ---------------------------------------------------------------- top nav */
.nav{
  position:sticky;top:0;z-index:50;display:flex;align-items:center;
  justify-content:space-between;gap:1.5rem;padding:.85rem clamp(1.1rem,4vw,3rem);
  background:rgba(244,239,228,.82);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.nav .brand{font-family:var(--serif);font-size:1.45rem;font-weight:600;letter-spacing:.06em;}
.nav .links{display:flex;gap:1.4rem;flex-wrap:wrap;}
.nav .links a{font-size:.72rem;text-transform:uppercase;letter-spacing:.18em;
  color:var(--ink-soft);transition:color .25s;}
.nav .links a:hover{color:var(--clay);}
@media(max-width:720px){.nav .links{display:none;}}

/* ------------------------------------------------------------------ cover */
.cover{
  min-height:92vh;display:flex;flex-direction:column;align-items:center;
  justify-content:center;text-align:center;padding:6vh 1.5rem 8vh;position:relative;
}
.cover .kicker{margin-bottom:2.2rem;}
.cover h1{
  font-family:var(--serif);font-weight:500;letter-spacing:.12em;
  font-size:clamp(3.6rem,13vw,9rem);line-height:.95;margin:0;
}
.cover .rule{width:64px;height:1px;background:var(--clay);margin:1.8rem 0;}
.cover .sub{font-family:var(--serif);font-style:italic;font-size:clamp(1.3rem,3.4vw,2rem);
  color:var(--ink-soft);margin:0;}
.cover .period{margin-top:1.4rem;color:var(--ink-soft);}
.cover .scroll{position:absolute;bottom:2.2rem;font-size:.68rem;letter-spacing:.24em;
  text-transform:uppercase;color:var(--ink-soft);animation:bob 2.4s ease-in-out infinite;}
@keyframes bob{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(7px);opacity:1}}

/* a quiet strip of featured details under the title */
.cover .strip{display:flex;gap:1rem;margin-top:3.4rem;flex-wrap:wrap;justify-content:center;}
.cover .strip img{width:78px;height:78px;object-fit:cover;border-radius:50%;
  border:1px solid var(--line);box-shadow:0 8px 22px -14px rgba(40,32,22,.5);
  filter:saturate(.96);}

/* --------------------------------------------------------------- sections */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(1.1rem,4vw,3rem);}
.section{padding:clamp(3rem,7vw,6rem) 0 1rem;}
.section-head{display:flex;align-items:baseline;gap:1.2rem;margin-bottom:2.6rem;}
.section-head .num{font-family:var(--serif);font-size:1.5rem;color:var(--clay);
  font-style:italic;min-width:2.2ch;}
.section-head h2{font-family:var(--serif);font-weight:600;letter-spacing:.04em;
  font-size:clamp(2rem,5vw,3.1rem);margin:0;}
.section-head .meta{margin-left:auto;color:var(--ink-soft);font-size:.74rem;
  letter-spacing:.2em;text-transform:uppercase;white-space:nowrap;}
.section-head .hr{flex:1;height:1px;background:var(--line);align-self:center;}
@media(max-width:560px){.section-head .meta{display:none;}}

/* ----------------------------------------------------- gallery (masonry) */
.gallery{columns:2 360px;column-gap:clamp(1.6rem,3vw,2.6rem);}
@media(max-width:760px){.gallery{columns:1;}}

figure.work{
  break-inside:avoid;margin:0 0 clamp(1.4rem,3vw,2.6rem);
  -webkit-column-break-inside:avoid;page-break-inside:avoid;
}
figure.work .mat{
  background:var(--paper-2);padding:clamp(.5rem,1.4vw,1rem);
  border:1px solid var(--line);box-shadow:var(--shadow);
  transition:transform .5s cubic-bezier(.2,.7,.2,1),box-shadow .5s;cursor:zoom-in;
  overflow:hidden;
}
figure.work .mat img{width:100%;height:auto;transition:transform .9s cubic-bezier(.2,.7,.2,1);}
figure.work:hover .mat{transform:translateY(-6px);
  box-shadow:34px 42px 72px -36px rgba(40,32,22,.62);}
figure.work:hover .mat img{transform:scale(1.035);}
figcaption{padding:.85rem .2rem 0;text-align:center;}
figcaption .t{font-family:var(--serif);font-size:1.22rem;font-weight:500;line-height:1.2;}
figcaption .m{font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--ink-soft);margin-top:.25rem;}
figcaption .m .yr{color:var(--brass);}

/* ----------------------------------------------------------- reveal anim */
.reveal{opacity:0;transform:translateY(22px);transition:opacity .9s ease,transform .9s cubic-bezier(.2,.7,.2,1);}
.reveal.in{opacity:1;transform:none;}
@media(prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none;}
  html{scroll-behavior:auto;}.cover .scroll{animation:none;}
}

/* ------------------------------------------------------------------ foot */
.foot{margin-top:5rem;border-top:1px solid var(--line);
  padding:3rem clamp(1.1rem,4vw,3rem) 4rem;text-align:center;}
.foot .name{font-family:var(--serif);font-size:1.8rem;letter-spacing:.06em;}
.foot .rule{width:48px;height:1px;background:var(--clay);margin:1.1rem auto;}
.foot .meta{color:var(--ink-soft);font-size:.74rem;letter-spacing:.18em;text-transform:uppercase;}
.foot a:hover{color:var(--clay);}

/* --------------------------------------------------------------- lightbox */
.lb{position:fixed;inset:0;z-index:100;display:none;place-items:center;
  background:rgba(26,22,17,.93);backdrop-filter:blur(6px);padding:4vh 4vw;}
.lb.open{display:grid;animation:fade .3s ease;}
@keyframes fade{from{opacity:0}to{opacity:1}}
.lb figure{margin:0;max-width:92vw;max-height:88vh;display:flex;flex-direction:column;align-items:center;gap:1rem;}
.lb img{max-width:92vw;max-height:78vh;object-fit:contain;
  box-shadow:0 30px 80px -20px rgba(0,0,0,.7);background:#fff;}
.lb figcaption{color:#efe7d6;text-align:center;}
.lb figcaption .t{font-family:var(--serif);font-size:1.5rem;color:#fff;}
.lb figcaption .m{font-size:.72rem;letter-spacing:.18em;text-transform:uppercase;color:#c9bfab;margin-top:.3rem;}
.lb button{position:absolute;background:none;border:1px solid rgba(239,231,214,.35);
  color:#efe7d6;width:50px;height:50px;border-radius:50%;font-size:1.3rem;cursor:pointer;
  display:grid;place-items:center;transition:background .2s,border-color .2s;}
.lb button:hover{background:rgba(239,231,214,.14);border-color:#efe7d6;}
.lb .close{top:3vh;right:4vw;}
.lb .prev{left:3vw;top:50%;transform:translateY(-50%);}
.lb .next{right:3vw;top:50%;transform:translateY(-50%);}
.lb .count{position:absolute;bottom:3vh;left:0;right:0;text-align:center;
  color:#c9bfab;font-size:.72rem;letter-spacing:.22em;}
@media(max-width:600px){.lb .prev{left:1vw}.lb .next{right:1vw}.lb button{width:42px;height:42px}}

/* ---- cover portrait + theme -------------------------------------------- */
.cover .kicker{ margin-bottom:1.3rem; }
.cover .portrait-ring{
  width:min(46vw,240px); height:min(46vw,240px); margin:2.2rem auto 1.6rem;
  border-radius:50%; overflow:hidden;
}
.cover .portrait{ width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.cover .theme{ font-family:var(--serif); font-style:italic;
  font-size:clamp(1.45rem,3.6vw,2.15rem); line-height:1.25; color:var(--ink);
  margin:.2rem auto 0; max-width:24ch; }

/* ---- medium groups within a year --------------------------------------- */
.group{ margin:0 0 clamp(2rem,4vw,3.4rem); }
.group-label{ display:flex; align-items:center; gap:1rem; margin:0 0 1.1rem;
  font-family:var(--sans); text-transform:uppercase; letter-spacing:.24em;
  font-size:.74rem; font-weight:600; color:var(--clay); }
.group-label::after{ content:""; flex:1; height:1px; background:var(--line); }

/* ---- dense gallery (poster colour studies) ----------------------------- */
.gallery.dense{ columns:3 240px; column-gap:1.4rem; }
@media(max-width:760px){ .gallery.dense{ columns:2 180px; } }
.gallery.dense figure.work{ margin-bottom:1.4rem; }

.foot .foot-theme{ font-family:var(--serif); font-style:italic; font-size:1.15rem;
  color:var(--ink-soft); max-width:34ch; margin:1.1rem auto; line-height:1.4; }

/* ---- year gallery: medium labels span full width above each gallery --- */
.yeargallery .group-label{ width:100%; margin:1.8rem 0 1.2rem; }
