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

:root {
  color-scheme: dark;
  --bg: #040607;
  --text: #efeee9;
  --muted: #777a79;
  --soft: #a7aaa7;
  --display: "Oxanium", "Avenir Next", sans-serif;
  --mono: "Oxanium", "SFMono-Regular", "Roboto Mono", monospace;
  --sans: "Oxanium", "Avenir Next", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scrollbar-width: none;
}

body {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% -8%, rgb(28 184 207 / 5%), transparent 34%),
    radial-gradient(circle at 8% 62%, rgb(113 79 158 / 3%), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-font-smoothing: antialiased;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(rgb(58 205 224 / 2.1%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(58 205 224 / 2.1%) 1px, transparent 1px),
    linear-gradient(180deg, transparent 0%, rgb(39 173 194 / 1.8%) 54%, transparent 100%);
  background-size: 56px 56px, 56px 56px, 100% 100%;
  mask-image: linear-gradient(to bottom, transparent, #000 17%, #000 86%, transparent);
  opacity: 0.72;
}

.signal-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
}

::selection {
  color: var(--bg);
  background: var(--text);
}

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

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

.page,
.footer {
  position: relative;
  z-index: 2;
  width: min(calc(100% - 48px), 1040px);
  margin: 0 auto;
}

.profile {
  display: grid;
  min-height: clamp(560px, 76vh, 720px);
  padding-block: clamp(96px, 12vw, 150px) 84px;
  place-items: center;
  text-align: center;
}

.profile-body {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.profile-body::before {
  position: absolute;
  z-index: 0;
  top: 42px;
  left: 50%;
  width: clamp(260px, 42vw, 430px);
  aspect-ratio: 1;
  content: "";
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 3.5%), transparent 68%);
  filter: blur(8px);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.profile-avatar,
.profile h1,
.profile-links {
  position: relative;
  z-index: 1;
}

.profile-avatar {
  display: block;
  width: 112px;
  aspect-ratio: 132 / 152;
  filter: drop-shadow(0 18px 36px rgb(0 0 0 / 55%));
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), filter 320ms ease;
}

.avatar-hex {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-picture,
.avatar-picture img {
  display: block;
  width: 100%;
  height: 100%;
}

.avatar-picture img {
  max-width: none;
  object-fit: cover;
}

.profile h1 {
  margin: 24px 0 0;
  font-family: var(--display);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
}

.profile-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 25px;
}

.profile-links a {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 4.5%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 5.5%);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.profile-links a:focus-visible {
  color: var(--bg);
  background: var(--text);
  outline: none;
  transform: translateY(-2px);
}

.profile-links img {
  object-fit: contain;
}

.profile-links .brand-icon-x {
  width: 17px;
  height: 17px;
}

.profile-links .brand-icon-opensea {
  width: 19px;
  height: 19px;
}

.profile-links .brand-icon-eth {
  width: 18px;
  height: 18px;
}

.profile-links .brand-icon-mail {
  width: 19px;
  height: 19px;
}

.profile-links a:focus-visible img {
  filter: invert(1);
}

.projects {
  padding-block: 24px clamp(120px, 15vw, 190px);
}

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

.section-heading h2 {
  margin: 0;
  color: var(--soft);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.project-grid {
  display: grid;
  gap: clamp(76px, 10vw, 120px);
}

.project-card {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  min-width: 0;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-image {
  --glow: #5c4b16;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-row: 2;
  grid-column: 1 / -1;
  place-items: center;
  aspect-ratio: 16 / 9;
  min-height: 420px;
  overflow: hidden;
  border-radius: 3px;
  background: #090907;
  box-shadow: 0 34px 100px rgb(0 0 0 / 35%);
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-image::before,
.project-image::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.project-image::before {
  z-index: 0;
  width: 48%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--glow);
  filter: blur(145px);
  opacity: 0.2;
  transition: opacity 500ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-image::after {
  z-index: 2;
  inset: 0;
  box-shadow: inset 0 0 130px rgb(0 0 0 / 48%);
}

.project-image > img,
.project-image > picture {
  position: relative;
  z-index: 1;
  width: min(53%, 520px);
  height: 78%;
  transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), filter 650ms ease;
}

.project-image > img,
.project-image > picture > img {
  object-fit: contain;
}

.project-image > picture > img {
  width: 100%;
  height: 100%;
}

.project-image-grid,
.project-image-buddy {
  --glow: #715b14;
  background: #090906;
}

.project-image-buddy {
  --glow: #f59e0b;
}

.project-image-grid > img,
.project-image-grid > picture > img,
.project-image-buddy > img {
  image-rendering: pixelated;
}

.project-info {
  display: contents;
}

.project-info > div:first-child {
  grid-row: 1;
  grid-column: 1;
  padding-bottom: 17px;
}

.project-info h3 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.025em;
}

.project-info p {
  margin: 8px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.project-links {
  display: flex;
  grid-row: 1;
  grid-column: 2;
  gap: 7px;
  justify-content: flex-end;
  padding-bottom: 14px;
}

.project-links a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 100px;
  background: rgb(255 255 255 / 4.5%);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 5%);
  color: #b5b7b4;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.project-links a:focus-visible {
  color: var(--bg);
  background: var(--text);
  outline: none;
  transform: translateY(-2px);
}

.project-links img {
  width: 13px;
  height: 13px;
}

.project-links a:focus-visible img {
  filter: invert(1);
}

.footer {
  display: flex;
  justify-content: space-between;
  padding-block: 28px 38px;
  color: #606362;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
}

.footer p {
  margin: 0;
}

@media (hover: hover) and (pointer: fine) {
  .profile-avatar:hover {
    transform: translateY(-5px) scale(1.025);
    filter: drop-shadow(0 24px 44px rgb(0 0 0 / 70%));
  }

  .profile-links a:hover,
  .project-links a:hover {
    color: var(--bg);
    background: var(--text);
    outline: none;
    transform: translateY(-2px);
  }

  .profile-links a:hover img,
  .project-links a:hover img {
    filter: invert(1);
  }

  .project-image:hover::before {
    opacity: 0.29;
    transform: scale(1.06);
  }

  .project-image:hover > img,
  .project-image:hover > picture {
    transform: translateY(-4px) scale(1.035);
  }
}

@media (max-width: 760px) {
  .page,
  .footer {
    width: min(calc(100% - 32px), 1040px);
  }

  .profile {
    min-height: 540px;
    padding-block: 86px 62px;
  }

  .profile-avatar {
    width: 102px;
  }

  .profile h1 {
    font-size: 35px;
  }

  .projects {
    padding-top: 36px;
  }

  .project-card {
    grid-template-columns: 1fr;
  }

  .project-info > div:first-child,
  .project-links {
    grid-column: 1;
  }

  .project-links {
    grid-row: 2;
    justify-content: flex-start;
    padding-bottom: 18px;
  }

  .project-image {
    grid-row: 3;
    aspect-ratio: 1;
    min-height: 0;
  }

  .project-image > img,
  .project-image > picture {
    width: 74%;
    height: 74%;
  }

  .footer {
    flex-direction: column;
    gap: 7px;
    align-items: flex-start;
  }
}

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