/* --- Base styles --- */
:root {
  --primary: #111827;
  --primary-foreground: #ffffff;
  --secondary: #f3f4f6;
  --secondary-foreground: #1f2937;
  --accent: #4b5563;
  --accent-foreground: #ffffff;
  --background: #ffffff;
  --foreground: #111827;
  --card: #ffffff;
  --card-foreground: #111827;
  --border: #e5e7eb;
  --input: #e5e7eb;
  --ring: #9ca3af;
  --radius: 0.5rem;
  --serif: Times New Roman, serif;
}

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

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 600;
  margin-bottom: 1rem;
  font-family: var(--serif);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
  margin-top: 2rem;
}

p {
  font-size: 1.15rem;
  margin-bottom: 1.5rem;
}

p.lead {
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 1rem 0;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.desktop-nav {
  display: none;
}

.desktop-nav a {
  margin-left: 1.5rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

.desktop-nav a:hover {
  opacity: 1;
}

.mobile-menu-btn {
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
}

@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }
  
  .mobile-menu-btn {
    display: none;
  }
}

/* --- Hero Section --- */
.hero-section {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  line-height: 1.1;
  font-family: var(--serif);
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.8;
  max-width: 32rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

/* --- Article Sections --- */
.article-section {
  padding: 4rem 1.5rem;
}

.article-section.narrow {
  max-width: 48rem;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .article-section {
    padding: 6rem 2rem;
  }
}

/* --- Parallax Image --- */
.parallax-image {
  height: 70vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  overflow: hidden;
}

.parallax-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
}

/* --- Image Grid --- */
.image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.5rem;
}

.image-grid-item {
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.image-grid-item.loaded {
  opacity: 1;
  transform: translateY(0);
}

.image-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (min-width: 640px) {
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 2rem;
  }
}

@media (min-width: 1024px) {
  .image-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Centered Image Section --- */
.centered-image-section {
  padding: 4rem 1rem;
  text-align: center;
}

.centered-image-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.centered-image-container img {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  height: auto;
}

/* --- Text with Image Sections --- */
.text-image-section {
  padding: 4rem 1rem;
}

.text-image-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.text-image-content {
  flex: 1;
}

.text-image-visual {
  flex: 1;
}

.text-image-visual img {
  width: 100%;
  height: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@media (min-width: 768px) {
  .text-image-container {
    flex-direction: row;
    align-items: center;
  }
  
  .text-image-container.image-right {
    flex-direction: row;
  }
  
  .text-image-container.image-left {
    flex-direction: row-reverse;
  }
  
  .centered-image-section {
    padding: 6rem 2rem;
  }
  
  .text-image-section {
    padding: 6rem 2rem;
  }
}

/* --- Footer --- */
.site-footer {
  background-color: var(--primary);
  color: var(--primary-foreground);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-family: Georgia, serif;
}

.footer-section p {
  opacity: 0.8;
  max-width: 20rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.75rem;
}

.footer-section a {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.6;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* --- Loading effect --- */
.image-loading {
  background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.mobile-menu {
  display: none; /* Hide by default */
}

.mobile-menu.active {
  display: block; /* Show when active */
}
