/* =========================================================
   Hero arka plan:
   - Masaüstü (≥1025px): hero-bg-cover.png
   - Mobil (≤1024px):    hero-bg-cover-mobile.png
   Bölümler: sections-bg.png
   ========================================================= */

body.theme-bg-custom {
  background: #0e241c;
}

body.theme-bg-custom.theme-v2::before {
  opacity: 0.01;
}

/* ── HERO — arka plan görseli, metin üzerinde ── */
body.theme-bg-custom #hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow-x: hidden;
  overflow-y: visible;
  background-color: #0a1f18 !important;
  background-image: url('../img/hero-bg-cover.png') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
}

/* theme-tasavvuf / style.css gradyanlarını geçersiz kıl */
body.theme-bg-custom.theme-tasavvuf #hero,
body.theme-tasavvuf.theme-bg-custom #hero {
  background: #0a1f18 url('../img/hero-bg-cover.png') center center / cover no-repeat scroll !important;
}

/* Hafif aydınlatma — koyu metin için görsel net kalsın */
body.theme-bg-custom #hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    rgba(255, 252, 245, 0.42) 0%,
    rgba(255, 252, 245, 0.22) 35%,
    rgba(255, 255, 255, 0.08) 60%,
    transparent 100%
  );
}

body.theme-bg-custom .hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: none !important;
  margin: 0;
  padding: calc(var(--nav-h-desktop, 4.25rem) + 1.5rem) clamp(1.25rem, 4vw, 4.5rem) 2.5rem;
  display: block !important;
  grid-template-columns: none !important;
  min-height: auto;
  height: auto !important;
}

body.theme-bg-custom .hero-inner > .hero-content {
  max-width: min(720px, 100%);
  width: 100%;
  padding: 0 !important;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(0.45rem, 1.2vh, 1rem);
  background: transparent !important;
  overflow: visible !important;
  position: relative;
  z-index: 2;
}

/* Eski portre paneli kaldırıldı */
body.theme-bg-custom .hero-portrait-panel,
.hero-portrait-panel {
  display: none !important;
}

body.theme-bg-custom .hero-visual,
body.theme-bg-custom .hero-visual--hidden {
  display: none !important;
}

body.theme-bg-custom #hero .hero-sema,
body.theme-bg-custom #hero .hero-ornament,
body.theme-bg-custom #hero .pattern-bg {
  display: none !important;
}

/* ── Kadife parlak siyah tipografi ── */
body.theme-bg-custom #hero .hero-badge,
body.theme-bg-custom #hero .hero-name,
body.theme-bg-custom #hero .hero-name span,
body.theme-bg-custom #hero .hero-name-accent,
body.theme-bg-custom #hero .hero-title,
body.theme-bg-custom #hero .hero-title span,
body.theme-bg-custom #hero .hero-university span,
body.theme-bg-custom #hero .hero-stat-num,
body.theme-bg-custom #hero .hero-stat-label,
body.theme-bg-custom #hero .hero-verse-text,
body.theme-bg-custom #hero .hero-verse-source,
body.theme-bg-custom #hero .hero-actions .btn span {
  color: #0a0a0c;
  background-image: linear-gradient(
    168deg,
    #4a4a52 0%,
    #1e1e24 12%,
    #050506 38%,
    #0c0c10 62%,
    #2e2e36 88%,
    #121218 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: none;
}

body.theme-bg-custom #hero .hero-badge {
  background: rgba(255, 255, 255, 0.38);
  border-color: rgba(10, 10, 12, 0.18);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.theme-bg-custom #hero .hero-badge::before {
  color: #1a1a1e;
}

body.theme-bg-custom #hero .hero-badge-dot {
  background: linear-gradient(145deg, #3a3a42, #0a0a0c);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.25);
}

body.theme-bg-custom #hero .hero-university-icon {
  fill: #141418;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.35));
}

body.theme-bg-custom #hero .hero-stat {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(10, 10, 12, 0.12);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.theme-bg-custom #hero .hero-verse {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left-color: rgba(10, 10, 12, 0.35);
}

/* Butonlar — kadife siyah yazı */
body.theme-bg-custom #hero .hero-actions .btn-primary {
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(240, 238, 232, 0.85));
  border: 1px solid rgba(10, 10, 12, 0.15);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-bg-custom #hero .hero-actions .btn-primary:hover {
  background: linear-gradient(165deg, #fff, rgba(245, 243, 238, 0.95));
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body.theme-bg-custom #hero .hero-actions .btn-outline {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(10, 10, 12, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.theme-bg-custom #hero .hero-actions .btn-outline:hover {
  background: rgba(255, 255, 255, 0.42);
  border-color: rgba(10, 10, 12, 0.65);
}

body.theme-bg-custom #hero .hero-actions .btn svg {
  fill: #0a0a0c;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.3));
}

/* Altın / beyaz tema renklerini geçersiz kıl */
body.theme-tasavvuf.theme-bg-custom #hero .hero-name,
body.theme-tasavvuf.theme-bg-custom #hero .hero-name span,
body.theme-tasavvuf.theme-bg-custom #hero .hero-name-accent,
body.theme-tasavvuf.theme-bg-custom #hero .hero-stat-num,
body.theme-tasavvuf.theme-bg-custom #hero .hero-verse-text,
body.theme-tasavvuf.theme-bg-custom #hero .hero-verse-source {
  color: #0a0a0c !important;
  -webkit-text-fill-color: transparent !important;
}

@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  body.theme-bg-custom #hero .hero-badge,
  body.theme-bg-custom #hero .hero-name,
  body.theme-bg-custom #hero .hero-name span,
  body.theme-bg-custom #hero .hero-name-accent,
  body.theme-bg-custom #hero .hero-title,
  body.theme-bg-custom #hero .hero-title span,
  body.theme-bg-custom #hero .hero-university span,
  body.theme-bg-custom #hero .hero-stat-num,
  body.theme-bg-custom #hero .hero-stat-label,
  body.theme-bg-custom #hero .hero-verse-text,
  body.theme-bg-custom #hero .hero-verse-source,
  body.theme-bg-custom #hero .hero-actions .btn span {
    color: #0c0c0e !important;
    -webkit-text-fill-color: #0c0c0e !important;
    background-image: none;
    text-shadow:
      0 1px 0 rgba(255, 255, 255, 0.28),
      0 2px 3px rgba(0, 0, 0, 0.35);
  }
}

body.theme-bg-custom #hero .profiles-label {
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

body.theme-bg-custom #hero .profile-card {
  background: rgba(10, 31, 24, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: rgba(201, 162, 39, 0.35);
}

body.theme-bg-custom #hero .profile-card:hover {
  background: rgba(10, 31, 24, 0.72);
  border-color: rgba(201, 162, 39, 0.6);
}

body.theme-bg-custom #hero .profile-card-name,
body.theme-bg-custom #hero .profile-card-desc {
  color: rgba(255, 255, 255, 0.95);
}

body.theme-bg-custom #hero .hero-scroll-hint {
  position: absolute;
  bottom: clamp(1rem, 3vh, 1.75rem);
  left: clamp(1.25rem, 4vw, 4.5rem);
  z-index: 3;
  margin-top: 0;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
}

/* ═══════════════════════════════════════════════════
   MOBİL (≤1024px) — portre görsel üstte, içerik altta
   Görsel: 1086×1448 (dikey format)
   ═══════════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* Hero — flex sütun, arka plan rengi */
  body.theme-bg-custom #hero,
  body.theme-bg-custom.theme-tasavvuf #hero,
  body.theme-tasavvuf.theme-bg-custom #hero {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    min-height: 100svh !important;
    padding: 0 !important;
    background: #ece6d8 none !important;
  }

  /* Üst: portre bant (nav altında, dikey oranla) */
  body.theme-bg-custom #hero::before {
    content: '';
    display: block;
    flex: 0 0 auto;
    width: 100%;
    /* Dikey resim: en/boy = 1086/1448 ≈ 0.75 — mobil genişlikte güzel oran */
    height: clamp(260px, 58svh, 480px);
    margin-top: var(--nav-h-mobile, 6.75rem);
    background: url('../img/hero-bg-cover-mobile.png') center 15% / cover no-repeat;
    border-bottom: 3px solid rgba(201, 162, 39, 0.35);
  }

  /* Üst katman (hafif aydınlatma) — mobilde kapalı */
  body.theme-bg-custom #hero::after {
    display: none !important;
    content: none !important;
  }

  /* Alt: içerik bölümü */
  body.theme-bg-custom .hero-inner {
    flex: 1 0 auto !important;
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    min-height: auto !important;
    height: auto !important;
    padding: 1.5rem 1.25rem 2.5rem !important;
    margin: 0 !important;
    background: transparent !important;
  }

  body.theme-bg-custom .hero-inner > .hero-content {
    max-width: 100% !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Scroll hint — içerik içinde, statik */
  body.theme-bg-custom #hero .hero-scroll-hint {
    position: static !important;
    align-self: center;
    margin: 0.75rem 0 0;
    left: auto;
    bottom: auto;
  }

  body.theme-bg-custom #hero .profile-cards {
    grid-template-columns: 1fr;
  }

  /* Mobilde metin renkleri: temiz koyu */
  body.theme-bg-custom #hero .hero-badge,
  body.theme-bg-custom #hero .hero-name,
  body.theme-bg-custom #hero .hero-name span,
  body.theme-bg-custom #hero .hero-name-accent,
  body.theme-bg-custom #hero .hero-title,
  body.theme-bg-custom #hero .hero-title span,
  body.theme-bg-custom #hero .hero-university span,
  body.theme-bg-custom #hero .hero-stat-num,
  body.theme-bg-custom #hero .hero-stat-label,
  body.theme-bg-custom #hero .hero-verse-text,
  body.theme-bg-custom #hero .hero-verse-source,
  body.theme-bg-custom #hero .hero-actions .btn span {
    color: #0a0a0c;
    background-image: linear-gradient(168deg, #4a4a52 0%, #1e1e24 12%, #050506 38%, #0c0c10 62%, #2e2e36 88%, #121218 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
  }

  body.theme-bg-custom #hero .hero-badge {
    background: rgba(255, 255, 255, 0.55);
    border-color: rgba(10, 10, 12, 0.15);
  }

  body.theme-bg-custom #hero .hero-stat {
    background: rgba(255, 255, 255, 0.55);
  }

  body.theme-bg-custom #hero .hero-verse {
    background: rgba(255, 255, 255, 0.5);
    border-left-color: rgba(10, 10, 12, 0.3);
  }

  body.theme-bg-custom #hero .profiles-label {
    text-shadow: none;
  }

  body.theme-bg-custom #hero .profile-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(10, 10, 12, 0.12);
  }

  body.theme-bg-custom #hero .profile-card-name,
  body.theme-bg-custom #hero .profile-card-desc {
    color: #1a1a22;
  }
}

/* Masaüstü — giriş görseli (20_41_31), metin üzerinde */
@media (min-width: 1025px) {
  body.theme-bg-custom #hero::before {
    display: none;
    content: none;
  }

  body.theme-bg-custom #hero {
    background-image: url('../img/hero-bg-cover.png') !important;
    background-position: center center !important;
  }

  body.theme-bg-custom.theme-tasavvuf #hero,
  body.theme-tasavvuf.theme-bg-custom #hero {
    background: #0a1f18 url('../img/hero-bg-cover.png') center center / cover no-repeat scroll !important;
  }

  body.theme-bg-custom #hero::after {
    display: block;
  }
}

@media (max-width: 600px) {
  body.theme-bg-custom #hero .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  body.theme-bg-custom #hero .hero-verse {
    display: block;
  }
}

/* ================================================================
   BÖLÜMLER ARKA PLANI
   ================================================================ */

body.theme-bg-custom.theme-v2 #about,
body.theme-bg-custom.theme-v2 #career,
body.theme-bg-custom.theme-v2 #expertise,
body.theme-bg-custom.theme-v2 #publications,
body.theme-bg-custom.theme-v2 #projects,
body.theme-bg-custom.theme-v2 #courses,
body.theme-bg-custom.theme-v2 #contact {
  position: relative;
  background-color: #f8f4eb;
  background-image:
    linear-gradient(rgba(248, 244, 235, 0.32), rgba(248, 244, 235, 0.32)),
    url('../img/sections-bg.png') !important;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

body.theme-bg-custom.theme-v2 #career,
body.theme-bg-custom.theme-v2 #publications,
body.theme-bg-custom.theme-v2 #courses {
  background-image:
    linear-gradient(rgba(240, 232, 216, 0.30), rgba(240, 232, 216, 0.30)),
    url('../img/sections-bg.png') !important;
}

body.theme-bg-custom.theme-v2 #expertise {
  background-image:
    linear-gradient(rgba(232, 222, 200, 0.28), rgba(232, 222, 200, 0.28)),
    url('../img/sections-bg.png') !important;
}

body.theme-bg-custom #wisdom {
  background: linear-gradient(
    90deg,
    rgba(10, 31, 24, 0.88) 0%,
    rgba(30, 77, 58, 0.82) 50%,
    rgba(10, 31, 24, 0.88) 100%
  );
}

body.theme-bg-custom footer {
  background: linear-gradient(180deg, #0f2e24 0%, #0a1a12 100%);
}

body.theme-bg-custom .info-card,
body.theme-bg-custom .expertise-card,
body.theme-bg-custom .project-card,
body.theme-bg-custom .course-card,
body.theme-bg-custom .timeline-item,
body.theme-bg-custom .pub-item,
body.theme-bg-custom .highlight-item {
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 24px rgba(15, 46, 36, 0.16);
}

body.theme-bg-custom .quote-block {
  background: rgba(255, 255, 255, 0.9);
}

body.theme-bg-custom.theme-dark #about,
body.theme-bg-custom.theme-dark #career,
body.theme-bg-custom.theme-dark #expertise,
body.theme-bg-custom.theme-dark #publications,
body.theme-bg-custom.theme-dark #projects,
body.theme-bg-custom.theme-dark #courses,
body.theme-bg-custom.theme-dark #contact {
  background-image:
    linear-gradient(rgba(10, 22, 17, 0.55), rgba(10, 22, 17, 0.55)),
    url('../img/sections-bg.png');
}

@media (max-width: 1024px) {
  body.theme-bg-custom.theme-v2 #about,
  body.theme-bg-custom.theme-v2 #career,
  body.theme-bg-custom.theme-v2 #expertise,
  body.theme-bg-custom.theme-v2 #publications,
  body.theme-bg-custom.theme-v2 #projects,
  body.theme-bg-custom.theme-v2 #courses,
  body.theme-bg-custom.theme-v2 #contact {
    background-attachment: scroll;
  }
}

@media print {
  body.theme-bg-custom #hero {
    background: #fff !important;
    min-height: auto;
  }
  body.theme-bg-custom #hero::after {
    display: none;
  }
}
