:root {
  color-scheme: light dark;
  --page-bg: hsl(38 3% 73%);
  --panel-bg: #fff;
  --header-text: #fff;
  --text: #000;
  --muted: hsl(0 1% 48%);
  --line: rgba(255, 255, 255, 0.5);
  --shadow: 0 0.7px 1.6px -1.3px rgb(0 0 0 / 0.19),
    0 2.7px 6px -2.7px rgb(0 0 0 / 0.17),
    0 12px 26.4px -4px rgb(0 0 0 / 0.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: hsl(38 2% 30%);
    --panel-bg: rgb(23, 23, 23);
    --header-text: rgb(208, 205, 205);
    --text: rgb(226, 217, 217);
    --muted: hsl(0 2% 58%);
    --line: rgba(221, 207, 207, 0.5);
  }
}

* {
  box-sizing: border-box;
}

h1,
h2,
p,
ol {
  margin: 0;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.page {
  width: min(100%, 1200px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 8px 32px 32px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 47px;
  padding: 8px;
  color: var(--header-text);
}

.brand {
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  line-height: 2;
}

.path {
  display: flex;
  gap: 16px;
  align-items: center;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}

.mobile-name {
  display: none;
}

.path a:hover,
.brand:hover {
  color: #000;
}

.path a[aria-current="page"] {
  color: var(--text);
}

.shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.home-embed {
  height: 90vh;
  min-height: 520px;
  background: #f4f4f4;
}

.home-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.about-shell {
  padding: 100px 0;
}

.work-list {
  display: flex;
  flex-direction: column;
}

.work-item {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  width: 100%;
  min-height: 180px;
  margin: 0 auto;
  padding: 40px;
}

.media {
  position: relative;
  flex: 0 0 320px;
  overflow: hidden;
  height: 180px;
  border-radius: 20px;
  background: #d8d7d4 url("./assets/card-backdrop.png") center / cover no-repeat;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.video {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 180px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #111;
  cursor: pointer;
}

.video img,
.video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.play {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 68px;
  height: 48px;
  transform: translate(-50%, -50%);
  place-items: center;
}

.play svg {
  display: block;
  width: 68px;
  height: 48px;
}

.video:hover .play path:first-child {
  fill: #f00;
  fill-opacity: 1;
}

.content {
  display: flex;
  flex: 0 0 320px;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  padding: 0;
}

.content h1 {
  max-width: 320px;
  font-family: Lora, Georgia, serif;
  font-size: 36px;
  font-weight: 600;
  line-height: 1.2;
}

.content h2 {
  max-width: 270px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.4;
}

.content p,
.content li {
  max-width: 270px;
  color: var(--text);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.content ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
}

.button {
  width: fit-content;
  margin-top: 8px;
  padding: 13px 18px 14px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  font-family: Manrope, Inter, system-ui, sans-serif;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.button:hover {
  transform: translateY(-1px);
}

.not-found {
  display: grid;
  min-height: 70vh;
  place-items: center;
  text-align: center;
}

.not-found h1 {
  font-family: Lora, Georgia, serif;
  font-size: 52px;
  margin: 0 0 12px;
}

.screenshots-page {
  max-width: 920px;
}

.screenshots-intro {
  display: grid;
  gap: 14px;
  padding: 88px 8px 52px;
}

.screenshots-intro.compact {
  padding-bottom: 32px;
}

.screenshots-intro h1 {
  max-width: 760px;
  font-family: Lora, Georgia, serif;
  font-size: clamp(44px, 8vw, 92px);
  font-weight: 600;
  line-height: 0.95;
}

.screenshots-intro a,
.screenshot-post a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.intro-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.post-breadcrumb,
.post-nav,
.post-index-list {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.post-breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 24px 8px 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.post-breadcrumb a,
.post-nav a,
.post-index-item {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.eyebrow,
.screenshot-date,
.feed-status,
.load-more {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.eyebrow,
.screenshot-date,
.feed-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.screenshot-feed {
  display: grid;
  gap: 28px;
}

.screenshot-post {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.screenshot-media {
  display: grid;
  gap: 1px;
  background: #eef0f3;
}

.screenshot-media.is-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.screenshot-media-item {
  display: grid;
  min-height: 260px;
  overflow: hidden;
  background: #eef0f3;
  place-items: center;
}

.screenshot-media-item img,
.screenshot-media-item video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(82vh, 900px);
  object-fit: contain;
}

.screenshot-media-item.is-image img {
  width: 100%;
}

.screenshot-media.is-single .screenshot-media-item.is-video {
  min-height: clamp(420px, 48vw, 760px);
  padding: clamp(32px, 7vw, 104px);
}

.screenshot-video-preview {
  position: relative;
  display: grid;
  width: min(100%, 760px);
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.screenshot-media-item .screenshot-video-poster {
  width: 100%;
  filter: saturate(0.96);
}

.screenshot-video-play {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.32);
  transform: translate(-50%, -50%);
}

.screenshot-video-play::before {
  position: absolute;
  inset: 50% auto auto 52%;
  width: 0;
  height: 0;
  border-block: 15px solid transparent;
  border-left: 22px solid rgb(255 255 255 / 0.92);
  content: "";
  transform: translate(-38%, -50%);
}

.screenshot-media-item video {
  background: #111;
}

.screenshot-body {
  display: grid;
  gap: 20px;
  padding: 24px;
}

.post-title {
  max-width: 720px;
  font-family: Lora, Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.12;
}

.screenshot-text {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.58;
  white-space: pre-wrap;
}

.screenshot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.screenshot-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.feed-actions {
  display: grid;
  padding: 32px 0 64px;
  place-items: center;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  padding: 24px 8px 64px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.post-index-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
  box-shadow: var(--shadow);
}

.post-index-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 18px;
  padding: 16px 18px;
  background: var(--panel-bg);
  font-size: 13px;
  line-height: 1.5;
  text-decoration: none;
}

.post-index-item:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.post-index-item time {
  color: var(--muted);
  font-weight: 700;
}

.load-more {
  border: 0;
  cursor: pointer;
}

.photos-page {
  max-width: 1180px;
}

.photos-intro {
  display: grid;
  gap: 14px;
  padding: 88px 8px 34px;
}

.photos-intro h1 {
  max-width: 760px;
  font-family: Lora, Georgia, serif;
  font-size: clamp(54px, 9vw, 112px);
  font-weight: 600;
  line-height: 0.95;
}

.photo-feed {
  columns: 3 260px;
  column-gap: 12px;
  padding-bottom: 64px;
}

.photo-feed .feed-status {
  column-span: all;
}

.photo-entry {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  break-inside: avoid;
  border-radius: 8px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #eef0f3;
  cursor: zoom-in;
}

.photo-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  dynamic-range-limit: standard;
}

.photo-card:hover img {
  filter: saturate(1.03) contrast(1.02);
}

.photo-hdr-badge {
  position: absolute;
  inset: 10px 10px auto auto;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
}

.photo-info {
  overflow: hidden;
  background: rgb(28 28 30 / 0.92);
  color: rgb(235 235 245 / 0.86);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.photo-info-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
  background: rgb(58 58 63 / 0.88);
}

.photo-info-header strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-format {
  padding: 4px 7px;
  border-radius: 6px;
  background: rgb(255 255 255 / 0.1);
  color: rgb(255 255 255 / 0.84);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.photo-info-body {
  display: grid;
  gap: 5px;
  padding: 12px 14px 13px;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.photo-info-body p {
  margin: 0;
  color: rgb(235 235 245 / 0.62);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.photo-info-body .photo-location {
  color: rgb(235 235 245 / 0.78);
}

.photo-settings {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
}

.photo-settings span {
  min-width: 0;
  padding: 9px 6px 10px;
  overflow: hidden;
  border-right: 1px solid rgb(255 255 255 / 0.12);
  color: rgb(235 235 245 / 0.72);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-settings span:last-child {
  border-right: 0;
}

.photo-viewer {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  padding: 0;
  border: 0;
  background: rgb(12 12 12 / 0.94);
  color: #fff;
}

.photo-viewer::backdrop {
  background: rgb(0 0 0 / 0.72);
}

.photo-viewer-bar {
  position: fixed;
  z-index: 1;
  inset: 12px 12px auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  pointer-events: none;
}

.photo-viewer-bar button {
  min-width: 44px;
  min-height: 36px;
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: 999px;
  background: rgb(0 0 0 / 0.46);
  color: #fff;
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  pointer-events: auto;
}

.photo-viewer-stage {
  display: grid;
  min-height: 100%;
  margin: 0;
  padding: 64px 18px 28px;
  overflow: auto;
  place-items: center;
}

.photo-viewer-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 132px);
  border-radius: 4px;
  object-fit: contain;
  cursor: zoom-in;
  dynamic-range-limit: no-limit;
}

.photo-viewer-stage figcaption {
  max-width: 780px;
  margin-top: 16px;
  color: rgb(255 255 255 / 0.72);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.photo-viewer.is-actual-size .photo-viewer-stage {
  display: block;
}

.photo-viewer.is-actual-size .photo-viewer-stage img {
  max-width: none;
  max-height: none;
  margin: 0 auto;
  cursor: zoom-out;
}

@media (dynamic-range: high) {
  .photo-viewer-bar::before {
    align-self: center;
    padding: 6px 8px;
    border-radius: 999px;
    background: rgb(0 0 0 / 0.4);
    color: rgb(255 255 255 / 0.72);
    content: "HDR display";
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
    pointer-events: auto;
  }
}

@media (max-width: 1199px) {
  .page {
    width: min(100%, 390px);
    padding: 8px 12px 32px;
  }

  .site-header {
    padding: 8px;
  }

  .path .desktop-label,
  .path .desktop-name {
    display: none;
  }

  .mobile-name {
    display: inline;
  }

  .home-embed {
    min-height: 640px;
  }

  .about-shell {
    padding: 0;
  }

  .work-item {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
  }

  .media,
  .video {
    flex-basis: auto;
    min-height: 244px;
    border-radius: 0;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .media-grid .video {
    min-height: 180px;
  }

  .content {
    flex-basis: auto;
    padding: 32px 24px 40px;
  }

  .content h1 {
    max-width: none;
    font-size: 24px;
    letter-spacing: -0.5px;
  }

  .content h2 {
    max-width: none;
    font-size: 14px;
  }

  .content p,
  .content li {
    max-width: none;
  }

  .screenshots-page {
    width: min(100%, 430px);
  }

  .screenshots-intro {
    padding: 64px 8px 36px;
  }

  .screenshots-intro h1 {
    font-size: 48px;
  }

  .screenshot-feed {
    gap: 18px;
  }

  .screenshot-post {
    border-radius: 10px;
  }

  .screenshot-media.is-grid {
    grid-template-columns: 1fr;
  }

  .screenshot-media-item {
    min-height: 220px;
  }

  .screenshot-body {
    padding: 20px;
  }

  .screenshot-text {
    font-size: 15px;
  }

  .post-title {
    font-size: 27px;
  }

  .post-index-item {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 16px;
  }

  .photos-page {
    width: min(100%, 430px);
  }

  .photos-intro {
    padding: 64px 8px 28px;
  }

  .photos-intro h1 {
    font-size: 54px;
  }

  .photo-feed {
    columns: 1;
  }

  .photo-viewer-bar {
    inset: 8px 8px auto;
  }

  .photo-viewer-stage {
    padding: 58px 10px 24px;
  }

  .photo-viewer-stage img {
    max-height: calc(100vh - 126px);
  }
}
