:root {
  /* Colors */
  --bg-primary: #1a1a1a;
  --bg-secondary: #242424;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent-gold: #d4af37;
  --overlay-dark: rgba(0, 0, 0, 0.7);

  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;

  /* Transitions */
  --transition-smooth: all 0.3s ease-in-out;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text-primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

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

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 0;
  z-index: 1000;
  transition: all 0.4s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

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

/* Logo Styles */
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 3rem;
}

.nav-links a {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-primary);
  opacity: 0.8;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent-gold);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--accent-gold);
}

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

/* Hero Section */
.hero {
  height: 100vh;
  width: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6)), url('../images/stasia.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 800px;
  padding: 0 2rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 1s ease forwards 0.5s;
}

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

.hero h1 {
  font-size: 4.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.hero p {
  font-size: 1.2rem;
  color: #e0e0e0;
  margin-bottom: 2.5rem;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Portfolio Section */
.gallery-grid {
  /* Masonry Layout */
  column-count: 3;
  column-gap: 1.5rem;
  margin-top: 3rem;
  display: block;
}

@media (max-width: 900px) {
  .gallery-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    column-count: 1;
  }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
  break-inside: avoid;
  cursor: zoom-in;
  background-color: #111;
  border-radius: 4px;
}

/* Skeleton Loading Animation */
.gallery-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite linear;
  z-index: 1;
}

.gallery-item.loaded::before {
  display: none;
}

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

  100% {
    background-position: -200% 0;
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.5s ease;
  opacity: 0;
  /* Hidden initially */
  position: relative;
  z-index: 2;
}

.gallery-item.loaded img {
  opacity: 1;
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  /* Fixes "Full Screen" text showing */
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.lightbox img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  transform: scale(0.9);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox.active img {
  transform: scale(1);
}

.close-lightbox {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  font-family: var(--font-sans);
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 2001;
}

.close-lightbox:hover {
  color: var(--accent-gold);
}

.gallery-item:hover::after {
  opacity: 1;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 1px;
  background-color: var(--accent-gold);
}


/* About Section */
.bg-secondary {
  background-color: var(--bg-secondary);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.about-img {
  position: relative;
  height: 500px;
}

.about-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.1);
  border-radius: 4px;
  /* Slight softening */
}

/* Contact Section */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 15px;
  background: transparent;
  border: 1px solid #444;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  background: rgba(255, 255, 255, 0.02);
}

/* Footer */
footer {
  padding: 3rem 0;
  border-top: 1px solid #333;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 3rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .about-img {
    height: 350px;
  }

  .section-padding {
    padding: var(--spacing-lg) 0;
  }
}