/* =========================================
   RESET AND BASES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: #050505;
    color: #f5f5f5;
    overflow-x: hidden;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    padding: 2px 20px;
    justify-content: space-between;
    align-items: center;
    z-index: 1200;
    background: linear-gradient(to bottom, rgba(5, 5, 5, 0.8) 0%, rgba(5, 5, 5, 0) 100%);
    backdrop-filter: blur(4px);
}

.nav-logo {
    display: flex;
    align-items: center;
    min-width: 118px;
}

.nav-home {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transform: translateX(0);
    transition: transform 0.35s ease, opacity 0.3s ease;
}

.nav-home img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    display: block;
}

.nav-home-arrow {
    width: 0;
    margin-right: 0;
    opacity: 0;
    overflow: hidden;
    font-size: 30px;
    line-height: 1;
    transform: translateX(-8px);
    transition: width 0.35s ease, margin-right 0.35s ease, opacity 0.25s ease, transform 0.35s ease;
}

body.project-open .nav-home {
    transform: translateX(14px);
}

body.project-open .nav-home-arrow {
    width: 50px;
    margin-right: 10px;
    opacity: 1;
    transform: translateX(0);
}

body.project-open .nav-links {
    opacity: 0;
    pointer-events: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
    transition: opacity 0.25s ease;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: 0.3s;
}

.nav-links a:hover {
    opacity: 0.5;
}

/* =========================================
   HERO (COVER)
   ========================================= */
.hero {
    width: 100%;
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.5)), url("img/E2Part.png") center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-content .top-text {
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-content h1 {
    font-size: clamp(60px, 18vw, 200px);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 0.8;
    margin-bottom: 20px;
}

.hero-content .bottom-text {
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.4em;
    font-weight: 300;
    opacity: 0.9;
}

/* =========================================
   PROJECT SECTIONS
   ========================================= */
.portfolio-sections {
    width: 100%;
    background: #050505;
}

.project-section {
    width: 100%;
    background: #050505;
}

.project-section + .project-section {
    padding-top: 60px;
}

.section-title {
    padding: 90px 40px 35px;
    font-size: clamp(72px, 16vw, 210px);
    font-weight: 900;
    line-height: 0.82;
    text-transform: uppercase;
}

.projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    background: #050505;
}

.project-card {
    position: relative;
    height: 60vh;
    overflow: hidden;
    cursor: pointer;
}

.project-card img,
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}

.project-card:hover img,
.project-card:hover .project-image {
    transform: scale(1.08);
    filter: brightness(0.3);
}

.project-image {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.project-image--targeta {
    background-color: #4a4a4a;
    background-image: url("img/targeta2.png");
}

.project-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 45px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0;
    transition: 0.4s;
    pointer-events: none;
}

.project-card:hover .project-title {
    opacity: 1;
}

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

.project-card--locked {
    cursor: not-allowed;
}

.project-card--locked::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(120, 120, 120, 0.78);
    backdrop-filter: grayscale(1);
}

.project-card--locked:hover .project-image {
    transform: none;
    filter: grayscale(1) brightness(0.62);
}

.locked-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 40px;
    text-align: center;
    pointer-events: none;
}

.locked-content .project-title {
    position: static;
    inset: auto;
    display: block;
    font-size: clamp(34px, 5vw, 68px);
    opacity: 1;
}

.work-progress {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.86);
}

/* =========================================
   ABOUT ME
   ========================================= */
.about-me {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #080808;
    height: 1080px;
    width: 100%;
    align-items: center;
}

.about-image {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
}

.about-image img {
    max-height: 1080px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.about-content {
    padding: 80px;
}

.text-wrapper {
    width: 100%;
}

.about-tag {
    font-size: 14px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #777;
    margin-bottom: 20px;
}

.about-content h2 {
    font-size: clamp(30px, 5vw, 55px);
    line-height: 1.1;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.about-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #aaa;
    margin-bottom: 40px;
}

.skill-box {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    margin: 5px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.03);
}

/* =========================================
   FOOTER WITH FIXED ALIGNMENT
   ========================================= */
.contact-footer {
    padding: 60px 0;
    background: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding-left: 80px;
}

.footer-right .text-wrapper {
    width: 100%;
    max-width: 600px;
}

.footer-right h2 {
    font-size: 50px;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 10px;
    text-align: left;
}

/* CONTACT ICONS */
.contact-links {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.contact-links a {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.contact-links img {
    width: 30px;
    height: auto;
}

.contact-links a:hover {
    transform: translateY(-5px);
    opacity: 0.7;
}

/* =========================================
   PROJECT VIEWER (MODAL)
   ========================================= */
#projectViewer {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1000;
    display: none;
    overflow-y: auto;
}

#projectViewer.active {
    display: block;
}

.viewer-hero {
    width: 100%;
    height: 100vh;
    background: transparent;
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    overflow: hidden;
}

#mediaContainer {
    width: 100%;
    height: 100%;
    transition: opacity 0.5s;
    position: relative;
    z-index: 0;
}

#mediaContainer img,
#mediaContainer video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.viewer-details {
    width: 100%;
    padding: 15px 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15px;
    background: linear-gradient(rgba(5,5,5,0) 0%, rgba(5,5,5,0.95) 50%);
    margin-top: 93vh;
    position: relative;
    z-index: 1001;
}

.viewer-details h2 {
    font-size: 60px;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.viewer-details p {
    font-size: 19px;
    line-height: 1.8;
    color: #bbb;
    margin-bottom: 50px;
}

.thumb-grid {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.extra-img {
    flex: 0 0 320px;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.4s;
}

.extra-img:hover {
    filter: brightness(0.5);
}

/* =========================================
   CURSOR GLOW 
   ========================================= */
.cursor-glow {
    width: 400px;
    height: 400px;
    position: fixed;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, left 0.15s ease-out, top 0.15s ease-out;
}

/* =========================================
   RESPONSIVE (MÒBIL)
   ========================================= */
@media (max-width: 900px) {
    .projects,
    .about-me,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        padding: 65px 24px 28px;
        font-size: clamp(70px, 28vw, 140px);
    }

    .project-section + .project-section {
        padding-top: 35px;
    }

    .about-me {
        height: auto;
    }

    .footer-right {
        padding: 40px;
    }
}
