/* ---------- Theme settings ---------- */
:root, [data-theme="classic"] {
  --bg: #ffffff; --fg: #161616; --muted: #7a7a7a; --line: #e6e6e6; --frame: #f4f4f2;
  --font: "Quicksand", "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font); --font-meta: var(--font);
  --head-case: uppercase; --head-track: .12em; --head-weight: 600;
  --title-size: clamp(1.05rem, 2.2vw, 1.45rem); --h1-size: 1.25rem;
  --body-size: 15px; --cap-style: normal; --wrap: 960px; --gap: 22px;
  --align: center; --label-pos: -1; /* label above photo */
}
[data-theme="editorial"] {
  --bg: #faf8f4; --fg: #1d1b18; --muted: #857d72; --line: #e4ded4; --frame: #f1ede6;
  --font: "EB Garamond", Georgia, serif;
  --font-head: "Cormorant Garamond", Georgia, serif; --font-meta: var(--font);
  --head-case: none; --head-track: .01em; --head-weight: 500;
  --title-size: clamp(1.7rem, 4vw, 2.6rem); --h1-size: clamp(1.9rem, 4vw, 2.6rem);
  --body-size: 18px; --cap-style: italic; --wrap: 1000px; --gap: 34px;
  --align: center; --label-pos: 1; /* label below photo */
}
[data-theme="dark"] {
  --bg: #0e0e0e; --fg: #ececec; --muted: #8d8d8d; --line: #262626; --frame: #151515;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font); --font-meta: "IBM Plex Mono", ui-monospace, monospace;
  --head-case: none; --head-track: -.01em; --head-weight: 600;
  --title-size: clamp(1.1rem, 2.4vw, 1.5rem); --h1-size: clamp(1.4rem, 3vw, 2rem);
  --body-size: 15px; --cap-style: normal; --wrap: 1120px; --gap: 14px;
  --align: left; --label-pos: 1;
}

[data-theme="swiss"] {
  --bg: #ffffff; --fg: #111111; --muted: #6b6b6b; --line: #111111; --frame: #f2f2f2; --accent: #e3261b;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font); --font-meta: var(--font);
  --head-case: uppercase; --head-track: -.01em; --head-weight: 800;
  --title-size: clamp(1.5rem, 4vw, 2.6rem); --h1-size: clamp(1.8rem, 5vw, 3.2rem);
  --body-size: 15px; --cap-style: normal; --wrap: 1160px; --gap: 8px;
  --align: left; --label-pos: 1;
}
[data-theme="journal"] {
  --bg: #f2ede3; --fg: #2b2620; --muted: #7d7263; --line: #d6ccbb; --frame: #e9e2d5; --accent: #9c3d24;
  --font: "Lora", Georgia, serif;
  --font-head: "Courier Prime", "Courier New", monospace; --font-meta: "Courier Prime", "Courier New", monospace;
  --head-case: none; --head-track: 0; --head-weight: 700;
  --title-size: clamp(1.2rem, 2.6vw, 1.6rem); --h1-size: clamp(1.4rem, 3vw, 1.9rem);
  --body-size: 17px; --cap-style: normal; --wrap: 940px; --gap: 30px;
  --align: center; --label-pos: 1;
  --img-border: 8px solid #fff; --img-shadow: 0 1px 2px rgba(60,40,20,.12), 0 6px 18px rgba(60,40,20,.10);
}
[data-theme="gallery"] {
  --bg: #f4f3ef; --fg: #1b1b1a; --muted: #77756f; --line: #dddbd4; --frame: #e8e6e0; --accent: #1b1b1a;
  --font: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --font-head: "DM Serif Display", Georgia, serif; --font-meta: var(--font);
  --head-case: none; --head-track: 0; --head-weight: 400;
  --title-size: clamp(1.7rem, 4.4vw, 3rem); --h1-size: clamp(2rem, 5vw, 3.2rem);
  --body-size: 16px; --cap-style: normal; --wrap: 1080px; --gap: 18px;
  --align: left; --label-pos: 1; --img-radius: 10px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 var(--body-size)/1.6 var(--font); background: var(--bg); color: var(--fg); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; }
a:hover { text-decoration-color: currentColor; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
main, .site-head, .site-foot { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------- Header / footer ---------- */
.site-head { padding: 34px 0 22px; text-align: var(--align); }
.site-title { font: var(--head-weight) var(--title-size)/1.2 var(--font-head); text-transform: var(--head-case);
  letter-spacing: var(--head-track); text-decoration: none; }
[data-theme="editorial"] .site-title { font-style: italic; }
[data-theme="dark"] .site-head { border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.site-foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: baseline;
  margin-top: 90px; padding: 22px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9em; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot a { color: var(--fg); }

/* ---------- Section headings ---------- */
h1, h2 { font-family: var(--font-head); font-weight: var(--head-weight); text-transform: var(--head-case);
  letter-spacing: var(--head-track); margin: 0; }
section > h2 { font-size: .95rem; text-align: var(--align); margin: 64px 0 20px; }
[data-theme="editorial"] section > h2 { font-size: 1.6rem; }
[data-theme="dark"] section > h2 { font: 400 .78rem var(--font-meta); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }

/* ---------- Slideshow ---------- */
.slides { position: relative; }
.frame { border-radius: var(--img-radius, 0); aspect-ratio: 3 / 2; background: var(--frame); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.frame img { width: 100%; height: 100%; object-fit: contain; }
.slide { margin: 0; }
.js .slide { display: none; }
.js .slide.is-active { display: block; }
.slide figcaption { min-height: 2.9em; padding: 10px 70px 0 2px; color: var(--muted); font-style: var(--cap-style); font-size: .95em; line-height: 1.45; }
.cap-sec { color: var(--fg); font-style: normal; font-weight: 600; }
.cap-sec::after { content: " —"; font-weight: 400; color: var(--muted); }
.ss-bar { display: none; }
.js .ss-bar { display: flex; align-items: center; gap: 4px; position: absolute; right: 0; margin-top: -2.55em; font: .82rem var(--font-meta); color: var(--muted); }
.slideshow { position: relative; }
.ss-bar button { font-size: 1.5rem; line-height: 1; padding: 2px 8px 5px; border-radius: 4px; }
.ss-bar button:hover { color: var(--fg); background: var(--frame); }
.ss-count { min-width: 4.5em; text-align: center; font-variant-numeric: tabular-nums; }
.ss-thumbs { display: flex; gap: 6px; overflow-x: auto; padding: 18px 0 6px; scrollbar-width: thin; }
.ss-thumbs button { flex: 0 0 auto; height: 64px; opacity: .45; transition: opacity .15s; }
.ss-thumbs button:hover, .ss-thumbs button.is-active { opacity: 1; }
.ss-thumbs img { height: 100%; width: auto; }
.no-js .ss-thumbs, html:not(.js) .ss-thumbs { display: none; }

/* ---------- Home ---------- */
.little ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 26px; }
[data-theme="dark"] .little ul { justify-content: flex-start; gap: 10px 34px; }
.little a { text-decoration: none; }
.little a:hover { text-decoration: underline; }
.date { color: var(--muted); font: .78em var(--font-meta); margin-left: 4px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(var(--gap) + 8px) var(--gap); }
.card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.card .label { order: var(--label-pos); text-align: var(--align); font: var(--head-weight) .82rem/1.3 var(--font-head);
  text-transform: var(--head-case); letter-spacing: .06em; }
[data-theme="editorial"] .card .label { font-size: 1.25rem; letter-spacing: 0; }
[data-theme="dark"] .card .label { font: 400 .85rem var(--font); letter-spacing: 0; color: var(--muted); }
.card .thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--frame); border: var(--img-border, 0); box-shadow: var(--img-shadow, none); border-radius: var(--img-radius, 0); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.card:hover img { transform: scale(1.03); }
.card:hover .label { color: var(--fg); }

/* ---------- Gallery pages ---------- */
.g-head { text-align: var(--align); max-width: 700px; margin: 10px auto 34px; }
[data-theme="dark"] .g-head { margin-left: 0; }
.g-head h1 { font-size: var(--h1-size); line-height: 1.2; }
.intro { margin-top: 16px; text-align: left; }
.intro p { margin: 0 0 1em; }
.stream figure { margin: 0 0 56px; }
.stream figure img { border: var(--img-border, 0); box-shadow: var(--img-shadow, none); border-radius: var(--img-radius, 0); }
.stream figcaption { color: var(--muted); font-style: var(--cap-style); padding-top: 10px; max-width: 700px; }
.stream .sec { font-size: 1.1rem; margin: 80px 0 10px; text-align: var(--align); }
[data-theme="editorial"] .stream .sec { font-size: 1.7rem; }
.stream .sec-text { max-width: 700px; margin: 0 auto 26px; }
.back { margin-top: 50px; text-align: var(--align); font-size: .9em; }
.back a { color: var(--muted); }

/* stream pages: text runs the full width of the photos */
.layout-stream .g-head { max-width: none; }
.layout-stream .stream figcaption, .layout-stream .stream .sec-text { max-width: none; }

/* ---------- Extra touches per style ---------- */
[data-theme="swiss"] .site-head { border-bottom: 3px solid var(--fg); padding-bottom: 14px; margin-bottom: 26px; }
[data-theme="swiss"] .site-title { line-height: .95; }
[data-theme="swiss"] section > h2 { font-size: .8rem; letter-spacing: .08em; border-top: 1px solid var(--fg); padding-top: 8px; margin-top: 56px; }
[data-theme="swiss"] section > h2::before { content: "■ "; color: var(--accent); }
[data-theme="swiss"] .card .label { font-size: .78rem; letter-spacing: .02em; }
[data-theme="swiss"] .ss-count, [data-theme="swiss"] .date { color: var(--accent); font-weight: 600; }
[data-theme="swiss"] .g-head { margin-left: 0; max-width: 760px; }
[data-theme="swiss"] .little ul { justify-content: flex-start; gap: 8px 30px; }
[data-theme="swiss"] .site-foot { border-top: 3px solid var(--fg); }

[data-theme="journal"] .frame { background: #fff; padding: 8px; box-shadow: var(--img-shadow); }
[data-theme="journal"] .site-title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .3em; }
[data-theme="journal"] section > h2 { font-size: 1.05rem; }
[data-theme="journal"] section > h2::before, [data-theme="journal"] section > h2::after { content: " ~ "; color: var(--muted); font-weight: 400; }
[data-theme="journal"] .card .label { font: 400 .92rem var(--font-meta); letter-spacing: 0; }
[data-theme="journal"] .slide figcaption, [data-theme="journal"] .stream figcaption { font-family: var(--font-meta); font-size: .85em; }
[data-theme="journal"] .date { color: var(--accent); }
[data-theme="journal"] a { text-decoration-color: var(--accent); }

[data-theme="gallery"] .site-head { padding: 44px 0 30px; }
[data-theme="gallery"] section > h2 { font: 400 1.9rem/1.1 var(--font-head); margin: 70px 0 22px; }
[data-theme="gallery"] .card { position: relative; }
[data-theme="gallery"] .card .label { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 30px 14px 12px; color: #fff;
  font: 500 .95rem var(--font); letter-spacing: 0; background: linear-gradient(transparent, rgba(0,0,0,.55)); border-radius: 0 0 var(--img-radius) var(--img-radius); }
[data-theme="gallery"] .card:hover .label { color: #fff; }
[data-theme="gallery"] .little ul { justify-content: flex-start; gap: 10px; }
[data-theme="gallery"] .little a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 99px; background: #fff; }
[data-theme="gallery"] .little a:hover { text-decoration: none; border-color: var(--fg); }
[data-theme="gallery"] .little .date { display: none; }
[data-theme="gallery"] .g-head { margin-left: 0; }
[data-theme="gallery"] .ss-thumbs img { border-radius: 4px; }

/* ---------- Small screens ---------- */
@media (max-width: 800px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
  :root { --body-size: 15px; }
  [data-theme="editorial"] { --body-size: 17px; }
  .site-head { padding-top: 22px; }
  .grid { gap: 20px 12px; }
  .card .label { font-size: .74rem; }
  .little ul { flex-direction: column; }
  .slide figcaption { padding-right: 104px; font-size: .9em; }
  .js .ss-bar { margin-top: -2.4em; }
  .ss-bar button { padding: 2px 6px 5px; }
  .ss-thumbs { display: none; }
  .site-foot { flex-direction: column; }
}
