/* ===== Reset & Global Styles ===== */
:root {
    --primary-color: #00CFE8; /* Cyan vibrant - Culoare de accent */
    --primary-color-darker: #00B4CC;
    --secondary-color: #4FC3F7; /* Alternativă accent: Albastru deschis */
    
    --bg-dark-primary: #121212;    /* Fundal principal foarte închis */
    --bg-dark-secondary: #1E1E1E; /* Fundal secundar puțin mai deschis */
    --bg-card: #242424;          /* Fundal pentru carduri/elemente */

    --text-light: #F5F5F5;     /* Text principal pe fundal închis */
    --text-medium: #A0A0A0;    /* Text secundar, mai subtil */
    --text-dark: #121212;      /* Text pentru fundaluri deschise (dacă e cazul) */

    --font-primary: 'Montserrat', sans-serif;
    --font-secondary: 'Roboto', sans-serif;

    --navbar-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Bază pentru unități rem */
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-dark-primary);
    color: var(--text-light);
    line-height: 1.7;
    overflow-x: hidden; /* Previne scroll orizontal accidental */
}

/* Skip link pentru accesibilitate */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--bg-dark-primary);
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
    border-radius: 4px;
    font-weight: 600;
}

.skip-link:focus {
    top: 6px;
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: var(--primary-color-darker);
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

h1, h2, h3, h4 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 1rem;
}

h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.2rem; line-height: 1.3; }
h3 { font-size: 1.5rem; line-height: 1.4; }

p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

.section {
    padding: 80px 0;
}

.bg-secondary { 
    background-color: var(--bg-dark-secondary);
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-medium);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-family: var(--font-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
}

.btn:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-dark-primary); 
    border: 2px solid var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

/* ===== Navbar Styles ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
    background-color: transparent; 
    z-index: 1000;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    border-bottom: 1px solid transparent; 
}

#navbar.scrolled {
    background-color: rgba(18, 18, 18, 0.95); 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 1px solid var(--bg-card);
    backdrop-filter: blur(10px);
}

#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
}

.logo:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text-light);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a:focus::after,
.nav-links a.active::after { 
    width: 100%;
}

.burger-menu {
    display: none; 
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.burger-menu:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: var(--text-light);
    margin: 5px;
    transition: all 0.3s ease;
}

/* ===== Hero Section Styles ===== */
#hero {
    height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    text-align: center;
    color: var(--text-light);
    overflow: hidden; 
}

.hero-video { 
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: -2; 
    object-fit: cover; 
}

.desktop-video {
    display: block; 
}

.mobile-video {
    display: none;
}

/* Media Query pentru a schimba videoclipul pe ecrane mai mici */
@media (max-width: 768px) { 
    .desktop-video {
        display: none !important;
    }
    .mobile-video {
        display: block !important;
    }
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.6); 
    z-index: -1;
}

.hero-content {
    z-index: 1; 
    max-width: 800px; 
    padding: 0 1rem; 
}

.hero-content h1 {
    font-size: 3.5rem; 
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff; 
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--text-light); 
    font-weight: 300;
}

/* ===== About Section Styles ===== */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr; 
    gap: 3rem;
    align-items: center;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3); 
}

.about-content h2 {
    color: var(--primary-color); 
}

.about-content .role {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-medium);
    margin-top: -0.8rem;
    margin-bottom: 1rem;
}

.about-content .description {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
}

.contact-details-about p {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-details-about i {
    color: var(--primary-color);
    margin-right: 0.8rem;
    font-size: 1.1rem;
    width: 20px; 
    text-align: center;
}

.contact-details-about a {
    color: var(--text-medium);
}

.contact-details-about a:hover,
.contact-details-about a:focus {
    color: var(--primary-color);
}

/* ===== Services Section Styles ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background-color: var(--bg-card);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent; 
}

.service-item:hover,
.service-item:focus-within {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--primary-color);
}

.service-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.service-item h3 {
    margin-bottom: 0.8rem;
    font-size: 1.3rem;
}

/* ===== Projects Section Styles ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--bg-card);
    border-radius: 8px;
    overflow: hidden; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover,
.project-card:focus-within {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.project-card img {
    width: 100%;
    height: 220px; 
    object-fit: cover; 
    display: block;
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
}

/* ===== Footer Styles ===== */
#footer {
    background-color: var(--bg-dark-primary); 
    padding: 2.5rem 1rem; 
    text-align: center;
    border-top: 1px solid var(--bg-card); 
}

#footer p { 
    color: var(--text-medium);
    font-size: 0.85rem; 
    margin-bottom: 0.5rem; 
    line-height: 1.6; 
}

#footer p:last-of-type { 
    margin-bottom: 0;
}

#footer p a { 
    color: var(--text-medium); 
    text-decoration: none; 
    transition: color 0.3s ease;
}

#footer p a:hover,
#footer p a:focus {
    color: var(--primary-color); 
    text-decoration: underline; 
}

#footer .designer-signature a { 
    color: var(--primary-color); 
}

#footer .designer-signature a:hover,
#footer .designer-signature a:focus {
    color: var(--primary-color-darker);
}

/* ===== Animation on Scroll (simple fade-in/up) ===== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.2s; }
.animate-on-scroll.delay-2 { transition-delay: 0.4s; }
.animate-on-scroll.delay-3 { transition-delay: 0.6s; }

/* ===== Responsive Design ===== */
@media (max-width: 992px) { 
    h1 { font-size: 2.5rem; }
    .hero-content h1 { font-size: 2.8rem; }
    .hero-content p { font-size: 1.1rem; }
    
    .about-container {
        grid-template-columns: 1fr; 
        text-align: center;
    }
    .about-image {
        margin: 0 auto 2rem auto; 
        max-width: 300px; 
    }
    .contact-details-about p { justify-content: center; } 
}

@media (max-width: 768px) { 
    :root { --navbar-height: 60px; } 
    .section { padding: 60px 0; }
    h1 { font-size: 2.2rem; }
    .hero-content h1 { font-size: 2.5rem; } 
    .section-title { font-size: 2rem; }

    .nav-links {
        position: fixed; 
        top: var(--navbar-height); 
        left: 0;
        width: 100%;
        background-color: var(--bg-dark-secondary); 
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        transform: translateX(-100%); 
        transition: transform 0.4s ease-in-out;
        border-bottom: 1px solid var(--bg-card);
        z-index: 999; 
    }
    .nav-links.nav-active { 
        transform: translateX(0);
    }
    .nav-links li {
        margin: 1rem 0; 
    }
    .burger-menu { 
        display: block;
    }
    .burger-menu.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger-menu.toggle .line2 { opacity: 0; }
    .burger-menu.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

    .services-grid, .projects-grid {
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) { 
    h1 { font-size: 1.8rem; }
    .hero-content h1 { font-size: 2rem; }
    .hero-content p { font-size: 1rem; }
    .section-title { font-size: 1.8rem; }
    .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem;}
    #footer p { font-size: 0.8rem; } 
}

/* ===== Performance Optimizations ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        opacity: 1;
        transform: none;
    }
}

/* Optimizare pentru print */
@media print {
    .hero-video,
    .video-overlay,
    #navbar,
    .animate-on-scroll {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline;
    }
}