/*
 * Global stylesheet for The Modern Composer website.
 *
 * This CSS uses custom properties (CSS variables) to define a simple
 * colour system inspired by Scandinavian design. Light greys and
 * pastels create a calming base, while blue and sage green accents
 * provide contrast without overwhelming the page. A dark theme is
 * defined using the `data-theme="dark"` attribute on the document
 * element. When toggled, the variables change automatically.
 */

/* base palette inspired by Scandinavian design – soft neutrals with
   pastel accents. These values change in dark mode via the
   `[data-theme="dark"]` selector. */
:root {
  --bg-color: #f5f5f5;
  --text-color: #333333;
  --primary-color: #5d8aa8; /* muted Swedish blue */
  --secondary-color: #9c89b8; /* dusty lilac */
  --accent-color: #8da789; /* sage green */
  --card-bg: #ffffff;
  --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  --header-bg: var(--card-bg);
  --footer-bg: var(--card-bg);
}

/* dark theme overrides */
[data-theme='dark'] {
  --bg-color: #121212;
  --text-color: #eeeeee;
  --card-bg: #1e1e1e;
  --card-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  --header-bg: #1e1e1e;
  --footer-bg: #1e1e1e;
}

/* general layout */
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Noto Sans', sans-serif;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  color: var(--text-color);
}

/* navigation bar */
header {
  background-color: var(--header-bg);
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

nav .logo {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--primary-color);
  text-decoration: none;
}

nav .menu {
  display: flex;
  gap: 1.5rem;
}

nav .menu a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

nav .menu a:hover {
  color: var(--primary-color);
}

/* dark mode toggle button */
.theme-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--text-color);
  border: none;
  background: none;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* hero section */
.hero {
  position: relative;
  height: 70vh;
  background-image: url('assets/fjord.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

/* overlay darkens the image for better contrast with text */
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 1.5rem;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: #ffffff;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #f5f5f5;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  background-color: var(--primary-color);
  color: #ffffff;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.btn:hover {
  background-color: var(--secondary-color);
}

/* page sections */
.section {
  padding: 4rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
}

.card {
  background-color: var(--card-bg);
  box-shadow: var(--card-shadow);
  border-radius: 8px;
  padding: 2rem;
  width: 100%;
  max-width: 280px;
  text-align: center;
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.card .icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.4rem;
}

.card p {
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
}

.card audio {
  width: 100%;
  outline: none;
}

.card .card-btn {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background: var(--secondary-color);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background-color 0.2s ease;
}

.card .card-btn:hover {
  background: var(--primary-color);
}

/* biography page styling */
.bio {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .bio {
    flex-direction: row;
    align-items: flex-start;
  }
}

.bio img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--card-shadow);
}

.bio-text {
  flex: 1;
}

/* timeline */
.timeline {
  margin-top: 1.5rem;
  list-style: none;
  padding-left: 0;
  border-left: 2px solid var(--primary-color);
}

.timeline li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 0.3rem;
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border-radius: 50%;
}

/* contact form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  padding: 2rem;
  border-radius: 8px;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-bottom: 1rem;
  background: var(--card-bg);
  color: var(--text-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary-color);
  outline: none;
}

.contact-form button {
  padding: 0.8rem 1.6rem;
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

.contact-form button:hover {
  background-color: var(--secondary-color);
}

/* footer */
footer {
  background-color: var(--footer-bg);
  color: var(--text-color);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

footer .social-links {
  margin-top: 1rem;
}

footer .social-links a {
  margin: 0 0.5rem;
  color: var(--primary-color);
  font-size: 1.3rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer .social-links a:hover {
  color: var(--secondary-color);
}