:root {
  color-scheme: dark;
  --bg: #0e1116;
  --panel: #161b22;
  --panel-light: #1f2630;
  --text: #f4f6fb;
  --muted: #b7c0cd;
  --accent: #ff3b6f;
  --accent-2: #ff7aa2;
  --accent-3: #ffb3c7;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 59, 111, 0.22) 0%, rgba(6, 8, 12, 0.98) 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 122, 162, 0.18) 0%, rgba(6, 8, 12, 0.95) 65%);
  color: var(--text);
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  opacity: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

body.theme-transition,
body.theme-transition * {
  transition:
    background-color 0.35s ease,
    background 0.35s ease,
    color 0.35s ease,
    border-color 0.35s ease,
    box-shadow 0.35s ease;
}

body.theme-transition::before {
  transition: background 0.35s ease;
}

body[data-prev-theme]::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.6s ease;
}

body.theme-transition[data-prev-theme]::after {
  clip-path: inset(100% 0 0 100%);
}

body[data-prev-theme="dark"]::after {
  background:
    radial-gradient(circle at top left, rgba(255, 59, 111, 0.22) 0%, rgba(6, 8, 12, 0.98) 60%),
    radial-gradient(circle at 80% 20%, rgba(255, 122, 162, 0.18) 0%, rgba(6, 8, 12, 0.95) 65%);
}

body[data-prev-theme="light"]::after {
  background:
    radial-gradient(circle at top left, rgba(45, 70, 160, 0.18) 0%, rgba(245, 247, 251, 0.98) 55%),
    radial-gradient(circle at 80% 20%, rgba(109, 140, 255, 0.2) 0%, rgba(245, 247, 251, 0.95) 65%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(
    140deg,
    rgba(255, 59, 111, 0.18),
    rgba(255, 122, 162, 0.08) 35%,
    rgba(5, 7, 10, 0.96) 80%
  );
  pointer-events: none;
  z-index: -2;
}

body.page-transition {
  opacity: 0;
  transform: translateY(12px);
}

.reveal-text {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}

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

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-light: #eef2f7;
  --text: #0c1222;
  --muted: #4b5568;
  --accent: #1b2d6b;
  --accent-2: #2b46a1;
  --accent-3: #6d8cff;
  --shadow: 0 18px 40px rgba(14, 24, 48, 0.15);
  background:
    radial-gradient(circle at top left, rgba(45, 70, 160, 0.18) 0%, rgba(245, 247, 251, 0.98) 55%),
    radial-gradient(circle at 80% 20%, rgba(109, 140, 255, 0.2) 0%, rgba(245, 247, 251, 0.95) 65%);
}

body[data-theme="light"]::before {
  background: linear-gradient(
    140deg,
    rgba(45, 70, 160, 0.14),
    rgba(109, 140, 255, 0.08) 35%,
    rgba(248, 250, 255, 0.96) 80%
  );
}

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

.hero {
  padding: 48px 8vw 96px;
  background: linear-gradient(120deg, rgba(255, 77, 109, 0.22), rgba(15, 22, 35, 0.2) 55%, transparent 85%);
}

body[data-theme="light"] .hero {
  background: linear-gradient(120deg, rgba(45, 70, 160, 0.18), rgba(245, 247, 251, 0.25) 55%, transparent 85%);
}

.section-divider {
  height: 2px;
  margin: 0 8vw;
  background: linear-gradient(90deg, rgba(255, 77, 109, 0), rgba(255, 143, 171, 0.8), rgba(255, 77, 109, 0));
  box-shadow: 0 0 20px rgba(255, 143, 171, 0.2);
}

body[data-theme="light"] .section-divider {
  background: linear-gradient(90deg, rgba(45, 70, 160, 0), rgba(45, 70, 160, 0.6), rgba(45, 70, 160, 0));
  box-shadow: 0 0 16px rgba(45, 70, 160, 0.18);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 64px;
  gap: 24px;
}

.nav--sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  width: 100%;
  padding: 16px 8vw;
  margin-bottom: 0;
  background: rgba(14, 17, 22, 0.85);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

body[data-theme="light"] .nav--sticky {
  background: rgba(245, 247, 251, 0.9);
}

.nav--sticky.is-hidden {
  transform: translateY(-110%);
  opacity: 0;
}

body.has-sticky-nav {
  padding-top: 96px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.logo-text {
  font-size: 1.1rem;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  color: var(--muted);
}

.nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.toggle-button {
  background: var(--panel-light);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease, border 0.2s ease, box-shadow 0.2s ease;
}

body[data-theme="light"] .toggle-button {
  border-color: rgba(15, 24, 45, 0.12);
}

.toggle-button:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--shadow);
}

body[data-theme="light"] .toggle-button:hover {
  border-color: rgba(15, 24, 45, 0.2);
}

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

.hero-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 48px;
  align-items: center;
}

.project-hero-media {
  min-height: 220px;
  border-radius: 24px;
  background: var(--panel-light);
  background-image: var(--project-cover);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: center;
  align-items: center;
}

.project-hero-media img {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--accent-2);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  margin-bottom: 16px;
}

.subtitle {
  color: var(--muted);
  max-width: 520px;
  margin-bottom: 32px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow);
}

.button.ghost {
  border-color: var(--accent);
  color: var(--accent);
}

.button:hover {
  transform: translateY(-2px);
}

.hero-card {
  background: var(--panel);
  padding: 32px;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card ul {
  list-style: none;
  margin-top: 16px;
}

.hero-card li {
  margin-bottom: 12px;
  color: var(--muted);
}

.section {
  padding: 80px 8vw;
}

.section.alt {
  background: transparent;
}

.section-heading {
  max-width: 640px;
  margin-bottom: 48px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  margin-bottom: 16px;
}

.section-heading p {
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.card {
  background: var(--panel-light);
  padding: 24px;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--muted);
}

.card-list {
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--muted);
  padding-left: 0;
}

.link-card {
  transition: transform 0.2s ease, border 0.2s ease;
  border: 1px solid transparent;
}

.link-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 109, 0.5);
}

body[data-theme="light"] .link-card:hover {
  border-color: rgba(45, 70, 160, 0.4);
}

.project-card {
  background: linear-gradient(140deg, rgba(255, 77, 109, 0.18), rgba(255, 143, 171, 0.12));
  padding: 32px;
  border-radius: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

body[data-theme="light"] .project-card {
  background: linear-gradient(140deg, rgba(45, 70, 160, 0.18), rgba(109, 140, 255, 0.12));
}

.contact-card {
  background: var(--panel-light);
  padding: 32px;
  border-radius: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.contact-card p {
  margin-bottom: 12px;
}

.footer {
  padding: 32px 8vw 48px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.section-links {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.projects-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
}

.projects-nav .game-card {
  text-decoration: none;
  color: inherit;
}

.info-card {
  display: grid;
  gap: 12px;
}

.info-icon {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.game-card {
  background: var(--panel-light);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border 0.2s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 77, 109, 0.4);
}

body[data-theme="light"] .game-card:hover {
  border-color: rgba(45, 70, 160, 0.3);
}

.game-media {
  min-height: 180px;
  background: radial-gradient(circle at top, rgba(255, 143, 171, 0.4), rgba(24, 30, 44, 0.95));
  background-image: var(--game-cover),
    radial-gradient(circle at top, rgba(255, 143, 171, 0.4), rgba(24, 30, 44, 0.95));
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  font-weight: 600;
  color: var(--muted);
}

body[data-theme="light"] .game-media {
  background: radial-gradient(circle at top, rgba(109, 140, 255, 0.4), rgba(230, 235, 247, 0.95));
  background-image: var(--game-cover),
    radial-gradient(circle at top, rgba(109, 140, 255, 0.4), rgba(230, 235, 247, 0.95));
}

.game-media.image-missing {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.game-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.status-tag {
  font-weight: 600;
  letter-spacing: 0.06em;
}

.status-in-progress {
  background: rgba(255, 183, 77, 0.2);
  color: #ffc266;
}

.status-completed {
  background: rgba(74, 222, 128, 0.2);
  color: #4ade80;
}

.status-stopped {
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
}

body[data-theme="light"] .status-in-progress {
  background: rgba(234, 179, 8, 0.2);
  color: #b45309;
}

body[data-theme="light"] .status-completed {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

body[data-theme="light"] .status-stopped {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--panel-light);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.section-kicker {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  color: var(--accent-2);
  margin-bottom: 12px;
}

.game-body h3 {
  margin: 0;
}

.game-body p {
  color: var(--muted);
}

.game-link {
  margin-top: auto;
  color: var(--accent-2);
  font-weight: 600;
}

@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav-actions {
    width: 100%;
    justify-content: flex-start;
  }
}
