/* ============================================================
   1. DEĞİŞKENLER VE TEMEL AYARLAR
   ============================================================ */
:root {
    --bg-color: #0d1117;
    --text-main: #c9d1d9;
    --text-muted: #8b949e;
    --accent: #58a6ff;
    --border: #30363d;
    --code-bg: #161b22;
    --success: #238636;
}

* { box-sizing: border-box; }

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Sağa sola kaymayı bitiren mühür */
    -webkit-overflow-scrolling: touch;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    margin: 0;
    padding: 0;
    display: block; 
    width: 100%;
}

/* ============================================================
   2. KONTEYNER (800PX DİSİPLİNİ)
   ============================================================ */
.container { 
    max-width: 1200px !important;
    width: 90% !important; /* Masaüstünde yanlarda o istediğin %10'luk boşluğu zorla bırakır */
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 60px 0; 
    display: block !important; /* Flexbox'ın yayma hatasını her tarayıcıda engeller */
    float: none !important;
}

/* ============================================================
   3. HERO VE GENİŞ KARTLAR
   ============================================================ */
.hero-panel-section, .hybrid-lab-section, .masterpiece-section { width: 100%; margin-bottom: 50px; }

.hero-card-main {
    position: relative; min-height: 380px; border-radius: 20px; 
    background: #000; overflow: hidden; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
}

.hero-image-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('../img/desktop/hero_main.webp') center/cover no-repeat; 
    z-index: 1; filter: brightness(0.4);
}

.hero-body-content { position: relative; z-index: 2; padding: 30px; text-align: center; width: 100%; }

.hero-main-title {
    font-family: 'JetBrains Mono', monospace; font-weight: 800; 
    color: #fff; font-size: 2.2rem; margin: 0;
}

.hero-tech-subtitle { color: #ffffff; opacity: 0.9; }

/* ============================================================
   4. MANİFESTO VE LABORATUVAR GÜNLÜĞÜ
   ============================================================ */
.manifesto-wrapper { 
    margin: 40px 0 60px; padding: 25px; 
    border-left: 4px solid var(--accent); 
    background: rgba(22, 27, 34, 0.5); 
    border-radius: 0 8px 8px 0; 
}

.deney-entry { 
    margin-bottom: 30px; padding: 20px; border-bottom: 1px solid var(--border);
}

.deney-header { cursor: pointer; display: flex; justify-content: space-between; align-items: center; }

.deney-detay { display: none; padding-top: 20px; color: var(--text-main); }
.deney-detay.aktif { display: block; animation: fadeIn 0.3s ease; }

.toggle-icon { color: var(--text-muted); font-size: 1.5rem; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   5. PROJE KARTLARI VE BUTONLAR
   ============================================================ */
.project-card { 
    background: var(--code-bg); border: 1px solid var(--border); 
    border-radius: 12px; padding: 24px; margin-bottom: 20px; 
    display: flex; gap: 20px; transition: all 0.2s; 
}

.live-btn { 
    background: var(--success); color: #fff !important; 
    padding: 6px 14px; border-radius: 6px; font-size: 0.8rem; 
    font-weight: 600; text-decoration: none; display: inline-block; 
}

.github-btn { color: var(--accent); font-size: 0.85rem; font-family: 'JetBrains Mono', monospace; }

/* ============================================================
   6. VİDEO KONTEYNERİ
   ============================================================ */
.video-wrapper {
    width: 100%;
    max-width: 700px;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.deney-video {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   7. FOOTER TASARIMI
   ============================================================ */
.site-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 40px 0; margin-top: 60px;
    text-align: center; background: rgba(13, 17, 23, 0.8);
    width: 100%;
}

.footer-brand { font-family: 'JetBrains Mono', monospace; font-size: 1.2rem; margin-bottom: 15px; }
.brand-terminal { color: var(--text-muted); }
.footer-contact { margin-bottom: 20px; }
.contact-link {
    color: var(--accent); text-decoration: none; font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem; border: 1px solid rgba(88, 166, 255, 0.2);
    padding: 8px 15px; border-radius: 5px; transition: 0.3s;
}
.contact-link:hover { background: rgba(88, 166, 255, 0.1); border-color: var(--accent); }
.footer-nav { margin-bottom: 15px; color: var(--text-muted); font-size: 0.9rem; }
.footer-link, .text-muted { color: #a1a1a1 !important; }
.footer-link:hover { color: #fff; }
.divider { margin: 0 10px; opacity: 0.3; }
.footer-signature {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3); margin-top: 20px;
}

/* ============================================================
   8. MOBİL VE TARAYICI SPESİFİK ÇÖZÜMLER (EN SONDA OLMALI)
   ============================================================ */
@media (max-width: 768px) {
    .container { 
        width: 100% !important; 
        max-width: 100% !important; 
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}
    .hero-main-title { font-size: 1.4rem !important; }
    .hero-card-main { min-height: 250px !important; }
    .project-card { flex-direction: column; text-align: center; gap: 15px; }
    .deney-title { font-size: 1.1rem; }
    .video-wrapper { max-width: 100%; margin: 15px 0; }
    
    /* Kartların mobilde dışarı taşmasını engeller */
    .card, .project-card, .hero-card-main, .hybrid-lab-section, .masterpiece-section {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* --- TARAYICI MÜHÜRLERİ --- */

/* Edge Mobil Fix */
.browser-edge .container {
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Firefox Mobil Fix - Cerrah Müdahalesi */
/* --- FIREFOX MOBİL KESİN ÇÖZÜM --- */
/* Firefox Masaüstü ve Mobil için Ekstra Yayılma Koruması */
/* Firefox Masaüstü Yayılma Koruması */
/* ============================================================
   FIREFOX VE MOBİL DİSİPLİN MÜHÜRÜ (TEK PARÇA)
   ============================================================ */

/* 1. FIREFOX MASAÜSTÜ: Sadece bilgisayarda çalışır */
@media (min-width: 769px) {
    .browser-firefox .container, 
    @-moz-document url-prefix() { .container } {
        width: 1200px !important;
        max-width: 90vw !important; /* Yanlarda boşluk kalmasını zorlar */
        margin: 0 auto !important;
        display: block !important;
    }
}

/* 2. FIREFOX MOBİL: Sadece telefonlarda çalışır */
@media (max-width: 768px) {
    .browser-firefox .container {
        width: 100% !important;
        max-width: 100vw !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        margin: 0 !important;
        display: block !important;
        overflow-x: hidden !important;
    }

    /* Genel Mobil Koruma (Tüm Tarayıcılar) */
    * { 
        max-width: 100vw !important; 
        box-sizing: border-box !important; 
    }
    
    .container { 
        padding: 40px 15px !important; 
        width: 100% !important;
    }

    /* Mobilde kutuların dışarı taşmasını engelleyen son kilit */
    .hero-card-main, .project-card, .hybrid-lab-section, .masterpiece-section {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}