@font-face {
  font-family: "KH Teka";
  src: url("fonts/KHTeka-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "KH Teka";
  src: url("fonts/KHTeka-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

html.intro .site-header .wordmark,
html.intro .site-header nav li,
html.intro .site-header .theme-toggle,
html.intro .site-header .nav-toggle,
html.intro .tile {
  opacity: 0;
}

html.intro .site-header .wordmark            { animation: fadeInDown 0.4s 0.00s ease-out forwards; }
html.intro .site-header nav li:nth-child(1)  { animation: fadeInDown 0.4s 0.05s ease-out forwards; }
html.intro .site-header nav li:nth-child(2)  { animation: fadeInDown 0.4s 0.10s ease-out forwards; }
html.intro .site-header nav li:nth-child(3)  { animation: fadeInDown 0.4s 0.15s ease-out forwards; }
html.intro .site-header .theme-toggle        { animation: fadeInDown 0.4s 0.20s ease-out forwards; }
html.intro .site-header .nav-toggle          { animation: fadeInDown 0.4s 0.25s ease-out forwards; }

html.intro .tile:nth-child(1) { animation: fadeInUp 0.5s 0.30s ease-out forwards; }
html.intro .tile:nth-child(2) { animation: fadeInUp 0.5s 0.36s ease-out forwards; }
html.intro .tile:nth-child(3) { animation: fadeInUp 0.5s 0.42s ease-out forwards; }
html.intro .tile:nth-child(4) { animation: fadeInUp 0.5s 0.48s ease-out forwards; }
html.intro .tile:nth-child(5) { animation: fadeInUp 0.5s 0.54s ease-out forwards; }
html.intro .tile:nth-child(6) { animation: fadeInUp 0.5s 0.60s ease-out forwards; }


:root {
  --fg: #000;
  --bg: #fff;
  --tile: #f0f0f0;
  --tile-hover: #e8e8e8;
  --rule: #000;
}

[data-theme="dark"] {
  --fg: #fff;
  --bg: #000;
  --tile: #1a1a1a;
  --tile-hover: #222;
  --rule: #fff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html.js .block-image img:not(.revealed),
html.js .block-placeholder:not(.revealed),
html.js .block-placeholders:not(.revealed),
html.js .block-two-up img:not(.revealed) {
  opacity: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: none;
}

html::-webkit-scrollbar {
  display: none;
}

body {
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

body {
  font-family: "KH Teka", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--fg);
  background: var(--bg);
  padding: clamp(16px, 3vw, 32px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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


ul {
  list-style: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: calc(-1 * clamp(16px, 3vw, 32px)) calc(-1 * clamp(16px, 3vw, 32px)) 0;
  padding: clamp(16px, 3vw, 32px);
  transform: translate3d(0, 0, 0);
  transition: transform 0.25s ease;
  will-change: transform;
}

html.nav-hidden .site-header:not(.is-open) {
  transform: translate3d(0, -100%, 0);
}

.site-header .wordmark {
  white-space: nowrap;
}

.site-header .nav-group {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header nav ul {
  display: flex;
  gap: 72px;
}

.site-header nav a {
  color: #999999;
}

.site-header nav a:hover,
.site-header nav a.current {
  color: var(--fg);
}

@media (min-width: 600px) {
  .site-header .theme-toggle {
    margin-left: 48px;
  }
}

.theme-toggle {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: var(--bg);
  padding: 0;
  cursor: pointer;
  flex: none;
}

.nav-toggle {
  display: none;
  width: 18px;
  height: 5px;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  flex: none;
}

.nav-toggle span {
  display: block;
  height: 1px;
  width: 100%;
  background: var(--fg);
  transition: transform 0.2s ease;
  transform-origin: center;
}

.site-header.is-open .nav-toggle span:first-child {
  transform: translateY(2px) rotate(45deg);
}

.site-header.is-open .nav-toggle span:last-child {
  transform: translateY(-2px) rotate(-45deg);
}

@media (max-width: 599px) {
  .site-header nav ul {
    gap: 24px;
  }
  .site-header .theme-toggle {
    margin-left: 24px;
  }
}

.theme-toggle:hover {
  background: var(--fg);
}

[data-theme="dark"] .theme-toggle {
  background: var(--fg);
}

[data-theme="dark"] .theme-toggle:hover {
  background: var(--bg);
}

main {
  margin-top: clamp(48px, 8vh, 96px);
  flex: 1;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tile {
  display: block;
}

.tile:hover {
  font-style: normal;
}

.tile-fill {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--tile);
  width: 100%;
  overflow: hidden;
}

.tile-fill img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tile-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.15s ease;
  pointer-events: none;
}

.tile:hover .tile-fill::after {
  background: rgba(0, 0, 0, 0.55);
}

.tile-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1;
}

.tile:hover .tile-label {
  opacity: 1;
}

@media (max-width: 599px) {
  .tile-label {
    flex-direction: column;
    gap: 2px;
  }
}

.tile-disabled {
  cursor: not-allowed;
}

.tile-disabled:hover .tile-fill::after {
  background: rgba(0, 0, 0, 0.55);
}

.tile-disabled:hover .tile-label {
  opacity: 1;
}

.tile-disabled .tile-date::after {
  content: "\00a0(coming soon)";
}

.prose {
  max-width: 60ch;
  line-height: 1.7;
}

.prose p + p {
  margin-top: 1em;
}

main.info {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 64px);
}

main.info .info-photo {
  grid-column: 1;
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  margin: 0;
}

main.info .info-body {
  grid-column: 2;
  line-height: 1.7;
}

.info-photo-placeholder {
  aspect-ratio: 1 / 1;
  background: var(--tile);
}

@media (max-width: 899px) {
  main.info {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  main.info .info-photo,
  main.info .info-body {
    grid-column: auto;
  }
  main.info .info-photo {
    max-width: 320px;
  }
}


.project-intro {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-areas:
    "title . body ."
    "meta  . body .";
  grid-template-rows: auto auto;
  gap: clamp(24px, 4vw, 64px);
  row-gap: calc(14px * 1.7);
  margin-top: 32px;
  margin-bottom: 96px;
}

.project-title {
  grid-area: title;
}

.project-intro-body {
  grid-area: body;
}

.project-title {
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.02em;
  line-height: calc(14px * 1.7);
}

.project-intro-body {
  max-width: 60ch;
}

.project-intro-body .section-body {
  margin-bottom: 0;
}

.project-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  line-height: 1.7;
  grid-area: meta;
  align-self: start;
}

.project-meta dt {
  color: #999;
  margin: 0;
  line-height: 1.7;
}

.project-meta dd {
  margin: 0;
  line-height: 1.7;
}

.project-meta dd:not(:last-of-type) {
  margin-bottom: 1.7em;
}

@media (max-width: 899px) {
  .project-intro {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 24px;
  }
}

.project-section {
  margin-bottom: clamp(48px, 6vw, 72px);
}

.project-section + .project-section:not(:has(.section-head)) {
  margin-top: calc(clamp(16px, 3vw, 32px) - clamp(48px, 6vw, 72px));
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.section-head h2 {
  font-weight: 400;
  font-style: normal;
  font-size: 14px;
}

.section-meta {
  color: #999;
}

.section-body {
  max-width: 60ch;
  margin-bottom: clamp(48px, 6vw, 72px);
  line-height: 1.7;
}

.section-blocks {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 32px);
}

.project-hero {
  margin-bottom: 32px;
}

main.project {
  margin-top: 0;
}

.project-hero img,
.project-hero video,
.project-hero .hero-placeholder {
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  display: block;
}

.project-hero .hero-placeholder {
  background: var(--tile);
}

.block-image img {
  width: 100%;
  height: auto;
  display: block;
}

.block-image figcaption {
  color: #999;
  margin-top: 8px;
}

.block-image.full-bleed {
  margin-left: calc(-1 * clamp(16px, 3vw, 32px));
  margin-right: calc(-1 * clamp(16px, 3vw, 32px));
}

.block-text {
  max-width: 60ch;
  line-height: 1.7;
}

.block-text p + p {
  margin-top: 1em;
}

.block-two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 32px);
}

.block-two-up img {
  width: 100%;
  height: auto;
  display: block;
}

.block-video video {
  width: 100%;
  height: auto;
  display: block;
}

.block-video.framed,
.block-image.framed {
  background: var(--tile);
  padding: clamp(32px, 8vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-video.framed video {
  width: auto;
  max-width: 100%;
  max-height: 60vh;
}

.block-video.framed video.crop-tl {
  clip-path: inset(1.5% 0 0 1.5%);
}

.block-image.framed img {
  width: auto;
  height: auto;
  max-width: 100%;
}

.block-image.natural {
  display: flex;
  justify-content: center;
}

.block-image.natural img {
  width: auto;
  height: auto;
  max-width: none;
}

@media (max-width: 899px) {
  .block-image.natural img {
    max-width: 100%;
  }
}

.block-placeholder {
  width: 100%;
  background: var(--tile);
}

.block-placeholders {
  display: grid;
  grid-template-columns: repeat(var(--cols, 2), 1fr);
  gap: clamp(16px, 3vw, 32px);
}

.block-placeholders .placeholder-cell {
  width: 100%;
  background: var(--tile);
}

.block-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: start;
}

.block-split-left {
  margin: 0;
}

.block-split-left img {
  width: 100%;
  height: auto;
  display: block;
}

.block-split-right {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 3vw, 32px);
}

.block-split-right img {
  width: 100%;
  height: auto;
  display: block;
}

.block-split-title {
  font-weight: 400;
  font-size: 14px;
}

.block-split-body {
  line-height: 1.7;
  max-width: 60ch;
}

.block-split-body p + p {
  margin-top: 1em;
}

@media (max-width: 899px) {
  .block-split {
    grid-template-columns: 1fr;
  }
}

.project-page .project-section:last-of-type {
  margin-bottom: 0;
}

.project-page .site-footer {
  margin-top: 0;
}

.project-nav {
  display: flex;
  justify-content: space-between;
  margin-top: clamp(48px, 8vh, 96px);
  margin-bottom: clamp(48px, 8vh, 96px);
}

.project-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}

.project-nav .arrow {
  display: inline-block;
  overflow: hidden;
  position: relative;
  vertical-align: middle;
}

.project-nav .arrow-glyph {
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}

.project-nav .arrow-glyph-ghost {
  position: absolute;
  top: 0;
}

.project-nav .prev .arrow-glyph-ghost { left: 100%; }
.project-nav .next .arrow-glyph-ghost { right: 100%; }

.project-nav .prev:hover .arrow-glyph { transform: translateX(-100%); }
.project-nav .next:hover .arrow-glyph { transform: translateX(100%); }

@media (max-width: 599px) {
  .block-two-up,
  .block-placeholders {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  margin-top: clamp(48px, 8vh, 96px);
  padding-top: 16px;
  border-top: 0.5px solid #999;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  color: #999;
}

.site-footer .footer-contact {
  display: flex;
  gap: clamp(16px, 4vw, 64px);
}
