/* KK TAM – Gallery edition: white walls, uncropped works, wall labels */
:root{
  --wall:#f7f7f4; --mat:#ebebe6; --ink:#222; --muted:#6c6b66; --rule:#d8d7d0; --sold:#a8261d;
  --serif:"Cormorant Garamond",Georgia,"Times New Roman",serif;
  --sans:"Hanken Grotesk",system-ui,-apple-system,"Segoe UI",sans-serif;
  --max:1400px; --head:68px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--head) + 1rem)}
body{font-family:var(--sans);background:var(--wall);color:var(--ink);line-height:1.65;min-height:100vh;display:flex;flex-direction:column;-webkit-font-smoothing:antialiased}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
a:focus-visible,button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}
h1,h2,h3,h4{font-family:var(--serif);font-weight:400;line-height:1.15}
main{flex:1}
.container{max-width:var(--max);margin:0 auto;padding:0 2rem}

/* Header */
.site-header{position:sticky;top:0;z-index:100;height:var(--head);background:color-mix(in srgb,var(--wall) 92%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--rule)}
.header-inner{max-width:var(--max);margin:0 auto;padding:0 2rem;height:100%;display:flex;align-items:center;justify-content:space-between}
.logo{font-family:var(--serif);font-size:1.35rem;font-weight:500;letter-spacing:.16em}
.nav{display:flex;gap:2.25rem;list-style:none}
.nav a{font-size:.88rem;letter-spacing:.04em;color:var(--muted);padding-bottom:.3rem;border-bottom:1px solid transparent;transition:color .2s,border-color .2s}
.nav a:hover,.nav a.active{color:var(--ink);border-bottom-color:var(--ink)}
.nav-toggle{display:none;background:none;border:none;color:var(--ink);font-size:1.5rem;cursor:pointer}

/* Home: one work hung large, with its label */
.hero{padding:3.5rem 0 1rem}
.hero-name{font-size:clamp(2.6rem,7vw,5.5rem);font-weight:300;letter-spacing:.01em;line-height:1.02}
.hero-name span{font-style:italic;color:var(--muted)}
.hero .tagline{margin-top:1rem;color:var(--muted);font-size:1rem}
.hero-wall{display:grid;grid-template-columns:minmax(0,1fr) 15rem;gap:2.5rem;align-items:end;margin-top:3rem;padding:3rem;background:var(--mat);min-height:50vh}
.hero-wall img{max-height:72vh;width:auto;max-width:100%;margin:0 auto;box-shadow:0 1px 2px rgba(0,0,0,.12),0 12px 32px rgba(0,0,0,.12)}
.wall-label strong{display:block;font-family:var(--serif);font-style:italic;font-weight:500;font-size:1.45rem;line-height:1.2;margin-bottom:.5rem}
.wall-label span{display:block;font-size:.82rem;color:var(--muted)}
.hero-intro{max-width:44rem;margin:3rem 0 0;font-family:var(--serif);font-size:1.4rem;line-height:1.55}
.hero-intro p+p{margin-top:1rem;font-family:var(--sans);font-size:.98rem;color:var(--muted);line-height:1.75}
.hero-cta{display:flex;gap:1.5rem;margin-top:2rem;flex-wrap:wrap}
.btn{display:inline-block;padding:.75rem 1.6rem;border:1px solid var(--ink);color:var(--ink);font-size:.88rem;letter-spacing:.03em;background:transparent;transition:background .2s,color .2s}
.btn:hover,.btn-solid{background:var(--ink);color:var(--wall)}
.btn-solid:hover{background:transparent;color:var(--ink)}

/* Sections */
.section{padding:4rem 0}
.section-title{font-size:2.2rem;font-weight:300;margin-bottom:.6rem}
.section-intro{color:var(--muted);max-width:38rem;margin:0 0 2.5rem;font-size:.98rem}
.about-teaser{border-top:1px solid var(--rule)}

/* Gallery: natural proportions, wall-label captions */
.gallery-grid,.works-grid{column-count:3;column-gap:3rem}
.gallery-item{break-inside:avoid;margin:0 0 3.25rem;position:relative}
.gallery-item>a,.gallery-item>img{display:block}
.gallery-item img{width:100%;height:auto;background:var(--mat);transition:opacity .25s}
.gallery-item{cursor:pointer}
.gallery-item:hover img{opacity:.88}
.gallery-item figcaption{padding-top:.85rem}
.gallery-item figcaption strong{display:block;font-family:var(--serif);font-style:italic;font-weight:500;font-size:1.2rem;line-height:1.25;margin-bottom:.2rem}
.gallery-item figcaption span{display:block;font-size:.8rem;color:var(--muted);line-height:1.45}
.gallery-item figcaption span:empty{display:none}
.collection{margin-bottom:3rem}
.collection-title{font-size:2rem;font-weight:300;margin-bottom:2rem;padding-bottom:.6rem;border-bottom:1px solid var(--rule)}

/* Works controls */
.view-controls{margin-bottom:3rem;padding-bottom:1.5rem;border-bottom:1px solid var(--rule)}
.view-toggle{display:flex;gap:1.75rem;margin-bottom:1.25rem}
.view-btn{background:none;border:none;border-bottom:1px solid transparent;padding:0 0 .3rem;font:inherit;font-size:.95rem;color:var(--muted);cursor:pointer}
.view-btn:hover,.view-btn.active{color:var(--ink);border-bottom-color:var(--ink)}
.year-nav,.medium-nav,.series-nav{display:flex;flex-wrap:wrap;gap:.4rem 1.1rem}
.year-nav a,.medium-nav a,.series-nav a{font-size:.85rem;color:var(--muted)}
.year-nav a:hover,.medium-nav a:hover,.series-nav a:hover{color:var(--ink);text-decoration:underline;text-underline-offset:4px}
.medium-nav[hidden],.year-nav[hidden],.series-nav[hidden]{display:none!important}

/* Sold / private */
.gallery-item.sold img{filter:brightness(.8)}
.sold-badge,.private-badge{position:absolute;top:.6rem;z-index:3;background:var(--wall);font-size:.7rem;letter-spacing:.06em;padding:.25rem .55rem}
.sold-badge{right:.6rem;color:var(--sold)}
.private-badge{left:.6rem;color:var(--muted)}
.sold-label{font-style:normal;color:var(--sold);font-size:.75em;margin-left:.4rem;font-family:var(--sans)}
.private-label{font-style:normal;color:var(--muted);font-size:.75em;margin-left:.4rem;font-family:var(--sans)}

/* Inner page headers */
.page-header{padding:4.5rem 0 2.5rem;margin-bottom:3rem}
.page-header .container{border-bottom:1px solid var(--rule);padding-bottom:2rem}
.page-header h1{font-size:clamp(2.6rem,7vw,4.8rem);font-weight:300}
.page-header p{color:var(--muted);margin-top:.6rem}

/* About */
.about-content{max-width:44rem}
.about-bio{font-family:var(--serif);font-size:1.45rem;line-height:1.6;margin-bottom:4rem}
.about-bio p+p{margin-top:1rem}
.cv-section{margin-bottom:3.5rem}
.cv-section h3{font-size:1.7rem;font-weight:300;margin-bottom:1rem;padding-bottom:.5rem;border-bottom:1px solid var(--rule)}
.cv-item{display:grid;grid-template-columns:1fr auto;gap:.5rem 1.5rem;padding:.8rem 0;border-bottom:1px solid var(--rule);font-size:.95rem}
.cv-item:last-child{border-bottom:none}
.cv-meta{color:var(--muted);font-size:.88rem}
.cv-year{color:var(--muted);white-space:nowrap;text-align:right}

/* Contact & shop */
.contact-grid{display:grid;gap:2.5rem;max-width:34rem}
.contact-item h3{font-family:var(--sans);font-size:.85rem;font-weight:500;color:var(--muted);margin-bottom:.4rem}
.contact-item a{font-family:var(--serif);font-size:1.7rem;border-bottom:1px solid var(--rule);word-break:break-all}
.contact-item a:hover{border-bottom-color:var(--ink)}
.social-links{display:flex;gap:2rem;margin-top:.3rem}
.shop-panel{max-width:40rem}
.shop-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2rem;margin:2rem 0}
.shop-example{margin:0;position:relative;background:var(--mat)}
.shop-example img{width:100%;aspect-ratio:1;object-fit:cover}
.sample-stamp{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%) rotate(-35deg);font-size:clamp(1.4rem,4vw,2rem);letter-spacing:.2em;color:#fff;opacity:.55;pointer-events:none;text-shadow:0 1px 8px rgba(0,0,0,.35)}
.shop-cta{margin:1.5rem 0 1rem}
.shop-note{font-size:.85rem;color:var(--muted)}
.shop-note a{text-decoration:underline;text-underline-offset:3px}

/* Footer */
.site-footer{border-top:1px solid var(--rule);padding:2rem 0;margin-top:4rem;color:var(--muted);font-size:.85rem}
.site-footer a:hover{color:var(--ink)}

/* Lightbox: viewed against the same white wall */
.lightbox{position:fixed;inset:0;z-index:1000;background:color-mix(in srgb,var(--wall) 97%,transparent);display:flex;align-items:center;justify-content:center;opacity:0;visibility:hidden;transition:opacity .25s,visibility .25s;padding:1.5rem}
.lightbox.open{opacity:1;visibility:visible}
.lightbox-inner{max-width:min(1000px,100%);max-height:94vh;text-align:center}
.lightbox-inner img{max-height:72vh;width:auto;margin:0 auto 1.25rem;box-shadow:0 12px 40px rgba(0,0,0,.18)}
.lightbox-caption{color:var(--muted);font-size:.88rem}
.lightbox-caption strong{display:block;font-family:var(--serif);font-style:italic;font-weight:500;font-size:1.5rem;color:var(--ink);margin-bottom:.25rem}
.lightbox-close{position:absolute;top:1rem;right:1.5rem;background:none;border:none;color:var(--ink);font-size:2.2rem;cursor:pointer;line-height:1;opacity:.6}
.lightbox-close:hover{opacity:1}
.lightbox-related{margin:1.25rem auto 0;max-width:min(720px,100%)}
.lightbox-related-label{font-size:.8rem;color:var(--muted);margin-bottom:.5rem}
.lightbox-related-strip{display:flex;gap:.55rem;overflow-x:auto;padding:.25rem .15rem .6rem;scroll-snap-type:x mandatory}
.lightbox-thumb{flex:0 0 auto;width:68px;height:68px;padding:0;border:2px solid transparent;overflow:hidden;cursor:pointer;background:var(--mat);position:relative;scroll-snap-align:start;opacity:.65;transition:opacity .2s}
.lightbox-thumb:hover,.lightbox-thumb.active{opacity:1}
.lightbox-thumb.active{border-color:var(--ink)}
.lightbox-thumb img{width:100%;height:100%;object-fit:cover;margin:0;max-height:none;box-shadow:none}
.lightbox-thumb-badge{position:absolute;bottom:2px;left:2px;right:2px;background:var(--sold);color:#fff;font-size:.55rem;text-align:center}

.text-center{text-align:center}.mt-2{margin-top:2rem}.mb-2{margin-bottom:2rem}

@media (max-width:980px){.gallery-grid,.works-grid{column-count:2;column-gap:2rem}.hero-wall{grid-template-columns:1fr;padding:1.5rem}}
@media (max-width:768px){
  .container,.header-inner{padding:0 1.25rem}
  .nav{display:none;position:absolute;top:var(--head);left:0;right:0;background:var(--wall);flex-direction:column;padding:1.5rem 1.25rem;gap:1rem;border-bottom:1px solid var(--rule)}
  .nav.open{display:flex}.nav-toggle{display:block}
  .cv-item{grid-template-columns:1fr}.cv-year{text-align:left}
}
@media (max-width:560px){.gallery-grid,.works-grid{column-count:1}.shop-examples{grid-template-columns:1fr}.hero-wall{padding:1rem}}
@media (prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}

/* ===== Dark theme (default) ===== */
:root{--spot:rgba(255,255,255,.5);--shadow:rgba(0,0,0,.14)}
:root[data-theme="dark"]{--wall:#141414;--mat:#1e1e1d;--ink:#ecebe6;--muted:#a09f99;--rule:#2f2f2c;--sold:#e66a5f;--spot:rgba(255,236,200,.2);--shadow:rgba(0,0,0,.6);color-scheme:dark}
:root[data-theme="dark"] .hero-wall{background:#0a0a0a}
:root[data-theme="dark"] .btn-solid,:root[data-theme="dark"] .btn:hover{color:#141414}
:root[data-theme="dark"] .sample-stamp{opacity:.7}
.hero-wall img,.lightbox-inner img{box-shadow:0 14px 40px var(--shadow)}
.theme-toggle{background:none;border:1px solid var(--rule);color:var(--muted);font:inherit;font-size:.8rem;padding:.35rem .9rem;cursor:pointer;margin-left:2rem;transition:color .2s,border-color .2s}
.theme-toggle:hover{color:var(--ink);border-color:var(--ink)}

/* ===== Motion ===== */
@keyframes rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@keyframes unveil{from{clip-path:inset(0 0 100% 0);transform:scale(1.07)}to{clip-path:inset(0);transform:scale(1)}}
@keyframes draw{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes fade{from{opacity:0}to{opacity:1}}

/* Opening: name rises, the work is unveiled, then its label arrives */
.hero-name{animation:rise 1.1s cubic-bezier(.2,.7,.2,1) both}
.hero .tagline{animation:rise 1.1s .15s cubic-bezier(.2,.7,.2,1) both}
.hero-wall{position:relative;overflow:hidden;animation:fade .8s .3s both}
.hero-wall::before{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle 420px at var(--mx,30%) var(--my,35%),var(--spot),transparent 70%);transition:background-position .1s}
.hero-wall>*{position:relative}
.hero-wall img{animation:unveil 1.6s .6s cubic-bezier(.65,0,.15,1) both}
.hero-wall .wall-label{animation:fade 1s 1.9s both}

/* Inner pages: title rises, rule draws across */
.page-header h1{animation:rise 1s cubic-bezier(.2,.7,.2,1) both}
.page-header .container{position:relative;border-bottom:none}
.page-header .container::after{content:"";position:absolute;left:2rem;right:2rem;bottom:0;height:1px;background:var(--rule);transform-origin:left;animation:draw 1.4s .2s cubic-bezier(.65,0,.15,1) both}

/* Works are uncovered as you scroll to them */
.js .gallery-item img{transition:clip-path 1.1s cubic-bezier(.65,0,.15,1),opacity .25s}
.js .gallery-item:not(.in) img{clip-path:inset(0 0 100% 0)}
.js .gallery-item.in img{clip-path:inset(0)}
.js .gallery-item figcaption{transition:opacity .9s .35s}
.js .gallery-item:not(.in) figcaption{opacity:0}

/* Lightbox opens with a gentle push-in */
.lightbox-inner{transform:scale(.96);opacity:0;transition:transform .5s cubic-bezier(.2,.7,.2,1),opacity .4s}
.lightbox.open .lightbox-inner{transform:none;opacity:1}

@media (max-width:768px){.theme-toggle{margin-left:0;align-self:flex-start}}
@media (prefers-reduced-motion:reduce){
  .hero-name,.hero .tagline,.hero-wall,.hero-wall img,.hero-wall .wall-label,.page-header h1,.page-header .container::after{animation:none!important}
  .js .gallery-item:not(.in) img{clip-path:none}.js .gallery-item:not(.in) figcaption{opacity:1}
  .hero-wall::before{display:none}
}


/* Wider screens: expand layout */
@media (min-width: 1400px) {
  :root { --max: 1600px; }
  .gallery-grid, .works-grid { column-count: 4; column-gap: 2.5rem; }
}
@media (min-width: 1800px) {
  :root { --max: 1800px; }
  .gallery-grid, .works-grid { column-count: 5; column-gap: 2.25rem; }
}
@media (min-width: 2200px) {
  :root { --max: 2100px; }
  .gallery-grid, .works-grid { column-count: 6; column-gap: 2rem; }
}
