/* ===== RESET & VARIABLES ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a2540;
    --secondary: #0066ff;
    --accent: #00d4ff;
    --text: #1a1a2e;
    --text-light: #5a6478;
    --bg: #ffffff;
    --bg-alt: #f7f9fc;
    --border: #e5e9f2;
    --shadow: 0 4px 20px rgba(10, 37, 64, 0.08);
    --shadow-hover: 0 10px 40px rgba(10, 37, 64, 0.15);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

/* ===== PORTFOLIO HERO ===== */
.portfolio-hero {
    padding: 160px 0 80px;
    background: linear-gradient(135deg, #f7f9fc 0%, #e8f0ff 100%);
    text-align: center;
}

.portfolio-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.portfolio-hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
    padding: 80px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

/* ===== PORTFOLIO CARD ===== */
.portfolio-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.08);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 37, 64, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-card:hover .portfolio-overlay {
    opacity: 1;
}

.btn-view {
    padding: 12px 28px;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.portfolio-card:hover .btn-view {
    transform: translateY(0);
}

.btn-view:hover {
    background: var(--secondary);
    color: white;
}

.portfolio-content {
    padding: 24px;
}

.portfolio-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.portfolio-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.portfolio-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.duration,
.category {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.category {
    color: var(--secondary);
    font-weight: 600;
}

/* ===== CTA SECTION ===== */
.portfolio-cta {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    text-align: center;
    color: white;
}

.portfolio-cta h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.portfolio-cta p {
    font-size: 1.15rem;
    opacity: 0.95;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: white;
    color: var(--secondary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.05rem;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    font-weight: 800;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.legal-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.legal-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: var(--transition);
}

.legal-links a:hover {
    color: var(--accent);
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius);
    max-width: 700px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--bg-alt);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--border);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 800;
}

.modal-content h3 {
    color: var(--primary);
    margin: 24px 0 12px;
    font-size: 1.1rem;
}

.modal-content p {
    color: var(--text-light);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .portfolio-hero {
        padding: 130px 0 60px;
    }

    .portfolio-section {
        padding: 60px 0;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-cta {
        padding: 70px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .legal-links {
        justify-content: center;
    }
}