/* --- GENEL STİLLER VE DEĞİŞKENLER --- */
:root {
    --bg-color: #1a1a1a; /* Koyu antrasit arka plan */
    --primary-text: #E0E0E0; /* Hafif kırık beyaz metin */
    --accent-color: #4CAF50; /* Askeri yeşil vurgu rengi */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Fira Code', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--primary-text);
    font-family: var(--font-body);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: #ffffff;
}
/* --- HERO SECTION STİLLERİ --- */
#hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 0 20px;

    /* --- YENİ EKLENEN ARKA PLAN KODLARI --- */
    
    /* Arka plan görselinin üzerine yarı şeffaf bir siyah katman ekliyoruz */
	background-image: linear-gradient(rgba(26, 26, 26, 0.95), rgba(26, 26, 26, 0.95)), url('../img/hero-bg.webp');    
    background-size: cover; /* Görselin tüm alanı kaplamasını sağlar */
    background-position: center center; /* Görseli ortalar */
    background-attachment: fixed; /* Kaydırma sırasında arka planın sabit kalmasını sağlar (parallax efekti) */
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--primary-text);
    font-family: var(--font-heading);
}

/* Geniş ekranlar için font boyutlarını büyütelim */
@media (min-width: 768px) {
    .hero-content h1 {
        font-size: 4rem;
    }
    .hero-content p {
        font-size: 1.5rem;
    }
}

/* Typed.js kütüphanesinin imleç (cursor) stili */
.typed-cursor {
    color: var(--accent-color);
    animation: typedjsBlink 0.7s infinite;
}
@keyframes typedjsBlink {
    50% { opacity: 0.0; }
}
/* --- CONTAINER & HEADER STİLLERİ --- */

/* Bu genel container sınıfını diğer bölümlerde de kullanacağız */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

#main-header {
    position: fixed; /* Sayfa kaysa bile üstte sabit kalır */
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 100; /* Diğer tüm elementlerin üstünde olmasını sağlar */
    transition: background-color 0.3s ease;
    
    /* Modern yarı-şeffaf ve bulanık arka plan efekti */
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Safari desteği için */
}

#main-header .container {
    display: flex;
    justify-content: space-between; /* Logoyu sola, menüyü sağa yaslar */
    align-items: center;
}

/* --- YENİ LOGO STİLLERİ --- */
.logo {
    display: block;
    width: 50px; /* Logonun genişliği */
    height: 50px; /* Logonun yüksekliği */
    color: var(--accent-color); /* Logonun rengini yeşil yapar */
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    padding: 5px;
    transition: all 0.3s ease;
}

.logo svg {
    width: 100%;
    height: 100%;
}

.logo:hover {
    background-color: var(--accent-color);
    color: var(--bg-color); /* Üzerine gelince SVG'nin rengini koyu yapar */
    transform: rotate(90deg); /* Üzerine gelince dönme efekti */
}

#main-header nav ul {
    list-style: none;
    display: flex;
}

#main-header nav ul li {
    margin-left: 25px;
}

#main-header nav a {
    color: var(--primary-text);
    text-decoration: none;
    font-weight: 700;
    position: relative;
    padding-bottom: 5px;
}

/* Linklerin altına hover efekti için çizgi ekleyelim */
#main-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%; /* Genişlik hep %100 olsun */
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0); /* Başlangıçta görünmez yap (yatayda ölçek 0) */
    transform-origin: left; /* Büyüme soldan başlasın */
    transition: transform 0.3s ease-in-out;
}

#main-header nav a:hover::after {
    transform: scaleX(1); /* Üzerine gelince görünür yap */
}

#main-header nav a:hover::after {
    width: 100%;
}
/* --- ABOUT SECTION STİLLERİ --- */
#about {
    padding: 100px 0;
    position: relative; /* Arka plan kodu için gerekli */
    overflow: hidden; /* Arka plan kodunun taşmasını engeller */
}

/* Tüm bölüm başlıkları için ortak bir stil oluşturalım */
.section-title {
    font-size: 2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}
.section-title .section-number {
    color: var(--accent-color);
    margin-right: 10px;
}

.about-content {
    display: grid; /* İki sütunlu yapı için grid kullanıyoruz */
    grid-template-columns: 3fr 2fr; /* Metin 3 birim, resim 2 birim yer kaplasın */
    gap: 30px; /* Sütunlar arası boşluk */
    align-items: center;
}

.about-text p {
    margin-bottom: 1em;
}

.about-image picture,
.about-image img {
    width: 100%;
    border-radius: 5px;
    border: 3px solid var(--accent-color);
}

/* Arka plandaki estetik kod bloğu */
.code-background {
    position: absolute;
    top: 50%;
    left: 45%;
    transform: translateY(-50%) rotate(-10deg);
    font-family: var(--font-heading);
    font-size: 14px;
    line-height: 1.2;
    color: #ffffff;
    opacity: 0.05; /* Çok soluk olmasını sağlıyoruz */
    z-index: -1;
    user-select: none; /* Metnin seçilmesini engeller */
}

/* Mobil ve küçük tabletler için tek sütuna düşürelim */
@media (max-width: 900px) {
    .about-content {
        grid-template-columns: 1fr; /* Tek sütun */
    }

    .about-image {
        order: -1; /* Resmi yukarı al */
        margin-bottom: 40px;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }

    .code-background {
      display: none; /* Mobilde arka plan kodunu gizle */
    }
}
/* --- PROJECTS SECTION STİLLERİ --- */
#projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Sabit 3 sütunlu yapı */
    gap: 30px;
}

.project-card {
    background-color: #2a2a2a;
    border-radius: 5px;
    overflow: hidden; /* Resmin köşelerinin de yuvarlak olmasını sağlar */
    border: 1px solid #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    border-color: var(--accent-color);
}

.project-card img {
    width: 100%;
    height: auto; /* Yüksekliği otomatik ayarlayarak en-boy oranını korur */
    max-height: 50vh; /* Ekran yüksekliğinin %50'sinden fazla yer kaplamasını engeller */
    object-fit: contain; /* Görselin tamamının bu alana sığmasını garanti eder */
    display: block; /* Altında oluşabilecek istenmeyen boşlukları kaldırır */
    border-radius: 5px;
    margin-bottom: 20px;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin-top: 0;
    font-size: 1.3rem;
}

.project-tags {
    margin-top: 15px;
}

.project-tags span {
    display: inline-block;
    background-color: #333;
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: 3px;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* --- MODAL (POP-UP) STİLLERİ --- */
.modal {
    display: none; /* Başlangıçta gizli */
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--bg-color);
    border: 1px solid #333;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 700px;
    border-radius: 5px;
    position: relative;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
  from {opacity: 0; transform: scale(0.9);}
  to {opacity: 1; transform: scale(1);}
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #fff;
}

#modal-img {
    width: 100%;
    height: auto; /* Yüksekliği otomatik ayarlayarak en-boy oranını korur */
    max-height: 50vh; /* Ekran yüksekliğinin %50'sinden fazla yer kaplamasını engeller */
    object-fit: contain; /* Görselin tamamının bu alana sığmasını garanti eder */
    display: block; /* Altında oluşabilecek istenmeyen boşlukları kaldırır */
    border-radius: 5px;
    margin-bottom: 20px;
}
/* --- CONTACT SECTION STİLLERİ --- */
#contact {
    padding: 100px 0;
    text-align: center;
}

.contact-intro {
    max-width: 600px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 10px 10px 10px;
    background-color: #2a2a2a;
    border: 2px solid #333;
    border-radius: 5px;
    color: var(--primary-text);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group label {
    position: absolute;
    top: 13px;
    left: 10px;
    color: #888;
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Kayan Etiket (Floating Label) Efekti */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    left: 10px;
    font-size: 0.8rem;
    color: var(--accent-color);
    background-color: var(--bg-color);
    padding: 0 5px;
}

#contact-form button {
    display: inline-block;
    padding: 12px 30px;
    border: 2px solid var(--accent-color);
    border-radius: 5px;
    background-color: transparent;
    color: var(--accent-color);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

#contact-form button:hover {
    background-color: var(--accent-color);
    color: var(--bg-color);
}

#form-status {
    margin-top: 20px;
    font-weight: bold;
    min-height: 25px;
}

/* --- SKILLS SECTION (FLEXBOX SOLUTION) --- */
#skills {
    padding: 100px 0;
    background-color: #161616;
}

#skills .section-title {
    text-align: center;
    margin-bottom: 60px;
}

/* Ana Kategori Kabını Flexbox Olarak Ayarlıyoruz */
.skills-container {
    display: flex; /* Grid yerine Flex kullanıyoruz */
    flex-wrap: wrap; /* Mobil için alt satıra kaydır */
    gap: 40px;
    align-items: stretch; /* Varsayılan ayar, ama garantilemek için ekliyoruz */
}

/* Her bir kategori sütununu esnek hale getiriyoruz */
.skill-category {
    flex: 1 1 300px; /* Büyü, küçül, temel genişliğin 300px olsun */
    display: flex;
    flex-direction: column;
}

.skill-category h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-bottom: 25px;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
}

/* Kartları içeren ızgaranın, kalan tüm boşluğu doldurmasını sağlıyoruz */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    flex-grow: 1; /* Bu satır, bloğun en alta kadar uzanmasını sağlar */
}

.skill-card {
    background-color: #2a2a2a;
    border-radius: 5px;
    padding: 15px 10px; /* Boşlukları biraz ayarlıyoruz */
    text-align: center;
    border: 1px solid #333;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Dikeyde tam ortalama için center kullanıyoruz */
    min-height: 140px;
}

.skill-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-color: var(--accent-color);
}

/* İkonlara sabit bir dikey alan veriyoruz */
.skill-card i,
.skill-card .custom-fa-icon,
.skill-card img.custom-icon {
    font-size: 3rem;
    line-height: 1;
    height: 50px; /* Tüm ikonlar için sabit yükseklik */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px; /* İkon ve metin arasına boşluk */
}

.skill-card .custom-fa-icon { color: #61DAFB; }

.skill-card span {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--primary-text);
    line-height: 1.2;
    /* Metin alanı için sabit bir yükseklik ayırıyoruz */
    height: 2.4em; /* Bu, metnin 2 satıra kadar sığmasını sağlar */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- MOBİL İÇİN DÜZENLEME --- */
@media (max-width: 1024px) {
    .skill-category {
         /* Tablette her bir kategori en az %40 genişliğinde olacak */
         flex-basis: 40%;
    }
}

@media (max-width: 768px) {
    .skill-category {
         /* Mobilde her bir kategori tam genişlikte olacak */
         flex-basis: 100%;
    }
    .skills-grid {
       grid-template-columns: repeat(2, 1fr);
    }
}

/* --- FOOTER STİLLERİ --- */
#main-footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #333;
}

#main-footer a {
    color: var(--primary-text);
    text-decoration: none;
    margin-bottom: 10px;
    display: inline-block;
}

#main-footer a:hover {
    color: var(--accent-color);
}

#main-footer p {
    font-size: 0.9rem;
    color: #888;
}


/* --- Özel Nişangah İmleci --- */
a, button, .project-card, .logo, .close-button, .skill-card {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%234CAF50" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="12" r="2"/><path d="M12 2v4M12 18v4M2 12h4M18 12h4"/></svg>') 12 12, auto;
}
/* --- Yukarı Çık Butonu Stilleri --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: var(--bg-color);
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    line-height: 50px;
    z-index: 100;
    transition: opacity 0.4s, visibility 0.4s;
    opacity: 0;
    visibility: hidden;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #ffffff;
    color: var(--accent-color);
}
/* --- PROJELER İÇİN MOBİL UYUMLULUK --- */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablette 2 sütun */
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr; /* Mobilde tek sütun */
    }
}
/* --- Hero Bölümü - Kod Editörü Stilleri (GÜNCELLENDİ) --- */
.code-editor {
    background-color: #282c34; /* Daha modern bir editör rengi */
    color: #abb2bf;
    border-radius: 8px;
    padding: 20px;
    padding-top: 10px;
    margin-bottom: 30px;
    font-family: 'Fira Code', monospace;
    font-size: 1rem;
    line-height: 1.8;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    text-align: left;
}

.code-header {
    background-color: #21252b;
    padding: 8px 15px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 0.8rem;
    margin: -10px -20px 15px -20px;
}

#code-output {
    margin: 0;
    white-space: pre-wrap;
}

.line {
    display: inline-block;
    width: 2rem;
    color: #4b5263;
    text-align: right;
    margin-right: 15px;
    user-select: none;
}

/* Yeni JS koduna uygun yeni stil sınıfları */
.keyword-class .keyword { color: #c678dd; }
.keyword-class .class-name { color: #61afef; }
.string { color: #98c379; }
.default { color: #abb2bf; }

/* --- Kod Editörü İmleç Stilleri (GÜNCELLENDİ) --- */
.cursor {
    display: inline-block;
    width: 2px; /* İnce çizgi */
    height: 1.2rem; /* Yazı boyutuna uygun yükseklik */
    background-color: var(--accent-color); /* Yeşil renk */
    margin-left: 2px; /* Son harften hafif boşluk */
    vertical-align: middle; /* Metinle dikey olarak ortala */
    animation: blink-cursor 0.6s infinite; /* Hızlı yanıp sönme */
}

@keyframes blink-cursor {
  50% { opacity: 0; }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--primary-text);
    font-family: var(--font-heading);
    text-align: center;
    margin-top: 20px;
}

/* Mobil görünüm için font boyutunu küçült */
@media (max-width: 768px) {
    .code-editor {
        font-size: 0.8rem;
        padding: 15px;
        margin-bottom: 20px;
        line-height: 1.6;
    }
}

/* --- Form Durum Mesajı Stili --- */
#form-status {
    margin-top: 20px;
    font-weight: bold;
    min-height: 25px; /* Boşken yer kaplamaması ama doluyken alanı ittirmemesi için */
    text-align: center;
}