/* --- CSS Variables and Basic Setup --- */
:root {
    --bg-primary: #F9F9F9;
    --bg-secondary: #FFFFFF;
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --accent-color: #4893cb; /* Light Green Accent Color */
    --border-color: #d0d0d1;
    
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
}
/* --- Base Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body { 
    color: var(--text-primary); 
    font-family: var(--font-body); 
    line-height: 1.7; 
    -webkit-font-smoothing: antialiased;
    background-image: 
        linear-gradient(rgba(249, 249, 249, 0.7), rgba(249, 249, 249, 0.7)),
        url('https://sergio-gordjei.b-cdn.net/background.png');
    
    background-size: cover;          
    background-position: center center;
    background-attachment: fixed;      
    background-repeat: no-repeat;      
}

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; color: var(--text-primary); line-height: 1.2; }
a { color: var(--text-primary); text-decoration: none; }
p { color: var(--text-secondary); margin-bottom: 1rem; max-width: 60ch; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.main-header { padding: 2.5rem 0; border-bottom: 1px solid var(--border-color); background-color: transparent; }
.navbar { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.logo { line-height: 1; display: block; }
.logo-image { height: 50px; width: auto; display: block; }
.nav-links { list-style: none; display: flex; gap: 2.5rem; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 1rem; transition: color 0.3s ease; text-transform: uppercase; letter-spacing: 0.05em; }
.nav-links a:hover { color: var(--text-primary); }

.hero { background-color: transparent; min-height: auto; display: flex; align-items: center; padding: 4rem 0; }
.hero-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 5rem; }
.hero-content { flex: 1; text-align: left; align-self: flex-start; }
.hero-video-wrapper { flex-shrink: 0; width: 400px; aspect-ratio: 9 / 16; position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); background-color: var(--border-color); }
.hero-content h1 { font-family: 'Raleway', sans-serif; font-weight: 300; font-size: clamp(3.5rem, 8vw, 6.5rem); letter-spacing: 0.03em; margin: 0; line-height: 1.1; color: var(--text-primary); }
.hero-content .subtitle { font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-secondary); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; margin: 1rem 0 2rem 0; }
.hero-video-wrapper iframe { position: absolute; top: 0; left: 0; width: 100% !important; height: 100% !important; border: 0; }

.portfolio-section, .about-section, .contact-section { background-color: transparent; padding: 6rem 0; }
.about-section, .contact-section { background-color: rgba(255, 255, 255, 0.8); }
.portfolio-section h2, .about-section h2, .contact-section h2 { font-size: 1rem; font-weight: 700; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.1em; text-align: center; margin-bottom: 1rem; }
.filter-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; margin: 1rem auto 4rem; }
.filter-btn { background: none; border: none; color: var(--text-secondary); padding: 0.5rem 1.5rem; border-radius: 20px; cursor: pointer; font-family: var(--font-body); font-size: 1rem; font-weight: 500; transition: all 0.3s ease; }
.filter-btn:hover { color: var(--text-primary); }
.filter-btn.active { background-color: var(--bg-secondary); color: var(--text-primary); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 4rem 2rem; }
.portfolio-item { display: block; cursor: pointer; }
.portfolio-image { overflow: hidden; margin-bottom: 1.5rem; background-color: var(--bg-secondary); border-radius: 16px; }
.portfolio-item img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1); }
.portfolio-item:hover img { transform: scale(1.05); }
.portfolio-item h3 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.25rem; transition: color 0.3s ease; }
.portfolio-item p { color: var(--text-secondary); margin: 0; transition: color 0.3s ease; }
.portfolio-item:hover h3 { color: var(--accent-color); }
.about-flex { display: flex; align-items: center; justify-content: center; gap: 6rem; }
.about-image { width: 300px; height: 300px; border-radius: 20px; overflow: hidden; flex-shrink: 0; box-shadow: 0 5px 20px rgba(0,0,0,0.08); }
.about-image img { width: 100%; height: 100%; object-fit: cover; }
.about-text { flex-basis: 50%; }
.about-text h2 { text-align: left; margin-bottom: 2rem; font-size: 2.5rem; text-transform: none; }

/* === NEW SOFTWARE LOGO STYLES === */
.skill-logos {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.tools-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}
.logo-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 2.5rem;
}
.skill-logo {
    height: 40px;
    width: auto;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.skill-logo:hover {
    opacity: 1;
}

.cta-button { display: inline-block; background-color: var(--accent-color); color: #fff; padding: 1.2rem 3rem; border-radius: 8px; font-family: var(--font-body); font-weight: 500; font-size: 1.1rem; margin-top: 2rem; transition: all 0.3s ease; border: 2px solid var(--accent-color); }
.cta-button:hover { background-color: transparent; color: var(--accent-color); }
.main-footer { text-align: center; padding: 3rem; color: var(--text-secondary); font-size: 0.9rem; border-top: 1px solid var(--border-color); background-color: transparent; }
.contact-section h2 { font-size: 2.5rem; text-transform: none; color: var(--text-primary); margin-bottom: 3rem; text-align: center; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; max-width: 1100px; margin: 0 auto; }
.contact-details h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.contact-info { list-style: none; margin-top: 2rem; }
.contact-info li { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; color: var(--text-secondary); }
.contact-info svg { color: var(--accent-color); flex-shrink: 0; }
.contact-info a { color: var(--text-secondary); transition: color 0.3s ease; }
.contact-info a:hover { color: var(--accent-color); }
.social-links { display: flex; gap: 1rem; margin-top: 2rem; }
.social-links a { color: var(--text-secondary); transition: color 0.3s ease, transform 0.3s ease; }
.social-links a:hover { color: var(--accent-color); transform: scale(1.1); }
#contact-form { display: flex; flex-direction: column; gap: 1.5rem; }
#contact-form input, #contact-form textarea { width: 100%; padding: 1rem; border: 1px solid var(--border-color); border-radius: 8px; font-family: var(--font-body); font-size: 1rem; background-color: var(--bg-primary); transition: border-color 0.3s ease; }
#contact-form input:focus, #contact-form textarea:focus { outline: none; border-color: var(--accent-color); }
#contact-form .cta-button { margin-top: 0; width: 100%; border: none; cursor: pointer; }
.category-separator { grid-column: 1 / -1; border: 0; border-top: 1px solid var(--border-color); margin: 0; }
.lightbox { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
.lightbox.visible { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; width: 90%; max-width: 1100px; border-radius: 16px; overflow: hidden; }
.lightbox-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1; }
.video-container { position: relative; padding-top: 56.25%; height: 0; overflow: hidden; background-color: #000; }
.video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

@media (max-width: 50em) {
    .container { padding: 0 1.5rem; }
    .main-header { padding: 1rem 0; }
    .navbar { gap: 1rem; }
    .logo-image { height: 40px; } 
    .nav-links { gap: 1.5rem; }
    .nav-links a { font-size: 0.9rem; }
    .hero { padding: 1.5rem 0; }
    .hero-grid { flex-direction: column; gap: 2.5rem; align-items: center; } 
    .hero-content { text-align: center; order: 1; align-self: auto; flex-basis: auto; }
    .hero-video-wrapper { order: 2; width: 100%; max-width: 350px; flex-basis: auto; }
    .hero-content .cta-button { margin-top: 0; }
    .portfolio-section, .about-section, .contact-section { padding: 3.5rem 0; }
    .portfolio-grid { grid-template-columns: 1fr; gap: 3.5rem; }
    .about-flex { flex-direction: column; text-align: center; gap: 3rem; }
    .about-image { width: 250px; height: 250px; }
    .about-text p { margin-left: auto; margin-right: auto; }
    .cta-button { padding: 1rem 2.5rem; font-size: 1rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .contact-section h2 { font-size: 2rem; }
    
    /* Mobile styles for software logos */
    .skill-logos { text-align: center; }
    .logo-grid { justify-content: center; gap: 2rem; }
}