/* --- Theme Variables --- */
:root {
  --hero-overlay-bg: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] {
  --hero-overlay-bg: rgba(0, 0, 0, 0.7);
}

/* --- Base Styles --- */
html {
  scroll-behavior: smooth;
}

body {
  padding-top: 56px;
  font-family: 'Noto Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
}

.hero {
    position: relative;
    height: 100vh;
    background-image: url('https://cdna.artstation.com/p/assets/images/images/032/769/008/medium/scott-cameron-kitbash3d-contest-shc-20201208a.jpg?1607422361');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-overlay-bg);
    transition: background-color 0.3s ease-in-out;
    /* The overlay. Sits behind particles and content. No z-index needed as
       pseudo-elements are rendered before child elements by default. */
}

.hero-flex-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2; /* Ensure content wrapper is above particles */
    /* This wrapper is used for flexbox centering of the content. */
}

.hero-content {
    padding: 0 1rem;
}

#particles-hero {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.05;
  pointer-events: none;
}

@media (max-width: 576px) {
    .hero {
        background-attachment: scroll;
        /* avoids mobile performance issues */
    }
}

/* --- Navbar --- */
.navbar {
  transition: background-color 0.3s ease-in-out;
}

.navbar-scrolled {
  background-color: var(--bs-tertiary-bg);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}


/* Theme switcher icon alignment */
.dropdown-item .bi {
  width: 1.25em;
}

/* --- Publications Section --- */
.publications .card-img-top {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  background-color: var(--bs-tertiary-bg);
  color: var(--bs-secondary-color);
  font-size: .9rem;
  text-align: center;
}

.footer-heading {
  font-family: 'Barlow', sans-serif;
  color: var(--bs-body-color);
  font-weight: 700;
}

.footer-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.footer-link:hover, .footer-link:focus {
  color: var(--bs-primary);
}

/* --- Spam Protection --- */
.honeypot {
  display: none !important;
}

/* --- Scroll Animations --- */
.fade-in-section {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Skills Section --- */
.skill-item {
  text-align: center;
}

.skill-item i {
  font-size: 3rem;
  color: var(--bs-body-color);
  transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

.skill-item:hover i {
  transform: scale(1.1);
  color: var(--bs-primary);
}

.skill-item p {
  margin-top: .5rem;
}

/* --- Project Cards --- */
/* Make card a positioning context for badges and clip corners */
.card {
  position: relative;
  overflow: hidden;
}

.project-image-link,
.project-video-link {
  display: block;
  cursor: zoom-in;
  overflow: hidden;
}

.projects .card-img-top {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  width: 100%;
}

.project-image-link:hover .card-img-top,
.project-video-link:hover .card-img-top {
  opacity: 0.8;
  transform: scale(1.1);
}

/* --- Art Gallery Carousel --- */
.gallery-image-link {
  cursor: zoom-in;
}

#artCarousel {
  border-radius: .5rem;
  overflow: hidden;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
}

#artCarousel .carousel-item img {
  max-height: 35vh;
  object-fit: contain;
  width: 100%;
  background-color: var(--bs-tertiary-bg);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bs-primary);
  color: var(--bs-white);
  transition: all 0.3s ease-in-out;
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  text-decoration: none;
}

.back-to-top i {
  font-size: 1.75rem;
  line-height: 0;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

/* --- Game Lightbox (Modal) Styles --- */
.basicLightbox.game-lightbox .basicLightbox__placeholder {
  display: flex;
  justify-content: center;
  align-items: center;
}

.game-embed-container {
  position: relative;
  width: 90vw;
  /* Use aspect-ratio for responsive height, common for games (16:9) */
  aspect-ratio: 16 / 9;
  max-width: 1280px; /* Max width for large screens */
  max-height: 90vh; /* Max height to not overflow viewport */
  background: #000;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.game-embed-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #000;
}

.game-fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 100; /* Above the iframe content */
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.game-fullscreen-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.game-fullscreen-btn i {
  font-size: 1.2rem;
}

/* --- Featured Badge --- */
.featured-badge {
  position: absolute;
  top: 12px;
  right: -34px;
  z-index: 2;
  background-color: var(--bs-warning);
  color: var(--bs-dark);
  padding: 4px 30px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
  transform: rotate(45deg);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  white-space: nowrap;
  user-select: none;
}

.featured-badge .bi {
  margin-right: 4px;
  vertical-align: -1px;
}

#contact .input-form {
  background-color: var(--bs-bg-body);
  border-radius: 15px;
  box-shadow: 0 0 7px rgba(0, 0, 0, 0.3);
  padding-top: 20px;
  margin: 0 auto;
}