* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #FF6B35;
    --primary-dark: #E63946;
    --secondary-color: #FF8C42;
    --background: #1a1a1a;
    --surface: #2a2a2a;
    --surface-light: #3a3a3a;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border-color: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] {
    --background: #f8f9fa;
    --surface: #ffffff;
    --surface-light: #f1f3f5;
    --text-primary: #1a1a1a;
    --text-secondary: #495057;
    --border-color: #dee2e6;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Header */
header {
    background: var(--surface);
    padding: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

main {
    padding-top: 0;
}

body {
    padding-top: 72px;
}

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

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle, .theme-toggle {
    background: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.lang-toggle:hover, .theme-toggle:hover {
    background: var(--surface);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.lang-toggle img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.logo-link {
    text-decoration: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: pointer;
}

.logo-link:hover .logo-bardo,
.logo-link:hover .logo-soft {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

header h1.logo {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    display: inline-block;
    line-height: 1;
    pointer-events: none;
}

.logo-bardo {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-soft {
    color: #ef4444;
    font-size: 1.4rem;
    font-weight: 700;
    margin-left: -4px;
    letter-spacing: -0.5px;
    vertical-align: baseline;
}

.subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
}

/* Main Content */
main {
    flex: 1;
    padding: 60px 0;
}

main.project-detail {
    padding: 40px 0 60px;
}

.project-section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.section-title .icon {
    font-size: 2rem;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Project Card */
.project-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    background: var(--surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.project-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
}

/* Tags */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    background: var(--surface-light);
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* Buttons */
.project-links {
    display: flex;
    gap: 12px;
    margin-top: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--surface-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer */
footer {
    background: var(--surface);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-links {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    header {
        padding: 10px 0;
    }
    
    header h1.logo {
        font-size: 1.3rem;
    }
    
    .logo-bardo {
        font-size: 1.3rem;
    }
    
    .logo-soft {
        font-size: 1rem;
    }

    main {
        padding: 40px 0;
    }

    .project-section {
        margin-bottom: 40px;
    }
}

/* Project Detail Page Styles */
.project-detail-header {
    margin-bottom: 60px;
    padding-top: 20px;
}

.project-detail-header h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 24px;
    transition: all 0.2s ease;
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border-color);
    width: fit-content;
}

.back-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateX(-4px);
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    margin-bottom: 0;
}

.carousel-container.single-image .carousel-wrapper {
    aspect-ratio: auto;
}

.carousel-container.single-image .carousel-slide {
    min-width: 100%;
    width: 100%;
}

.carousel-container.single-image .carousel-slide img {
    object-fit: contain;
    width: 100%;
    height: auto;
    max-height: none;
}

.carousel-slide img {
    object-fit: contain;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--surface);
}

.carousel-slides {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 107, 53, 0.9);
    backdrop-filter: blur(10px);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
    font-weight: 300;
}

.carousel-btn:hover {
    background: rgba(255, 107, 53, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.carousel-btn.prev {
    left: 24px;
}

.carousel-btn.next {
    right: 24px;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    background: var(--surface);
    border-top: 1px solid var(--border-color);
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-light);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.5;
}

.carousel-indicator:hover {
    opacity: 0.8;
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    opacity: 1;
    width: 32px;
    border-radius: 5px;
}

/* Project Content - Layout mejorado */
.project-detail {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-detail-header {
    margin-bottom: 0;
}

/* Layout de dos columnas para carrusel y descripción */
.project-detail-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 40px;
}

/* Project Content */
.project-content {
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.project-content-single {
    max-width: 900px;
    margin: 0 auto;
}

.project-description {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    height: fit-content;
    display: flex;
    flex-direction: column;
}

.project-demo-inline {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.project-demo-inline .btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
}

.project-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.project-description h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-description h2::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.project-description p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.project-description p:last-of-type {
    margin-bottom: 0;
}

.project-features {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    padding: 32px;
    border-radius: 20px;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    grid-column: 1 / -1;
}

.project-features::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.project-features h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-features h2::before {
    content: '';
    width: 4px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.project-features ul {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 16px;
}

.project-features li {
    padding: 12px 16px;
    padding-left: 40px;
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: rgba(255, 107, 53, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 107, 53, 0.1);
    transition: all 0.3s ease;
}

.project-features li:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: rgba(255, 107, 53, 0.3);
    transform: translateX(4px);
}

.project-features li::before {
    content: "✓";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 107, 53, 0.15);
    border-radius: 50%;
}

.project-demo {
    text-align: center;
    margin-top: 60px;
    margin-bottom: 40px;
}

.project-demo .btn {
    padding: 18px 48px;
    font-size: 1.2rem;
    min-width: 240px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

/* Responsive for project pages */
@media (max-width: 968px) {
    .project-detail-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .project-features {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .project-detail-header {
        margin-bottom: 0;
    }

    .project-detail-header h1 {
        font-size: 2.5rem;
    }

    .carousel-container {
        margin-bottom: 0;
        border-radius: 16px;
    }
    
    .project-detail-main {
        gap: 30px;
    }

    .carousel-btn {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
    }

    .carousel-btn.prev {
        left: 12px;
    }

    .carousel-btn.next {
        right: 12px;
    }

    .project-description,
    .project-features {
        padding: 32px 24px;
        border-radius: 16px;
    }

    .project-description h2,
    .project-features h2 {
        font-size: 2rem;
    }

    .project-description p {
        font-size: 1.05rem;
    }

    .project-features li {
        font-size: 1rem;
        padding: 14px 16px;
        padding-left: 44px;
    }

    .project-demo .btn {
        padding: 16px 32px;
        font-size: 1.1rem;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .project-detail-header h1 {
        font-size: 2rem;
    }

    .project-description,
    .project-features {
        padding: 24px 20px;
    }

    .project-description h2,
    .project-features h2 {
        font-size: 1.75rem;
    }
}

