* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: #0d1117; color: #c9d1d9; font-family: 'Fira Code', monospace; line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh; overflow-x: hidden; }
a { text-decoration: none; color: #58a6ff; transition: opacity 0.3s ease, color 0.3s ease; }
a:hover { text-decoration: underline; }

header { width: 100%; height: 70px; padding: 0 40px; border-bottom: 1px solid #30363d; display: flex; justify-content: space-between; align-items: center; background-color: #161b22; position: sticky; top: 0; z-index: 1000; flex-shrink: 0; }
header a:hover { opacity: 0.8; }

.intro-body { justify-content: center; align-items: center; }
.intro-container { text-align: left; max-width: 600px; padding: 20px; }
.intro-container h1 { font-size: 2.5rem; margin-bottom: 10px; color: #58a6ff; }
.subtitle { font-size: 1.2rem; margin-bottom: 30px; color: #8b949e; display: inline-block; }
.cursor { display: inline-block; width: 10px; height: 1.2rem; background-color: #58a6ff; animation: blink 1s step-end infinite; vertical-align: text-bottom; margin-left: 5px; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.nav-links { display: flex; flex-direction: column; gap: 15px; margin-bottom: 40px; }
.nav-links a { color: #c9d1d9; font-size: 1.1rem; transition: padding-left 0.3s ease; }
.nav-links a::before { content: "> "; color: #58a6ff; opacity: 0; transition: opacity 0.3s ease; }
.nav-links a:hover { color: #58a6ff; padding-left: 10px; text-decoration: none; }
.nav-links a:hover::before { opacity: 1; }

.social-icons { display: flex; gap: 15px; align-items: center; }
.social-icons img { width: 30px; height: 30px; transition: transform 0.3s ease, filter 0.3s ease; filter: grayscale(100%) opacity(0.7); }
.social-icons img:hover { transform: translateY(-3px); filter: grayscale(0%) opacity(1); }
.social-icons a.gmail-link img { width: 35px; }

.docs-container { display: flex; flex: 1; align-items: flex-start; }
.sidebar { width: 300px; background-color: #161b22; border-right: 1px solid #30363d; padding: 20px; position: sticky; top: 70px; height: calc(100vh - 70px); overflow-y: auto; transition: margin-left 0.3s ease, left 0.3s ease, opacity 0.3s ease; z-index: 900; }
.sidebar.hidden { margin-left: -340px; opacity: 0; }
.sidebar h3 { color: #8b949e; font-size: 1rem; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }

.folder-title { color: #58a6ff; font-weight: 600; margin-top: 15px; margin-bottom: 5px; font-size: 0.95rem; text-transform: capitalize; }
.file-link { display: block; color: #c9d1d9; padding: 5px 0 5px 15px; font-size: 0.9rem; cursor: pointer; }
.file-link:hover { color: #58a6ff; text-decoration: none; }
.file-link::before { content: "📄 "; font-size: 0.8rem; }
.content-area { flex: 1; padding: 40px; background-color: #0d1117; min-width: 0; }

.markdown-body { max-width: 800px; width: 100%; margin: 0 auto; padding: 0 40px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { color: #58a6ff; margin-bottom: 15px; margin-top: 25px; border-bottom: 1px solid #30363d; padding-bottom: 5px; }
.markdown-body h1 { border-bottom: none; }
.markdown-body p { margin-bottom: 15px; font-family: Arial, sans-serif; font-size: 1.05rem; }
.markdown-body ul, .markdown-body ol { margin-bottom: 15px; padding-left: 20px; font-family: Arial, sans-serif; }
.markdown-body img { max-width: 100%; border-radius: 6px; margin-bottom: 10px; }
.markdown-body hr { border: 0; height: 1px; background: #30363d; margin: 20px 0; }
.markdown-body pre { background-color: #161b22 !important; border: 1px solid #30363d; border-radius: 6px; padding: 15px; margin-bottom: 20px; overflow-x: auto; }
.markdown-body code { font-family: 'Fira Code', monospace; }

.markdown-body table { width: 100%; border-collapse: collapse; margin-top: 15px; margin-bottom: 25px; font-family: Arial, sans-serif; }
.markdown-body th, .markdown-body td { border: 1px solid #30363d; padding: 12px 15px; text-align: left; }
.markdown-body th { background-color: #161b22; font-weight: bold; color: #c9d1d9; }
.markdown-body tr:nth-child(even) { background-color: #0d1117; }
.markdown-body tr:nth-child(odd) { background-color: #161b22; }

.projects-container { padding: 40px; max-width: 1000px; margin: 0 auto; width: 100%; flex: 1; }
.projects-container h1 { color: #58a6ff; margin-bottom: 30px; border-bottom: 1px solid #30363d; padding-bottom: 10px; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.project-card { background-color: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 20px; display: flex; flex-direction: column; transition: transform 0.2s ease, border-color 0.2s ease; }
.project-card:hover { transform: translateY(-5px); border-color: #8b949e; }
.project-title { font-size: 1.2rem; font-weight: bold; color: #58a6ff; margin-bottom: 10px; }
.project-desc { color: #8b949e; font-size: 0.9rem; font-family: Arial, sans-serif; flex-grow: 1; margin-bottom: 15px; }
.project-meta { display: flex; gap: 15px; font-size: 0.85rem; color: #8b949e; }
.project-meta span { display: flex; align-items: center; gap: 5px; }
.language-color { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.search-box { position: relative; margin-bottom: 20px; }
.search-box .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: #8b949e; font-size: 0.9rem; }
.search-box input { width: 100%; background-color: transparent; border: 1px solid #30363d; border-radius: 6px; padding: 8px 10px 8px 30px; color: #c9d1d9; font-family: 'Fira Code', monospace; font-size: 0.85rem; outline: none; transition: border-color 0.2s, background-color 0.2s; }
.search-box input:focus { border-color: #58a6ff; background-color: #0d1117; }

/* KÖKTEN ÇÖZÜM: ID kullanarak önceliklendirdik */
#desktop-search-wrapper { display: block; margin-bottom: 20px; }
#mobile-search-wrapper { display: none !important; } /* Masaüstünde KESİNLİKLE gizli */

.top-action-bar { position: sticky; top: 70px; background-color: #0d1117; z-index: 950; margin-bottom: 20px; border-bottom: 1px solid #30363d; width: 100%; }
.top-action-bar-inner { display: flex; justify-content: space-between; align-items: center; max-width: 800px; margin: 0 auto; padding: 12px 40px; width: 100%; }
.top-action-bar .left-actions, .top-action-bar .right-actions { display: flex; align-items: center; gap: 18px; }

.svg-icon { width: 20px; height: 20px; cursor: pointer; color: #8b949e; transition: color 0.2s, transform 0.2s; display: block; }
.svg-icon:hover { color: #58a6ff; }
.mobile-toc-btn { display: none; } 

.article-layout { display: flex; gap: 40px; align-items: flex-start; position: relative; }
.markdown-wrapper { flex: 1; min-width: 0; }

.toc-sidebar { width: 250px; position: sticky; top: 140px; border-left: 1px solid #30363d; padding: 0 20px; height: fit-content; max-height: calc(100vh - 140px); overflow-y: auto; z-index: 100; transition: right 0.3s ease; }
.toc-sidebar h4 { color: #c9d1d9; margin-bottom: 15px; font-size: 1rem; border-bottom: 1px solid #30363d; padding-bottom: 5px; }
.toc-sidebar ul { list-style: none; }
.toc-sidebar li { margin-bottom: 8px; }
.toc-sidebar a { color: #8b949e; text-decoration: none; font-size: 0.85rem; transition: color 0.2s; display: block; line-height: 1.4; }
.toc-sidebar a:hover { color: #58a6ff; text-decoration: underline; }
.toc-sidebar a.active { color: #58a6ff; font-weight: 600; border-left: 2px solid #58a6ff; padding-left: 8px; margin-left: -10px; transition: all 0.3s ease; }
.toc-h2 { margin-left: 10px; }
.toc-h3 { margin-left: 20px; font-size: 0.8rem !important; opacity: 0.8; }

.dropdown-container { position: relative; display: flex; align-items: center; }
.dropdown-menu { display: none; position: absolute; top: 35px; right: 0; background-color: #161b22; border: 1px solid #30363d; border-radius: 6px; padding: 5px 0; min-width: 170px; z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.5); }
.dropdown-menu.show { display: block; }
.dropdown-menu .dropdown-item { padding: 10px 15px; font-size: 0.85rem; cursor: pointer; color: #c9d1d9; transition: background 0.2s; font-family: Arial, sans-serif; }
.dropdown-menu .dropdown-item:hover { background-color: #30363d; color: #58a6ff; }

.search-result-card { margin-bottom: 15px; padding: 15px; border: 1px solid #30363d; border-radius: 6px; cursor: pointer; transition: border-color 0.2s; }
.search-result-card:hover { border-color: #58a6ff; }

.icon { display: inline-flex; align-items: center; justify-content: center; }

.article-navigation { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; margin-top: 40px; border-top: 1px solid #30363d; }
.nav-link-box { display: flex; flex-direction: column; cursor: pointer; transition: transform 0.2s; max-width: 45%; }
.nav-link-box:hover { transform: translateY(-3px); }
.nav-label { font-size: 0.8rem; color: #8b949e; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.nav-title { font-size: 1.1rem; color: #58a6ff; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.nav-link-box.next { text-align: right; align-items: flex-end; }

.site-footer { padding: 20px 0; border-top: 1px solid #30363d; color: #8b949e; font-size: 0.85rem; font-family: Arial, sans-serif; display: flex; flex-direction: column; gap: 5px; margin-top: 20px; }

body.light-theme { background-color: #ffffff; color: #24292f; }
body.light-theme header, body.light-theme .sidebar, body.light-theme .top-action-bar, body.light-theme .toc-sidebar { background-color: #f6f8fa; border-color: #d0d7de; }
body.light-theme .content-area, body.light-theme .markdown-wrapper { background-color: #ffffff; }
body.light-theme a { color: #0969da; }
body.light-theme .file-link { color: #24292f; }
body.light-theme .search-box input { color: #24292f; border-color: #d0d7de; }
body.light-theme .search-box input:focus { background-color: #ffffff; border-color: #0969da; }
body.light-theme .markdown-body h1, body.light-theme .markdown-body h2, body.light-theme .markdown-body h3 { color: #0969da; border-bottom-color: #d0d7de; }
body.light-theme .markdown-body pre { background-color: #f6f8fa !important; border-color: #d0d7de; color: #24292f; }
body.light-theme .markdown-body th, body.light-theme .markdown-body td { border-color: #d0d7de; }
body.light-theme .markdown-body th { background-color: #f6f8fa; color: #24292f; }
body.light-theme .markdown-body tr:nth-child(even) { background-color: #ffffff; }
body.light-theme .markdown-body tr:nth-child(odd) { background-color: #f6f8fa; }
body.light-theme .dropdown-menu { background-color: #ffffff; border-color: #d0d7de; }
body.light-theme .dropdown-menu .dropdown-item { color: #24292f; }
body.light-theme .dropdown-menu .dropdown-item:hover { background-color: #f6f8fa; }
body.light-theme .svg-icon { color: #57606a; }
body.light-theme .svg-icon:hover { color: #0969da; }
body.light-theme .search-result-card { border-color: #d0d7de; }
body.light-theme .search-result-card:hover { border-color: #0969da; }
body.light-theme .toc-sidebar a.active { color: #0969da; border-left-color: #0969da; }
body.light-theme .article-navigation { border-top-color: #d0d7de; }
body.light-theme .nav-title { color: #0969da; }
body.light-theme .site-footer { border-top-color: #d0d7de; color: #57606a; }

/* ------------------------------------- */
/* MOBİL DÜZENLEMELER (Responsive)       */
/* ------------------------------------- */
@media (max-width: 768px) {
    header { padding: 0 20px; justify-content: center; }
    header span { display: none; }
    
    .docs-container { flex-direction: column; }
    
    .content-area { padding: 0; width: 100%; max-width: 100vw; overflow-x: hidden; }
    .markdown-body { padding: 20px 15px; } 
    .projects-container { padding: 20px 15px; }
    .article-navigation { margin: 20px 15px; padding: 0; }
    .site-footer { padding: 20px 15px; }

    .top-action-bar { position: fixed; top: 0; left: 0; width: 100%; height: 70px; background: transparent; border-bottom: none; z-index: 1010; margin-bottom: 0; padding: 0; pointer-events: none; }
    .top-action-bar-inner { padding: 0 15px; height: 100%; }
    .top-action-bar .left-actions, .top-action-bar .right-actions { pointer-events: auto; gap: 12px; }

    /* Mobilde arama barı değişimleri (!important EKLENDİ) */
    #desktop-search-wrapper { display: none !important; } /* Mobilde KESİNLİKLE gizli */
    #mobile-search-wrapper { display: flex !important; align-items: center; }

    .mobile-toc-btn { display: block; } 

    .sidebar { position: fixed; top: 70px; left: -100%; width: 280px; max-width: 80vw; height: calc(100vh - 70px); z-index: 960; border-right: 1px solid #30363d; border-bottom: none; box-shadow: 5px 0 15px rgba(0,0,0,0.5); transition: left 0.3s ease; background-color: #161b22; margin-left: 0; opacity: 1; }
    .sidebar.active { left: 0; }

    .toc-sidebar { position: fixed; top: 70px; right: -100%; width: 260px; max-width: 80vw; height: calc(100vh - 70px); z-index: 960; border-left: 1px solid #30363d; box-shadow: -5px 0 15px rgba(0,0,0,0.5); padding: 20px; transition: right 0.3s ease; background-color: #161b22; display: block; }
    .toc-sidebar.active { right: 0; }
    
    body.light-theme .sidebar, body.light-theme .toc-sidebar { background-color: #f6f8fa; }
}

/* ------------------------------------- */
/* PDF ÇIKTISI (CTRL+P) İÇİN ÖZEL TASARIM */
/* ------------------------------------- */
@media print {
    @page { margin: 2cm; }
    header, .sidebar, .top-action-bar, .toc-sidebar, .article-navigation, .search-box, .site-footer { display: none !important; }
    body, .content-area, .docs-container, .markdown-wrapper, .article-layout { display: block !important; background-color: #ffffff !important; color: #000000 !important; margin: 0 !important; padding: 0 !important; width: 100% !important; height: auto !important; overflow: visible !important; }
    .markdown-body { max-width: 100% !important; padding: 0 !important; color: #000000 !important; }
    .markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body a { color: #000000 !important; page-break-after: avoid; }
    .markdown-body pre, .markdown-body code { background-color: #f6f8fa !important; color: #333333 !important; border: 1px solid #cccccc !important; white-space: pre-wrap !important; word-break: break-word !important; }
    .markdown-body img { max-width: 100% !important; page-break-inside: avoid; }
}