/*
  lysssky.art: absolute white, one typeface (Inter), one type scale.
  --t   body text: bio, CV, captions, contact
  --t-s labels: menu, section headings, CV sub-lines
*/
:root {
  --fg: #000;
  --mut: #888;
  --soft: #666;
  --line: #eaeaea;
  --t: 0.9rem;
  --t-s: 0.82rem;
  --lh: 1.65;
  --side: 260px;
}
* { box-sizing: border-box; }
html { background: #fff; color-scheme: light; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #fff;
  color: var(--fg);
  font: 400 var(--t)/var(--lh) "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
strong { font-weight: 600; }

/* ---------- Menu ---------- */
.side { position: fixed; top: 40px; left: 40px; z-index: 100; max-width: calc(var(--side) - 56px); }
.brand { display: block; margin: 0 0 16px; font-size: var(--t-s); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.menu { display: none; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav-group { margin-bottom: 8px; }
.nav a { display: block; color: var(--mut); font-size: var(--t-s); letter-spacing: 0.05em; transition: color .15s; }
.nav a:hover, .nav a[aria-current="page"], .nav a.on { color: #000; }
.nav .sub-link { margin-top: 4px; padding-left: 12px; }
.nav .sub-link::before { content: "\2014\00a0"; }
.foot { margin: 32px 0 0; color: var(--mut); font-size: var(--t-s); }

/* ---------- Selected works: full-screen, scroll snapping ---------- */
main.snap {
  height: 100vh;
  height: 100dvh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}
main.snap::-webkit-scrollbar { display: none; }
.gallery-container { width: 100%; display: flex; flex-direction: column; }
.work-item {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 40px 40px var(--side);
}
.media-wrapper { width: 100%; max-width: 900px; max-height: 70vh; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.media-wrapper img, .media-wrapper video { display: block; width: auto; height: auto; max-width: 100%; max-height: 70vh; object-fit: contain; }
.meta { width: 100%; max-width: 900px; margin-top: 30px; text-align: left; letter-spacing: 0.02em; }
.work-item > .meta:first-child { margin-top: 0; }
.meta p { margin: 0.8em 0 0; }

/* ---------- About, CV, Contact ---------- */
main.page { max-width: 1040px; margin: 0 auto; padding: 40px 40px 80px var(--side); }
main.center { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
main.page section { margin-bottom: 64px; }
main.page section:last-child { margin-bottom: 0; }
h2 {
  margin: 0 0 24px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-s);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: var(--lh);
}
main.page p { margin: 0 0 16px; max-width: 78ch; }
.pdf-link { display: inline-block; margin-bottom: 24px; color: var(--mut); font-size: var(--t-s); text-decoration: underline; text-underline-offset: 3px; transition: color .15s; }
.pdf-link:hover { color: #000; }
.cv-row { display: flex; margin-bottom: 20px; }
.cv-year { width: 90px; flex-shrink: 0; color: var(--soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.cv-detail { flex-grow: 1; min-width: 0; }
.cv-subtext { display: block; margin-top: 4px; color: var(--soft); font-size: var(--t-s); }
main.page a:not(.pdf-link) { text-decoration: underline; text-decoration-color: #bbb; text-underline-offset: 3px; }
main.page a:not(.pdf-link):hover { text-decoration-color: #000; }

.contact-email { margin: 24px 0 !important; font-size: 1.1rem; font-weight: 600; letter-spacing: 0.02em; }
.contact-email a { text-decoration: none !important; }
.contact-email a:hover { text-decoration: underline !important; }
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; }
.contact-links a, .contact-links span { font-weight: 500; text-decoration: none !important; border-bottom: 1px solid transparent; }
.contact-links a:hover { border-bottom-color: #000; }


/* ---------- Swipe galleries (several images/videos in one work) ---------- */
.slider { width: 100%; max-width: 900px; }
.slides {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: center;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  cursor: grab;
}
.slides::-webkit-scrollbar { display: none; }
.slides.drag { cursor: grabbing; }
.slides:focus-visible { outline-offset: 6px; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: center; scroll-snap-stop: always; display: flex; justify-content: center; align-items: center; }
.slides img { -webkit-user-drag: none; user-select: none; }
.dots { height: 32px; display: flex; justify-content: center; align-items: center; gap: 8px; }  /* 32px between image and caption */
.dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #d4d4d4; cursor: pointer; transition: background .2s, transform .2s; position: relative; }
.dots button::after { content: ""; position: absolute; inset: -9px; }
.dots button.on { background: #000; transform: scale(1.15); }
.caps { display: grid; width: 100%; }
.caps .meta { grid-area: 1 / 1; margin-top: 0; }
.caps.each .meta { visibility: hidden; }
.caps.each .meta.on { visibility: visible; }

/* ---------- Bio photos and menu image ---------- */
.bio-grid { display: grid; gap: 40px; align-items: start; grid-template-columns: minmax(0, 1fr) var(--pw, 260px); }
.bio-grid.pos-left { grid-template-columns: var(--pw, 260px) minmax(0, 1fr); }
.bio-grid.pos-top { grid-template-columns: minmax(0, 1fr); gap: 28px; }
.bio-photos { display: flex; flex-direction: column; gap: 16px; }
.bio-grid.pos-top .bio-photos { flex-direction: row; flex-wrap: wrap; }
.bio-grid.pos-top .bio-photo { width: var(--pw, 260px); max-width: 100%; }
.bio-photo { margin: 0; }
.bio-photo img { display: block; width: 100%; height: auto; }
.bio-photo figcaption { margin-top: 8px; color: var(--soft); font-size: var(--t-s); }
.bio-text p:last-child { margin-bottom: 0; }
.menu-img { display: block; margin: 20px 0 0; }
.menu-img img { display: block; max-width: 100%; height: auto; }
.nav + .menu-img { margin: 28px 0 0; }


/* ---------- News / Press / Events: scrolling pages ---------- */
.feed-head { margin-bottom: 56px; }
.feed-head p:last-child { margin-bottom: 0; }
.sec-head { margin: 8px 0 32px; }
.sec-title { margin: 0 0 8px; font-size: var(--t); font-weight: 600; letter-spacing: 0.02em; }
.sec-head p { margin: 0 0 12px; }
.series + .series { margin-top: 24px; }
main.feed .series { margin: 0 0 24px; max-width: none; }
.post { margin: 0 0 72px; max-width: 900px; }
.post:last-child { margin-bottom: 0; }
.post-large .media-wrapper { max-height: 70vh; }
.post-large .meta { margin-top: 18px; max-width: none; }
.post-large .slider + .meta, .post-large .caps .meta { margin-top: 0; }
.post-media { display: flex; flex-direction: column; gap: 12px; }
.post-media .media-wrapper { max-height: none; }
.post-media img, .post-media video { width: 100%; max-width: 100%; max-height: none; height: auto; }
.post-left, .post-right { display: grid; gap: 32px; align-items: start; grid-template-columns: var(--pw, 320px) minmax(0, 1fr); }
.post-right { grid-template-columns: minmax(0, 1fr) var(--pw, 320px); }
.post-right .post-media { order: 2; }
.post-body { min-width: 0; }
.post-desc p { margin: 0.8em 0 0 !important; max-width: 68ch; }
main.page .post-title { margin: 0; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
  .side {
    inset: 0 0 auto 0;
    max-width: none;
    max-height: 100vh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 14px 20px;
    padding-top: max(14px, env(safe-area-inset-top));
    background: #fff;
  }
  .top { display: flex; align-items: center; justify-content: space-between; }
  .brand { margin: 0; }
  .menu {
    display: inline-block;
    border: 1px solid #000;
    border-radius: 999px;
    background: #fff;
    color: #000;
    font: inherit;
    font-size: var(--t-s);
    padding: 5px 14px;
    cursor: pointer;
  }
  .nav, .foot, .menu-img { display: none; }
  .nav { padding: 24px 0 8px; }
  .side.open .nav { display: flex; }
  .side.open .foot { display: block; margin: 12px 0 8px; }
  .side.open .menu-img { display: block; margin: 20px 0 0; }
  .bio-grid, .bio-grid.pos-left { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .bio-photos { flex-direction: row; flex-wrap: wrap; }
  .bio-photo { width: var(--pw, 260px); max-width: 100%; }
  .nav a { font-size: var(--t); }
  .work-item { padding: 84px 20px 28px; }
  .media-wrapper, .media-wrapper img, .media-wrapper video { max-height: 62vh; max-height: 62dvh; }
  main.page { padding: 84px 20px 64px; }
  main.center { justify-content: flex-start; }
  .cv-year { width: 72px; }
  .post-left, .post-right { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .post-right .post-media { order: 0; }
  .post-media { max-width: var(--pw, 320px); }
  .post { margin-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
