/* =========================================
   1. PARAMETRELER VE SIFIRLAMA
   ========================================= */
:root {
    --bg-color: #f9f9f9;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #dddddd;
    --font-main:'Futura', 'Trebuchet MS', Arial, sans-serif;
    --placeholder-color: #ede9dd;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; 
}

#app-container {
    flex: 1;
}

/* =========================================
   2. ÜST ALAN (HEADER / KİŞİSEL BİLGİLER)
   ========================================= */
.main-header {
    width: 100%;
    padding: 60px 20px; 
    display: flex;
    align-items: flex-start; 
}

.header-grid {
    display: grid;
    grid-template-columns: 120px 1fr; /* Profil karesi 120px, kalanı metin */
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.profile-column {
    display: flex;
    align-items: flex-start; 
}

.profile-square {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--placeholder-color);
}

.content-column {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.owner-name {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    line-height: 1;
}

.bio-container {
    flex: 1;
}

.bio-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    column-count: 3; /* Yazıyı 3 sütuna böler */
    column-gap: 40px;
    text-align: justify;
}

/* =========================================
   3. ORTA ALAN (PROJE VE ESKİZ GALERİSİ)
   ========================================= */
.projects-section {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 60px 20px;
    overflow-x: auto;
}

.projects-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* Arkadan geçen ince çizgi */
.connecting-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--border-color);
    z-index: 0;
}

.projects-track {
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: center; /* Eskiz karesini dikeyde ortalar */
    position: relative;
    z-index: 1;
}

/* Standart Proje Karesi */
.project-node {
    flex: 1; /* Alana eşit yayılır */
    aspect-ratio: 1 / 1;
    background-color: var(--placeholder-color);
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    overflow: hidden; /* Fotoğraf taşmasını engeller */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Eskiz Karesi (Projenin yarısı kadar genişlik) */
.sketch-node {
    flex: 0.5;
    background-color: #f0f0f0;
}

.project-node:hover {
    transform: translateY(-5px);
}

/* İçeri eklenen fotoğrafların ayarı */
.project-image, #modal-main-img {
    width: 100%;
    height: 100%;
    /* ORANTIYI KORUYAN SİHİRLİ KOMUTLAR: */
    object-fit: cover;      /* Fotoğrafı alanı dolduracak şekilde büyütür, oranları bozmaz ama kenarlardan çok az kırpabilir. */
    object-position: center; /* Fotoğrafın tam merkezini odağa alır. */
}

/* P1, e1 gibi sağ alt kodlar */
.project-id {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: bold;
    letter-spacing: 1px;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.7); /* Fotoğraf üstünde okunabilirlik */
    padding: 2px 5px;
    border-radius: 2px;
}

/* =========================================
   4. FOOTER (ALT BİLGİ)
   ========================================= */
.site-footer {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding-top: 60px;
    margin-top: auto; 
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.footer-column p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-right h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.footer-right p {
    margin-bottom: 8px;
}

.footer-copyright {
    border-top: 1px solid #eeeeee;
    padding: 30px 20px;
    text-align: center;
}

.footer-copyright p {
    font-size: 0.75rem;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   5. MODAL VE BLUR (AÇILIR PENCERE)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-btn {
    position: absolute;
    top: 40px;
    right: 50px;
    background: none;
    border: none;
    font-size: 1.5rem;
    font-weight: 100;
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.5;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1001;
}

.close-btn:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.modal-content {
    display: flex;
    align-items: center;
    gap: 60px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: relative;
    max-width: 95vw;
}

/* =========================================
   6. MODAL İÇİ GÖRSEL ALANI (SOL)
   ========================================= */
.visual-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.large-display-wrapper {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-arrow {
    background: none;
    border: none;
    font-size: 1.5rem; /* İçi dolu üçgenler için ayarlandı */
    cursor: pointer;
    color: var(--text-primary);
    opacity: 0.4;
    padding: 10px;
    transition: opacity 0.3s, transform 0.3s;
}

.nav-arrow:hover {
    opacity: 1;
    transform: scale(1.2);
}

.large-square {
    width: 55vh; 
    aspect-ratio: 1 / 1;
    background-color: var(--placeholder-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

/* =========================================
   7. MODAL İÇİ KÜÇÜK GALERİLER (ORTA VE ALT)
   ========================================= */
/* Proje Modu: 3x3 Izgara */
.modal-middle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 25px;
}

.grid-row {
    display: flex;
    gap: 15px;
    align-items: center;
    opacity: 0.4;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
}

.grid-row:hover {
    opacity: 0.7;
}

.grid-row.active-row {
    opacity: 1;
    transform: translateX(-5px);
}

.row-label {
    width: 60px; /* Etiketlere sabit genişlik verdik ki hizalar bozulmasın */
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    margin-right: 15px;
}

/* Eskiz Modu: 4'lü Alt Galeri */
.gallery-thumbs {
    display: none;
    gap: 15px;
    justify-content: center;
    width: 100%;
}

/* Küçük Kare Ayarları (Senin CSS'indekiyle aynı kalabilir) */
.small-square, .thumb-sq {
    width: 90px;
    height: 90px;
    flex-shrink: 0; /* Bant daralsa bile kareler küçülmesin diye */
    background-color: #f0f0f0;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background-repeat: no-repeat;
}

.small-square.active-thumb, .thumb-sq.active-thumb {
    transform: scale(1.15);
    /*border-color: var(--text-primary);*/
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    background-repeat: no-repeat;
}

/* Modlara Göre Gizleme/Gösterme Mantığı */
.modal-overlay.sketch-mode .gallery-thumbs { display: flex; }
.modal-overlay.sketch-mode #project-grid { display: none; }

.modal-overlay.project-mode .gallery-thumbs { display: none; }
.modal-overlay.project-mode #project-grid { display: flex; }

/* --- KAYDIRMALI BANT (SLIDER) AYARLARI --- */
.row-wrapper {
    display: flex;
    align-items: center;
    opacity: 0.4;
    transition: opacity 0.3s;
    cursor: pointer;
    background-repeat: no-repeat;
}

.row-wrapper:hover { opacity: 0.7; }
.row-wrapper.active-row { opacity: 1; }

/* Sadece 3 kare gösterecek pencere (Maske) */
.slider-mask {
    width: 300px; /* 3 Kare (90x3 = 270) + 2 Boşluk (15x2 = 30) = 300px tam sığar */
    overflow: hidden; /* Dışarı taşanları gizle */
    position: relative;
    padding: 10px 0; /* Büyüme efektinde kareler kesilmesin diye alt/üst boşluk */
}

/* Kareleri taşıyan ve sağa sola kayacak olan tren (Bant) */
.slider-track {
    display: flex;
    gap: 15px;
    width: max-content; /* İçindeki elemanlar kadar uzar */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Yumuşak kayma efekti */
}

/* =========================================
   8. MODAL İÇİ BİLGİ KARTI (SAĞ)
   ========================================= */
/* --- BİLGİ KARTI ANA KUTUSU --- */

.modal-right {
    width: 350px; 
    height: 65vh; /* Taşırmayı önlemek için sabit yükseklik ŞART */
    max-height: 800px; /* Ne olursa olsun ekranı aşmasını engeller */
    background-color: #ffffff; 
    padding: 50px 40px; 
    border: 1px solid var(--border-color); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
    display: flex;
    flex-direction: column;
    z-index: 5;
}

.modal-right h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    flex-shrink: 0; /* Başlığın asla ezilmemesini/küçülmemesini sağlar */
}

/* --- KAYDIRILABİLİR METİN ALANI --- */
#modal-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    text-align: justify;
    margin-top: 10px;
    padding-right: 15px; 

    /* KAYDIRMA İÇİN KRİTİK 3 SATIR */
    overflow-y: auto; 
    flex: 1 1 auto; 
    min-height: 0; /* Flexbox içinde kaydırmanın çalışması için bu "sihirli" koddur */

    /* FİREFOX TARAYICISI İÇİN DESTEK */
    scrollbar-width: thin;
    scrollbar-color: #cccccc transparent;
}

/* --- CHROME, SAFARİ, EDGE İÇİN ÇUBUK TASARIMI --- */
#modal-desc::-webkit-scrollbar {
    width: 4px; 
}
#modal-desc::-webkit-scrollbar-track {
    background: transparent; 
}
#modal-desc::-webkit-scrollbar-thumb {
    background-color: #cccccc; 
    border-radius: 10px; 
}
#modal-desc::-webkit-scrollbar-thumb:hover {
    background-color: #999999; 
}

/* =========================================
   9. ANİMASYONLAR (YAZI VE FOTOĞRAF GEÇİŞİ)
   ========================================= */
#large-text, #modal-main-img {
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.fade-out {
    opacity: 0;
    transform: scale(0.95) translateX(-20px); 
}

.fade-in {
    opacity: 0;
    transform: scale(0.95) translateX(20px); 
}

/* --- TAM EKRAN (LIGHTBOX) --- */
.fullscreen-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95); /* Çok koyu arka plan */
    display: none; /* Başlangıçta gizli */
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Modal'ın da üstünde */
    cursor: zoom-out;
}

.fullscreen-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain; /* Orantıyı asla bozma, tüm resmi göster */
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.fullscreen-close-btn {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.fullscreen-close-btn:hover {
    opacity: 1;
}