@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@300;400;500&display=swap');

:root {
  --text-primary: #ffffff;     /* pure white */
  --text-secondary: #e0e0e0;   /* light grey */
  --text-light: #b3b3b3;       /* softer muted grey */
  --bg-primary: #1a1a1a;       /* deep charcoal (ChatGPT-like background) */
  --bg-secondary: #2a2a2a;     /* slightly lighter dark grey */
  --border-light: #333333;     /* subtle border grey */
  --accent: #000000;           /* stays black for emphasis, can be neon if needed */
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  overflow-x: hidden;
}

/* SIMPLIFIED STATIC HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 5%;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
  gap: 60px;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 400;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.on {
  color: var(--text-secondary);
}

.nav-link.on::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}

/* MAIN CONTENT */
main {
  min-height: 50vh;
  padding: 80px 5% 100px;
}

/* HOME GALLERY - PROJECT CARDS ONLY */
.home-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  cursor: pointer;
  transition: transform 0.3s ease;
}

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

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  margin-bottom: 20px;
  background: var(--bg-secondary);
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.project-card:hover .project-image img {
  transform: scale(1.05);
}

.project-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 0;
  color: var(--text-primary);
  text-align: center;
}

/* HIDE ANY OLD GALLERY SECTIONS COMPLETELY */
.stills-gallery {
  display: none !important;
}

.projects-grid {
  display: none !important;
}

/* INDIVIDUAL PROJECT PAGES */
.project-header {
  max-width: 1200px;
  margin: 0 auto 80px;
  text-align: center;
}

.project-nav {
  margin-bottom: 40px;
  text-align: left;
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.3s ease;
  padding: 8px 0;
}

.back-link:hover {
  color: var(--text-primary);
  transform: translateX(-5px);
}

.project-title h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.project-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.project-meta {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* TRUE MASONRY PROJECT GALLERY LAYOUT */
.project-gallery {
  column-count: 4;
  column-gap: 16px;
  max-width: 1200px;
  margin: 0 auto 100px;
}

.project-gallery .image-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
  cursor: pointer;
  transition: transform 0.3s ease;
  margin-bottom: 16px;
  break-inside: avoid;
  display: inline-block;
  width: 100%;
}

.project-gallery .image-item:hover {
  transform: translateY(-3px);
}

/* Natural aspect ratios - images maintain their original proportions */
.project-gallery .image-item.portrait img {
  aspect-ratio: 3/4;
}

.project-gallery .image-item.landscape img {
  aspect-ratio: 3/2;
}

.project-gallery .image-item.square img {
  aspect-ratio: 1/1;
}

/* Image styling */
.project-gallery .image-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
  display: block;
}

.project-gallery .image-item:hover img {
  transform: scale(1.05);
}

/* PROJECT DESCRIPTION */
.project-description {
  max-width: 800px;
  margin: 0 auto 100px;
  padding: 60px 0;
  border-top: 1px solid var(--border-light);
}

.description-content h3 {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--text-primary);
  text-align: center;
}

.description-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 25px;
  text-align: left;
}

/* PROJECT NAVIGATION */
.project-navigation {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 0;
  border-top: 1px solid var(--border-light);
  gap: 40px;
}

.nav-project {
  flex: 1;
  text-decoration: none;
  padding: 30px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 120px;
  justify-content: center;
}

.nav-project:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--text-light);
  transform: translateY(-2px);
}

.nav-project.prev {
  text-align: left;
}

.nav-project.next {
  text-align: right;
}

.nav-label {
  font-size: 12px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  color: var(--text-primary);
  font-weight: 400;
}

/* ABOUT PAGE */
.about-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.about-image {
  margin-bottom: 40px;
}

.about-image img {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-light);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.about-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 400;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.about-content h3 {
  font-size: 18px;
  color: var(--text-secondary);
  font-weight: 300;
  margin-bottom: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.about-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 30px;
  text-align: left;
}

/* CONTACT PAGE */
.contact-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-content p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 50px;
}

.contact-info {
  list-style: none;
  margin-bottom: 50px;
}

.contact-info li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  font-size: 16px;
  color: var(--text-primary);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: 1px solid var(--border-light);
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: border-color 0.3s ease;
}

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

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  padding: 15px 40px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  align-self: center;
}

.contact-form button:hover {
  background: #333;
  transform: translateY(-2px);
}

/* FOOTER */
footer {
  background: var(--bg-secondary);
  padding: 50px 5%;
  text-align: center;
  border-top: 1px solid var(--border-light);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
}

.social-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 400;
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: var(--text-primary);
}

footer p {
  font-size: 14px;
  color: var(--text-light);
  font-weight: 300;
}

/* IMPROVED LIGHTBOX */
/* IMPROVED LIGHTBOX WITH PROPER PROPORTIONS */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  padding: 40px;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  /* Ensure natural aspect ratio is maintained */
  aspect-ratio: attr(width) / attr(height);
}


.lightbox-close {
  position: absolute;
  top: -60px;
  right: -20px;
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: opacity 0.3s ease;
  z-index: 2001;
  padding: 10px;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2001;
}

.lightbox-prev,
.lightbox-next {
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 20px 15px;
  border-radius: 50%;
  pointer-events: auto;
  line-height: 1;
  backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.lightbox-prev {
  margin-left: 20px;
}

.lightbox-next {
  margin-right: 20px;
}

/* RESPONSIVE DESIGN - MASONRY COLUMNS */
@media (max-width: 1200px) {
  .project-gallery {
    column-count: 3;
    column-gap: 14px;
    max-width: 1000px;
  }
  
  .project-gallery .image-item {
    margin-bottom: 14px;
  }
}

@media (max-width: 1024px) {
  .home-gallery {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
  }
  
  .project-gallery {
    column-count: 3;
    column-gap: 12px;
    max-width: 800px;
  }
  
  .project-gallery .image-item {
    margin-bottom: 12px;
  }
}

@media (max-width: 768px) {
  header {
    padding: 0 20px;
  }
  
  nav {
    gap: 30px;
    flex-wrap: wrap;
    padding: 15px 0;
  }
  
  .nav-link {
    font-size: 14px;
  }
  
  main {
    padding: 60px 20px 80px;
  }
  
  .home-gallery {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .project-info h3 {
    font-size: 20px;
  }
  
  .social-links {
    gap: 25px;
  }
  
  .lightbox-prev {
    left: -60px;
  }
  
  .lightbox-next {
    right: -60px;
  }
  
  /* IMPROVED LIGHTBOX MOBILE */
  .lightbox {
    padding: 10px;
  }
  
  .lightbox-content {
    max-width: 70vw;
    max-height: 60vh;
  }
  
  .lightbox-close {
    top: -50px;
    right: -10px;
    font-size: 28px;
    padding: 8px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    font-size: 24px;
    padding: 15px 12px;
    margin: 0 10px;
  }
  
  /* PROJECT PAGE MOBILE STYLES */
  .project-title h1 {
    font-size: 36px;
  }
  
  .project-subtitle {
    font-size: 16px;
  }
  
  /* MASONRY COLUMNS - TABLET */
  .project-gallery {
    column-count: 2;
    column-gap: 10px;
    max-width: 100%;
  }
  
  .project-gallery .image-item {
    margin-bottom: 10px;
  }
  
  .project-description {
    margin-bottom: 60px;
    padding: 40px 0;
  }
  
  .project-navigation {
    flex-direction: column;
    gap: 20px;
  }
  
  .nav-project {
    text-align: center !important;
    padding: 25px;
    min-height: 100px;
  }
}

@media (max-width: 480px) {
  nav {
    gap: 20px;
  }
  
  .home-gallery {
    grid-template-columns: 1fr;
  }
  
  .lightbox-prev {
    left: -40px;
  }
  
  .lightbox-next {
    right: -40px;
  }
  
  /* MOBILE LIGHTBOX OPTIMIZATION */
  .lightbox {
    padding: 5px;
  }
  
  .lightbox-content {
    max-width: 100vw;
    max-height: 85vh;
  }
  
  .lightbox-close {
    top: -45px;
    right: -5px;
    font-size: 24px;
    padding: 6px;
  }
  
  .lightbox-prev,
  .lightbox-next {
    font-size: 20px;
    padding: 12px 10px;
    margin: 0 5px;
    background: rgba(0, 0, 0, 0.7);
  }
  
  /* PROJECT PAGE MOBILE STYLES */
  .project-title h1 {
    font-size: 28px;
  }
  
  .nav-project {
    padding: 20px;
  }
  
  .nav-title {
    font-size: 18px;
  }
  
  /* SINGLE COLUMN ON MOBILE */
  .project-gallery {
    column-count: 1;
    column-gap: 0;
    max-width: 100%;
  }
  
  .project-gallery .image-item {
    margin-bottom: 8px;
  }
}

/* ANIMATIONS */
.project-card {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease forwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
