/* CSS Variables - Consistență și lizibilitate */
:root {
    --primary-gradient: linear-gradient(135deg, #0f0f23 0%, #1a0933 25%, #2d1b69 50%, #0f0f23 100%);
    --accent-color-1: #40e0d0; /* Turquoise */
    --accent-color-2: #00bcd4; /* Cyan */
    --accent-color-3: #8a2be2; /* Blue Violet */
    --text-color-light: #ffffff;
    --text-color-faded: rgba(255, 255, 255, 0.8);
    --card-background-light: rgba(255, 255, 255, 0.05);
    --card-background-gradient-base: linear-gradient(145deg, rgba(106, 27, 154, 0.3) 0%, rgba(74, 20, 140, 0.2) 50%, rgba(49, 7, 92, 0.1) 100%);
    --card-background-gradient-hover: linear-gradient(145deg, rgba(106, 27, 154, 0.4) 0%, rgba(74, 20, 140, 0.3) 50%, rgba(49, 7, 92, 0.2) 100%);
    --transition-speed: 0.4s;
    --transition-ease: cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Modern easing function */
    --shadow-light: 0 4px 15px rgba(64, 224, 208, 0.3);
    --shadow-medium: 0 25px 50px rgba(64, 224, 208, 0.2);
}

/* Base styles and resets */
html {
    scroll-behavior: smooth;
    font-size: 16px; /* Bază pentru unități rem */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-gradient);
    color: var(--text-color-light);
    min-height: 100vh;
    overflow-x: hidden; /* Previne scroll orizontal nedorit */
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
    touch-action: pan-y; /* Optimize touch scrolling for vertical scroll */
}

/* Universal box-sizing, consistent across all elements */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Basic resets for lists, buttons, and links */
ul { list-style: none; }
button {
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    &:focus-visible {
        outline: 2px solid var(--accent-color-1);
        outline-offset: 2px;
    }
}
a {
    text-decoration: none;
    color: inherit;
    &:focus-visible {
        outline: 2px solid var(--accent-color-1);
        outline-offset: 2px;
    }
}

/* Skip to content for accessibility - REMOVED AS HEADER IS GONE */
/* .skip-to-content { ... } */

/* --- Header principal - REMOVED AS HEADER IS GONE --- */
/* .main-header { ... } */
/* .main-header nav ul { ... } */
/* .main-header a { ... } */
/* .main-header a:hover { ... } */

/* --- Secțiunea Acasă (Container general) --- */
#sectiune-acasa {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-bottom: 40px; /* Redus pentru a micsora "footer-ul" */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 40px; /* Redus spațiul de sus */
    transform: translateZ(0); /* Acelerație hardware */
}

#sectiune-acasa .container-continut {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 5;
}

/* --- Particule de fundal --- */
.particule-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
    transform: translateZ(0); /* Acelerație hardware */
}

.particula {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(64, 224, 208, 0.6);
    border-radius: 50%;
    animation: float 6s infinite linear;
    will-change: transform, opacity; /* Optimize animații */
}

/* --- Particule Mouse Trail și Falling (generate din JS) --- */
.mouse-particle, .falling-particle {
    pointer-events: none;
    z-index: 1000;
    will-change: transform, opacity;
}

.mouse-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #00c7ff, #fff);
    border-radius: 50%;
    animation: mouseParticle 1s ease-out forwards;
}

.falling-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: fall 3s linear forwards;
}

/* --- Floating shapes --- */
.forma-plutitoare {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
    will-change: transform, opacity;
    filter: blur(2px); /* Adaugă un blur subtil pentru a le face mai puțin intruzive */
}

.forma-1 {
    top: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-3));
    border-radius: 50%;
    animation: floatShape 6s ease-in-out infinite;
}

.forma-2 {
    top: 60%;
    right: 10%;
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #f093fb, #f5576c);
    border-radius: 20px;
    animation: floatShape 8s ease-in-out infinite reverse;
}

/* --- Header Section --- */
.sectiune-antet {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-speed) ease-out, transform var(--transition-speed) ease-out;
}

.sectiune-antet.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.eticheta-header {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-transform: uppercase;
    box-shadow: var(--shadow-light);
    animation: pulse 2s infinite;
}

.titlu-principal {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--text-color-light) 0%, var(--accent-color-1) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    transform: translateZ(0); /* Acelerație hardware */
}

.subtitlu {
    font-size: clamp(0.9rem, 3vw, 1.2rem);
    line-height: 1.6;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* --- Portfolio Grid --- */
.grila-portofoliu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

.element-portofoliu {
    background: var(--card-background-light);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all var(--transition-speed) var(--transition-ease);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    transform: translateY(50px);
    will-change: transform, opacity, box-shadow, border-color; /* Optimize animații */
    contain: layout style; /* Asigură un context de stivuire pentru pseudo-elemente și hover */
}

.element-portofoliu.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.element-portofoliu:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(64, 224, 208, 0.2);
    border-color: rgba(64, 224, 208, 0.3);
    will-change: transform; /* Transform-uri optimizate */
}

.element-portofoliu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(64, 224, 208, 0.1) 0%, rgba(138, 43, 226, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.element-portofoliu:hover::before {
    opacity: 1;
}

.imagine-portofoliu {
    width: 100%;
    height: 180px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    transform: translateZ(0); /* Acelerație hardware */
}

/* Specific images - using actual image paths (LOCAL!) - Use modern formats (WebP) */
.imagine-portofoliu.dev { 
  background-image: url('https://i.postimg.cc/nLrBB5fq/1-FYKRf-Gw-Kb-Ig-N8v-Bz-Uh-H-5-A-1.webp'), url('https://i.postimg.cc/fLFVsg6f/1-FYKRf-Gw-Kb-Ig-N8v-Bz-Uh-H-5-A.png'); 
}

.imagine-portofoliu.design { 
  background-image: url('https://i.postimg.cc/59KcmQzv/online-shopping-design-graphic-elements-signs-symbols-mobile-marketing-and-digital-marketing.webp'), url('https://i.postimg.cc/NjhzN6jy/online-shopping-design-graphic-elements-signs-symbols-mobile-marketing-and-digital-marketing.jpg'); 
}

.imagine-portofoliu.vr { 
  background-image: url('https://i.postimg.cc/dtsBDhXk/Word-Press-Romania-reclama-poza-1-png.webp'), url('https://i.postimg.cc/Twvjx1gP/Word-Press-Romania-reclama-poza-1-png.webp'); 
}

.imagine-portofoliu.code { 
  background-image: url('https://i.postimg.cc/GtG5rtM3/modern-flat-design-isometric-concept-of-digital-marketing-for-banner-and-website-abstract-3d.webp'), url('https://i.postimg.cc/7hwgGLHZ/modern-flat-design-isometric-concept-of-digital-marketing-for-banner-and-website-abstract-3d.jpg'); 
}

.imagine-portofoliu::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 2;
    transform: translateZ(0); /* Acelerație hardware */
}

.element-portofoliu:hover .imagine-portofoliu::after {
    left: 100%;
}

.continut-portofoliu {
    padding: 20px;
    position: relative;
    z-index: 3;
}

.titlu-portofoliu {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color-light);
}

.descriere-portofoliu {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.8;
    margin-bottom: 20px;
}

.buton-portofoliu {
    display: inline-block;
    padding: 10px 25px;
    background: transparent;
    border: 2px solid var(--accent-color-1);
    border-radius: 25px;
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 1;
    will-change: transform, box-shadow; /* Transform-uri optimizate */
}

.buton-portofoliu::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    transition: left 0.3s ease;
    z-index: -1;
    transform: translateZ(0); /* Acelerație hardware */
}

.buton-portofoliu:hover {
    color: var(--text-color-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(64, 224, 208, 0.3);
}

.buton-portofoliu:hover::before {
    left: 0;
}

.accent-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color-1), var(--accent-color-2), var(--accent-color-3), var(--accent-color-1));
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
    will-change: background-position; /* Optimize animații */
}

/* Buton "Înapoi sus" */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(45deg, var(--accent-color-1), var(--accent-color-2));
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); /* Începe mai jos pentru animație */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 999;
    will-change: transform, opacity; /* Acelerație hardware */
}

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

.back-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* === KEYFRAME ANIMATIONS === */
@keyframes float {
    0% { transform: translateY(100vh) translateX(0px); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes gradientMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

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

@keyframes mouseParticle {
    0% { transform: scale(0) translateY(0); opacity: 1; }
    100% { transform: scale(1) translateY(-100px); opacity: 0; }
}

@keyframes fall {
    to { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

---
### Media Queries (Mobile-First Approach)
---

**TELEFOANE**
```css
@media (max-width: 480px) {
    .particula {
        width: 1px;
        height: 1px;
    }
    .forma-plutitoare {
        display: none; /* Ascunde formele plutitoare pe telefoane mici pentru performanță */
    }
    .sectiune-antet {
        margin-bottom: 30px; /* Ajustat */
    }
    .eticheta-header {
        font-size: 0.75rem;
        padding: 6px 15px;
        margin-bottom: 15px; /* Ajustat */
    }
    .titlu-principal {
        font-size: clamp(1.8rem, 7vw, 3rem);
    }
    .subtitlu {
        font-size: clamp(0.85rem, 3.5vw, 1rem);
    }
    .grila-portofoliu {
        gap: 20px;
        margin-top: 30px; /* Ajustat */
    }
    .imagine-portofoliu {
        height: 150px;
    }
    .continut-portofoliu {
        padding: 15px;
    }
    .titlu-portofoliu {
        font-size: 1.2rem;
    }
    .descriere-portofoliu {
        font-size: 0.85rem;
    }
    .buton-portofoliu {
        padding: 8px 20px;
        font-size: 0.75rem;
    }
    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
    #sectiune-acasa .container-continut {
        padding: 30px 15px; /* Ajustează padding-ul containerului pe mobile */
    }
    #sectiune-acasa {
        padding-top: 30px; /* Redus spațiul de sus pe mobil */
        padding-bottom: 20px; /* Redus spațiul de jos pe mobil */
    }
}
