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

:root {
    --primary: #020617;
    --secondary: #0f172a;
    --accent: #3b82f6;
    --accent-success: #10b981;
    --accent-gradient: linear-gradient(135deg, #3b82f6, #10b981, #6366f1);
    --text: #f8fafc;
    --text-secondary: #94a3b8;
    --glass: rgba(30, 41, 59, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
    --font-main: 'Poppins', 'Inter', system-ui, sans-serif;
    --radius: 5px;
    /* Reduced from 24px */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Glows */
.bg-glow-1 {
    position: fixed;
    top: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
}

.bg-glow-2 {
    position: fixed;
    bottom: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    z-index: -1;
    filter: blur(80px);
    animation: pulse 10s infinite alternate;
}

@keyframes pulse {
    from {
        transform: scale(1);
        opacity: 0.3;
    }

    to {
        transform: scale(1.2);
        opacity: 0.6;
    }
}

/* Header */
body>.header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 80px;
    z-index: 1000;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.5rem;
}

header .mdi-menu {
    color: var(--text);
    font-size: 24pt;
    cursor: pointer;
}

body>.header nav {
    position: fixed;
    left: 0;
    top: 80px;
    background: var(--secondary);
    height: calc(100vh - 80px);
    width: 0;
    overflow-y: auto;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body>.header nav.extends {
    width: 280px;
}

body>.header nav a {
    opacity: 0;
    display: block;
    text-decoration: none;
    color: var(--text);
    padding: 15px 25px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

body>.header nav.extends a {
    opacity: 1;
}

body>.header nav a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
}

/* Main Content */
main {
    width: 92%;
    max-width: 1200px;
    margin: 40px auto;
}

h1.title-section {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

/* Section: Home (Hero) */
main section.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    min-height: 80vh;
    padding: 40px 0;
}

main section.home .me {
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: center;
}

/* MOBILE IMAGE FIX: 96% width */
main section.home .me .img {
    width: 96%;
    aspect-ratio: 1/1;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    background: var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

main section.home .me .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

main section.home .me .img .social-media {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    width: 90%;
    display: flex;
    justify-content: space-around;
    padding: 8px;
    border-radius: var(--radius);
}

main section.home .me .img .social-media a {
    color: var(--text);
    font-size: 1.4rem;
}

main section.home .description {
    text-align: center;
}

main section.home .description h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

main section.home .description h1 strong {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

main section.home .description p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

main section.home .description .option {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

main section.home .description .option a {
    text-decoration: none;
    border-radius: var(--radius);
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

main section.home .description .option a:first-child {
    background: var(--accent-gradient);
    color: white;
}

main section.home .description .option a:last-child {
    border: 1px solid var(--text-secondary);
    color: var(--text);
}

/* Grid Config */
.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Premium Cards - REDUCED RADIUS & NO BORDER */
.card {
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    /* Removed border as requested */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Projects specifically */
main section.projects .card {
    padding: 0;
    height: 370px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

main section.projects .card-header {
    height: 180px;
}

main section.projects .card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

main section.projects .card .card-body {
    padding: 20px;
}

main section.projects .card .card-body h3 {
    margin-bottom: 10px;
}

main section.projects .card .card-body p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

main section.projects .card .card-body .tec-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
}

main section.projects .card .card-body span.tec {
    font-size: 0.7rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent);
    padding: 3px 8px;
    border-radius: 4px;
}

main section.projects .card .card-body a {
    display: inline-block;
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
}

/* Skills Cards */
main section.skills .card i {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 15px;
    display: block;
}

/* Tools (Skill Bars) - FIXED PROGRESS */
main section.tools .card .tool {
    margin-bottom: 15px;
}

main section.tools .card .tool .descriptiontool {
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

main section.tools .card .tool .valuestool {
    background: rgba(255, 255, 255, 0.05);
    height: 8px;
    border-radius: 4px;
    width: 100%;
    overflow: hidden;
}

main section.tools .card .tool .progress {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

    main section.services .card a {
        background-image: var(--accent-gradient);
        color: #fff;
        padding: 5px;
        text-decoration: none;
        border-radius: 4px;
    }


/* Contact Form - REVERTED STYLE */
main section.contact #formulario {
    background: var(--secondary);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    margin: 0 auto;
}

main section.contact .campo {
    margin-bottom: 15px;
}

main section.contact .campo label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}

main section.contact .campo input,
main section.contact .campo textarea {
    background: rgba(2, 6, 23, 0.4);
    border: 1px solid var(--glass-border);
    width: 100%;
    color: var(--text);
    padding: 12px;
    border-radius: 6px;
    outline: none;
}

main section.contact #submit {
    background: var(--accent-gradient);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s ease, filter 0.3s ease;
}

main section.contact #submit:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

/* Responsive */
@media (min-width: 1024px) {
    main section.home {
        flex-direction: row-reverse;
        justify-content: space-between;
        text-align: left;
    }

    main section.home .description {
        text-align: left;
        flex: 1;
    }

    main section.home .me {
        flex: 1;
        justify-content: flex-end;
    }

    main section.home .description .option {
        justify-content: flex-start;
    }
}

/* AOS Fix */
[data-aos] {
    pointer-events: none;
}

.aos-animate {
    pointer-events: auto;
}
