/* ==== Reset & base ==== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Roboto Flex", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  font-weight: 400;
  font-style: normal;
  font-variation-settings:
    "slnt" 0,
    "wdth" 100,
    "GRAD" 0,
    "XOPQ" 96,
    "XTRA" 468,
    "YOPQ" 79,
    "YTAS" 750,
    "YTDE" -203,
    "YTFI" 738,
    "YTLC" 514,
    "YTUC" 712;
  background: #ffffff;
  color: #111;
  overflow-x: hidden;   /* index için yatay kaydırma yok */
  overflow-y: hidden;   /* index için dikey kaydırma yok */
}

/* scroll olması gereken sayfalarda body class="scroll-page" kullanıyoruz */
body.scroll-page {
  overflow-y: auto;
}

/* ==== Genel layout ==== */

.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
}

/* ==== Sidebar ==== */

.sidebar {
  padding: 40px;
}

.site-title {
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 40px;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  display: inline-block;
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav li {
  margin-bottom: 12px;
}

.main-nav a {
  display: inline-block;
  padding: 2px 0;
  text-decoration: none;
  color: #111;
  font-size: 18px;
}

.main-nav a:hover {
  text-decoration: underline;
}

/* ===================== */
/* LAMP & DARK MODE TOGGLE */
/* ===================== */

/* Sağ üstte, tavandan sarkan lamba */
.lamp-toggle {
  position: fixed;
  top: -80px;           /* tavandan gelsin hissi */
  right: 80px;
  width: 500px;         /* daha büyük ve okunur */
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  z-index: 2000;
}

.lamp-toggle:focus {
  outline: none;
}

.lamp-base {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

/* Işık katmanı – light modda animasyonlu */
.lamp-light {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.2s ease-out;
}

/* Dark modda ışığı kapat */
body.dark-mode .lamp-light {
  opacity: 0;
}

/* ========= DARK MODE ========= */

body.dark-mode {
  background: #CFCFCF;
  color: #000000;
}

/* Sidebar ve ana menü linkleri */
body.dark-mode .site-title,
body.dark-mode .main-nav a {
  color: #000000;
}

/* Genel link rengi */
body.dark-mode a {
  color: #000000;
}

/* Intro ve metinler */
body.dark-mode .page-intro,
body.dark-mode .ist-text p,
body.dark-mode .ist-tags,
body.dark-mode .ist-project-meta {
  color: #000000;
}

/* Hero baloncuğu – artık arka planı istemiyoruz,
   o yüzden her iki modda da transparan olsun */
body.dark-mode .hero-text {
  background: transparent;
}

/* Proje link butonları */
body.dark-mode .ist-link-btn {
  border-color:  #000000;
  color: #000000;
  background: transparent;
}

body.dark-mode .ist-link-btn:hover {
  background: #000000;
  color: #CFCFCF;
}

/* ==== Hero sahnesi (ana sayfa sağ taraf) ==== */

.hero {
  position: relative;
  padding: 40px 40px 40px 40px;
}

.hero-scene {
  position: relative;
  width: 100%;
  min-height: 100vh; /* sağ taraf tam ekran yüksekliği */
}

/* Avatar: sağ alt köşeye yaslı ve büyük */
.hero-avatar {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(760px, 58vw);
  aspect-ratio: 4 / 3;
  overflow: visible;
}

/* Tüm katmanlar üst üste */
.avatar-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none; /* avatarın üstünden tıklama geçsin */
}

/* Gözler kapalı default görünmesin */
.avatar-eyes-closed {
  opacity: 0;
}

/* Dumanı biraz yukarı alalım */
.avatar-steam {
  transform: translateY(-4px);
}

/* Konuşma metni – artk kutu yok, sadece tipografi */
.hero-text {
  position: absolute;
  max-width: 380px;
  right: 520px;
  bottom: 430px;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.hero-greeting {
  font-size: 28px;
  margin: 0 0 8px;
}

.hero-subtitle {
  font-size: 14px;
  margin: 0;
}

/* ==== İçerik sayfaları için ortak stil ==== */

.page-content {
  padding: 40px 80px 40px 40px;
}

.page-title {
  font-size: 28px;
  margin: 0 0 24px;
}

/* ===================== */
/* GRAPHIC DESIGN SAYFASI */
/* ===================== */

.gd-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.gd-sidebar {
  padding: 40px;
}

.gd-sidebar h2 {
  font-size: 24px;
  margin: 0 0 24px;
}

.gd-subnav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gd-sidebar a {
  font-size: 14px;
}

/* Grid (kartlar) */

.gd-content {
  padding: 40px 80px 40px 40px;
}

.gd-grid {
  display: none; /* aktif olana kadar gizli */
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.gd-grid.active {
  display: grid;
}

.gd-card {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.gd-card img,
.gd-card video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.gd-card h3 {
  font-size: 14px;
  margin: 8px 0 0;
}

/* Graphic design lightbox */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  max-width: 80vw;
  max-height: 90vh;
}

.lightbox-media img,
.lightbox-media video {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
}

.lightbox-media iframe {
  width: 100%;
  max-width: 100%;
  height: 80vh;
  border: none;
  display: block;
  margin: 0 auto;
}

.lightbox-title {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  font-size: 14px;
}

/* Close & navigation butonları */

.lightbox-close,
.lightbox-nav {
  position: fixed;
  border: none;
  background: none;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  padding: 8px 12px;
}

.lightbox-close {
  top: 16px;
  right: 20px;
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

/* Bazı tarayıcılarda video üzerindeki default kontrolleri sakla */
.gd-card video::-webkit-media-controls,
.lightbox video::-webkit-media-controls {
  display: none !important;
}

/* ============================= */
/* INTERACTIVE STORYTELLING PAGE */
/* ============================= */

/* Bu layout'ta sol sidebar sticky, sağ taraf uzun uzun scroll eder */
.page.ist-layout {
  align-items: flex-start;
}

.ist-layout .sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

/* Sağ kolon tipografi / spacing */
.ist-page {
  padding: 40px 80px 40px 40px;
}

.ist-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.page-intro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #444;
}

/* Proje blokları */

.ist-project {
  max-width: 960px;
  margin-bottom: 64px;
  border-top: 1px solid #eee;
  padding-top: 32px;
}

.ist-project-header {
  margin-bottom: 20px;
}

.ist-project-title {
  font-size: 22px;
  margin: 0 0 4px;
}

.ist-project-meta {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* Media + metin yan yana layout */

.ist-project-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 24px;
}

/* Media */

.ist-media img,
.ist-media video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Metinler */

.ist-text p {
  font-size: 14px;
  line-height: 1.7;
  margin: 0 0 10px;
}

.ist-tags {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  font-size: 13px;
  color: #555;
}

/* Figma embed görünümü */
.ist-figma-embed {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Proje link butonları */

.ist-links {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ist-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #111;
  text-decoration: none;
  color: #111;
  background: #fff;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.ist-link-btn:hover {
  background: #111;
  color: #fff;
}

.ist-link-btn--secondary {
  border-color: #666;
}

/* Küçük ekranlarda stack et */

@media (max-width: 900px) {
  .page,
  .gd-page {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .gd-sidebar {
    padding: 24px;
  }

  .gd-content {
    padding: 24px;
  }

  .hero {
    padding: 24px;
  }

  .hero-scene {
    min-height: 70vh;
  }

  /* Mobilde avatar + metin üst üste gelsin */
  .hero-avatar {
    position: static;
    width: 100%;
    max-width: 420px;
    margin: 40px auto 0;
  }

  .hero-text {
    position: static;
    max-width: 100%;
    margin-top: 24px;
    background: transparent;
    padding: 0;
  }

  .ist-project-body {
    grid-template-columns: 1fr;
  }

  .ist-layout .sidebar {
    position: static;
    height: auto;
  }

  .ist-page {
    padding: 24px;
  }
}
/* ========== CUSTOM CURSOR ========== */
body {
  cursor: url("/img/cursor_default.png") 0 0, auto;
}

/* Hover – tüm linkler ve butonlar */
a:hover,
button:hover,
.gd-card:hover,
.ist-link-btn:hover {
  cursor: url("/img/cursor_hover.png") 0 0, auto;
}

/* Click (active) */
a:active,
button:active,
.gd-card:active,
.ist-link-btn:active {
  cursor: url("/img/cursor_click.png") 0 0, auto;
}
body.blackout-mode {
  background: #000000;
  color: #000000;
}

/* ========== BLACKOUT OVERLAY ========== */

#blackout-overlay {
  position: fixed;
  inset: 0;                     /* top:0; right:0; bottom:0; left:0 */
  display: none;                /* sadece blackout-mode'da açılsın */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: #000000;
  color: #ffffff;
  z-index: 100;
  font-size: 18px;
  line-height: 1.6;
}

/* Blackout modda overlay görünsün */
body.blackout-mode #blackout-overlay {
  display: flex;
}

/* Blackout modda index içeriğini şeffaf yap */
body.blackout-mode .page {
  opacity: 0;
  pointer-events: none;   /* hiçbir şey tıklanmasın */
}

/* ============================= */
/* PIXEL ART PAGE                */
/* ============================= */

.page.pa-layout {
  align-items: flex-start;
}

.pa-layout .sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.pa-page {
  padding: 40px 80px 40px 40px;
}

.pa-header {
  max-width: 720px;
  margin-bottom: 40px;
}

.pa-section {
  max-width: 960px;
  margin-bottom: 56px;
  border-top: 1px solid #eee;
  padding-top: 32px;
}

.pa-section-header {
  margin-bottom: 20px;
}

.pa-section-title {
  font-size: 22px;
  margin: 0 0 4px;
}

.pa-section-meta {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* Grid – karakterler ve asset kartları */
.pa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

/* Küçük assetler için biraz daha sık grid */
.pa-grid.pa-grid--small {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.pa-card {
  border-radius: 8px;
  padding: 0;
  background: none;
}

.pa-card img,
.pa-card video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  image-rendering: pixelated; /* piksel art net kalsın */
}

.pa-card-title {
  font-size: 14px;
  margin: 8px 0 4px;
}

.pa-card-text {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 6px;
  color: #444;
}

.pa-taglist {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  font-size: 12px;
  color: #666;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.pa-taglist li::before {
  content: "• ";
}
