/* Genel Ayarlar & Reset */
:root {
    /* Dark Mode (Default) */
    --bg-color: #050505;
    --surface-color: #121212;
    --primary-red: #ff3333;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;

    /* Light Mode Variables (will be applied via .light-mode class) */
    --bg-light: #f8f9fa;
    /* Çok hafif grimsi beyaz, göz yormaz */
    --surface-light: #ffffff;
    --text-main-light: #212529;
    /* Tam siyah değil, koyu gri */
    --text-muted-light: #6c757d;
    --border-light: #dee2e6;

    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'JetBrains Mono', monospace;
}

body.light-mode {
    --bg-color: #f3f4f6;
    /* Soğuk, modern gri-beyaz */
    --surface-color: #ffffff;
    /* Kartlar tam beyaz */
    --text-main: #111827;
    /* Antrasit siyah (Tam siyah değil) */
    --text-muted: #4b5563;
    /* Orta gri */
    --border-color: #e5e7eb;
    /* Çok silik gri */
    --primary-red: #dc2626;
    /* Neon yerine daha tok, kurumsal kırmızı */
    --hover-red: #b91c1c;
}

/* Light Mode Header & Nav */
body.light-mode header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

/* Light Mode Kartlar */
body.light-mode .project-card,
body.light-mode .about-card,
body.light-mode .code-block {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Hafif gölge */
}

body.light-mode .project-card:hover,
body.light-mode .about-card:hover {
    border-color: var(--primary-red);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.1);
}

/* Light Mode Görseller */
body.light-mode .card-image {
    background-color: #f9fafb;
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    border-bottom: 1px solid #e5e7eb;
}

/* Light Mode Etiketler */
body.light-mode .tags span {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #374151;
}

body.light-mode .footer-left h4 {
    color: var(--text-main);
}

body.light-mode .header-controls button {
    color: var(--text-main);
}


/* Header Controls */
.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

#theme-toggle:hover {
    transform: rotate(30deg);
    color: var(--primary-red);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}



a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Header & Navigasyon */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    /* Daha ince olması için padding azaltıldı */
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}


body .logo img {
    display: flex;
    height: 48px;
}

body .logo img.logo-dark {
    display: none !important;
}

body.light-mode .logo img.logo-light {
    display: none !important;
}

body.light-mode .logo img.logo-dark {
    display: block !important;
}



.red-dot {
    color: var(--primary-red);
}

nav ul {
    display: flex;
    gap: 1.5rem;
    /* Menü öğeleri arasını biraz kıstım */
}

nav a {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    position: relative;
}

nav a:hover,
nav a.active {
    color: var(--text-main);
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-red);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

#menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    /* Temaya göre renk değişsin */
    font-size: 1.5rem;
    cursor: pointer;
}
/*
.btn-contact {
    border: 1px solid var(--primary-red);
    padding: 0.5rem 1.2rem;
    color: var(--primary-red) !important;
}

.btn-contact:hover {
    background-color: var(--primary-red);
    color: var(--text-main) !important;
}

.btn-contact::after {
    display: none;
}
*/
/* Hero Bölümü */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    padding-top: 40px;
    /* Üst menüden uzaklaşması için boşluk artırıldı */
    /* Header payı */
    position: relative;
}

/* Arka plan ızgara efekti */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 51, 51, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 51, 51, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    pointer-events: none;
}

.hero-content {
    flex: 1;
    max-width: 600px;
}

.subtitle {
    color: var(--primary-red);
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.red-text {
    color: var(--primary-red);
    text-shadow: 0 0 20px rgba(255, 51, 51, 0.3);
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Butonlar */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-red);
    color: #fff;
    border: 1px solid var(--primary-red);
    margin-right: 1rem;
    box-shadow: 4px 4px 0 rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-red);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(255, 51, 51, 0.2);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-main);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Hero Sağ Taraf - Code Visual */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.code-block {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 450px;
    position: relative;
    box-shadow: -10px 10px 0 var(--border-color);
}

.code-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: #333;
    /* Yuvarlak köşe yok - kare */
}

.dot.red {
    background-color: var(--primary-red);
}

.code-block pre {
    color: #ccc;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-x: auto;
}

/* Bölüm Başlıkları */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 50%;
    height: 3px;
    background-color: var(--primary-red);
    margin: 0.5rem auto 0;
}

/* Light Mode Overrides */
body.light-mode header {
    background-color: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border-color);
}

body.light-mode footer,
body.light-mode .about-section {
    background-color: #f0f0f0;
}

body.light-mode .card-image {
    background-color: #eee;
    background-image: radial-gradient(#ccc 1px, transparent 1px);
}

body.light-mode .tags span {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: #ccc;
    color: #333;
}

body.light-mode nav {
    background-color: #ffffff;
}

body.light-mode .dot {
    background-color: #ddd;
}

body.light-mode .footer-left h4 {
    color: #000;
}

/* Hakkımda */
.about-section {
    padding: 5rem 5%;
    background-color: #080808;
}

.about-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.about-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: 0.3s;
}

.about-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
}

.about-card i {
    font-size: 2.5rem;
    color: var(--primary-red);
    margin-bottom: 1.5rem;
}

.about-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-muted);
}

/* Projeler */
.projects-section {
    padding: 5rem 5%;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    border: 1px solid var(--border-color);
    background-color: var(--surface-color);
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: var(--primary-red);
}

.card-image {
    height: 200px;
    background-color: #222;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    /* Gerekirse buraya bir desen veya görsel gelebilir */
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 10px 10px;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 3em;
    overflow: hidden;
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tags span {
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border: 1px solid #333;
}

.link-arrow {
    color: var(--primary-red);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.link-arrow:hover gap {
    gap: 10px;
}

/* İletişim / CTA */
.cta-section {
    padding: 5rem 5%;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-color) 0%, rgba(255, 51, 51, 0.05) 100%);
    border-top: 1px solid var(--border-color);
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.btn-outline {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    border: 2px solid var(--primary-red);
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    letter-spacing: 1px;
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 51, 51, 0.4);
}

/* Footer */
footer {
    padding: 3rem 5%;
    border-top: 1px solid var(--border-color);
    background-color: #000;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

body footer .logo img {
    height: 32px;
}

.footer-left h4 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: #fff;
}

.footer-left p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-right {
    display: flex;
    gap: 1.5rem;
}

.footer-right a {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.footer-right a:hover {
    color: var(--primary-red);
}

.copyright {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid #111;
}

/* Responsif Tasarım */
@media (max-width: 768px) {
    header {
        padding: 1rem 5%;
        position: relative;
        /* Sticky olmasın */
        background-color: var(--bg-color);
        /* Arkası şeffaf olmasın */
    }

    .logo {
        font-size: 1.5rem;
    }

    #menu-btn {
        display: block;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--border-color);
        padding: 2rem;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        /* Kapalı hali */
        transition: 0.5s ease;
        z-index: 1001;
        /* Menü her şeyin üstünde */
    }


    nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        /* Açık hali */
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 30px;
        /* Mobilde biraz daha yukarı alındı */
        /* Header artık fixed olmadığı için daha az boşluk yeterli */
        min-height: auto;
        /* Tam ekran zorunluluğu kalkabilir veya kalabilir, auto daha güvenli */
        padding-bottom: 20px;
    }

    /* Intro font size reduce for mobile */
    .intro-logo {
        font-size: 3rem;
        letter-spacing: 2px;
        white-space: pre-wrap;
        /* Mobilde taşarsa alt satıra geçsin diyeceğim ama animation için nowrap lazım */
        /* Mobilde font çok büyükse sığmayabilir, resize ettik zaten. */
    }

    .hero-content {
        margin-top: 1rem;
        /* Daha az boşluk */
        margin-bottom: 3rem;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .hero-visual {
        justify-content: center;
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

/* === MAIN CONTENT STANDARDIZATION === */
/* Bu bölüm, tüm sayfalardaki yazıların hizasını ve boşluklarını yönetir */

main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    /* Ortala */
    padding-left: 20px;
    padding-right: 20px;
    margin-top: 80px;
}

.section-title {
    font-size: 3rem;
    font-family: var(--font-heading);
    color: var(--primary-red);
    margin-bottom: 3rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: left;
    /* Animasyonları tamamen devre dışı bırak */
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    margin-bottom: 1rem;
    display: block;
    /* Sola yaslı */
}

/* MOBİL İÇİN ÖZEL AYARLAR (OVERRIDE) */
@media (max-width: 768px) {
    main {
        padding-top: 0px;
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .hero-content {
        margin-top: 1rem;
    }

    .cta-group a {
        margin-bottom: 1rem;
    }
}