/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --navy:      #0f172a;
    --dark:      #1e293b;
    --blue:      #3b82f6;
    --blue-dark: #2563eb;
    --light:     #f8fafc;
    --white:     #ffffff;
    --gray:      #64748b;
    --border:    #e2e8f0;
    --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section { padding: 5rem 0; }

/* ===== TYPOGRAPHY ===== */
.section-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--gray);
    max-width: 58ch;
    margin-bottom: 3rem;
    line-height: 1.7;
}

/* ===== NAVIGATION ===== */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.875rem 0;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.01em;
}

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

.nav-links a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

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

.nav-cta {
    background: var(--blue) !important;
    color: var(--white) !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 6px;
    font-weight: 600 !important;
    transition: background 0.2s !important;
}

.nav-cta:hover { background: var(--blue-dark) !important; }

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    position: relative;
    z-index: 101;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* ===== HERO ===== */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 0;
}

.hero-bg {
    position: absolute;
    inset: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(15, 23, 42, 0.88) 0%,
        rgba(15, 23, 42, 0.78) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 0 1.5rem;
    max-width: 800px;
}

.hero-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 1.25rem;
}

.hero-content h1 {
    font-size: clamp(2.75rem, 9vw, 5.5rem);
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.hero-tagline {
    font-size: clamp(0.875rem, 2vw, 1.05rem);
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 2.75rem;
    letter-spacing: 0.03em;
}

.hero-actions {
    display: flex;
    gap: 0.875rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 1.875rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: inline-block;
    font-family: var(--font);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: var(--blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: var(--white);
    background: transparent;
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

.scroll-indicator {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.4);
    animation: bounce 2.5s ease-in-out infinite;
    z-index: 1;
    transition: color 0.2s;
}

.scroll-indicator:hover { color: rgba(255,255,255,0.8); }

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%       { transform: translateX(-50%) translateY(8px); }
}

/* ===== ABOUT ===== */
#about { background: var(--white); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 5rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 12px;
    width: 100%;
    height: 420px;
    object-fit: cover;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.15);
}

.about-image::after {
    content: '';
    position: absolute;
    inset: -12px -12px auto auto;
    width: 80px;
    height: 80px;
    background: var(--blue);
    border-radius: 8px;
    z-index: -1;
    opacity: 0.3;
}

.about-text h2 { margin-bottom: 1.5rem; }

.about-text p {
    color: var(--gray);
    margin-bottom: 1.1rem;
    line-height: 1.85;
    font-size: 0.975rem;
}

/* ===== PORTFOLIO ===== */
#portfolio { background: var(--light); }

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.5rem 1.25rem;
    border: 1.5px solid var(--border);
    background: var(--white);
    border-radius: 100px;
    font-size: 0.825rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font);
    color: var(--gray);
    line-height: 1;
}

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

.filter-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

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

.portfolio-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    background: #dce3ec;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
    display: block;
}

.portfolio-item:hover img {
    transform: scale(1.06);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0) 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.portfolio-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue);
    margin-bottom: 0.3rem;
}

.portfolio-overlay p {
    color: var(--white);
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.35;
}

.portfolio-item.hidden { display: none; }

/* ===== SKILLS ===== */
#skills { background: var(--white); }

.skills-group { margin-bottom: 3.5rem; }
.skills-group:last-child { margin-bottom: 0; }

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.skill-card {
    background: var(--light);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
    transition: all 0.22s;
}

.skill-card:hover {
    border-color: var(--blue);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
    transform: translateY(-3px);
}

.skill-card img {
    width: 56px;
    height: 56px;
    object-fit: contain;
}

.skill-card span {
    font-size: 0.775rem;
    font-weight: 600;
    color: var(--dark);
    line-height: 1.3;
}

/* ===== CLIENTS ===== */
#clients { background: var(--light); }

.clients-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    align-items: center;
}

.client-logo {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 130px;
    transition: all 0.22s;
    text-align: center;
}

.client-logo:hover {
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.client-logo img {
    max-width: 100%;
    max-height: 52px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s;
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.client-logo span {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

/* ===== CONTACT ===== */
#contact {
    background: var(--navy);
    text-align: center;
}

#contact .section-label { color: var(--blue); }
#contact h2 { color: var(--white); }

#contact .section-subtitle {
    color: rgba(255, 255, 255, 0.55);
    margin-left: auto;
    margin-right: auto;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.22s;
}

.contact-link:hover {
    background: var(--blue);
    border-color: var(--blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.35);
}

.contact-link img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

/* ===== FOOTER ===== */
footer {
    background: #07101f;
    padding: 1.75rem 0;
    text-align: center;
}

footer p {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.825rem;
}

/* ===== LIGHTBOX ===== */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.97);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
}

#lightboxCaption {
    color: rgba(255, 255, 255, 0.55);
    margin-top: 1rem;
    font-size: 0.875rem;
}

#lightboxCounter {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.75rem;
    margin-top: 0.35rem;
}

.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s, background 0.2s;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover { opacity: 1; background: rgba(255,255,255,0.2); }

.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 1.25rem 0.875rem;
    border-radius: 8px;
    line-height: 1;
    transition: background 0.2s;
}

.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,0.18); }

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .clients-grid { grid-template-columns: repeat(3, 1fr); }
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    section { padding: 4rem 0; }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--navy);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2.25rem;
        z-index: 99;
    }

    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.2rem; }
    .nav-cta { font-size: 1.2rem !important; }
    .nav-toggle { display: flex; }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-image::after { display: none; }
    .about-image img { height: 300px; }

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

    .clients-grid { grid-template-columns: repeat(2, 1fr); }

    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}

@media (max-width: 480px) {
    section { padding: 3rem 0; }

    .portfolio-grid { grid-template-columns: 1fr; }

    .filter-bar { gap: 0.375rem; }
    .filter-btn { padding: 0.4rem 0.875rem; font-size: 0.775rem; }

    .clients-grid { grid-template-columns: repeat(2, 1fr); }

    .skills-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
