@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #1e3a8a; /* Kurumsal Lacivert */
    --accent-light: #f1f5f9; /* Nötr Gri-Mavi */
    --gradient: linear-gradient(135deg, #1e3a8a 0%, #172554 100%);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); /* Minimal gölge */
    --radius: 4px; /* Daha keskin köşeler */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.45; /* Satır aralığı sıkılaştırıldı */
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    font-size: 14px; /* Genel font boyutu küçültüldü */
}

.cv-container {
    display: grid;
    grid-template-columns: 260px 1fr; /* Sidebar daraltıldı */
    gap: 20px; /* Gap azaltıldı */
    width: 100%;
    max-width: 210mm; /* A4 Genişliği */
    background: transparent;
    /* Yükseklik sınırlandırması kaldırıldı, içeriğe göre uzasın ama kompakt olsun */
}

/* --- LEFT COLUMN (PROFILE) --- */
.profile-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 25px 20px; /* Padding azaltıldı */
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: fit-content; /* İçeriğe göre yükseklik */
    min-height: 100%; /* Sayfa boyunca uzasın */
}

.profile-photo-wrapper {
    width: 130px;
    height: 130px;
    min-width: 130px; /* Büzülmeyi engelle */
    min-height: 130px; /* Büzülmeyi engelle */
    border-radius: 50%;
    overflow: hidden; /* Daire şeklini koru */
    border: 3px solid var(--bg-card);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    flex-shrink: 0;
    position: relative;
    background-color: var(--bg-card); /* Resim yüklenmezse arka plan */
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; /* Inline boşluklarını kaldır */
}

.profile-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem; /* Küçültüldü */
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 8px;
}

.profile-role {
    background: var(--accent-light);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem; /* Küçültüldü */
    margin-bottom: 20px; /* Azaltıldı */
    display: inline-block;
}

.contact-list {
    width: 100%;
    list-style: none;
    margin-bottom: 25px;
    text-align: left;
}

.contact-list li {
    display: flex;
    align-items: center;
    margin-bottom: 12px; /* Azaltıldı */
    color: var(--text-secondary);
    font-size: 0.85rem; /* Küçültüldü */
}

.contact-icon {
    width: 30px; /* Küçültüldü */
    height: 30px; /* Küçültüldü */
    background: var(--bg-main);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin-right: 10px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.contact-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-list a:hover {
    color: var(--accent);
}

/* Sidebar Progress Bars */
.sidebar-section {
    width: 100%;
    margin-bottom: 25px;
    text-align: left;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--bg-main);
    padding-bottom: 5px;
}

.skill-bar-item {
    margin-bottom: 12px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--bg-main);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
    justify-content: center;
    width: 100%;
    padding-top: 15px;
}

.social-btn {
    width: 32px; /* Küçültüldü */
    height: 32px; /* Küçültüldü */
    border-radius: 50%;
    background: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-btn:hover {
    background: var(--accent);
    color: #fff;
}

/* --- RIGHT COLUMN (CONTENT) --- */
.content-section {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Kartlar arası boşluk azaltıldı */
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 25px; /* İç boşluk azaltıldı */
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--gradient);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Azaltıldı */
}

.section-icon {
    font-size: 1.1rem; /* Küçültüldü */
    color: var(--accent);
    margin-right: 12px;
    background: var(--accent-light);
    width: 36px; /* Küçültüldü */
    height: 36px; /* Küçültüldü */
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem; /* Küçültüldü */
    font-weight: 700;
    color: var(--text-primary);
}

/* About Text */
.about-text {
    color: var(--text-secondary);
    font-size: 0.9rem; /* Küçültüldü */
    line-height: 1.5;
    text-align: justify;
}

/* Timeline Items */
.timeline {
    position: relative;
    padding-left: 5px;
}

.timeline-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 20px; /* Azaltıldı */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px; /* Küçültüldü */
    height: 12px; /* Küçültüldü */
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: #fff;
    z-index: 2;
}

.timeline-item::after {
    content: '';
    position: absolute;
    left: 5px; /* Hizalama */
    top: 20px;
    width: 2px;
    height: calc(100% + 5px);
    background: #e2e8f0;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.role-title {
    font-size: 1rem; /* Küçültüldü */
    font-weight: 700;
    color: var(--text-primary);
}

.date-badge {
    background: var(--bg-main);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem; /* Küçültüldü */
    color: var(--accent);
    font-weight: 600;
}

.company-name {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.job-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Skills Grid (Artık kullanılmıyor ama eski kodlar bozulmasın diye kalabilir veya silinebilir) */
/* Sidebar'a taşındığı için buradaki stilleri temizleyebiliriz ama zarar vermez. */

/* Download Button & Language Switcher */
.download-btn-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 5px;
    border-radius: 50px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    opacity: 0.7;
}

.lang-btn.active {
    filter: grayscale(0%);
    opacity: 1;
    background: var(--accent-light);
    transform: scale(1.1);
}

.lang-btn:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.download-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #172554;
}

/* Responsive & Mobile Warning */
#mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
}

.warning-icon {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 20px;
}

.warning-content h2 {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.warning-content p {
    color: var(--text-secondary);
}

@media (max-width: 922px) {
    .cv-container {
        display: none !important;
    }
    
    .download-btn-container {
        display: none !important;
    }

    #mobile-warning {
        display: flex;
    }
}

@media (max-width: 768px) {
    .cv-container {
        grid-template-columns: 1fr;
    }
    
    .profile-section {
        flex-direction: row;
        text-align: left;
        flex-wrap: wrap;
        padding: 20px;
        min-height: auto;
    }
    
    .profile-photo {
        margin-right: 20px;
        margin-bottom: 0;
        width: 100px;
        height: 100px;
    }
    
    .profile-info {
        flex: 1;
    }

    .contact-list {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 10px;
        margin-top: 15px;
        margin-bottom: 0;
    }
}

@media print {
    body {
        background-color: #fff;
        padding: 0;
        margin: 0;
        font-size: 11px;
        line-height: 1.2;
    }

    .cv-container {
        max-width: 100%;
        width: 100%;
        box-shadow: none;
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 15px;
        page-break-inside: avoid;
    }

    .profile-section {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
        page-break-inside: avoid;
        padding: 10px;
        box-sizing: border-box;
    }

    .content-section {
        padding: 10px;
        box-sizing: border-box;
    }

    .card {
        margin-bottom: 10px;
        page-break-inside: auto; /* Allow cards to break across pages */
    }

    /* Keep section headers with content */
    .section-header {
        page-break-after: avoid;
        margin-bottom: 5px;
    }

    .timeline-item {
        page-break-inside: avoid; /* Keep individual job entries together */
        margin-bottom: 8px;
    }

    .skill-bar-item {
        page-break-inside: avoid;
        margin-bottom: 5px;
    }

    .download-btn-container {
        display: none;
    }

    /* Allow natural page breaks within timeline */
    .about-text {
        page-break-inside: auto;
        page-break-after: avoid;
        margin-bottom: 10px;
    }

    .timeline {
        page-break-inside: auto; /* Allow timeline to break across pages */
    }

    /* Aggressively optimize font sizes for space */
    .sidebar-title {
        font-size: 11px;
        margin-bottom: 5px;
    }

    .skill-info span {
        font-size: 9px;
    }

    .section-title {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .about-text {
        font-size: 10px;
        line-height: 1.2;
    }

    .role-title {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .company-name {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .job-desc {
        font-size: 9px;
        line-height: 1.2;
    }

    .date-badge {
        font-size: 8px;
    }

    /* Minimize spacing to fit more content */
    .profile-name {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .profile-role {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .contact-list {
        margin-bottom: 8px;
    }

    .contact-list li {
        margin-bottom: 3px;
    }

    .sidebar-section {
        margin-bottom: 8px;
    }

    .profile-photo-wrapper {
        margin-bottom: 8px;
    }

    .profile-photo {
        width: 80px;
        height: 80px;
    }

    /* Reduce progress bar height */
    .progress-bar {
        height: 3px;
    }

    .progress-fill {
        height: 3px;
    }

    /* Compact timeline */
    .timeline-header {
        margin-bottom: 2px;
    }
}
