/* BASE LAYOUT */ 
{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

:root {
  --accent: #ff5500;
  --accent-hover: #ff9966;
}

body {
  background-color: #000;
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #fff;
  background: linear-gradient(-45deg, #d14a00 0%, #ff7733 8%, #191919 40%, #0b0b0b 100%);
  background-size: 500% 500%;
  animation: gradient 30s ease-in-out infinite alternate, pulseLight 10s ease-in-out infinite alternate;
}

/* Background animation */
@keyframes gradient {
  0%   { background-position: 20% 50%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 20% 50%; }
}

@keyframes pulseLight {
  0%   { filter: brightness(1); }
  50%  { filter: brightness(1.05); }
  100% { filter: brightness(1.2); }
}

/* TITLES */
.hero-title,
.page h1 {
  font-family: 'Bungee Spice', cursive;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #000;
  text-align: center;
  text-shadow:
    0 0 6px #000,
    0 0 15px rgba(0,0,0,0.8),
    0 0 30px rgba(0,0,0,0.6),
    0 0 45px rgba(0,0,0,0.5);
  animation: pulseGlow 3s infinite alternate ease-in-out;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 0.5rem;
}

.page h1 {
  font-size: 2.3rem;
  margin-bottom: 1rem;
}

@keyframes pulseGlow {
  from {
    text-shadow:
      0 0 5px #000,
      0 0 10px rgba(0,0,0,0.8),
      0 0 20px rgba(0,0,0,0.6);
    transform: scale(1);
  }
  to {
    text-shadow:
      0 0 10px #000,
      0 0 20px rgba(0,0,0,0.9),
      0 0 40px rgba(0,0,0,0.7);
    transform: scale(1.05);
  }
}

/* SIDEBAR */
.sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 200px;
  padding: 0 1rem 2rem 1rem;
  text-align: right;
  background: linear-gradient(180deg, rgba(0,0,0,0.7) 0%, rgba(40,0,0,0.6) 100%);
  backdrop-filter: blur(10px);
  box-shadow: -10px 0 20px rgba(0,0,0,0.5), -2px 0 15px rgba(255,85,0,0.2);
  border-left: 1px solid rgba(255,85,0,0.3);
  transition: background 0.5s ease, box-shadow 0.5s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-end;
  padding-top: 7rem;
}

.logo {
  position: absolute;
  top: 2.5rem;
  right: 1rem;
  margin: 0;
  font-family: 'Bungee Spice', cursive;
  font-size: 1.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: right;
  text-shadow:
    0 0 3px #000,
    0 0 6px rgba(0,0,0,0.8),
    0 0 10px rgba(0,0,0,0.6);
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin-bottom: 1rem;
}

.sidebar a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  padding: 0.3rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.sidebar a::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: #ff5500;
  transition: width 0.3s ease;
}

.sidebar a:hover::after,
.sidebar a.active::after {
  width: 100%;
  left: 0;
  right: auto;
}

.sidebar a:hover {
  color: #ff9966;
  text-shadow: 0 0 5px rgba(255,85,0,0.6);
}

/* HAMBURGER MENU */
.hamburger {
  position: fixed;
  top: env(safe-area-inset-top, 0);
  right: env(safe-area-inset-right, 0);
  margin: 0;
  z-index: 1100;
  background: rgba(0,0,0,0.7);
  border: none;
  color: #ff5500;
  font-size: 2rem;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease, color 0.3s ease;
  display: none;
}

.hamburger:hover {
  background: rgba(255,85,0,0.15);
  transform: scale(1.1);
}

body.sidebar-open .hamburger {
  background: rgba(255,85,0,0.2);
  color: #ff5500;
}

body.sidebar-open {
  overflow: hidden;
  touch-action: none;
}

/* CONTENT */
.content {
  flex: 1;
  padding: 3rem;
  overflow-y: auto;
  margin-right: 220px;
}

.page {
  display: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.page.visible {
  display: block;
  opacity: 1;
}

/* DOWNLOAD PAGE */
.player {
  margin-top: 2rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.screenshot {
  display: block;
  max-width: 90%;
  margin: 1.5rem auto; 
  border-radius: 12px;
  box-shadow: none;
}

/* PROJECT GRID */
.project-grid {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.project-card {
  display: block;
  text-decoration: none;
  color: #fff;
  background: rgba(255,255,255,0.05);
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 20px rgba(255,85,0,0.4);
  background: rgba(255,85,0,0.1);
}

.project-card h3 {
  color: var(--accent);
  font-family: 'Bungee Spice', cursive;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
  text-shadow:
    0 0 4px rgba(0,0,0,0.9),
    0 0 8px rgba(0,0,0,0.7);
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.project-card:hover h3 {
  color: var(--accent-hover);
  text-shadow:
    0 0 6px rgba(0,0,0,1),
    0 0 12px rgba(0,0,0,0.8);
}

/* DOWNLOAD BUTTON */
.download-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  font-size: 1.3rem;
  font-weight: bold;
  color: #ff9966;
  text-decoration: none;
  border: 2px solid #ff9966;
  border-radius: 10px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 10px rgba(255,85,0,0.5);
}

.download-btn:hover {
  color: #fff;
  background: rgba(255,85,0,0.3);
  box-shadow: 0 0 20px rgba(255,85,0,0.8);
}

/* TEXT BLOCKS */
.centered-block {
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
  line-height: 1.6;
  font-size: 1.1rem;
  color: #fff;
  padding: 1rem 2rem;
  background: rgba(0,0,0,0.4);
  border-radius: 12px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

/* SCROLLBAR */
.content::-webkit-scrollbar {
  width: 8px;
}
.content::-webkit-scrollbar-thumb {
  background: #ff5500;
  border-radius: 4px;
}

/* MOBILE */
@media (max-width: 768px) {
  .sidebar {
    top: 0;
    right: 0;
    bottom: 0;
    width: 200px;
    padding: calc(4rem + env(safe-area-inset-top, 0)) 1rem 2rem 1rem;
    text-align: left;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(60,0,0,0.8) 100%);
    box-shadow: -10px 0 25px rgba(255,85,0,0.4);
    border-left: 1px solid rgba(255,85,0,0.3);
    backdrop-filter: blur(10px);
    transform: translateX(calc(100% + 20px));
    transition: transform 0.35s ease;

    visibility: hidden;
  }

  body.ready .sidebar {
    visibility: visible;
  }

  .sidebar.open {
    transform: translateX(0);
    visibility: visible;
  }

  .logo {
    position: static;
    text-align: left;
    margin-top: 1rem;
    margin-bottom: 2rem;
  }

  .sidebar ul {
    display: block;
    text-align: left;
    margin-top: 2rem;
  }

  .content {
    margin-right: 0;
    padding: 2rem 1rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .content::-webkit-scrollbar {
    display: none;
  }

  .hamburger {
    display: block;
  }
}
@media (max-width: 768px) {
  body .hamburger {
    display: block !important;
  }
}

/* --- FIX: Prevent hamburger from jumping on mobile Chrome --- */
.hamburger {
  position: fixed;
  top: calc(safe-area-inset-top, 0);
  right: calc(safe-area-inset-right, 0);
  transform: translateZ(0); /* stabilize on mobile GPUs */
  will-change: transform;
  z-index: 1100; /* ensure it stays above sidebar */
}

@supports (height: 100dvh) {
  html,
  body {
    height: 100dvh; /* prevents reflow when address bar hides/shows */
  }
}

a[href^="mailto:"] { color: var(--accent); }
a[href^="mailto:"]:hover { color: var(--accent-hover); }
.project-card h3 { color: var(--accent); }
.project-card:hover h3 { color: var(--accent-hover); }
