@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Playfair Display', serif;
  background: #000;
  color: white;
  overflow-x: hidden;
}

/* ============ LOADER ============ */
#loader {
  position: fixed;
  inset: 0;
  background: black;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 4rem;
  font-weight: bold;
  z-index: 9999;
  transition: opacity 0.5s ease;
  animation: fadeInOut 2s ease-in-out forwards;
}

#loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: scale(0.95); }
  10% { opacity: 1; transform: scale(1); }
  90% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
  z-index: 2000;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: white;
}

.hamburger-wrapper {
  cursor: pointer;
  z-index: 2100;
}

.hamburger {
  width: 30px;
  height: 30px;
}

/* ============ MOBILE MENU ============ */
.mobile-menu {
  position: fixed;
  top: 60px;
  right: 0;
  width: 100%;
  max-width: 260px;
  background: rgba(0,0,0,0.95);
  height: calc(100vh - 60px);
  z-index: 999;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  padding: 2rem;
}
.mobile-menu.show {
  transform: translateX(0);
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
}
.mobile-menu li {
  margin: 1rem 0;
}
.mobile-menu a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* ============ HERO IMAGE ============ */
.hero-image {
  margin-top: 100px;
  display: flex;
  justify-content: center;
}
.hero-image img {
  width: 100%;
  max-width: 900px;
  max-height: 600px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 2rem;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
/* PORTFOLIO */
.custom-layout {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(4, 20vw);
  gap: 12px;
  width: 95vw;
  max-width: 1400px;
  margin: 6rem auto;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.photo1 { grid-column: 1 / 3; grid-row: 1 / 3; }
.photo2 { grid-column: 3 / 5; grid-row: 1 / 2; }
.photo3 { grid-column: 5 / 7; grid-row: 1 / 2; }
.photo4 { grid-column: 5 / 7; grid-row: 2 / 4; }
.photo5 { grid-column: 3 / 5; grid-row: 2 / 3; }
.photo6 { grid-column: 1 / 3; grid-row: 3 / 4; }
.photo7 { grid-column: 3 / 5; grid-row: 3 / 4; }
.photo8 { grid-column: 1 / 4; grid-row: 4 / 5; }

.work-item video {
  width: 340px;
  height: 480px;
  object-fit: cover;
  border-radius: 24px;
  position: relative;
  z-index: 2;
  box-shadow: 0 8px 48px #0008;
  display: block;
}
@media (max-width: 900px) {
  .work-item video {
    width: 98vw;
    max-width: 340px;
    height: 300px;
  }
}


/* Responsive */
@media (max-width: 900px) {
  .hero-image img { max-width: 98vw; }
  .custom-layout { display: flex; flex-direction: column; gap: 8px; padding: 0 1rem; }
  .photo img { height: auto; }
}
@media (max-width: 600px) {
  .navbar { padding: 0 0.5rem; }
  .logo { font-size: 1.2rem; }
  .scroll-btn { padding: 8px 16px; font-size: 0.9rem; }
}


/* ============ ANIMATIONS (Optional) ============ */
.puzzle {
  opacity: 0;
  transform: translateY(50px);
  animation: puzzleIn 1s ease forwards;
}

.puzzle.left {
  animation-name: slideLeft;
}

.puzzle.right {
  animation-name: slideRight;
}

@keyframes slideLeft {
  from { opacity: 0; transform: translateX(-80px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  from { opacity: 0; transform: translateX(80px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes puzzleIn {
  to { opacity: 1; transform: translateY(0); }
}
.background-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.01) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0; /* resimlerin arkasında */
  opacity: 0.3;
}


/* ============ BUTTON HOVER ============ */
button:hover {
  background: #ddd;
  color: #000;
  transition: 0.3s;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .grid-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-image img {
    max-height: 300px;
  }

  .grid-gallery {
    grid-template-columns: 1fr;
  }

  .grid-gallery img.large {
    grid-column: span 1;
    grid-row: span 1;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
    padding-top: 6rem;
  }

  .hero .image img {
    width: 100%;
    height: auto;
  }
}
