:root {
    --bg-deep: #050507;
    --bg-dark: #0a0a0c;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.08);
    --accent-primary: #3b82f6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --container-max-width: 1200px;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism utility */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 1.5rem;
}

/* Cursor Glow */
.cursor-glow {
    position: fixed;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: screen;
}

/* Header */
.main-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-card);
    background: rgba(5, 5, 7, 0.82);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-nav a:hover:not(.btn-cta) {
    color: var(--text-main);
}

.lang-toggle-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--border-card);
}

.lang-btn {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted) !important;
}

.lang-btn.active {
    color: var(--accent-primary) !important;
}

.sep {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem;
}

.btn-cta {
    background: linear-gradient(135deg, #3b82f6, #818cf8);
    padding: 0.7rem 1.4rem;
    border-radius: 2rem;
    color: white !important;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    background: transparent;
    border: 1px solid var(--border-card);
    border-radius: 0.6rem;
    padding: 0.45rem;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 1.2rem;
    height: 2px;
    background: var(--text-main);
}

.mobile-nav {
    display: none;
}

/* Hero Section */
.hero {
    min-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    padding: 5rem 0 3rem;
}

.logo {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.logo span {
    color: var(--accent-primary);
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #2dd4bf);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-primary, .btn-secondary {
    padding: 1.2rem 2.5rem;
    border-radius: 3rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    border: 1px solid var(--border-card);
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Portfolio Grid */
.portfolio-section {
    padding: 8rem 0;
}

.section-header {
    margin-bottom: 5rem;
    text-align: center;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1rem;
}

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

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 1100px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .portfolio-grid { grid-template-columns: 1fr; }
}

.portfolio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 2rem;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.portfolio-card:hover .card-image img {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.portfolio-card:hover .card-overlay {
    opacity: 1;
}

.btn-view-details {
    padding: 1rem 2rem;
    border-radius: 2rem;
    background: white;
    color: var(--bg-dark);
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.card-content {
    padding: 2rem;
}

.project-title {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
}

.project-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 12, 0.9);
    backdrop-filter: blur(10px);
}

.modal-content {
    background: #151518;
    margin: 10% auto;
    padding: 4rem;
    border: 1px solid var(--border-card);
    width: 90%;
    max-width: 800px;
    border-radius: 2.5rem;
    position: relative;
    animation: modalReveal 0.5s ease-out;
}

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

.close-modal {
    position: absolute;
    right: 2.5rem;
    top: 2rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--text-muted);
    background: transparent;
    border: none;
    line-height: 1;
}

.modal-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.divider {
    height: 1px;
    background: var(--border-card);
    margin: 2rem 0;
}

#modalDescription {
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #e2e8f0;
}

.modal-actions {
    display: flex;
    gap: 1.5rem;
}

.btn-action {
    flex: 1;
    padding: 1.2rem;
    text-align: center;
    border-radius: 1.5rem;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition-smooth);
}

.login-btn {
    background: var(--accent-primary);
    color: white;
}

.docs-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-card);
    color: var(--text-main);
}

.btn-action.disabled {
    opacity: 0.3;
    pointer-events: none;
    cursor: not-allowed;
}

/* Footer */
.main-footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-card);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 0.5rem 1.5rem;
}

.footer-links h4 {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-main);
}

.footer-legal {
    color: var(--text-muted);
}

/* Reveal Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    animation: revealUp 0.8s forwards ease-out;
}

@keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .hero-content h1 { font-size: 3rem; }
    .hero-actions { flex-direction: column; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: 1fr; }
    .modal-content { padding: 2rem; margin: 20% auto; }
}

@media (max-width: 968px) {
    .main-nav { display: none; }
    .menu-toggle { display: inline-flex; }
    .mobile-nav {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem 1.5rem;
        border-top: 1px solid var(--border-card);
        background: rgba(5, 5, 7, 0.95);
    }
    .mobile-nav[hidden] {
        display: none;
    }
    .mobile-nav a {
        text-decoration: none;
        color: var(--text-muted);
        font-weight: 500;
    }
    .mobile-nav .btn-cta {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
