/* ============================================================
   TARIK VARDAR - MODERN DEVELOPER PORTFOLIO THEME (2025)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-body: #020617;
    /* Dahan koyu, premium slate */
    --bg-card: #0f172a;
    --bg-surface: #1e293b;
    --border-color: #1e293b;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --accent-primary: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.5);

    --font-primary: 'Outfit', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- TİTREME (SHIFT) SORUNU İÇİN ÇÖZÜM --- */
:root {
    scrollbar-gutter: stable;
}

html {
    overflow-y: scroll !important;
    scroll-behavior: smooth;
}

body {
    padding-right: 0 !important;
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-primary);
    /* Daha modern font */
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.05) 0%, transparent 25%);
    background-attachment: fixed;
}

body.modal-open {
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

/* Kod Fontları */
pre,
code,
.blob-code {
    font-family: var(--font-mono) !important;
}

a {
    text-decoration: none;
    color: var(--accent-primary);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* =========================================
   GELİŞMİŞ NAVBAR & MOBİL MENÜ
   ========================================= */
.navbar {
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: var(--header-height);
    transition: var(--transition-medium);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: var(--text-primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: var(--transition-medium);
    padding: 8px 18px !important;
    border-radius: 50px;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    background: var(--accent-primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

.navbar-toggler {
    border: none;
    padding: 0;
    outline: none !important;
    box-shadow: none !important;
}

/* MOBİL MENÜ */
@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background: #020617;
        border-left: 1px solid var(--border-color);
        padding: 25px;
        padding-top: 90px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        display: block !important;
        visibility: hidden;
        z-index: 9999;
        box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
    }

    .navbar-collapse.show {
        transform: translateX(0);
        visibility: visible;
    }

    .nav-item {
        width: 100%;
        margin-bottom: 8px;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 15px 20px !important;
        border-radius: var(--radius-md);
        background: var(--bg-surface);
    }

    .nav-link.active {
        background: var(--accent-primary);
    }

    .mobile-close-btn {
        position: absolute;
        top: 25px;
        right: 25px;
        background: var(--bg-surface);
        border: none;
        color: white;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        transition: var(--transition-fast);
    }

    .mobile-close-btn:hover {
        background: var(--danger-color);
        rotate: 90deg;
    }

    .navbar-collapse.show::before {
        content: '';
        position: fixed;
        top: 0;
        left: -100vw;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: -1;
    }
}

/* =========================================
   MODERN UI COMPONENTS
   ========================================= */
.hero-section {
    padding: 5rem 0 4rem;
    border-bottom: 1px solid var(--border-color);
    /* Separator */
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    filter: blur(80px);
    z-index: -1;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-medium);
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
}

.card:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 20px rgba(59, 130, 246, 0.1);
    pointer-events: none;
}

.btn {
    border-radius: 50px;
    /* Pill Shape */
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    transition: var(--transition-fast);
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--bg-surface);
    color: white;
    border-color: var(--text-secondary);
}

/* Animasyonlar */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

/* İçerik Yazı Alanı */
.content-area {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #cbd5e1;
}

.content-area h3 {
    color: white;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.content-area h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--accent-primary);
    margin-top: 8px;
    border-radius: 3px;
}

.content-area p {
    margin-bottom: 1.5rem;
}

.content-area img {
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Footer */
footer {
    background: #020617;
    border-top: 1px solid var(--border-color);
}

/* =========================================
   PAGE SPECIFIC: ABOUT (Hakkımda)
   ========================================= */
.about-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    height: 100%;
    transition: all 0.3s;
}

.about-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-primary);
}

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.timeline-item {
    border-left: 2px solid var(--border-color);
    padding-left: 20px;
    padding-bottom: 30px;
    position: relative;
}

.timeline-item::before {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--accent-primary);
    border-radius: 50%;
    position: absolute;
    left: -7px;
    top: 5px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* =========================================
   PAGE SPECIFIC: CONTACT (İletişim)
   ========================================= */
.contact-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
}

.contact-icon-box {
    min-width: 50px;
    height: 50px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-right: 1rem;
}

/* =========================================
   PAGE SPECIFIC: PROJECT DETAILS & REPO
   ========================================= */
.sticky-sidebar {
    position: sticky;
    top: 90px;
}

.repo-browser {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: #0d1117;
}

.repo-header {
    background: #161b22;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
}

.repo-table td {
    padding: 10px 15px;
    border-bottom: 1px solid #30363d;
    color: #c9d1d9;
}

.repo-table tr:last-child td {
    border-bottom: none;
}

.repo-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

.repo-icon {
    text-align: center;
    color: #7d8590;
}

.markdown-body {
    color: #c9d1d9;
    line-height: 1.6;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
    border: 1px solid #30363d;
}

.markdown-body pre {
    background: #161b22;
    padding: 15px;
    border-radius: 6px;
    overflow-x: auto;
    border: 1px solid #30363d;
}

.breadcrumb-item a {
    color: var(--accent-primary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #8b949e;
}

.project-stat-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.project-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
}

/* =========================================
   RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================= */

/* TABLET (992px altı) */
@media (max-width: 991.98px) {
    .navbar-collapse {
        /* Mobil menü zaten yukarıda tanımlı ama search form'u buraya uyarlayalım */
        padding-bottom: 50px;
        /* Alttan boşluk */
    }

    .navbar form {
        width: 100% !important;
        margin: 15px 0 !important;
        /* Mobilde arama çubuğunu menü içine tam oturt */
    }

    .hero-section {
        text-align: center !important;
        padding-top: 3rem;
    }

    .hero-actions {
        justify-content: center !important;
    }

    .sticky-sidebar {
        position: static !important;
        /* Sidebar artık yapışkan değil, alta iner */
        margin-top: 2rem;
    }

    /* Hakkımda sayfasındaki ikon mobilde gizlenmeli veya küçülmeli */
    .fa-user-tie,
    .fa-user-astronaut {
        display: none !important;
    }
}

/* MOBILE (576px altı) */
@media (max-width: 575.98px) {
    :root {
        --header-height: 70px;
        /* Header biraz daralsın */
    }

    .display-4 {
        font-size: 2.5rem;
    }

    /* Çok büyük başlıkları küçült */
    .display-5 {
        font-size: 2rem;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .card-body {
        padding: 1.25rem;
    }

    /* Timeline mobilde daha sıkışık olmalı */
    .timeline-item {
        padding-left: 15px;
    }

    /* İletişim ikonlarını alt alta al */
    .contact-info-card {
        padding: 1.5rem;
    }

    /* Repo browser tabloları taşmasın */
    .repo-table {
        font-size: 0.85rem;
    }
}


/* =========================================
   ADVANCED VISUAL EFFECTS (TECH & MODERN)
   ========================================= */

/* Glassmorphism Surface */
.glass-effect {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Text Glow Utility */
.text-glow {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

/* Button Glow on Hover */
.btn-glow:hover {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    border-color: var(--accent-hover);
}

/* Code Badge */
.code-badge {
    font-family: var(--font-mono);
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}