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

:root {
  --bg-color: #0a0a0a;
  --text-color: #ffffff;
  --accent-color: #4a90e2;
  --card-bg: #1a1a1a;
  --border-color: rgba(255, 255, 255, 0.1);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* =========================================
   HOME PAGE (SPLIT LAYOUT)
========================================= */
.split-layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.split-image {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, transparent, var(--bg-color));
  opacity: 0.5;
  pointer-events: none;
}

.split-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 5rem 10%;
  position: relative;
  z-index: 10;
}

.name-title {
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -1px;
  background: linear-gradient(90deg, #fff, #888);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fadeUp 1s ease forwards;
}

.portfolio-btn {
  display: inline-block;
  align-self: center;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text-color);
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50px;
  margin-bottom: 3rem;
  transition: var(--transition);
  animation: fadeUp 1s ease 0.2s forwards;
  opacity: 0;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.portfolio-btn:hover {
  transform: translateY(-5px);
  background-color: var(--text-color);
  color: var(--bg-color);
  box-shadow: 0 15px 25px rgba(255, 255, 255, 0.2);
}

.social-links {
  display: flex;
  justify-content: center;
  width: 100%;
  gap: 1.5rem;
  animation: fadeUp 1s ease 0.4s forwards;
  opacity: 0;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-color);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-btn:hover {
  transform: translateY(-5px) scale(1.05);
  background: var(--text-color);
  color: var(--bg-color);
}

/* =========================================
   PORTFOLIO PAGE
========================================= */
.portfolio-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  z-index: 50;
}

.back-btn {
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.back-btn:hover {
  opacity: 0.7;
}

.portfolio-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0;
  white-space: nowrap;
  display: block;
  z-index: 100;
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
}

.portfolio-hero {
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  /* Account for fixed header */
  background: var(--bg-color);
}

.hero-content {
  max-width: 800px;
  padding: 0 5%;
}

.hero-title {
  font-size: 4rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.7);
  min-height: 2.5rem;
}

.changing-text {
  display: inline-block;
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 1;
  transform: translateY(0);
}

.changing-text.fade-out {
  opacity: 0;
  transform: translateY(-20px);
}

.changing-text.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.portfolio-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
}

.portfolio-item {
  position: relative;
  border-radius: 0;
  /* Köşeli hatlar */
  overflow: hidden;
  cursor: pointer;

  /* Tam ekran */
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;

  background: var(--card-bg);
  border: none;
  /* Kenarlık yok */

  /* Remove scroll entry animation on the container, we will rely on inner animations */
  opacity: 1;
  transform: none;
}

.portfolio-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.portfolio-item:hover,
.portfolio-item.is-center {
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.parallax-wrap {
  position: absolute;
  top: -30vh;
  left: 0;
  width: 100%;
  height: 160vh;
  will-change: transform;
}

.portfolio-item img,
.portfolio-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-item:hover img,
.portfolio-item.is-center img,
.portfolio-item:hover video,
.portfolio-item.is-center video {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item.is-center .portfolio-overlay {
  opacity: 1;
}

.item-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  transform: translateY(20px);
  transition: var(--transition);
}

.portfolio-item:hover .item-title,
.portfolio-item.is-center .item-title {
  transform: translateY(0);
}

.item-category {
  font-size: 0.9rem;
  opacity: 0.7;
  transform: translateY(20px);
  transition: var(--transition);
  transition-delay: 0.1s;
}

.portfolio-item:hover .item-category,
.portfolio-item.is-center .item-category {
  transform: translateY(0);
}

/* =========================================
   MODAL (LIGHTBOX)
========================================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  backdrop-filter: blur(10px);
}

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

.modal-close {
  position: absolute;
  top: 2rem;
  right: 3rem;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  transition: var(--transition);
  z-index: 101;
}

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

.modal-content-container {
  width: 90%;
  max-width: 1200px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-media {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.modal-info {
  margin-top: 2rem;
  text-align: center;
}

.modal-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.modal-desc {
  font-size: 1.1rem;
  color: #aaa;
  max-width: 600px;
  margin: 0 auto;
}

/* =========================================
   ANIMATIONS
========================================= */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

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

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 900px) {
  .split-layout {
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
  }

  .split-image {
    min-height: 40vh;
  }

  .split-content {
    min-height: 60vh;
    padding: 2rem 5% 5rem;
    /* Reserve 5rem for footer at bottom */
    align-items: center;
    text-align: center;
    justify-content: center;
    gap: 1.5rem;
    /* Ensure spacing between items instead of huge padding */
  }

  .name-title {
    font-size: 3rem;
    margin-bottom: 0;
  }

  .portfolio-btn {
    margin-bottom: 0;
  }

  .hero-subtitle {
    min-height: 4.5rem; /* Prevents title from jumping when text wraps */
  }
}

/* =========================================
   FOOTER & SCROLL TO TOP
========================================= */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
  width: 100%;
  background: var(--bg-color);
  z-index: 50;
  position: relative;
}

.site-footer.absolute-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  background: transparent;
}

.footer-link {
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
}

.footer-link:hover {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: underline;
}

.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--text-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.scroll-to-top:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-5px);
}

/* =========================================
   MOBILE PORTFOLIO LAYOUT
========================================= */
@media (max-width: 768px) {
  .portfolio-item {
    height: 40vh;
  }

  .parallax-wrap {
    height: 90vh;
    top: -25vh;
  }

  .back-btn span {
    display: none;
  }
}

/* =========================================
   STYLE 2 (GRID)
========================================= */
body.grid-style-2 .portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  width: 100%;
}

body.grid-style-2 .portfolio-item {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
}

body.grid-style-2 .parallax-wrap {
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: none !important;
}

body.grid-style-2 .portfolio-item .portfolio-overlay {
  opacity: 0 !important;
}

body.grid-style-2 .portfolio-item:hover .portfolio-overlay {
  opacity: 1 !important;
}

body.grid-style-2 .portfolio-item .item-title,
body.grid-style-2 .portfolio-item .item-category {
  transform: translateY(20px) !important;
}

body.grid-style-2 .portfolio-item:hover .item-title,
body.grid-style-2 .portfolio-item:hover .item-category {
  transform: translateY(0) !important;
}

body.grid-style-2 .portfolio-item.is-center img,
body.grid-style-2 .portfolio-item.is-center video {
  transform: none;
}

body.grid-style-2 .portfolio-item:hover img,
body.grid-style-2 .portfolio-item:hover video {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  body.grid-style-2 .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  /* Touch support for Style 1 */
  .portfolio-item.touch-hovered .portfolio-overlay {
    opacity: 1;
  }
  .portfolio-item.touch-hovered .item-title,
  .portfolio-item.touch-hovered .item-category {
    transform: translateY(0);
  }
  .portfolio-item.touch-hovered img,
  .portfolio-item.touch-hovered video {
    transform: scale(1.05);
  }
  
  /* Touch support for Style 2 */
  body.grid-style-2 .portfolio-item.touch-hovered .portfolio-overlay {
    opacity: 1 !important;
  }
  body.grid-style-2 .portfolio-item.touch-hovered .item-title,
  body.grid-style-2 .portfolio-item.touch-hovered .item-category {
    transform: translateY(0) !important;
  }
}