/* pohuilin.com — Pacific Northwest palette, fireweed pink accent.
   Light: fog / Douglas fir / slate / fireweed. Dark: basalt / off-white / rose, no green. */

@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("fonts/nunito-800.woff2") format("woff2"); }

:root {
  --bg: #f5f4ef;
  --text: #1e2a24;
  --heading: #2c4a3a;
  --muted: #4a5560;
  --accent: #b8406f;
  --on-accent: #ffffff;
  --icon: #2c4a3a;
  --hero-fade: rgb(28 38 32 / .75);
  --accent-weight: 800;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18191b;
    --text: #ebe8e6;
    --heading: #ebe8e6;
    --muted: #aaa6a3;
    --accent: #e3a3bb;
    --on-accent: #18191b;
    --icon: #e3a3bb;
    --hero-fade: rgb(20 20 22 / .8);
    --accent-weight: 700;
  }
  img { filter: brightness(.88); }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 "Nunito", system-ui, sans-serif;
  overflow-wrap: break-word;
}
h1, h2, h3 { color: var(--heading); font-weight: 800; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
a { color: var(--accent); font-weight: var(--accent-weight); text-underline-offset: 3px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img { display: block; max-width: 100%; height: auto; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.fill { width: 100%; height: 100%; object-fit: cover; }
.icon { flex: none; color: var(--icon); }

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: clamp(2rem, 5vw, 3.5rem) 1.25rem 0; }
h2 { display: flex; align-items: center; gap: .6rem; font-size: clamp(1.4rem, 3.5vw, 1.75rem); margin-bottom: 1rem; }
main { padding-bottom: 4rem; }

/* Hero */
.hero { position: relative; height: min(70vh, 640px); min-height: 320px; overflow: hidden; }
.hero > picture { position: absolute; inset: 0; display: block; }
.hero-text {
  position: absolute; inset: auto 0 0 0;
  padding: 5rem max(1.25rem, calc((100% - var(--max)) / 2 + 1.25rem)) 1.75rem;
  background: linear-gradient(transparent, var(--hero-fade));
  color: #fff;
}
.hero h1 { color: #fff; font-size: clamp(2.2rem, 6vw, 3.5rem); }
.hero p { margin: .35rem 0 0; font-size: 1.1rem; }
.role { white-space: nowrap; }
.quick { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin-top: .8rem; }
.quick a { color: #fff; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 1px; }
.quick a:hover, .quick a:focus-visible { border-bottom-color: #fff; }
.hero.plain .quick a { color: var(--accent); }
.hero.plain { height: auto; min-height: 0; }
.hero.plain .hero-text { position: static; background: none; color: var(--text); padding-top: clamp(3rem, 10vw, 6rem); padding-bottom: 0; }
.hero.plain h1 { color: var(--heading); }

/* What I'm up to */
.now { list-style: none; margin: 0; padding: 0; }
.now li { position: relative; padding-left: 1.4rem; margin-bottom: .55rem; }
.now li::before { content: ""; position: absolute; left: .2rem; top: .6em; width: .55rem; height: .55rem; border-radius: 50%; background: var(--accent); }

/* Where to find me */
.avatar { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; }
.hi-links { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.button { display: inline-block; padding: .6rem 1.2rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); text-decoration: none; }
.button:hover { text-decoration: underline; }

/* Things I've built */
.proj { display: flex; gap: 1rem; align-items: flex-start; justify-content: space-between; margin-bottom: 1.4rem; }
.proj > div { flex: 1; min-width: 0; }
.proj h3 { font-size: 1.1rem; color: var(--text); margin-bottom: .15rem; }
.proj p { margin: 0; }
.proj p a { margin-left: .4rem; white-space: nowrap; }
.enlarge { flex: none; line-height: 0; border-radius: 10px; }
.enlarge:hover .thumb, .enlarge:focus-visible .thumb { opacity: .85; }

/* Enlarged photo overlay (opens via #photo-… link, closes via #close / Esc) */
.lightbox { display: none; position: fixed; inset: 0; z-index: 10; place-items: center; padding: 3rem 1rem 1rem; background: rgb(15 16 18 / .97); }
.lightbox:target { display: grid; }
.lb-backdrop { position: absolute; inset: 0; }
/* Frame width is known before anything loads (--r = aspect ratio, --w = file width). The cached
   small image (.lb-ph) sits under the large one (.lb-img) in the same grid cell. */
.lightbox .lb-frame { position: relative; display: grid; width: min(100vw - 2rem, var(--w), (100vh - 7rem) * var(--r)); border-radius: 6px; overflow: hidden; }
.lightbox .lb-frame > img { grid-area: 1 / 1; width: 100%; height: auto; border-radius: 0; filter: none; }
.lightbox .lb-frame > .lb-ph { height: 100%; } /* small file's aspect can round 1–2px short */
.lightbox { grid-template-rows: auto auto; align-content: center; }
.lb-caption { position: relative; margin: .75rem 0 0; color: #eee; font-size: .95rem; text-align: center; max-width: 60ch; }
.lb-close { position: absolute; top: .5rem; right: 1rem; color: #fff; font-size: 2.2rem; line-height: 1; text-decoration: none; padding: .25rem .5rem; }
.lb-close:focus-visible { outline: 3px solid #fff; }
.thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; }
@media (max-width: 600px) { .proj .thumb { width: 56px; height: 56px; } }
.project h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: 1rem 0 .5rem; }
.project img { border-radius: 10px; margin: 1rem 0 1.5rem; }
.lede { color: var(--muted); font-size: 1.1rem; }

/* How I got here: years in their own column, a glowing line, entries to the right */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; column-gap: 1.25rem; align-items: start; position: relative; padding-bottom: 1.1rem; }
.timeline li::before { content: ""; position: absolute; left: calc(3.5rem + .6rem); top: 0; bottom: 0; width: 2px; background: var(--accent); }
.timeline li::after { content: ""; position: absolute; left: calc(3.5rem + .6rem - 2px); top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline li.new-year::after { left: calc(3.5rem + .6rem - 4px); top: .45em; width: 10px; height: 10px; }
.timeline li:first-child::before { top: .45em; }
.timeline li:last-child::before { bottom: auto; height: .9em; }
.year { color: var(--accent); font-weight: var(--accent-weight); font-size: .95rem; text-align: right; font-variant-numeric: tabular-nums; }
.tl-body { min-width: 0; overflow-wrap: anywhere; padding-left: .6rem; }
.timeline .thumb { width: 56px; height: 56px; }
.timeline li > div { min-width: 0; }
/* Photo bands */
.band { margin: clamp(2.5rem, 6vw, 4rem) 0 0; }
.band .enlarge { display: block; cursor: zoom-in; }
.band img { width: 100%; height: clamp(200px, 40vw, 420px); }
.band figcaption { max-width: var(--max); margin: .5rem auto 0; padding: 0 1.25rem; color: var(--muted); font-size: .95rem; }

/* Where I've been */
.more { margin-top: .5rem; }
.photos-page h1 { font-size: clamp(2rem, 5vw, 2.6rem); margin: 1rem 0 1.5rem; }
.wrap.wide { max-width: 72rem; }
/* Justified rows: each photo's width grows with its aspect ratio (--r), so every
   row ends flush and photos keep their shape. */
.gallery { display: flex; flex-wrap: wrap; gap: 1rem; }
.gallery figure { margin: 0; flex-grow: var(--r); flex-basis: calc(var(--r) * 13rem); min-width: 0; }
.gallery::after { content: ""; flex-grow: 1; }
.gallery .enlarge { display: block; cursor: zoom-in; }
.gallery img { width: 100%; height: auto; border-radius: 10px; }
.gallery figcaption { color: var(--muted); font-size: .9rem; margin-top: .3rem; line-height: 1.3; }
@media (max-width: 600px) { .gallery { gap: .6rem; } .gallery figure { flex-basis: calc(var(--r) * 8rem); } }
