@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=Playfair+Display:ital,wght@0,400;1,600&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --accent-color: #1b77bd;
    /* --accent-color: #e4572e; */
    --accent-dark: #224B73;
    /* --accent-dark: #c94723; */
    --accent-light: rgba(228, 87, 46, 0.1);
    --bg-primary: #E8E4DD;
    --bg-secondary: #F5F3EF;
    --text-primary: #1A1A1A;
    --text-secondary: #6B6B6B;
    --text-light: #2A2A2A;
    --border-radius-sm: 12px;
    --border-radius-md: 15px;
    --border-radius-lg: 20px;
    --border-radius-full: 50px;
    --transition-default: 0.3s;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: var(--bg-secondary);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 3rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: opacity var(--transition-default), color var(--transition-default);
    letter-spacing: 0.3px;
}

nav a:hover {
    opacity: 0.6;
    color: var(--accent-color);
}

/* ===== MAIN LAYOUT ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem;
}

section {
    margin: 0 0 4rem 0;
}

h2 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-primary);
    letter-spacing: -1.5px;
    line-height: 1.1;
}

.section-subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* ===== HERO SECTION ===== */
.hero-alt-3 {
    background: var(--bg-secondary);
    padding: 3rem 4rem;
    border-radius: var(--border-radius-lg);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.small-badge {
    display: inline-block;
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: var(--border-radius-full);
    font-family: 'Google Sans Code', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 2rem;
}

.hero-large-title {
    font-size: 5rem;
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -3px;
}

.accent-text {
    font-family: 'Google Sans Code', monospace;
    font-style: italic;
    color: var(--accent-color);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-button {
    background: var(--accent-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform var(--transition-default), background var(--transition-default);
    text-decoration: none;
    font-size: 0.9rem;
}

.hero-button:hover {
    transform: translateX(5px);
    background: var(--accent-dark);
}

.hero-button::after {
    content: "→";
    font-size: 1.2rem;
}

.hero-image-block {
    position: relative;
    display: flex;
    justify-content: center;
}

.image-circle {
    width: 420px;
    height: 420px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(228, 87, 46, 0.3);
}

.image-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.floating-card {
    position: absolute;
    bottom: -1rem;
    left: -2rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.floating-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.floating-card p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0.2rem 0;
}

/* ===== ABOUT SECTION ===== */
#about {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    align-items: start;
}

#about h2 {
    max-width: 500px;
}

#about p {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.2rem;
}

#about p:last-child {
    margin-top: 1.5rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-category {
    margin-bottom: 4rem;
}

.portfolio-category:last-child {
    margin-top: 5rem;
}


.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 1.5rem;
}

.category-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0.5rem;
    height: 0.5rem;
    background: var(--accent-color);
    border-radius: 50%;
}

.proyecto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 2rem;
}

.proyecto-card {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: transform var(--transition-default), box-shadow var(--transition-default);
}

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

.proyecto-image {
    width: 100%;
    height: 280px;
    background: #D5D1C8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Code Preview for Backend Projects */
.code-preview {
    width: 80%;
    padding: 2rem;
}

.code-line {
    height: 12px;
    background: var(--text-light);
    margin-bottom: 10px;
    border-radius: 6px;
    opacity: 0.7;
}

.code-line.short {
    width: 60%;
}

.code-line.medium {
    width: 80%;
}

/* 3D Preview Animations */
.threejs-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
}

.cube,
.sphere,
.torus {
    width: 100px;
    height: 100px;
}

.cube {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transform: rotate(45deg);
    animation: rotate3d 4s linear infinite;
}

.sphere {
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.torus {
    border: 20px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: spin 3s linear infinite;
}

@keyframes rotate3d {
    from {
        transform: rotate(0deg) rotateY(0deg);
    }

    to {
        transform: rotate(360deg) rotateY(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.proyecto-content {
    padding: 2rem;
}

.proyecto-card h3 {
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
}

.proyecto-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.proyecto-tag {
    display: inline-block;
    background: var(--text-light);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: var(--border-radius-lg);
    font-size: 0.7rem;
    font-weight: 600;
}

/* ===== HOBBIES SECTION ===== */
#hobbies {
    background: var(--bg-secondary);
    padding: 4rem;
    border-radius: var(--border-radius-lg);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.hobby-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    transition: transform var(--transition-default), box-shadow var(--transition-default);
}

.hobby-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--accent-light);
}

.hobby-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hobby-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hobby-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== VOLUNTEER SECTION ===== */
#volunteer h2 {
    margin-bottom: 3rem;
}

.volunteer-list {
    max-width: 900px;
    margin: 0 auto;
}

.volunteer-item {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 2px solid var(--bg-primary);
}

.volunteer-item:last-child {
    border-bottom: none;
}

.volunteer-year {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.volunteer-content h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.volunteer-org {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.volunteer-content p:last-child {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== SOCIAL SECTION ===== */
#social {
    background: var(--bg-secondary);
    padding: 5rem 4rem;
    border-radius: var(--border-radius-lg);
}

.social-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#social h2 {
    margin-bottom: 1rem;
}

.social-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.social-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition-default);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform var(--transition-default);
}

.social-card:hover::before {
    transform: scaleX(1);
}

.social-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(228, 87, 46, 0.2);
}

.social-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-md);
    transition: all var(--transition-default);
}

.linkedin .social-icon {
    background: rgba(0, 119, 181, 0.1);
    color: #0077b5;
}

.instagram .social-icon {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.social-card:hover .social-icon {
    transform: scale(1.1) rotate(5deg);
}

.social-info {
    flex: 1;
    text-align: left;
}

.social-info h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.social-info p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.social-arrow {
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform var(--transition-default);
}

.social-card:hover .social-arrow {
    transform: translateX(5px);
}

/* ===== CONTACT SECTION ===== */
#contact {
    background: var(--bg-secondary);
    padding: 5rem 4rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

#contact p {
    font-size: 1.6rem;
    color: var(--text-secondary);
    margin: 1rem 0 2rem;
}

#contact a[href^="mailto"] {
    /* color: var(--accent-color); */
    text-decoration: none;
    transition: opacity var(--transition-default);
}

#contact a[href^="mailto"]:hover {
    opacity: 0.7;
}

/* #contact .hero-button {
    color: white;
} */

/* ===== FOOTER ===== */
footer {
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 4rem;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-alt-3 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-large-title {
        font-size: 3.5rem;
    }

    .image-circle {
        width: 300px;
        height: 300px;
    }

    #about {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .proyecto-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1.5rem;
    }

    nav ul {
        gap: 1.5rem;
    }

    main {
        padding: 1.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-alt-3 {
        padding: 4rem 2rem;
    }

    .hero-large-title {
        font-size: 2.5rem;
    }

    .image-circle {
        width: 250px;
        height: 250px;
    }

    .floating-card {
        position: static;
        margin-top: 1.5rem;
    }

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

    #hobbies {
        padding: 2rem;
    }

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

    .volunteer-item {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .volunteer-year {
        font-size: 0.85rem;
    }

    #social {
        padding: 3rem 2rem;
    }

    .social-links {
        grid-template-columns: 1fr;
    }

    .social-card {
        padding: 2rem 1.5rem;
    }
}