@font-face {
  font-family: "HAL Timezone";
  src: url("assets/fonts/Codex-HALTimezone-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HAL Timezone";
  src: url("assets/fonts/Codex-HALTimezone-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HAL Timezone Mono";
  src: url("assets/fonts/Codex-HALTimezone-Mono.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #1a1613;
  --paper: #ffffff;
  --line: #d2cfcb;
  font-family: "HAL Timezone", "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "HAL Timezone", "Times New Roman", Times, serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1;
}

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

button {
  font: inherit;
}

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

.site-shell {
  width: calc(100% - clamp(32px, 7.5vw, 96px));
  margin: 0 auto;
}

.media-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(40px, 6.2vw, 76px) 0 clamp(34px, 5vw, 62px);
  text-align: center;
}

.brand-mark {
  display: block;
}

.brand-mark img {
  width: clamp(118px, 11.2vw, 164px);
  height: auto;
}

.media-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px clamp(10px, 1.35vw, 24px);
  margin-top: clamp(22px, 2.8vw, 36px);
  font-family: "HAL Timezone Mono", "Courier New", Courier, monospace;
  font-size: 10px;
  font-style: normal;
  font-weight: 400;
  line-height: 1.12;
  text-transform: uppercase;
}

.media-nav a {
  white-space: nowrap;
}

.project-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 0 0 32px;
}

.project-card,
.project-card.is-featured {
  position: relative;
  min-width: 0;
  grid-column: span 1;
  grid-row: span 1;
  aspect-ratio: 4 / 5;
  border: 0;
  background: #f1f1f1;
  overflow: hidden;
}

.project-link,
.project-media {
  display: block;
  width: 100%;
  height: 100%;
}

.project-media {
  position: relative;
  overflow: hidden;
  background: #f1f1f1;
}

.project-media img,
.media-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.project-media img {
  object-fit: cover;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 1.4vw, 22px);
  padding: clamp(14px, 2.3vw, 36px);
  background: rgba(0, 0, 0, 0);
  color: #ffffff;
  text-align: center;
  opacity: 0;
  transition: background-color 280ms ease, opacity 220ms ease;
}

.project-title {
  max-width: 16ch;
  font-family: "HAL Timezone", "Times New Roman", Times, serif;
  font-size: clamp(21px, 2.25vw, 36px);
  font-style: italic;
  font-weight: 400;
  line-height: 0.98;
}

.project-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: "HAL Timezone Mono", "Courier New", Courier, monospace;
  font-size: clamp(10px, 0.9vw, 13px);
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.project-cta svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-linejoin: miter;
  stroke-width: 1.35;
}

.project-link:focus {
  outline: 0;
}

.project-link:focus img {
  transform: scale(1.018);
}

.project-link:focus .project-overlay {
  background: rgba(0, 0, 0, 0.62);
  opacity: 1;
}

.media-fallback {
  display: block;
  background: #f1f1f1;
}

.media-fallback[hidden] {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .media-nav a:hover,
  .media-nav a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.16em;
  }

  .project-link:hover img,
  .project-link:focus-visible img {
    transform: scale(1.018);
  }

  .project-link:hover .project-overlay,
  .project-link:focus-visible .project-overlay {
    background: rgba(0, 0, 0, 0.62);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: calc(100% - 24px);
  }

  .media-header {
    padding: 32px 0 30px;
  }

  .brand-mark img {
    width: 118px;
  }

  .media-nav {
    max-width: 100%;
    margin-top: 20px;
    gap: 8px 12px;
    font-size: 10px;
    line-height: 1.05;
  }

  .project-layout {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    padding-top: 0;
  }

  .project-title {
    font-size: clamp(12px, 4vw, 17px);
  }

  .project-cta {
    gap: 3px;
    font-size: clamp(7px, 2.1vw, 9px);
  }

  .project-overlay {
    gap: 8px;
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .project-media img,
  .project-overlay {
    transition-duration: 0.01ms;
  }
}
