/* Layout tokens: change the colors and spacing here to restyle both pages. */
:root {
  color-scheme:light;
  --bg:#f7f6f2;
  --surface:#ecebe5;
  --ink:#242923;
  --muted:#6c7166;
  --line:#dcded5;
  --accent:#65715c;
  --serif:Georgia,"Noto Serif SC","Songti SC","STSong","SimSun",serif;
  --sans:Inter,"Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;
  --gutter:clamp(22px,5vw,88px);
}

* {
  box-sizing:border-box;
}

html {
  scroll-behavior:smooth;
  scroll-padding-top:30px;
}

body {
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--sans);
  -webkit-font-smoothing:antialiased;
}

body.modal-open {
  overflow:hidden;
}

h1,h2,h3,p,figure {
  margin:0;
}

img {
  display:block;
  max-width:100%;
}

a {
  color:inherit;
  text-decoration:none;
}

button {
  font:inherit;
  color:inherit;
  background:none;
  border:0;
  cursor:pointer;
  touch-action:manipulation;
}

button:disabled {
  opacity:.35;
  cursor:default;
}

button,a {
  -webkit-tap-highlight-color:transparent;
}

[hidden] {
  display:none!important;
}

::selection {
  background:#d8dfcc;
}

a:focus-visible,button:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:5px;
}

.shell {
  width:calc(100% - var(--gutter)*2);
  max-width:1456px;
  margin-inline:auto;
}

.skip-link {
  position:fixed;
  top:12px;
  left:12px;
  z-index:100;
  background:var(--ink);
  color:var(--bg);
  padding:14px;
  transform:translateY(-150%);
}

.skip-link:focus {
  transform:none;
}

.eyebrow {
  font-size:10px;
  line-height:1.6;
  letter-spacing:.17em;
  color:var(--muted);
}

.text-link {
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:40px;
  min-height:44px;
  border-bottom:1px solid var(--ink);
  font-size:13px;
}

.text-link span {
  font-size:20px;
}

.text-link:hover {
  color:var(--accent);
}

/* Navigation */
.site-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:92px;
  border-bottom:1px solid var(--line);
  gap:20px;
}

.wordmark {
  font-size:25px;
  font-weight:600;
  letter-spacing:-1.3px;
  white-space:nowrap;
}

.brand-dot {
  display:inline-block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:var(--accent);
  margin-left:4px;
}

.site-nav {
  display:flex;
  align-items:center;
  gap:30px;
}

.site-nav a,.site-nav button {
  position:relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:44px;
  min-height:44px;
  padding:0 4px;
  font-size:13px;
  color:var(--muted);
}

.site-nav [aria-current],.site-nav a:hover,.site-nav button:hover {
  color:var(--ink);
}

.site-nav [aria-current]:after {
  content:"";
  position:absolute;
  bottom:3px;
  left:calc(50% - 2px);
  width:4px;
  height:4px;
  background:var(--ink);
  border-radius:50%;
}

.site-nav span {
  display:none;
}

/* Opening spread */
.intro {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:40px;
  padding-block:64px 48px;
}

.intro .eyebrow {
  margin-bottom:22px;
}

.intro h1 {
  font:400 clamp(38px,4.5vw,66px)/1.36 var(--serif);
  letter-spacing:-.045em;
}

.intro h1 span {
  display:block;
  color:var(--accent);
}

.intro-aside {
  padding-bottom:7px;
}

.intro-aside p {
  font-size:13px;
  line-height:2;
  color:var(--muted);
}

.intro-aside .text-link {
  margin-top:18px;
  gap:80px;
}

.featured-frame {
  display:block;
  position:relative;
  overflow:hidden;
  background:var(--surface);
  isolation:isolate;
}

.featured-frame>img {
  width:100%;
  height:auto;
  aspect-ratio:2.3;
  object-fit:cover;
  transition:transform 1s;
}

.featured-frame:after {
  content:"";
  position:absolute;
  inset:45% 0 0;
  background:linear-gradient(transparent,#0007);
  pointer-events:none;
}

.frame-bottom {
  position:absolute;
  z-index:1;
  bottom:30px;
  left:34px;
  right:30px;
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  color:#fff;
}

.frame-title {
  font:30px/1.4 var(--serif);
  letter-spacing:.06em;
}

.frame-title>span {
  display:block;
  font:9px/1.6 var(--sans);
  letter-spacing:.15em;
  margin-top:8px;
  opacity:.8;
}

.open-photo {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  border:1px solid #ffffff80;
  border-radius:50%;
  font-size:22px;
}

.featured-caption {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding-top:15px;
  color:var(--muted);
  font-size:11px;
  line-height:1.8;
}

.featured-caption p {
  font-family:var(--serif);
}

/* Collection. Original aspect ratios are preserved. */
.works {
  padding-top:96px;
  scroll-margin-top:28px;
}

.section-heading {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin-bottom:28px;
}

.section-heading .eyebrow {
  margin-bottom:12px;
}

.section-heading h2 {
  font:32px/1.4 var(--serif);
}

.archive-total {
  color:var(--muted);
  font-size:11px;
  padding-bottom:5px;
  white-space:nowrap;
}

.archive-total>span {
  font-variant-numeric:tabular-nums;
}

.gallery-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  border-bottom:1px solid var(--line);
  margin-bottom:32px;
}

.filters {
  display:flex;
  gap:30px;
  max-width:100%;
  overflow-x:auto;
  scrollbar-width:none;
}

.filters::-webkit-scrollbar {
  display:none;
}

.filters button {
  flex:none;
  min-height:50px;
  position:relative;
  padding:0 2px;
  font-size:13px;
  color:var(--muted);
}

.filters button[aria-pressed=true] {
  color:var(--ink);
}

.filters button[aria-pressed=true]:after {
  content:"";
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  height:2px;
  background:var(--ink);
}

.filters sup {
  font-size:9px;
  margin-left:4px;
  color:var(--muted);
}

.gallery-count {
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}

.photo-grid {
  column-count:3;
  column-gap:30px;
}

.photo-card {
  display:inline-block;
  vertical-align:top;
  break-inside:avoid;
  width:100%;
  margin-bottom:36px;
}

.photo-link {
  display:block;
  overflow:hidden;
  position:relative;
  background:var(--surface);
}

.photo-link img {
  width:100%;
  height:auto;
  transition:transform .6s;
}

.photo-card figcaption {
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:12px;
  padding-top:12px;
}

.photo-card h3 {
  font-size:13px;
  line-height:1.6;
  font-weight:400;
}

.photo-meta {
  font-size:10px;
  color:var(--muted);
  line-height:1.8;
}

.photo-number {
  display:none;
}

.photo-overlay {
  position:absolute;
  bottom:12px;
  right:12px;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  background:#1117;
  color:#fff;
  border-radius:50%;
  opacity:0;
  transition:opacity .2s;
}

.photo-link:focus-visible .photo-overlay {
  opacity:1;
}

.image-failure {
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  background:var(--surface);
  color:var(--muted);
  padding:20px;
  text-align:center;
  font-size:12px;
  line-height:1.8;
}

.is-error img {
  opacity:0;
}

.no-script {
  padding:24px 0;
  color:var(--muted);
}

/* Closing spread */
.journey-teaser {
  display:grid;
  grid-template-columns:1.15fr 1fr;
  align-items:center;
  gap:clamp(40px,8vw,120px);
  margin-top:64px;
  padding-block:64px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}

.teaser-image {
  display:block;
  overflow:hidden;
}

.teaser-image img {
  width:100%;
  aspect-ratio:1.4;
  object-fit:cover;
  transition:transform 1s;
}

.teaser-copy h2 {
  font:40px/1.45 var(--serif);
  margin:22px 0;
}

.teaser-copy>p:not(.eyebrow) {
  font-size:13px;
  line-height:2;
  color:var(--muted);
}

.teaser-copy .text-link {
  margin-top:24px;
}

.teaser-note {
  display:none;
}

.contact-strip {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding-block:48px;
}

.contact-strip>p {
  font:23px/1.6 var(--serif);
}

.site-footer {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  padding-block:26px 32px;
  border-top:1px solid var(--line);
}

.site-footer .wordmark {
  font-size:20px;
}

.site-footer p {
  font-size:10px;
  line-height:1.8;
  color:var(--muted);
}

.back-top {
  display:flex;
  align-items:center;
  gap:14px;
  min-height:44px;
  font-size:11px;
}

.reading-progress {
  position:fixed;
  z-index:30;
  inset:0 0 auto;
  height:2px;
  pointer-events:none;
}

.reading-progress span {
  display:block;
  height:100%;
  width:0;
  background:var(--accent);
}

.portfolio-page .reading-progress {
  display:none;
}

/* Contact and image viewer */
dialog {
  color:var(--ink);
  background:var(--bg);
  border:1px solid var(--line);
}

dialog::backdrop {
  background:#111a;
  backdrop-filter:blur(6px);
}

.dialog-close {
  display:grid;
  place-items:center;
  width:44px;
  height:44px;
  font-size:30px;
  font-weight:300;
  color:var(--ink);
}

.contact-dialog {
  width:min(430px,calc(100% - 32px));
  max-height:calc(100dvh - 32px);
  padding:52px 28px 30px;
  text-align:center;
  overflow:auto;
}

.contact-dialog .dialog-close {
  position:absolute;
  top:8px;
  right:8px;
}

.contact-dialog h2 {
  font:30px/1.4 var(--serif);
  margin:16px 0;
}

.contact-dialog>p {
  font-size:13px;
  line-height:1.9;
  color:var(--muted);
}

.qr-frame {
  width:230px;
  max-width:100%;
  padding:10px;
  background:white;
  margin:24px auto 14px;
}

.qr-frame img {
  width:100%;
  height:auto;
}

.qr-note {
  font-size:11px!important;
}

.lightbox {
  --ink:#eeeae0;
  --muted:#b1b5aa;
  --line:#43473d;
  --surface:#242921;
  --accent:#bec9aa;
  color-scheme:dark;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  margin:0;
  padding:0;
  border:0;
  background:#10120f;
  overflow:auto;
}

.lightbox[open] {
  display:flex;
  flex-direction:column;
  min-height:100dvh;
}

.lightbox-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex:none;
  padding:14px 28px;
}

.lightbox-brand {
  font-size:10px;
  letter-spacing:.12em;
  color:var(--muted);
}

#photo-counter {
  font-size:12px;
  letter-spacing:.12em;
  font-variant-numeric:tabular-nums;
}

.lightbox-stage {
  display:grid;
  grid-template-columns:48px minmax(0,1fr) 48px;
  gap:16px;
  align-items:center;
  padding:0 24px;
  flex:1;
  min-height:160px;
}

.lightbox-image-wrap {
  height:100%;
  min-height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}

.lightbox-stage img {
  width:auto;
  max-width:100%;
  max-height:calc(100dvh - 240px);
  object-fit:contain;
}

.lightbox-stage img.is-loading {
  opacity:.2;
}

.photo-nav {
  width:44px;
  height:44px;
  border:1px solid var(--line);
  border-radius:50%;
  font-size:22px;
}

.lightbox-bottom {
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:30px;
  flex:none;
  padding:26px max(32px,8vw) max(26px,env(safe-area-inset-bottom));
}

.lightbox-bottom h2 {
  font:22px/1.5 var(--serif);
  margin-bottom:10px;
}

.lightbox-bottom p {
  font:13px/1.9 var(--serif);
  max-width:820px;
  color:var(--muted);
}

.lightbox-bottom>a {
  font-size:12px;
  white-space:nowrap;
  color:var(--muted);
  padding-block:14px;
}

.lightbox-error {
  font-size:13px;
  text-align:center;
  color:var(--muted);
}

.lightbox-error button {
  display:block;
  min-height:44px;
  margin:12px auto;
  text-decoration:underline;
}

/* Travel journal */
.journal-intro {
  padding:72px 0 48px;
  border-bottom:1px solid var(--line);
}

.journal-intro h1 {
  font:clamp(48px,6vw,82px)/1.3 var(--serif);
  letter-spacing:-.04em;
  margin:24px 0 30px;
}

.journal-intro h1 em {
  font-style:normal;
  color:var(--accent);
}

.journal-intro-bottom {
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:20px;
  color:var(--muted);
}

.journal-intro-bottom p {
  font-size:13px;
  line-height:1.9;
}

.journal-intro-bottom span {
  font-size:10px;
  letter-spacing:.08em;
}

.journal-layout {
  display:grid;
  grid-template-columns:220px minmax(0,720px);
  justify-content:space-between;
  gap:60px;
  padding-top:56px;
}

.chapter-sidebar {
  position:sticky;
  top:32px;
  align-self:start;
  padding-bottom:24px;
}

.chapter-toggle {
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:44px;
  width:100%;
  padding:0;
  text-align:left;
  font-size:12px;
  letter-spacing:.1em;
  cursor:default;
}

.chapter-toggle span {
  display:none;
}

.chapter-sidebar nav {
  display:flex;
  flex-direction:column;
  margin-top:12px;
}

.chapter-sidebar nav a {
  display:flex;
  align-items:baseline;
  gap:18px;
  min-height:44px;
  padding:12px 0;
  font-size:12px;
  color:var(--muted);
  border-bottom:1px solid transparent;
}

.chapter-sidebar nav a span {
  font-size:10px;
  color:var(--muted);
}

.chapter-sidebar nav a[aria-current] {
  color:var(--ink);
  border-color:var(--line);
}

.journal-return {
  margin-top:28px;
}

.journal-article {
  min-width:0;
}

.chapter {
  padding-bottom:56px;
  margin-bottom:56px;
  border-bottom:1px solid var(--line);
  scroll-margin-top:35px;
}

.chapter-kicker {
  font-size:10px;
  letter-spacing:.14em;
  color:var(--muted);
  margin-bottom:18px;
}

.chapter h2 {
  font:30px/1.5 var(--serif);
  margin-bottom:24px;
}

.chapter-text {
  font:17px/2.05 var(--serif);
  color:#454a41;
  overflow-wrap:anywhere;
}

.chapter-text p {
  white-space:pre-line;
}

.chapter-text p+p {
  margin-top:22px;
}

.journal-evidence {
  margin-top:28px;
  max-width:430px;
}

.journal-evidence img {
  max-height:480px;
  width:auto;
  height:auto;
}

.journal-evidence figcaption {
  font:11px/1.8 var(--sans);
  color:var(--muted);
  margin-top:12px;
}

.quote-chapter .chapter-text>p:first-child {
  font:clamp(25px,2.6vw,35px)/1.6 var(--serif);
  color:var(--ink);
}

.quote-chapter .chapter-text>p:last-of-type {
  font:12px/1.9 var(--sans);
  color:var(--muted);
}

.journal-ending {
  padding-bottom:80px;
}

.journal-ending>p {
  font:25px/1.5 var(--serif);
  margin-bottom:20px;
}

@media(hover:hover) {
  .featured-frame:hover>img,.teaser-image:hover img {
    transform:scale(1.02);
  }
  .photo-link:hover img {
    transform:scale(1.025);
  }
  .photo-link:hover .photo-overlay {
    opacity:1;
  }
  .photo-nav:hover {
    background:var(--surface);
  }
}

@media(max-width:1000px) {
  .intro-aside p {
    font-size:12px;
  }
  .photo-grid {
    column-count:2;
  }
  .journal-layout {
    grid-template-columns:180px minmax(0,1fr);
    gap:40px;
  }
  .teaser-copy h2 {
    font-size:34px;
  }
}

@media(max-width:760px) {
  :root {
    --gutter:22px;
  }
  .site-header {
    min-height:74px;
    gap:12px;
  }
  .wordmark {
    font-size:23px;
  }
  .site-nav {
    gap:10px;
  }
  .site-nav a,.site-nav button {
    font-size:12px;
    padding:0 2px;
  }
  .intro {
    display:block;
    padding:38px 0 30px;
  }
  .intro .eyebrow {
    font-size:9px;
    margin-bottom:18px;
  }
  .intro h1 {
    font-size:clamp(34px,9vw,48px);
    line-height:1.4;
  }
  .intro-aside {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:20px;
    margin-top:20px;
    padding:0;
  }
  .intro-aside p {
    font-size:11px;
    line-height:1.9;
  }
  .intro-aside .text-link {
    flex:none;
    font-size:11px;
    gap:12px;
    margin:0;
  }
  .featured {
    width:100%;
  }
  .featured-frame>img {
    aspect-ratio:1.25;
    object-position:50% center;
  }
  .frame-bottom {
    left:22px;
    right:22px;
    bottom:22px;
  }
  .frame-title {
    font-size:25px;
  }
  .frame-title>span {
    font-size:8px;
    margin-top:5px;
  }
  .featured-caption {
    margin-inline:var(--gutter);
    padding-top:13px;
    font-size:10px;
  }
  .featured-caption p {
    display:none;
  }
  .works {
    padding-top:56px;
    scroll-margin-top:18px;
  }
  .section-heading {
    margin-bottom:17px;
    gap:12px;
  }
  .section-heading h2 {
    font-size:27px;
  }
  .section-heading .eyebrow {
    font-size:9px;
    margin-bottom:10px;
  }
  .archive-total {
    font-size:10px;
  }
  .gallery-toolbar {
    position:sticky;
    top:0;
    z-index:5;
    background:var(--bg);
    margin-bottom:24px;
    gap:0;
  }
  .filters {
    width:100%;
    justify-content:space-between;
    gap:10px;
  }
  .filters button {
    min-height:54px;
    font-size:12px;
    padding:0 3px;
  }
  .filters sup {
    font-size:8px;
    margin-left:2px;
  }
  .gallery-count {
    position:absolute;
    width:1px;
    height:1px;
    overflow:hidden;
    clip-path:inset(50%);
  }
  .photo-grid {
    column-count:1;
  }
  .photo-card {
    margin-bottom:28px;
  }
  .photo-link img {
    max-height:78svh;
    object-fit:contain;
  }
  .photo-card figcaption {
    padding-top:11px;
    gap:12px;
  }
  .photo-card h3 {
    font-size:13px;
  }
  .photo-meta {
    font-size:10px;
  }
  .photo-overlay {
    display:none;
  }
  .journey-teaser {
    grid-template-columns:1fr;
    gap:28px;
    margin-top:28px;
    padding-block:36px;
  }
  .teaser-image img {
    aspect-ratio:1.6;
  }
  .teaser-copy h2 {
    font-size:32px;
    margin:16px 0;
  }
  .teaser-copy>p:not(.eyebrow) {
    font-size:12px;
    line-height:2;
  }
  .teaser-copy .text-link {
    margin-top:18px;
  }
  .contact-strip {
    padding-block:32px;
    align-items:flex-start;
  }
  .contact-strip>p {
    font-size:17px;
    max-width:190px;
  }
  .contact-strip .text-link {
    font-size:12px;
    gap:16px;
    flex:none;
  }
  .site-footer {
    flex-wrap:wrap;
    gap:12px;
    padding-block:22px;
  }
  .site-footer p {
    order:3;
    width:100%;
    font-size:10px;
  }
  .site-footer .wordmark {
    font-size:20px;
  }
  .lightbox-top {
    padding:10px 14px;
  }
  .lightbox-brand {
    font-size:8px;
    letter-spacing:.06em;
  }
  .lightbox-stage {
    padding:0;
    display:flex;
    position:relative;
  }
  .lightbox-image-wrap {
    width:100%;
  }
  .lightbox-stage img {
    max-height:calc(100dvh - 300px);
  }
  .photo-nav {
    position:absolute;
    z-index:2;
    bottom:0;
    background:#10120fc9;
  }
  .photo-prev {
    left:16px;
  }
  .photo-next {
    right:16px;
  }
  .lightbox-bottom {
    display:block;
    padding:22px 22px max(16px,env(safe-area-inset-bottom));
  }
  .lightbox-bottom h2 {
    font-size:21px;
  }
  .lightbox-bottom p {
    font-size:13px;
  }
  .lightbox-bottom>a {
    display:inline-block;
  }
  .journal-intro {
    padding:42px 0 32px;
  }
  .journal-intro h1 {
    font-size:clamp(42px,12vw,62px);
    margin:22px 0;
  }
  .journal-intro-bottom p {
    font-size:12px;
  }
  .journal-intro-bottom>span {
    max-width:100px;
    text-align:right;
    line-height:1.8;
    font-size:9px;
  }
  .journal-layout {
    display:block;
    padding-top:0;
  }
  .chapter-sidebar {
    position:sticky;
    top:0;
    z-index:5;
    background:var(--bg);
    padding:0;
    border-bottom:1px solid var(--line);
    margin-bottom:36px;
  }
  .chapter-toggle {
    min-height:58px;
    font-size:13px;
    cursor:pointer;
  }
  .chapter-toggle span {
    display:inline;
  }
  .chapter-sidebar nav {
    display:none;
    margin:0;
    max-height:55dvh;
    overflow:auto;
    padding-bottom:16px;
    grid-template-columns:1fr 1fr;
    gap:0 16px;
  }
  .chapter-sidebar.is-expanded nav {
    display:grid;
  }
  .chapter-sidebar nav a {
    font-size:12px;
    gap:10px;
  }
  .journal-return {
    display:none;
  }
  .chapter {
    scroll-margin-top:80px;
    padding-bottom:38px;
    margin-bottom:38px;
  }
  .chapter-kicker {
    font-size:9px;
    margin-bottom:14px;
  }
  .chapter h2 {
    font-size:28px;
    margin-bottom:22px;
  }
  .chapter-text {
    font-size:16px;
    line-height:2.05;
  }
  .chapter-text p+p {
    margin-top:20px;
  }
  .journal-ending {
    padding-bottom:48px;
  }
}

@media(max-width:360px) {
  :root {
    --gutter:18px;
  }
  .site-nav {
    gap:3px;
  }
  .intro-aside {
    gap:10px;
  }
  .intro-aside p {
    font-size:10px;
  }
  .intro-aside .text-link {
    gap:8px;
  }
  .filters {
    gap:5px;
  }
  .contact-strip>p {
    font-size:16px;
    max-width:155px;
  }
}

@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto;
  }
  *,*:before,*:after {
    animation:none!important;
    transition:none!important;
  }
}


/* Keep the mobile design independent from the original desktop layout. */
.header-note, .frame-top, .chapter-label, .archive-end { display: none; }
.featured-caption > span:last-child { display: none; }
.section-heading h2 em { font-style: normal; color: var(--muted); }
.archive-total { max-width: 92px; text-align: right; line-height: 1.6; white-space: normal; }
.teaser-image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  max-height: none;
  object-fit: contain;
  transform: none;
}
.teaser-image:hover img { transform: none; }
