/* ==========================================================================
   ⭐⭐⭐ GLOBAL CSS (TÜM SİTEDE ÇALIŞACAK ANA OMURGA) ⭐⭐⭐
   ========================================================================== */

/* --- 1. RENKLER VE TEMALAR --- */
:root {
    --bg-body: #050505;
    --bg-card: rgba(20, 20, 20, 0.6);
    --bg-card-hover: rgba(30, 30, 30, 0.8);
    --border-color: rgba(255, 255, 255, 0.1);
    --primary: #6366f1; /* İndigo */
    --secondary: #a855f7; /* Purple */
    --accent: #ec4899; /* Pink */
    --success: #10b981; /* Green */
    --text-main: #ededed;
    --text-muted: #a1a1aa;
    --spotlight-color: rgba(255, 255, 255, 0.1);
    --nav-glass: rgba(5, 5, 5, 0.7);
}

[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-card-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --primary: #4f46e5;
    --text-main: #0f172a;
    --text-muted: #475569;
    --spotlight-color: rgba(79, 70, 229, 0.1);
    --nav-glass: rgba(255, 255, 255, 0.8);
}

/* --- 2. SIFIRLAMA (RESET) VE TEMEL TİPOGRAFİ --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', sans-serif;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

img {
    width: 100%;
    display: block;
}

html {
    scroll-behavior: smooth;
}

/* --- 3. GENEL YERLEŞİM (LAYOUT) SINIFLARI --- */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
}

.section-header {
    margin-bottom: 60px;
}

    .section-header h2 {
        font-size: 3rem;
        margin-bottom: 10px;
    }

    .section-header p {
        font-size: 1.2rem;
        color: var(--text-muted);
    }

/* --- 4. HAREKETLİ ARKAPLAN (AURORA) --- */
/* Bu yapı tüm sayfalarda arkada hafifçe akması için globalde kalmalı */
.aurora-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.aurora-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.3;
    animation: floatBlob 20s infinite alternate;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: var(--secondary);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 40%;
    width: 500px;
    height: 500px;
    background: var(--accent);
    animation-delay: -10s;
    opacity: 0.15;
}

@keyframes floatBlob {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, -50px) scale(1.1);
    }
}

/* --- 5. MENÜ (NAVBAR) --- */
nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    z-index: 1000;
    border-radius: 100px;
    background: var(--nav-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 25px;
}

    .nav-links a {
        font-weight: 500;
        font-size: 0.9rem;
        color: var(--text-muted);
        transition: 0.3s;
    }

        .nav-links a:hover {
            color: var(--text-main);
        }

.nav-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.lang-switch {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-weight: 700;
    cursor: pointer;
}

    .lang-switch.active {
        color: var(--primary);
    }

/* --- 6. GLOBAL BİLEŞENLER (BUTONLAR, KARTLAR, FORMLAR) --- */
/* İkon Butonları (Menüde ve Footer'da kullanılır) */
.icon-btn {
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

    .icon-btn:hover {
        background: var(--bg-card-hover);
        border-color: var(--primary);
    }

/* Standart Butonlar (Tüm sayfalarda kullanılabilir) */
.btn {
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-body);
    border: none;
}

    .btn-primary:hover {
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(255,255,255,0.4);
    }

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

    .btn-outline:hover {
        border-color: var(--text-main);
        background: rgba(255,255,255,0.05);
    }

/* Spotlight Kart Yapısı (Blog listesinde vs. kullanılır) */
.spotlight-group {
    display: grid;
    gap: 20px;
}

.spotlight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

    .spotlight-card::before {
        content: "";
        position: absolute;
        height: 100%;
        width: 100%;
        left: 0;
        top: 0;
        background: radial-gradient(800px circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 40%);
        opacity: 0;
        transition: opacity 0.5s;
        pointer-events: none;
        z-index: 1;
    }

    .spotlight-card:hover::before {
        opacity: 1;
    }

    .spotlight-card:hover {
        border-color: var(--primary);
        transform: translateY(-3px);
    }

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Form Elemanları (İletişim ve Admin panelleri için) */
.form-group {
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}

    .form-input:focus {
        border-color: var(--primary);
        background: rgba(99, 102, 241, 0.05);
    }

/* Durum rozetleri (Örn: Yayında, Taslak vb.) */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* --- 7. YUKARI ÇIK (SCROLL TOP) BUTONU --- */
#scrollTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
    z-index: 99;
    border: none;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.4);
}

    #scrollTop.active {
        opacity: 1;
        pointer-events: all;
    }

    #scrollTop:hover {
        transform: translateY(-5px);
    }

/* --- 8. FOOTER (ALT BİLGİ) --- */
footer {
    border-top: 1px solid var(--border-color);
    padding: 50px 0;
    text-align: center;
    margin-top: 100px;
    color: var(--text-muted);
}

/* --- 9. GLOBAL MOBİL UYUMLULUK --- */
@media (max-width: 768px) {
    /* Mobilde üst menü linklerini gizler (Hamburger menüye geçer) */
    .nav-links {
        display: none;
    }
}
/* --- PERFORMANS OPTİMİZASYONU (V2 - Ultra Hafif) --- */
.modern-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}
.cert-item {
    content-visibility: auto;
    contain-intrinsic-size: 300px 400px;
    transform: translate3d(0, 0, 0);
}

    /* --- SERTİFİKA HOVER (View Certificate) EFEKTİ --- */
    .cert-item .card-content {
        position: relative;
        overflow: hidden;
        border-radius: 12px;
        background-color: #171717;
    }

    .cert-item img {
        transition: transform 0.4s ease;
        display: block;
        width: 100%;
        content-visibility: auto;
    }

    .cert-item:hover img {
        transform: scale(1.05);
    }

/* Üzerine gelince çıkacak karanlık tabaka */
.cert-overlay {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.85);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
    z-index: 10;
}

.cert-item:hover .cert-overlay {
    opacity: 1;
    visibility: visible;
}

.cert-overlay i {
    font-size: 2.5rem;
    color: #6366f1;
    transform: translateY(15px);
    transition: transform 0.3s ease-out;
}

.cert-overlay span {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    transform: translateY(15px);
    transition: transform 0.3s ease-out;
    transition-delay: 0.05s;
}

.cert-item:hover .cert-overlay i,
.cert-item:hover .cert-overlay span {
    transform: translateY(0);
}

.cert-info {
    position: relative;
    z-index: 11;
}

/* --- 10. ACCESSIBILITY & FOCUS MANAGEMENT --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 4px;
}

.skip-to-content {
    position: absolute;
    top: -100px;
    left: 20px;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 2000;
    transition: top 0.2s;
}

.skip-to-content:focus-visible,
.skip-to-content:focus {
    top: 20px;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* --- 11. COMMAND PALETTE (Cmd+K) --- */
.cmd-palette {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10vh;
}
.cmd-palette-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}
.cmd-palette-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: #09090b;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 100px rgba(99,102,241,0.15);
    overflow: hidden;
    color: white;
}
.cmd-palette-input-wrapper {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 12px;
}
.cmd-palette-search-icon {
    color: #52525b;
    font-size: 18px;
}
#cmdPaletteInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 16px;
    font-family: inherit;
}
.cmd-palette-input-wrapper kbd {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    color: #a1a1aa;
}
.cmd-palette-results {
    max-height: 350px;
    overflow-y: auto;
    padding: 8px;
}
.cmd-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    user-select: none;
    color: #a1a1aa;
}
.cmd-item:hover, .cmd-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: white;
}
.cmd-item i {
    width: 20px;
    color: #a1a1aa;
    font-size: 16px;
}
.cmd-item:hover i, .cmd-item.active i {
    color: #818cf8;
}
.cmd-item-kbd {
    margin-left: auto;
    font-size: 11px;
    color: #52525b;
}
.cmd-palette-footer {
    display: flex;
    padding: 12px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
    color: #52525b;
}
.cmd-palette-footer kbd {
    background: rgba(255,255,255,0.05);
    padding: 1px 4px;
    border-radius: 3px;
    margin: 0 2px;
}

/* ==========================================================================
   📱 MOBILE DRAWER & NAVIGATION
   ========================================================================== */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mobile-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    justify-content: flex-end;
    visibility: hidden;
    transition: visibility 0.4s;
}

.mobile-nav-drawer.open {
    visibility: visible;
}

.mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.mobile-nav-drawer.open .mobile-nav-backdrop {
    opacity: 1;
}

.mobile-nav-content {
    position: relative;
    width: 300px;
    height: 100%;
    background: var(--bg-body);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 30px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.mobile-nav-drawer.open .mobile-nav-content {
    transform: translateX(0);
}

html:not(.dark) .mobile-nav-content {
    background: #ffffff;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-menu-close:hover {
    color: var(--primary);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1;
}

.mobile-nav-links a {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--text-main);
}

.mobile-nav-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-nav-lang {
    display: flex;
    justify-content: center;
}

/* Make hamburger toggle animate into X when menu is open */
.mobile-menu-toggle.open .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.open .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsiveness overrides for navbar */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-lang-desktop,
    .nav-cv-desktop {
        display: none !important;
    }
    
    /* Responsive padding override for inline styled spotlight-cards (e.g. Account pages) */
    .spotlight-card[style*="padding: 40px"],
    .spotlight-card[style*="padding:40px"] {
        padding: 24px 16px !important;
    }
}