* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: #000;
  color: #f2fff9;
  font-family: "Space Grotesk", sans-serif;
  overflow: hidden;
}

.fade-splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: fade-out 3.6s ease 1.8s forwards;
}

.fade-content {
  display: grid;
  gap: 12px;
}

.fade-title {
  font-family: "Press Start 2P", monospace;
  font-size: clamp(36px, 8vw, 96px);
  letter-spacing: 0.18em;
}

.fade-subtitle {
  font-family: "JetBrains Mono", monospace;
  font-size: clamp(14px, 2.4vw, 22px);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(242, 255, 249, 0.75);
}

.home {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.home-nav {
  height: 64px;
  background: #000;
  color: #f2fff9;
  display: flex;
  align-items: center;
  padding: 0 28px;
  letter-spacing: 0.24em;
  font-family: "JetBrains Mono", monospace;
  text-transform: uppercase;
  justify-content: space-between;
}

.home-logo {
  font-size: 14px;
}

.nav-icons {
  display: flex;
  gap: 12px;
}

.mode-toggle {
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(242, 255, 249, 0.4);
  background: #000;
  color: #f2fff9;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, color 150ms ease, background 150ms ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mode-toggle:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 255, 249, 0.7);
  color: #c8fff0;
}

.mode-toggle:focus-visible {
  outline: 2px solid rgba(242, 255, 249, 0.6);
  outline-offset: 3px;
}

.mode-icon {
  display: inline-block;
  line-height: 1;
  font-size: 12px;
  opacity: 0.7;
}

body.light-mode .mode-sun {
  opacity: 1;
}

body:not(.light-mode) .mode-moon {
  opacity: 1;
}

.nav-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #f2fff9;
  border-radius: 50%;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease;
}

.nav-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.nav-icon:hover {
  transform: translateY(-1px);
  color: #c8fff0;
  background: rgba(255, 255, 255, 0.08);
}

.nav-icon:focus-visible {
  outline: 2px solid rgba(242, 255, 249, 0.6);
  outline-offset: 3px;
}

.home-content {
  flex: 1;
  background: #0a0c0c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}


.home-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 200ms ease;
}


body.light-mode .home-bg-light {
  opacity: 1;
}

body:not(.light-mode) .home-bg-dark {
  opacity: 1;
}

.game-tabs {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.game-tab {
  width: 96px;
  height: 22px;
  background: #000;
  border-radius: 999px;
  border: none;
  color: #f2fff9;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background 220ms ease, opacity 220ms ease;
}

.game-tab:hover {
  transform: translateY(-2px);
  background: #101010;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.4);
}

.game-tab:focus-visible {
  outline: 2px solid rgba(242, 255, 249, 0.6);
  outline-offset: 3px;
}

.game-tab.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.tab-panels {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.tab-panel {
  position: absolute;
  background: #000;
  color: #f2fff9;
  border-radius: 999px;
  padding: 16px 18px;
  opacity: 0;
  overflow: hidden;
  overflow-y: auto;
  transform-origin: top;
  transform: scaleY(var(--panel-scale, 0.7));
  will-change: left, top, width, transform, opacity;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition:
    left 320ms ease,
    top 320ms ease,
    width 320ms ease,
    transform 320ms ease,
    border-radius 320ms ease,
    opacity 220ms ease;
}

.tab-panel.is-measuring {
  transition: none;
}

.tab-panel .tab-panel-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 200ms ease;
}

.tab-panel.is-open .tab-panel-title {
  opacity: 0.8;
}

.tab-panel.is-open {
  opacity: 1;
  border-radius: 18px;
  pointer-events: auto;
}

.tab-panel-body {
  margin-top: 14px;
  display: grid;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.tab-panel.is-open .tab-panel-body {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 120ms;
}

.project-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(242, 255, 249, 0.18);
  background: rgba(10, 12, 12, 0.75);
  color: inherit;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.project-card:hover {
  transform: translateY(-1px);
  border-color: rgba(200, 255, 240, 0.45);
  background: rgba(14, 18, 18, 0.85);
}

.project-card:focus-visible {
  outline: 2px solid rgba(242, 255, 249, 0.5);
  outline-offset: 3px;
}

.project-name {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-meta {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(242, 255, 249, 0.6);
}

.project-cta {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 255, 249, 0.7);
}

.tab-panel-body p {
  line-height: 1.9;
}
body.show-home .home {
  opacity: 1;
  pointer-events: auto;
}

body.show-home .home-content {
  animation: content-fade 1.2s ease forwards;
}

.home-stage {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.home-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: #000;
  z-index: 1;
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  text-align: center;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(242, 255, 249, 0.7);
}

.home-footer-text {
  max-width: 100%;
}


@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes content-fade {
  0% {
    background: #000;
  }
  100% {
    background: #0a0c0c;
  }
}
