/*
 * Stylesheet for Dr. Jietong Fu's personal website
 *
 * This file defines the core colour palette, typography and layout
 * rules used throughout the site. The goal of the design is to
 * evoke the timeless sophistication of classical music while
 * ensuring excellent readability and responsiveness on both desktop
 * and mobile devices. The palette draws on dark blues and blacks to
 * create a stage‑like backdrop, with gold accents that provide a
 * luxurious contrast. Headings use a classic serif typeface and
 * body text uses a modern sans‑serif for clarity.
 */

/* Colour palette */
:root {
  /* Lightened palette for a brighter feel while maintaining
     sophistication. The background is now a deep midnight blue rather
     than near‑black, and the primary blue and gold have been made more
     luminous. */
  /*
     The palette has been further brightened to enhance legibility and impart
     a refined metallic sheen. Backgrounds now lean towards a deep marine
     blue, the primary blue carries more vibrancy, and the gold accent
     glows with a warmer tone. Secondary text is also lighter for better
     contrast. */
  /*
     Further brighten the palette so that the site reads as opulent yet
     inviting. The base background is now a richer sapphire, the primary
     blue is more vivid and the golden accent glows softly. Secondary
     text sits on a pale base for improved legibility.
  */
  --colour-bg: #1a376f;        /* rich sapphire blue background */
  --colour-primary: #3e7ef0;   /* vibrant sky blue */
  --colour-accent: #f3dda2;    /* warm metallic gold */
  --colour-light: #f7f7f7;     /* very light shade for text */
  --colour-muted: #f0f4fb;     /* pale muted colour for secondary text */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Roboto', Arial, sans-serif;
}

/* Global reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background-color: var(--colour-bg);
  color: var(--colour-light);
  font-family: var(--font-body);
  scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--colour-accent);
  margin-bottom: 0.5em;
}

p, li {
  color: var(--colour-light);
  font-size: 1rem;
  line-height: 1.6;
}

a {
  color: var(--colour-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: var(--colour-primary);
}

/* Navigation bar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Brighter navigation bar to complement the refreshed palette */
  background-color: rgba(30, 55, 100, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  z-index: 1000;
  backdrop-filter: blur(5px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.navbar .logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--colour-accent);
}
.navbar ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.navbar li {
  display: inline-block;
}
.navbar a {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--colour-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.navbar a:hover {
  color: var(--colour-accent);
}

/* Social links and language toggle styles */
/* Layout for social links and language toggle containers */
.navbar .social-links,
.navbar .lang-toggle {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-left: 1rem;
}

/* Social link anchors contain only an icon image or FontAwesome icon. */
.navbar .social-links a {
  color: var(--colour-muted);
  display: flex;
  align-items: center;
  transition: color 0.3s ease;
}

/* FontAwesome icons inside social links */
.navbar .social-links a i {
  font-size: 1.1rem;
}

/* Image icons (e.g., Xiaohongshu) */
.navbar .social-links a img {
  height: 1.1rem;
  width: auto;
  display: block;
}

/* Hover state for social links */
.navbar .social-links a:hover {
  color: var(--colour-accent);
}

/* Language toggle anchors retain original typography settings */
.navbar .lang-toggle a {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--colour-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.3s ease;
}

.navbar .lang-toggle a:hover {
  color: var(--colour-accent);
}

/* Hamburger for mobile */
.navbar .hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}
.navbar .hamburger span {
  height: 2px;
  width: 25px;
  background: var(--colour-accent);
  margin-bottom: 4px;
  border-radius: 5px;
  transition: transform 0.3s ease;
}

/* Mobile navigation styling */
@media (max-width: 768px) {
  .navbar ul {
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: rgba(30, 55, 100, 0.95);
    flex-direction: column;
    gap: 0;
    display: none;
  }
  .navbar ul.show {
    display: flex;
  }
  .navbar li {
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .navbar .hamburger {
    display: flex;
  }
}

/* Hero section */
.hero {
  height: 80vh;
  width: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--colour-light);
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Subtle blue-black gradient overlay for a metallic sheen */
  /* A lighter gradient overlay for a metallic sheen that doesn't obscure
     the underlying image. Colours mirror the refreshed palette. */
  background: linear-gradient(
    to bottom right,
    rgba(30, 55, 100, 0.4),
    rgba(0, 0, 0, 0.55)
  );
  z-index: 0;
}
.hero .hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--colour-accent);
}
.hero p {
  font-size: 1.2rem;
  color: var(--colour-muted);
}

/* Sections */
section {
  padding: 4rem 2rem;
}
.container {
  max-width: 1100px;
  margin: 0 auto;
}
.section-title {
  margin-bottom: 2rem;
  font-size: 2rem;
  text-align: center;
}

/* About section */
.about {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: center;
}
.about img {
  width: 100%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}
.about .text {
  flex: 1;
}
.about .text p {
  margin-bottom: 1rem;
  color: var(--colour-muted);
}
.download-links a {
  display: inline-block;
  margin-right: 1rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--colour-accent);
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  font-size: 0.9rem;
  background: linear-gradient(to bottom right, rgba(226,197,112,0.2), rgba(255,255,255,0.05));
  box-shadow: inset 0 0 0 0 rgba(226,197,112,0.5);
}
.download-links a:hover {
  background: var(--colour-accent);
  color: var(--colour-bg);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.4);
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}
.gallery-grid img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

/* Lightbox overlay for gallery */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
#lightbox img {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

/* Shows */
.shows-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.show-card {
  /* Lighter metallic gradient on show cards with a subtle border for depth */
  background: linear-gradient(
    to bottom right,
    rgba(36, 68, 130, 0.8),
    rgba(28, 56, 109, 0.8)
  );
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.show-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
.show-card h3 {
  color: var(--colour-accent);
  margin-bottom: 0.5rem;
}
.show-card p {
  color: var(--colour-muted);
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}
.show-card a {
  font-size: 0.9rem;
}

/* Contact form */
.contact-info {
  margin-bottom: 2rem;
  color: var(--colour-muted);
  line-height: 1.5;
}
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form label {
  font-size: 0.9rem;
  color: var(--colour-muted);
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  /* Further lighten input backgrounds to complement the refreshed palette */
  background-color: #244887;
  color: var(--colour-light);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--colour-accent);
}
.contact-form button {
  padding: 0.8rem;
  border: none;
  border-radius: 4px;
  background-color: var(--colour-accent);
  color: var(--colour-bg);
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}
.contact-form button:hover {
  background-color: var(--colour-primary);
  color: var(--colour-light);
}

/* Footer */
footer {
  /* Slightly lighter footer background */
  background-color: #1c2f5b;
  padding: 2rem;
  text-align: center;
  color: var(--colour-muted);
  font-size: 0.8rem;
}

/* Animations */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(40px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade‑in to sections and hero content */
section {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
  animation-delay: 0.2s;
}

.hero .hero-content {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 0.3s;
}
