/* ===== RESET & BASE STYLES ===== */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body { 
  height: 100%; 
  scroll-behavior: smooth;
}

body { 
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
  color: #222; 
  line-height: 1.6; 
  background-color: #f9f9f9;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

h2:after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: #222;
}

h3 {
  font-size: 1.8rem;
  margin-bottom: 30px;
  border-bottom: 2px solid #222;
  padding-bottom: 10px;
  display: inline-block;
}

p {
  margin-bottom: 1.5rem;
  color: #555;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-spacing {
  padding: 100px 0;
}

/* ===== HEADER ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

.site-header.scrolled {
  height: 70px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

/* LOGO */
.logo { 
  font-weight: 600; 
  font-size: 1.2rem; 
  letter-spacing: 0.5px; 
  text-decoration: none;
  color: #111;
  z-index: 1001;
}

/* HAMBURGER BUTTON */
.menu-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #111;
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.menu-toggle span:nth-child(1) {
  transform: translateY(-5px);
}

.menu-toggle span:nth-child(3) {
  transform: translateY(5px);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(1px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-1px) rotate(-45deg);
}

/* NAVIGATION */
.main-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.main-nav a {
  color: #111;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.3s ease;
}

.main-nav a:after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: #111;
  transition: width 0.3s ease;
}

.main-nav a:hover:after {
  width: 100%;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    z-index: 999;
  }
  
  .main-nav.active {
    transform: translateX(0);
  }
  
  .main-nav a {
    font-size: 1.2rem;
  }
}

/* ===== PROJECT DETAIL HERO ===== */
.project-detail-hero {
  height: 70vh;
  background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), var(--hero-image);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  margin-top: 80px;
}

.project-detail-hero .hero-content {
  max-width: 800px;
  padding: 0 20px;
  z-index: 2;
}

.project-detail-hero h1 {
  color: white;
  margin-bottom: 1rem;
  font-weight: 400;
}

.project-detail-hero p {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 0;
}

/* ===== PROJECT DETAIL CONTENT ===== */
.project-detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

.back-to-projects {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #222;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 40px;
  transition: color 0.3s ease;
  padding: 10px 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.back-to-projects:hover {
  color: #555;
  background: #f5f5f5;
}

/* PROJECT META INFO */
.project-meta {
  display: flex;
  gap: 30px;
  margin-bottom: 60px;
  flex-wrap: wrap;
}

.meta-item {
  background: #f5f5f5;
  padding: 25px;
  border-radius: 8px;
  flex: 1;
  min-width: 200px;
  border-left: 4px solid #222;
}

.meta-item h4 {
  color: #777;
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.meta-item p {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0;
  color: #222;
}

/* PROJECT DESCRIPTION */
.project-description {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 80px;
  max-width: 800px;
}

.project-description h2 {
  margin-bottom: 30px;
}

/* GALLERY SECTIONS */
.gallery-section {
  margin-bottom: 80px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
  background: #f5f5f5;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-5px);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 15px 20px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  font-weight: 500;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* ===== FOOTER ===== */
.site-footer {
  background: #111;
  color: white;
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-text {
  color: #aaa;
  max-width: 400px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 30px;
  text-align: center;
  color: #777;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
  .project-meta {
    flex-direction: column;
  }
  
  .meta-item {
    min-width: auto;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .project-detail-hero {
    height: 50vh;
    margin-top: 70px;
  }
  
  .project-detail-content {
    padding: 60px 20px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .site-header {
    padding: 0 20px;
  }
}

@media (max-width: 576px) {
  .project-detail-hero h1 {
    font-size: 2rem;
  }
  
  .project-detail-hero p {
    font-size: 1rem;
  }
  
  .meta-item {
    padding: 20px;
  }
}