/* --- 1. PREMIUM THEME VARIABLES --- */
:root {
    /* Light Mode */
    --bg-color: #f2f2f2; /* Saf beyaz yerine kırık beyaz (Göz yormaz) */
    --text-color: #111111;
    --text-secondary: #555555;
    --accent-color: #0044ff; /* Uluslararası Klein Mavisi */
    --navbar-bg: rgba(242, 242, 242, 0.85);
    --border-color: rgba(0,0,0,0.08);
    --card-bg: #ffffff;
    --input-bg: #e5e5e5;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg-color: #050505; /* Simsiyah yerine çok koyu karbon */
    --text-color: #ededed;
    --text-secondary: #888888;
    --accent-color: #4d88ff;
    --navbar-bg: rgba(5, 5, 5, 0.85);
    --border-color: rgba(255,255,255,0.08);
    --card-bg: #0f0f0f;
    --input-bg: #1a1a1a;
}

/* --- 2. GRAIN TEXTURE (PREMIUM DOKU) --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9000;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- 3. TEMEL AYARLAR --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s ease;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .navbar-brand, .nav-link, .btn-magnetic {
    font-family: 'Space Grotesk', sans-serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Lenis Scroll Setup */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

/* --- 4. NAVBAR --- */
.navbar {
    padding: 15px 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: var(--navbar-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s;
}
    /* Scroll aşağı inerken navbarı gizle, yukarı çıkarken göster (JS ile kontrol edilecek) */
    .navbar.hidden {
        transform: translateY(-100%);
    }

.navbar-brand {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -1.5px;
    color: var(--text-color) !important;
}

.nav-link {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-color) !important;
    margin-left: 25px;
    position: relative;
}

    .nav-link::before {
        content: '';
        position: absolute;
        bottom: 0;
        right: 0;
        width: 0;
        height: 1px;
        background: var(--accent-color);
        transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }

    .nav-link:hover::before {
        width: 100%;
        left: 0;
        right: auto;
    }

/* Mobil Menu Icon */
.navbar-toggler {
    border: none;
    padding: 0;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

.hamburger-box {
    width: 30px;
    height: 20px;
    position: relative;
}

.hamburger-inner {
    position: absolute;
    width: 30px;
    height: 2px;
    background: var(--text-color);
    top: 50%;
    transform: translateY(-50%);
    transition: 0.3s;
}

    .hamburger-inner::before, .hamburger-inner::after {
        content: '';
        position: absolute;
        width: 30px;
        height: 2px;
        background: var(--text-color);
        transition: 0.3s;
    }

    .hamburger-inner::before {
        top: -8px;
    }

    .hamburger-inner::after {
        top: 8px;
    }

/* --- 5. HERO SECTION --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
    position: relative;
}

.hero-title {
    font-size: clamp(3.2rem, 9vw, 8rem); /* Responsive Font */
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3.5rem;
    line-height: 1.5;
    font-weight: 300;
}

.btn-magnetic {
    display: inline-block;
    padding: 18px 45px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 100px;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

    .btn-magnetic:hover {
        border-color: var(--accent-color);
        color: var(--accent-color);
    }

/* --- 6. PROJECTS (MOBIL OPTIMIZE EDİLMİŞ) --- */
.project-section {
    padding: 100px 0;
}

.section-label {
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    display: block;
    margin-bottom: 15px;
}

.project-card {
    display: block;
    margin-bottom: 80px;
}

.project-img-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    border-radius: 4px;
    /* MASAÜSTÜ YÜKSEKLİĞİ */
    height: 75vh;
}

.project-img {
    width: 100%;
    height: 115%;
    object-fit: cover;
    /* Lazy Load ve Performans */
    will-change: transform;
}

.project-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.project-title {
    font-size: 1.8rem;
    font-weight: 500;
    margin: 0;
}

.project-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 5px 15px;
    border-radius: 50px;
}

/* --- MOBİL İÇİN ÖZEL AYARLAR --- */
@media (max-width: 768px) {
    .hero-title {
        letter-spacing: -2px;
    }

    .project-card {
        margin-bottom: 60px;
    }
    /* Mobilde görsel yüksekliğini düşür, kullanıcı kaybolmasın */
    .project-img-wrapper {
        height: 45vh;
    }

    .project-title {
        font-size: 1.4rem;
    }

    .project-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* --- 7. CONTACT & FOOTER --- */
.contact-section {
    padding: 120px 0;
    border-top: 1px solid var(--border-color);
}

.form-control-custom {
    background: var(--input-bg);
    border: none;
    border-radius: 0;
    padding: 20px;
    color: var(--text-color);
    font-size: 1rem;
    margin-bottom: 20px;
    transition: 0.3s;
}

    .form-control-custom:focus {
        box-shadow: none;
        background: var(--card-bg);
        border-left: 4px solid var(--accent-color);
    }

footer {
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.social-icons a {
    display: inline-flex;
    width: 50px;
    height: 50px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin: 0 5px;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: 0.3s;
}

    .social-icons a:hover {
        background: var(--text-color);
        color: var(--bg-color);
        border-color: var(--text-color);
    }

/* --- 8. PRELOADER & CURSOR --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-color);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-wrap {
    overflow: hidden;
}

.loader-text {
    font-size: 3rem;
    font-weight: 800;
    font-family: 'Space Grotesk';
    transform: translateY(100%);
}

@media (min-width: 992px) {
    * {
        cursor: none !important;
    }

    .cursor-dot {
        width: 6px;
        height: 6px;
        background: var(--accent-color);
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 10001;
        transform: translate(-50%, -50%);
    }

    .cursor-circle {
        width: 40px;
        height: 40px;
        border: 1px solid var(--text-secondary);
        position: fixed;
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
        transition: width 0.2s, height 0.2s, background-color 0.2s;
    }

    body.hovering .cursor-circle {
        width: 80px;
        height: 80px;
        background: rgba(255,255,255,0.05);
        border-color: transparent;
        backdrop-filter: invert(1);
    }
}

@media (max-width: 991px) {
    .cursor-dot, .cursor-circle {
        display: none;
    }
}