/* CSS Değişkenleri */
:root {
    --card-opacity: 0.2;
    --border-gradient: conic-gradient(from 0deg, transparent, #764ba2, #667eea, transparent);
    --aura-gradient: linear-gradient(-45deg, #ff9a9e, #fecfef, #fbc2eb, #a18cd1);
    --network-color: rgba(0, 0, 0, 0.15);
    --accent-color: #FF8C00;
}
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #d5dbe1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism Kart Yapısı */
.card {
    position: relative;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    width: 100%;
    max-width: 950px;
    min-height: 500px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    margin: 20px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
}

.card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.2), 0 0 15px rgba(0, 0, 0, 0.5);
}

/* Sol Kolon: Profil Resmi */
.profile-col {
    flex: 1;
    min-width: 350px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.img-container {
    position: relative;
    width: 350px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.profile-img {
    width: 280px;
    height: 280px;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    transition: transform 0.5s;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.img-container:hover .profile-img {
    transform: scale(1.05);
}

/* Sağ Kolon: İçerik */
.content-col {
    flex: 1.5;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Üst Kısım: Logo ve Tema Butonu */
.header-row {
    position: absolute;
    top: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    z-index: 1000;
}

.logo-area {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.8;
    text-decoration: none;
    animation: logoGlow 3s infinite alternate;
    transition: color 0.3s ease;
}

.logo-img {
    max-height: 65px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.6s ease-in-out, filter 0.5s ease;
    filter: invert(1); /* Beyaz logoyu aydınlık temada siyah yapar */
}

.logo-area i, .logo-area .logo-img {
    transition: transform 0.6s ease-in-out;
}

.logo-area:hover i {
    transform: none;
}

.logo-area:hover .logo-img {
    transform: scale(1.1);
    filter: invert(1) drop-shadow(0 0 20px #FF4500);
}

@keyframes logoGlow {
    0% { text-shadow: 0 0 2px rgba(0,0,0,0.1); transform: scale(1); }
    50% { text-shadow: 0 0 15px rgba(118, 75, 162, 0.5); transform: scale(1.02); }
    100% { text-shadow: 0 0 2px rgba(0,0,0,0.1); transform: scale(1); }
}

/* Bilgi Alanı */
.name {
    font-family: 'Montserrat', sans-serif;
    font-size: 38px;
    color: #000000;
    margin-bottom: 5px;
    font-weight: 800;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-right: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.3s ease;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.title {
    color: #111827;
    font-size: 18px;
    margin-bottom: 25px;
    font-weight: 600;
    letter-spacing: 1px;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border-right: 3px solid transparent;
    white-space: nowrap;
    overflow: hidden;
    transition: color 0.3s ease;
}

/* Alt Kısım: Sosyal Medya ve Buton */
.action-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 20px;
    width: 100%;
    animation: fadeInUp 0.8s ease forwards 0.6s;
    opacity: 0;
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #1f2937;
    margin: 0;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn-glass {
    background: #333;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.2s;
    font-weight: 600;
}

.btn-glass:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Yazı Giriş Animasyonu */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes softFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.typing-active {
    border-right-color: var(--accent-color) !important;
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    from, to { border-color: transparent }
    50% { border-color: var(--accent-color); }
}

/* Sosyal Medya Tooltip ve Buton Düzenlemeleri */
.social-icon {
    position: relative;
}

.social-icon span {
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
    z-index: 100;
}

#themeToggle span {
    display: none !important;
}

.social-icon:hover span {
    opacity: 1;
    visibility: visible;
    top: -45px;
}

button.social-icon {
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    outline: none;
}

/* Karanlık Mod (Dark Mode) Stilleri */
body.dark-mode {
    background-color: #121212;
    --border-gradient: conic-gradient(from 0deg, transparent, #00f2fe, #4facfe, transparent);
    --aura-gradient: linear-gradient(-45deg, #30cfd0, #330867, #5f72bd, #9b23ea);
    --network-color: rgba(255, 255, 255, 0.1);
    --accent-color: #FF8C00;
}

body.dark-mode .rotating-frame {
    background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.8), transparent 60%);
}

body.dark-mode .card {
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

body.dark-mode .card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 20px var(--accent-color);
}

body.dark-mode .logo-area {
    color: #e0e0e0;
}

body.dark-mode .name {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .logo-area {
    animation: logoGlowDark 3s infinite alternate;
}

@keyframes logoGlowDark {
    0% { text-shadow: 0 0 2px rgba(255,255,255,0.1); }
    50% { text-shadow: 0 0 15px rgba(255,255,255,0.4); }
    100% { text-shadow: 0 0 2px rgba(255,255,255,0.1); }
}

body.dark-mode .title {
    color: #f3f4f6;
}

/* Logonun koyu temada beyaza dönmesi için filtre */
body.dark-mode .logo-img {
    filter: invert(0); /* Koyu temada orijinal beyaz rengine döner */
}

body.dark-mode .logo-area:hover .logo-img {
    transform: scale(1.1);
    filter: invert(0) drop-shadow(0 0 20px var(--accent-color));
}

body.dark-mode .social-icon span {
    background: #eee;
    color: #111;
}

body.dark-mode .social-icon {
    background: rgba(255, 255, 255, 0.08);
    color: #f3f4f6;
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

body.dark-mode .social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* Sosyal Medya Marka Renkleri (Hover) */
.social-icon.github:hover, 
body.dark-mode .social-icon.github:hover {
    background-color: #24292e;
    color: white;
    border-color: #24292e;
}

.social-icon.linkedin:hover, 
body.dark-mode .social-icon.linkedin:hover {
    background-color: #0077b5;
    color: white;
    border-color: #0077b5;
}

.social-icon.instagram:hover, 
body.dark-mode .social-icon.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: white;
    border-color: transparent;
}

.social-icon.x-twitter:hover {
    background-color: #000;
    color: white;
    border-color: #000;
}

body.dark-mode .social-icon.x-twitter:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.social-icon.email:hover, 
body.dark-mode .social-icon.email:hover {
    background-color: #db4437;
    color: white;
    border-color: #db4437;
}
body.dark-mode .btn-glass {
    background: #e0e0e0;
    color: #121212;
}

/* Ayar Grubu */
.setting-group {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

body.dark-mode .setting-group {
    color: #e0e0e0;
}

#opacitySlider {
    -webkit-appearance: none;
    appearance: none;
    width: 100px;
    height: 5px;
    background: rgba(0,0,0,0.1);
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

body.dark-mode #opacitySlider {
    background: rgba(255,255,255,0.2);
}

#opacitySlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
}

body.dark-mode #opacitySlider::-webkit-slider-thumb {
    background: #e0e0e0;
}

/* Nöron Ağı Canvas */
#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Yıldız Kayma Canvas */
#starsCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .card {
        flex-direction: column;
        max-width: 95%;
        margin: 10px auto;
        min-height: auto;
        animation: softFadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    }
    
    .profile-col {
        min-width: auto;
        height: 200px;
        padding-top: 30px;
    }

    .header-row {
        display: none; /* Mobilde logoyu gizle */
    }

    .content-col {
        padding: 20px;
    }

    .name {
        font-size: 1.8rem;
        white-space: normal; /* Küçük ekranlarda ismin alt satıra geçebilmesi için */
        line-height: 1.2;
    }

    .title {
        font-size: 1rem;
    }

    .action-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: center;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }

    .img-container {
        width: 180px;
        height: 180px;
    }
}

/* Çok Küçük Ekranlar İçin Ekstra Optimizasyon (360px ve altı) */
@media (max-width: 360px) {
    .name {
        font-size: 1.5rem;
    }
    .profile-img {
        width: 130px;
        height: 130px;
    }
}