/* =================================== */
/* style.css - TEMİZLENMİŞ VE DÜZELTİLMİŞ */
/* =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

:root {
    --dark-bg: #0a0a0a;
    --darker-bg: #050505;
    --accent: rgba(26, 173, 163, 0.4);
    --accent-glow: rgba(26, 173, 163, 0.4);
    --text: #ffffff;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    position: relative;
    /* * DÜZELTME: Buradaki 'padding-left: 2.5rem;' kaldırıldı. 
     * Hizalama artık üst element olan .navbar'ın 'padding: 1.5rem 5%;' kuralı ile yapılıyor.
     */
}

/* Logo resminin boyutunu ayarlar */
.navbar .logo img {
    height: 40px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    /* 'padding-left: 5%' kuralı .navbar ile hizalamayı sağlar */
    padding: 12% 5%;
}

.hero-content {
    flex: 1;
    padding-right: 5rem;
}

.hero-image {
    flex: 1;
    text-align: center;
    position: relative;
}

.profile-img {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 50px var(--accent-glow);
    animation: float 3s ease-in-out infinite;
    filter: grayscale(0.2) contrast(1.1);
}

.profile {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 50px var(--accent-glow);
    animation: float 3s ease-in-out infinite;
    filter: grayscale(0.2) contrast(1.1);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.hero h1 {
    display: inline-block;
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, var(--accent), var(--accent),
            #ffffff 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--accent), #27ae60);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}


/* =================================== */
/* SKILLS VE SERVICES BÖLÜMLERİ      */
/* =================================== */

.skills,
.services {
    /* 'padding-left: 5%' kuralı .navbar ile hizalamayı sağlar */
    padding: 5rem 5%;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* Services grid (aynı skills-grid gibi) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.skills-card,
.service-card {
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
}

.skills-card:hover,
.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.skills-card i,
.service-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    /* Font Awesome ikonları için */
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands";
    font-weight: 900;
}

.skills-card h3,
.service-card h3 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    flex-grow: 0;
}

.skills-card p,
.service-card p {
    flex-grow: 1;
    margin-bottom: 0;
}


/* =================================== */
/* FOOTER (İLETİŞİM) BÖLÜMÜ          */
/* =================================== */

footer {
    /* 'padding-left: 5%' kuralı .navbar ile hizalamayı sağlar */
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: var(--text);
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* =================================== */
/* MOBİL UYUMLULUK (MEDIA QUERY)     */
/* =================================== */

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }

    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }

    .profile-img {
        width: 280px;
        height: 280px;
    }

    .nav-links {
        display: none;
    }

    .logo {
        font-size: 1.5rem;
        /* * DÜZELTME: Buradaki 'padding-left: 2rem;' kaldırıldı. 
         * Hizalama zaten .navbar'dan geliyor.
         */
    }
}


/* =================================== */
/* "FLIP-TEXT" ANİMASYONU             */
/* =================================== */

@import url(https://fonts.bunny.net/css?family=sixtyfour:400);

@layer demo {
    section {
        align-content: center;
        font-family: "Sixtyfour", monospace;
    }

    .flip-text {
        --clr-1: dodgerblue;
        --clr-2: hotpink;
        --clr-3: rgb(94 165 0);

        --translate-distance: 1lh;
        --duration: 3s;
        --timing-function: cubic-bezier(0.66, 0, 0.34, 1);

        overflow-y: hidden;
        width: min(100%, 1200px);
        margin-inline: auto;
        display: grid;
        grid-auto-columns: 1fr;
        grid-auto-flow: column;
        gap: 0;
        font-size: clamp(1rem, 4.5vw + 0.05rem, 5rem);
        font-weight: 700;
        color: var(--clr-1);
        line-height: 1;

        &:nth-child(2) {
            font-size: clamp(1rem, 3.5vw + 0.05rem, 3rem);
            font-weight: 300;
            color: var(--clr-2);
            --delay-factor: 300ms;
        }

        &>* {
            --delay: calc(var(--i) * 100ms + var(--delay-factor, 0ms));
            --translate: calc(var(--translate-distance) * 2);

            display: grid;
            place-content: center;

            &:nth-child(1) {
                --i: 1;
            }

            &:nth-child(2) {
                --i: 2;
            }

            &:nth-child(3) {
                --i: 3;
            }

            &:nth-child(4) {
                --i: 4;
            }

            &:nth-child(5) {
                --i: 5;
            }

            &:nth-child(6) {
                --i: 6;
            }

            &:nth-child(7) {
                --i: 7;
            }

            &:nth-child(8) {
                --i: 8;
            }

            &:nth-child(9) {
                --i: 9;
            }

            &:nth-child(10) {
                --i: 10;
            }

            &:nth-child(11) {
                --i: 11;
            }

            &:nth-child(12) {
                --i: 12;
            }

            &:nth-child(13) {
                --i: 13;
            }

            &:nth-child(14) {
                --i: 14;
            }

            &:nth-child(15) {
                --i: 15;
            }

            &:nth-child(16) {
                --i: 16;
            }

            &:nth-child(17) {
                --i: 17;
            }

            &:nth-child(18) {
                --i: 18;
            }

            &:nth-child(19) {
                --i: 19;
            }

            &:nth-child(20) {
                --i: 20;
            }

            &:nth-child(21) {
                --i: 21;
            }

            &:nth-child(22) {
                --i: 22;
            }

            @media not (prefers-reduced-motion) {
                animation-name: flip-transform, flip-translate;
                animation-duration: var(--duration);
                animation-timing-function: var(--timing-function);
                animation-iteration-count: infinite;
                animation-delay: var(--delay);
            }
        }
    }

    @keyframes flip-transform {

        25% {}

        50%,
        100% {
            transform: translateY(calc(var(--translate) * -1));
        }
    }

    @keyframes flip-translate {
        24.999999% {
            opacity: 1;
            translate: 0 0;
        }

        25% {
            opacity: 0;
        }

        25.000001%,
        100% {
            opacity: 1;
            translate: 0 calc(var(--translate) * 1);
        }
    }
}

/* * DÜZELTME: Sondaki tüm tekrarlanan kodlar silindi.
 * (.navbar, .hero, .skills, .services, #contact)
 * Bu kurallar zaten dosyanın başında doğru bir şekilde tanımlanmıştı.
 */
/* =================================== */
/* HAMBURGER MENU - MOBILE ONLY       */
/* =================================== */

/* Hamburger Button */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Sidebar Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    transition: right 0.4s ease;
    z-index: 1001;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.mobile-menu-header img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid var(--accent);
}

.mobile-menu-header h3 {
    color: var(--text);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.mobile-menu-header p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.mobile-menu-links {
    list-style: none;
}

.mobile-menu-links li {
    margin-bottom: 0.5rem;
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.mobile-menu-links i {
    font-size: 1.2rem;
    width: 24px;
    color: var(--accent);
}

/* Menu Overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    z-index: 1000;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    height: 100vh;
}

/* Mobile Only */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
}

/* Desktop */
@media (min-width: 769px) {
    .hamburger,
    .mobile-menu,
    .menu-overlay {
        display: none !important;
    }
}
