/* Temel Değişkenler */
:root {
    --bg-color: #000000;
    --surface-color: #1C1C1E;
    --surface-hover: #2C2C2E;
    --text-primary: #F5F5F7;
    --text-secondary: #86868B;
    --accent-color: #FF453A;
    --nav-bg: rgba(28, 28, 30, 0.7);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.modal-open { overflow: hidden; }

/* Navigasyon */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo { max-height: 40px; width: auto; }

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 2rem;
    cursor: pointer;
}

.nav-links { display: flex; gap: 2rem; }

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease;
}

.nav-links a:hover, .nav-links a.active { color: var(--text-primary); }
.nav-links a.active i { color: var(--accent-color); }

/* Sayfa İçeriği */
.page-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8rem 1rem 4rem;
    width: 100%;
}

.page-header { text-align: center; margin-bottom: 3rem; }
.page-header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-header p { color: var(--text-secondary); }

/* Filtre Butonları */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active { background-color: var(--text-primary); color: var(--bg-color); }

/* VİDEO VE YAZI IZGARASI (GRID) - KRONİK ESNEME HATASI ÇÖZÜLDÜ */
.portfolio-grid, .writings-grid {
    display: grid;
    /* 1fr yerine minmax(0, 1fr) kullanarak içeriğin sütunu genişletmesi kesin olarak yasaklandı */
    grid-template-columns: repeat(3, minmax(0, 1fr)); 
    gap: 1.5rem;
    width: 100%;
}

.video-card, .writing-card {
    background-color: var(--surface-color);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%; 
    min-width: 0; /* Kartın genişlemesini engelleyen sihirli kural */
}

.video-card:hover, .writing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: 0.3s ease;
}

/* Video Çerçevesi (4:5 Dikey Oran) */
.video-wrapper {
    position: relative;
    padding-bottom: 125%; 
    height: 0;
    background-color: #000;
    width: 100%;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important; /* HTML içindeki sabit değerleri kesin ezer */
    height: 100% !important; 
    border: 0;
}

.video-info {
    padding: 1.2rem;
    flex-grow: 1;
}

.video-info h3 { font-size: 1.15rem; margin-bottom: 0.3rem; }
.category-tag { font-size: 0.75rem; color: var(--accent-color); font-weight: 600; margin-bottom: 0.8rem; display: block; }
.video-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 2px solid var(--accent-color);
    padding-left: 0.8rem;
}

/* Yazılarım Kart Özel Kuralları */
.writing-card { padding: 2rem; }
.writing-date { display: block; font-size: 0.85rem; color: var(--accent-color); font-weight: 600; margin-bottom: 0.5rem; }
.writing-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--text-primary); }
.writing-preview { color: var(--text-secondary); font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; flex-grow: 1; }
.read-btn {
    background: none; border: none; color: var(--text-primary);
    font-size: 1rem; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; align-self: flex-start;
}
.read-btn:hover { color: var(--accent-color); }

/* YAZILARIM - Modal (Okuma Penceresi) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px);
    z-index: 2000; display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background-color: var(--surface-color); width: 90%; max-width: 800px; max-height: 85vh;
    border-radius: 16px; padding: 3rem; position: relative; overflow-y: auto; 
    box-shadow: 0 20px 40px rgba(0,0,0,0.5); transform: translateY(20px); transition: 0.3s ease;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal {
    position: absolute; top: 1.5rem; right: 1.5rem; background: rgba(255,255,255,0.1);
    border: none; color: var(--text-primary); width: 40px; height: 40px; border-radius: 50%;
    display: flex; justify-content: center; align-items: center; font-size: 1.2rem; cursor: pointer;
}
.close-modal:hover { background: var(--accent-color); }
.modal-content h2 { font-size: 2.2rem; margin-bottom: 2rem; line-height: 1.2; }
.modal-text p { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 1.5rem; }

/* Hakkımda Sayfası */
.about-page { display: flex; align-items: center; padding-top: 10rem; }
.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image-wrapper { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,0.5); }
.about-image-wrapper::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 1px solid rgba(255,255,255,0.1); border-radius: 20px; pointer-events: none; }
.about-image { width: 100%; height: auto; display: block; object-fit: cover; filter: grayscale(20%) contrast(1.1); }
.about-title { font-size: 4.5rem; line-height: 1; font-weight: 800; margin-bottom: 2rem; letter-spacing: -2px; }
.about-title span { color: var(--accent-color); }
.about-paragraphs p { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.2rem; }
.about-highlight { font-size: 1.2rem !important; color: var(--text-primary) !important; font-weight: 600; border-left: 4px solid var(--accent-color); padding-left: 1rem; margin-top: 2rem; }

/* Footer */
.footer { padding: 3rem; text-align: center; border-top: 1px solid rgba(255,255,255,0.1); margin-top: auto; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.social-links a { color: var(--text-secondary); font-size: 1.5rem; transition: 0.3s; }
.social-links a:hover { color: var(--text-primary); }
.copyright { color: var(--text-secondary); font-size: 0.85rem; }

/* ========================================================
   MEDYA SORGULARI VE KESİN KIRILMA NOKTALARI
   ======================================================== */

@media (max-width: 900px) {
    .portfolio-grid, .writings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about-container { grid-template-columns: 1fr; gap: 2rem; }
    .about-page { padding-top: 6rem; }
    .about-title { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .portfolio-grid, .writings-grid { grid-template-columns: minmax(0, 1fr); }
    .nav-container { flex-direction: row; padding: 1rem 1.5rem; }
    .mobile-menu-btn { display: block; }
    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--surface-color); flex-direction: column;
        padding: 0; clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: 0.4s;
    }
    .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); padding: 1rem 0; }
    .nav-links a { justify-content: center; padding: 1rem 0; width: 100%; }
    .modal-content { width: 95%; padding: 2rem 1.5rem; }
    .close-modal { top: 0.5rem; right: 0.5rem; width: 35px; height: 35px; }
}