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

/***************************
        VARIABLES 
****************************/
:root {

    --background: #050816;
    --background-light: #081229;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;
    --text: #ffffff;
    --text-light: #b9c2dd;
    --border: rgba(255, 255, 255, .08);
    --radius: 24px;
    --transition: .30s;
    --shadow: 0 0 40px rgba(37, 99, 235, .15);
    --container: 1400px;
    --space-xs: .5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 6rem;
    --surface: #101624;
}

/***************************
             BODY 
****************************/
body {
    background:
        radial-gradient(circle at top,
            var(--background-light) 0%,
            var(--background) 60%);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/********************************
            SECTION
*********************************/

.section {
    width: 100%;
    max-width: var(--container);
    margin: auto;
    padding: 80px 20px;
}

/***************************
            TITLES
****************************/

.title {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 15px;
}

.title-xl {
    font-size: 3rem;
}

.title-lg {
    font-size: 2.8rem;
}

.title-md {
    font-size: 2.2rem;
}

.title-sm {
    font-size: 1.5rem;
}

/**************************
          TEXT 
**************************/
.text {
    color: var(--text-light);
    line-height: 1.8;
}

.text-center {
    text-align: center;
}

.text-white {
    color: var(--text);
}


/**************************
          GRID
**************************/
.grid {
    display: grid;
    gap: 30px;
}

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

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

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


/*******************************
             NAVBAR 
********************************/
.navbar {
    width: 100%;
    max-width: var(--container);
    margin: auto;
    padding: 25px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    background: rgba(5, 8, 22, .90);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/******************************
            BRAND 
*******************************/
.brand {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-decoration: none;
    transition: var(--transition);
}

.brand:hover {
    transform: scale(1.02);
}

.brand-white {
    color: #ffffff;
}

.brand-blue {
    color: var(--primary);
    margin-left: 2px;
    text-shadow:
        0 0 15px rgba(59, 130, 246, 0.5);
}

/************************** 
            MENU 
****************************/
.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
}

.nav-links a {
    position: relative;
    color: #e7ecff;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding-bottom: 6px;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
    border-radius: 10px;
}

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

.nav-links a:hover::after {
    width: 100%;
}

/************************ 
            HERO 
*************************/
.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    width: 100%;
    max-width: var(--container);
    margin: auto;
    padding: 70px 20px;
}

/************************ 
            LEFT 
*************************/
.hero-left {
    flex: 1;
}

.subtitle {
    color: var(--primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.description {
    max-width: 650px;
    margin-bottom: 30px;
}

/***************************
            BUTTONS
****************************/
.buttons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 14px;
    transition: var(--transition);
    padding: 15px 30px;
}

.btn-primary {
    background:
        linear-gradient(to right,
            #2563eb,
            #3b82f6);
    color: var(--text);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
}

.btn-secondary:hover {
    background:
        rgba(255, 255, 255, 0.05);
}

.btn-gradient {
    background:
        linear-gradient(to right,
            var(--primary-dark),
            var(--secondary));
    color: white;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(139, 92, 246, .4);
}

/************************** 
            RIGHT 
***************************/
.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
}

/************************** 
            IMATGE 
***************************/
.setup-image {
    width: 100%;
    max-width: 620px;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.15);
    object-fit: cover;
    transition: var(--transition);
}

/************************** 
            CARDS 
***************************/
.cards {
    width: 100%;
    max-width: var(--container);
    margin: auto;
    padding: 10px 20px 40px;
    margin-top: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: 30px;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.project-card {
    display: flex;
    align-items: center;
    gap: 40px;
}

.project-content {
    flex: 1;
}

.project-image {
    flex: 0 0 460px;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(77, 163, 255, .45);
    box-shadow: 0 15px 35px rgba(37, 99, 235, .18);
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 18px;
    transition: var(--transition);
}

.card:hover .card-title {
    color: var(--primary);
}

.card-text {
    color: var(--text-light);
    line-height: 1.7;
}

.card .btn {
    margin-top: 25px;
}

.card-image {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
    display: block;
}

.project-content .btn {
    margin-top: 35px;
    padding: 12px 24px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.tag {

    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(59, 130, 246, .18);
    border: 1px solid rgba(59, 130, 246, .45);
    color: var(--primary);
    font-size: .85rem;
    font-weight: 600;
}

::selection {
    background: var(--primary);
    color: white;

}


/*********************************
            FOOTER
*********************************/
.footer {
    margin-top: 80px;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, .02);
}

.footer-grid {
    width: 100%;
    max-width: var(--container);
    margin: auto;
    padding: 60px 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 50px;
}

.footer-column h3 {
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 1.1rem;
}

.footer-column p {
    color: var(--text-light);
    line-height: 1.8;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 25px;
    color: var(--text-light);
    font-size: .9rem;
}

/*******************************
            SOBRE MI
********************************/
.about-hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-left {
    display: flex;
    flex-direction: column;
}

.about-left .description {
    margin-bottom: 35px;
}

.about-left .btn {
    align-self: flex-start;
    margin-top: 10px;
}

.about-studies {
    background: rgba(255, 255, 255, .03);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    height: fit-content;
}

.about-studies .title {
    margin-bottom: 35px;
}


/* ---------- TIMELINE ---------- */
.timeline {
    position: relative;
    padding-left: 35px;
    padding-left: 28px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 10px;
    width: 2px;
    background: rgba(59, 130, 246, .55);
}

.timeline-item {
    position: relative;
    margin-bottom: 52px;
}

.timeline-dot {
    position: absolute;
    left: -28px;
    top: 8px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 15px rgba(59, 130, 246, .45);
}

.timeline-content h3 {
    margin-bottom: 12px;
}

.timeline-content p {
    color: var(--text-light);
    margin-bottom: 12px;
}

.timeline-content span {
    color: var(--primary);
    font-weight: 700;
}

/*==================================================
  SOBRE MI - VALORS
==================================================*/

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 45px;
}

.value-card {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    padding: 35px 30px;
    transition: .3s;
}

.value-card:hover {
    transform: translateY(-6px);
    border-color: rgba(59, 130, 246, .45);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
}

.value-icon {
    font-size: 42px;
    margin-bottom: 22px;
}

.value-card h3 {
    font-size: 1.7rem;
    margin-bottom: 18px;
    line-height: 1.2;
}

.value-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ===========================
   CONTACTE
=========================== */

.contact-hero {
    padding-top: 40px;
    padding-bottom: 0;
}

.contact-title {
    max-width: 700px;
    margin-bottom: 60px;
}

.contact-grid-custom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 70px;
}

.contact-card-custom {
    background: #101624;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    min-height: 330px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    transition: .3s;
}

.contact-card-custom h2 {
    margin-bottom: 12px;
}

.contact-card-custom p {
    color: #a5afc2;
    line-height: 1.6;
}

.contact-card-custom:hover {
    transform: translateY(-6px);
    border-color: #3b82f6;
    box-shadow: 0 0 30px rgba(59, 130, 246, .18);
}

.contact-email {
    margin-top: 18px;
    color: #8ea2c5;
    font-size: .95rem;
    word-break: break-word;
}

.contact-icon {
    width: 74px;
    height: 74px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    font-size: 34px;

    margin-bottom: 28px;

    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .25);
}

.contact-icon img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.contact-btn {
    margin-top: 20px;
    width: 100%;
}

.contact-email {
    margin-top: 15px;
    color: #97a3b6;
    font-size: .95rem;
}

.social-links {
    display: flex;
    gap: 18px;
    margin-top: 28px;
}

.social-links img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.social-links a {
    width: 64px;
    height: 64px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background: #161d2f;
    border: 1px solid rgba(255, 255, 255, .08);

    transition: all .25s ease;
}

.social-links img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.social-links a:hover {
    transform: translateY(-5px);
    border-color: #3b82f6;
    background: #1d2944;
    box-shadow: 0 0 18px rgba(59, 130, 246, .25);
}

/*==================================================
                REPARACIÓ
==================================================*/

.repair-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.repair-card {
    background: #101624;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    padding: 40px;
    transition: .3s;
}

.repair-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(59, 130, 246, .18);
}

.repair-card .card-title {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 18px;
}

.repair-card .card-text {
    color: #b7c2d3;
    line-height: 1.75;
}

.repair-card .icon-circle {
    width: 68px;
    height: 68px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    border-radius: 50%;
    background: #16213b;
    border: 1px solid rgba(59, 130, 246, .35);
}

.repair-card .icon-circle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.repair-card .icon-circle {
    box-shadow: 0 0 18px rgba(59, 130, 246, .18);
}


/*==================================================
            ALTRES SERVEIS
==================================================*/

.services-container {
    margin-top: 30px;
}

.repair-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 45px;
}

.repair-service-card {
    background: #101624;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    padding: 32px;
    transition: .30s;
}

.repair-service-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(59, 130, 246, .18);
}

.repair-service-card .icon-circle {
    width: 72px;
    height: 72px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .22);
    border-radius: 50%;
}

.repair-service-card .icon-circle img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

/*==================================================
                BENEFICIS
==================================================*/

.repair-benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 45px;
}

.repair-benefit-card {
    background: #101624;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 24px;
    padding: 35px;
    transition: .3s;
}

.repair-benefit-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(59, 130, 246, .18);
}

.repair-benefit-card .icon-circle {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    background: rgba(59, 130, 246, .08);
    border: 1px solid rgba(59, 130, 246, .25);
    border-radius: 50%;
}

.repair-benefit-card .icon-circle img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.repair-benefit-card h3 {
    margin-bottom: 15px;
}

.repair-benefit-card p {
    color: #aab4c8;
    line-height: 1.7;
}

/*==================================================
                    PROJECTES
==================================================*/

/*====================================
  Què és? + Tecnologies
====================================*/

.project-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    align-items: stretch;
}

.project-info-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    padding: 30px;
}

.project-info-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(59, 130, 246, .18);
}

.project-info-card .title {
    margin-bottom: 25px;
}

.project-info-card p {
    margin-bottom: 18px;
    line-height: 1.8;
}


/*====================================
  Tecnologies
====================================*/

.project-stack-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 0;
}

.project-info-card .title {
    margin-bottom: 35px;
}

.project-info-card h3 {
    margin-top: 35px;
    margin-bottom: 15px;
}


.project-stack-card {
    background: #151c2d;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    padding: 22px;
    text-align: center;
    transition: .25s;
}

.project-stack-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.project-stack-card .icon-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
}

.project-stack-card .icon-circle img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.project-stack-card h4 {
    margin-bottom: 10px;
}

.project-stack-card p {
    margin: 0;
    color: #aab4c8;
    font-size: .95rem;
}


/*====================================
  Funcionalitats
====================================*/

.project-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 45px;
}

.project-feature-card {
    background: #101624;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 22px;
    padding: 30px;
    text-align: center;
    transition: .3s;
}

.project-feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 40px rgba(59, 130, 246, .18);
}

.project-feature-card .icon-circle {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
}

.project-feature-card .icon-circle img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.project-feature-card h3 {
    margin-bottom: 15px;
}

.project-feature-card p {
    color: #aab4c8;
    line-height: 1.7;
}

/*====================================
  Projecte destacat
====================================*/

.project-highlight {

    display: grid;

    grid-template-columns: 1.2fr .8fr;

    gap: 50px;

    align-items: center;
}

.project-highlight-content p {

    margin-bottom: 20px;

    line-height: 1.8;
}

.project-highlight-image {

    display: flex;

    justify-content: center;
}




/**************************************************
                    RESPONSIVE
***************************************************/

/***********************
        TABLET
************************/
@media (max-width:1200px) {

    /* HERO */

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 60px;
        padding: 60px 20px;
    }

    .hero-left,
    .hero-right {
        width: 100%;
    }

    .hero-right {
        justify-content: center;
    }

    .setup-image {
        max-width: 600px;
        width: 100%;
    }

    .description {
        margin: 0 auto 35px;
        max-width: 800px;
    }

    .buttons {
        justify-content: center;
    }

    /* PROJECTES HOME */

    .project-card {
        flex-direction: column;
    }

    .project-image {
        flex: unset;
        width: 100%;
    }

    /* SOBRE MI */

    .about-hero {
        grid-template-columns: 1fr;
        gap: 50px;
    }

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

    .about-left .btn {
        align-self: center;
    }


    /* CONTACTE */

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

    /* REPARACIÓ */

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

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

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

    /* PROJECTES */

    .project-info-grid {
        grid-template-columns: 1fr;
    }

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

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

    .project-highlight {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .project-highlight-image {
        order: -1;
    }

    /* FOOTER */

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

}

/************************
        MÒBIL
************************/
@media (max-width:768px){

    /* ==========================
       SECCIONS GENERALS
    ========================== */

    .section{
        padding:60px 20px;
    }

    /* ==========================
       NAVBAR
    ========================== */

    .navbar{
        flex-direction:column;
        gap:25px;
        padding:25px 20px;
    }

    .brand{
        font-size:1.8rem;
    }

    .nav-links{
        flex-wrap:wrap;
        justify-content:center;
        gap:18px;
    }

    .nav-links a{
        font-size:.95rem;
    }

    /* ==========================
       HERO
    ========================== */

    .hero{
        flex-direction:column;
        text-align:center;
        gap:45px;
        padding:50px 20px;
    }

    .hero-left,
    .hero-right{
        width:100%;
    }

    .hero-right{
        justify-content:center;
    }

    .hero h1{
        font-size:2.4rem;
        line-height:1.15;
    }

    .title-lg{
        font-size:2.4rem;
    }

    .title-md{
        font-size:1.9rem;
    }

    .description{
        font-size:1rem;
        margin:0 auto 30px;
    }

    .buttons{
        flex-direction:column;
        width:100%;
        gap:15px;
    }

    .buttons .btn{
        width:100%;
        max-width:320px;
    }

    .setup-image{
        width:100%;
    }

    /* ==========================
       HOME
    ========================== */

    .cards{
        grid-template-columns:1fr;
        padding:30px 20px;
    }

    .project-card{
        flex-direction:column;
    }

    .project-image{
        width:100%;
        flex:none;
    }

    /* ==========================
       SOBRE MI
    ========================== */

    .about-hero{
        grid-template-columns:1fr;
        gap:40px;
    }

    .about-left{
        align-items:center;
        text-align:center;
    }

    .about-left .btn{
        align-self:center;
    }

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

    /* ==========================
       CONTACTE
    ========================== */

    .contact-grid-custom{
        grid-template-columns:1fr;
        gap:25px;
    }

    .contact-card-custom{
        min-height:auto;
    }

    /* ==========================
       REPARACIÓ
    ========================== */

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

    .repair-services-grid{
        grid-template-columns:1fr;
    }

    .repair-benefits-grid{
        grid-template-columns:1fr;
    }

    /* ==========================
       PROJECTES
    ========================== */

    .project-info-grid{
        grid-template-columns:1fr;
    }

    .project-stack-grid{
        grid-template-columns:1fr;
    }

    .project-features-grid{
        grid-template-columns:1fr;
    }

    .project-highlight{
        grid-template-columns:1fr;
        text-align:center;
        gap:35px;
    }

    .project-highlight-image{
        order:-1;
    }

    /* ==========================
       FOOTER
    ========================== */

    .footer-grid{
        grid-template-columns:1fr;
        gap:35px;
        text-align:center;
    }

}