:root {
  --bg-color: #0b0c0e;
  --text-color: #fce1e8; /* Soft pink from the reference image */
  --accent-color: #ffffff;
  --ice-color: #c9f5ff;
  --font-main: 'Anton', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-mono);
  overflow-x: hidden;
  transition: background-color 0.4s ease;
}

.noise {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 10; /* Lowered z-index so it stays behind the modal (z-index: 1000) */
  opacity: 0.05;
  background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* NAVIGATION */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 4rem;
  font-size: 0.8rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  mix-blend-mode: difference;
}

.nav-left p {
  max-width: 300px;
}

.nav-center {
  text-align: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.btn {
  border: 1px solid var(--text-color);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  text-decoration: none;
  color: var(--text-color);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-arrow {
  width: 1rem;
  height: 1rem;
  transition: transform 0.3s ease;
}

.btn:hover .icon-arrow {
  transform: translate(2px, -2px);
}

.btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.logo-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
  pointer-events: none; /* Disabled until video loads */
}

.logo-btn.ready {
  pointer-events: auto;
}

.logo-btn:hover {
  color: #ff0000;
  text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
}

.doom-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: #000;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.doom-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.doom-video {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Görüntü kaybı olmadan ekranı kapla */
  background: #000;
}

/* Glitch Animation */
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-10px, 10px); filter: hue-rotate(180deg) invert(1); }
  40% { transform: translate(10px, -10px); filter: scale(1.1); }
  60% { transform: translate(-10px, -5px); filter: hue-rotate(90deg); }
  80% { transform: translate(10px, 5px); filter: invert(0.5); }
  100% { transform: translate(0); }
}

.glitch-active {
  animation: glitch 0.1s infinite; /* 0.2s -> 0.1s (daha hızlı) */
  overflow: hidden;
}

.doom-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  z-index: 10001;
  text-shadow: 0 0 20px rgba(0,0,0,1);
  transition: transform 0.3s ease;
}

.doom-close:hover {
  transform: rotate(90deg) scale(1.2);
  color: #ff0000;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 10vh;
  position: relative;
}

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  margin-bottom: 2rem;
  opacity: 0.8;
}

.hero-title {
  font-family: var(--font-main);
  font-size: clamp(4rem, 10.5vw, 13rem);
  line-height: 0.95; /* 0.85'ten 0.95'e çıkarıldı, üst üste binmeyi engeller ama sıkı durur */
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 4rem;
  will-change: transform;
}

.hero-title .line {
  display: block;
  transition: transform 0.1s ease-out;
}

/* Visibility Control for Desktop vs Mobile */
.mobile-line {
  display: none !important;
}
.desktop-line {
  display: block !important;
}

@media (max-width: 768px) {
  .desktop-line {
    display: none !important;
  }
  .mobile-line {
    display: block !important;
    width: 100%;
  }
}

.hero-center-box {
  border: 1px solid rgba(252, 225, 232, 0.2);
  padding: 2rem;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
  background: rgba(0,0,0,0.5);
  transform: perspective(1000px) rotateX(15deg) rotateY(-10deg);
  transition: transform 0.5s ease;
}

.hero-center-box:hover {
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
}

.small-title {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.btn-large {
  border: 1px solid var(--text-color);
  padding: 1rem 3rem;
  border-radius: 50px;
  text-decoration: none;
  color: var(--text-color);
  font-weight: bold;
  text-transform: uppercase;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.btn-large:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.small-text {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* PROJECTS */
.projects {
  padding: 10rem 0;
  text-align: center;
}

.section-label {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  margin-bottom: 5rem;
  opacity: 0.8;
}

.project-list {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-item {
  position: relative;
  cursor: pointer;
  padding: 1rem 2rem;
  transition: transform 0.3s ease;
  width: 100%;
}

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

.project-item .num {
  position: absolute;
  top: 50%;
  left: 10%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  opacity: 0.5;
}

.project-item h2 {
  font-family: var(--font-main);
  font-size: clamp(3rem, 8vw, 10rem);
  line-height: 0.95; /* 0.85'ten 0.95'e çıkarıldı */
  text-transform: uppercase;
  margin: 0;
  transition: color 0.3s ease;
}

.project-item:hover h2 {
  color: var(--ice-color);
  text-shadow: 0 0 18px rgba(170, 235, 255, 0.28), 0 0 42px rgba(110, 205, 240, 0.12);
}

.contact-trigger {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  appearance: none;
  background: var(--bg-color);
}

/* FOOTER */
.footer {
  padding: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  margin-right: 2rem;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.5;
}

/* VIDEO MODAL */
.video-modal {
  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: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

.video-modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  position: relative;
  width: 95%; /* Increased from 90% */
  max-width: 1600px; /* Increased from 1400px */
  display: grid;
  grid-template-columns: 350px 1fr; /* Fixed info width, flexible large video */
  align-items: center;
  gap: 4rem;
  padding: 2rem;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.modal-info h3 {
  font-family: var(--font-main);
  font-size: 3rem;
  color: var(--text-color);
  line-height: 1;
}

.modal-info p {
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.8;
  max-width: 400px;
}

.modal-video-wrapper {
  width: 100%;
}

.modal-video {
  width: 100%;
  display: block;
  outline: none;
  box-shadow: 0 0 50px rgba(170, 235, 255, 0.15);
  border-radius: 5px;
}

/* CONTACT MODAL */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(5, 8, 10, 0.78);
  backdrop-filter: blur(14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.contact-modal.active {
  opacity: 1;
  pointer-events: all;
}

.contact-modal-content {
  position: relative;
  width: min(100%, 520px);
  padding: clamp(2rem, 6vw, 4rem);
  border: 1px solid rgba(201, 245, 255, 0.38);
  background: rgba(11, 18, 22, 0.92);
  box-shadow: 0 0 35px rgba(145, 225, 250, 0.12);
  transform: translateY(16px);
  transition: transform 0.3s ease;
}

.contact-modal.active .contact-modal-content {
  transform: translateY(0);
}

.contact-modal-kicker {
  color: var(--ice-color);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  margin-bottom: 1rem;
}

.contact-modal-content h2 {
  font-family: var(--font-main);
  color: var(--text-color);
  font-size: clamp(3rem, 10vw, 5rem);
  line-height: 0.9;
  margin-bottom: 1rem;
}

.contact-modal-intro {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.72;
  margin-bottom: 2rem;
}

.contact-modal-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  border: 0;
  background: transparent;
  color: var(--text-color);
  font: inherit;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.contact-modal-close:hover {
  color: var(--ice-color);
  transform: rotate(90deg);
}

.contact-links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid rgba(201, 245, 255, 0.18);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(201, 245, 255, 0.18);
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: color 0.2s ease, padding-left 0.2s ease, text-shadow 0.2s ease;
}

.contact-link:hover {
  padding-left: 0.5rem;
  color: var(--ice-color);
  text-shadow: 0 0 14px rgba(170, 235, 255, 0.35);
}

.contact-link-arrow {
  color: var(--ice-color);
}

.mobile-grid {
  display: none;
  width: 100%;
  height: 500px;
  position: relative;
  perspective: 1000px;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track-container {
  position: relative;
  width: 450px; /* Büyütüldü: 350px -> 450px */
  height: 100%;
  overflow: visible;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 120%; /* Biraz daha uzatıldı */
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(0) scale(0.5) translateZ(-500px);
  pointer-events: none;
  z-index: 0;
}

.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px; /* Kenar yuvarlatma artırıldı */
  border: 2px solid rgba(255,255,255,0.1);
}

/* Active Slide */
.carousel-item.active {
  opacity: 1;
  transform: translateX(0) scale(1.1) translateZ(0); /* Ana video biraz daha büyütüldü */
  z-index: 10;
  pointer-events: all;
}
.carousel-item.active video {
  border-color: var(--glow-color, #ff0000);
  box-shadow: 0 0 40px var(--glow-color, rgba(255,0,0,0.4));
}

/* Previous Slide */
.carousel-item.prev {
  opacity: 0.75; /* Daha görünür yapıldı */
  transform: translateX(-60%) scale(0.8) translateZ(-150px) rotateY(15deg); /* Daha da yakına getirildi: -85% -> -60% */
  z-index: 5;
}

/* Next Slide */
.carousel-item.next {
  opacity: 0.75; /* Daha görünür yapıldı */
  transform: translateX(60%) scale(0.8) translateZ(-150px) rotateY(-15deg); /* Daha da yakına getirildi: 85% -> 60% */
  z-index: 5;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--text-color);
  color: var(--text-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  font-size: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }


.modal-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-top: 1rem;
}

.modal-btn {
  background: none;
  border: 1px solid var(--text-color);
  color: var(--text-color);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.3s ease;
}

.modal-btn:hover {
  background: var(--text-color);
  color: var(--bg-color);
}

.modal-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  font-size: 2.5rem;
  cursor: pointer;
  color: #fff;
  transition: transform 0.3s ease;
  z-index: 1001;
}

.modal-close:hover {
  transform: rotate(90deg);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .modal-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    width: 95%;
  }
  .modal-info h3 {
    font-size: 2rem;
  }
  .modal-close {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 768px) {
  /* NAVIGATION */
  .nav {
    padding: 1.5rem 1rem;
    align-items: center;
  }
  .nav-left p {
    display: none; /* Mobilde yerden tasarruf için gizlendi */
  }
  .nav-right {
    gap: 1rem;
  }
  .btn {
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
  }
  
  /* HERO SECTION */
  .hero {
    padding-top: 15vh;
  }
  .hero-title {
    align-items: flex-start; /* Mobilde sola yasla */
    text-align: left;
    width: 100%;
    padding: 0 1rem;
    font-size: clamp(4rem, 20vw, 9rem); /* Fontu daha da büyüttüm */
    line-height: 1.05; /* 0.9'dan 1.05'e çıkarıldı, satır arası açıldı */
  }
  /* Her kelimeyi ayrı satıra zorla */
  .hero-title .line {
    width: 100%;
  }
  .hero-center-box {
    margin-top: 2rem;
    max-width: 90%;
  }

  /* PROJECTS */
  .projects {
    padding: 5rem 0;
  }
  .project-item {
    padding: 1rem;
    text-align: left;
  }
  .project-item h2 {
    font-size: clamp(2.5rem, 12vw, 4rem);
    padding-left: 10%;
  }
  .project-item .num {
    left: 2%;
    top: 20%;
    transform: none;
  }

  /* FOOTER */
  .footer {
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 2rem;
    text-align: center;
  }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  .footer-links a {
    margin-right: 0;
  }

  /* MODAL CAROUSEL FIXES */
  .mobile-grid {
    height: 400px;
  }
  .carousel-track-container {
    width: 200px; /* Mobilde ana videoyu küçült */
  }
  .carousel-item {
    height: 100%;
  }
  .carousel-btn {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  .carousel-btn.prev { left: -10px; }
  .carousel-btn.next { right: -10px; }
}
