:root {
  --hero-image: none;
  --intro-bg-opacity: 0.78;
  --bg: #020305;
  --ink: #f1f1f1;
  --muted: #d4d4d4;
  --line: rgba(255, 255, 255, 0.56);
}

html {
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 40% -10%, #000000 0%, #06070a 58%, #030304 100%);
  color: var(--ink);
  font-family: "Lexend", sans-serif;
  overflow-x: hidden;
  padding-bottom: 74px;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.95;
}

.page {
  width: 100%;
  margin: 0;
  position: relative;
  z-index: 2;
}

.intro-stack {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: clip;
}

.intro-stack::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: -280px;
  left: 0;
  z-index: 0;
  background-image:
    linear-gradient(to bottom, rgba(4, 4, 6, 0.52) 0%, rgba(3, 3, 5, 0.74) 100%),
    url('assets/background.png');
  background-repeat: no-repeat;
  background-position: center center, center -300px;
  background-size: 100% 100%, 112% auto;
  opacity: var(--intro-bg-opacity);
  transition: opacity 180ms linear;
  pointer-events: none;
}

.hero-banner {
  position: relative;
  min-height: min(58vw, 460px);
  display: grid;
  align-items: end;
  width: 100%;
  overflow: visible;
  margin-bottom: 48px;
}

.hero-art {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 32%, rgba(255, 255, 255, 0.06), transparent 34%);
}

.cake-day-badge {
  position: absolute;
  top: clamp(20px, 4vw, 60px);
  right: clamp(20px, 6vw, 100px);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transform: rotate(6deg);
  pointer-events: none;
}

.cake-day-icon {
  width: clamp(220px, 25vw, 360px);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
}

.cake-day-badge span {
  font-family: "Lexend", sans-serif;
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.hero-photo {
  position: absolute;
  left: clamp(20px, 5vw, 80px);
  top: 24px;
  width: clamp(435px, 28vw, 450px);
  height: auto;
  z-index: 2;
  transform: rotate(9deg) scale(1.14);
  transform-origin: left top;
  filter: drop-shadow(0 16px 26px rgba(0, 0, 0, 0.45));
}

.hero-note {
  position: absolute;
  left: clamp(8px, 2.2vw, 42px);
  top: clamp(2px, 1.2vw, 14px);
  width: clamp(302px, 11vw, 170px);
  height: auto;
  z-index: 3;
  mix-blend-mode: screen;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-left: clamp(250px, 38vw, 580px);
  margin-right: clamp(24px, 4vw, 48px);
  margin-top: clamp(56px, 8vh, 112px);
  margin-bottom: 26px;
  max-width: 820px;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Lexend", sans-serif;
  font-weight: 500;
  letter-spacing: 0.6px;
  font-size: clamp(3rem, 9vw, 5.2rem);
  line-height: 0.98;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.hero-copy .lead {
  margin: 14px 0 0;
  font-size: clamp(1.85rem, 4.6vw, 3rem);
  font-weight: 500;
  line-height: 1.08;
}

.hero-copy p:not(.lead) {
  margin: 16px 0 0;
  max-width: none;
  font-size: clamp(0.92rem, 1.28vw, 1.12rem);
  line-height: 1.34;
  overflow: visible;
  color: var(--muted);
  opacity: 0;
  transform: translateY(8px);
  filter: blur(3px);
  animation: intro-copy-load 900ms ease-out 320ms forwards;
}

.hero-copy p:not(.lead).typing-active::after,
.hero-copy p:not(.lead).typing-done::after {
  content: "";
  display: inline-block;
  width: 0.08em;
  height: 1.02em;
  margin-left: 0.08em;
  vertical-align: -0.08em;
  background: rgba(255, 255, 255, 0.9);
}

.hero-copy p:not(.lead).typing-active::after {
  animation: typing-caret-blink 900ms steps(1, end) infinite;
}

.hero-copy p:not(.lead).typing-done::after {
  opacity: 0;
}

.games {
  position: relative;
  padding: 28px 30px 48px;
  background: transparent;
  width: 100%;
}

.games h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Lexend", sans-serif;
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  line-height: 1;
  letter-spacing: 0.2px;
}

.spark {
  font-size: 0.8em;
  opacity: 0.9;
}

.spark-icon {
  width: clamp(36px, 5.6vw, 56px);
  height: clamp(36px, 5.6vw, 56px);
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.95;
}

.games-gif {
  height: clamp(64px, 9vw, 92px);
  width: auto;
  vertical-align: middle;
  margin-left: 10px;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.2));
}

.cards-row {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.game-card {
  min-height: 190px;
  border: 3px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
  padding: 20px;
  backdrop-filter: blur(2px);
  transition: transform 200ms ease, border-color 220ms ease;
}

.game-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.9);
}

.game-card h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 500;
}

.game-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  margin-bottom: 12px;
}

.game-card p {
  margin: 10px 0 0;
  font-size: 1.2rem;
  color: var(--muted);
}

.game-link {
  margin-top: 12px;
}

.game-link a {
  color: #f1f4ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.game-link a:hover {
  color: #ffffff;
}

.services {
  position: relative;
  padding: 24px 30px 30px;
  background: transparent;
}

.services h2,
.projects h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Lexend", sans-serif;
  font-size: clamp(2.4rem, 5.4vw, 3.9rem);
}

.services-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.projects-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.projects-grid {
  align-items: start;
}

.projects-grid-secondary {
  margin-top: 18px;
}

.more-gallery-cta-wrap {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.more-gallery-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #f8f8fc;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  padding: 12px 20px;
  font-size: clamp(0.95rem, 1.3vw, 1.06rem);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.more-gallery-cta:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.9);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05));
}

.projects {
  position: relative;
  min-height: auto;
  padding: 12px 30px 44px;
  background: transparent;
}

.project-card {
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  min-height: 154px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  transition: transform 200ms ease, border-color 200ms ease;
}

.projects .project-card {
  min-height: 0;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.85);
}

.project-card h3 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 500;
}

.project-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  margin-bottom: 12px;
}

.project-model {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  min-height: 280px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  margin-bottom: 12px;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.1), rgba(0, 0, 0, 0.8));
}

.model-fallback {
  color: #e7e7ea;
  font-size: 0.9rem;
  text-align: center;
  padding-top: 16px;
}

.project-type {
  margin: 6px 0 0;
  color: #f2f5ff;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.project-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
}

.contact-card {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
}

.contact-card h3 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 500;
}

.contact-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.contact-card a {
  color: #f2f5ff;
  text-underline-offset: 3px;
}

.contact-card a:hover {
  color: #ffffff;
}

.credit-social-band {
  display: flex;
  justify-content: center;
  padding: 22px 18px 8px;
}

.credit-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 6px 18px 96px;
  color: #efefef;
  text-align: center;
}

.credit-social-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.credit-gif {
  width: 146px;
  height: 161px;
  object-fit: contain;
  border-radius: 10px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
}

.credit-strip p {
  margin: 0;
  font-size: 1.4rem;
}

.social-dock {
  position: fixed;
  right: 16px;
  bottom: 0;
  z-index: 40;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
  border-top: 0;
}

.credit-social-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.credit-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  width: 60px;
  height: 46px;
  padding: 0;
}

.credit-social-links a:hover {
  border-color: rgba(255, 255, 255, 0.75);
}

.credit-social-icon {
  width: 24px;
  height: 24px;
}

.credit-look-gif {
  width: 146px;
  height: 161px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

.social-dock p {
  position: static;
  bottom: 10px;
  margin: 0;
  color: #d2d2d2;
  font-size: 0.98rem;
  white-space: nowrap;
}

.social-dock p a,
.social-dock p a:visited,
.social-dock p a:active {
  color: inherit;
  text-decoration: none;
}

.social-dock p a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 760ms ease forwards;
}

.games.reveal {
  animation-delay: 120ms;
}

.services.reveal {
  animation-delay: 170ms;
}

.projects.reveal {
  animation-delay: 210ms;
}

.credit-strip.reveal {
  animation-delay: 250ms;
}

.credit-social-band.reveal {
  animation-delay: 230ms;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes intro-copy-load {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(3px);
  }

  70% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.12);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    text-shadow: none;
  }
}

@keyframes typing-caret-blink {
  0%,
  50% {
    opacity: 1;
  }

  50.01%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 900px) {
  .hero-banner {
    background-position: 60% 18%;
    min-height: 430px;
    overflow: visible;
  }

  .hero-photo {
    left: 50%;
    top: 24px;
    width: min(360px, 86vw);
    transform: translateX(-50%) rotate(6deg) scale(1.1);
    transform-origin: center top;
  }

  .hero-note {
    left: 50%;
    top: 14px;
    width: min(150px, 36vw);
    transform: translateX(-100%);
  }

  .hero-copy {
    margin-left: 18px;
    margin-right: 8px;
    margin-top: 392px;
    max-width: none;
  }

  .hero-copy .lead {
    font-size: clamp(1.55rem, 6.2vw, 2.5rem);
    line-height: 1.12;
  }

  .hero-copy p:not(.lead) {
    max-width: none;
  }

  .intro-stack::before {
    bottom: -220px;
    background-position: center center, center -20px;
    background-size: 100% 100%, 126% auto;
  }

  .cards-row {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .games {
    padding-inline: 18px;
  }

  .services {
    padding-inline: 18px;
  }

  .projects {
    padding-inline: 18px;
  }

  .social-dock {
    right: 12px;
    left: auto;
    padding-bottom: 10px;
  }

  .credit-social-row {
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }

  .credit-social-links {
    justify-content: center;
  }

  .credit-strip {
    flex-direction: column;
    padding-bottom: 110px;
  }

  .credit-social-band {
    padding: 14px 18px 4px;
  }

  .social-dock p {
    white-space: normal;
    text-align: right;
  }

}
