@import url('https://fonts.googleapis.com/css2?family=Schibsted+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #ffffff;
  --fg: #000000;
  --fg-dim: rgba(0, 0, 0, 0.6);
  --gap: 1rem;
  --nav-size: 0.8rem;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
}

body {
  /* One webfont for everyone. The stack used to start with two macOS-only
     Japanese families, so this Mac rendered the site in Hiragino Sans while
     every other visitor got the fallback — two quite different sites. The
     names after it are only there for the moment before the font arrives. */
  font-family: 'Schibsted Grotesk', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
}

/* A 400 stroke has twice the pixels to draw itself with on a Retina screen as
   on an ordinary one, so the same weight that looks right on the laptop comes
   out thin and washed on a standard-density monitor. Keyed to pixel density
   rather than screen size: a large Retina display has no such problem, and a
   small standard one does. */
@media (max-resolution: 1.5dppx) {
  body {
    font-weight: 500;
  }
}

#content {
  opacity: 0;
  transition: opacity 0.25s ease;
}
#content.loaded {
  opacity: 1;
}
#content.leaving {
  opacity: 0;
}

body[data-page="home"],
body[data-page="motion"] {
  height: 100vh;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease, filter 0.15s ease;
}
a:hover,
a:active,
a.nav-active {
  color: #283C58;
  filter: blur(0.8px);
}

/* ---------- global nav (4 corners) ---------- */

.nav-topleft {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 60;
  font-size: var(--nav-size);
  display: flex;
  flex-direction: column;
}
.nav-topleft .tagline-row,
.nav-topleft .contact-row {
  white-space: nowrap;
}

.nav-topleft .t02-row {
  white-space: nowrap;
}
.nav-topleft .sep {
  opacity: 0.4;
}
.nav-topleft .t02-copyright {
  margin-top: 1em;
}

.nav-bottomleft {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 40;
  font-size: var(--nav-size);
  white-space: nowrap;
}
.work-group {
  display: inline-block;
}
.work-expand {
  display: inline-block;
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  vertical-align: bottom;
  transition: max-width 0.3s ease, opacity 0.2s ease, margin-left 0.3s ease;
}
.work-group:hover .work-expand,
.work-group.expanded .work-expand {
  max-width: 14rem;
  margin-left: 0.35em;
  opacity: 1;
}
.nav-bottomleft .sep {
  opacity: 0.4;
}

/* ---------- mobile nav (hamburger + flat menu) ---------- */

.mobile-menu-toggle {
  display: none;
  position: fixed;
  right: 1.5rem;
  bottom: 0.91rem;
  z-index: 60;
}
.mobile-menu-toggle svg {
  display: block;
}

.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.mobile-menu-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: var(--nav-size);
}
.mobile-menu-links {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  font-size: 1.3rem;
}

.nav-mobile-only {
  display: none;
}

.mobile-nav-bar {
  display: none;
}

@media (max-width: 900px) {
  .mobile-nav-bar {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(3.2rem + env(safe-area-inset-bottom));
    background: #fff;
    z-index: 55;
  }
  .nav-topleft {
    top: auto;
    left: 0.75rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
  }
  .nav-desktop-only,
  .nav-email-row { display: none; }
  .nav-mobile-only { display: block; }
  .nav-bottomleft { display: none; }
  .mobile-menu-toggle {
    right: 0.75rem;
    bottom: calc(1.25rem + env(safe-area-inset-bottom));
    display: block;
  }
  body.mobile-overlay-open .mobile-nav-bar,
  body.mobile-overlay-open .nav-topleft,
  body.mobile-overlay-open .mobile-menu-toggle {
    opacity: 0;
    pointer-events: none;
  }
}

/* ---------- about overlay (global, test) ---------- */

.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: flex-end;
  /* Same 1.5rem all round as the navigation, so the text rests on the line the
     bottom-left menu sits on rather than 21px above it. */
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.about-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.about-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: var(--nav-size);
}
.about-overlay-columns {
  display: flex;
  gap: 6rem;
  font-size: var(--nav-size);
}
.about-overlay-mobile {
  display: none;
}
.about-col {
  display: flex;
  flex-direction: column;
  width: 20rem;
  white-space: nowrap;
}
.about-col:nth-child(2) {
  width: 26rem;
}
.about-col-body {
  margin-top: auto;
}
.about-col a {
  text-decoration: none;
}

@media (max-width: 900px) {
  /* Japanese-gradient background test — About overlay only. */
  .about-overlay {
    background: linear-gradient(to bottom, #707c8a 25.00%, #727e8c 32.14%, #788492 39.29%, #828e9c 46.43%, #8e9aa8 53.57%, #98a4b2 60.71%, #9eaab8 67.86%, #a0acba 75.00%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #fff;
  }
  .about-overlay {
    align-items: flex-end;
    padding: 0.75rem;
    padding-bottom: 6.7rem;
    overflow-y: auto;
  }
  .about-overlay-columns--desktop {
    display: none;
  }
  .about-overlay-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: var(--nav-size);
  }
  .about-mobile-gap {
    height: 2rem;
  }
  .about-mobile-block a {
    text-decoration: none;
  }
}

/* ---------- page shell ---------- */

.page {
  min-height: 100vh;
  padding: 1.5rem;
  padding-top: 6rem;
}
body[data-page="work-index"] {
  height: 100vh;
  overflow: hidden;
}
body[data-page="work-index"] .page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 4rem;
}
body[data-page="work-index"] #content {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* ---------- index ---------- */

.index-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: var(--nav-size);
  margin-bottom: 2rem;
}
.index-title {
  font-weight: 700;
  text-transform: uppercase;
}

.index-list-wrapper {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.index-list {
  display: flex;
  flex-direction: column;
  font-size: var(--nav-size);
}
.index-list a {
  padding: 0.05rem 0;
}
.index-category {
  font-weight: 700;
  margin-top: 1.2rem;
}
.index-category:first-child {
  margin-top: 0;
}

/* ---------- home ---------- */

.home-stage {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 6rem;
  overflow: hidden;
}

.home-slideshow {
  position: relative;
  height: 62vh;
  width: 100%;
  max-width: 72rem;
}
.home-slideshow img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 100%;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}
.home-slideshow img.active {
  opacity: 1;
}
.home-slideshow img.active {
  display: block;
}

.slide-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: none;
  z-index: 2;
}
.slide-zone-prev { left: 0; }
.slide-zone-next { right: 0; }

.slide-label {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  pointer-events: none;
  opacity: 0;
  white-space: nowrap;
}
.slide-label.visible {
  opacity: 1;
}

@media (max-width: 900px) {
  .home-stage { padding: 0.75rem; align-items: flex-start; }
  .home-slideshow { height: 78vh; }
  .home-slideshow img { object-position: top; }
  .slide-label { display: none; }
}

/* ---------- photography page ---------- */

body[data-page="photography"] {
  height: 100vh;
  overflow: hidden;
}

.photo-view-wrapper {
  height: 100vh;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.photo-view-wrapper.switching {
  opacity: 0;
}

.photo-page-stage {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 6rem;
  overflow: hidden;
}
.photo-page-stage.hidden {
  display: none;
}
.photo-mobile-carousel {
  display: none;
}

.photo-stage {
  position: relative;
  height: 62vh;
  width: 100%;
  max-width: 72rem;
}

.photo-slideshow {
  position: relative;
  height: 100%;
}
.photo-slideshow img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
}
.photo-slideshow img.active {
  opacity: 1;
}

.photo-grid-stage {
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.5rem;
  padding-top: 19vh;
}
.photo-grid-stage.hidden {
  display: none;
}
.photo-grid {
  position: relative;
  width: 100%;
  height: 64vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}
.photo-grid-row {
  display: flex;
  width: 100%;
}
.photo-grid-row a {
  display: block;
  height: 100%;
  overflow: hidden;
}
.photo-grid-row a:hover,
.photo-grid-row a:active {
  filter: none;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.photo-grid-row a:hover img,
.photo-grid-row a:active img {
  filter: blur(0.8px);
  transform: scale(1.04);
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.photo-lightbox.open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-stage {
  position: relative;
  height: 62vh;
  width: 100%;
  max-width: 72rem;
}
.photo-lightbox img {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.35s ease;
}
.photo-lightbox img.switching {
  transition: opacity 0.09s ease;
  opacity: 0;
}
.lightbox-caption-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4rem;
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 1.5rem;
  font-size: var(--nav-size);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.lightbox-stage:hover ~ .lightbox-caption-bar {
  opacity: 1;
}
.photo-lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  font-size: var(--nav-size);
}

.photo-view-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  font-size: var(--nav-size);
  display: flex;
  gap: 1.5rem;
}
.photo-category-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  font-size: var(--nav-size);
  display: flex;
  gap: 1.5rem;
}
.photo-category-toggle.hidden {
  display: none;
}

.photo-detail-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 42;
  font-size: var(--nav-size);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.photo-detail-toggle.hidden {
  display: none;
}

.photo-detail-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  height: 4rem;
  background: #fff;
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 1.5rem;
  font-size: var(--nav-size);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.photo-detail-bar.open {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 900px) {
  .photo-page-stage { padding: 0.75rem; align-items: flex-start; }
  .photo-stage { height: 78vh; }
  .photo-slideshow img { object-position: top; }

  /* Slide-only for now — Grid/carousel toggle hidden until we're happy with it. */
  .photo-view-toggle { display: none; }

  /* Grid becomes a horizontal swipeable carousel of full-height thumbnails. */
  .photo-grid-stage { padding: 0.75rem; align-items: flex-start; justify-content: flex-start; }
  .photo-grid { display: none; }
  .photo-mobile-carousel {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    height: 78vh;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  .photo-mobile-carousel-item {
    flex: 0 0 auto;
    height: 100%;
    scroll-snap-align: start;
  }
  .photo-mobile-carousel-item img {
    display: block;
    height: 100%;
    width: auto;
  }
}

/* ---------- motion page ---------- */

.motion-video-stage {
  position: fixed;
  inset: 0;
  height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 1.5rem;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.25s ease;
}

.motion-video {
  position: relative;
  width: 42%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.motion-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.motion-video-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
}
.motion-video-stage.hidden {
  opacity: 0;
  pointer-events: none;
}

.motion-project-stage {
  position: fixed;
  inset: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 6rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.motion-project-stage.open {
  opacity: 1;
  pointer-events: auto;
}

.motion-project-video {
  position: relative;
  width: 100%;
  max-width: 56rem;
  aspect-ratio: 16 / 9;
  pointer-events: auto;
  background: #000;
  opacity: 1;
  transition: opacity 0.2s ease;
}
.motion-project-video.switching {
  opacity: 0;
}

.proj-video-zone {
  position: absolute;
  top: 0;
  bottom: 2.2rem;
  width: 50%;
  z-index: 1;
  cursor: none;
}
.proj-video-prev { left: 0; }
.proj-video-next { right: 0; }

.proj-video-label {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  font-size: 1.4rem;
  color: #fff;
  pointer-events: none;
  opacity: 0;
}
.proj-video-label.visible {
  opacity: 1;
}

.proj-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #fff;
  font-size: 0.75rem;
}
.proj-play,
.proj-fullscreen {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  transition: color 0.15s ease;
}
.proj-play:hover,
.proj-fullscreen:hover {
  color: #283C58;
}
.proj-pause-icon {
  display: block;
  width: 0.7em;
  height: 0.7em;
}
.proj-scrub {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
}
.proj-scrub-fill {
  position: absolute;
  inset: 0;
  width: 0%;
  background: #fff;
  transition: background 0.15s ease;
}
.proj-scrub:hover .proj-scrub-fill {
  background: #283C58;
}
.proj-time {
  min-width: 2.2rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.motion-detail-toggle {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 42;
  font-size: var(--nav-size);
  display: none;
  align-items: center;
  gap: 0.35em;
}
.motion-detail-toggle.visible {
  display: inline-flex;
}
.plus-icon {
  display: inline-block;
  transform-origin: 50% 50%;
  transition: transform 0.25s ease;
}
.motion-detail-toggle:hover .plus-icon,
.photo-detail-toggle:hover .plus-icon {
  transform: rotate(90deg);
}

.motion-detail-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  height: 4rem;
  background: #fff;
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 1.5rem;
  font-size: var(--nav-size);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.motion-detail-bar.open {
  opacity: 1;
  pointer-events: auto;
}

.motion-list.hidden {
  display: none;
}

.motion-project-nav {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  font-size: var(--nav-size);
  display: none;
  gap: 0.5rem;
}
.motion-project-nav.visible {
  display: flex;
}
.motion-project-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.motion-video-hover.active {
  opacity: 1;
}

.motion-list {
  position: fixed;
  left: 1.5rem;
  bottom: 4rem;
  font-size: var(--nav-size);
  max-height: 65vh;
  overflow: auto;
}

.motion-list a {
  display: block;
  padding: 0.05rem 0;
}
.motion-list-meta-corner {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  z-index: 40;
  font-size: var(--nav-size);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.motion-list-meta-corner.visible {
  opacity: 1;
}
.motion-category {
  font-weight: 700;
  margin-top: 1.2rem;
}
.motion-category:first-child {
  margin-top: 0;
}

.motion-mobile-list {
  display: none;
}
.motion-mobile-video-box {
  position: relative;
  background: #000;
  overflow: hidden;
}
.motion-mobile-video-box img,
.motion-mobile-video-box iframe {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(3px);
  opacity: 0.45;
  transition: filter 0.6s ease, opacity 0.6s ease;
}
.motion-mobile-video-box.in-focus img,
.motion-mobile-video-box.in-focus iframe {
  filter: none;
  opacity: 1;
}
.motion-mobile-video-box iframe {
  border: 0;
}
.motion-mobile-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.motion-mobile-gap {
  height: 1.5rem;
}
.motion-mobile-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  height: 1.5rem;
  align-items: center;
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  body[data-page="motion"] { height: auto; overflow: auto; }
  .motion-video-stage,
  .motion-project-stage,
  .motion-project-nav,
  .motion-detail-toggle,
  .motion-detail-bar,
  .motion-list,
  .motion-list-meta-corner {
    display: none;
  }
  .motion-mobile-list {
    display: block;
    /* bottom = mobile-nav-bar height (3.2rem) + one blank line, so the fixed
       bar never overlaps the last caption and exactly one line shows above it */
    padding: 0.75rem 0.75rem calc(4.7rem + env(safe-area-inset-bottom));
  }
}

/* ---------- project (video) page ---------- */

body.project-page {
  --bg: #000000;
  --fg: #ffffff;
}
.project-header {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  font-size: var(--nav-size);
}
.project-stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- journal page ---------- */

body[data-page="journal"] .page {
  padding-top: 1.5rem;
  padding-bottom: 4rem;
}
.journal-centered {
  display: flex;
  flex-direction: column;
}
.journal-post {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-bottom: 11.2rem;
}
.journal-post:last-child {
  margin-bottom: 0;
}
/* The box is sized from --journal-ratio (set in JS to the post's most
   landscape photo) so its height never changes between slides. width picks
   whichever of the two limits bites first, keeping the old 60vh/60vw feel. */
.journal-post-media {
  position: relative;
  overflow: hidden;
  line-height: 0;
  aspect-ratio: var(--journal-ratio, 3 / 2);
  width: min(60vw, calc(60vh * var(--journal-ratio, 1.5)));
  -webkit-tap-highlight-color: transparent;
}
.journal-slide-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.journal-slide {
  flex: 0 0 100%;
  height: 100%;
}
.journal-post-img {
  display: block;
  width: 100%;
  height: 100%;
  /* contain, not cover: a portrait photo shrinks to the box's height rather
     than being cropped to fill a landscape frame. */
  object-fit: contain;
}
.journal-slide-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  -webkit-tap-highlight-color: transparent;
}
.journal-slide-prev { left: 0; cursor: w-resize; }
.journal-slide-next { right: 0; cursor: e-resize; }
.journal-slide-zone:hover,
.journal-slide-zone:active {
  filter: none;  /* the global a:hover blur has no business here */
}
.journal-post-dots {
  position: absolute;
  bottom: 0.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 999px;
}
.journal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}
.journal-dot.active {
  background: #fff;
}
.journal-post-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 0.7rem;
}

@media (max-width: 900px) {
  body[data-page="journal"] .page { padding: 0.75rem 0.75rem calc(4rem + env(safe-area-inset-bottom)); }
  /* full width to the margins; height comes from the locked aspect ratio */
  .journal-post-media { width: 100%; }
  .journal-post { margin-bottom: 9.7rem; }
  /* The tap zones stay: a tap on either side works alongside the swipe. The
     dark flash they used to show on touch is gone via the transparent
     tap-highlight and the filter reset on .journal-slide-zone above. */
}

/* ---------- 404 ---------- */

/* Two columns like the reference — the code marking the left edge, the
   message set against it — but at this site's own scale. Nothing here is
   set large: the whole site runs on --nav-size, so a display-sized heading
   would read as a different website. The weight comes from the space
   around it instead. */
body[data-page="notfound"] .page {
  min-height: 100vh;
  display: flex;
  align-items: center;
}
/* #content is the flex item here, so it has to be told to take the width —
   otherwise it shrinks to fit the text and the two columns bunch up on the
   left instead of spanning the page. */
body[data-page="notfound"] #content {
  flex: 1;
}
.notfound {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  width: 100%;
  gap: 2rem;
}
.notfound-code {
  font-size: var(--nav-size);
  color: var(--fg-dim);
}
.notfound-body {
  max-width: 22rem;
}
.notfound-title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.25;
  font-weight: 500;
}
.notfound-text {
  margin: 0.6rem 0 0;
  font-size: var(--nav-size);
  color: var(--fg-dim);
}
.notfound-back {
  display: block;
  margin-top: 1.6rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0, 0, 0, 0.15);
  font-size: var(--nav-size);
}

@media (max-width: 900px) {
  body[data-page="notfound"] .page {
    padding: 0.75rem 0.75rem calc(4rem + env(safe-area-inset-bottom));
  }
  /* Stacked, with the code above the message rather than beside it. */
  .notfound {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }
  .notfound-body { max-width: none; }
}

/* ---------- info page ---------- */

body[data-page="info"] .page {
  height: 100vh;
  display: flex;
}
body[data-page="info"] #content {
  flex: 1;
  display: flex;
  align-items: flex-start;
}
.info-columns {
  display: grid;
  grid-template-columns: 24rem 30rem;
  gap: 4rem;
  font-size: var(--nav-size);
  margin-top: 2.4rem;
  margin-left: 7rem;
}
.info-columns a {
  text-decoration: none;
}
.info-heading {
  font-weight: 700;
}
