@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #201f1b;
  --muted: #5d5c55;
  --line: #cecbc1;
  --blue: #245bff;
  font-family: "DM Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
body { margin: 0; }
h1, h2, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

.site-header, main {
  width: min(1100px, calc(100% - clamp(32px, 9vw, 112px)));
  margin-inline: auto;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding: clamp(32px, 6vw, 80px) 0 22px;
  border-bottom: 1px solid var(--ink);
}

.wordmark {
  font-size: clamp(56px, 10vw, 126px);
  font-weight: 700;
  line-height: .88;
  letter-spacing: -.085em;
}

.wordmark span { color: var(--blue); }

.byline {
  color: var(--muted);
  font-size: 15px;
}

.byline a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: var(--ink);
  text-underline-offset: .25em;
}

.byline a:hover { color: var(--blue); }

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 38px) clamp(16px, 2.5vw, 32px);
  list-style: none;
  margin: 0;
  padding: 20px 0 56px;
}

.project {
  position: relative;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.project-media, .preview-media {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  isolation: isolate;
  background: #142042;
}

.cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
}

.cover img {
  position: relative;
  display: block;
  height: auto;
}

.cover--kestrel {
  background: radial-gradient(ellipse at 54% 43%, #264fc2 0%, #122345 73%);
}

.cover--kestrel::before {
  content: "";
  position: absolute;
  inset: -66% 0;
  transform: rotate(-12deg);
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 28px, #c5d6ff4d 29px, transparent 30px 61px);
}

.cover--kestrel img {
  width: 36%;
  max-width: 230px;
  filter: drop-shadow(12px 16px 12px #0e163b99);
}

.cover--renai {
  background: #eec6d3;
}

.cover--renai::before, .cover--renai::after {
  content: "";
  position: absolute;
  width: 58%;
  height: 66%;
  border-radius: 160px 160px 160px 24px;
  transform: rotate(-19deg);
}

.cover--renai::before {
  translate: -27% -21%;
  background: #f9dee5;
}

.cover--renai::after {
  z-index: -1;
  translate: 32% 30%;
  background: #d5829f;
  border-radius: 160px 160px 24px 160px;
}

.cover--renai img {
  z-index: 1;
  width: 21%;
  max-width: 110px;
  transform: rotate(-9deg);
  filter: drop-shadow(7px 10px 12px #6b17373d);
}

.cover--orvio {
  background: radial-gradient(ellipse at center, #183a48, #101520 78%);
}

.cover--orvio::before {
  content: "";
  position: absolute;
  inset: -30% 15%;
  transform: skewX(-24deg);
  background:
    linear-gradient(#46edff, #46edff) 20% 35% / 14% 5px,
    linear-gradient(#46edff, #46edff) 84% 65% / 14% 5px,
    linear-gradient(#50a4e8, #50a4e8) 50% 74% / 14% 4px,
    repeating-linear-gradient(90deg, #6ef3ff36 0 1px, transparent 1px 16.666%);
  background-repeat: no-repeat;
}

.cover--orvio img {
  width: 12%;
  min-width: 32px;
  max-width: 56px;
  border-radius: 25%;
  filter: drop-shadow(0 0 20px #68e4ff9c);
}

.cover--blue { background: #075267; }
.cover--blue img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.cover--image img { width: 100%; height: 100%; object-fit: cover; }
.cover--default {
  background: radial-gradient(ellipse at 68% 35%, #35456c, #1b2030 75%);
  color: #e0e7ff;
  font-size: clamp(46px, 14vw, 138px);
  font-weight: 700;
  line-height: 1;
}
.empty-catalog { padding: 20px 0; color: var(--muted); }

.project-media video, .preview-media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.project-media video, .preview-media video {
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.project-media video { object-fit: cover; }
.project-media[data-playing] video, .preview-media[data-playing] video { opacity: 1; }
.preview-media video { object-fit: contain; background: #0c1021; }

.icon {
  display: block;
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.peek, .preview-close {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  height: 44px;
  border: 1px solid #ffffff70;
  background: #141722d9;
  color: #fff;
}

.peek:not([hidden]) { display: inline-flex; }
.peek {
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.peek .icon { width: 15px; height: 15px; }
.peek:hover, .preview-close:hover { background: #28305b; }
.peek:focus-visible { outline-offset: 2px; outline-color: #fff; }

.project-copy {
  position: relative;
  padding: 16px 50px 18px 0;
}

.project h2, .preview h2 {
  font-size: clamp(25px, 3.8vw, 36px);
  font-weight: 700;
  letter-spacing: -.066em;
  line-height: 1.05;
}

.project h2 a { text-decoration: none; }
.project h2 a > span:not(.out-arrow) {
  color: var(--muted);
  font-size: .61em;
  font-weight: 500;
  letter-spacing: -.02em;
}

.project p, .preview p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

.out-arrow {
  position: absolute;
  top: 14px;
  right: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.project-copy .project-link::before {
  position: absolute;
  inset: 0;
  content: "";
}

.project-link:hover .out-arrow, .project-link:focus-visible .out-arrow {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.preview {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  margin: auto;
  padding: 0;
  border: 0;
  background: var(--paper);
  color: var(--ink);
}

.preview::backdrop { background: #10111ad9; }
.preview-stage { position: relative; }
.preview-close {
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border-radius: 50%;
}
.preview-close:focus-visible { outline-color: #fff; outline-offset: 2px; }
.preview-media {
  aspect-ratio: auto;
  height: min(56.25vw, 460px, max(110px, calc(100dvh - 200px)));
}
.preview-copy { padding: clamp(16px, 4vw, 32px); }
.preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 16px;
  margin-top: 16px;
}
.preview-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.preview-link:hover { background: var(--blue); }
.preview-share {
  margin-right: auto;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: .25em;
}
.preview-share:hover { color: var(--blue); }
.preview-link .icon { width: 18px; height: 18px; }
.preview-toggle {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  color: #fff;
}
.preview-toggle:not([hidden]) { display: grid; place-items: center; }
.preview-toggle:focus-visible { outline-offset: -4px; outline-color: #fff; }
.preview-play-glyph {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid #ffffff70;
  border-radius: 50%;
  background: #141722d9;
}
.preview-play-glyph .icon { margin-left: 2px; }
.preview-toggle:not([data-paused]) .preview-play-glyph { visibility: hidden; }
.preview-toggle[data-paused]:hover .preview-play-glyph { background: #28305b; }
.preview-sound {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.preview-sound:not([hidden]) { display: grid; place-items: center; }
.preview-sound:hover { border-color: var(--ink); }

@media (max-width: 600px) {
  .site-header { padding-bottom: 12px; }
  .projects { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .project-media video, .preview-media video { transition: none; }
}
