*{
     box-sizing: border-box;
     margin: 0;
     padding: 0;
}

/* Prevenir desbordamiento horizontal */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

html{
    scroll-behavior: smooth;
    scroll-padding-top: 0;
    zoom: 1;
}

body{
    font-family: 'Arimo' , sans-serif;
    margin: 0;
    padding-top: 0;
    opacity: 1;
    zoom: 1;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
}

body.page-loading {
    opacity: 0;
}

/* Loading screen overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(70, 85, 105) 0%, rgb(62, 62, 206) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    animation: fadeOutOverlay 0.3s ease-out 0.5s forwards;
}

.loading-content {
    text-align: center;
    color: white;
    animation: slideUpContent 0.7s ease-out;
}

.loading-content h1 {
    font-size: 3em;
    margin: 0;
    font-weight: bold;
    animation: fadeInText 0.5s ease-out;
    display: none;
}

.loading-content p {
    display: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 30px auto;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top: 4px solid rgb(50, 70, 130);
    border-right: 4px solid rgb(62, 62, 206);
    border-radius: 50%;
    animation: spin 1.8s linear infinite;
    box-shadow: 0 0 20px rgba(50, 70, 130, 0.5), inset 0 0 20px rgba(62, 62, 206, 0.3);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeOutOverlay {
    from {
        opacity: 1;
        visibility: visible;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes slideUpContent {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Page entrance animation */
@keyframes fadeInPage {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

body.page-loaded {
    animation: fadeInPage 1s ease-out;
    opacity: 1;
}

h1{ font-size: clamp(2rem, 4vw, 3.5em);}
h2{ font-size: clamp(1.5rem, 3vw, 2.7em);}
h3{ font-size: clamp(1.25rem, 2.5vw, 2em);}
p{ font-size: clamp(1rem, 1.5vw, 1.25em);}
ul{ list-style: none;}
li { font-size: clamp(1rem, 1.5vw, 1.25em);}

button{
    font-size: clamp(1rem, 2vw, 1.5em);
    font-weight: bold;
    padding: clamp(8px, 1vw, 10px) clamp(20px, 3vw, 30px);
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,5);
    box-shadow: 2px 2px 10px rgba(0,0,0,5) ;
    color: white;
    background-color: rgb(62, 62, 206);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    --mouse-x: 50%;
    --mouse-y: 50%;
}

button::before {
    content: '';
    position: absolute;
    top: var(--mouse-y);
    left: var(--mouse-x);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.4) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: width 0.6s, height 0.6s;
}

button:hover::before {
    width: 80px;
    height: 80px;
}

button:hover{
    background-color: rgb(88, 88, 228);
    box-shadow: 0 8px 25px rgba(62, 62, 206, 0.5);
}

.container{
    max-width: min(1300px, 95vw);
    margin: auto;
    padding: 0 clamp(10px, 2vw, 20px);
}

.accent-color { 
    color: #3a86ff;
    transition: all 0.3s ease;
    text-shadow: 0 0 0 transparent;
}

header{
    background-color: rgba(30, 40, 70, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
}

header .logo{
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #5a7fd4 0%, #6b5ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: white;
    font-size: 1.2em;
    margin: 0;
    padding: 0;
    box-shadow: 0 8px 25px rgba(90, 127, 212, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: -1px;
}

header .logo-text {
    font-weight: 900;
    font-size: 1em;
}

header .logo-accent {
    font-weight: 900;
    font-size: 1em;
    opacity: 0.8;
}

header .logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

header .logo-link:hover .logo::before {
    left: 100%;
}

header .logo-link {
    text-decoration: none;
    padding: 15px 30px;
    display: block;
}

header .logo-link:hover .logo {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

header .container{
    display: flex;
    flex-direction: column;
    align-items: center;
}

header nav {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding-bottom: 25px;
    align-items: center;
    gap: 10px;
}

header a {
    padding: 5px 12px;
    text-decoration: none;
    font-weight: bold;
    color: white;
}

header a:hover {
    color: rgb(180, 200, 220);
}

.language-switch {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.lang-btn {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background-color: transparent;
    font-weight: bold;
    cursor: pointer;
    color: white;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border-radius: 5px;
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: white;
}

.lang-btn.active {
    background-color: white;
    color: rgb(70, 85, 105);
    border-color: white;
}



#about {
    position: relative;
    background: #050505;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#about .about-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 120px 12px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    max-width: min(900px, 92vw);
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible;
}

#about h2 {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    font-weight: 800;
    padding: 30px 0;
}

#about p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    line-height: 1.8;
}

/* ============================================= */
/* GRADIENT BACKGROUND EFFECT STYLES */
/* ============================================= */

.gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.gradient-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.sphere-1 {
    width: 40vw;
    height: 40vw;
    background: linear-gradient(40deg, rgba(255, 255, 255, 0.8), rgba(100, 150, 255, 0.4));
    top: -10%;
    left: -10%;
    animation: float-1 15s ease-in-out infinite alternate;
}

.sphere-2 {
    width: 45vw;
    height: 45vw;
    background: linear-gradient(240deg, rgba(72, 0, 255, 0.8), rgba(0, 183, 255, 0.4));
    bottom: -20%;
    right: -10%;
    animation: float-2 18s ease-in-out infinite alternate;
}

.sphere-3 {
    width: 30vw;
    height: 30vw;
    background: linear-gradient(120deg, rgba(133, 89, 255, 0.5), rgba(98, 216, 249, 0.3));
    top: 60%;
    left: 20%;
    animation: float-3 20s ease-in-out infinite alternate;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    z-index: 5;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

@keyframes float-1 {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

@keyframes float-2 {
    0% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(-10%, -5%) scale(1.15);
    }
}

@keyframes float-3 {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    100% {
        transform: translate(-5%, 10%) scale(1.05);
        opacity: 0.6;
    }
}

.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    z-index: 2;
}

.glow {
    position: absolute;
    width: 40vw;
    height: 40vh;
    background: radial-gradient(circle, rgba(72, 0, 255, 0.15), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    animation: pulse 8s infinite alternate;
    filter: blur(30px);
}

@keyframes pulse {
    0% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(0.9);
    }
    100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: white;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
}

#about .container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Hover on title illuminates accent-color text */
#about .grow-title:hover .accent-color {
    color: #5fa8ff;
    text-shadow: 0 0 20px rgba(58, 134, 255, 0.8),
                 0 0 40px rgba(58, 134, 255, 0.5),
                 0 0 60px rgba(58, 134, 255, 0.3);
    transform: scale(1.05);
    display: inline-block;
}

/* Hover on title also illuminates profile picture */
#about .about-content:has(.grow-title:hover) .img-container {
    filter: brightness(1) contrast(1.05) saturate(1);
    box-shadow: 0 0 30px rgba(58, 134, 255, 0.6),
                0 0 60px rgba(58, 134, 255, 0.4),
                0 0 90px rgba(58, 134, 255, 0.2),
                0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#about .texto {
    width: 100%;
}

#about .texto p {
    min-height: 140px; /* Reserve space for the typewriter text to prevent layout shift */
}

#about .img-container {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background-image: url("media/profilePictureUrl.jpg");
    background-size: cover;
    background-position: center;
    margin: 0 auto 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(62, 62, 206, 0.15);
    filter: brightness(0.85) contrast(1.1) saturate(0.9);
    transition: all 0.3s ease;
}

#about .img-container:hover {
    filter: brightness(1) contrast(1.05) saturate(1);
    box-shadow: 0 0 30px rgba(58, 134, 255, 0.6),
                0 0 60px rgba(58, 134, 255, 0.4),
                0 0 90px rgba(58, 134, 255, 0.2),
                0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Hover on profile picture also illuminates accent-color text */
#about .about-content:has(.img-container:hover) .accent-color {
    color: #5fa8ff;
    text-shadow: 0 0 20px rgba(58, 134, 255, 0.8),
                 0 0 40px rgba(58, 134, 255, 0.5),
                 0 0 60px rgba(58, 134, 255, 0.3);
    transform: scale(1.05);
    display: inline-block;
}

/* Stack Section */
#stack {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: white;
    text-align: center;
    padding: 110px 0;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#stack .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

#stack h2 {
    font-size: 2.5em;
    margin-bottom: 50px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#stack .carousel-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
}

#stack .swiper {
    width: 100%;
    padding: 20px 0;
}

#stack .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 180px;
    width: 180px;
    pointer-events: none;
    user-select: none;
}

#stack .swiper-slide:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(90, 127, 212, 0.3);
}

#stack .swiper-slide img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.6;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    transition: all 0.3s ease;
}

#stack .swiper-slide img.logo-bright {
    filter: grayscale(100%) brightness(1.5);
}

#stack .swiper-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

#stack .swiper-slide:hover img.logo-bright {
    filter: grayscale(0%) brightness(1);
}

#stack .swiper-slide img.logo-large {
    width: 120px;
    height: 120px;
}

#stack .swiper-slide p {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

#skills{
    background-image: linear-gradient(
        0deg,
        rgba(0,0,0,0.5),
        rgba(0,0,0,0.5)
    )
    ,url("media/hero.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    padding: 110px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#skills .container{
    padding: 0 12px;
    width: 100%;
}

#skills h2{
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.5em;
    color: white;
    font-family: 'Arimo', sans-serif;
}

#skills p {
    display: none;
}

#skills .skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: min(1100px, 92vw);
    margin: 0 auto;
    justify-content: center;
}

#skills .card{
    background-position: center center;
    background-size: cover;
    padding: 40px;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.card:first-child{
    background-image: linear-gradient(
        0deg,
        rgba(0,0,0,0.7),
        rgba(0,0,0,0.7)
    )
    ,url("media/Card1.jpg");
    min-height: 280px;
}

.card:nth-child(2){
    background-image: linear-gradient(
        0deg,
        rgba(0,0,0,0.7),
        rgba(0,0,0,0.7)
    )
    ,url("media/Card2.jpg");
    min-height: 280px;
}

.card:nth-child(3){
    background-image: linear-gradient(
        0deg,
        rgba(0,0,0,0.7),
        rgba(0,0,0,0.7)
    )
    ,url("media/Card3.jpg");
    min-height: 280px;
}

#skills .card h3{
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.95em;
    color: white;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
}

#skills .card p {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 20px;
    font-size: 1.02em;
    line-height: 1.5;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

#skills .card a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    margin-top: auto;
}

#skills .card a button {
    font-size: 1.1em;
    background-color: rgb(50, 70, 130);
}

#skills .card a button:hover {
    background-color: rgb(70, 95, 160);
}

#skills .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

#services {
    background: linear-gradient(135deg, #2a2a2a 0%, #333333 25%, #3d3d3d 50%, #333333 75%, #2a2a2a 100%);
    padding: 140px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#services .container {
    text-align: center;
    padding: 0 12px;
    width: 100%;
    position: relative;
    z-index: 10;
}

#services h2 {
    margin-top: 0;
    margin-bottom: 60px;
    font-size: 3.2em;
    color: #f5f5f5;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

#services ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: min(1000px, 92vw);
    margin: 0 auto;
    list-style: none;
    padding: 0;
}

#services li {
    padding: 40px 30px;
    margin: 0;
    font-weight: 600;
    font-size: 1.15em;
    color: rgb(30, 30, 60);
    background: linear-gradient(135deg, #f9f9f9 0%, #ececec 100%);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-left: 5px solid rgb(50, 70, 130);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#services li.service-card {
    list-style: none;
    flex-direction: column;
}

.card-title {
    font-weight: 600;
    font-size: 1.15em;
    color: rgb(30, 30, 60);
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.card-description {
    font-weight: 500;
    font-size: 0.95em;
    color: rgb(50, 70, 130);
    transition: all 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    line-height: 1.5;
    padding: 0 20px;
    transform: translateY(10px);
}

#services li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 5px;
    background: linear-gradient(180deg, rgb(50, 70, 130), rgb(70, 95, 160));
}

#services li:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(62, 62, 206, 0.2);
    color: rgb(62, 62, 206);
    min-height: 180px;
}

#services li:hover .card-title {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

#services li:hover .card-description {
    opacity: 1;
    transform: translateY(0);
}

#final{
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0f2e 50%, #0d0d0d 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
    text-align: center;
    color: white;
    overflow: hidden;
}

#final .gradient-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

#final h2 {
    position: relative;
    z-index: 10;
    font-size: 3em;
    margin-bottom: 30px;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
}

#final a {
    position: relative;
    z-index: 10;
}

#final button {
    position: relative;
    z-index: 10;
}

#final > * {
    position: relative;
    z-index: 10;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#final h2{
    font-size: 9vw;
    margin-bottom: 30px;
    text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#final button{
    font-size: 5vw;
    background-color: white;
    color: #667eea;
    font-weight: 700;
    transition: all 0.3s ease;
}

#final button:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Override sphere colors for #final section */
#final .sphere-1 {
    background: linear-gradient(40deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.4)) !important;
}

#final .sphere-2 {
    background: linear-gradient(240deg, rgba(118, 75, 162, 0.8), rgba(102, 126, 234, 0.4)) !important;
}

#final .sphere-3 {
    background: linear-gradient(180deg, rgba(200, 124, 200, 0.8), rgba(102, 126, 234, 0.3)) !important;
}

footer{
    background: linear-gradient(135deg, #1a1a1a 0%, #242420 50%, #1a1a1a 100%);
    color: white;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer p{
    margin: 0;
    padding: 12px;
    color: rgb(200, 200, 200);
}

footer .container {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

@media (min-width: 720px){
    header{
        position: fixed;
        width: 100%;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    header .container{
        flex-direction: row;
        justify-content: center;
        gap: 240px;
    }

    header nav {
        flex-direction: row;
        padding-bottom: 0;
        padding-right: 20px;
        gap: 20px;
    }

    .language-switch {
        margin-left: auto;
    }

    #about .container{
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    #about .texto{
        width: 100%;
        max-width: 600px;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    #about .texto p {
        min-height: 180px; /* Slightly taller on mobile for longer text wrapping */
    }

    #about .h2{
        margin-top: 0px;
    }

    #about .img-container {
        background-image: url("media/profilePictureUrl.jpg");
        background-size: cover;
        background-position: center;
        height: 300px;
        width: 300px;
        border-radius: 50%;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(62, 62, 206, 0.15);
    }

    #skills .skills-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        max-width: 1100px;
        gap: 25px;
    }

    #skills .card {
        padding: 40px;
        min-height: 320px;
    }

    .card:nth-child(3) {
        grid-column: 1 / -1;
        max-width: calc(50% - 12.5px);
        margin: 0 auto;
        min-height: 280px;
    }

    #services {
        background: linear-gradient(135deg, #2a2a2a 0%, #333333 25%, #3d3d3d 50%, #333333 75%, #2a2a2a 100%);
        padding: 100px 0;
    }

    #services .container {
        text-align: center;
        padding: 50px 12px;
    }

    #services ul {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        margin: 0 auto;
        gap: 20px;
    }

    #services li {
        margin: 0;
    }

    #final h2 {
        font-size: 5em;
    }

    #final button{
        font-size: 2em;
    }

    footer .container {
        justify-content: flex-end;
    }

}

@media (min-width: 1200px) {
    /* No changes needed for services background */
}

/* Ajustes para escala 125% de Windows (viewport efectivo ~1536px) */
@media (max-width: 1600px) and (min-width: 1400px) {
    .container {
        max-width: min(1200px, 90vw);
        padding: 0 clamp(15px, 2.5vw, 25px);
    }
    
    #about .content {
        max-width: min(800px, 88vw);
        padding: clamp(80px, 10vw, 120px) clamp(10px, 2vw, 12px);
    }
    
    #skills .skills-grid {
        max-width: min(1000px, 90vw);
    }
    
    #services ul {
        max-width: min(900px, 90vw);
    }
    
    h1 { font-size: clamp(2rem, 3.5vw, 3.2em); }
    h2 { font-size: clamp(1.5rem, 2.8vw, 2.5em); }
}

/* Asegurar que todas las secciones respeten el viewport */
section {
    overflow-x: hidden;
    max-width: 100vw;
}

/* ========================================
   Text Animation Effects
   ======================================== */

/* Cursor blink animation */
@keyframes blink { 
    0% { opacity: 1; } 
    50% { opacity: 0; } 
    100% { opacity: 1; } 
}

/* Title grow-from-floor animation (translate + vertical scale) */
.grow-title { 
    display: inline-block; 
    overflow: hidden; 
}

.grow-title .inner {
    display: inline-block;
    transform-origin: bottom;
    transform: translateY(40px) scaleY(0);
    animation: growUp 0.9s 0.4s ease-out forwards;
}

@keyframes growUp {
    0% { 
        transform: translateY(40px) scaleY(0); 
        opacity: 0; 
    }
    80% { 
        opacity: 1; 
    }
    100% { 
        transform: translateY(0) scaleY(1); 
        opacity: 1; 
    }
}