/* Rafael Martín Villanueva - Professional Website Styles */
/* Classic, Elegant, and Minimalist Design */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Navigation Styles */
nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #2563eb !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: #2563eb;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Section */
#inicio {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0e7ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

#inicio img {
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 100%;
    height: auto;
}

#inicio img:hover {
    transform: translateY(-5px);
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    padding: 12px 32px;
    border: 2px solid #2563eb;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1f2937;
}

/* About Section Cards */
.about-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-card:nth-child(1) { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.about-card:nth-child(2) { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.about-card:nth-child(3) { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); }
.about-card:nth-child(4) { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); }
.about-card:nth-child(5) { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); }

/* CV Section */
#cv {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.cv-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.cv-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.cv-title {
    color: #2563eb;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cv-date {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Projects Section */
.project-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.project-card:nth-child(1) { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
.project-card:nth-child(2) { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); }
.project-card:nth-child(3) { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); }
.project-card:nth-child(4) { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); }

/* Contact Section */
#contacto {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.contact-info {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #f1f5f9;
    transform: translateX(5px);
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

/* Form Styles */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    section {
        padding: 60px 0;
    }
    
    .card, .about-card, .project-card {
        margin-bottom: 1.5rem;
    }
    
    #inicio img {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

@media (max-width: 640px) {
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .card, .about-card, .project-card {
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
}

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

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

/* Smooth scrolling enhancement */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, footer {
        display: none;
    }
    
    section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .card, .about-card, .project-card {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}