/* Apple-inspired color palette */
:root {
    --primary-color: #0066cc; /* Apple blue */
    --secondary-color: #f5f5f7; /* Light gray background */
    --text-color: #1d1d1f; /* Dark text */
    --text-secondary: #86868b; /* Gray text */
    --accent-color: #06c; /* Accent blue */
    --white: #ffffff;
    --border-color: #d2d2d7;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --container-width: 1200px;
}

body {
    background-color: var(--white);
    color: var(--text-color);
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

nav ul {
    display: flex;
    gap: 30px;
}

nav a {
    color: var(--text-color);
    font-size: 1rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    background-color: var(--white);
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f7 0%, #ffffff 100%);
    z-index: -1;
}

#hero .container {
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-color); /* Explicitly set to dark color */
}

.degree {
    font-size: 1.8rem;
    font-weight: 500;
    color: #555555; /* Darker than the default secondary text */
    margin-bottom: 20px;
}

.summary {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #555555; /* Darker than the default secondary text */
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 980px; /* Apple's rounded button style */
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn i {
    margin-right: 8px;
}

.btn.primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn.primary:hover {
    background-color: #0077e6;
    transform: scale(1.02);
}

.btn.secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn.secondary:hover {
    background-color: #e8e8ed;
    transform: scale(1.02);
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Section Styles */
section {
    padding: 60px 0;
}

section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
}

/* Career Section */
#career {
    background-color: var(--secondary-color);
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background-color: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 60px;
    position: relative;
}

.timeline-content {
    background-color: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.timeline-content h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-content .date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.timeline-content .job-bullets {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 15px;
}

.timeline-content .job-bullets li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: var(--text-color);
}

.timeline-content .job-bullets li:last-child {
    margin-bottom: 0;
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-info {
    padding: 25px;
}

.project-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.project-info p {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.project-links {
    display: flex;
    gap: 10px;
}

/* About Me (Skills) Section */
#skills {
    background-color: var(--secondary-color);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background-color: var(--white);
    border-radius: 12px;
    padding: 25px;
    box-shadow: var(--shadow);
}

.skill-category h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.skill-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
    line-height: 1.4;
}

.skill-list li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-grid {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    nav ul {
        gap: 15px;
    }
    
    .name {
        font-size: 2.5rem;
    }
    
    .degree {
        font-size: 1.4rem;
    }
    
    .summary {
        font-size: 1.1rem;
    }
    
    section {
        padding: 80px 0;
    }
    
    section h2 {
        font-size: 2rem;
    }
    
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .timeline-content {
        max-width: 80%;
        margin-left: auto;
        margin-right: auto;
    }
    
    .projects-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .education-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .education-card {
        height: 250px;
    }
}

/* About Section */
#about {
    background-color: var(--secondary-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto 50px;
}

.about-text {
    background-color: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-text p:last-child {
    margin-bottom: 0;
}

/* Education Section */
#education {
    background-color: var(--white);
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.education-card {
    height: 280px;
    perspective: 1000px;
}

@media (max-width: 1200px) {
    .education-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 900px;
    }
}

@media (max-width: 768px) {
    .education-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    
    .education-card {
        height: 250px;
    }
}

.education-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
    box-shadow: var(--shadow);
    border-radius: 12px;
}

.education-card:hover .education-card-inner {
    transform: rotateY(180deg);
}

.education-card-front, .education-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 25px;
    border-radius: 12px;
    background-color: var(--white);
    border-left: 4px solid var(--primary-color);
}

.education-card-front {
    color: var(--text-color);
}

.education-card-back {
    transform: rotateY(180deg);
    background-color: var(--primary-color);
    color: var(--white);
}

.education-card-front h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    padding: 0 10px;
}

.education-card-front h4 {
    font-size: 1.2rem;
    color: #007aff;
    margin-bottom: 10px;
}

.education-card-front .date {
    font-size: 1rem;
    color: var(--text-secondary);
}

.education-card-back p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Logo Link */
.logo a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

.logo a:hover {
    color: var(--primary-color);
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 99;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #0077e6;
    transform: translateY(-3px);
}

/* Language Selector */
.language-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 5px;
    transition: color 0.3s;
}

.lang-btn.active {
    color: var(--primary-color);
    font-weight: 600;
}

.lang-btn:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .language-selector {
        position: absolute;
        top: 15px;
        right: 80px;
    }
} 

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    z-index: 1000;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        position: absolute;
        right: 20px;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        display: flex;
        flex-direction: column;
        gap: 30px;
        padding: 50px 0;
        width: 100%;
    }
    
    nav ul li {
        text-align: center;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 10px;
        font-size: 1.2rem;
    }
}

/* Email Link Styles */
.email-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

.email-link:hover {
    color: var(--primary-color);
}

/* Specific fix for the second education card to prevent line breaking in "(1 year)" only in English */
html[lang="en"] [data-lang-key="educationBBA2"] {
    white-space: nowrap;
}

/* Make sure Spanish translation can wrap properly */
html[lang="es"] [data-lang-key="educationBBA2"] {
    white-space: normal;
}
