/* =====================================================
   TEMEL AYARLAR & DEĞİŞKENLER
====================================================== */
:root {
    --bg-color: #050509;
    --text-color: #e2e2e2;
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(5, 5, 9, 0.8);
}

[data-theme="light"] {
    --bg-color: #f8f9fa;
    --text-color: #2d3436;
    --primary-color: #0984e3;
    --secondary-color: #00b894;
    --card-bg: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(248, 249, 250, 0.8);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

canvas#bgCanvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* =====================================================
   CINEMATIC INTRO
====================================================== */
#intro {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease-out, visibility 1s;
}
#intro.hidden { opacity: 0; visibility: hidden; }
.intro-inner { text-align: center; color: #fff; animation: introZoom 1.5s ease; }
.intro-sub { font-size: 1rem; letter-spacing: 5px; opacity: 0.7; }
#intro h1 { font-size: 4rem; margin-top: 10px; }
#intro h1 span { color: var(--primary-color); }
@keyframes introZoom {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* =====================================================
   NAVBAR & DİL SEÇİCİ (LANG SWITCHER)
====================================================== */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    padding: 20px 5vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
}
.logo { font-size: 1.5rem; font-weight: 700; }
.logo span { color: var(--primary-color); }
.nav-links { list-style: none; display: flex; gap: 35px; }
.nav-links a { color: var(--text-color); text-decoration: none; font-size: 0.95rem; font-weight: 600; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }
.hamburger { display: none; background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; }

/* Dil Seçici Stilleri */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--text-color);
    opacity: 0.8;
}
.lang-btn {
    cursor: pointer;
    transition: color 0.3s;
    user-select: none;
}
.lang-btn:hover { color: var(--primary-color); }
.lang-btn.active { color: var(--secondary-color); text-shadow: 0 0 8px var(--secondary-color); }
.lang-divider { opacity: 0.4; }

.mobile-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 250px; height: 100vh;
    background: var(--nav-bg);
    backdrop-filter: blur(15px);
    display: flex; flex-direction: column;
    padding-top: 90px; gap: 25px; align-items: center;
    transition: right 0.4s ease;
    z-index: 999;
}
.mobile-menu.active { right: 0; }
.mobile-menu a { color: var(--text-color); text-decoration: none; font-size: 1.2rem; font-weight: 600; }

/* =====================================================
   SECTIONS & LAYOUT
====================================================== */
section { 
    padding: 120px 5vw 80px; 
    min-height: 100vh; 
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
h2 { font-size: 2.5rem; margin-bottom: 10px; }
.section-sub { font-size: 1.1rem; opacity: 0.7; margin-bottom: 50px; }

.hero { 
    flex-direction: row; 
    align-items: center; 
    justify-content: space-between; 
    gap: 40px; 
}
.hero-inner { flex: 1; max-width: 600px; }
.hero-inner h1 { font-size: 3rem; min-height: 80px; color: var(--primary-color); line-height: 1.2; margin-bottom: 15px;}
.hero-inner p { font-size: 1.2rem; line-height: 1.6; margin-bottom: 35px; opacity: 0.85; }
.cta { display: inline-block; padding: 15px 35px; background: var(--primary-color); color: white; text-decoration: none; border-radius: 30px; font-weight: 600; letter-spacing: 0.5px; transition: 0.3s; box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);}
.cta:hover { background: var(--secondary-color); transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 206, 201, 0.4);}

.hero-avatar { flex: 0 0 auto; }
.hero-avatar img { width: 320px; height: 320px; border-radius: 50%; object-fit: cover; border: 6px solid var(--border-color); box-shadow: 0 10px 40px rgba(0,0,0,0.5); transition: 0.3s; }
.hero-avatar img:hover { border-color: var(--primary-color); transform: scale(1.02); }
.avatar-note { text-align: center; margin-top: 20px; font-weight: 600; font-size: 0.95rem; opacity: 0.7; letter-spacing: 1px;}

.avatar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 25px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}
.cv-preview-box {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    width: 100%;
    justify-content: center;
    align-items: center;
}
.cv-link {
    font-size: 0.85rem;
    color: var(--text-color);
    text-decoration: underline;
    opacity: 0.6;
    transition: 0.3s;
}
.cv-link:hover { opacity: 1; color: var(--secondary-color); }
.cta-cv-small {
    padding: 6px 18px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.cta-cv-small:hover { background: var(--secondary-color); transform: translateY(-2px); }

/* KOMPAKT İSTATİSTİK ÇUBUĞU */
.stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 25px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    margin: 20px auto;
    max-width: 800px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.stat-item h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}
.stat-item p {
    font-size: 0.85rem;
    opacity: 0.7;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* CARDS */
.project-list { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 35px; 
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 35px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.3s, border-color 0.3s;
    transform-style: preserve-3d;
    will-change: transform;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.card:hover { border-color: var(--primary-color); box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
.card h3 { font-size: 1.4rem; margin-bottom: 15px; color: var(--text-color); }
.card p { font-size: 1rem; line-height: 1.7; opacity: 0.85; margin-bottom: 25px; flex-grow: 1; }

.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.tag { background: rgba(108, 92, 231, 0.15); color: var(--primary-color); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; border: 1px solid rgba(108, 92, 231, 0.3);}

/* TEKNOLOJİ YIĞINI */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}
.skill-badge {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    padding: 12px 25px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    backdrop-filter: blur(5px);
    transition: 0.3s;
    cursor: default;
}
.skill-badge:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(108, 92, 231, 0.3);
}

/* TIMELINE */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 30px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -38px; top: 20px;
    width: 18px; height: 18px;
    background: var(--bg-color);
    border: 4px solid var(--primary-color);
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 0 10px var(--primary-color);
}
.timeline-content { margin-left: 20px; }

/* FOOTER */
.footer {
    background: #020204;
    padding: 60px 5vw;
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.footer-content { max-width: 800px; margin: 0 auto; }
.footer .logo { font-size: 1.2rem; margin-bottom: 10px; opacity: 0.6; }
.footer p { font-size: 0.9rem; opacity: 0.4; margin-bottom: 20px; }
.social-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; }
.social-links a { color: var(--text-color); text-decoration: none; font-size: 0.9rem; opacity: 0.6; transition: 0.3s; }
.social-links a:hover { color: var(--primary-color); opacity: 1; }
.copyright { font-size: 0.8rem; opacity: 0.3; letter-spacing: 1px; }

[data-theme="light"] .footer { background: #f1f3f5; border-top: 1px solid rgba(0, 0, 0, 0.1); }
[data-theme="light"] .footer p, [data-theme="light"] .copyright, [data-theme="light"] .social-links a { color: #2d3436; }
[data-theme="light"] .footer .logo { color: #000; }

/* =====================================================
   YÜZEN BUTON KULESİ (FIXED STACK)
====================================================== */
.theme-toggle, .to-top, .whatsapp-float, .dev-mode-btn {
    position: fixed; 
    left: 25px;
    width: 52px; 
    height: 52px; 
    border-radius: 50%; 
    border: none;
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer; 
    z-index: 100; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); 
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.theme-toggle { bottom: 25px; background: var(--primary-color); color: white; font-size: 1.3rem; }
.to-top { bottom: 25px; right: 25px; left: auto; background: var(--primary-color); color: white; font-size: 1.3rem; display: none; }
.whatsapp-float { bottom: 90px; background: #25d366; }
.whatsapp-float img { width: 30px; }

.dev-mode-btn {
    bottom: 155px; 
    border: 1px solid #00ff00;
    background: #111;
    color: #00ff00;
    font-size: 1.2rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.2);
}

.theme-toggle:hover, .to-top:hover { transform: scale(1.1); background: var(--secondary-color); }
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4); }
.dev-mode-btn:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(0, 255, 0, 0.4); }

/* =====================================================
   TERMINAL INTERFACE (DEV MODE)
====================================================== */
#terminal-mode {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(5px);
}
#terminal-mode.active { opacity: 1; visibility: visible; }

.terminal-window {
    width: 80%;
    max-width: 800px;
    height: 60vh;
    background: #121212;
    border-radius: 8px;
    border: 1px solid #333;
    box-shadow: 0 20px 60px rgba(0,255,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
}
.terminal-header {
    background: #2a2a2a;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #bbb;
    font-size: 0.9rem;
}
#closeTerminal {
    background: #ff5f56;
    border: none;
    width: 14px; height: 14px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}
#closeTerminal:hover { transform: scale(1.2); }
.terminal-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
    color: #00ff00;
    display: flex;
    flex-direction: column;
    cursor: text;
}
.terminal-output p { margin: 5px 0; line-height: 1.5; font-size: 1.05rem; }
.terminal-input-line { display: flex; margin-top: 10px; align-items: center; }
.prompt { color: #00cec9; margin-right: 10px; font-weight: bold; }
#terminalInput {
    background: transparent;
    border: none;
    color: #00ff00;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.05rem;
    flex-grow: 1;
    outline: none;
    caret-color: #00ff00;
}

/* RESPONSIVE DESIGN */
.fade { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 992px) {
    .hero { flex-direction: column-reverse; text-align: center; margin-top: 40px; }
    .hero-inner { max-width: 100%; }
    .hero-avatar img { width: 260px; height: 260px; }
    h2 { font-size: 2.2rem; }
    .stats { gap: 30px; }
    .lang-switcher { margin-right: 40px; } /* Mobil menü açıldığında kaymaması için */
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    section { padding: 100px 6vw 50px; }
    h2 { font-size: 2rem; }
    .hero-inner h1 { font-size: 2.4rem; min-height: 60px; }
    .project-list { grid-template-columns: 1fr; }
    .timeline { padding-left: 20px; }
    .timeline-dot { left: -28px; width: 14px; height: 14px; border-width: 3px; top: 25px;}
    .timeline-content { margin-left: 10px; }
}
@media (max-width: 600px) {
    .stats { gap: 20px; }
    .stat-item h3 { font-size: 1.4rem; }
}