/* ===================================
   Custom Styles for Alejo Millo Site
   Bootstrap 5 Dark Theme Customizations
   =================================== */

/* System Font Stack */
:root {
    --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --section-padding: 4rem;
    --accent-color: #0d6efd;
    --accent-hover: #0a58ca;
}

body {
    font-family: var(--font-family-base);
    background-color: #212529;
    color: #f8f9fa;
    padding-top: 70px; /* Account for fixed navbar */
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* ===================================
   Navigation & Header
   =================================== */

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.nav-link {
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

/* Language Toggle Button */
#languageToggle {
    min-width: 44px;
    min-height: 44px;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

#languageToggle:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

#languageToggle:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===================================
   Section Styling
   =================================== */

.content-section {
    padding: var(--section-padding) 0;
}

.hero-section {
    padding: 6rem 0 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, #212529 0%, #343a40 100%);
}

.hero-section .display-4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section .lead {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

/* Section Headings */
h2 {
    font-weight: 600;
    margin-bottom: 2rem;
    color: #f8f9fa;
    position: relative;
    padding-bottom: 0.75rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
}

/* ===================================
   Services Section
   =================================== */

.service-card {
    background-color: #343a40;
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

.service-card h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* ===================================
   Skills Section
   =================================== */

.skill-category {
    background-color: #343a40;
    border-radius: 8px;
    padding: 1.5rem;
}

.skill-category h5 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.skill-tag {
    display: inline-block;
    background-color: #495057;
    color: #f8f9fa;
    padding: 0.375rem 0.75rem;
    margin: 0.25rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

/* ===================================
   Experience Timeline
   =================================== */

.experience-entry {
    background-color: #343a40;
    border-left: 3px solid var(--accent-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.experience-entry h4 {
    color: #f8f9fa;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.experience-entry .company-info {
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.experience-entry .date-range {
    color: #adb5bd;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.experience-entry ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.experience-entry .tech-stack {
    color: #adb5bd;
    font-size: 0.875rem;
    font-style: italic;
}

/* ===================================
   Education Section
   =================================== */

.education-entry {
    background-color: #343a40;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.education-entry h5 {
    color: #f8f9fa;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.education-entry .institution {
    color: var(--accent-color);
    font-weight: 500;
}

/* ===================================
   Contact Section
   =================================== */

#contact h5 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

#contact a {
    text-decoration: none;
    transition: color 0.2s ease;
}

#contact a:hover {
    color: var(--accent-hover) !important;
    text-decoration: underline;
}

/* Ensure contact links have adequate touch targets */
#contact a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
}

/* ===================================
   Footer
   =================================== */

.footer {
    background-color: #1a1d20;
    color: #adb5bd;
    border-top: 1px solid #343a40;
}

/* ===================================
   Accessibility & Focus Indicators
   =================================== */

/* Visible focus indicators for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Skip to main content link (for accessibility) */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ===================================
   Responsive Design
   =================================== */

/* Mobile First - Base styles above */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .hero-section {
        padding: 8rem 0 6rem 0;
    }
    
    .hero-section .display-4 {
        font-size: 3.5rem;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
    :root {
        --section-padding: 5rem;
    }
    
    .hero-section {
        padding: 10rem 0 8rem 0;
    }
}

/* Large Desktop (1440px and up) */
@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
}

/* Very Large Screens (4K monitors) */
@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }
    
    body {
        font-size: 1.125rem;
    }
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .navbar,
    #languageToggle,
    .footer {
        display: none;
    }
    
    body {
        background-color: white;
        color: black;
    }
    
    .content-section {
        page-break-inside: avoid;
    }
}
