@import url('https://fonts.googleapis.com/css?family=Poppins:400,600&display=swap');

/* Unvisited link */
a:link {
  color: rgb(255, 200, 11);
}

/* Visited link */
a:visited {
  color: rgb(227, 179, 20); 
}

/* Hover over link */
a:hover {
  color: rgb(181, 62, 255);
}

/* Selected link */
a:active {
  color: rgb(108, 40, 175);
}

html {
  height: 100%;
  background: #000000;
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

body {
  font-family: 'Poppins', sans-serif; /* Apply the font */
  font-size: 16px; /* Set the base font size */
  color: #c9c9c9;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0a0a0a 100%);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Removed animated background elements to prevent color flash during fade-in */

/* Removed floating particles to prevent color flash during fade-in */

body {
  opacity: 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 25%, #2a2a2a 50%, #1a1a1a 75%, #0a0a0a 100%);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  transition: opacity 0.3s ease-in-out;
}

.title h1:after {
  content: '';
  position: absolute;
  left: -30px;
  right: -30px;
  bottom: -15px; /* Adjust this value to move the underline up or down */
  height: 3px; /* Thickness of the underline */
  background: linear-gradient(to right, #797979, #797979, #797979); /* A shiny gradient effect */
  border-radius: 2px; /* Optional: adds rounded corners to the underline */
}

body.fade-in {
  opacity: 1;
}

.navigation button {
  display: inline-block;
  margin: 0 5px;
}

.section {
  display: none; /* Initially hide all sections */
}

.section.active {
  display: block; /* Only show the active section */
}

.yellow-text {
  color: rgb(255, 194, 11);
}

h1 {
  font-size: 2em; /* 2 times the size of the base font size */
}

p {
  font-size: 1em; /* Keep paragraph text at the base font size */
  line-height: 1.6; /* Set the line height */
}

.steamTitle {
  text-shadow: 0px 3px 4px #0000002a;
  letter-spacing: 0.125em;
}

.page-overlay {
  opacity: 1;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: 0.4s ease-in-out;
}

/* Header banner with background image */
.header-banner {
  position: relative;
  width: 100%;
  max-width: 1600px;
  height: 110px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  margin: 80px auto 16px auto;
  overflow: hidden;
  padding: 0 48px;
  box-sizing: border-box;
  background-image: url('Images/About/HomeHeader.jpg');
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Particle canvases */
#heroParticles, #projectsParticles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0; /* under text/icons */
  opacity: 0.9;
}

/* Overlay for readability */
.header-banner::before {
  content: '';
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(30, 20, 40, 0.55);
  z-index: 0;
}

.header-title, .header-icons {
  position: relative;
  z-index: 1;
}

.header-title {
  font-size: 3em;
  font-weight: 700;
  color: #fff;
  text-align: left;
  letter-spacing: 0.03em;
  margin-left: 12px;
  font-family: 'Poppins', sans-serif;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  white-space: nowrap;
}

.header-icons {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 32px;
  margin-right: 12px;
  flex-shrink: 0;
}

.header-icons a {
  display: flex;
  align-items: center;
}

.header-icons a img {
  height: 44px;
  width: auto;
  opacity: 0.7;
  transition: all 0.3s ease;
  display: block;
  border-radius: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-icons a {
  position: relative;
}



.header-icons a .sparkle1 {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 8px;
  color: #ffffff;
  text-shadow: 0 0 4px #ffffff, 0 0 8px #ffffff;
  animation: sparkleRise1 3s ease-out infinite;
  animation-delay: 0s;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.header-icons a .sparkle2 {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 6px;
  color: #ffffff;
  text-shadow: 0 0 3px #ffffff, 0 0 6px #ffffff;
  animation: sparkleRise2 3s ease-out infinite;
  animation-delay: 1s;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.header-icons a .sparkle3 {
  position: absolute;
  top: 50%;
  left: 50%;
  font-size: 7px;
  color: #ffffff;
  text-shadow: 0 0 3px #ffffff, 0 0 6px #ffffff;
  animation: sparkleRise3 3s ease-out infinite;
  animation-delay: 2s;
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -50%);
}

.header-icons a img:hover {
  opacity: 1;
  transform: scale(1.15);
  background: rgba(255, 194, 11, 0.15);
  border-color: rgba(255, 194, 11, 0.3);
  box-shadow: 0 4px 12px rgba(255, 194, 11, 0.2);
}

@keyframes sparkleRise1 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(-20px) translateY(0px);
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(-15px) translateY(-30px);
  }
}

@keyframes sparkleRise2 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(15px) translateY(0px);
  }
  30% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(10px) translateY(-25px);
  }
}

@keyframes sparkleRise3 {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(0px) translateY(0px);
  }
  25% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(5px) translateY(-35px);
  }
}

@media (max-width: 700px) {
  .header-banner {
    height: 80px;
    padding: 0 12px;
    margin: 60px auto 16px auto;
  }
  .header-title {
    font-size: 1.5em;
  }
  .header-icons a img {
    height: 32px;
  }
  .header-icons {
    gap: 16px;
  }
}

/* Intro Section for Homepage */
body .home-page .intro-section {
  max-width: 800px !important;
  margin: 0px auto 0px auto !important;
  padding: 32px 48px !important;
  text-align: center !important;
}

.intro-content h1 {
  font-size: clamp(2em, 4vw, 3em);
  color: #fff;
  font-weight: 600;
}

.intro-content p {
  font-size: clamp(1em, 2vw, 1.2em);
  line-height: 1.7;
  color: #c9c9c9;
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

body .home-page .intro-stats {
  display: flex !important;
  justify-content: center !important;
  gap: clamp(32px, 6vw, 64px) !important;
  margin-top: 16px !important;
  align-items: center !important;
  min-height: 20px !important;
  padding: 0 !important;
  height: auto !important;
  max-height: 30px !important;
}

body .home-page .stat {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

body .home-page .stat-number {
  font-size: clamp(1.5em, 3vw, 2em) !important;
  font-weight: 700 !important;
  color: rgb(255, 194, 11) !important;
  margin-bottom: 6px !important;
  line-height: 1 !important;
  display: block !important;
  margin-top: 0 !important;
  padding: 0 !important;
  position: relative;
  text-shadow: 0 2px 10px rgba(255, 194, 11, 0.15);
  animation: statPulse 3.2s ease-in-out infinite;
}

body .home-page .stat-label {
  font-size: clamp(0.7em, 1.5vw, 0.8em) !important;
  color: #919191 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  line-height: 1 !important;
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0.85;
  animation: statFade 3.2s ease-in-out infinite;
}


/* subtle spark accents around stat number */
.stat-number::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 15% 60%, rgba(255,255,255,0.45), rgba(255,255,255,0) 60%),
    radial-gradient(1.5px 1.5px at 70% 30%, rgba(255,255,255,0.35), rgba(255,255,255,0) 60%),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(255,255,255,0.35), rgba(255,255,255,0) 60%);
  opacity: 0;
  animation: statSparks 3.2s ease-in-out infinite;
}

@keyframes statSparks {
  0%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.98); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.02); }
}

/* Featured Projects Section */
.featured-projects {
  max-width: 1200px;
  margin: 32px auto 48px auto;
  padding: clamp(32px, 6vw, 64px);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  position: relative;
}

.featured-projects h2 {
  text-align: center;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  margin-bottom: clamp(32px, 5vw, 48px);
  margin-top: -16px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  background: linear-gradient(90deg, #ffd60a, #ff7a00, #7b2ff2, #00e5ff, #ffd60a);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.14);
  text-shadow: 0 0 22px rgba(255, 214, 51, 0.18), 0 0 38px rgba(123,47,242,0.15);
  animation: titleGradient 12s linear infinite;
}

@keyframes titleGradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.featured-projects h2::after {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -10px;
  height: 3px;
  width: min(460px, 40%);
}

@keyframes underlineShimmer {
  0%, 100% { background-position: 0% 50%; opacity: 0.2; }
  50% { background-position: 200% 50%; opacity: 1; }
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(24px, 4vw, 32px);
  margin-bottom: clamp(32px, 5vw, 48px);
}

.project-card {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(5px);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.4), 0 0 20px rgba(255, 194, 11, 0.2);
  border-color: rgba(255, 194, 11, 0.3);
}

.project-card.featured {
  grid-column: span 2;
  grid-row: span 2;
}

.project-card.wide {
  grid-column: span 2;
  grid-row: span 1;
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-links {
  display: flex;
  gap: 16px;
}

.project-link {
  padding: 12px 24px;
  background: rgb(255, 194, 11);
  color: #000 !important;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.3s ease;
}

.project-link:hover {
  background: rgb(255, 214, 51);
  color: #000 !important;
}

.project-info {
  padding: clamp(16px, 3vw, 24px);
}

.project-card.wide .project-info,
.project-card.compact .project-info {
  padding: clamp(12px, 2.5vw, 16px) clamp(16px, 3vw, 24px);
}

.project-info h3 {
  color: #fff;
  font-size: clamp(1.2em, 2.5vw, 1.4em);
  margin-bottom: 8px;
  font-weight: 600;
}

.project-genre {
  color: rgb(255, 194, 11);
  font-size: clamp(0.8em, 1.8vw, 0.9em);
  margin-bottom: 12px;
  font-weight: 500;
}

.project-description {
  color: #919191;
  font-size: clamp(0.85em, 1.9vw, 0.95em);
  line-height: 1.6;
}

.view-all-projects {
  text-align: center;
}

.view-projects-btn {
  display: inline-block;
  padding: clamp(12px, 2.5vw, 16px) clamp(24px, 4vw, 32px);
  background: rgb(255, 194, 11);
  color: #000 !important;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: clamp(1em, 2vw, 1.1em);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255, 194, 11, 0.3);
}

.view-projects-btn:hover {
  background: rgb(255, 214, 51);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 194, 11, 0.4);
  color: #000 !important;
}

/* About Page Improvements */
.about-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  margin: 300px auto 48px auto; /* Increased top margin to avoid navbar */
  padding-top: 60px;
  padding-left: 48px;
  padding-right: 48px;
}

.about-content {
  display: flex;
  gap: 48px;
  align-items: flex-start;
  margin-top: 32px;
  width: 100%;
}

.about-image {
  flex: 0 0 400px;
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.about-text-content {
  flex: 1;
  max-width: none;
}

.aboutText p {
  margin-bottom: 16px;
  font-size: calc(0.9em + 0.2vw);
  line-height: 1.7;
}

.aboutText strong {
  color: rgb(255, 194, 11);
}

.aboutText strong a {
  color: rgb(255, 194, 11);
  text-decoration: underline;
  text-decoration-color: rgb(255, 194, 11);
  text-decoration-thickness: 2px;
}

.aboutText strong a:hover {
  color: rgb(255, 214, 51);
  text-decoration-color: rgb(255, 214, 51);
}

.aboutText ul {
  margin: 16px 0;
  padding-left: 24px;
}

.aboutText li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Work Experience Section removed */

/* Responsive Design */
@media (max-width: 768px) {
  .about-content {
    flex-direction: column;
    gap: 32px;
  }
  
  .about-image {
    flex: none;
    max-width: 100%;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .project-card.featured {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .project-card.wide {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .project-card.compact {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .featured-projects {
    padding: 24px;
    margin: 16px auto 32px auto;
  }

  .intro-content h1 {
    font-size: clamp(1.8em, 5vw, 2em);
  }
  
  body .home-page .intro-stats {
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .about-section {
    margin-top: 270px;
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 480px) {
  .featured-projects {
    padding: 16px;
    margin: 8px auto 24px auto;
  }
  
  .projects-grid {
    gap: 16px;
  }
  
  .project-info {
    padding: 12px;
  }
  
  .project-card.wide .project-info,
  .project-card.compact .project-info {
    padding: 8px 12px;
  }
  
  body .home-page .intro-section {
    padding: 16px 24px !important;
  }
}

.contact-fab {
  position: fixed;
  right: 24px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  background: none;
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.contact-fab svg {
  width: 40px;
  height: 40px;
  display: block;
}

.contact-fab:hover {
  box-shadow: 0 8px 24px rgba(123,47,242,0.25);
  transform: scale(1.08);
}

/* Projects Page - Navigation fixes only */

/* Prevent index.css from interfering with games page */
body:not(.about-page) .page-overlay {
  opacity: 1;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: 0.4s ease-in-out;
}

/* Fix navbar hover overlap in games section */
#navbar {
  overflow: hidden;
}

#navbar a {
  overflow: hidden;
  position: relative;
  z-index: 1;
}

#navbar a:hover {
  overflow: hidden;
  position: relative;
  z-index: 2;
}

/* Fix about page copyright */
body:not(.home-page) .bottom-headline-wrapper {
  display: block !important;
  position: relative !important;
  z-index: 1 !important;
  margin-top: 96px !important;
  width: 100% !important;
  bottom: 0 !important;
}

body:not(.home-page) .bottom-headline {
  text-align: center !important;
  padding: 32px 0px !important;
  background: #000000 !important;
  width: 100% !important;
  position: relative !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

body:not(.home-page) .bottom-headline .copyright-text {
  color: #919191 !important;
  font-size: calc(0.45vw + 0.45vh) !important;
  letter-spacing: 0.05em !important;
  font-weight: 400 !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  text-shadow: none !important;
  font-family: 'Arial', sans-serif !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
}