@font-face {
  font-family: Geist;
  src: url("./assets/geist-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #0a0a0a;
  --text: #f4f4f4;
  --muted: #ababab;
  --rule: #292929;
  --gutter: clamp(1.25rem, 5vw, 5rem);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: Geist, system-ui, sans-serif;
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { display: flow-root; margin: 0; background: var(--background); color: var(--text); }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid currentColor; outline-offset: .3rem; }
::selection { background: #fff; color: #080808; }
section[id], footer[id] { scroll-margin-top: 1.5rem; }

.wrap {
  width: min(77rem, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 4;
  padding: .7rem 1rem;
  background: var(--text);
  color: var(--background);
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.site-header {
  min-block-size: 3.5rem;
  margin-block-start: 1.25rem;
  padding-inline: 1.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--rule);
  border-radius: 3rem;
}

.monogram {
  display: inline-grid;
  grid-auto-flow: column;
  align-items: baseline;
  font-weight: 750;
  font-size: 1.45rem;
  letter-spacing: -.065em;
  line-height: 1;
  padding-block: .62rem;
}

.monogram span { color: #939393; }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.7vw, 2.25rem);
  color: var(--muted);
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  font-size: .9375rem;
  font-weight: 550;
  transition: color .2s ease;
}

.site-nav a:hover { color: var(--text); }

.hero {
  padding-block: 3rem 3.25rem;
  min-block-size: clamp(34rem, calc(100svh - 9rem), 47rem);
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  border-block-end: 1px solid var(--rule);
}

.hero-copy { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(4.65rem, 8.9vw, 8.75rem);
  line-height: .91;
  font-weight: 710;
  letter-spacing: -.066em;
  margin-inline-start: -.053em;
}

.title-line { display: block; overflow: clip; padding: .025em .1em .12em .048em; }
.title-line + .title-line { margin-block-start: -.13em; }
.title-line > span { display: block; }

.hero-role {
  color: #cecece;
  margin-block-start: 1.32rem;
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  line-height: 1.38;
  letter-spacing: -.023em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem 1.55rem;
  margin-block-start: 1.7rem;
}

.button {
  display: inline-flex;
  min-block-size: 2.9rem;
  padding: .65rem 1.15rem;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4rem;
  font-size: .9375rem;
  font-weight: 620;
  line-height: 1.25;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .32s var(--ease);
}

.button:hover { transform: translateY(-2px); }
.button:active { transform: none; }
.button--light { color: #0a0a0a; background: #f4f4f4; }
.button--light:hover { background: #d6d6d6; }
.button--light:focus-visible { outline-color: #f4f4f4; }
.button--dark { color: #f4f4f4; background: #0a0a0a; }
.button--dark:hover { background: #363636; }
.button--dark:focus-visible { outline-color: #0a0a0a; }
.button--outline { border-color: #adadad; }
.button--outline:hover { border-color: #0a0a0a; }

.text-link {
  width: fit-content;
  font-weight: 550;
  text-decoration: underline;
  text-decoration-color: #696969;
  text-decoration-thickness: 1px;
  text-underline-offset: .32em;
  transition: color .2s ease, text-decoration-color .2s ease;
}

.text-link:hover { text-decoration-color: currentColor; }
.hero-actions .text-link { font-size: .9375rem; }

.hero-art {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 9 / 8;
  animation: art-in .85s ease both;
}

.hero-art::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(circle, #464646 1px, transparent 1px);
  background-size: 21px 21px;
  background-position: center;
  mask-image: radial-gradient(ellipse at center, #000 12%, transparent 71%);
  opacity: .54;
  pointer-events: none;
  content: "";
}

.wireframe, .art-poster {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.art-poster { object-fit: contain; }
.hero-art[data-ready] .art-poster { visibility: hidden; }

.section { padding-block: clamp(4rem, 8vw, 7.5rem); }

.section-title {
  font-size: clamp(2.8rem, 6.4vw, 5.75rem);
  line-height: .99;
  font-weight: 650;
  letter-spacing: -.065em;
}

.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2rem);
  margin-block-start: clamp(1.7rem, 4vw, 3rem);
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #303030;
  border-radius: 1rem;
  background: #111;
  transition: border-color .25s ease;
}

.project:hover, .project:focus-within { border-color: #747474; }

.project-art {
  position: relative;
  isolation: isolate;
  aspect-ratio: 576 / 300;
  overflow: hidden;
  border-block-end: 1px solid var(--rule);
  background: radial-gradient(ellipse at 50% 46%, #1b1b1b, #101010 76%);
}

.project-art::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background-position: center;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 76%);
  opacity: .8;
  content: "";
}

.project-art--pixel::before {
  background-image: linear-gradient(#353535 1px, transparent 1px), linear-gradient(90deg, #353535 1px, transparent 1px);
  background-size: 19px 19px;
}

.project-art--lua::before {
  background-image: radial-gradient(circle, #545454 1px, transparent 1px);
  background-size: 16px 16px;
}

.project-art img { display: block; width: 100%; height: 100%; transition: transform .55s var(--ease); }
.project:hover .project-art img, .project:focus-within .project-art img { transform: scale(1.045); }

.project-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(1.25rem, 3vw, 2.2rem);
}

.project-stack {
  color: var(--muted);
  font: 400 .8125rem/1.5 var(--mono);
}

.project-detail h3 {
  margin-block-start: .5rem;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -.045em;
}

.project-detail > p:not(.project-stack) {
  max-width: 38ch;
  margin-block: .7rem 1.3rem;
  color: #c0c0c0;
  font-size: 1rem;
  line-height: 1.6;
}

.project-link {
  display: inline-flex;
  align-items: center;
  min-block-size: 2.75rem;
  margin-block: auto -.4rem;
  font-size: .9375rem;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: start;
  gap: 1.75rem;
  border-block-start: 1px solid var(--rule);
}

.about-copy {
  max-width: 41ch;
  color: #ccc;
  font-size: clamp(1.12rem, 2.1vw, 1.55rem);
  line-height: 1.6;
  letter-spacing: -.026em;
}

.contact { background: #f1f1f1; color: #101010; color-scheme: light; }
.contact ::selection { background: #0a0a0a; color: #f4f4f4; }

.contact-main {
  min-block-size: clamp(15rem, 27vw, 22rem);
  padding-block: 4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.contact-main h2 {
  font-size: clamp(3rem, 7.7vw, 7.6rem);
  line-height: .99;
  font-weight: 680;
  letter-spacing: -.07em;
}

.contact-links { display: flex; flex-wrap: wrap; gap: .62rem; }
.contact-links .button { min-inline-size: 6.7rem; }

.site-footer {
  padding-block: 1.45rem 1.6rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-block-start: 1px solid #c6c6c6;
  color: #414141;
  font-size: .875rem;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-enter { animation: enter .72s var(--ease) both; }
  .title-line:nth-child(1) .hero-enter { animation-delay: .08s; }
  .title-line:nth-child(2) .hero-enter { animation-delay: .15s; }
  .hero-role { animation-delay: .24s; }
  .hero-actions { animation-delay: .30s; }
  [data-reveal].is-pending { opacity: 0; transform: translateY(1.15rem); }
  [data-reveal].is-visible { animation: enter .64s var(--ease) both; }
  [data-reveal]:focus-within { opacity: 1; transform: none; animation: none; }
}

@keyframes enter {
  from { transform: translateY(.9em); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes art-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 52rem) {
  .hero { padding-block: 3.25rem; min-block-size: 32rem; }
  .hero-title { font-size: clamp(4rem, 10vw, 5.6rem); }
}

@media (max-width: 39rem) {
  .site-header { margin-block-start: .95rem; padding-inline: 1.05rem; }
  .hero { grid-template-columns: 1fr; min-block-size: 0; padding-block: 4.35rem 1.4rem; }
  .hero-title { font-size: clamp(3.3rem, 17.45vw, 7.1rem); }
  .hero-role { margin-block-start: .85rem; }
  .hero-actions { margin-block-start: 1.25rem; }
  .hero-art { justify-self: center; max-width: 27rem; margin-block-start: .25rem; }
  .projects, .about { grid-template-columns: 1fr; }
  .about { gap: 1.15rem; }
  .contact-main { align-content: center; }
}

@media (max-width: 22rem) {
  .site-header { padding-inline: .85rem; }
  .site-nav { gap: .8rem; }
  .role-break { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .button:hover, .project:hover .project-art img, .project:focus-within .project-art img { transform: none; }
}
