/* --- TASARIM DEĞİŞKENLERİ (DESIGN TOKENS) --- */
:root {
    /* Renk Paleti */
    --text-color: #E5E7EB;
    --secondary-text-color: #9CA3AF;
    --accent-color: #16A34A;
    --shadow-color: rgba(0, 0, 0, 0.7);
    
    /* Overlay Rengi */
    --overlay-color: transparent; 

    /* Arka Plan Görselleri */
    --bg-image-light: url('https://images.pexels.com/photos/192136/pexels-photo-192136.jpeg');
    --bg-image-dark: url('https://images.pexels.com/photos/1072179/pexels-photo-1072179.jpeg');
    --current-bg-image: var(--bg-image-light);

    /* Tipografi ve Diğerleri */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Inter', sans-serif;
    --container-width: 1200px;
    --border-radius: 8px;
    --transition-speed: 0.5s;
}

/* --- KOYU TEMA AYARLARI --- */
html[data-theme='dark'] {
    --accent-color: #22C55E;
    --overlay-color: transparent; 
    --current-bg-image: var(--bg-image-dark);
}

/* --- TEMEL RESETLEME VE GENEL STİLLER --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    background-image: var(--current-bg-image);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
    transition: background-image var(--transition-speed) ease-in-out;
    /* Varsayılan imleci gizle (Özel imleç için) */
    cursor: none; 
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-color);
    z-index: -1;
    transition: background-color var(--transition-speed) ease-in-out;
}

/* Genel Gölge Stili */
body, p, span, a, div {
    text-shadow: 0px 2px 4px var(--shadow-color);
}
h1, h2, h3, h4, h5, h6, .logo {
    text-shadow: 0px 3px 6px var(--shadow-color);
}

/* --- YARDIMCI SINIFLAR --- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}
.highlight { 
    color: var(--accent-color); 
}

/* --- HEADER --- */
.header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100; /* İmlecin altında kalmaması için */
}
.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
}
.theme-toggle-button {
    background-color: transparent;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative; 
}
.theme-toggle-button:hover {
    background-color: var(--text-color);
    color: #111827; 
}
.theme-toggle-button .moon-icon { display: none; }
.theme-toggle-button .sun-icon { display: block; }
html[data-theme='dark'] .theme-toggle-button .moon-icon { display: block; }
html[data-theme='dark'] .theme-toggle-button .sun-icon { display: none; }

/* --- HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}
.hero__container { 
    text-align: center; 
}
.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-size: 1.25rem;
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto;
}
.scroll-down-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-color);
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -15px); }
    60% { transform: translate(-50%, -10px); }
}

/* --- HERO METİN ANİMASYONU --- */
.hero-title .highlight { 
    transition: opacity 0.4s ease-in-out; 
}
.hero-title .highlight.fade-out { 
    opacity: 0; 
}

/* --- PROJECTS SECTION --- */
.projects {
    padding: 100px 0;
    background: transparent !important;
}
.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 4rem;
}
.project-card {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    position: sticky;
    top: 80px;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(8px);
}
.project-image img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}
.project-title { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
}
.project-description {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    margin-bottom: 1.5rem;
}
.project-tags span {
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-right: 0.5rem;
    text-shadow: none;
}
.project-details-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--secondary-text-color);
    border-radius: var(--border-radius);
    color: var(--secondary-text-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.project-details-button svg {
    transition: transform 0.3s ease;
}

.project-details-button:hover {
    background-color: var(--text-color);
    border-color: var(--text-color);
    color: #111827; /* Koyu arka plan rengi */
    text-shadow: none;
}

.project-details-button:hover svg {
    transform: translate(5px, -5px);
}

/* --- ABOUT SECTION --- */
.about {
    padding: 100px 0;
    background: transparent !important;
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
    align-items: flex-start;
}
.about-image img {
    width: 100%;
    border-radius: 50%;
    border: 5px solid var(--accent-color);
}
.about-text h3 { 
    font-size: 2rem; 
    margin-bottom: 1rem; 
}
.about-text p {
    font-size: 1.1rem;
    color: var(--secondary-text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
}
.about-text h4 { 
    font-size: 1.5rem; 
    margin: 2rem 0 1rem 0; 
}
.skills-list span {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    margin: 0 0.5rem 0.5rem 0;
    font-weight: 500;
}
.timeline-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent-color);
}
.timeline-year {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
}
.timeline-details { 
    color: var(--secondary-text-color); 
}

/* --- FOOTER --- */
.footer {
    padding: 4rem 0;
    background: transparent !important;
    text-align: center;
}
.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.footer-social-links {
    display: flex;
    gap: 1.5rem;
}
.footer-social-links a {
    color: var(--text-color);
    transition: all var(--transition-speed) ease;
}
.footer-social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-5px);
}
.footer-copyright {
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

/* --- CUSTOM CURSOR --- */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-color);
    border-radius: 50%;
    pointer-events: none; /* Tıklamaları engellememesi için */
    transform: translate(-50%, -50%);
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                width 0.3s ease, 
                height 0.3s ease,
                background-color 0.3s ease;
    z-index: 9999;
}

.custom-cursor.grow {
    transform: translate(-50%, -50%) scale(2.5);
    background-color: var(--text-color);
    border-color: transparent;
}
/* --- PROJE DETAY MODAL --- */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998; /* İmlecin (9999) altında kalmalı */
    
    /* İçeriği ortalamak için flex */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Arka plan overlay */
    background-color: rgba(17, 24, 39, 0.85); /* Koyu renk overlay */
    backdrop-filter: blur(10px);
    
    padding: 2rem;
    overflow-y: auto; /* İçerik taşarsa kaydırma çubuğu */
    
    /* Varsayılan olarak gizli */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.project-modal.is-active {
    opacity: 1;
    visibility: visible;
}

/* Modalın kaybolurken de sayfanın kaydırılmasını engelle */
body.modal-open {
    overflow: hidden;
}

.project-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px; /* Modal genişliği */
    padding: 3rem;
    border-radius: var(--border-radius);
    
    /* Kartlarla aynı "glassmorphism" efekti */
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-color: rgba(0, 0, 0, 0.25);
    
    /* "Pop-in" animasyonu */
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.project-modal.is-active .project-modal-content {
    transform: scale(1);
    opacity: 1;
    transition-delay: 0.1s; /* Arka plan geldikten sonra içerik gelsin */
}

.modal-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--secondary-text-color);
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}
.modal-close-button:hover {
    color: var(--text-color);
    transform: rotate(90deg);
}

/* Modal'ın içine JS ile eklenecek içerik stilleri */
.modal-body {
    max-height: 75vh; /* İçeriğin max yüksekliği */
    overflow-y: auto; /* Sadece bu alan scroll edilebilir */
    padding-right: 1rem; /* Kaydırma çubuğu için boşluk */
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-title {
    font-size: 2.5rem;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-tags {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.modal-tags span {
    /* Proje kartındaki .project-tags span ile aynı stil */
    display: inline-block;
    background-color: var(--accent-color);
    color: #fff;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-shadow: none;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--secondary-text-color);
    margin-bottom: 2rem;
}

.modal-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-color);
    color: #fff;
    text-shadow: none;
    text-decoration: none;
    font-weight: 700;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}
.modal-link:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}


/* --- MOBİL UYUMLULUK (MEDIA QUERIES) --- */

@media (max-width: 1024px) {
    /* (Küçük laptoplar / Büyük tabletler) */
    .about-content {
        gap: 2.5rem; /* Hakkımda bölümü aralığını azalt */
    }
}

@media (max-width: 768px) {
    /* (Tabletler ve altı) */

    /* Dokunmatik cihazlarda özel imleci ve gizlenmiş ana imleci sıfırla */
    body {
        cursor: auto;
    }
    .custom-cursor {
        display: none;
    }

    .header {
        padding: 1.5rem 0;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }

    .projects {
        padding: 80px 0;
    }
    
    /* Proje kartlarını dikeyde yığ */
    .project-card {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        
        /* Mobil için sticky ve observer animasyonunu iptal et */
        position: static; 
        transform: none !important;
        opacity: 1 !important;
    }

    .about {
        padding: 80px 0;
    }

    /* Hakkımda bölümünü dikeyde yığ */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .about-image {
        max-width: 250px; /* Resmin çok büyümesini engelle */
        margin: 0 auto 2rem auto; /* Resmi ortala */
    }
    .project-modal-content {
        padding: 2rem;
        max-width: 95%;
    }
    .modal-body {
        max-height: 70vh; /* Mobilde yüksekliği ayarla */
    }
}


@media (max-width: 480px) {
    /* (Mobil telefonlar) */
    .container {
        padding: 0 15px; /* Kenar boşluklarını daralt */
    }

    .logo {
        font-size: 1.25rem;
    }

    /* Hero başlığını mobil için ayarla */
    .hero-title {
        font-size: clamp(2rem, 10vw, 4rem); 
    }
    .hero-subtitle {
        font-size: 1rem;
    }

    .projects, .about, .footer {
        padding: 60px 0; /* Bölüm boşluklarını azalt */
    }

    .section-title {
        font-size: 2rem;
    }

    .project-card {
        padding: 1.5rem; /* Kart içi boşlukları azalt */
    }

    .about-text h3 {
        font-size: 1.75rem;
    }
    .about-text h4 {
        font-size: 1.25rem;
    }
    .project-modal {
        padding: 1rem;
    }
    .project-modal-content {
        padding: 1.5rem;
    }
    .modal-title {
        font-size: 1.75rem;
    }
    .modal-description {
        font-size: 1rem;
    }
}