:root {
    /* Culori principale */
    --primary-bg-gradient: linear-gradient(135deg, #1a1a3e 0%, #2d1b69 30%, #4c1d95 60%, #1e1b4b 100%);
    --text-color: white;
    --subtitle-color: rgba(255, 255, 255, 0.8);
    --card-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-blue: #60a5fa;
    --accent-purple: rgba(139, 92, 246, 0.3);
    --button-bg: rgba(59, 130, 246, 0.2);
    --button-border: rgba(59, 130, 246, 0.3);
    --scroll-thumb: rgba(139, 92, 246, 0.5);

    /* Culori adăugate pentru noul meniu (din noul header) */
    --header-bg-color: rgba(30, 27, 60, 0.95);
    --header-border-color: rgba(139, 92, 246, 0.2);
    --header-logo-color: white;
    --header-logo-hover-color: #a855f7;
    --nav-link-color: rgba(255, 255, 255, 0.9);
    --nav-link-hover-color: #a855f7;
    --nav-link-underline-gradient: linear-gradient(90deg, #a855f7, #c084fc);
    --cta-button-gradient: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #c084fc 100%);
    --cta-button-hover-gradient: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a855f7 100%);
    --cta-button-shadow: rgba(139, 92, 246, 0.3);
    --cta-button-hover-shadow: rgba(139, 92, 246, 0.4);
    --mobile-menu-bg: rgba(30, 27, 60, 0.98);
    --mobile-menu-border: rgba(139, 92, 246, 0.2);
    --mobile-toggle-hover-bg: rgba(139, 92, 246, 0.2);
    --mobile-ripple-color: rgba(168, 85, 247, 0.5);
    --mobile-nav-link-hover-bg: rgba(139, 92, 246, 0.1);
    --mobile-nav-link-shine: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.1), transparent);
    --mobile-cta-shine: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);

    /* Tranzitii si animatii */
    --card-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --button-transition: all 0.3s ease;
    --animation-duration: 0.6s;
    --menu-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Unified menu transition */
}

/* Reducerea mișcării pentru utilizatorii cu preferințe */
@media (prefers-reduced-motion: reduce) {
    :root {
        --animation-duration: 0s;
    }

    .project-card,
    .back-to-top,
    .floating-element,
    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-nav li,
    .mobile-nav a,
    .mobile-cta .cta-button,
    .hamburger span,
    .mobile-menu-toggle::before { /* Include ripple effect */
        animation: none !important;
        transition: none !important;
    }
}

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

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--primary-bg-gradient);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    perspective: 1000px;
}

/* Background animated elements */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.05) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

/* Wrapper pentru continutul principal sub header */
.main-content-wrapper {
    padding-top: 70px; /* Asigura ca continutul nu e acoperit de header-ul fix */
}

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

/* NOU: Stiluri pentru Headerul principal (din codul furnizat) */
.header {
    background: var(--header-bg-color);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--header-border-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container { /* Specificity for the container inside the header */
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    color: var(--header-logo-color);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--header-logo-hover-color);
}

/* Navigatie Desktop */
.desktop-nav-main .nav {
    display: flex;
    list-style: none;
    gap: 40px;
    margin: 0;
}

.desktop-nav-main .nav a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
    transition: color 0.3s ease;
}

.desktop-nav-main .nav a:hover {
    color: var(--nav-link-hover-color);
}

.desktop-nav-main .nav a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--nav-link-underline-gradient);
    transition: width 0.3s ease;
}

.desktop-nav-main .nav a:hover::after {
    width: 100%;
}

.cta-button { /* General CTA button styles */
    background: var(--cta-button-gradient);
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--cta-button-shadow);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--cta-button-hover-shadow);
    background: var(--cta-button-hover-gradient);
}

/* Hamburger Toggle pentru Mobil */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--menu-transition);
    position: relative;
    overflow: hidden;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    background: var(--mobile-toggle-hover-bg);
    transform: scale(1.1);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle .ripple-effect { /* Styling for the dynamically created ripple */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, var(--mobile-ripple-color) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 0.6s ease-out forwards;
    pointer-events: none;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Meniu Mobil Overlay */
.mobile-menu {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--mobile-menu-bg);
    backdrop-filter: blur(15px);
    border-top: 1px solid var(--mobile-menu-border);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: var(--menu-transition);
    opacity: 0;
    transform: translateY(-20px);
    z-index: 999;
}

.mobile-menu.active {
    max-height: 400px; /* Suficient pentru a conține conținutul */
    opacity: 1;
    transform: translateY(0);
    padding: 30px 20px;
}

.mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav li {
    margin-bottom: 8px;
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-nav li {
    opacity: 1;
    transform: translateX(0);
}

/* Adjust transition delay for staggered animation */
.mobile-menu.active .mobile-nav li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.active .mobile-nav li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu.active .mobile-nav li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu.active .mobile-nav li:nth-child(4) { transition-delay: 0.25s; }

.mobile-nav a {
    color: var(--nav-link-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    display: block;
    padding: 15px 20px;
    margin: 0 -10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--mobile-nav-link-shine);
    transition: left 0.5s ease;
}

.mobile-nav a:hover::before {
    left: 100%;
}

.mobile-nav a:hover {
    color: var(--nav-link-hover-color);
    background: var(--mobile-nav-link-hover-bg);
    transform: translateX(10px);
}

.mobile-cta {
    margin-top: 25px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active .mobile-cta {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.mobile-cta .cta-button {
    display: block;
    text-align: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.mobile-cta .cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--mobile-cta-shine);
    transition: left 0.6s ease;
}

.mobile-cta .cta-button:hover::before {
    left: 100%;
}

/* Media Queries pentru noul Header */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
        height: 60px;
    }

    .logo {
        font-size: 20px;
    }

    .desktop-nav-main {
        display: none;
    }

    .cta-button.desktop-cta {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }
}

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

    .logo {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .mobile-nav a {
        font-size: 16px;
    }
}

/* Keyframes pentru ripple effect */
@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}


/* Stiluri pentru vechiul header (acum secțiune) - pastrate din versiunea anterioara*/
.portfolio-header-content {
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
}

.header-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-color) 0%, #a5f3fc 50%, var(--accent-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.header-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--subtitle-color);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

/* Projects Grid - pastrate din versiunea anterioara*/
.projects-grid {
    display: grid;
    gap: 40px;
    margin-bottom: 80px;
    position: relative;
}

/* Base styles for project cards - pastrate din versiunea anterioara*/
.project-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    overflow: hidden;
    transition: var(--card-transition);
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    display: none; /* Hidden by default, shown by JS */
}

.project-card[hidden] {
    display: none !important;
}

.project-card.is-visible {
    opacity: 1;
    transform: translateY(0);
    display: block; /* Ensure it becomes block when visible */
    animation: fadeInSlideUp var(--animation-duration) ease-out forwards;
}

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover::before {
    opacity: 1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(139, 92, 246, 0.3);
    border-color: var(--accent-purple);
}

.project-image {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.project-content {
    padding: 30px;
    position: relative;
    z-index: 2;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-color);
}

.project-description {
    font-size: 1rem;
    color: var(--subtitle-color);
    line-height: 1.6;
    margin-bottom: 25px;
}

.project-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--button-bg);
    color: var(--accent-blue);
    padding: 12px 24px;
    border: 1px solid var(--button-border);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--button-transition);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.project-button:hover,
.project-button:focus-visible {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.5);
}

/* Specific project styles (backgrounds) */
.developer-card .project-image {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
}

.ecommerce-card .project-image {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333;
}

.wordpress-card .project-image {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #0073aa;
}

.landing-card .project-image {
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    color: var(--text-color);
}

/* Responsive Design pentru Projects Grid */
@media (max-width: 768px) {
    .portfolio-header-content {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 200px;
    }

    .project-card {
        margin: 0 auto;
        max-width: 400px;
    }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

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

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Navigation dots at bottom */
.navigation-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 40px 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    outline: none;
}

.dot.active {
    background: var(--accent-blue);
    transform: scale(1.2);
}

.dot:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Floating elements */
.floating-element {
    position: fixed;
    pointer-events: none;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
    z-index: -1;
}

.floating-element[data-size="large"] { font-size: 2rem; }
.floating-element[data-size="medium"] { font-size: 1.5rem; }
.floating-element[data-size="extra-large"] { font-size: 2.5rem; }


.floating-element:nth-child(1) {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    top: 80%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--button-bg);
    border: 1px solid var(--button-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    text-decoration: none;
    backdrop-filter: blur(10px);
    transition: var(--button-transition);
    opacity: 0;
    transform: translateY(100px);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    background: rgba(59, 130, 246, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
}

/* Screen reader only class for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
/* Existing CSS */

/* Adaugă aceste stiluri pentru canvas */
#particleCanvas {
    position: fixed; /* Fixează canvas-ul în viewport */
    top: 0;
    left: 0;
    width: 100vw; /* Ocupă toată lățimea viewport-ului */
    height: 100vh; /* Ocupă toată înălțimea viewport-ului */
    z-index: -2; /* Asigură-te că este sub tot conținutul și sub pseudo-elementul body::before */
    pointer-events: none; /* Permite interacțiunea cu elementele de sub canvas */
}

/* Reducerea mișcării pentru utilizatorii cu preferințe */
@media (prefers-reduced-motion: reduce) {
    :root {
        --animation-duration: 0s;
    }

    /* Adaugă și canvas-ul la elementele fără animație/tranziție */
    #particleCanvas, /* Adaugă canvas aici */
    .project-card,
    .back-to-top,
    .floating-element,
    .mobile-menu-toggle,
    .mobile-menu,
    .mobile-nav li,
    .mobile-nav a,
    .mobile-cta .cta-button,
    .hamburger span,
    .mobile-menu-toggle::before { /* Include ripple effect */
        animation: none !important;
        transition: none !important;
    }
}

/* Existing CSS continues below */
