@font-face {
  font-family: "Space Mono";
  src: url("./assets/SpaceMono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #000;
  --ink: #eceeec;
  --muted: #929892;
  --accent: #b4e7a0;
  --line: #202420;
  --font: "Space Mono", monospace;
  --space: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  font-family: var(--font);
  font-synthesis: none;
  background: var(--canvas);
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; display: flex; flex-direction: column; min-height: 100svh; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, [tabindex="0"]:focus-visible {
  outline: 1px solid #999;
  outline-offset: 6px;
}
.pointer-input :focus-visible { outline: none; }
[tabindex="-1"]:focus { outline: none; }
::selection { color: var(--ink); background: #333; }

#app { flex: 1; }
.intro {
  min-height: calc(100svh - 88px);
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.wave { display: block; line-height: 0; margin-bottom: 32px; }
.wave img { display: block; object-fit: contain; }
.intro h1 {
  margin: 0 0 16px;
  font-weight: 400;
  font-size: clamp(23px, 2.1vw, 29px);
  letter-spacing: -.065em;
  line-height: 1.5;
}
.invitation {
  padding: 12px 0;
  color: var(--muted);
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.9;
  transition: color 180ms ease;
}
.invitation span { display: inline-block; margin-left: 6px; color: var(--accent); }
.invitation:hover { color: var(--ink); }
.boot .wave { animation: arrive 700ms var(--ease) 350ms both; }
.boot .intro h1 { animation: arrive 700ms var(--ease) 950ms both; }
.boot .invitation { animation: arrive 700ms var(--ease) 1500ms both; }
.boot .invitation[href="#blogs"] { animation-delay: 1650ms; }
.boot .invitation[href="#gallery"] { animation-delay: 1800ms; }
.boot .contact { animation: arrive 700ms var(--ease) 1950ms both; }
.contact { min-height: 88px; padding: 20px 24px max(32px, env(safe-area-inset-bottom)); text-align: center; font-size: 14px; line-height: 1.8; }
.contact a { color: var(--muted); transition: color 180ms ease; }
.contact a:hover { color: var(--ink); }
.departing .intro { animation: fold 320ms cubic-bezier(.7, 0, .3, 1) both; pointer-events: none; }
.scan {
  position: fixed;
  z-index: 2;
  top: 50svh;
  left: 50%;
  width: min(520px, 82vw);
  height: 1px;
  background: var(--accent);
  pointer-events: none;
  animation: scan 800ms cubic-bezier(.65, 0, .2, 1) both;
}

.screen {
  width: min(100% - 64px, 640px);
  margin: 0 auto;
  padding: clamp(40px, 10svh, 104px) 0 48px;
  animation: arrive 450ms var(--ease) both;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 12px;
  padding: 8px 0;
  font-size: 12px;
  color: var(--muted);
  transition: color 180ms ease;
}
.back:hover { color: var(--ink); }
.screen h1 {
  margin: 32px 0;
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
.project-screen { max-width: 520px; }
.project-list {
  margin: 0;
  padding: 0 16px 0 0;
  list-style: none;
  max-height: min(58svh, 520px);
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  scrollbar-color: #384038 transparent;
  scroll-padding-block: 12px;
}
.project-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 17px 2px;
  min-height: 56px;
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.65;
  color: #adb3ad;
  transition: color 180ms ease;
}
.project-list a:hover, .project-list a:focus-visible { color: var(--ink); }
.project-list a span { transition: transform 220ms var(--ease); }
.project-list a:hover span { transform: translateX(4px); }
.project-list i {
  font-style: normal;
  font-size: 15px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 180ms ease;
}
.from-intro .project-list li { animation: materialize 550ms var(--ease) calc(100ms + var(--index) * 45ms) both; }
.from-intro .project-list li:focus-within { opacity: 1 !important; transform: none !important; }
.project-list a:hover i, .project-list a:focus-visible i { opacity: 1; color: var(--ink); }
.project-list a:focus-visible { outline-offset: -1px; }
.reader h1 { margin-bottom: 20px; }
.description { font-size: 16px; line-height: 1.8; }
.status { color: var(--muted); font-size: 11px; line-height: 1.8; margin-top: 16px; }
.story { margin-top: 48px; font-size: 14px; line-height: 1.95; color: #b4bbb4; }
.story p { margin: 0 0 24px; }
.story h2 { color: var(--ink); font-weight: 400; font-size: 18px; line-height: 1.6; margin: 48px 0 20px; letter-spacing: -.04em; }
.story h3 { color: var(--ink); font-weight: 400; font-size: 16px; line-height: 1.7; margin: 36px 0 16px; }
.story a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; overflow-wrap: anywhere; }
.story figure { margin: 32px 0; }
.story img { display: block; width: 100%; height: auto; margin: 24px 0 12px; }
.story figcaption { color: var(--muted); font-size: 12px; line-height: 1.8; }
.media-error { color: var(--muted); font-size: 12px; }
.gallery-screen { width: min(100% - 64px, 1024px); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery-tile { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0b0d0b; }
.gallery-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 200ms ease; }
.gallery-tile:hover img { opacity: .8; }
.gallery-tile:focus-visible { outline-offset: 3px; }
.gallery-tile .media-error { padding: 16px; }
.image-stage { position: relative; display: grid; place-items: center; min-height: 200px; }
.image-stage img { display: block; width: 100%; height: min(66svh, 720px); object-fit: contain; }
.image-loading { position: absolute; color: var(--muted); font-size: 12px; z-index: 1; pointer-events: none; }
.image-stage[aria-busy="false"] .image-loading { display: none; }
.image-controls { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 24px; font-size: 12px; }
.image-controls a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 0; color: var(--muted); }
.image-controls a:hover { color: var(--ink); }
.image-controls [aria-disabled] { color: #525852; }
.story ul { padding-left: 22px; margin: 0 0 28px; }
.story li { padding-left: 4px; margin-bottom: 10px; }
.story blockquote { margin: 40px 0; padding-left: 20px; border-left: 1px solid var(--accent); color: var(--ink); }
.visit { display: inline-flex; gap: 16px; padding: 14px 0; margin-top: 12px; color: var(--accent); font-size: 14px; line-height: 1.8; border-bottom: 1px solid #35492d; }
.visit:hover { color: var(--ink); }
.reader-footer { margin-top: 64px; border-top: 1px solid var(--line); padding-top: 16px; }
.no-script { padding: 24px; color: var(--muted); text-align: center; font-size: 12px; }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fold {
  0% { opacity: 1; transform: scale(1); }
  65% { opacity: .45; }
  100% { opacity: 0; transform: scale(1.08, .015); }
}
@keyframes scan {
  0%, 18% { opacity: 0; transform: translateX(-50%) scaleX(.01); }
  40% { opacity: .8; transform: translateX(-50%) scaleX(1); }
  100% { opacity: 0; transform: translateX(-50%) scaleX(.01); }
}
@keyframes materialize {
  from { opacity: 0; transform: translate(12px, 4px); }
  to { opacity: 1; transform: translate(0); }
}
@media (min-width: 960px) {
  .intro h1 { font-size: clamp(32px, 2.5vw, 48px); }
  .wave img { width: 128px; height: 128px; }
  .invitation { font-size: clamp(18px, 1.2vw, 22px); }
  .contact { font-size: clamp(14px, 1vw, 16px); }
  .screen { width: min(100% - 96px, 760px); padding: clamp(32px, 5svh, 72px) 0 24px; }
  .back { font-size: 14px; }
  .screen h1 { margin: 16px 0 24px; font-size: clamp(40px, 3.2vw, 60px); line-height: 1.25; }
  .project-screen { width: min(100% - 96px, 1120px); max-width: none; }
  .project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(48px, 6vw, 112px);
    max-height: none;
    overflow: visible;
    padding: 0;
  }
  .project-list a {
    min-height: clamp(48px, 6.8svh, 72px);
    padding: clamp(8px, 1.4svh, 16px) 2px;
    font-size: clamp(18px, 1.25vw, 22px);
    line-height: 1.5;
  }
  .project-list i { font-size: 18px; }
  .description { font-size: 18px; }
  .story { font-size: clamp(16px, 1.1vw, 18px); }
  .story h2 { font-size: 24px; }
  .story h3 { font-size: 20px; }
  .gallery-screen { width: min(100% - 96px, 1280px); }
  .gallery-grid { gap: 24px; }
}
@media (min-width: 960px) and (max-height: 700px) {
  .screen { padding-top: 24px; }
  .screen h1 { margin: 12px 0 16px; font-size: clamp(36px, 3vw, 44px); }
  .project-list a { min-height: 44px; padding-block: 8px; }
}
@media (max-width: 480px) {
  .screen { width: calc(100% - 48px); padding-top: 24px; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .project-screen h1 { margin-top: 24px; }
  .project-list { max-height: 66svh; }
  .story { font-size: 13px; }
  .intro { padding-inline: 20px; }
  .invitation { max-width: 100%; text-wrap: balance; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
