:root {
    --bg-base: #03050a; /* Dark Midnight */
    --bg-surface: #0a0f1c;
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --accent: #38bdf8; /* Cyan Tech subtil */
    --accent-dark: #0284c7;
    --border: rgba(56, 189, 248, 0.15);
    --border-light: rgba(255, 255, 255, 0.05);
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .logo, span, .premium-text {
    font-family: 'Cinzel', serif;
    font-weight: 600;
}

/* --- Background Fluid Premium (Dreapta -> Stânga) --- */
.fluid-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: linear-gradient(270deg, #03050a, #0b1120, #040812);
    background-size: 200% 100%;
    animation: panBg 15s ease-in-out infinite alternate;
    z-index: -5;
}

@keyframes panBg {
    0% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.interactive-glow {
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.04) 0%, transparent 60%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    filter: blur(50px);
    z-index: -4;
    will-change: left, top;
}

/* --- Cursor Custom (Doar Desktop) --- */
.cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0;
    pointer-events: none; z-index: 999999; will-change: transform;
}
.cursor-dot {
    width: 5px; height: 5px; background-color: var(--accent);
    border-radius: 50%; transform: translate(-50%, -50%); transition: opacity 0.3s;
}
.cursor-ring {
    width: 38px; height: 38px; border: 1px solid rgba(56, 189, 248, 0.4);
    border-radius: 50%; transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s, background-color 0.4s, border-color 0.4s;
}
body.cursor-hover .cursor-ring {
    width: 65px; height: 65px; background-color: rgba(56, 189, 248, 0.03);
    border-color: var(--accent); backdrop-filter: blur(1px);
}
body.cursor-hover .cursor-dot { opacity: 0; }

/* DEZACTIVARE CURSOR PE MOBIL/TABLETE (Touch) */
@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-ring { display: none !important; }
    * { cursor: auto !important; }
}

/* --- Navigare --- */
nav {
    position: fixed; top: 0; width: 100%; padding: 25px 5%;
    z-index: 1000; transition: var(--transition);
}
nav.scrolled {
    background: rgba(3, 5, 10, 0.85); backdrop-filter: blur(20px);
    padding: 15px 5%; border-bottom: 1px solid var(--border-light);
}
.nav-container {
    display: flex; justify-content: space-between; align-items: center;
    max-width: 1400px; margin: 0 auto;
}
.logo { display: flex; align-items: center; transition: transform 0.5s ease; z-index: 1001; }
.logo-img { max-height: 45px; transition: all 0.5s ease; filter: drop-shadow(0 0 0 rgba(56, 189, 248, 0)); }
.logo:hover { transform: scale(1.05); }
.logo:hover .logo-img { filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.4)); }

.nav-links { display: flex; gap: 40px; }
.nav-links a {
    color: var(--text-muted); text-decoration: none; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 2px; transition: color 0.4s;
    font-weight: 500; position: relative; padding-bottom: 5px;
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px;
    background: var(--accent); transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* Hamburger Menu (Ascuns pe Desktop) */
.hamburger {
    display: none; flex-direction: column; gap: 6px;
    cursor: pointer; z-index: 1001;
}
.hamburger span {
    width: 30px; height: 2px; background: var(--text-main);
    transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Hero Section --- */
.page-content { padding-top: 50px; padding-bottom: 50px; }
.hero { height: 100vh; display: flex; align-items: center; padding: 0 10%; max-width: 1400px; margin: 0 auto; }
.hero-content { max-width: 850px; }
.hero h1 { font-size: clamp(3rem, 6.5vw, 5.5rem); line-height: 1.1; margin-bottom: 25px; }
.premium-text { color: var(--accent); }
.typing-text { border-right: 2px solid var(--accent); animation: blink 0.8s step-end infinite; }
@keyframes blink { 50% { border-color: transparent; } }
.hero p { font-size: 1.15rem; color: var(--text-muted); margin-bottom: 45px; max-width: 600px; font-weight: 300; }
.cta-group { display: flex; gap: 20px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 35px; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 2px; transition: var(--transition); border: 1px solid transparent;
    font-family: 'Montserrat', sans-serif; font-weight: 500; text-decoration: none; border-radius: 4px;
}
.btn-primary { background: var(--text-main); color: #000; }
.btn-primary:hover { background: var(--accent); color: #000; box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15); }
.btn-secondary { border-color: var(--border-light); color: var(--text-main); background: rgba(15, 23, 42, 0.4); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* --- General Sections --- */
.section { padding: 120px 10%; max-width: 1400px; margin: 0 auto; }
.section-title { font-size: 3rem; margin-bottom: 60px; }
.section-title span { color: var(--accent); }
.text-center { text-align: center; }

/* Animatii Scroll Optimizate */
.reveal { opacity: 0; transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.slide-up { transform: translateY(40px); }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* --- Despre Noi --- */
.about-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 80px; align-items: center; }
.about-text .lead { font-size: 1.2rem; color: var(--text-main); margin-bottom: 25px; }
.about-text p { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 20px; font-weight: 300; }
.about-text strong { color: var(--text-main); font-weight: 500; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.stat { padding: 30px; background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border-light); border-radius: 8px; transition: var(--transition); }
.stat:hover { border-color: var(--accent); background: rgba(56, 189, 248, 0.05); }
.stat h3 { font-family: 'Cinzel', serif; font-size: 2.2rem; color: var(--accent); margin-bottom: 5px; }
.stat p { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted); }
.about-image { position: relative; height: 100%; min-height: 450px; border: 1px solid var(--border-light); background: rgba(15, 23, 42, 0.4); display: flex; align-items: center; justify-content: center; transition: var(--transition); border-radius: 8px; }
.about-image:hover { border-color: var(--accent); }
.about-image-text { font-size: 2.5rem; color: var(--text-muted); opacity: 0.4; text-align: center; line-height: 1.2; transition: var(--transition); }
.about-image:hover .about-image-text { opacity: 1; color: var(--accent); transform: scale(1.05); }

/* --- Portofoliu --- */
.portfolio-subtitle { margin-top: -40px; margin-bottom: 60px; color: var(--text-muted); font-size: 1.1rem; font-weight: 300; }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.project-card { position: relative; height: 480px; overflow: hidden; display: block; border: 1px solid var(--border-light); border-radius: 8px; }
.project-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1); filter: grayscale(80%) brightness(0.5); }
.p1 { background-image: url('https://images.unsplash.com/photo-1541888082470-bf52243d9396?q=80&w=800'); }
.p2 { background-image: url('https://images.unsplash.com/photo-1514362545857-3bc16c4c7d1b?q=80&w=800'); }
.p3 { background-image: url('https://images.unsplash.com/photo-1621905252507-b35492cc74b4?q=80&w=800'); }

.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(3,5,10,1) 0%, rgba(3,5,10,0.2) 60%, transparent 100%); transition: background 0.5s ease; }
.project-card:hover { border-color: var(--accent); }
.project-card:hover .project-bg { transform: scale(1.05); filter: grayscale(10%) brightness(0.8); }
.project-content { position: absolute; bottom: 30px; left: 30px; z-index: 2; transform: translateY(15px); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.project-content span { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.project-content h3 { font-family: 'Cinzel', serif; font-size: 1.8rem; color: var(--text-main); }
.project-card:hover .project-content { transform: translateY(0); }

/* --- Contact Form --- */
.contact-container { background: rgba(15, 23, 42, 0.4); border: 1px solid var(--border-light); padding: 70px; max-width: 800px; margin: 0 auto; text-align: center; border-radius: 12px; }
.contact-container h2 { font-size: 2.8rem; margin-bottom: 10px; }
.contact-subtitle { color: var(--text-muted); margin-bottom: 50px; font-weight: 300; }
.elegant-form { text-align: left; }
.input-group { position: relative; margin-bottom: 45px; }
.input-group input, .input-group textarea { width: 100%; padding: 10px 0; background: transparent; border: none; color: var(--text-main); font-family: 'Montserrat', sans-serif; font-size: 1.05rem; outline: none; resize: none; }
.input-group label { position: absolute; top: 10px; left: 0; color: var(--text-muted); transition: var(--transition); pointer-events: none; }
.input-group input:focus ~ label, .input-group input:valid ~ label, .input-group textarea:focus ~ label, .input-group textarea:valid ~ label { top: -20px; font-size: 0.75rem; color: var(--accent); letter-spacing: 1px; text-transform: uppercase; }
.input-group .line { position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background: var(--border-light); }
.input-group .line::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 0; height: 1px; background: var(--accent); transition: width 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.input-group input:focus ~ .line::after, .input-group textarea:focus ~ .line::after { width: 100%; }
.form-btn { width: 100%; margin-top: 10px; }

/* --- Popup --- */
.custom-popup { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(3, 5, 10, 0.9); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 999990; opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; }
.custom-popup.active { opacity: 1; visibility: visible; }
.popup-content { background: var(--bg-surface); border: 1px solid var(--border-light); padding: 50px; text-align: center; transform: scale(0.95); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); max-width: 450px; border-radius: 8px; }
.custom-popup.active .popup-content { transform: scale(1); }
.popup-icon { width: 60px; height: 60px; border: 1px solid var(--accent); color: var(--accent); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; margin: 0 auto 25px; }
.popup-content h2 { font-size: 1.8rem; margin-bottom: 15px; }
.popup-content p { color: var(--text-muted); margin-bottom: 35px; font-weight: 300; }

footer { text-align: center; padding: 40px; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: 0.9rem; }

/* ========================================================
   MEDIA QUERIES PENTRU RESPONSIVITATE PERFECTĂ PE MOBIL 
   ======================================================== */
@media (max-width: 1024px) {
    .about-grid { grid-template-columns: 1fr; gap: 50px; }
    .contact-container { padding: 40px; }
    .section { padding: 100px 5%; }
}

@media (max-width: 768px) {
    /* Navbar & Meniu Mobil */
    nav { padding: 15px 5%; }
    .hamburger { display: flex; }
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
        background: rgba(3, 5, 10, 0.98); backdrop-filter: blur(20px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); gap: 30px;
    }
    .nav-links.active { right: 0; }
    .nav-links a { font-size: 1.2rem; }
    
    /* Animație Hamburger */
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Elemente Globale */
    .logo-img { max-height: 40px; }
    .section { padding: 80px 5%; }
    .section-title { font-size: 2.2rem; margin-bottom: 40px; }
    
    /* Hero */
    .hero { text-align: center; justify-content: center; }
    .hero h1 { font-size: 2.8rem; }
    .cta-group { flex-direction: column; width: 100%; }
    .btn { width: 100%; }
    
    /* Layout */
    .stats { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .project-card { height: 400px; }
    .about-image { min-height: 300px; }
}