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

:root {
    /* Professional Dark Theme Colors */
    --primary-color: #1e293b;
    --primary-dark: #0f172a;
    --primary-light: #334155;
    --secondary-color: #3b82f6;
    --accent-color: #06b6d4;
    
    --bg-primary: #f5f5f5;
    --bg-secondary: #e8e9ed;
    --bg-tertiary: #d4d6db;
    --bg-card: #ffffff;
    --bg-overlay: rgba(245, 245, 245, 0.95);
    
    --text-primary: #0a0a0a;
    --text-secondary: #333333;
    --text-muted: #666666;
    --text-inverse: #ffffff;
    
    --border-color: #c5c7cc;
    --border-light: #d9dbe0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 2px 4px -1px rgb(0 0 0 / 0.08);
    --shadow-lg: 0 4px 6px -2px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 8px 12px -4px rgb(0 0 0 / 0.12);
    
    --gradient-primary: linear-gradient(135deg, #1e293b, #0f172a);
    --gradient-secondary: linear-gradient(135deg, #3b82f6, #2563eb);
    --gradient-hero: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    
    --border-radius: 0.375rem;
    --border-radius-lg: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0a0e14;
    --bg-secondary: #151920;
    --bg-tertiary: #1f2329;
    --bg-card: #181c23;
    --bg-overlay: rgba(10, 14, 20, 0.95);
    
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #e0e0e0;
    --text-inverse: #0a0e14;
    
    --border-color: #3d444d;
    --border-light: #4d5561;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.8);
    --shadow-md: 0 2px 4px -1px rgb(0 0 0 / 0.7);
    --shadow-lg: 0 4px 6px -2px rgb(0 0 0 / 0.8);
    --shadow-xl: 0 8px 12px -4px rgb(0 0 0 / 0.9);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 100px;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: var(--transition);
    font-weight: 400;
    letter-spacing: -0.01em;
    position: relative;
}

/* Cursor Light Effect */
.cursor-glow {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 41, 59, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    opacity: 0;
}

[data-theme="dark"] .cursor-glow {
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
}

@media (hover: none) and (pointer: coarse) {
    .cursor-glow {
        display: none;
    }
}

/* Touch ripple effect for mobile */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(30, 41, 59, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 245, 245, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.navbar.scrolled {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .navbar {
    background: rgba(10, 14, 20, 0.98);
    border-bottom-color: var(--border-color);
}

[data-theme="dark"] .navbar.scrolled {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

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

.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: var(--transition);
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: #0f172a;
    overflow: hidden;
}

.hero-video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
    opacity: 0.2;
    pointer-events: none;
    filter: brightness(0.6);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-hero);
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.03) 41px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.03) 41px);
    z-index: 1;
    pointer-events: none;
    opacity: 0.7;
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-title {
    font-size: 3rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.typing-text {
    display: block;
    color: var(--text-inverse);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-weight: 400;
    opacity: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.name-highlight {
    color: var(--text-inverse);
    display: block;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 4px 20px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-inverse);
    margin-bottom: 1rem;
    font-weight: 500;
    opacity: 1;
    letter-spacing: 0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-description {
    font-size: 1rem;
    color: var(--text-inverse);
    margin-bottom: 2rem;
    max-width: 550px;
    line-height: 1.7;
    opacity: 1;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 4px 16px rgba(0, 0, 0, 0.6);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--text-inverse);
    color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-secondary);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .btn-primary {
    background: #ffffff;
    color: #0a0e14;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-primary:hover {
    background: #f0f6fc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .btn-outline {
    border-color: #ffffff;
    color: #ffffff;
}

[data-theme="dark"] .btn-outline:hover {
    background: #ffffff;
    color: #0a0e14;
}

.btn-outline {
    background: transparent;
    color: var(--text-inverse);
    border: 2px solid var(--text-inverse);
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn-outline:hover {
    background: var(--text-inverse);
    color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: translateY(0);
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

.social-link:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.profile-image:hover img {
    transform: scale(1.05);
}


.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-arrow {
    animation: bounce 2s infinite;
    color: var(--text-inverse);
    font-size: 1.5rem;
    opacity: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.8));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* ===== SECTIONS ===== */
section {
    padding: 5rem 0;
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.5;
    pointer-events: none;
    z-index: 0;
}

section > .container {
    position: relative;
    z-index: 1;
}

/* Patron por defecto para secciones sin patron específico */
section::before {
    background-image: 
        linear-gradient(90deg, rgba(30, 41, 59, 0.02) 1px, transparent 1px),
        linear-gradient(rgba(30, 41, 59, 0.02) 1px, transparent 1px);
    background-size: 25px 25px;
}

/* Projects Header Info */
.projects-header-info {
    text-align: center;
    margin-bottom: 2rem;
}

.projects-header-info h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    letter-spacing: -0.02em;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-primary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== ABOUT SECTION ===== */
.about {
    background: var(--bg-secondary);
}

.about::before {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(30, 41, 59, 0.04) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(30, 41, 59, 0.04) 2%, transparent 0%);
    background-size: 100px 100px;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-intro h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-intro p {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

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

.detail-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.detail-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.about-interests h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.about-interests ul {
    list-style: none;
}

.about-interests li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-primary);
    line-height: 1.7;
}

.about-interests li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ===== RESUME SECTION ===== */
.resume::before {
    background-image: 
        linear-gradient(90deg, rgba(30, 41, 59, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(30, 41, 59, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
}

.resume-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.tab-button.active,
.tab-button:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 3px solid var(--bg-primary);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.timeline-header h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
}

.timeline-date {
    background: var(--primary-color);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.timeline-content h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.8;
}

.timeline-skills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

.certification-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cert-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.cert-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cert-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cert-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.cert-date {
    background: var(--secondary-color);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.resume-download {
    text-align: center;
    margin-top: 3rem;
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.projects::before {
    background-image: 
        linear-gradient(30deg, rgba(30, 41, 59, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(30, 41, 59, 0.02) 87.5%, rgba(30, 41, 59, 0.02)),
        linear-gradient(150deg, rgba(30, 41, 59, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(30, 41, 59, 0.02) 87.5%, rgba(30, 41, 59, 0.02)),
        linear-gradient(30deg, rgba(30, 41, 59, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(30, 41, 59, 0.02) 87.5%, rgba(30, 41, 59, 0.02)),
        linear-gradient(150deg, rgba(30, 41, 59, 0.02) 12%, transparent 12.5%, transparent 87%, rgba(30, 41, 59, 0.02) 87.5%, rgba(30, 41, 59, 0.02));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
}

.projects-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 2rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-inverse);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-image {
    transition: var(--transition);
}

.project-card:active {
    transform: translateY(-2px) scale(0.98);
}

.project-image {
    height: 200px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

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

.project-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.project-type {
    background: var(--secondary-color);
    color: var(--text-inverse);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.project-description {
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tech-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid var(--border-light);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.project-link:hover {
    color: var(--primary-dark);
}

.loading-placeholder {
    height: 400px;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    position: relative;
    overflow: hidden;
}

.loading-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.projects-cta {
    text-align: center;
}

.projects-cta p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* ===== SKILLS SECTION ===== */
.skills::before {
    background-image: 
        radial-gradient(ellipse farthest-corner at 0 140px, rgba(30, 41, 59, 0.03) 0%, transparent 50%, transparent 100%),
        radial-gradient(ellipse farthest-corner at 100% 200px, rgba(30, 41, 59, 0.03) 0%, transparent 50%, transparent 100%);
    background-size: 600px 600px;
    background-position: 0 0, 100% 0;
}

.skills-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: var(--transition);
    cursor: pointer;
}

.skill-category:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.skill-category:hover .category-header i {
    transform: scale(1.1) rotate(5deg);
    color: var(--secondary-color);
}

.category-header i {
    transition: var(--transition);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

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

.category-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
}

.skill-item {
    margin-bottom: 1.5rem;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.skill-name {
    color: var(--text-primary);
    font-weight: 500;
}

.skill-level {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.skill-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    border-radius: 4px;
    animation: fillBar 2s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes fillBar {
    to {
        width: var(--progress);
    }
}

.skills-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.skill-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
}

.skill-icon:hover {
    background: var(--primary-color);
    color: var(--text-inverse);
    transform: translateY(-2px);
}

.skill-icon i {
    font-size: 1.5rem;
}

.skill-icon span {
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--bg-secondary);
}

.contact::before {
    background-image: 
        repeating-radial-gradient(circle at 0 0, transparent 0, rgba(30, 41, 59, 0.02) 10px, transparent 20px);
    background-size: 200px 200px;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-inverse);
    font-size: 1.25rem;
}

.contact-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.contact-details p {
    color: var(--text-secondary);
}

.contact-social {
    margin-top: 2rem;
}

.contact-social h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #ffffff;
    color: var(--text-primary);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
                    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.contact-form .btn {
    width: 100%;
    position: relative;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-tertiary);
    padding: 2rem 0;
    text-align: center;
    position: relative;
    border-top: 1px solid var(--border-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(30, 41, 59, 0.03) 10px, rgba(30, 41, 59, 0.03) 11px);
    pointer-events: none;
    opacity: 0.6;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.footer-text p {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
        padding-top: 2rem;
    }
    
    .hero-text {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-social {
        justify-content: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-video-background {
        opacity: 0.1;
    }
    
    .image-container {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .profile-image {
        width: 250px;
        height: 250px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-overlay);
        backdrop-filter: blur(10px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 0;
    }
    
    .hero {
        min-height: auto;
        padding: 8rem 0 5rem;
        padding-top: calc(80px + 3rem);
    }
    
    .hero-container {
        padding-bottom: 2rem;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-buttons {
        margin-top: 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-social {
        margin-top: 1rem;
    }
    
    .hero-text {
        order: 2;
        align-items: center;
        width: 100%;
    }
    
    .hero-image {
        order: 1;
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        text-align: center;
        width: 100%;
    }
    
    .typing-text,
    .name-highlight,
    .hero-subtitle,
    .hero-description {
        text-align: center;
        width: 100%;
    }
    
    .hero-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .hero-social {
        width: 100%;
        justify-content: center;
    }
    
    .image-container {
        width: 250px;
        height: 250px;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }
    
    .hero-video-background {
        display: none;
    }
    
    .scroll-indicator {
        bottom: 0.5rem;
        opacity: 0.6;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-item {
        padding-left: 1.5rem;
    }
    
    .timeline-dot {
        left: -1.5rem;
    }
    
    .timeline-header {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
    }
    
    .skills-icons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .certification-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero {
        padding: 6rem 0 4rem;
        padding-top: calc(80px + 2.5rem);
    }
    
    .hero-container {
        padding-bottom: 2rem;
    }
    
    .hero-content {
        gap: 1.5rem;
    }
    
    .hero-buttons {
        margin-top: 1.5rem;
        margin-bottom: 2.5rem;
    }
    
    .hero-social {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .typing-text {
        font-size: 1rem;
    }
    
    .name-highlight {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        max-width: 100%;
    }
    
    .hero-buttons {
        gap: 0.75rem;
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        max-width: 300px;
    }
    
    .image-container {
        width: 220px;
        height: 220px;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }
    
    .hero-social {
        gap: 0.75rem;
        justify-content: center;
        width: 100%;
    }
    
    .social-link {
        width: 44px;
        height: 44px;
    }
    
    .hero-text {
        align-items: center;
    }
    
    .hero-title,
    .typing-text,
    .name-highlight,
    .hero-subtitle,
    .hero-description {
        text-align: center;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .timeline-content {
        padding: 1.5rem;
    }
    
    .skill-category {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .skills-icons {
        grid-template-columns: 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
    }
    
    .project-title {
        margin-bottom: 0.25rem;
    }
    
    .project-type {
        margin-left: 0;
    }
    
    .project-tags {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .project-tag {
        width: 100%;
        text-align: left;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    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);
    }
}

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

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

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

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }
.visible { display: block; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 2rem; }

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hamburger,
    .theme-toggle,
    .back-to-top,
    .scroll-indicator,
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #000;
        background: #fff;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    section {
        padding: 1.5rem 0;
        break-inside: avoid;
    }
    
    .section-title {
        font-size: 18pt;
        color: #000;
    }
    
    .btn {
        border: 1px solid #000;
        color: #000;
        background: transparent;
    }
    
    a {
        text-decoration: underline;
        color: #000;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    
    .scroll-arrow {
        animation: none;
    }
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.btn:focus,
.nav-link:focus,
.social-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Dark mode patterns */
[data-theme="dark"] section::before {
    background-image: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 25px 25px;
}

[data-theme="dark"] .hero::after {
    background-image: 
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.04) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.04) 41px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0px, transparent 1px, transparent 40px, rgba(255, 255, 255, 0.04) 41px);
}

[data-theme="dark"] .about::before {
    background-image: 
        radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.04) 2%, transparent 0%),
        radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.04) 2%, transparent 0%);
}

[data-theme="dark"] .projects::before {
    background-image: 
        linear-gradient(30deg, rgba(255, 255, 255, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.03) 87.5%, rgba(255, 255, 255, 0.03)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.03) 87.5%, rgba(255, 255, 255, 0.03)),
        linear-gradient(30deg, rgba(255, 255, 255, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.03) 87.5%, rgba(255, 255, 255, 0.03)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.03) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.03) 87.5%, rgba(255, 255, 255, 0.03));
}

[data-theme="dark"] .contact::before {
    background-image: 
        repeating-radial-gradient(circle at 0 0, transparent 0, rgba(255, 255, 255, 0.03) 10px, transparent 20px);
}

[data-theme="dark"] .recommendations::before {
    background-image: 
        linear-gradient(135deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(225deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%),
        linear-gradient(315deg, rgba(255, 255, 255, 0.04) 25%, transparent 25%);
}

[data-theme="dark"] .resume::before {
    background-image: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

[data-theme="dark"] .skills::before {
    background-image: 
        radial-gradient(ellipse farthest-corner at 0 140px, rgba(255, 255, 255, 0.04) 0%, transparent 50%, transparent 100%),
        radial-gradient(ellipse farthest-corner at 100% 200px, rgba(255, 255, 255, 0.04) 0%, transparent 50%, transparent 100%);
}

[data-theme="dark"] .footer::before {
    background-image: 
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 255, 255, 0.04) 10px, rgba(255, 255, 255, 0.04) 11px);
}

/* Dark mode mejor contraste para tags y elementos */
[data-theme="dark"] .skill-tag,
[data-theme="dark"] .tech-tag {
    background: var(--bg-tertiary);
    color: #ffffff;
    border-color: var(--border-color);
}

[data-theme="dark"] .timeline-date {
    background: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .project-type {
    background: var(--secondary-color);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .project-card,
[data-theme="dark"] .skill-category,
[data-theme="dark"] .timeline-content,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .recommendation-card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .skill-category:hover,
[data-theme="dark"] .timeline-content:hover,
[data-theme="dark"] .stat-card:hover,
[data-theme="dark"] .recommendation-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .social-link {
    background: var(--bg-tertiary);
    color: #ffffff;
}

[data-theme="dark"] .social-link:hover {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: #ffffff;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .contact-form {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .contact-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .detail-item {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

[data-theme="dark"] .detail-item strong,
[data-theme="dark"] .detail-item span {
    color: #ffffff;
}

[data-theme="dark"] .stat-number {
    color: var(--secondary-color);
}

[data-theme="dark"] .stat-label {
    color: #ffffff;
}

[data-theme="dark"] .category-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .skill-name {
    color: #ffffff;
}

[data-theme="dark"] .skill-level {
    color: #e0e0e0;
}

[data-theme="dark"] .project-title {
    color: #ffffff;
}

[data-theme="dark"] .recommender-details h3 {
    color: #ffffff;
}

[data-theme="dark"] .recommender-title {
    color: var(--secondary-color);
}

[data-theme="dark"] .contact-details h4 {
    color: #ffffff;
}

[data-theme="dark"] .contact-details p {
    color: #e0e0e0;
}

[data-theme="dark"] .timeline-header h3 {
    color: var(--secondary-color);
}

[data-theme="dark"] .about-intro h3 {
    color: var(--secondary-color);
}

[data-theme="dark"] .about-interests h4 {
    color: #ffffff;
}

[data-theme="dark"] .form-group label {
    color: #ffffff;
}

[data-theme="dark"] .contact-social h4 {
    color: #ffffff;
}

[data-theme="dark"] .section-title {
    color: #ffffff;
}

[data-theme="dark"] .section-subtitle {
    color: #ffffff;
}

[data-theme="dark"] .nav-logo {
    color: var(--secondary-color);
}

[data-theme="dark"] .hero-title,
[data-theme="dark"] .typing-text,
[data-theme="dark"] .name-highlight,
[data-theme="dark"] .hero-subtitle,
[data-theme="dark"] .hero-description {
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 40px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .hero::before {
    background: linear-gradient(135deg, rgba(10, 14, 20, 0.85), rgba(21, 25, 32, 0.85));
}

[data-theme="dark"] .hero::after {
    opacity: 0.5;
}

[data-theme="dark"] .hero-video-background {
    opacity: 0.15;
    filter: brightness(0.5);
}

[data-theme="dark"] .scroll-arrow {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
        --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);
        --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);
        --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    }
    
    .btn-outline {
        border-width: 2px;
    }
}

/* ===== RECOMMENDATIONS SECTION ===== */
.recommendations {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.recommendations::before {
    background-image: 
        linear-gradient(135deg, rgba(30, 41, 59, 0.03) 25%, transparent 25%),
        linear-gradient(225deg, rgba(30, 41, 59, 0.03) 25%, transparent 25%),
        linear-gradient(45deg, rgba(30, 41, 59, 0.03) 25%, transparent 25%),
        linear-gradient(315deg, rgba(30, 41, 59, 0.03) 25%, transparent 25%);
    background-position: 40px 0, 40px 0, 0 0, 0 0;
    background-size: 80px 80px;
    background-repeat: repeat;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.recommendation-card {
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: none;
    transition: var(--transition);
}

.recommendation-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.recommendation-header {
    margin-bottom: 1.5rem;
}

.recommender-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.recommender-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.recommender-details h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.recommender-title {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.recommender-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.recommendation-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.recommendation-content {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.recommendation-content p {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.8;
}

.recommendation-content p:last-child {
    margin-bottom: 0;
}

.recommendation-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recommendation-skills .skill-tag {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.recommendation-placeholder {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--border-color);
}

.placeholder-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.recommendation-placeholder h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.recommendation-placeholder p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .recommendations-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .recommendation-card {
        padding: 1.5rem;
    }
    
    .recommender-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .recommendation-meta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .recommendations-tabs .tab-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .recommendations-tabs .tab-btn {
        width: 200px;
        text-align: center;
    }
} 

/* Mobile Responsive for Projects */
@media (max-width: 768px) {
    .projects-filter {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-header {
        flex-direction: column;
        align-items: start;
        gap: 0.5rem;
    }
    
    .project-title {
        margin-bottom: 0.25rem;
    }
    
    .project-tags {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .project-tag {
        width: auto;
        text-align: left;
    }
} 

/* ===== ADDITIONAL MOBILE FIXES ===== */

/* Ensure no horizontal overflow anywhere */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix hero section on very small screens */
@media (max-width: 768px) {
    .hero {
        min-height: 100svh; /* small viewport height - fills screen without overflow */
        padding-top: calc(80px + 2rem);
        padding-bottom: 3rem;
    }

    .hero-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 1.5rem;
        width: 100%;
    }

    .hero-text {
        order: 2;
        width: 100%;
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .hero-image {
        order: 1;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .hero-title {
        font-size: 2rem;
        text-align: center;
        width: 100%;
        word-break: break-word;
    }

    .name-highlight {
        font-size: 2rem;
        display: block;
        text-align: center;
    }

    .hero-description {
        text-align: center;
        max-width: 100%;
        padding: 0;
    }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .hero-social {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
    }

    /* About section fixes */
    .about-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

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

    /* Contact section */
    .contact-content {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    /* Resume tabs wrapping */
    .resume-tabs {
        gap: 0.5rem;
    }

    .tab-button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    /* Timeline fixes */
    .timeline-content {
        padding: 1.25rem;
    }

    .timeline-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    /* Footer fix */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-links {
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    /* Skill icons */
    .skills-icons {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Projects filter buttons */
    .projects-filter {
        gap: 0.5rem;
        padding: 0;
    }

    .filter-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.825rem;
    }

    /* Section padding */
    section {
        padding: 3.5rem 0;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Skills categories grid */
    .skills-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    /* Hero */
    .hero-title,
    .name-highlight {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-description {
        font-size: 0.875rem;
    }

    .image-container {
        width: 200px;
        height: 200px;
    }

    .profile-image {
        width: 160px;
        height: 160px;
    }

    /* About stats - single column on very small */
    .about-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    /* Section titles */
    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Skill icons - 2 columns */
    .skills-icons {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Skills categories */
    .skills-categories {
        grid-template-columns: 1fr;
    }

    .skill-category {
        padding: 1.25rem;
    }

    /* Contact form */
    .contact-form {
        padding: 1.25rem;
    }

    /* Recommendation cards */
    .recommendation-card {
        padding: 1.25rem;
    }

    .recommender-avatar {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    /* Resume tabs - full width */
    .resume-tabs {
        flex-direction: column;
        align-items: center;
    }

    .tab-button {
        width: 100%;
        max-width: 260px;
    }

    /* Buttons */
    .btn {
        font-size: 0.875rem;
        padding: 0.7rem 1.25rem;
    }

    /* Section padding */
    section {
        padding: 2.5rem 0;
    }

    /* Projects header */
    .projects-header-info h3 {
        font-size: 1.1rem;
    }
}

/* iOS safe area support */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }

    .back-to-top {
        bottom: max(2rem, env(safe-area-inset-bottom));
        right: max(2rem, env(safe-area-inset-right));
    }
}

/* ===== AI CHAT WIDGET ===== */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 998;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Toggle button */
.chat-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s;
    position: relative;
}

.chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

.chat-toggle-icon-close { display: none; }
.chat-toggle-active .chat-toggle-icon-open { display: none; }
.chat-toggle-active .chat-toggle-icon-close { display: block; }

.chat-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-color);
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Chat panel */
.chat-panel {
    position: absolute;
    bottom: 68px;
    left: 0;
    width: 360px;
    max-height: 520px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-panel-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header */
.chat-header {
    padding: 0.9rem 1.1rem;
    background: var(--primary-color);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.chat-header h4 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.chat-status {
    font-size: 0.72rem;
    opacity: 0.82;
    display: block;
    margin-top: 1px;
}

.chat-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}
.chat-close:hover { background: rgba(255, 255, 255, 0.18); }

/* Messages area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    scroll-behavior: smooth;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }

/* Message bubbles */
.chat-message {
    display: flex;
    animation: chatFadeIn 0.2s ease-out;
}

@keyframes chatFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-message-user  { justify-content: flex-end; }
.chat-message-assistant { justify-content: flex-start; }

.chat-bubble {
    max-width: 82%;
    padding: 0.55rem 0.85rem;
    border-radius: 1rem;
    font-size: 0.855rem;
    line-height: 1.55;
}

.chat-message-user .chat-bubble {
    background: var(--primary-color);
    color: #ffffff;
    border-bottom-right-radius: 0.25rem;
}

.chat-message-assistant .chat-bubble {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 0.25rem;
    border: 1px solid var(--border-light);
}

/* Typing indicator */
.chat-typing-bubble {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0.7rem 0.9rem;
}

.chat-typing-bubble span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: chatDot 1.3s infinite;
}
.chat-typing-bubble span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing-bubble span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chatDot {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.6; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* Input area */
.chat-input-area {
    padding: 0.7rem 0.85rem 0.65rem;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.chat-input-wrapper {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.855rem;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}
.chat-input:focus { border-color: var(--primary-color); }
.chat-input:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}
.chat-send:hover:not(:disabled) { background: var(--primary-light); transform: scale(1.07); }
.chat-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.chat-disclaimer {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.35rem;
    margin-bottom: 0;
}

/* Dark mode overrides */
[data-theme="dark"] .chat-message-assistant .chat-bubble {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: #ffffff;
}
[data-theme="dark"] .chat-input {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: #ffffff;
}
[data-theme="dark"] .chat-input::placeholder { color: #9ca3af; }

/* Mobile */
@media (max-width: 480px) {
    .chat-widget {
        left: 1rem;
        bottom: 1rem;
    }
    .chat-panel {
        width: calc(100vw - 2rem);
        left: 0;
        max-height: 65vh;
        bottom: 64px;
    }
}