/* ======================================
   PROJECTS REDESIGN - COMPLETE FILE
   ====================================== */

/* 1. ROOT VARIABLES & RESET */
:root {
    --bg-primary: #030305;
    --bg-secondary: #0a0a0f;
    --bg-glass: rgba(10, 10, 15, 0.8);
    --bg-card: rgba(20, 20, 35, 0.6);
    --text-primary: #ffffff;
    --text-secondary: #8888aa;
    --text-muted: #555577;
    --accent-purple: #b46bff;
    --accent-cyan: #00d4ff;
    --accent-pink: #ff2d92;
    --accent-lime: #ccff00;
    --gradient-primary: linear-gradient(135deg, #b46bff, #00d4ff);
    --gradient-accent: linear-gradient(135deg, #b46bff, #00d4ff, #ff2d92);
    --glass-border: rgba(255, 255, 255, 0.06);
    --font-primary: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-purple) var(--bg-secondary);
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 2. LAYOUT & BACKGROUND */
.bg-animated {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatOrb 20s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    top: -200px;
    left: -200px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-lime));
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

/* 3. NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-video {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition-normal);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-normal);
}

/* 4. PAGE HEADER & FILTER */
.page-header {
    padding: 10rem 0 4rem;
    text-align: center;
    position: relative;
}

.page-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(180, 107, 255, 0.1);
    border: 1px solid rgba(180, 107, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-purple);
    margin-bottom: 1rem;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-accent);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 5s ease infinite;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.projects-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(180, 107, 255, 0.3);
}

/* 5. NEW PROJECT CARDS (MODERN STACK) */
.projects-section {
    padding: 2rem 0 6rem;
}

.projects-bento {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.project-card {
    background: rgba(20, 20, 35, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(25, 25, 40, 0.8);
}

.project-image {
    height: 180px;
    position: relative;
    overflow: hidden;
    background: #111;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e1e2e, #181825);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 3rem;
    transition: color 0.3s ease;
}

.project-card:hover .project-image-placeholder {
    color: rgba(139, 92, 246, 0.4);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, rgba(20, 20, 35, 1), transparent);
    pointer-events: none;
}

.project-type-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.7rem;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.project-type-badge i {
    color: #8b5cf6;
}

.project-content {
    padding: 1.5rem;
    padding-top: 0.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 24px;
}

.project-tag {
    font-size: 0.7rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    color: #a78bfa;
}

.project-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    line-height: 1.3;
}

.project-card p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    margin-top: auto;
}

.project-link {
    color: #8b5cf6;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
    padding: 0.4rem 0;
}

.project-link:hover {
    color: #fff;
}

.project-link.secondary {
    color: rgba(255, 255, 255, 0.5);
}

.project-link.secondary:hover {
    color: #fff;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(20, 20, 35, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
}

/* 6. MODAL & FOOTER & ANIMATIONS */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
}

.loading-state i {
    font-size: 3rem;
    color: var(--accent-purple);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

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

.footer-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-normal);
}

.social-icon:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-3px);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Modal Stilleri */
.project-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.project-modal {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.project-modal-overlay.active .project-modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--bg-glass);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-normal);
}

.modal-close:hover {
    background: var(--accent-pink);
    border-color: transparent;
}

.modal-cover {
    width: 100%;
    height: 300px;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.modal-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-card), var(--bg-glass));
}

.modal-cover-placeholder i {
    font-size: 5rem;
    color: var(--accent-purple);
    opacity: 0.5;
}

.modal-body {
    padding: 2rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-tags span {
    padding: 0.35rem 0.85rem;
    background: rgba(180, 107, 255, 0.15);
    border: 1px solid rgba(180, 107, 255, 0.25);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--accent-cyan);
}

.modal-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-type {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--bg-card);
    border-radius: 50px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-gallery {
    margin-bottom: 2rem;
}

.modal-gallery h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.gallery-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition-normal);
    border: 1px solid var(--glass-border);
}

.gallery-grid img:hover {
    transform: scale(1.05);
    border-color: var(--accent-purple);
}

.modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.modal-link {
    padding: 0.85rem 1.5rem;
    background: var(--gradient-primary);
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-normal);
}

.modal-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(180, 107, 255, 0.3);
}

.modal-link.secondary {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
}

.modal-link.secondary:hover {
    border-color: var(--accent-purple);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: rgba(15, 15, 30, 0.98);
        width: 100%;
        height: calc(100vh - 70px);
        text-align: center;
        transition: 0.4s ease;
        padding: 2rem 0;
        backdrop-filter: blur(20px);
        gap: 1.5rem;
        display: flex;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .page-title {
        font-size: 2rem;
    }

    .projects-bento {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .project-card {
        border-radius: 14px;
        transform: none !important;
    }

    .project-image {
        height: 160px;
    }

    .project-content {
        padding: 1.25rem;
    }

    .modal-cover {
        height: 200px;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-links {
        flex-direction: column;
    }

    .modal-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .page-header {
        padding: 100px 0 40px;
    }

    .page-title {
        font-size: 1.6rem;
    }

    .project-image {
        height: 140px;
    }

    .project-content h3 {
        font-size: 0.95rem;
    }

    .project-tags span {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
}

/* 7. CARD REACTIONS OVERRIDE */
.project-card .reaction-bar {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    /* Hafif ayırıcı */
    margin-bottom: 0.5rem;
    gap: 6px;
    width: 100%;
}

.project-card .reaction-btn {
    padding: 4px 10px;
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.project-card .reaction-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

.project-card .reaction-btn.active {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    color: #fff;
}

.project-card .reaction-btn .count {
    font-size: 0.7rem;
    margin-left: 4px;
    color: rgba(255, 255, 255, 0.7);
}

.project-card .reaction-add-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.project-card .reaction-add-btn:hover {
    border-color: var(--accent-purple);
    color: var(--accent-purple);
    background: rgba(139, 92, 246, 0.1);
}

/* Emoji picker konumlandırma */
.project-card .emoji-picker-wrapper {
    position: relative;
    display: inline-block;
}

.project-card .emoji-picker {
    left: -10px;
    bottom: 120%;
    /* Üste açıl */
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    padding: 8px;
    border-radius: 12px;
    display: none;
    /* JS kontrol ediyor ama default gizli */
    grid-template-columns: repeat(4, 1fr);
    width: max-content;
}


/* 8. NAVBAR CTA BUTTON */
.nav-cta {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.4rem;
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    margin-left: 1rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.5);
    color: white;
}

.nav-cta i {
    transition: transform 0.3s ease;
}

.nav-cta:hover i {
    transform: translateX(3px);
}

@media (max-width: 968px) {
    .nav-cta {
        display: none;
    }
}