/* Kerry Gyekis: writing & photography. A separate look from the forestry pages. */
@font-face{font-family:"Pagella";src:url(fonts/pagella.woff) format("woff");font-weight:400;font-display:swap}
@font-face{font-family:"Pagella";src:url(fonts/pagella-bold.woff) format("woff");font-weight:700;font-display:swap}
@font-face{font-family:"Pagella";src:url(fonts/pagella-italic.woff) format("woff");font-style:italic;font-display:swap}

:root{
  --graphite:#2A2C2B;  /* gallery walls, ink */
  --graphite-2:#353836;
  --paper:#FFFFFF;
  --stone:#6A665E;     /* secondary text on paper */
  --brass:#B4914A;     /* accent on dark */
  --brass-ink:#7E6224; /* accent on paper (AA contrast) */
  --mist:#E9E7E1;      /* text on dark */
  --rule:#DEDBD3;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font:400 1.2rem/1.62 "Pagella","Palatino Linotype",Palatino,"Book Antiqua",Georgia,serif;color:var(--graphite);background:var(--paper)}
img{max-width:100%;height:auto}
a{color:var(--brass-ink);text-underline-offset:3px}
:focus-visible{outline:2px solid var(--brass);outline-offset:3px}
.wrap{max-width:70rem;margin:0 auto;padding:0 1.25rem}

/* masthead shared by writing, photography */
.mast{border-bottom:1px solid var(--rule)}
.mast .wrap{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:.5rem 2rem;padding-top:1.25rem;padding-bottom:1.1rem}
.mast .name{font-size:1.45rem;font-weight:700;color:inherit;text-decoration:none;letter-spacing:.02em}
.mast ul{list-style:none;display:flex;flex-wrap:wrap;gap:.25rem 1.5rem;margin:0;padding:0;font-size:1.05rem}
.mast ul a{color:inherit;text-decoration:none;padding:.35rem 0;display:inline-block;border-bottom:1px solid transparent}
.mast ul a:hover,.mast ul a[aria-current]{border-bottom-color:var(--brass)}
.mast .home{color:var(--stone)}

/* writing */
.intro{padding:3.5rem 0 1rem}
.intro h1{font-size:clamp(2.2rem,1.4rem + 3vw,3.5rem);line-height:1.08;font-weight:400;margin:0 0 .75rem;letter-spacing:-.01em}
.intro p{font-style:italic;color:var(--stone);margin:0;font-size:1.25rem}
.year{display:grid;grid-template-columns:9rem minmax(0,1fr);gap:2rem;padding:2rem 0;border-top:1px solid var(--rule)}
.year:first-of-type{border-top:0}
.year h2{margin:0;font-size:1.6rem;font-weight:400;color:var(--brass-ink);font-style:italic;line-height:1.3}
.pieces{list-style:none;margin:0;padding:0}
.pieces li{padding:0 0 1.75rem;max-width:42rem}
.pieces a.t{font-size:1.4rem;font-weight:700;color:var(--graphite);text-decoration:none;line-height:1.3;background-image:linear-gradient(var(--brass),var(--brass));background-size:0 1px;background-repeat:no-repeat;background-position:0 100%;transition:background-size .25s}
.pieces a.t:hover{background-size:100% 1px}
.pieces .meta{font-size:.95rem;color:var(--stone);margin:.1rem 0 .4rem}
.pieces .meta abbr{text-decoration:none;letter-spacing:.04em}
.pieces p{margin:0;color:#45433E}
.novel{background:var(--graphite);color:var(--mist);margin-top:2rem}
.novel .wrap{display:grid;grid-template-columns:auto minmax(0,1fr);gap:2.5rem;align-items:center;padding-top:3rem;padding-bottom:3rem}
.novel img{width:150px;display:block;box-shadow:0 14px 30px -12px #000a}
.novel h2{margin:0 0 .25rem;font-size:2rem;font-weight:400;font-style:italic;color:#fff}
.novel p{margin:0 0 1rem;max-width:36rem}
.novel a{color:var(--brass)}

/* photography (dark gallery) */
body.gallery{background:var(--graphite);color:var(--mist)}
.gallery .mast{border-color:#ffffff1f}
.gallery .mast .home{color:#B9B5AC}
.gallery a{color:var(--brass)}
.gallery .intro p{color:#B9B5AC}
.grid{display:flex;flex-wrap:wrap;gap:.6rem;padding:1.5rem 0 4rem}
.grid::after{content:"";flex-grow:999}
.shot{margin:0;flex-grow:var(--r);flex-basis:calc(var(--r) * 15rem);max-width:calc(var(--r) * 26rem)}
.shot a{display:block;position:relative;overflow:hidden;background:#1f2120;text-decoration:none}
.shot img{display:block;width:100%;height:auto;aspect-ratio:var(--r);object-fit:cover;transition:transform .5s ease,opacity .3s}
.shot a:hover img{transform:scale(1.025)}
.shot figcaption{padding:.5rem .1rem 1rem;font-size:1rem;line-height:1.35}
.shot figcaption b{font-weight:400;color:#fff;display:block}
.shot figcaption span{color:#A7A398;font-size:.9rem;font-style:italic}

/* lightbox */
.lb{position:fixed;inset:0;margin:0;max-width:none;max-height:none;width:100%;height:100%;padding:0;border:0;background:#141514;color:var(--mist)}
.lb::backdrop{background:transparent}
.lb[open]{display:grid;grid-template-rows:auto 1fr auto;align-items:center}
.lb .bar{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem;font-size:.95rem;color:#B9B5AC}
.lb figure{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:0;height:100%;padding:0 4.5rem}
.lb img{max-width:min(100%,1000px);max-height:calc(100vh - 11rem);width:auto;height:auto;object-fit:contain;box-shadow:0 20px 60px #000c}
.lb figcaption{margin-top:1rem;text-align:center}
.lb figcaption b{display:block;font-weight:400;font-size:1.3rem;color:#fff}
.lb figcaption span{font-style:italic;color:#B9B5AC}
.lb button{font:inherit;background:none;border:1px solid #ffffff33;color:#fff;border-radius:999px;cursor:pointer}
.lb .close{padding:.35rem .9rem}
.lb .prev,.lb .next{position:absolute;top:50%;transform:translateY(-50%);width:3rem;height:3rem;font-size:1.4rem;line-height:1}
.lb .prev{left:.75rem}.lb .next{right:.75rem}
.lb button:hover{border-color:var(--brass);color:var(--brass)}
.lb .foot{height:1rem}

/* page footer */
.end{border-top:1px solid var(--rule);font-size:.95rem;color:var(--stone)}
.gallery .end{border-color:#ffffff1f;color:#A7A398}
.end .wrap{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;padding-top:1.25rem;padding-bottom:1.5rem}

@media (max-width:44rem){
  .year{grid-template-columns:1fr;gap:.75rem;padding:1.5rem 0}
  .novel .wrap{grid-template-columns:1fr;gap:1.5rem}
  .novel img{width:130px}
  .grid{gap:1rem}
  .shot{flex-basis:100%;max-width:none}
  .lb figure{padding:0 .75rem}
  .lb .prev,.lb .next{top:auto;bottom:.75rem;transform:none}
  .lb[open]{grid-template-rows:auto 1fr 4.5rem}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
