:root {
  --projects-scale: 1; /* overall scale multiplier */
  --bio-font-size: 1rem;
  --projects-font-size: 1.25rem;
  --projects-year-size: 2rem;
  --award-banner-width: 50%;
  --lightbox-width: 90vw;
  --lightbox-max-width: 1600px;
  --lightbox-max-height: 90vh;
  --close-offset-desktop: -40px;
  --close-offset-mobile: -32px;
  --projects-lightbox-width: 120px; /* narrow projects lightbox */
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  background-color: #000;
  scrollbar-width: thin;
  scrollbar-color: #FFD700 #000;
}

::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: #FFD700;
  border-radius: 50%;
  min-height: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background-color: #ffcf33;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

/* Marquee */
.marquee-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  z-index: -1;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.marquee-inner {
  position: relative;
  width: 110%;
  max-width: 1540px;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  -webkit-mask-image: 
    linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
  mask-image: 
    linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%),
    linear-gradient(to bottom, black 0%, black 85%, transparent 100%);
  -webkit-mask-composite: destination-in;
  mask-composite: intersect;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}

.marquee-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  height: 100%;
/*  background: url('/photos/banners/banner-marquee-playstation-games.webp') repeat-x; */
  background-size: contain;
  animation: marqueeScroll 70s linear infinite;
  filter: brightness(1.0);
  opacity: 0.7;
  will-change: transform;
}

@keyframes marqueeScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Main Container */
.main-container {
  max-width: 1400px;
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
  text-align: left;
  position: relative;
}

/* Header Section */
.header-section, .bio, .awards, .thumbnail-grid, #credits {
  padding: 0 5px;
}

.name-block {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  margin: 10px 0 20px 0;
  color: #FFD700;
  text-transform: uppercase;
  line-height: 0.9;
  padding: 0 5px;
}

.name-block .first,
.name-block .last {
  font-size: clamp(4rem, 20vw, 14rem);
  display: block;
  white-space: nowrap;
  text-shadow: 2px 2px 6px rgba(0,0,0,0.75);
}

h2 {
  font-size: clamp(2.6rem, 3.4vw, 3.05rem);
  margin: 0 0 30px 0;
  padding: 0 5px;
  white-space: nowrap;
}

@media (max-width: 960px) {
  h2 {
    font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  }
}

@media (max-width: 640px) {
  h2 {
    font-size: 1.25rem;
    white-space: normal;
  }
}

/* Bio Section */
.bio {
  max-width: 800px;
  font-size: var(--bio-font-size);
  line-height: 1.6;
  text-align: justify;
  margin-top: 20px;
  padding: 0 5px;
}

/* View Projects Button */
.view-projects {
  display: inline-block;
  padding: 10px;
  border: 2px solid #FFD700;
  color: #FFD700;
  text-decoration: none;
  margin: 20px 0;
  border-radius: 16px;
  transition: 0.3s;
  text-align: left;
}

.view-projects:hover {
  background: #FFD700;
  color: #000;
}

/* Thumbnail Grid — never 3-across; goes 4 → 2 → 2 */
.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  padding: 0 5px;
}

@media (max-width: 1200px) {
  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

.thumb {
  background: #111;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.3s, box-shadow 0.3s;
}

.thumb:hover {
  border: 2px solid #FFD700;
  box-shadow: 0 0 15px rgba(255,215,0,0.5);
}

.thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 12px;
}

/* Lightbox Styles */
.lightbox {
  display: flex;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 1vh 0.5vw;
  overflow: hidden;
  transition: opacity 250ms ease, visibility 250ms ease;
  pointer-events: none;
}

.lightbox.active {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
}

.lightbox-content {
  position: relative;
  /* fixed width for cinematic video, controlled by variable */
  width: var(--lightbox-width);
  max-width: var(--lightbox-max-width);
  max-height: var(--lightbox-max-height);
  aspect-ratio: 16/9;
  background-color: #000;
  border-radius: 12px;
  overflow: hidden;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 0 30px rgba(0,0,0,0.9);
}

/* Projects lightbox: narrow, tall, centered — overrides the 16:9 video shape */
.lightbox.projects .lightbox-content {
  width: min(760px, 92vw);
  max-width: 760px;
  aspect-ratio: auto;
  height: 90vh;
  max-height: 90vh;
}

@media (max-width: 640px) {
  .lightbox.projects {
    padding: 0;
  }
  .lightbox.projects .lightbox-content {
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .lightbox.projects .lightbox-content iframe {
    border-radius: 0;
  }
}

/* Hide coffee mug while any modal is open */
body.modal-open #easterEggContainer {
  display: none;
}

/* Projects modal: close button sits inside the modal, top-right */
.lightbox.projects .close {
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  color: #FFD700;
  background: rgba(0,0,0,0.6);
  border-radius: 50%;
  z-index: 10;
}

.lightbox.projects .close:hover {
  color: #000;
  background: #FFD700;
}

.close {
  position: absolute;
  top: var(--close-offset-desktop);
  right: var(--close-offset-desktop);
  font-size: 32px;
  color: #fff;
  cursor: pointer;
  background: transparent;
  padding: 0;
  transition: color 0.2s ease;
}

.close:hover {
  color: #FFD700;
}

.close:focus {
  outline: 2px solid #FFD700;
  outline-offset: 2px;
}

@media (max-width: 768px) {
  .close {
    font-size: 28px;
    top: var(--close-offset-mobile);
    right: var(--close-offset-mobile);
  }
}

/* Projects Page Styles */
.credit-list {
  list-style: none;
  padding: 0;
  line-height: 1.8;
  font-size: calc(var(--projects-font-size) * var(--projects-scale));
  margin-bottom: 10px;
}

.year-heading {
  font-size: calc(var(--projects-year-size) * var(--projects-scale));
  margin: 30px 0 10px;
  color: #fff;
  position: relative;
}

.year-heading::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100px;
  height: 3px;
  background: #FFD700;
  border-radius: 2px;
}

.award-banner {
  display: block;
  width: calc(var(--award-banner-width) * var(--projects-scale));
  border-radius: 12px;
  margin: 20px 0 10px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.game-title {
  font-weight: bold;
  color: #FFD700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role {
  margin-left: 0.3em;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2em 0;
  color: #aaa;
  font-size: 0.9em;
  background: transparent;
  width: 100%;
}

.site-footer a {
  color: #FFD700;
  text-decoration: none;
  margin: 0 0.5em;
  padding: 0.2em 0.5em;
  border: 2px solid transparent;
  border-radius: 16px;
  transition: all 0.3s;
}

.site-footer a:hover {
  border: 2px solid #FFD700;
}

/* Easter Egg Button */
#easterEggContainer {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
}

#easterEggButton {
  width: 80px;
  height: auto;
  cursor: pointer;
  transition: transform 0.3s ease;
}

#easterEggButton:hover {
  transform: scale(1.2);
}
