:root {
  --outside: #1f1f1f;
  --paper: #f3f3f1;
  --card: #ffffff;
  --ink: #080808;
  --ink-soft: #565656;
  --muted: #8b8b88;
  --line: rgb(8 8 8 / 0.08);
  --line-strong: rgb(8 8 8 / 0.16);
  --blue: #0b75d8;
  --shadow: rgb(0 0 0 / 0.06);
  --content-max: clamp(1160px, 72vw, 1880px);
  --chrome-max: clamp(1240px, 76vw, 1960px);
  --hero-logo-max: clamp(900px, 56vw, 1420px);
  --hero-logo-fit: min(var(--hero-logo-max), max(820px, calc((100svh - 620px) * 1.75)));
  --hero-min-height: clamp(500px, 58svh, 780px);
  --project-min-height: clamp(380px, 22vw, 520px);
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Noto Sans SC", "Microsoft YaHei", sans-serif;

  color: var(--ink);
  background: var(--outside);
  font: 16px/1.55 var(--sans);
  font-synthesis: none;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  padding: 22px;
  background: var(--outside);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  color: var(--paper);
  background: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  left: 30px;
  top: 30px;
  z-index: 100;
  padding: 10px 12px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

.skip-link:focus {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.page-frame {
  position: relative;
  min-height: calc(100svh - 44px);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgb(8 8 8 / 0.055) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(rgb(8 8 8 / 0.04) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--paper);
  border: 1px solid rgb(255 255 255 / 0.34);
  border-radius: 28px;
  box-shadow: 0 30px 70px rgb(0 0 0 / 0.22);
}

.grid-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  width: 100%;
  max-width: var(--chrome-max);
  margin-inline: auto;
  padding: 28px 34px;
}

.site-header {
  min-height: 78px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.wordmark__mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 820;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 760;
}

.site-nav a {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 4px;
  transition:
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: rgb(8 8 8 / 0.06);
  transform: translateY(-1px);
}

.hero {
  position: relative;
  display: grid;
  justify-items: center;
  width: calc(100% - 68px);
  max-width: var(--content-max);
  min-height: var(--hero-min-height);
  margin: 30px auto 38px;
  padding: 44px 28px 60px;
}

.hero__meta,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 760;
}

.hero__meta {
  justify-self: start;
  margin-left: 10px;
}

.section-dot {
  width: 9px;
  height: 9px;
  background: var(--ink);
  border: 2px solid var(--paper);
  border-radius: 999px;
  box-shadow: 0 0 0 2px var(--ink);
}

.hero__logo-stage {
  position: relative;
  display: grid;
  width: 100%;
  max-width: var(--hero-logo-fit);
  aspect-ratio: 1792 / 760;
  isolation: isolate;
  place-items: center;
  margin: 42px auto 30px;
}

.hero__logo-stage::before,
.hero__logo-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
}

.hero__logo-stage::before {
  inset: 4% -3% 0;
  background:
    radial-gradient(ellipse at 50% 45%, rgb(255 255 255 / 0.8) 0%, rgb(255 255 255 / 0.4) 34%, rgb(255 255 255 / 0.12) 58%, transparent 78%),
    linear-gradient(180deg, rgb(255 255 255 / 0.2), rgb(255 255 255 / 0.04));
  filter: blur(2px);
}

.hero__logo-stage::after {
  left: 14%;
  right: 14%;
  bottom: 12%;
  height: 16%;
  background: radial-gradient(ellipse at center, rgb(8 8 8 / 0.12), transparent 70%);
  filter: blur(24px);
  opacity: 0.8;
}

.hero__logo {
  width: 100%;
  max-width: 88%;
  height: auto;
  opacity: 0.98;
  filter:
    drop-shadow(0 18px 28px rgb(8 8 8 / 0.12))
    drop-shadow(0 1px 0 rgb(255 255 255 / 0.42));
}

.hero__intro {
  width: 100%;
  max-width: 520px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  text-align: center;
}

.works {
  width: calc(100% - 68px);
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 16px 0 82px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 76px;
  font-weight: 820;
  line-height: 0.96;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
}

.project-card {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: var(--project-min-height);
  padding: 22px;
  overflow: hidden;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 44px var(--shadow);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 200ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 28px 60px rgb(0 0 0 / 0.1);
  transform: translateY(-4px);
}

.project-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}

.project-card__top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-card__index,
.project-card__meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.project-card__action {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.project-card__preview {
  position: absolute;
  inset: 0 0 auto;
  height: 58%;
  overflow: hidden;
  opacity: 0.18;
}

.project-card__preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, var(--card) 0%, transparent 55%);
}

.project-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transform: scale(1.02);
}

.project-card__preview--photo img {
  object-position: 70% 62%;
}

.project-card__preview--raex img {
  object-position: 40% center;
}

.project-card__preview--game {
  opacity: 0.16;
  background: transparent;
}

.game-bars {
  position: absolute;
  left: 14%;
  right: 12%;
  bottom: 22%;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  height: 70%;
}

.game-bars span {
  width: 16%;
  background:
    linear-gradient(90deg, transparent 42%, var(--ink) 43% 57%, transparent 58%) 0 16px / 100% 24px repeat-y,
    rgb(8 8 8 / 0.2);
  border: 1px solid rgb(8 8 8 / 0.28);
}

.game-bars span:nth-child(1) {
  height: 48%;
}

.game-bars span:nth-child(2) {
  height: 74%;
}

.game-bars span:nth-child(3) {
  height: 56%;
}

.game-bars span:nth-child(4) {
  height: 86%;
}

.game-bars span:nth-child(5) {
  height: 64%;
}

.game-line {
  position: absolute;
  left: 12%;
  right: 8%;
  bottom: 22%;
  height: 2px;
  background: var(--ink);
}

.game-runner {
  position: absolute;
  left: 28%;
  bottom: 22%;
  width: 44px;
  height: 44px;
  border: 4px solid var(--ink);
  border-left-color: transparent;
  border-bottom-color: transparent;
  transform: translateY(6px) rotate(45deg);
}

.project-card__body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-self: end;
  min-height: 176px;
}

.project-card__title {
  display: block;
  margin-bottom: 14px;
  color: var(--ink);
  font-size: 28px;
  font-weight: 820;
  line-height: 1.02;
}

.project-card__text {
  max-width: 320px;
  margin-bottom: 24px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.project-card__meta {
  display: block;
  margin-top: auto;
  overflow-wrap: anywhere;
}

.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 760;
}

@media (max-width: 1060px) {
  .project-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .project-card {
    min-height: 330px;
  }
}

@media (min-width: 1600px) {
  body {
    padding: clamp(24px, 1.2vw, 30px);
  }

  .page-frame {
    min-height: calc(100svh - clamp(48px, 2.4vw, 60px));
  }

  .site-header,
  .site-footer {
    padding-inline: 42px;
  }

  .hero {
    margin-top: 26px;
    margin-bottom: 36px;
    padding-top: 40px;
    padding-bottom: 54px;
  }

  .hero__logo-stage {
    margin-top: 42px;
    margin-bottom: 30px;
  }

  .works {
    padding-bottom: 96px;
  }

  .project-card {
    padding: 26px;
  }

  .project-card__title {
    font-size: 31px;
  }

  .project-card__text {
    font-size: 15px;
  }
}

@media (min-width: 2200px) {
  .page-frame {
    border-radius: 34px;
  }

  .hero {
    margin-top: 34px;
    margin-bottom: 46px;
    padding-top: 52px;
    padding-bottom: 64px;
  }

  .section-heading {
    margin-bottom: 34px;
  }

  .section-heading h2 {
    font-size: 88px;
  }

  .project-card__title {
    font-size: 34px;
  }
}

@media (max-width: 720px) {
  body {
    padding: 10px;
  }

  .page-frame {
    min-height: calc(100svh - 20px);
    border-radius: 18px;
  }

  .site-header,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    padding: 20px 18px;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero,
  .works {
    width: 82vw;
  }

  .hero {
    min-height: 400px;
    margin-top: 18px;
    padding: 30px 0 42px;
  }

  .hero__meta {
    justify-self: center;
    margin-left: 0;
  }

  .hero__logo-stage {
    width: 82vw;
    margin-top: 36px;
  }

  .hero__logo {
    max-width: 72%;
  }

  .hero__intro {
    width: 72vw;
    font-size: 15px;
  }

  .section-heading {
    gap: 16px;
    margin-bottom: 22px;
  }

  .section-heading h2 {
    margin-top: 0;
    font-size: 48px;
  }

  .project-card {
    min-height: 350px;
    padding: 18px;
  }

  .project-card__action {
    display: none;
  }

  .project-card__title {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
