/* =========================================
   1. TEMEL AYARLAR & DEĞİŞKENLER
   ========================================= */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --accent-color: #60a5fa;
    --text-dark: #1e293b;
    --text-gray: #64748b;
    --bg-white: #ffffff;
    --bg-alt: #f1f5f9;
    /* Açık Gri */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.7;
    color: var(--text-gray);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4 {
    color: var(--text-dark);
    font-weight: 700;
}

/* Link Stilleri (Metin içi) */
.company-link {
    color: inherit;
    text-decoration: none;
    transition: 0.3s;
    border-bottom: 1px dotted var(--text-gray);
}

.company-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* =========================================
   2. ORTAK BİLEŞENLER
   ========================================= */
section {
    padding: 8rem 2rem;
    max-width: 100%;
    margin: 0;
}

.container {
    max-width: 1100px;
    margin: auto;
}

/* Bölüm Arka Planları */
.about-section {
    background-color: var(--bg-white);
}

.resume-section {
    background-color: var(--bg-alt);
}

.certificates-section {
    background-color: var(--bg-white);
}

.projects-section {
    background-color: var(--bg-alt);
}

/* Gri zemin */

/* Başlık Stili */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
    color: var(--text-dark);
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Standart Buton */
.btn {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* Küçük Çerçeveli Buton */
.btn-small {
    padding: 8px 20px;
    font-size: 0.9rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    cursor: pointer;
}

.btn-small:hover {
    background: var(--primary-color);
    color: white;
}

/* =========================================
   3. HEADER & NAVBAR (Masaüstü & Mobil)
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    padding: 1.2rem 2rem;
    position: relative;
    /* Mobil menü için referans */
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin-left: 30px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hamburger İkonu (Masaüstünde Gizli) */
.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
    padding: 0 2rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-content h4 {
    color: var(--accent-color);
    font-size: 1.1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    color: #cbd5e1;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* =========================================
   5. ABOUT SECTION
   ========================================= */
.about-top-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: stretch;
    margin-bottom: 4rem;
}

.about-img-wrapper {
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Skills */
.about-skills-wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-item {
    margin-bottom: 1rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-bar-bg {
    width: 100%;
    height: 10px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-in-out;
}

/* Toggle Skills Animation */
.extra-skill {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-bottom: 0;
    transform: translateY(-20px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.extra-skill.opened {
    max-height: 120px;
    opacity: 1;
    margin-bottom: 1rem;
    transform: translateY(0);
}

#toggleSkillsBtn i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

#toggleSkillsBtn.active i {
    transform: rotate(180deg);
}

/* =========================================
   6. RESUME SECTION (Zig-Zag Timeline)
   ========================================= */
.main-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.main-timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item.left {
    left: 0;
    text-align: right;
}

.timeline-item.right {
    left: 50%;
    text-align: left;
}

.timeline-icon {
    position: absolute;
    width: 40px;
    height: 40px;
    right: -20px;
    background-color: var(--bg-white);
    border: 4px solid var(--primary-color);
    top: 20px;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1rem;
}

.timeline-item.right .timeline-icon {
    left: -20px;
}

.timeline-content {
    padding: 20px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    border: 1px solid #e2e8f0;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.timeline-content .date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.timeline-content h4 {
    margin-bottom: 5px;
    font-size: 1.2rem;
}

.timeline-content .subtitle {
    color: #94a3b8;
    font-weight: 500;
    font-size: 0.95rem;
    margin-bottom: 10px;
    display: block;
}

/* =========================================
   7. SLIDER YAPISI (Sertifika & Projeler)
   ========================================= */
.slider-wrapper {
    position: relative;
    max-width: 100%;
    padding: 0 50px;
}

.slider-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

#sliderTrack {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
}

/* Projeler için alt boşluk düzeltmesi (Gölge kesilmemesi için) */
.project-slider-wrapper .slider-track {
    padding: 0 !important;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

/* Slider Butonları */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-dark);
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.prev-btn {
    left: 0;
}

.next-btn {
    right: 0;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* --- A. SERTİFİKA KARTI --- */
.cert-card {
    flex: 0 0 calc((100% - 60px) / 3); /* (100% - 2 gap) / 3 */
    min-width: unset;
    max-width: unset;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none !important;
    border: 2px solid #e5e7eb !important; /* Daha belirgin */
    border-radius: 20px !important;
    transition: transform 0.3s ease;
    scroll-snap-align: center;
}

.cert-card:hover {
    border-color: var(--primary-color) !important;
}

.cert-thumb {
    height: 180px;
    width: 100%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    overflow: hidden;
}

.cert-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.cert-card:hover .cert-thumb img {
    transform: scale(1.1);
}

.cert-body {
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cert-body h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    line-height: 1.4;
}

.cert-issuer {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

/* Modern Buton (İncele) */
.btn-modern {
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    gap: 12px;
}

/* --- B. PROJELER (Filtre & Kart) --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

/* Proje Kartı (Matematiksel Genişlik: Tam 3 tane sığar) */
.project-card {
    flex: 0 0 calc((100% - 60px) / 3);
    /* (100% - 2 boşluk) / 3 */
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none !important;
    border: 2px solid #e5e7eb !important; /* Daha belirgin */
    border-radius: 20px !important;
    transition: transform 0.3s ease;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary-color) !important;
}

.project-img {
    height: 200px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.proj-cat {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.project-info h3 {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-info p {
    font-size: 0.95rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.btn-text {
    margin-top: auto;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-text:hover {
    gap: 10px;
}

/* =========================================
   8. CONTACT & FOOTER
   ========================================= */
.contact-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding-bottom: 4rem;
}

.contact-section .section-title h2,
.contact-section .section-title {
    color: white;
}

.contact-wrapper {
    max-width: 800px;
    margin: auto;
    background: rgba(255, 255, 255, 0.05);
    padding: 3rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-input {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-input {
    height: 150px;
    resize: vertical;
}

footer {
    background: #020617;
    color: #64748b;
    padding: 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-socials a {
    color: white;
    font-size: 1.5rem;
    margin: 0 10px;
    transition: 0.3s;
}

.footer-socials a:hover {
    color: var(--primary-color);
}

/* =========================================
   9. MODAL (POPUP)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    display: flex;
}



@keyframes pop {
    from {
        transform: scale(0.9);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.modal-content {
    background: white;
    width: 900px;           /* SABİT GENİŞLİK */
    max-width: 90vw;        /* Mobilde küçülür */
    max-height: 90vh;       /* Ekrana taşmaz */
    border-radius: 15px;
    overflow-y: auto;       /* Taşarsa scroll olur */
    overflow-x: hidden;
    position: relative;
    animation: pop 0.25s ease;
}

.modal-img-area {
    height: 640px;
}

.modal-img-area img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* kalite düşmesin diye cover değil contain */
}



.modal-text {
    padding: 2rem;
}

/* Modal Butonları */
.modal-text .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 15px;
    padding: 12px 0;
    font-size: 1rem;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.modal-text .btn:last-child {
    margin-bottom: 0;
}

/* İçi Boş Buton (İndir) */
.btn-outline {
    background-color: white !important;
    color: var(--primary-color) !important;
    border: 2px solid var(--primary-color) !important;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
    transform: translateY(-2px);
}

.btn-outline i {
    margin-right: 8px;
}

/* =========================================
   10. RESPONSIVE (MOBİL & TABLET)
   ========================================= */
@media (max-width: 900px) {

    /* Hamburger Menü Göster */
    .hamburger {
        display: block;
    }

    /* Mobil Menü Tasarımı */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        align-items: center;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        transform: translateY(-150%);
        transition: transform 0.4s ease;
        z-index: 999;
        opacity: 0;
        pointer-events: none;
    }

    /* Menü Açılınca */
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        margin: 15px 0;
        font-size: 1.1rem;
        display: block;
    }

    /* Genel Düzenlemeler */
    .about-top-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-img-wrapper {
        max-width: 400px;
        margin: auto;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    /* Timeline Düzeltmesi (ZigZag İptal) */
    .main-timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.left,
    .timeline-item.right {
        left: 0;
        text-align: left;
    }

    .timeline-item.left .timeline-icon,
    .timeline-item.right .timeline-icon {
        left: 11px;
        right: auto;
    }

    /* Proje Kartları (2'li dizilim) */
    .project-card {
        flex: 0 0 calc((100% - 30px) / 2);
    }
}

@media (max-width: 768px) {

    .cert-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    #certFilter .filter-btn {
        font-size: 0.85rem;
        padding: 6px 15px;
    }

    .slider-wrapper {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0; /* <-- Tamamen kaldırdık */
        padding-bottom: 70px;
    }

    .slider-track {
        order: 1;
        width: 100%;
        margin-bottom: 20px;
        padding: 0; /* <-- Burayı sıfırlıyoruz */
    }


    .slider-btn {
        order: 2;
        position: static;
        transform: none;
        margin: 0 10px;
        width: 50px;
        height: 50px;
        background-color: #f8fafc;
        border: 2px solid #e2e8f0;
        box-shadow: none;
        display: flex;
    }

    .slider-btn:active {
        background-color: var(--primary-color);
        color: white;
    }
}

@media (max-width: 600px) {

    /* Proje Kartları (Tekli dizilim) */
    .project-card {
        flex: 0 0 100%;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}