/* ==========================================================================
   1. Google Fonts & Temel Değişkenler
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-dark: #121826;
    --bg-light: #1A2233;
    --text-primary: #E2E8F0;
    --text-secondary: #A0AEC0;
    --text-headings: #FFFFFF;
    --accent-primary: #00A7A7;
    --accent-secondary: #FFD700;
    --border-color: #2D3748;

    --font-sans: 'Poppins', sans-serif;
    --font-serif: 'Lora', serif;
}

/* ==========================================================================
   2. Genel Stiller (Reset & Temel Ayarlar)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 100%; /* 16px */
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    width: 90%;
    max-width: 1120px;
    margin: 0 auto;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-headings);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.05rem; }
h2 { font-size: 2.44rem; }
h3 { font-size: 1.95rem; }
p { margin-bottom: 1rem; color: var(--text-secondary); }
a { color: var(--accent-primary); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--text-headings); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-primary);
    border-radius: 2px;
}

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

/* ==========================================================================
   3. Buton Stilleri
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
}
.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-dark);
}
.btn-primary:hover {
    background-color: var(--text-headings);
    transform: translateY(-3px);
}
.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-headings);
    transform: translateY(-3px);
}

/* ==========================================================================
   4. Header ve Navigasyon
   ========================================================================== */
.site-header {
    background-color: rgba(26, 34, 51, 0.8);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}
.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-headings);
}
.ampersand { color: var(--accent-secondary); }

.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.main-nav ul {
    display: flex;
    gap: 2.5rem;
}
.main-nav a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 5px 0;
}
.main-nav a.active, .main-nav a:hover {
    color: var(--text-headings);
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}
.main-nav a.active::after, .main-nav a:hover::after {
    width: 100%;
}

.mobile-nav-toggle { display: none; } /* Mobil için */

/* ==========================================================================
   5. Hero Bölümü (Anasayfa)
   ========================================================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding: 120px 0 60px;
    background: radial-gradient(circle at top, rgba(26, 34, 51, 0.9), var(--bg-dark)), url('https://www.transparenttextures.com/patterns/cubes.png');
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--accent-primary);
    font-weight: 600;
}
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin: 0.5rem 0 1.5rem;
}
.hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    color: var(--text-secondary);
}
.hero-buttons .btn {
    margin: 0.5rem;
}

/* ==========================================================================
   6. Hakkımda Bölümü
   ========================================================================== */
.about-me {
    padding: 6rem 0;
    background-color: var(--bg-light);
}
.about-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}
.about-text { flex: 2; }
.about-image {
    flex: 1;
    width: 300px;
    height: 300px;
    max-width: 100%;
}
.about-image img {
    border-radius: 50%;
    border: 5px solid var(--border-color);
    width: 100%;
    height: 100%;
    object-fit: cover; /* Görseli kırparak alanı doldurur */
    object-position: center; /* Görselin üst kısmını gösterir */;
}

/* ==========================================================================
   7. Portfolyo & Kart Stilleri
   ========================================================================== */
.portfolio, .blog-list {
    padding: 6rem 0;
}
.portfolio-grid, .blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.2);
}
.card-img {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}
.card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}
.card-title a:hover {
    color: var(--accent-primary);
}
.card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}
.card-link {
    font-weight: 600;
}

/* ==========================================================================
   8. Son Yazılar Bölümü (Anasayfa)
   ========================================================================== */
.recent-posts {
    padding: 6rem 0;
    background-color: var(--bg-light);
}
.posts-list .post-item {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}
.posts-list .post-item:first-child {
    padding-top: 0;
}
.posts-list .post-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.post-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.post-meta .post-category {
    font-weight: 600;
    color: var(--accent-primary);
    margin-left: 1rem;
}
.post-title {
    font-size: 1.5rem;
}
.post-title a { color: var(--text-headings); }
.post-excerpt { font-size: 1rem; }
.recent-posts .text-center { margin-top: 3rem; }

/* ==========================================================================
   9. Footer
   ========================================================================== */
.site-footer {
    padding: 4rem 0 2rem;
    text-align: center;
    background-color: #0D121C;
}
.footer-content h2 {
    font-size: 2rem;
}
.footer-email {
    display: inline-block;
    font-size: 1.2rem;
    margin: 1.5rem 0;
    color: var(--text-headings);
    border-bottom: 2px solid var(--accent-primary);
    padding-bottom: 5px;
}
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-primary);
    transform: scale(1.2);
}
.copyright p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* ==========================================================================
   10. Blog & Tekil Gönderi Sayfaları
   ========================================================================== */
.page-header {
    padding: 120px 0 60px;
    text-align: center;
    background-color: var(--bg-light);
}
.page-header h1 {
    font-size: 3rem;
}
.page-header p {
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* Blog Listeleme Sayfası */
.blog-list .card-body .post-meta {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

/* Tekil Gönderi Sayfası */
.post-full { padding: 6rem 0; }
.post-full-header {
    text-align: center;
    margin-bottom: 3rem;
}
.post-full-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
}
.post-full-content {
    max-width: 750px;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.8;
}
.post-full-content p, 
.post-full-content ul, 
.post-full-content ol {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}
.post-full-content h2,
.post-full-content h3,
.post-full-content h4 {
    font-family: var(--font-sans);
    margin-top: 3rem;
}
.post-full-content ul {
    list-style: disc;
    padding-left: 20px;
}
.post-full-content a {
    text-decoration: underline;
}
.post-full-content figure {
    margin: 2rem 0;
}
.post-full-content figcaption {
    font-size: 0.9rem;
    text-align: center;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
.post-full-content pre {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
}


/* ==========================================================================
   11. Mobil Uyumluluk (Responsive)
   ========================================================================== */
@media (max-width: 768px) {
    h1 { font-size: 2.44rem; }
    h2 { font-size: 1.95rem; }

    /* Mobil Navigasyon */
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        display: flex; /* Flex'i burada tanımla */
    }
    .main-nav.is-open {
        transform: translateX(0);
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    .main-nav a { font-size: 1.5rem; }

    .mobile-nav-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-headings);
        font-size: 1rem;
        font-weight: 600;
        z-index: 1001;
    }

    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-image {
        margin-top: 2rem;
    }

    .hero-title { font-size: 2.2rem; }
}
