/* =================================================================
   PROJECT GOLDEN DAWN - Main Styling (style.css)
   Aesthetic: Dark Futuristic / Golden Dawn / Sleek Glassmorphism
   ================================================================= */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Montserrat:wght@300;400;600;700;800&family=Cinzel:wght@600;700;800;900&display=swap');

:root {
  --bg-primary: #060609;
  --bg-secondary: #0d0b12;
  --card-bg: rgba(18, 15, 24, 0.7);
  --card-border: rgba(255, 215, 0, 0.15);
  --card-hover-border: rgba(255, 215, 0, 0.65);
  
  --accent-gold: #ffd700;
  --accent-gold-light: #fff5c0;
  --accent-amber: #ff9900;
  --accent-gold-dark: #cc9900;
  --accent-glow: rgba(255, 215, 0, 0.5);
  
  --text-main: #fcfbf5;
  --text-muted: #c9bfab;
  --text-dim: #78705b;
  
  --font-heading: 'Cinzel', 'Montserrat', 'Kanit', sans-serif;
  --font-body: 'Kanit', 'Montserrat', sans-serif;

  --nav-height: 76px;
  --transition-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

/* =================================================================
   Background Atmosphere: Golden Flare with Slow Fade Effect
   ================================================================= */
.bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

/* Golden Sunburst Background Flare: Flares up bright gold, then slowly fades to ambient backdrop */
.bg-ambient::before {
  content: '';
  position: absolute;
  top: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, rgba(255, 140, 0, 0.2) 35%, transparent 70%);
  filter: blur(100px);
  /* Initial bright flare bloom that slowly fades out to original dark background */
  animation: bgGoldFlareFade 6s ease-out forwards, pulseGoldAmbient 10s infinite alternate 6s ease-in-out;
}

.bg-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(255, 215, 0, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.8;
}

/* Upper Half Golden Ambient Glow: Flares up smoothly together with the logo, then slowly fades away */
.bg-upper-gold-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 70vh;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 140% 95% at 50% 0%, rgba(255, 220, 110, 0.5) 0%, rgba(255, 175, 0, 0.25) 45%, rgba(255, 140, 0, 0.07) 75%, transparent 100%);
  filter: blur(35px);
  opacity: 0;
  animation: upperHalfGoldFlareFade 7.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

@keyframes upperHalfGoldFlareFade {
  0% {
    opacity: 0;
    transform: scaleY(0.5);
    filter: blur(60px);
  }
  28% {
    opacity: 1; /* Peak golden light flare blooming together as logo glides down */
    transform: scaleY(1.05);
    filter: blur(25px);
  }
  100% {
    opacity: 0.14; /* Silky smooth fade away into original dark background */
    transform: scaleY(0.95);
    filter: blur(55px);
  }
}

@keyframes bgGoldFlareFade {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.6);
    filter: blur(140px);
  }
  25% {
    opacity: 1; /* Dazzling golden bloom flare on initial load */
    transform: translateX(-50%) scale(1.25);
    filter: blur(80px);
  }
  100% {
    opacity: 0.35; /* Slowly fades out to dark original background */
    transform: translateX(-50%) scale(0.95);
    filter: blur(110px);
  }
}

@keyframes pulseGoldAmbient {
  0% {
    transform: translateX(-50%) scale(0.9);
    opacity: 0.3;
  }
  100% {
    transform: translateX(-50%) scale(1.1);
    opacity: 0.5;
  }
}

/* =================================================================
   Header & Navigation Bar
   ================================================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5%;
  z-index: 100;
  background: rgba(6, 6, 9, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 215, 0, 0.12);
  transition: all 0.3s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
  cursor: pointer;
}

.nav-brand img {
  height: 44px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.5));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.nav-brand:hover img {
  transform: scale(1.08) rotate(2deg);
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.8));
}

.nav-brand span {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff 0%, #ffe8a3 50%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  text-shadow: 0 0 12px rgba(255, 215, 0, 0.6);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-amber));
  transition: transform 0.3s var(--transition-smooth);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-gold);
}

.nav-link:hover::after, .nav-link.active::after {
  transform: translateX(-50%) scaleX(1);
}

/* Projects Dropdown Menu */
.nav-item-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(13, 11, 18, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 10px;
  min-width: 250px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), 0 0 25px rgba(255, 215, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s var(--transition-smooth);
  pointer-events: none;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(4px);
  pointer-events: auto;
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 215, 0, 0.08);
  color: var(--accent-gold);
}

.dropdown-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.15);
  color: var(--accent-gold-light);
  border: 1px solid rgba(255, 215, 0, 0.4);
  font-weight: 500;
}

/* =================================================================
   Hero Entrance Section & Animations
   ================================================================= */
.hero-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-height) + 40px) 20px 60px;
  position: relative;
}

.hero-container {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Animated Golden Logo Container */
.hero-logo-wrapper {
  margin-bottom: 28px;
  position: relative;
  opacity: 0;
  transform: translateY(-100px) scale(0.85);
  animation: logoGlideDown 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.hero-logo {
  width: clamp(220px, 32vw, 320px);
  height: auto;
  max-width: 85vw;
  filter: drop-shadow(0 0 35px rgba(255, 215, 0, 0.55)) drop-shadow(0 0 75px rgba(255, 140, 0, 0.35));
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-logo-wrapper:hover .hero-logo {
  transform: scale(1.06);
  filter: drop-shadow(0 0 55px rgba(255, 215, 0, 0.85)) drop-shadow(0 0 95px rgba(255, 140, 0, 0.6));
}

/* Golden Sunburst Aura Behind Logo */
.logo-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.35) 0%, rgba(255, 140, 0, 0.15) 45%, transparent 70%);
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
  animation: logoAuraGoldPulse 5s ease-out forwards, auraPulse 4s infinite alternate 5s ease-in-out;
}

@keyframes logoAuraGoldPulse {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  35% {
    transform: translate(-50%, -50%) scale(1.25);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.75;
  }
}

/* Title: Golden Flare Entrance with Slow Fade-Out Glow Effect */
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.4rem, 5.8vw, 4.6rem);
  font-weight: 900;
  letter-spacing: 7px;
  text-transform: uppercase;
  background: linear-gradient(135deg, #ffffff 0%, #fff0b8 35%, #ffd700 70%, #ff9900 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
  line-height: 1.2;

  /* Title Animation: Flares up in gold, then outer glow slowly fades out */
  opacity: 0;
  animation: titleGoldBloomFade 5s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

@keyframes titleGoldBloomFade {
  0% {
    opacity: 0;
    transform: translateY(-45px);
    filter: blur(10px);
    text-shadow: 0 -20px 50px #fff7c2, 0 -35px 100px #ffd700, 0 -50px 150px #ff9100, 0 0 200px rgba(255, 215, 0, 0.9);
  }
  30% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    /* Peak dazzling golden glow bloom */
    text-shadow: 0 0 45px #fff7c2, 0 0 90px #ffd700, 0 0 140px #ff9100, 0 0 180px rgba(255, 215, 0, 0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    /* Outer bright glow slowly fades out into a refined gold sheen */
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.45), 0 0 35px rgba(255, 140, 0, 0.25);
  }
}

/* Subtitle: Golden Glow with Slow Fade Out (Top to Down Fade) */
.hero-subtitle {
  font-size: clamp(1.1rem, 2.7vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--accent-gold-light);
  margin-bottom: 24px;
  line-height: 1.6;

  opacity: 0;
  animation: subtitleGoldGlowFade 5s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
}

@keyframes subtitleGoldGlowFade {
  0% {
    opacity: 0;
    transform: translateY(-35px);
    filter: blur(6px);
    text-shadow: 0 -15px 35px #ffd700, 0 -25px 70px #ff9100;
  }
  35% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    text-shadow: 0 0 40px #ffd700, 0 0 75px #ff9100, 0 0 110px rgba(255, 215, 0, 0.8);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
    /* Outer glow slowly fades out */
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.45);
  }
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 600px;
  font-weight: 300;
  line-height: 1.8;

  opacity: 0;
  transform: translateY(-25px);
  animation: taglineFadeTopToDown 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

@keyframes taglineFadeTopToDown {
  0% {
    opacity: 0;
    transform: translateY(-25px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Scroll Action Button with Golden Accent */
.scroll-indicator {
  margin-top: 50px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 1px;
  opacity: 0;
  animation: textFadeIn 1s ease 1.4s forwards;
  transition: color 0.3s ease;
}

.scroll-indicator:hover {
  color: var(--accent-gold);
}

.scroll-icon {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: 12px;
  position: relative;
}

.scroll-icon::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background-color: var(--accent-gold);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-gold);
  animation: scrollWheel 2s infinite ease-in-out;
}

/* General Keyframes */
@keyframes textFadeIn {
  0% {
    opacity: 0;
    transform: translateY(25px);
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes logoGlideDown {
  0% {
    opacity: 0;
    transform: translateY(-100px) scale(0.82);
    filter: blur(12px) drop-shadow(0 0 90px rgba(255, 215, 0, 1));
  }
  50% {
    opacity: 1; /* Glides down inside the golden light beam as it reaches full brightness */
    transform: translateY(0) scale(1.04);
    filter: blur(0) drop-shadow(0 0 75px rgba(255, 215, 0, 0.85));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0) drop-shadow(0 0 35px rgba(255, 215, 0, 0.55));
  }
}

@keyframes auraPulse {
  0% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.55; }
  100% { transform: translate(-50%, -50%) scale(1.12); opacity: 0.85; }
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translate(-50%, 0); }
  80% { opacity: 0; transform: translate(-50%, 14px); }
  100% { opacity: 0; transform: translate(-50%, 0); }
}

/* =================================================================
   Sections General Styling
   ================================================================= */
.section {
  padding: 100px 5% 80px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 3px;
  margin-bottom: 12px;
  display: inline-block;
  background: linear-gradient(135deg, #ffffff 0%, #ffe8a3 50%, #ffd700 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-amber));
  margin: 10px auto 0;
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* =================================================================
   Projects Catalog Section
   ================================================================= */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.project-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.project-card.has-image {
  padding-top: 0;
}

.project-card-image-wrapper {
  width: calc(100% + 56px);
  margin: 0 -28px 20px -28px;
  height: 190px;
  overflow: hidden;
  position: relative;
  background: rgba(10, 8, 14, 0.8);
}

.project-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition-smooth);
}

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

.project-card-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(18, 15, 24, 0.95) 100%);
}

.project-card-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--card-hover-border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5), 0 0 28px rgba(255, 215, 0, 0.18);
}

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

.project-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.project-category {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-gold);
  font-weight: 600;
}

.project-badge {
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.4);
  color: var(--accent-gold-light);
  font-weight: 500;
}

.project-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
  letter-spacing: 1px;
}

.project-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 24px;
  line-height: 1.7;
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-view-project {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 215, 0, 0.25);
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.project-card:hover .btn-view-project {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-amber));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.45);
}

/* =================================================================
   Team & Members Section Styling
   ================================================================= */
.team-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.team-group-card {
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.4s var(--transition-smooth);
}

.team-group-card:hover {
  border-color: rgba(255, 215, 0, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 24px rgba(255, 215, 0, 0.12);
}

.team-project-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent-gold);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.15);
  letter-spacing: 1.5px;
}

.team-group-body {
  display: grid;
  grid-template-columns: minmax(240px, 280px) 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 868px) {
  .team-group-body {
    grid-template-columns: 1fr;
  }
}

/* Leader Card Box */
.team-lead-box {
  background: rgba(12, 10, 18, 0.85);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.15);
}

.lead-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.2));
  color: var(--accent-gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 215, 0, 0.4);
  margin-bottom: 16px;
}

.member-avatar-wrapper {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  margin: 0 auto 14px;
  overflow: hidden;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 215, 0, 0.08);
}

.member-avatar-wrapper.small {
  width: 52px;
  height: 52px;
  border-width: 1.5px;
  margin: 0;
  flex-shrink: 0;
}

.member-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-avatar-placeholder {
  font-size: 2rem;
  color: var(--accent-gold);
}

.member-avatar-wrapper.small .member-avatar-placeholder {
  font-size: 1.2rem;
}

.member-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

.member-role {
  font-size: 0.85rem;
  color: var(--accent-gold-light);
  font-weight: 500;
  margin-bottom: 8px;
}

.member-bio {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Sub Members Grid */
.sub-members-section {
  width: 100%;
}

.sub-members-title {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.sub-members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.sub-member-card {
  background: rgba(14, 11, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s ease;
}

.sub-member-card:hover {
  border-color: rgba(255, 215, 0, 0.35);
  background: rgba(255, 215, 0, 0.06);
  transform: translateY(-3px);
}

.sub-member-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

.sub-member-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* =================================================================
   Gallery Section & Empty State Layout
   ================================================================= */
.gallery-container {
  min-height: 260px;
}

.gallery-empty-state {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  border: 2px dashed rgba(255, 215, 0, 0.2);
  border-radius: 20px;
  padding: 60px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: border-color 0.3s ease;
}

.gallery-empty-state:hover {
  border-color: rgba(255, 215, 0, 0.5);
}

.empty-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-gold);
  font-size: 1.8rem;
  border: 1px solid rgba(255, 215, 0, 0.35);
  box-shadow: 0 0 16px rgba(255, 215, 0, 0.2);
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.empty-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 440px;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

/* =================================================================
   Modal (Coming Soon Popup)
   ================================================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 3, 7, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: #110d18;
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.7), 0 0 35px rgba(255, 215, 0, 0.2);
  transform: scale(0.9);
  transition: transform 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.modal-image-wrapper {
  width: calc(100% + 64px);
  margin: -36px -32px 20px -32px;
  height: 190px;
  position: relative;
  overflow: hidden;
  border-radius: 20px 20px 0 0;
}

.modal-project-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, #110d18 100%);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: rgba(255, 215, 0, 0.12);
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.modal-status-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 140, 0, 0.2));
  color: var(--accent-gold-light);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255, 215, 0, 0.5);
  margin-bottom: 16px;
}

.modal-body {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 28px;
}

.btn-modal-close {
  background: linear-gradient(135deg, var(--accent-gold-dark), var(--accent-amber));
  color: #ffffff;
  border: none;
  padding: 10px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.35);
}

.btn-modal-close:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.55);
}

/* =================================================================
   Footer
   ================================================================= */
.footer {
  border-top: 1px solid rgba(255, 215, 0, 0.08);
  padding: 40px 5%;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.88rem;
}

/* Floating Bottom-Right Music Control Button */
.music-toggle-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: rgba(14, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 215, 0, 0.35);
  color: var(--accent-gold-light);
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 18px rgba(255, 215, 0, 0.2);
  transition: all 0.3s ease;
}

.music-toggle-btn:hover {
  transform: translateY(-3px) scale(1.04);
  border-color: rgba(255, 215, 0, 0.75);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 28px rgba(255, 215, 0, 0.45);
  color: var(--accent-gold);
}

.music-toggle-btn.playing {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.22), rgba(255, 140, 0, 0.15));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 215, 0, 0.35);
}

.music-icon {
  font-size: 1rem;
  color: var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.music-toggle-btn.playing .music-icon {
  animation: musicIconPulse 1.5s infinite alternate ease-in-out;
}

@keyframes musicIconPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px var(--accent-gold)); }
  100% { transform: scale(1.25); filter: drop-shadow(0 0 8px var(--accent-gold)); }
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
  .nav-links {
    gap: 16px;
  }
  .nav-link {
    font-size: 0.88rem;
    padding: 6px 8px;
  }
  .hero-logo {
    width: 150px;
  }
  .music-toggle-btn {
    bottom: 16px;
    right: 16px;
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

/* =================================================================
   Dedicated Team Page (team.html) Styling
   ================================================================= */
.team-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.team-page-main {
  flex-grow: 1;
  max-width: 900px;
  width: 90%;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 20px 80px;
}

.team-page-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.btn-back-home:hover {
  color: var(--accent-gold);
  border-color: rgba(255, 215, 0, 0.4);
  background: rgba(255, 215, 0, 0.08);
  transform: translateX(-4px);
}

.team-page-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: 5px;
  background: linear-gradient(135deg, #ffffff 0%, #ffe8a3 40%, #ffd700 80%, #ff9900 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

.team-page-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Vertical Project Stack Container */
.team-page-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.team-project-stack {
  background: rgba(14, 11, 20, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 215, 0, 0.25);
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.08);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-project-stack:hover {
  border-color: rgba(255, 215, 0, 0.5);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 215, 0, 0.15);
}

/* 1. Project Banner Header at the top */
.stack-project-banner {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.2);
}

.banner-badge {
  font-size: 0.75rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  font-weight: 600;
  margin-bottom: 8px;
}

.banner-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--text-main);
}

/* 2. Featured Project Leader Card right below */
.stack-lead-card {
  background: linear-gradient(135deg, rgba(20, 16, 28, 0.9), rgba(12, 9, 17, 0.95));
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
  position: relative;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 215, 0, 0.05);
}

.lead-crown-tag {
  position: absolute;
  top: -14px;
  left: 28px;
  background: linear-gradient(135deg, #ffd700, #ff8c00);
  color: #0d0a12;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 4px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lead-card-body {
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (max-width: 640px) {
  .lead-card-body {
    flex-direction: column;
    text-align: center;
  }
}

.lead-avatar-wrapper {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
  flex-shrink: 0;
  background: rgba(255, 215, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lead-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-avatar-placeholder {
  font-size: 2.2rem;
  color: var(--accent-gold);
}

.lead-info {
  flex-grow: 1;
}

.lead-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
}

.lead-role {
  font-size: 0.92rem;
  color: var(--accent-gold-light);
  font-weight: 600;
  margin-bottom: 8px;
}

.lead-bio {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* 3. Sub-members Stacked Line-by-Line Downward ("เรียงกันเป็นตับลงมา") */
.stack-members-section {
  background: rgba(8, 6, 11, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
}

.members-section-header {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--accent-gold-light);
  text-transform: uppercase;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stack-members-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stack-member-row {
  background: rgba(18, 14, 25, 0.8);
  border: 1px solid rgba(255, 215, 0, 0.12);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  transition: all 0.3s ease;
}

.stack-member-row:hover {
  background: rgba(255, 215, 0, 0.08);
  border-color: rgba(255, 215, 0, 0.35);
  transform: translateX(6px);
}

.member-row-num {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-gold);
  opacity: 0.7;
}

.member-row-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 215, 0, 0.5);
  flex-shrink: 0;
  background: rgba(255, 215, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.member-row-info {
  flex-grow: 1;
}

.member-row-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.member-row-role {
  font-size: 0.82rem;
  color: var(--text-muted);
}
