/* ============================================
   MARIA BIARDZKA PHOTOGRAPHY PORTFOLIO
   Minimalist design inspired by odaeide.com
   ============================================ */

/* --- CSS Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black: #111;
  --white: #fff;
  --gray: #666;
  --light-gray: #f5f5f5;
  --border: #e0e0e0;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.3s ease;
  --max-width: 1400px;
  --nav-height: 60px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

ul, ol {
  list-style: none;
}

/* --- Page Fade-in Animation --- */
.page-content {
  animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--border);
  transition: transform var(--transition);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.nav-logo a {
  transition: opacity var(--transition);
}

.nav-logo a:hover {
  opacity: 0.6;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: opacity var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 0.6;
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--black);
  margin: 6px 0;
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  min-height: 45vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + 60px) 40px 40px;
}

.hero h1 {
  font-size: clamp(36px, 7vw, 90px);
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero p {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 300;
}

/* --- Project Grid (Home Page) --- */
.project-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 40px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.project-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.project-card a {
  display: block;
  width: 100%;
  height: 100%;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}

.project-card:hover img {
  transform: scale(1.03);
  filter: brightness(0.7);
}

.project-card .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px 20px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.project-card:hover .overlay {
  opacity: 1;
}

.project-card .overlay h3 {
  color: var(--white);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.project-card .overlay span {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* --- Project Page --- */
.project-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 60px) 40px 40px;
  text-align: center;
}

.project-header h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.project-header .project-meta {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.project-header .project-description {
  font-size: 15px;
  color: var(--gray);
  max-width: 700px;
  margin: 16px auto 0;
  line-height: 1.7;
  letter-spacing: 0.01em;
}

.project-header .project-description a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.project-header .project-description a:hover {
  opacity: 0.6;
}

/* Project Gallery */
.project-gallery {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 40px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.project-gallery.single-col {
  grid-template-columns: 1fr;
  max-width: 900px;
}

.project-gallery img {
  width: 100%;
  height: auto;
  cursor: pointer;
  transition: opacity var(--transition);
}

.project-gallery img:hover {
  opacity: 0.85;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  transition: color var(--transition);
  margin-bottom: 40px;
}

.back-link:hover {
  color: var(--black);
}

.back-link svg {
  width: 16px;
  height: 16px;
}

/* --- About Page --- */
.about-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 60px) 40px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-photo {
  position: sticky;
  top: calc(var(--nav-height) + 40px);
}

.about-photo img {
  width: 100%;
  max-width: 500px;
}

.about-text h1 {
  font-size: 32px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.about-text p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray);
  margin-bottom: 24px;
}

.about-text h2 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 40px;
  margin-bottom: 16px;
}

.about-text .client-list {
  font-size: 14px;
  color: var(--gray);
  line-height: 2;
}

.about-text .contact-link {
  display: inline-block;
  font-size: 14px;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
  transition: opacity var(--transition);
  color: var(--black);
}

.about-text .contact-link:hover {
  opacity: 0.6;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 200;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity var(--transition);
  z-index: 201;
}

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

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: white;
  font-size: 36px;
  cursor: pointer;
  padding: 16px;
  opacity: 0.5;
  transition: opacity var(--transition);
  z-index: 201;
}

.lightbox-nav:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 16px;
}

.lightbox-next {
  right: 16px;
}

.lightbox-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  letter-spacing: 0.1em;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Lazy Load --- */
img[data-src] {
  opacity: 0;
  transition: opacity 0.5s ease;
}

img[data-src].loaded {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px 24px 60px;
  }

  .about-section {
    gap: 40px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .project-gallery {
    padding: 0 24px 60px;
  }

  .project-header {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 768px) {
  .nav-inner {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 100;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 18px;
    letter-spacing: 0.15em;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 35vh;
    padding: calc(var(--nav-height) + 40px) 20px 30px;
  }

  .hero h1 {
    letter-spacing: 0.12em;
  }

  .project-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 10px 20px 40px;
  }

  .project-card {
    aspect-ratio: 4 / 5;
  }

  .project-card .overlay {
    opacity: 1;
  }

  .about-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: calc(var(--nav-height) + 40px) 20px 60px;
  }

  .about-photo {
    position: static;
  }

  .about-photo img {
    max-width: 100%;
  }

  .project-header {
    padding: calc(var(--nav-height) + 30px) 20px 30px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 0 20px 40px;
  }

  .lightbox-nav {
    font-size: 24px;
    padding: 12px;
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
    letter-spacing: 0.1em;
  }

  .hero p {
    font-size: 12px;
  }

  .project-header h1 {
    font-size: 24px;
  }
}
