/* ===================================
   CUSTOM PROPERTIES (CSS Variables)
   =================================== */
:root {
    /* Colors - Modern Palette */
    --primary: hsl(240, 80%, 60%);
    --primary-dark: hsl(240, 80%, 50%);
    --primary-light: hsl(240, 80%, 70%);

    --secondary: hsl(280, 70%, 55%);
    --secondary-dark: hsl(280, 70%, 45%);

    --accent: hsl(320, 75%, 60%);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
    --gradient-accent: linear-gradient(135deg, var(--accent), var(--secondary));
    --gradient-text: linear-gradient(135deg, var(--primary), var(--accent));

    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --bg-glass: rgba(255, 255, 255, 0.7);

    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --text-tertiary: #adb5bd;

    --border-color: #dee2e6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.2);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 6rem 0;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Z-index */
    --z-fixed: 100;
    --z-modal: 1000;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-glass: rgba(26, 26, 26, 0.7);

    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-tertiary: #6c757d;

    --border-color: #2a2a2a;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);
}

/* ===================================
   BASE & RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-base), color var(--transition-base);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}

input,
textarea {
    font-family: inherit;
    border: none;
    outline: none;
}

/* ===================================
   REUSABLE CLASSES
   =================================== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: var(--section-padding);
}

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.accent {
    color: var(--accent);
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: transparent;
    z-index: var(--z-fixed);
    transition: background-color var(--transition-base), backdrop-filter var(--transition-base);
}

.header.scroll-header {
    background-color: var(--bg-glass);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.nav__list {
    display: flex;
    gap: 2rem;
}

.nav__link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-fast);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-base);
}

.nav__link:hover,
.nav__link.active-link {
    color: var(--primary);
}

.nav__link:hover::after,
.nav__link.active-link::after {
    width: 100%;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    background: var(--gradient-primary);
    color: white;
    transform: rotate(20deg);
}

.nav__toggle,
.nav__close {
    display: none;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn--primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn--primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn--secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn--secondary:hover {
    background-color: var(--bg-tertiary);
    transform: translateY(-3px);
}

.btn--full {
    width: 100%;
    justify-content: center;
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 4.5rem;
    position: relative;
    overflow: hidden;
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__greeting {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: block;
}

.hero__name {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.hero__title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 3rem;
    /* Prevents layout shift during typing animation */
    display: flex;
    align-items: center;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero__social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
}

.social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.hero__image {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    /* ← Cambio importante */
    width: 100%;
}

.hero__blob {
    position: relative;
    width: 400px;
    max-width: 90vw;
    height: 400px;
    max-height: 90vw;
    /* Asegurar centrado perfecto */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    /* ← Centrado horizontal */
}

.hero__blob svg {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: blob-animate 8s ease-in-out infinite;
    top: 0;
    left: 0;
}

.hero__img {
    position: relative;
    /* ← Cambio de absolute a relative */
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    object-position: center top;
    z-index: 2;
    /* ← Para que esté encima del SVG */
    /* Compensar si necesita offset */
    transform: none;
}

/* Responsive para móvil - ajustar tamaños */
@media screen and (max-width: 768px) {
    .hero__blob {
        width: 280px;
        height: 280px;
        max-width: 85vw;
        max-height: 85vw;
    }

    .hero__img {
        width: 220px;
        height: 220px;
    }
}

@media screen and (max-width: 480px) {
    .hero__blob {
        width: 220px;
        height: 220px;
        max-width: 75vw;
        max-height: 75vw;
    }

    .hero__img {
        width: 170px;
        height: 170px;
    }
}

@media screen and (max-width: 360px) {
    .hero__blob {
        width: 180px;
        height: 180px;
        max-width: 70vw;
        max-height: 70vw;
    }

    .hero__img {
        width: 140px;
        height: 140px;
    }
}

@keyframes blob-animate {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(10deg);
    }
}

.hero__img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: var(--shadow-xl);
    object-position: center top;
    /* Enfoca el rostro */
}

.scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-base);
}

.scroll-link:hover {
    color: var(--primary);
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background-color: var(--text-secondary);
    border-radius: 2px;
    animation: scroll-animation 2s infinite;
}

@keyframes scroll-animation {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(12px);
    }
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    background-color: var(--bg-secondary);
}

.about__container {
    display: grid;
    gap: 4rem;
}

.about__subtitle {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about__description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.about__info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.about__box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base);
}

.about__box:hover {
    transform: translateY(-5px);
}

.about__icon {
    font-size: 2rem;
    color: var(--primary);
}

.about__box-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.about__box-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.about__values {
    margin-top: 2rem;
}

.values__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
}

.values__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.value__card {
    padding: 2rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all var(--transition-base);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.value__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.value__icon {
    font-size: 2.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.value__card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.value__card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Values Carousel - RESPONSIVE */
.values__carousel-container {
    position: relative;
    padding: 0 3rem;
}

.values__carousel {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Desktop: 4 columnas */
    gap: 2rem;
    overflow: hidden;
}

.carousel__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.carousel__button:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel__button--prev {
    left: 0;
}

.carousel__button--next {
    right: 0;
}

.carousel__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--border-color);
    cursor: pointer;
    transition: all var(--transition-base);
}

.carousel__dot.active {
    background: var(--gradient-primary);
    width: 32px;
    border-radius: 6px;
}

/* RESPONSIVE - Tablet Landscape (1024px y menor) */
@media screen and (max-width: 1024px) {
    .values__carousel {
        grid-template-columns: repeat(3, 1fr);
        /* Tablet: 3 columnas */
    }

    .values__carousel-container {
        padding: 0 2.5rem;
    }

    .carousel__button {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1.1rem;
    }
}

/* RESPONSIVE - Tablet Portrait (768px) */
@media screen and (max-width: 768px) {
    .values__carousel {
        grid-template-columns: repeat(2, 1fr);
        /* Tablet portrait: 2 columnas */
    }

    .values__carousel-container {
        padding: 0 2rem;
    }

    .carousel__button {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
}

/* RESPONSIVE - Mobile Landscape (orientación apaisada) */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .values__carousel {
        grid-template-columns: repeat(3, 1fr);
        /* Mobile landscape: 3 columnas */
    }
}

/* RESPONSIVE - Mobile Portrait (pequeños) */
@media screen and (max-width: 480px) {
    .values__carousel {
        grid-template-columns: 1fr;
        /* Mobile: 1 columna */
        gap: 1.5rem;
    }

    .values__carousel-container {
        padding: 0 1rem;
    }

    .carousel__button {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }

    .value__card {
        min-height: 200px;
        /* Reducir altura en móvil */
    }
}

/* RESPONSIVE - Extra pequeño (< 360px) */
@media screen and (max-width: 360px) {
    .values__carousel-container {
        padding: 0 0.5rem;
    }

    .carousel__button {
        width: 2rem;
        height: 2rem;
        font-size: 0.8rem;
    }

    .carousel__dots {
        gap: 0.25rem;
    }

    .carousel__dot {
        width: 10px;
        height: 10px;
    }

    .carousel__dot.active {
        width: 24px;
    }
}

/* ===================================
   TIMELINE (EXPERIENCE)
   =================================== */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
}

.timeline__item {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 3rem;
}

.timeline__marker {
    position: absolute;
    left: -8px;
    top: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gradient-primary);
    box-shadow: 0 0 0 4px var(--bg-primary), 0 0 0 6px var(--primary);
}

.timeline__content {
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.timeline__content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline__date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.timeline__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline__company {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.timeline__description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    background-color: var(--bg-tertiary);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.05);
}

/* ===================================
   EDUCATION SECTION
   =================================== */
.education__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.education__card {
    padding: 2.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.education__card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

.education__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.education__icon {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.education__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.education__institution {
    font-size: 1.125rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.education__date {
    display: block;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.education__description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.education__distinction {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 165, 0, 0.2));
    border-radius: var(--radius-sm);
    color: #ff8800;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===================================
   CERTIFICATIONS SECTION
   =================================== */
.certifications {
    background-color: var(--bg-secondary);
}

.certifications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.certification__card {
    padding: 2rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-base);
    border: 2px solid transparent;
}

.certification__card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.certification__badge {
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.certification__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.certification__issuer {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.certification__date,
.certification__validity {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

/* ===================================
   SKILLS SECTION
   =================================== */
.skills__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.skills__category {
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.skills__category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--primary);
}

.skills__category-title i {
    font-size: 1.75rem;
}

.skills__list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skill__header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill__name {
    font-weight: 600;
    font-size: 0.95rem;
}

.skill__level {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.skill__bar {
    height: 8px;
    background-color: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.skill__progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    transition: width 1s ease;
}

.soft-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.soft-skill-tag {
    padding: 0.75rem 1.25rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-base);
}

.soft-skill-tag:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
}

/* ===================================
   PROJECTS SECTION (CAROUSEL)
   =================================== */
.projects {
    background-color: var(--bg-secondary);
}

.projects__carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 3rem;
    /* Space for arrows */
}

.projects__carousel-wrapper {
    overflow: hidden;
    width: 100%;
}

.projects__track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px;
    /* Gap between slides */
}

.project__card {
    background-color: var(--bg-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    /* Carousel sizing: 3 items visible by default */
    flex: 0 0 calc(33.333% - 14px);
    /* (100% / 3) - (gap * 2 / 3) */
    min-width: calc(33.333% - 14px);
}

.project__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.project__image {
    position: relative;
    overflow: hidden;
    height: 200px;
    background-color: var(--bg-tertiary);
}

.project__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.project__card:hover .project__image img {
    transform: scale(1.1);
}

.project__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project__description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
    /* Pushes links to bottom */
}

.project__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project__links {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.project__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.project__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Carousel Buttons */
.project-carousel__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.project-carousel__button:hover {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-lg);
}

.project-carousel__button--prev {
    left: 0;
}

.project-carousel__button--next {
    right: 0;
}

/* Responsive Carousel */
@media screen and (max-width: 900px) {
    .project__card {
        flex: 0 0 calc(50% - 10px);
        /* 2 items visible */
        min-width: calc(50% - 10px);
    }
}

@media screen and (max-width: 600px) {
    .projects__carousel-container {
        padding: 0;
    }

    .project__card {
        flex: 0 0 100%;
        /* 1 item visible */
        min-width: 100%;
    }

    .project-carousel__button {
        width: 2.5rem;
        height: 2.5rem;
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(4px);
    }

    .project-carousel__button--prev {
        left: 10px;
    }

    .project-carousel__button--next {
        right: 10px;
    }
}

/* ===================================
   COURSES SECTION
   =================================== */
.courses__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course__card {
    padding: 2rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border-left: 4px solid var(--primary);
}

.course__card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.course__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.course__icon {
    font-size: 1.75rem;
    color: var(--primary);
}

.course__platform {
    padding: 0.375rem 0.875rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.course__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course__instructor {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.course__date {
    display: block;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 1rem;
}

.course__list {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.course__list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.course__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===================================
   BLOG SECTION
   =================================== */
.blog__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog__card {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.blog__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.blog__image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background-color: var(--bg-tertiary);
}

.blog__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.blog__card:hover .blog__image img {
    transform: scale(1.1);
}

.blog__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-sm);
}

.blog__content {
    padding: 2rem;
}

.blog__date {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.blog__title a {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    transition: color var(--transition-fast);
}

.blog__title a:hover {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog__excerpt {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.blog__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: gap var(--transition-fast);
}

.blog__link:hover {
    gap: 1rem;
}

/* ===================================
   TESTIMONIALS SECTION
   =================================== */
.testimonials {
    background-color: var(--bg-secondary);
}

.testimonials__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.testimonial__card {
    padding: 2.5rem;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.testimonial__card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.testimonial__quote {
    font-size: 3rem;
    color: var(--primary);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.testimonial__text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-style: italic;
}

.testimonial__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial__img {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.testimonial__name {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.testimonial__position {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact__subtitle {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact__description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact__cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact__card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.contact__card:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.contact__card-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.contact__card-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact__card-info a,
.contact__card-info span {
    color: var(--text-secondary);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.contact__card-info a:hover {
    color: var(--primary);
}

.contact__social {
    display: flex;
    gap: 1rem;
}

.contact__social-link {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-base);
}

.contact__social-link:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-5px);
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form__label {
    font-weight: 600;
    font-size: 0.95rem;
}

.form__input {
    padding: 1rem 1.25rem;
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.form__input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form__textarea {
    resize: vertical;
    min-height: 120px;
}

.form__message {
    padding: 1rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    text-align: center;
    display: none;
}

.form__message.success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid #22c55e;
    display: block;
}

.form__message.error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
    display: block;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background-color: var(--bg-secondary);
    padding: 4rem 0 2rem;
}

.footer__container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: inline-block;
}

.footer__description {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 400px;
}

.footer__links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.footer__title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer__link:hover {
    color: var(--primary);
}

.footer__bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__copy,
.footer__dev {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer__dev i {
    color: #ef4444;
}

/* ===================================
   SCROLL TO TOP
   =================================== */
.scroll-top {
    position: fixed;
    right: 2rem;
    bottom: -3rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: 10;
}

.scroll-top.show-scroll {
    bottom: 2rem;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* ===================================
   ANIMATIONS
   =================================== */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

[data-aos="flip-left"] {
    transform: perspective(2500px) rotateY(-100deg);
}

[data-aos="flip-left"].aos-animate {
    transform: perspective(2500px) rotateY(0);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero__content {
        gap: 3rem;
    }

    .hero__blob {
        width: 350px;
        height: 350px;
    }

    .hero__img {
        width: 260px;
        height: 260px;
    }
}

@media screen and (max-width: 768px) {
    .nav__menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background-color: var(--bg-primary);
        padding: 4rem 2rem;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);

        .about__subtitle,
        .about__description {
            max-width: 100%;
            word-wrap: break-word;
        }
    }

    .nav__menu.show-menu {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2rem;
    }

    .nav__link {
        font-size: 1.25rem;
    }

    .nav__close {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1.5rem;
        font-size: 2rem;
        cursor: pointer;
    }

    .nav__toggle {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
    }

    .hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__image {
        order: -1;
    }

    .hero__blob {
        width: 280px;
        height: 280px;
        margin: 0 auto;
    }

    .hero__img {
        width: 200px;
        height: 200px;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .hero__social {
        justify-content: center;
    }

    .contact__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media screen and (max-width: 570px) {
    html {
        font-size: 14px;
    }

    .section {
        padding: 4rem 0;
    }

    .hero__blob {
        width: 220px;
        height: 220px;
    }

    .hero__img {
        width: 160px;
        height: 160px;
    }

    .section__header {
        margin-bottom: 3rem;
    }



    .values__grid,
    .skills__container,
    .courses__grid,
    .blog__grid,
    .testimonials__container {
        grid-template-columns: 1fr;
    }

    .education__grid {
        grid-template-columns: 1fr;
    }

    .about__info {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline__item {
        padding-left: 2.5rem;
    }

    .footer__links {
        grid-template-columns: 1fr;
    }
}

/* Blog Modal */
.blog-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.blog-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-modal__content {
    background-color: var(--bg-primary);
    padding: 40px;
    border-radius: var(--radius-lg);
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease-out;
}

.blog-modal__close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    background: none;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.blog-modal__close:hover {
    color: var(--primary);
}

.blog-modal__body {
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-modal__body h2 {
    color: var(--text-primary);
    margin-top: 24px;
    margin-bottom: 12px;
}

.blog-modal__body p {
    margin-bottom: 16px;
}

.blog-modal__body ul,
.blog-modal__body ol {
    margin-left: 20px;
    margin-bottom: 16px;
}

.blog-modal__body code {
    background-color: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .blog-modal__content {
        padding: 20px;
        margin: 20px;
        max-height: calc(100vh - 40px);
    }
}


/* Fix responsive overflow issues */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.hero {
    overflow-x: hidden !important;
}

.hero__blob {
    max-width: min(400px, 80vw) !important;
    max-height: min(400px, 80vw) !important;
}

.hero__image {
    max-width: 100%;
    overflow: hidden !important;
}

.section {
    overflow-x: hidden;
}

.about__subtitle,
.about__description {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===================================
 MOBILE RESPONSIVE (480px and below)
 =================================== */
@media screen and (max-width: 480px) {
    .hero__blob {
        width: 180px;
        height: 180px;
        margin: 0 auto;
    }

    .hero__img {
        width: 140px;
        height: 140px;
    }

    .hero__content {
        gap: 2rem;
    }

    .about__subtitle,
    .about__description {
        max-width: 100%;
        word-break: break-word;
    }

    .about__info {
        grid-template-columns: 1fr;
    }

    .values__carousel-container {
        padding: 0 2rem;
    }

    .values__carousel {
        grid-template-columns: 1fr;
    }

    .carousel__button {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }

    .section__title {
        font-size: 1.5rem;
    }

    .skills__container {
        grid-template-columns: 1fr;
    }


}