/* Base fonts and background */
@import url('https://fonts.googleapis.com/css2?family=Merriweather&family=Open+Sans&display=swap');

body {
  margin: 0;
  font-family: 'Open Sans', Tahoma, Geneva, Verdana, sans-serif;
  color: #3a3a3a;
  line-height: 1.8;
  background-color: #f9f6f0;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url('/images/background.jpg') no-repeat center center fixed;
  background-size: cover;
  opacity: 0.3;
  z-index: -1;
  filter: brightness(0.6);
}

body.legacy-page {
  background-image: url("../images/legacy-bg.jpg");
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center;
  background-color: #1c1c1c;
  color: #f2e3c6;
}

/* Typography */
h1, h2, h3 {
  font-family: 'Merriweather', serif;
  color: #3e2f0b;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

main p:first-letter {
  font-size: 2.8rem;
  font-weight: 700;
  color: #a67c00;
  font-family: 'Georgia', serif;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

/* Nav Bar (shared top and legacy bottom) */
nav {
  background-color: rgba(30, 30, 30, 0.9);
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 1000;
  text-align: center;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

nav ul li a {
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a:focus,
nav ul li a.active {
  color: #d19c39;
  border-bottom: 2px solid #ffda6a;
  outline: none;
}

/* Main content */
main {
  max-width: 960px;
  margin: 2rem auto 6rem auto;
  padding: 2rem;
  background: rgba(249, 246, 240, 0.5);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(180, 160, 80, 0.2);
  font-size: 1.2rem;
  text-align: center;
}

/* Button Styling */
.button {
  display: inline-block;
  background-color: #f5b642;
  color: #1b1b1b;
  padding: 0.6rem 1.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 4px;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  margin-top: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.button:hover,
.button:focus {
  background-color: #ffda6a;
  box-shadow: 0 4px 12px rgba(255, 218, 106, 0.6);
  outline: none;
}

/* Project Grid Layouts */
.project-links-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  padding: 20px 0;
}

.project-column {
  flex: 1 1 300px;
  max-width: 400px;
}

.project-column p {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

.project-column img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 8px;
}

/* Gallery Grid */
.grid-2col, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  padding: 0 2rem;
}

.gallery-grid figure {
  background: rgba(249, 246, 240, 0.9);
  border: 1px solid #d3c699;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(180, 160, 80, 0.15);
  padding: 1rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-grid figure:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(180, 160, 80, 0.4);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

/* Contact Form */
.contact-container {
  max-width: 700px;
  margin: 5em auto;
  background: rgba(249, 246, 240, 0.95);
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(150, 120, 40, 0.25);
}

.contact-form label {
  display: block;
  margin-top: 1em;
  font-weight: 600;
  font-family: 'Merriweather', serif;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.7em;
  margin-top: 0.3em;
  border: 1px solid #b9a66b;
  border-radius: 4px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline-color: #d19c39;
  border-color: #d19c39;
}

.contact-form button {
  margin-top: 1.5em;
  padding: 0.8em 1.5em;
  background-color: #4b3b1b;
  color: #f9f6f0;
  border: none;
  border-radius: 4px;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
}

.contact-form button:hover {
  background-color: #d19c39;
  color: #3a3a3a;
}

/* Footer */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
  color: #999;
}