/* CSS Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --font-size: 16px;
    --background: #eff6f3;
    --foreground: #374653;
    --card: #eff6f3;
    --card-foreground: #374653;
    --primary: #374653;
    --primary-foreground: #eff6f3;
    --secondary: #998c73;
    --secondary-foreground: #eff6f3;
    --muted: #998c73;
    --muted-foreground: #374653;
    --accent: #63553e;
    --accent-foreground: #eff6f3;
    --border: rgba(55, 70, 83, 0.2);
    --radius: 0.625rem;
    --font-weight-medium: 500;
    --font-weight-normal: 400;
}

html {
    font-size: var(--font-size);
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 300px;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease-out;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(55, 70, 83, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    animation: fadeInDown 0.6s ease-out;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: var(--font-weight-medium);
    font-family:Georgia, 'Times New Roman', Times, serif;
    color: #eff6f3;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    color: rgba(239, 246, 243, 0.8);
    transform: scale(1.05);
}

.nav-desktop {
    display: none;
    gap: 2rem;
}

.nav-item {
    background: none;
    border: none;
    color: #eff6f3;
    cursor: pointer;
    padding: 0.5rem 0;
    font-size: 1.25rem;
    text-transform: capitalize;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    color: rgba(239, 246, 243, 0.8);
    transform: scale(1.1);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #eff6f3;
    transition: width 0.3s ease;
}

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

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: #eff6f3;
}

.mobile-menu-btn:hover {
    background: rgba(239, 246, 243, 0.1);
    border-radius: 0.5rem;
    transform: scale(1.1);
}

.menu-icon, .close-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.close-icon {
    opacity: 0;
    transform: rotate(180deg);
}

.mobile-menu-btn.active .menu-icon {
    opacity: 0;
    transform: rotate(-180deg);
}

.mobile-menu-btn.active .close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #374653;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.nav-mobile.active {
    max-height: 300px;
    animation: slideDown 0.3s ease-out;
}

.nav-mobile-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-item-mobile {
    background: none;
    border: none;
    color: #eff6f3;
    cursor: pointer;
    padding: 0.75rem 0;
    text-align: left;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.nav-item-mobile:hover {
    color: rgba(239, 246, 243, 0.8);
    padding-left: 1rem;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--background) 0%, rgba(153, 140, 115, 0.2) 100%);
    padding: 5rem 0;
}

.hero-content {
    max-width: 4xl;
    text-align: left;
    margin-top: 100px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-text {
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: var(--font-weight-medium);
    font-family:Georgia, 'Times New Roman', Times, serif;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.title-line-1 {
    display: block;
    animation: fadeInLeft 0.6s ease-out 0.6s both;
}

.title-line-2 {
    display: block;
    background: linear-gradient(135deg, #63553e 0%, #63553e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInRight 0.6s ease-out 0.8s both;
}

.hero-description {
    max-width: 48rem;
    animation: fadeInUp 0.6s ease-out 1s both;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease-out 1.2s both;
}

.hero-paragraph {
    font-size: clamp(1rem, 2.5vw, 1.150rem);
    color: var(--muted-foreground);
    line-height: 1.7;
    animation: fadeInUp 0.6s ease-out 1.4s both;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    animation: fadeInUp 0.6s ease-out 1.6s both;
}

.btn-primary {
    background: #63553e;
    color: var(--primary-foreground);
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: rgba(55, 70, 83, 0.9);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 25px rgba(55, 70, 83, 0.3);
}

.btn-primary:active {
    transform: translateY(0) scale(0.95);
}

.social-links {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out 1.8s both;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: scaleIn 0.4s ease-out calc(1.8s + var(--delay, 0s)) both;
}

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

.social-link.linkedin:hover {
    background: rgba(0, 119, 181, 0.2);
    transform: scale(1.2) rotate(5deg);
}

.social-link.github {
    color: var(--foreground);
    background: rgba(0, 119, 181, 0.1);
}

.social-link.github:hover {
    background: rgba(0, 119, 181, 0.2);
    transform: scale(1.2) rotate(5deg);
}

.social-link.whatsapp {
    color: #25d366;
    background: rgba(37, 211, 102, 0.1);
}

.social-link.whatsapp:hover {
    background: rgba(37, 211, 102, 0.2);
    transform: scale(1.2) rotate(5deg);
}

.social-link:nth-child(1) { --delay: 0s; }
.social-link:nth-child(2) { --delay: 0.1s; }
.social-link:nth-child(3) { --delay: 0.2s; }

.social-link i {
    font-size: 1.5rem;
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.about {
    background: rgba(153, 140, 115, 0.1);
}

.services {
    background: rgba(153, 140, 115, 0.1);
}

.contact {
    background: rgba(153, 140, 115, 0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: var(--font-weight-medium);
    margin-bottom: 1rem;
    animation: scaleIn 0.6s ease-out 0.2s both;
}

.section-underline {
    width: 6rem;
    height: 0.25rem;
    background: var(--primary);
    margin: 0 auto;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* About Section */
.about-content {
    max-width: 64rem;
    margin: 0 auto;
    text-align: left;
}

.about-intro {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.highlight {
    color: var(--primary);
    font-weight: var(--font-weight-medium);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--muted-foreground);
}

.about-text p {
    animation: fadeInUp 0.6s ease-out calc(0.4s + var(--delay, 0s)) both;
}

.about-text p:nth-child(1) { --delay: 0s; }
.about-text p:nth-child(2) { --delay: 0.2s; }
.about-text p:nth-child(3) { --delay: 0.4s; }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 96rem;
    margin: 0 auto;
}

.skill-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    animation: fadeInUp 0.6s ease-out calc(0.1s * var(--index, 0)) both;
}

.skill-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(55, 70, 83, 0.2);
}

.skill-card:nth-child(1) { --index: 0; }
.skill-card:nth-child(2) { --index: 1; }
.skill-card:nth-child(3) { --index: 2; }

.card-header {
    text-align: center;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
}

.skill-item {
    color: var(--muted-foreground);
    padding: 0.5rem 1rem;
    background: rgba(99, 85, 62, 0.3);
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    animation: fadeInLeft 0.4s ease-out calc(0.05s * var(--skill-index, 0)) both;
}

.skill-item:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: scale(1.05);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 7xl;
    margin: 0 auto;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out calc(0.1s * var(--service-index, 0)) both;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(55, 70, 83, 0.15);
}

.service-card:nth-child(1) { --service-index: 0; }
.service-card:nth-child(2) { --service-index: 1; }
.service-card:nth-child(3) { --service-index: 2; }
.service-card:nth-child(4) { --service-index: 3; }
.service-card:nth-child(5) { --service-index: 4; }

.service-icon {
    width: 4rem;
    height: 4rem;
    background: rgba(55, 70, 83, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s ease;
}

.service-icon i {
    font-size: 2rem;
    color: var(--primary);
}

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

.service-card h4 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    max-width: 7xl;
    margin: 0 auto;
}

.project-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.6s ease-out calc(0.1s * var(--project-index, 0)) both;
}

.project-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px #63553e ;
}

.project-card:nth-child(1) { --project-index: 0; }
.project-card:nth-child(2) { --project-index: 1; }
.project-card:nth-child(3) { --project-index: 2; }
.project-card:nth-child(4) { --project-index: 3; }
.project-card:nth-child(5) { --project-index: 4; }
.project-card:nth-child(6) { --project-index: 5; }

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.project-header h3 {
    font-size: 1.125rem;
    font-weight: var(--font-weight-medium);
    color: var(--foreground);
}

.project-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--muted-foreground);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.project-link:hover {
    background: var(--accent);
    color: var(--accent-foreground);
    transform: scale(1.1) rotate(5deg);
}

.project-tech {
    font-size: 0.975rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.project-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-content p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

.project-features h5 {
    font-weight: var(--font-weight-medium);
    font-size: larger;
    margin-bottom: 0.5rem;
}

.project-features ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.project-features li {
    display: flex;
    align-items: flex-start;
    font-size: 0.975rem;
    color: var(--muted-foreground);
    line-height: 1.5;
}

.project-features li::before {
    content: '•';
    color: var(--primary);
    margin-right: 0.5rem;
    margin-top: 0.125rem;
}

.btn-project {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background:#63553e;
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: var(--font-weight-medium);
    transition: all 0.3s ease;
    margin-top: auto;
    width: fit-content;
}

.btn-project:hover {
    background: rgba(55, 70, 83, 0.9);
    transform: scale(1.05);
}

.btn-project:active {
    transform: scale(0.95);
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

.contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out calc(0.2s * var(--contact-index, 0)) both;
}

.contact-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(55, 70, 83, 0.15);
}

.contact-card:nth-child(1) { --contact-index: 0; }
.contact-card:nth-child(2) { --contact-index: 1; }

.contact-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(55, 70, 83, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.contact-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-card:hover .contact-icon {
    background: var(--primary);
    transform: scale(1.1) rotate(5deg);
}

.contact-card:hover .contact-icon i {
    color: var(--primary-foreground);
    transform: scale(1.1);
}

.contact-info h4 {
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.25rem;
}

.contact-info a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-info a:hover {
    color: var(--primary);
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: fadeInUp 0.6s ease-out;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    color: var(--primary-foreground);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: scaleIn 0.5s ease-out calc(0.6s + var(--footer-delay, 0s)) both;
}

.footer-social-link:hover {
    background: rgba(239, 246, 243, 0.1);
    transform: scale(1.2) rotate(5deg) translateY(-2px);
}

.footer-social-link:nth-child(1) { --footer-delay: 0s; }
.footer-social-link:nth-child(2) { --footer-delay: 0.1s; }
.footer-social-link:nth-child(3) { --footer-delay: 0.2s; }

.font-semibold {
    font-weight: var(--font-weight-medium);
}

/* Responsive Design */
@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .hero-actions {
        flex-direction: row;
        align-items: center;
    }
    
    .footer-content {
        flex-direction: row;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
        min-height: 90vh;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-actions {
        align-items: center;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Intersection Observer Classes */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease-out;
}

.fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out;
}

.fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}