/* ============================================================
   DARK MODE PREVENTION
   ============================================================ */
:root {
    color-scheme: light only !important;
    -webkit-color-scheme: light only !important;
    --accent: #00d4ff;
    --bg: #000;
    --card-bg: #111;
    --border: #222;
    --text: #fff;
    --muted: #aaa;
}

html {
    color-scheme: light only !important;
    -webkit-color-scheme: light only !important;
    background: #000 !important;
}

body,
img, picture, video, canvas, svg, iframe {
    color-scheme: light only !important;
    -webkit-color-scheme: light only !important;
}

img, picture, video, canvas, svg, iframe {
    filter: none !important;
    -webkit-filter: none !important;
    opacity: 1 !important;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform: translateZ(0) !important;
    -webkit-transform: translateZ(0) !important;
}

@media (prefers-color-scheme: dark) {
    :root, html, body {
        color-scheme: light only !important;
        -webkit-color-scheme: light only !important;
    }
    img, picture, video, canvas, svg, iframe {
        filter: none !important;
        -webkit-filter: none !important;
    }
}

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

body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   NAV
   ============================================================ */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 3%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(0,0,0,.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.logo {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    text-decoration: none;
    transition: transform .3s;
    z-index: 1001;
    flex: 0 0 auto;
}

.logo img { border-radius: 20%; }
.logo:hover { transform: rotate(-5deg) scale(1.05); }

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex: 0 0 auto;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: all .3s ease;
}

.burger-menu.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger-menu.active span:nth-child(2) { opacity: 0; }
.burger-menu.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.nav-center { flex: 1; display: flex; justify-content: center; }

.nav-links {
    display: flex;
    gap: 3rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    transition: color .3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width .3s;
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }

.cta-button {
    padding: .8rem 2rem;
    border: 2px solid var(--text);
    border-radius: 30px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .3s;
    white-space: nowrap;
    flex: 0 0 auto;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-2px);
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 999;
}

.nav-overlay.active { display: block; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    padding: 140px 5% 40px;
}

.hero-inner {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hero-content h1 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: .4rem;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 2px;
}

.subtitle {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    color: #ccc;
    letter-spacing: 3px;
}

/* ── Hero right: welcome + divider as underline ── */
.hero-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.hero-right p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    color: var(--muted);
    font-weight: 300;
    margin-bottom: 0.5rem;
}

/* ============================================================
   FILTERS
   ============================================================ */
.filter-btn {
    padding: .75rem 2rem;
    background: transparent;
    border: 2px solid var(--border);
    border-radius: 30px;
    color: var(--text);
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all .3s ease;
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.2), transparent);
    transition: left .5s ease;
}

.filter-btn:hover::before { left: 100%; }

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,212,255,.2);
}

.filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--bg);
    box-shadow: 0 5px 25px rgba(0,212,255,.4);
}

.filter-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,212,255,.5);
}

/* ============================================================
   PROJECTS GRID
   ============================================================ */
.projects { padding: 0 5% 80px; }

.filter-container {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin: 0 auto 6rem;
    max-width: 1600px;
    flex-wrap: wrap;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    max-width: 1600px;
    margin: 0 auto;
}

/* ── Cards ── */
.project-card {
    border-radius: 24px;
    border: 2px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    transition: transform .5s, box-shadow .5s, border-color .5s, opacity .3s;
    will-change: transform;
}

.project-card.hidden  { display: none; }
.project-card.visible { animation: fadeInScale .4s ease; }

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.project-card:hover {
    transform: translateY(-8px) scale(1.005);
    box-shadow: 0 20px 60px rgba(0,212,255,.3);
    border-color: #333;
}

/* ── Wide / auto-wide (span-2, side-by-side layout) ── */
.project-card--wide,
.project-card--auto-wide {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
}

.project-card--wide .project-image,
.project-card--auto-wide .project-image {
    aspect-ratio: 16 / 10;
    height: auto;
}

.project-card--wide .project-info,
.project-card--auto-wide .project-info {
    background: #000;
    padding: 2.5rem;
}

/* ── Project image ── */
.project-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    height: auto;
    overflow: hidden;
    position: relative;
    background: #000;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .5s;
    display: block;
}

.project-card:hover .project-image img { transform: scale(1.03); }

.project-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.project-category {
    display: block;
    font-size: .9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #333;
}

.project-title {
    font-family: 'Anton', sans-serif;
    font-size: 2rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
    gap: 1rem;
}

.project-arrow {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .3s;
}

.project-card:hover .project-arrow {
    background: var(--accent);
    transform: rotate(45deg);
}

.project-arrow svg {
    width: 20px;
    height: 20px;
    stroke: var(--text);
    stroke-width: 2;
}

/* ============================================================
   FOOTER / CTA
   ============================================================ */
.cta-footer {
    background: #0a0a0a;
    padding: 80px 5%;
    text-align: center;
    margin-top: 6rem;
}

.cta-content { max-width: 600px; margin: 0 auto; }

.avatar-badge {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e3192, #00aeef);
    padding: 8px;
    animation: float 3s ease-in-out infinite;
}

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

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--bg);
}

.cta-content h2 {
    font-family: 'Anton', sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    letter-spacing: .5px;
}

.cta-content p {
    font-size: .9rem;
    color: var(--muted);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.email-link {
    display: block;
    font-size: 1.1rem;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 2.5rem;
    transition: color .3s;
}

.email-link:hover { color: var(--text); }

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
}

.social-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border);
    border-radius: 50%;
    transition: all .3s ease;
    text-decoration: none;
}

.social-icon img {
    width: 24px;
    height: 24px;
    transition: transform .3s ease;
    filter: brightness(0) invert(1);
}

.social-icon:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,212,255,.3);
}

.social-icon:hover img {
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(64%) sepia(98%) saturate(2476%) hue-rotate(166deg) brightness(102%) contrast(101%);
}

.download-cv {
    padding: 1rem 2.5rem;
    border: 2px solid var(--text);
    border-radius: 30px;
    background: transparent;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all .3s;
}

.download-cv:hover {
    background: var(--text);
    color: var(--bg);
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(255,255,255,.2);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 968px) {
    .hero { padding: 140px 5% 60px; }
    .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }

    .project-card--wide,
    .project-card--auto-wide {
        grid-template-columns: 1fr;
        height: auto;
    }

    .project-card--wide .project-image,
    .project-card--auto-wide .project-image {
        aspect-ratio: 16 / 10;
        height: auto;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .filter-btn { padding: .6rem 1.3rem; font-size: .75rem; letter-spacing: 1px; }

    .nav-center { display: block; }
    .burger-menu { display: flex; order: 2; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: rgba(0,0,0,.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right .4s ease;
        padding: 2rem;
        z-index: 1000;
        margin: 0;
    }

    .nav-links.active { right: 0; }
    .nav-links li { width: 100%; text-align: center; }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: .5rem 0;
        opacity: 0;
        transform: translateX(20px);
        transition: all .3s ease;
    }

    .nav-links.active a { opacity: 1; transform: translateX(0); }
    .nav-links.active a:nth-child(1) { transition-delay: .1s; }
    .nav-links.active a:nth-child(2) { transition-delay: .2s; }
    .nav-links.active a:nth-child(3) { transition-delay: .3s; }

    nav > .cta-button { display: none; }

    .nav-links .mobile-cta {
        display: inline-block;
        opacity: 0;
        transform: translateX(20px);
        transition: all .3s ease .4s;
        margin-top: 1rem;
        width: auto;
        padding: .8rem 2rem;
    }

    .nav-links.active .mobile-cta { opacity: 1; transform: translateX(0); }

    nav {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(0,0,0,.98) !important;
    }

    .hero { padding: 120px 5% 50px; }


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

    .project-card,
    .project-card--wide,
    .project-card--auto-wide {
        grid-column: span 1;
        grid-template-columns: 1fr;
        height: auto;
        display: block;
    }

    /* All images use aspect-ratio on mobile */
    .project-image,
    .project-card--wide .project-image,
    .project-card--auto-wide .project-image {
        aspect-ratio: 16 / 10;
        height: auto;
    }

    .project-info { padding: 1.5rem; }
    .project-category { font-size: .75rem; letter-spacing: 1px; margin-bottom: 1rem; padding-bottom: .75rem; }
    .project-title { font-size: 1.5rem; }
    .project-arrow { width: 32px; height: 32px; min-width: 32px; }
    .project-arrow svg { width: 16px; height: 16px; }

    .social-links { gap: 1.2rem; margin-bottom: 2rem; }
    .social-icon { width: 44px; height: 44px; }
    .social-icon img { width: 22px; height: 22px; }
}