:root {
  /* Customizable variables */
  --thumbnail-width: 600px;
  --thumbnail-gap: 60px;
  --project-image-width: 600px;
  --project-image-gap: 40px;
  /* Fixed aspect ratio to 1.333 as requested */
  --thumbnail-aspect-ratio: 1.333;

  /* Colors */
  --text-color: #333;
  --background-color: #fff;
  --link-color: #333;
  --border-color: #eee;
}

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

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

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 60px;
  border-bottom: 1px solid var(--border-color);
}

.site-title {
  font-size: 32px; /* increased from 24px to 32px */
  font-weight: normal;
  letter-spacing: 0.5px;
}

.site-title a {
  color: var(--text-color);
  text-decoration: none;
}

/* Added styling for clickable site title link */
.site-title-link {
  color: var(--text-color);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.site-title-link:hover {
  opacity: 0.6;
}

.nav {
  display: flex;
  gap: 30px;
}

.nav a {
  color: var(--link-color);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease;
}

.nav a:hover {
  opacity: 0.6;
}

/* Added active nav link styling */
.nav a.active {
  opacity: 0.6;
}

.main {
  padding: 60px;
}

/* Added main-content class for about page */
.main-content {
  padding: 0 8vw;
  width: 100%;
}

/* Added about page content styling */
.about-content {
  max-width: 800px;
  margin: 60px 0;
  font-size: 16px;
  line-height: 1.6;
}

.about-content h1,
.about-content h2,
.about-content h3 {
  font-weight: normal;
  margin: 40px 0 20px 0;
  letter-spacing: 0.5px;
  text-align: center;
}

.about-content h1 {
  font-size: 28px;
}

.about-content h2 {
  font-size: 24px;
}

.about-content h3 {
  font-size: 20px;
}

.about-content p {
  margin-bottom: 20px;
  color: #666;
}

/* Index page styles */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--thumbnail-gap);
  max-width: calc(var(--thumbnail-width) * 2 + var(--thumbnail-gap));
  margin: 0 auto;
}

/* Updated thumbnail styling for hover effects and fade animations */
.project-thumbnail {
  display: block;
  text-decoration: none;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

.project-thumbnail img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--thumbnail-aspect-ratio);
  object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-thumbnail img.loaded {
  opacity: 1;
}

.project-thumbnail:hover img {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: normal;
  letter-spacing: 0.5px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.project-thumbnail:hover .project-title {
  opacity: 1;
}

/* Updated project page styles to match reference with 8vw padding */
.project-container {
  padding: 0 8vw;
  width: 100%;
}

.project-header {
  margin: 0 0 60px 0;
  text-align: left;
}

.project-header .project-title {
  font-size: 28px;
  font-weight: normal;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
  position: static;
  opacity: 1;
  transform: none;
}

.project-description {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
}

.project-description h1,
.project-description h2,
.project-description h3 {
  font-weight: normal;
  margin: 20px 0 10px 0;
}

.project-description p {
  margin-bottom: 15px;
}

/* Updated project images to be full width and preserve aspect ratio */
.project-images {
  display: flex;
  flex-direction: column;
  gap: var(--project-image-gap);
  width: 100%;
}

/* Added fade-in animation for project page images */
.project-images img {
  width: 100%;
  height: auto;
  display: block;
  /* Preserve original image aspect ratio */
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.project-images img.loaded {
  opacity: 1;
}

/* Added project footer navigation styles */
.project-footer {
  padding: 60px 8vw 40px 8vw;
  border-top: 1px solid var(--border-color);
  margin-top: 60px;
}

.project-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.project-nav-link {
  color: var(--link-color);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.project-nav-link:hover {
  opacity: 0.6;
}

.project-nav-link.current {
  opacity: 0.6;
  font-weight: 500;
}

/* Responsive design */
@media (max-width: 768px) {
  .header {
    padding: 30px 30px;
    flex-direction: column;
    gap: 20px;
  }

  .main {
    padding: 40px 30px;
  }

  /* Added responsive styling for main-content */
  .main-content {
    padding: 0 4vw;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    max-width: var(--thumbnail-width);
  }

  /* Updated responsive project container padding */
  .project-container {
    padding: 0 4vw;
  }

  /* Added responsive project footer */
  .project-footer {
    padding: 40px 4vw 30px 4vw;
  }

  .project-nav {
    gap: 20px;
  }

  :root {
    --thumbnail-width: 400px;
    --thumbnail-gap: 40px;
    --project-image-width: 100%;
    --project-image-gap: 30px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 20px;
  }

  .main {
    padding: 30px 20px;
  }

  .nav {
    gap: 20px;
  }

  /* Added mobile responsive styling for main-content */
  .main-content {
    padding: 0 2vw;
  }

  /* Mobile project container padding */
  .project-container {
    padding: 0 2vw;
  }

  /* Added mobile responsive project footer */
  .project-footer {
    padding: 30px 2vw 20px 2vw;
  }

  .project-nav {
    gap: 15px;
    flex-direction: column;
    align-items: center;
  }

  :root {
    --thumbnail-width: 100%;
    --thumbnail-gap: 30px;
    --project-image-gap: 25px;
  }
}
