/* Siber Güvenlik Blogu - Mr. Robot Teması CSS */
@import url('https://fonts.googleapis.com/css2?family=Courier+Prime:ital,wght@0,400;0,700;1,400&family=Share+Tech+Mono&family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #0b0b0b; /* Very dark grey, almost black */
    --bg-secondary: #000000;
    --bg-card: #111111; /* Slightly lighter card background */
    --text-primary: #ffffff; /* White text for contrast */
    --text-secondary: #aaaaaa; /* Greys for secondary text */
    --accent-color: #E21B1B; /* Mr Robot signature blood red */
    --accent-hover: #b81414;
    --border-color: #222222;
    --success: #E21B1B;
    --terminal-green: #E21B1B; /* We'll use red instead of green for tech accents now */
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    /* Completely hacker monospace font as requested */
    font-family: 'Share Tech Mono', 'Courier New', Courier, monospace;
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 80px; /* Fixed footer yüzünden altta kalmaması için boşluk */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px var(--accent-color);
}

/* Glitch Efekti İçin Animasyon (Kırmızı/Beyaz tonlara uygun) */
@keyframes glitch {
    0% { text-shadow: 2px 0 var(--accent-color), -2px 0 #ffffff; }
    25% { text-shadow: -2px 0 var(--accent-color), 2px 0 #ffffff; }
    50% { text-shadow: 2px 0 var(--accent-color), 2px 0 #ffffff; }
    75% { text-shadow: -2px 0 var(--accent-color), -2px 0 #ffffff; }
    100% { text-shadow: 2px 0 var(--accent-color), -2px 0 #ffffff; }
}

/* Header & Nav */
header {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--accent-color); /* Thicker red line */
    padding: 20px 0;
    height: 90px; /* Fixed height for consistency */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(226, 27, 27, 0.15); /* Red inner glow */
    box-sizing: border-box;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-inner {
    display: flex;
    justify-content: center; /* Center everything together */
    align-items: center;
    gap: 40px; /* Space between logo and nav links */
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    letter-spacing: 1px;
    /* Removed margin-left to allow proper centering */
}

.logo:hover { 
    text-decoration: none; 
    color: white; 
}

.logo img {
    height: 25px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen;
    filter: drop-shadow(0 0 6px rgba(226, 27, 27, 0.3));
    transition: filter 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 0 12px rgba(226, 27, 27, 0.6));
}

.logo i {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 15px;
    list-style: none;
    align-items: center; /* Align items vertically */
    transition: all 0.3s ease; /* Mobilde açılırken yumuşak geçiş için */
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.3s;
    background: transparent;
    white-space: nowrap; /* Prevent words like Ağ Güvenliği from breaking into two lines */
}

.nav-links a:hover {
    color: #ffffff;
    border-color: var(--accent-color);
    background: rgba(226, 27, 27, 0.1); 
    text-shadow: none;
}

.nav-links a.nav-admin-link {
    color: #ffffff;
    border-color: var(--accent-color);
    background: rgba(226, 27, 27, 0.14);
    font-family: 'Share Tech Mono', 'Courier New', Courier, monospace;
    letter-spacing: 1px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 0 rgba(226, 27, 27, 0);
}

.nav-links a.nav-admin-link:hover {
    color: #ffffff;
    background: rgba(226, 27, 27, 0.22);
    box-shadow: 0 0 14px rgba(226, 27, 27, 0.25);
    text-shadow: none;
}

/* --- Mobil Menü Butonu (Hamburger) --- */
.menu-toggle {
    display: none;
    color: var(--accent-color);
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    background: rgba(226, 27, 27, 0.05);
}

.menu-toggle:hover {
    background: rgba(226, 27, 27, 0.15);
}

/* Home / Grid Layout */
.page-title {
    margin: 40px 0 20px;
    font-size: 32px;
    font-weight: 700;
    color: white;
}

.page-desc {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 40px;
}

.articles-grid {
    display: grid;
    /* Kartların aşırı genişlemesini önlemek için */
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.article-card {
    background-color: #050505;
    border: 1px solid #222;
    border-top: 4px solid var(--accent-color);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.article-card::before {
    /* Tech Grid Arka Plan Efekti */
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    background: linear-gradient(rgba(226,27,27,0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(226,27,27,0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 1;
    opacity: 0.6;
}

.article-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(226, 27, 27, 0.2), 0 0 15px rgba(226, 27, 27, 0.1) inset;
    border-color: #440000;
}

.card-img {
    height: 200px;
    background-color: #0b0b0b;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid #333;
    position: relative;
    filter: grayscale(80%) contrast(120%);
    transition: all 0.5s;
    z-index: 2;
}

.article-card:hover .card-img {
    filter: grayscale(0%) contrast(100%);
}

.card-img::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, transparent, #050505 95%);
    pointer-events: none;
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    z-index: 2;
    position: relative;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-weight: bold;
    letter-spacing: 1px;
}

.card-category {
    color: var(--accent-color);
    background: rgba(226, 27, 27, 0.1);
    padding: 2px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    border: 1px solid rgba(226, 27, 27, 0.3);
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
    text-shadow: 0 0 5px rgba(255,255,255,0.1);
}

.card-title a {
    color: white;
}

.article-card:hover .card-title a {
    color: var(--accent-color);
    text-shadow: 0 0 10px rgba(226, 27, 27, 0.4);
}

.card-excerpt {
    color: var(--text-secondary);
    margin-bottom: 25px;
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.7;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px dashed #333;
    padding-top: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.read-more {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 10px; /* Ok işareti sağa kayar */
}

/* Single Article Formats */
.article-header {
    margin: 50px 0 30px;
    text-align: center;
}

.single-title {
    font-size: 42px;
    color: white;
    margin-bottom: 15px;
    line-height: 1.2;
}

.single-meta {
    color: var(--text-secondary);
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 15px;
}

.single-cover {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 40px;
    border: 1px solid var(--border-color);
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: #d0d7de;
    max-width: 800px;
    margin: 0 auto 60px;
}

.article-body h2, .article-body h3 {
    color: white;
    margin: 40px 0 20px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

/* Typography elements */
blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 15px 20px;
    background-color: rgba(88, 166, 255, 0.05);
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* Footer */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0;
    height: 90px; /* Same height as header */
    display: flex;
    align-items: center;
    color: var(--text-secondary);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    font-size: 15px; /* Slightly larger base font */
    box-sizing: border-box;
}

footer .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

footer .footer-left {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
    line-height: 1.2;
}

footer .footer-left .footer-site {
    color: var(--text-primary); /* White for better readability */
    font-size: 16px;
    font-weight: bold;
}

footer .footer-left .footer-sub {
    color: var(--accent-color); /* Mr. Robot red for terminal feel */
    font-size: 14px;
    font-family: 'Share Tech Mono', monospace;
}

footer .footer-img {
    height: 60px; /* Increased from 44px */
    opacity: 0.8;
    mix-blend-mode: screen;
    transition: all 0.3s;
    flex-shrink: 0;
    filter: drop-shadow(0 0 5px rgba(226, 27, 27, 0.2));
}

footer .footer-img:hover {
    opacity: 1;
    filter: drop-shadow(0 0 10px rgba(226, 27, 27, 0.5));
}

/* İçerik ile footer arasındaki tampon boşluk */
body {
    padding-bottom: 110px; /* Increased to accommodate larger footer */
}

/* Root Login - Gizli sabit buton */
.root-login-btn {
    position: fixed;
    bottom: 54px;
    right: 20px;
    z-index: 200;
    background: var(--bg-secondary);
    border: 1px solid #1a1a1a;
    color: #2a2a2a;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Share Tech Mono', monospace;
    letter-spacing: 1px;
    transition: all 0.2s;
    opacity: 0.3;
}

.root-login-btn:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
    opacity: 1;
}

/* Prism.js Custom Styles for Mr. Robot Theme */
pre[class*="language-"] {
    background: #050505 !important;
    border: 1px solid #222 !important;
    border-radius: 8px !important;
    padding: 2em 1.5em 1.5em !important;
    margin: 2em 0 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
    position: relative !important;
    overflow: visible !important;
}

/* Terminal header buttons */
pre[class*="language-"]::before {
    content: "● ● ●";
    position: absolute;
    top: 10px;
    left: 15px;
    color: #444;
    font-size: 10px;
    letter-spacing: 3px;
}

/* Code language label */
.prism-toolbar .toolbar-item span {
    background: #1a1a1a !important;
    color: var(--accent-color) !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    border-radius: 4px !important;
    border: 1px solid #333 !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
}

/* Copy button */
.prism-toolbar .toolbar-item button {
    background: #1a1a1a !important;
    color: #fff !important;
    border: 1px solid #333 !important;
    border-radius: 4px !important;
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 11px !important;
    padding: 4px 10px !important;
    margin-left: 8px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
}

.prism-toolbar .toolbar-item button:hover {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #fff !important;
}

code[class*="language-"] {
    font-family: 'Share Tech Mono', monospace !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    text-shadow: none !important;
}

/* Custom scrollbar for code blocks */
pre[class*="language-"]::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
pre[class*="language-"]::-webkit-scrollbar-track {
    background: #050505;
}
pre[class*="language-"]::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 4px;
}
pre[class*="language-"]::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}
@media (max-width: 900px) {
    header {
        height: auto; /* Mobilde yüksekliği içeriğe göre ayarla */
        min-height: 70px;
        padding: 10px 0;
    }

    .container {
        padding: 0 25px; /* Daha fazla kenar boşluğu */
    }
    
    .header-inner {
        flex-direction: row; /* Logo ve menü ikonu yan yana dursun */
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap; /* Menü açılınca alta taşmasına izin ver */
        gap: 0;
        width: 100%;
    }
    
    .logo {
        margin-left: 0; /* Mobilde sola çok yanaşıp kesilmesini önle */
        font-size: 20px; /* Mobilde logoyu biraz daha ufalt */
        padding-right: 15px; /* İkonla arasında güvenli mesafe */
    }

    .logo img {
        height: 20px; /* Mobilde logoyu küçült */
    }
    
    .menu-toggle {
        display: block; /* Sadece mobilde görünsün */
    }
    
    .nav-links {
        width: 100%;
        display: none; /* Mobilde kapalı gelsin */
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 15px;
        background-color: var(--bg-secondary);
        border: 1px solid var(--border-color);
        border-radius: 4px;
        overflow: hidden;
        position: relative;
        left: 0;
    }
    
    .nav-links.active {
        display: flex; /* Toggle js devreye girince görünür yap */
    }
    
    .nav-links li {
        margin: 0 !important;
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        padding: 12px 15px;
        text-align: left;
        border-radius: 0;
        border: none;
        width: 100%;
        box-sizing: border-box;
    }
    
    .nav-links a:hover {
        background: rgba(226, 27, 27, 0.1);
        border-left: 3px solid var(--accent-color);
    }
    
    .nav-links li[style*="margin-left"] {
        /* Dinamik sayfalara verdiğimiz ekstra margin'i mobilde sıfırla */
        margin-left: 0 !important;
    }
    
    footer {
        height: auto;
        min-height: 90px;
        padding: 15px 0;
        position: relative; /* Mobilde sayfa sonuna itmek daha güvenli */
    }

    footer .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    footer .footer-left {
        text-align: center;
    }

    body {
        padding-bottom: 0; /* Footer fixed değilse padding'e gerek yok */
    }
    
    .page-title {
        font-size: 26px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .single-title {
        font-size: 28px;
    }
    
    .single-cover {
        height: 250px;
    }
    
    .single-meta {
        flex-direction: column;
        gap: 5px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }
    
    .nav-links a {
        font-size: 13px;
        padding: 5px 8px;
    }
    
    .card-img {
        height: 150px;
    }
    
    .card-title {
        font-size: 18px;
    }
    
    .card-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .article-body {
        font-size: 16px;
    }
}
