/* =========================================
   1. GLOBAL & RESET
   ========================================= */
* {
    box-sizing: border-box; /* Regula de aur pentru dimensiuni egale */
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

body {
    background: linear-gradient(rgba(245, 241, 232, 0.6), rgba(245, 241, 232, 0.6)), url("images/nature.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    font-family: 'Inter', sans-serif;
    color: #1E1E1E;
    text-align: center;
    margin: 0;
    transition: filter 0.4s ease, opacity 0.4s ease;
}

body.no-scroll {
    overflow: hidden;
}

h1 {
    font-family: 'Playfair Display', serif;
    font-size: 70px;
    font-weight: 600;
}

p {
    font-size: 20px;
}

::selection {
    background: #4F6F52;
    color: white;
}

/* =========================================
   2. NAVBAR
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 20px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 18px 40px;
    background: linear-gradient(rgba(79, 111, 82, 0.45), rgba(79, 111, 82, 0.35));
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 20px;
    border: 1px solid rgba(79, 111, 82, 0.30);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: fadeSlideDown 0.8s ease;
    overflow: hidden;
}

nav::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    top: var(--y);
    left: var(--x);
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav:hover::before {
    opacity: 1;
}

nav.shrink {
    padding: 12px 32px;
    backdrop-filter: blur(22px);
}

.language-switch {
    margin-left: 20px;
}

#lang-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #1E1E1E;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#lang-btn:hover {
    background: #4F6F52;
    color: white;
    border-color: #4F6F52;
}

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0%;
    transition: width 0.15s linear;
    border-radius: 2px;
    background: linear-gradient(90deg, #4F6F52, #7aa57d);
}

.scroll-progress.hide-progress {
    opacity: 0;
}

.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 38px;
    font-weight: 600;
    text-decoration: none;
    color: #1E1E1E;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: all 0.3s ease;
}

.logo a:hover {
    color: white;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.7), 0 0 16px rgba(255, 255, 255, 0.4);
    transform: scale(1.4);
}

.menu {
    list-style: none;
    display: flex;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.menu a {
    text-decoration: none;
    color: #1E1E1E;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    position: relative;
    display: inline-block;
    transition: color 0.3s ease;
}

.menu a.active {
    color: #ffffff;
    text-shadow: 0 0 6px rgba(79, 111, 82, 0.3);
}

.menu a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1.5px;
    opacity: 0.8;
    background: #4F6F52;
    transition: width 0.3s ease;
}

.menu a.active::after,
.menu a:hover::after {
    width: 100%;
}

.menu a:hover {
    color: white;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6), 0 0 12px rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    min-height: calc(100vh - 200px);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 90px;
    margin-bottom: 10px;
    background: linear-gradient(90deg, #1E1E1E, #4F6F52, #1E1E1E);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: fadeSlideUp 1s ease forwards, gradientMove 6s linear infinite;
    transition: all 0.4s ease;
}

.hero h2 {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #4F6F52;
    margin-bottom: 20px;
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero p {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    color: #444;
    margin-bottom: 35px;
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.cta {
    display: inline-block;
    padding: 12px 28px;
    background: #4F6F52;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.cta:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(79, 111, 82, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: opacity 0.4s ease;
}

.scroll-indicator.hide {
    opacity: 0;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid #4F6F52;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 6px;
    opacity: 0.8;
}

.wheel {
    width: 4px;
    height: 8px;
    background: #4F6F52;
    border-radius: 2px;
    animation: scrollWheel 1.6s infinite;
}

/* =========================================
   4. ABOUT SECTION
   ========================================= */
.about {
    padding: 140px 20px;
}

.about-wrapper {
    max-width: 1100px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
}

.about-left {
    max-width: 520px;
    text-align: left;
    margin-top: 20px;
}

.about-left h2 {
    font-family: 'Playfair Display', serif;
    font-size: 44px;
    margin-bottom: 18px;
    position: relative;
    display: inline-block;
}

.about-left h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #4F6F52;
    margin-top: 10px;
    border-radius: 2px;
}

.about-left p {
    font-size: 18px;
    line-height: 1.9;
    color: #444;
    margin-bottom: 22px;
}

.about-right {
    position: relative;
}

.about-right img {
    width: 320px;
    border-radius: 18px;
    position: relative;
    z-index: 2;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
    transition: transform 0.35s ease;
}

.about-right::before {
    content: "";
    position: absolute;
    width: 340px;
    height: 340px;
    background: radial-gradient(circle, rgba(79, 111, 82, 0.25), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    filter: blur(35px);
    z-index: 1;
}

.about-right img:hover {
    transform: scale(1.04) rotate(0.5deg);
}

.socials {
    margin-top: 30px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.social {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(6px);
    text-decoration: none;
    color: #1E1E1E;
    font-size: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social i {
    font-size: 18px;
    color: #4F6F52;
    transition: color 0.25s ease;
}

.social:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.social:nth-child(1):hover i { color: #E1306C; }
.social:nth-child(2):hover i { color: #1877F2; }
.social:nth-child(3):hover i { color: #ff0050; }

/* =========================================
   5. PROJECTS SECTION
   ========================================= */
.projects {
    margin-top: 80px;
    text-align: center;
    padding: 0 20px;
}

.projects h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    margin-bottom: 60px;
}

.projects h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #4F6F52;
    margin: 12px auto 0;
    border-radius: 2px;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.project-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: white;
    border-radius: 18px;
    text-decoration: none;
    color: #1E1E1E;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.project-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 120%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: 0.6s;
}

.project-card:hover::before {
    left: 120%;
}

.project-card h3 { font-size: 22px; margin-bottom: 10px; }
.project-card p { font-size: 16px; color: #555; margin-bottom: 20px; }

.project-card span {
    display: inline-block;
    transition: transform 0.25s ease;
    margin-top: auto;
    color: #4F6F52;
    font-weight: 500;
}

.project-card:hover span { transform: translateX(6px); }
.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.14);
}

/* =========================================
   6. BLOG / NOTES SECTION
   ========================================= */
.blog {
    margin-top: 120px;
    text-align: center;
    padding: 0 20px;
}

.blog h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
}

.blog h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #4F6F52;
    margin: 10px auto 0;
    border-radius: 2px;
}

.notes-count {
    margin-top: -40px;
    margin-bottom: 40px;
    font-size: 14px;
    color: #777;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.note-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 30px;
    background: white;
    border-radius: 18px;
    text-shadow: none;
    color: #1E1E1E;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.note-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.14);
}

.note-date {
    font-size: 13px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 6px;
    display: block;
    opacity: 0.75;
}

.note-card .read-more {
    margin-top: auto;
    color: #4F6F52;
    font-weight: 500;
    transition: transform 0.25s ease;
}

.note-card:hover .read-more { transform: translateX(6px); }

/* =========================================
   7. CONTACT SECTION
   ========================================= */
.contact {
    margin-top: 120px;
    padding: 0 20px;
    text-align: center;
}

.contact h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.contact h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: #4F6F52;
    margin: 10px auto 0;
    border-radius: 2px;
}

.contact-form {
    max-width: 600px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #4F6F52;
    font-size: 14px;
    opacity: 0.8;
}

.textarea-group i {
    top: 18px;
    transform: none;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 16px;
    padding-left: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.7);
    outline: none;
    display: block;
    transition: border 0.25s ease, box-shadow 0.25s ease;
    resize: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border: 1px solid #4F6F52;
    box-shadow: 0 0 0 3px rgba(79, 111, 82, 0.15);
}

.contact-button {
    width: 100% !important;
    display: block;
    padding: 14px 26px;
    background: #4F6F52;
    color: white;
    border-radius: 30px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 111, 82, 0.35);
}

.form-status {
    margin-top: 15px;
    font-size: 14px;
    color: #4F6F52;
}

/* =========================================
   8. FOOTER
   ========================================= */
.footer {
    margin-top: 140px;
    padding: 20px 20px;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-content {
    max-width: 800px;
    margin: auto;
}

.visitor-counter {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
}

.footer p { font-size: 15px; color: #555; margin: 8px 0; }
.footer-note { font-size: 14px; color: #777; }

/* =========================================
   9. MODALS
   ========================================= */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    z-index: 2000;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    position: relative;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 24px;
    max-width: 900px;
    width: 75%;
    display: flex;
    gap: 40px;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.4s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close {
    position: absolute;
    top: 16px; right: 20px;
    font-size: 22px;
    width: 32px; height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close:hover { background: rgba(0, 0, 0, 0.08); }

.modal-image img {
    width: 320px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.modal-info p {
    max-width: 420px;
    line-height: 1.7;
    font-size: 17px;
    color: #444;
}

.note-header { margin-bottom: 25px; text-align: center; }
#note-title { font-family: 'Playfair Display', serif; font-size: 26px; }
#note-date { display: block; margin-top: 8px; font-size: 14px; color: #777; }
.note-body { font-size: 22px; line-height: 1.6; }

.note-body blockquote {
    font-style: italic;
    font-size: 26px;
    line-height: 1.5;
    color: #222;
    border-left: 3px solid #4F6F52;
    padding-left: 20px;
    margin: 10px 0;
}

.quote-author {
    display: block;
    margin-top: 15px;
    font-size: 16px;
    color: #4F6F52;
    font-weight: 500;
}

/* =========================================
   10. LANGUAGE SWITCH TRANSITION
   ========================================= */
.page-transition {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: #4F6F52;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.page-transition.active {
    opacity: 1;
}

body.switching-language {
    filter: blur(15px);
    opacity: 0.8;
}

/* =========================================
   11. UTILITIES & ANIMATIONS
   ========================================= */
#backToTop {
    position: fixed;
    bottom: 30px; right: 30px;
    width: 45px; height: 45px;
    border: none;
    border-radius: 50%;
    background: #4F6F52;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

#backToTop.show { opacity: 1; pointer-events: auto; }
#backToTop:hover { transform: translateY(-3px); }

.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: transform, opacity;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
    12. HAMBURGER MENU
   ========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px;
    z-index: 110;
    position: relative;
}

.hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #1E1E1E;
    transition: transform .3s, opacity .3s;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-drawer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(20,20,20,0.95);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    opacity: 0;
    transition: opacity .3s;
}

.mobile-drawer.is-open {
    display: flex;
    opacity: 1;
}

.mobile-drawer a {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    color: white;
    text-decoration: none;
}

/* =========================================
   13. MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    .about-wrapper {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .about-left { text-align: center; }
    nav { margin: 0 20px; }
    .modal-content {
        flex-direction: column;
        width: 90%;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .scroll-indicator {
        display: none !important;
    }
    .hero h1 { font-size: 42px; }
    .about, .projects, .blog, .contact { padding: 80px 20px; }
    
    .modal-content {
        flex-direction: column;
        width: 92%;
        padding: 22px;
        gap: 20px;
    }
    
    .modal-image img {
        width: 100%;
        max-height: 200px;
        object-fit: contain;
    }
    
    .footer p { font-size: 14px; }
    
    /* Reguli duplicat combinate pentru curățenie */
    .menu { display: none; }
    .hamburger { display: flex; }
    
    nav {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .about-left h2::after {
        margin-left: auto;
        margin-right: auto;
    }
    
    .socials {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    
    .social { width: 200px; }
    
    .language-switch {
        order: 2;
        margin-left: auto;
        margin-right: 10px;
    }
    
    .hamburger { order: 3; }
}

@media (max-height: 800px) and (min-width: 769px) {
    .scroll-indicator { bottom: 20px; }
    .hero h1 { font-size: 60px; }
    .cta { margin-top: 20px; }
}

/* Animations */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scrollWheel {
    0% { opacity: 0; transform: translateY(0); }
    40% { opacity: 1; }
    80% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 0; }
}

@keyframes gradientMove {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}