/* ============================================================
   Zekeriya Çalışkan - Portfolyo Sitesi
   assets/css/style.css
   ============================================================ */

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* ---- Circuit arka plan deseni ---- */
body {
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: -8vh;
    left: -8vw;
    width: 116vw;
    height: 116vh;
    z-index: 0;
    pointer-events: none;
    background-image: radial-gradient(circle at 2px 2px, rgba(37, 99, 235, 0.18) 1px, transparent 0);
    background-size: 32px 32px;
    animation: circuit-sway 9s ease-in-out infinite;
    will-change: transform;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle 420px at var(--mouse-x, 50%) var(--mouse-y, 35%), rgba(0, 83, 219, 0.12), transparent 62%),
        radial-gradient(circle 360px at calc(var(--mouse-x, 50%) + 12vw) calc(var(--mouse-y, 35%) + 10vh), rgba(255, 185, 95, 0.055), transparent 64%);
    opacity: 0.85;
    transition: opacity 0.35s ease;
}

main,
footer {
    position: relative;
    z-index: 1;
}

.circuit-bg {
    background-image: none;
}

@keyframes circuit-sway {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    25% {
        transform: translate3d(10px, -6px, 0);
    }
    50% {
        transform: translate3d(-8px, 8px, 0);
    }
    75% {
        transform: translate3d(6px, 10px, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        animation: none;
    }
}

/* ---- Glow border efekti ---- */
.glow-border {
    position: relative;
}
.glow-border::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    background: linear-gradient(45deg, rgba(37,99,235,0.3), rgba(245,158,11,0.1), rgba(37,99,235,0.3));
    z-index: -1;
    border-radius: inherit;
}

/* ---- Hareket katmanları ---- */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    height: 3px;
    width: var(--scroll-progress, 0%);
    background: linear-gradient(90deg, #0053db, #b4c5ff, #ffb95f);
    box-shadow: 0 0 18px rgba(0, 83, 219, 0.55);
    transform-origin: left center;
    transition: width 0.08s linear;
}

.kinetic-title {
    background-size: 220% 100%;
    animation: title-flow 5s ease-in-out infinite;
}

.status-pill {
    animation: pill-breathe 3.2s ease-in-out infinite;
}

#hero .glow-border {
    animation: hero-float 6.5s ease-in-out infinite;
}

#hero .glow-border img {
    animation: hero-image-drift 13s ease-in-out infinite;
    transform-origin: center;
}

#hero .absolute.top-10,
#hero .absolute.bottom-20 {
    animation: badge-float 4.8s ease-in-out infinite;
}

#hero .absolute.bottom-20 {
    animation-delay: 1.2s;
}

main > div.h-px {
    overflow: hidden;
}

main > div.h-px::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -30%;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(180, 197, 255, 0.75), transparent);
    animation: divider-scan 4.5s ease-in-out infinite;
}

body .fade-up {
    opacity: 0;
    transform: translate3d(0, 34px, 0) scale(0.985);
    filter: blur(5px);
    transition:
        opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.75s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.75s ease;
    transition-delay: var(--reveal-delay, 0ms);
}

body .fade-up.visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

body .project-card,
body .value-card,
body .product-card {
    position: relative;
    isolation: isolate;
}

body .project-card::before,
body .value-card::before,
body .product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 0%, rgba(180, 197, 255, 0.12) 42%, transparent 64%);
    opacity: 0;
    transform: translateX(-65%);
    transition: opacity 0.28s ease, transform 0.55s ease;
}

body .project-card:hover,
body .value-card:hover,
body .product-card:hover {
    transform: translateY(-9px) scale(1.012);
    box-shadow: 0 0 34px rgba(37, 99, 235, 0.24), 0 22px 46px rgba(0, 0, 0, 0.44);
}

body .project-card:hover::before,
body .value-card:hover::before,
body .product-card:hover::before {
    opacity: 1;
    transform: translateX(65%);
}

.timeline-pulse {
    animation: timeline-pop 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes title-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pill-breathe {
    0%, 100% {
        box-shadow: 0 0 0 rgba(255, 185, 95, 0);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 0 24px rgba(255, 185, 95, 0.16);
        transform: translateY(-2px);
    }
}

@keyframes hero-float {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    50% {
        transform: translate3d(0, -14px, 0) rotate(0.35deg);
    }
}

@keyframes hero-image-drift {
    0%, 100% {
        transform: scale(1.02) translate3d(0, 0, 0);
    }
    50% {
        transform: scale(1.07) translate3d(-10px, 8px, 0);
    }
}

@keyframes badge-float {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -9px, 0);
    }
}

@keyframes divider-scan {
    0%, 18% {
        transform: translateX(0);
        opacity: 0;
    }
    35%, 68% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(430%);
        opacity: 0;
    }
}

@keyframes timeline-pop {
    0% {
        transform: scale(0.86);
        box-shadow: 0 0 0 rgba(255, 185, 95, 0);
    }
    55% {
        transform: scale(1.08);
        box-shadow: 0 0 24px rgba(255, 185, 95, 0.22);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 185, 95, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::after,
    .kinetic-title,
    .status-pill,
    #hero .glow-border,
    #hero .glow-border img,
    #hero .absolute.top-10,
    #hero .absolute.bottom-20,
    main > div.h-px::before {
        animation: none;
    }

    body .fade-up,
    body .fade-up.visible {
        filter: none;
        transform: none;
    }
}

/* ---- Proje kartı hover ---- */
.hero-copy {
    width: 100%;
    max-width: 36rem;
    overflow-wrap: break-word;
}
.hero-stat-label {
    letter-spacing: 0;
    overflow-wrap: anywhere;
}
@media (min-width: 640px) {
    .hero-stat-label {
        letter-spacing: 0.1em;
    }
}
@media (max-width: 639px) {
    .hero-copy {
        width: calc(100vw - 72px);
        max-width: 18rem;
    }
}

/* ---- Proje kartı hover ---- */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.project-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 0 30px rgba(37,99,235,0.2), 0 20px 40px rgba(0,0,0,0.4);
    border-color: rgba(0,83,219,0.5);
}
.project-card:hover .project-icon {
    color: #ffb95f;
    transform: scale(1.1);
}
.project-icon {
    transition: color 0.3s ease, transform 0.3s ease;
}

/* ---- Değer kartı hover ---- */
.value-card {
    transition: transform 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.value-card:hover {
    transform: translateY(-4px);
    background-color: #1d2022;
    border-color: rgba(0,83,219,0.4);
}

/* ---- Skill badge hover ---- */
.skill-badge {
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    cursor: default;
}
.skill-badge:hover {
    background-color: rgba(0,83,219,0.2);
    color: #b4c5ff;
    transform: scale(1.05);
}

/* ---- Skill bar animasyonu ---- */
.skill-bar-fill {
    width: 0%;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Timeline ---- */
.timeline-line {
    background: linear-gradient(to bottom, #0053db, #ffb95f, #0053db);
}
.timeline-item {
    transition: opacity 0.5s ease;
}

/* ---- İletişim input ---- */
.contact-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.contact-input:focus {
    outline: none;
    border-color: #0053db;
    box-shadow: 0 0 0 3px rgba(0,83,219,0.15);
}

/* ---- Fade-up animasyonu (IntersectionObserver ile) ---- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Mobil menü ---- */
#mobile-menu {
    transition: max-height 0.4s ease, opacity 0.4s ease;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}
#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* ---- Sosyal link hover ---- */
.social-link {
    transition: color 0.2s ease, transform 0.2s ease;
}
.social-link:hover {
    transform: translateY(-3px);
}

/* ---- Navbar aktif link ---- */
.nav-link.active {
    color: #b4c5ff !important;
}

/* ---- Submit buton loading ---- */
.btn-submit {
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.btn-submit:hover {
    opacity: 0.9;
    transform: scale(1.02);
}
.btn-submit:active {
    transform: scale(0.98);
}

/* ---- Responsive düzeltmeler ---- */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
}
