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

:root {
    /* Light mode */
    --primary: #0a0a0a;
    --secondary: #f8f9fa;
    --accent: #0066ff;
    --accent-glow: #00d4ff;
    --text: #1a1a1a;
    --text-light: #666;
    --border: #e0e0e0;
    --bg: #ffffff;
    
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

/* Dark mode */
[data-theme="dark"] {
    --primary: #ffffff;
    --secondary: #1a1a2e;
    --accent: #0080ff;
    --accent-glow: #00d4ff;
    --text: #f5f5f5;
    --text-light: #b0b0b0;
    --border: #333;
    --bg: #0f0f1a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

[data-theme="dark"] .navbar {
    background: rgba(15, 15, 26, 0.8);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent);
}

.contact-link {
    padding: 0.5rem 1rem;
    border: 1px solid var(--accent);
    border-radius: 4px;
    color: var(--accent) !important;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: var(--accent);
    color: white !important;
}

/* Nav Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Language Selector */
.language-selector {
    position: relative;
}

.language-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
    transition: all 0.3s ease;
}

.language-btn:hover {
    border-color: var(--accent);
    background: rgba(0, 102, 255, 0.08);
}

.language-btn.active {
    border-color: var(--accent);
}

.lang-flag {
    font-size: 1rem;
}

.lang-text {
    min-width: 20px;
}

.lang-icon {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
}

.language-btn.active .lang-icon {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 150px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    z-index: 200;
    animation: slideDown 0.2s ease;
}

[data-theme="dark"] .language-dropdown {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.language-dropdown.active {
    display: flex;
}

.lang-option {
    background: transparent;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 4px;
    font-weight: 500;
    color: var(--text);
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.lang-option:hover {
    background: var(--secondary);
    color: var(--accent);
}

.lang-option.active {
    background: rgba(0, 102, 255, 0.15);
    color: var(--accent);
    font-weight: 600;
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    border-color: var(--accent);
    background: rgba(0, 102, 255, 0.1);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    z-index: -1;
}

[data-theme="dark"] .hero-background {
    background: linear-gradient(135deg, rgba(0, 128, 255, 0.15) 0%, rgba(0, 212, 255, 0.08) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: float 8s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: -1;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    z-index: 1;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.hero-ctas {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
    text-decoration: none;
}

.cta-button.primary {
    background: var(--accent);
    color: white;
}

.cta-button.primary:hover {
    background: var(--accent);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.3);
    transform: translateY(-2px);
}

.cta-button.secondary {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.cta-button.secondary:hover {
    background: var(--accent);
    color: white;
}

/* ===== FEATURED SECTION ===== */
.featured-section {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--bg);
}

.section-header {
    margin-bottom: var(--spacing-lg);
}

.section-header h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.05rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-md);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
    padding: var(--spacing-lg) var(--spacing-md);
    background: var(--secondary);
    transition: background 0.3s ease;
}

.filter-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.75rem;
    border: 2px solid var(--border);
    background: var(--bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--text);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.2);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--spacing-md);
}

/* ===== PROJECT CARD ===== */
.project-card {
    background: var(--bg);
    border-radius: 12px;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.5s ease;
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transition: left 0.3s ease;
}

.project-card:hover {
    border-color: var(--accent);
    box-shadow: 0 16px 40px rgba(0, 102, 255, 0.15);
    transform: translateY(-8px);
}

.project-card:hover::before {
    left: 100%;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 700;
    flex: 1;
}

.project-status {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.status-in-progress {
    background: rgba(0, 102, 255, 0.2);
    color: var(--accent);
}

[data-theme="dark"] .status-in-progress {
    background: rgba(0, 128, 255, 0.3);
}

.status-upcoming {
    background: rgba(200, 100, 255, 0.2);
    color: #c864ff;
}

[data-theme="dark"] .status-upcoming {
    background: rgba(200, 100, 255, 0.3);
}

.project-description {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-type {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--secondary);
    color: var(--text);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    width: fit-content;
}

.project-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.project-link:hover {
    transform: translateX(6px);
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    padding: var(--spacing-lg) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, rgba(10, 10, 20, 0.9) 100%);
    color: white;
}

[data-theme="dark"] .newsletter-section {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

.newsletter-section h2 {
    font-size: clamp(1.8rem, 5vw, 2.2rem);
    margin-bottom: 1rem;
    font-weight: 800;
}

.newsletter-section p {
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: var(--spacing-md);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Newsletter Form */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-input {
    padding: 0.875rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.email-input:focus {
    outline: none;
    border-color: var(--accent-glow);
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.submit-btn {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-glow));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.3);
}

.form-note {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* ===== FOOTER ===== */
.footer {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
    border-top: 1px solid var(--border);
    background: var(--bg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.footer-section a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-glow);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

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

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(20px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .featured-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-content {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        justify-content: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        gap: 0.5rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 0.5rem;
    }

    .contact-link {
        display: none;
    }

    .nav-controls {
        gap: 0.5rem;
    }

    .language-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }

    .lang-text {
        display: none;
    }

    .theme-toggle {
        width: 36px;
        height: 36px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }
}

/* Hidden state for filtered items */
.project-card.hidden {
    display: none;
}
