* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #020202;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  scrollbar-color: rgba(255, 255, 255, 0.32) #050505;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #050505;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #050505;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.48);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: #f5f5f5;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 255, 255, 0.16), transparent 34%),
    radial-gradient(ellipse at 12% 42%, rgba(255, 255, 255, 0.06), transparent 32%),
    radial-gradient(ellipse at 86% 64%, rgba(255, 255, 255, 0.045), transparent 30%),
    linear-gradient(145deg, #000 0%, #040404 42%, #0e0e11 100%);
  background-attachment: fixed;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
}

body::before {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.5) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 255, 255, 0.24) 0 1px, transparent 2.2px);
  background-position: 28px 12px, 130px 180px, 60px 320px;
  background-size: 280px 280px, 460px 460px, 680px 680px;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.84) 46%, rgba(0, 0, 0, 0.35) 100%);
  opacity: 0.34;
  animation: drift-stars 150s linear infinite;
}

body::after {
  background:
    linear-gradient(115deg, transparent 0 46%, rgba(255, 255, 255, 0.055) 49%, transparent 52%),
    linear-gradient(16deg, transparent 0 42%, rgba(255, 255, 255, 0.035) 45%, transparent 48%),
    radial-gradient(circle at 18% 34%, rgba(255, 255, 255, 0.86) 0 1px, transparent 2px),
    radial-gradient(circle at 62% 22%, rgba(255, 255, 255, 0.76) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.72) 0 1px, transparent 2px);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.38));
  opacity: 0.5;
  animation: twinkle 7.5s ease-in-out infinite alternate;
}

.site-header {
  position: fixed;
  top: 0;
  right: 24px;
  left: 24px;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  width: min(calc(100% - 48px), 1180px);
  min-height: 76px;
  margin: 0 auto;
  padding: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
}

.site-header::before {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: -1;
  height: 108px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0));
  backdrop-filter: blur(8px);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.72) 58%, transparent 100%);
  content: "";
  pointer-events: none;
}

.site-logo,
.site-nav a,
.nav-contact {
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.site-logo {
  color: #fff;
  font-size: 1rem;
  text-shadow:
    0 0 18px rgba(255, 255, 255, 0.16),
    0 2px 22px rgba(0, 0, 0, 0.92);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 30px);
}

.site-menu-button {
  display: none;
}

.site-nav a,
.nav-contact {
  position: relative;
  transition: color 180ms ease, transform 180ms ease;
}

.site-nav a::after,
.nav-contact::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  opacity: 0;
  content: "";
  transform: scaleX(0.45);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.site-nav a:hover,
.nav-contact:hover {
  color: #fff;
  transform: translateY(-1px);
}

.site-nav a:hover::after,
.nav-contact:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-contact {
  padding: 0;
  border: 0;
  color: rgba(255, 255, 255, 0.84);
  background: transparent;
}

.contact-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 112px 32px 96px;
}

.contact-hero {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 0 0 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.contact-kicker {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-hero h1 {
  max-width: none;
  margin: 0 auto;
  color: #fff;
  font-size: clamp(3.4rem, 8vw, 6.4rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.92;
  text-shadow:
    0 0 30px rgba(255, 255, 255, 0.16),
    0 14px 48px rgba(0, 0, 0, 0.74);
}

.contact-hero p:last-child {
  max-width: none;
  margin: 10px auto 0;
  color: rgba(245, 245, 245, 0.62);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 650;
  line-height: 1.4;
}

.contact-layout {
  width: min(100%, 1180px);
  margin: 48px auto 0;
}

.contact-main {
  max-width: 760px;
  margin: 0 auto;
}

.contact-intro {
  max-width: 720px;
  margin: 0 0 28px;
  color: rgba(245, 245, 245, 0.82);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  font-weight: 650;
  line-height: 1.55;
}

.contact-intro a {
  color: #fff;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.42);
  text-underline-offset: 4px;
}

.contact-response-link {
  width: min(100%, 1180px);
  margin: 28px auto 0;
  text-align: center;
}

.contact-response-link a {
  color: #fff;
  font-weight: 850;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.42);
  text-underline-offset: 4px;
}

.contact-form {
  display: grid;
  gap: 18px;
}

.contact-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 9px;
}

.contact-form span {
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 15px 16px;
  color: #fff;
  font: inherit;
  background: rgba(255, 255, 255, 0.055);
  outline: 0;
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(245, 245, 245, 0.36);
}

.contact-form textarea {
  resize: vertical;
  min-height: 170px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 26px rgba(255, 255, 255, 0.07);
}

.contact-form button {
  justify-self: start;
  min-height: 48px;
  min-width: 178px;
  margin-top: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.26);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.contact-form button:hover {
  color: #050505;
  background: #fff;
  box-shadow: 0 16px 42px rgba(255, 255, 255, 0.16);
  transform: translateY(-1px);
}


.space-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.space-atmosphere::before {
  position: absolute;
  right: -15%;
  bottom: -34%;
  width: 72vw;
  max-width: 980px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    inset 0 0 72px rgba(255, 255, 255, 0.04),
    0 0 110px rgba(255, 255, 255, 0.05);
  content: "";
}

.space-atmosphere span {
  position: absolute;
  width: 180px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
  opacity: 0;
  transform: rotate(-24deg);
  animation: shooting-star 9s ease-in-out infinite;
}

.space-atmosphere span:nth-child(1) {
  top: 18%;
  left: 12%;
}

.space-atmosphere span:nth-child(2) {
  top: 48%;
  left: 72%;
  width: 130px;
  animation-delay: 3s;
}

.space-atmosphere span:nth-child(3) {
  top: 78%;
  left: 26%;
  width: 150px;
  animation-delay: 6s;
}

.space-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 104px 28px 28px;
  text-align: center;
}

.space-panel h1 {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  font-size: clamp(3rem, 9vw, 7.4rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow:
    0 0 28px rgba(255, 255, 255, 0.2),
    0 10px 42px rgba(0, 0, 0, 0.72);
}

.reveal {
  opacity: 0;
  transform: translateY(34px) scale(0.98);
  transition:
    opacity 780ms ease,
    transform 780ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 780ms ease;
  filter: blur(7px);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

.reveal-section {
  opacity: 0.72;
  transition: opacity 900ms ease;
}

.reveal-section.is-visible {
  opacity: 1;
}

.intro.reveal {
  transition-delay: 120ms;
}

.skills.reveal {
  transition-delay: 220ms;
}

.tech-icons.reveal {
  transition-delay: 320ms;
}

.scroll-arrow.reveal {
  transition-delay: 520ms;
}

.intro,
.skills {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-right: auto;
  margin-left: auto;
  color: rgba(245, 245, 245, 0.82);
  line-height: 1.5;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.12);
}

.intro {
  margin-top: 24px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 650;
}

.skills {
  margin-top: 10px;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  color: rgba(245, 245, 245, 0.68);
}

.tech-icons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

.tech-icons img {
  width: clamp(44px, 7vw, 58px);
  height: clamp(44px, 7vw, 58px);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.3);
  box-shadow:
    0 12px 34px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  filter: grayscale(1) brightness(1.35) contrast(0.92);
  opacity: 0.78;
  transition:
    border-color 180ms ease,
    filter 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
  animation: icon-highlight 5.6s ease-in-out infinite;
}

.tech-icons img:nth-child(2) {
  animation-delay: 1.4s;
}

.tech-icons img:nth-child(3) {
  animation-delay: 2.8s;
}

.tech-icons img:nth-child(4) {
  animation-delay: 4.2s;
}

.tech-icons img:hover {
  border-color: rgba(255, 255, 255, 0.24);
  filter: grayscale(0.35) brightness(1.2) contrast(0.95);
  opacity: 1;
  transform: translateY(-2px);
}

.scroll-arrow {
  position: absolute;
  bottom: 34px;
  left: 50%;
  z-index: 2;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  animation: arrow-float 1.8s ease-in-out infinite;
  transition:
    opacity 240ms ease,
    visibility 240ms ease;
}

.scroll-arrow::before {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 16px;
  height: 16px;
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  border-bottom: 2px solid rgba(255, 255, 255, 0.8);
  content: "";
  transform: rotate(45deg);
}

.scroll-arrow:hover::before {
  border-color: #fff;
}

.scroll-arrow.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.knit-section {
  position: relative;
  z-index: 1;
  padding: 72px 32px 80px;
}

.studio-section {
  position: relative;
  z-index: 1;
  padding: 36px 32px 92px;
}

.websites-section {
  position: relative;
  z-index: 1;
  padding: 74px 32px 124px;
}

.knit-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 34px;
  align-items: center;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.82fr);
  gap: 34px;
  align-items: stretch;
  width: min(100%, 1180px);
  margin: 0 auto;
}

.code-card {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.018)),
    #07070a;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.72),
    18px 22px 0 rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  transform: perspective(1000px) rotateX(3deg) rotateY(-5deg);
  transform-origin: center;
}

.code-card {
  position: relative;
  overflow: auto;
  margin: 0;
  padding: clamp(54px, 6vw, 66px) clamp(20px, 3vw, 32px) clamp(22px, 3vw, 32px);
  color: rgba(255, 255, 255, 0.86);
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", monospace;
  font-size: clamp(0.78rem, 1.4vw, 1rem);
  line-height: 1.65;
  text-align: left;
  white-space: pre;
}

.code-card::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 20px 19px, rgba(255, 255, 255, 0.82) 0 4px, transparent 4.5px),
    radial-gradient(circle at 38px 19px, rgba(255, 255, 255, 0.48) 0 4px, transparent 4.5px),
    radial-gradient(circle at 56px 19px, rgba(255, 255, 255, 0.24) 0 4px, transparent 4.5px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  content: "";
}

.code-card code {
  position: relative;
  z-index: 1;
}

.code-keyword {
  color: #ffffff;
  font-weight: 800;
}

.code-function {
  color: #d8d8d8;
  font-weight: 750;
}

.code-string {
  color: #bdbdbd;
}

.code-variable {
  color: #eeeeee;
}

.code-property {
  color: #a8a8a8;
}

.knit-copy {
  padding: 0;
  text-align: left;
}

.knit-copy h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.95;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.16);
}

.knit-copy p {
  margin: 22px 0 0;
  color: rgba(245, 245, 245, 0.72);
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.6;
}

.games-section {
  position: relative;
  z-index: 1;
  padding: 64px 32px 52px;
}

.section-inner {
  width: min(100%, 1480px);
  margin: 0 auto;
}

.games-section h2 {
  margin: 0 0 34px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0;
}

.games-stat-banner {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  margin: 0 0 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    #050505;
  background-size: 44px 44px, 44px 44px, auto;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.54);
}

.games-stat-banner div {
  display: grid;
  gap: 8px;
  place-items: center;
  min-height: 168px;
  padding: 34px 24px;
  text-align: center;
}

.games-stat-banner div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.games-stat-banner strong {
  color: #fff;
  font-size: clamp(3.2rem, 7vw, 5.4rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.92;
  text-shadow:
    0 0 24px rgba(255, 255, 255, 0.16),
    0 12px 34px rgba(0, 0, 0, 0.34);
}

.games-stat-banner span {
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.1rem, 2.6vw, 1.9rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.12;
}

.section-title {
  margin: 0 0 34px;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 0 24px rgba(255, 255, 255, 0.14);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.website-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.game-card {
  position: relative;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #121216;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.game-card::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 20%, rgba(0, 0, 0, 0.62) 100%),
    rgba(0, 0, 0, 0.16);
  opacity: 0;
  content: "";
  transition: opacity 220ms ease;
}

.game-card:hover::after {
  opacity: 1;
}

.game-card.reveal {
  transform: translateY(44px) scale(0.96);
}

.game-card.reveal.is-visible {
  transform: translateY(0) scale(1);
}

.game-card:nth-child(2).reveal {
  transition-delay: 120ms;
}

.game-card:nth-child(3).reveal {
  transition-delay: 240ms;
}

.game-card img {
  display: block;
  width: 100%;
  aspect-ratio: 282 / 150;
  object-fit: cover;
  transition: transform 260ms ease, filter 260ms ease;
}

.game-card:hover img {
  filter: brightness(0.72);
  transform: scale(1.04);
}

.game-card-body {
  position: relative;
  z-index: 1;
  padding: 22px 24px 26px;
}

.game-card h3 {
  margin: 0;
  color: #f7f7f7;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
}

.game-card a {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  opacity: 0;
  transform: translate(-50%, -36%) scale(0.92);
  backdrop-filter: blur(8px);
  transition:
    background 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms ease;
}

.game-card:hover a,
.game-card a:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(255, 255, 255, 0.12);
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.website-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025)),
    rgba(7, 7, 10, 0.78);
  box-shadow:
    0 30px 82px rgba(0, 0, 0, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform-origin: center;
  backdrop-filter: blur(12px);
}

.websites-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: end;
  margin: 0 0 34px;
}

.websites-heading::after {
  height: 1px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.34), transparent);
  content: "";
}

.websites-heading p {
  grid-column: 1 / -1;
  margin: 0 0 -8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.websites-heading h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
  font-weight: 850;
  letter-spacing: 0;
  line-height: 0.9;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.16);
}

.website-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.website-card-header span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.78rem;
  font-weight: 850;
}

.website-card-header h3 {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1rem, 2vw, 1.18rem);
  font-weight: 850;
  line-height: 1.2;
}

.website-card.reveal {
  transform: translateY(40px);
}

.website-card.reveal.is-visible {
  transform: translateY(0);
}

.website-card:nth-child(2).reveal {
  transition-delay: 140ms;
}

.website-card iframe {
  display: block;
  width: 100%;
  height: clamp(390px, 38vw, 600px);
  border: 0;
  background: #fff;
  overflow: hidden;
}

.website-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    0 34px 92px rgba(0, 0, 0, 0.72),
    0 0 28px rgba(255, 255, 255, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.knit-copy.reveal {
  transform: translateX(-42px);
}

.knit-copy.reveal.is-visible {
  transform: translateX(0);
}

.code-card.reveal {
  transform: perspective(1000px) rotateX(8deg) rotateY(-12deg) translateX(46px) scale(0.96);
}

.code-card.reveal.is-visible {
  transform: perspective(1000px) rotateX(3deg) rotateY(-5deg) translateX(0) scale(1);
}

.studio-card {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), transparent 34%),
    #08080b;
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.72),
    18px 22px 0 rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.studio-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: grayscale(0.18) contrast(1.04) brightness(0.92);
}

.tool-switcher {
  aspect-ratio: 16 / 9;
}

.tool-shot {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  transform: scale(1.02);
  animation: tool-flick 8s steps(1, end) infinite;
}

.tool-shot-studio {
  opacity: 1;
}

.tool-shot-vscode {
  animation-delay: 4s;
}

.tool-switcher::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 36%, rgba(0, 0, 0, 0.18)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.26), transparent 26%);
  content: "";
  pointer-events: none;
}

.tool-switcher-label {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 0;
  overflow: hidden;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.48);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
}

.tool-switcher-label span {
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: tool-label-flick 8s steps(1, end) infinite;
}

.tool-switcher-label span + span {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  animation-delay: 4s;
}

.tool-switcher:hover .tool-shot,
.tool-switcher:hover .tool-switcher-label span {
  animation-play-state: paused;
}

.studio-card.reveal {
  transform: perspective(1000px) rotateX(8deg) rotateY(12deg) translateX(-46px) scale(0.96);
}

.studio-card.reveal.is-visible {
  transform: perspective(1000px) rotateX(3deg) rotateY(5deg) translateX(0) scale(1);
}

.studio-copy.reveal {
  transform: translateX(42px);
}

.studio-copy.reveal.is-visible {
  transform: translateX(0);
}

.tool-copy-switcher {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 100%;
}

.tool-copy {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  opacity: 0;
  transform: translateY(-50%) translateX(10px);
  animation: tool-copy-flick 8s steps(1, end) infinite;
}

.tool-copy-studio {
  opacity: 1;
}

.tool-copy-vscode {
  animation-delay: 4s;
}

@media (max-width: 520px) {
  html {
    scroll-padding-top: 84px;
  }

  .site-header {
    top: 0;
    right: 0;
    left: 0;
    grid-template-columns: auto 1fr;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    color: #fff;
    text-align: left;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
    background: transparent;
    backdrop-filter: none;
  }

  .site-header::before {
    display: block;
    height: 78px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.66) 62%, rgba(0, 0, 0, 0));
    backdrop-filter: blur(8px);
  }

  .site-logo {
    justify-self: start;
    align-self: center;
    width: auto;
    height: auto;
    overflow: visible;
    color: #fff;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: 0;
    text-shadow:
      0 0 18px rgba(255, 255, 255, 0.16),
      0 2px 22px rgba(0, 0, 0, 0.92);
    text-transform: none;
  }

  .site-menu-button {
    align-self: center;
    justify-self: end;
    display: grid;
    place-content: center;
    gap: 6px;
    width: 48px;
    height: 48px;
    border: 0;
    padding: 0;
    color: #fff;
    background: transparent;
    cursor: pointer;
  }

  .site-menu-button span {
    display: block;
    width: 26px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.14);
    transition:
      transform 180ms ease,
      opacity 180ms ease;
  }

  .site-header.is-menu-open .site-menu-button span:first-child {
    transform: translateY(4.5px) rotate(45deg);
  }

  .site-header.is-menu-open .site-menu-button span:last-child {
    transform: translateY(-4.5px) rotate(-45deg);
  }

  .site-nav {
    position: fixed;
    top: 56px;
    right: 0;
    left: 0;
    grid-column: 1 / -1;
    display: grid;
    gap: 0;
    width: 100%;
    max-height: calc(100vh - 56px);
    overflow: auto;
    padding: 14px 18px 22px;
    color: #fff;
    background: rgba(0, 0, 0, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.52);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 180ms ease,
      visibility 180ms ease,
      transform 180ms ease;
  }

  .site-header.is-menu-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a,
  .nav-contact {
    display: block;
    min-height: 42px;
    padding: 13px 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85);
  }

  .site-nav a + a,
  .site-nav a + .nav-contact,
  .nav-contact + a {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .site-nav a::after,
  .nav-contact::after {
    right: 0;
    bottom: -8px;
    left: 0;
    width: auto;
    height: 1px;
    border: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    opacity: 0;
    transform: scaleX(0.45);
  }

  .site-nav a:hover,
  .nav-contact:hover {
    color: #fff;
    transform: translateY(-1px);
  }

  .site-nav a:hover::after,
  .nav-contact:hover::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .space-panel {
    padding: 88px 18px 18px;
  }

  .games-section {
    padding: 44px 16px 28px;
  }

  .games-stat-banner {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .games-stat-banner div {
    width: 100%;
    min-height: 128px;
    padding: 26px 18px;
  }

  .games-stat-banner div + div {
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    border-left: 0;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .website-grid {
    grid-template-columns: 1fr;
  }

  .knit-section {
    padding: 52px 16px 56px;
  }

  .studio-section {
    padding: 28px 16px 64px;
  }

  .websites-section {
    padding: 42px 16px 72px;
  }

  .knit-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .tool-copy-switcher {
    min-height: 180px;
  }

  .code-card {
    white-space: pre-wrap;
  }

  .websites-heading {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
  }

  .websites-heading::after {
    margin-bottom: 0;
  }

  .website-card-header {
    min-height: 56px;
    padding: 0 16px;
  }

  .website-card iframe {
    height: 430px;
  }

  .contact-page {
    padding: 112px 16px 72px;
  }

  .contact-hero {
    padding-bottom: 28px;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    margin-top: 36px;
  }

  .contact-field-row {
    grid-template-columns: 1fr;
  }

  .contact-form button {
    width: 100%;
  }

}

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

  .reveal,
  .reveal-section,
  .code-card.reveal,
  .code-card.reveal.is-visible,
  .studio-card.reveal,
  .studio-card.reveal.is-visible,
  .knit-copy.reveal {
    opacity: 1;
    filter: none;
    transform: none;
  }

  .tool-shot,
  .tool-switcher-label span,
  .tool-copy {
    animation: none;
  }

  .tool-shot-studio {
    opacity: 1;
  }

  .tool-shot-vscode {
    opacity: 0;
  }

  .tool-copy {
    position: static;
    opacity: 1;
    transform: none;
  }

  .tool-copy-vscode {
    display: none;
  }
}

@media (min-width: 521px) and (max-width: 900px) {
  .knit-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .studio-layout {
    grid-template-columns: 1fr;
  }

  .tool-copy-switcher {
    min-height: 190px;
  }

  .website-grid {
    grid-template-columns: 1fr;
  }
}


@keyframes drift-stars {
  from {
    transform: translate3d(0, 0, 0);
  }

  to {
    transform: translate3d(-120px, 80px, 0);
  }
}

@keyframes twinkle {
  from {
    opacity: 0.38;
  }

  to {
    opacity: 0.9;
  }
}

@keyframes icon-highlight {
  0%,
  18%,
  100% {
    border-color: rgba(255, 255, 255, 0.11);
    filter: grayscale(1) brightness(1.35) contrast(0.92);
    opacity: 0.78;
    transform: translateY(0);
    box-shadow:
      0 12px 34px rgba(0, 0, 0, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  7% {
    border-color: rgba(255, 255, 255, 0.34);
    filter: grayscale(0.18) brightness(1.28) contrast(0.96);
    opacity: 1;
    transform: translateY(-4px);
    box-shadow:
      0 16px 42px rgba(0, 0, 0, 0.52),
      0 0 22px rgba(255, 255, 255, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }
}

@keyframes arrow-float {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }

  50% {
    transform: translateX(-50%) translateY(8px);
  }
}

@keyframes shooting-star {
  0%,
  64%,
  100% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(-24deg);
  }

  70% {
    opacity: 0.74;
  }

  82% {
    opacity: 0;
    transform: translate3d(-220px, 96px, 0) rotate(-24deg);
  }
}

@keyframes tool-flick {
  0%,
  46% {
    opacity: 1;
    transform: scale(1);
  }

  50%,
  96% {
    opacity: 0;
    transform: scale(1.018);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes tool-label-flick {
  0%,
  46% {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }

  50%,
  96% {
    color: rgba(255, 255, 255, 0.62);
    background: transparent;
  }

  100% {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
  }
}

@keyframes tool-copy-flick {
  0%,
  46% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  50%,
  96% {
    opacity: 0;
    transform: translateY(-58%) translateX(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}
