:root {
    /* Colores principales del logo Castbar */
    --primary-color: #286e3c;
    --primary-dark: #1f5630;
    --primary-light: #327846;
    --secondary-color: #326e3c;
    --accent-color: #326e46;
    --accent-dark: #323c46;
    
    /* Fondos oscuros */
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: #1e293b;
    
    /* Textos */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    
    /* Gradientes basados en los colores del logo */
    --gradient-1: linear-gradient(135deg, #286e3c 0%, #327846 100%);
    --gradient-2: linear-gradient(135deg, #326e3c 0%, #326e46 100%);
    --gradient-3: linear-gradient(135deg, #286e3c 0%, #323c46 100%);
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-darker);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 70px;
    width: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    flex-shrink: 0;
    transition: all 0.3s;
    padding: 10px 14px;
    background: rgba(241, 245, 249, 0.95);
    border-radius: 10px;
    border: 1px solid rgba(40, 110, 60, 0.3);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.nav-brand:hover .logo-img {
    transform: scale(1.03);
    background: rgba(255, 255, 255, 1);
    border-color: rgba(40, 110, 60, 0.5);
    box-shadow: 0 4px 12px rgba(40, 110, 60, 0.2);
}

.brand-text {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

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

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-menu a:hover {
    color: var(--text-primary);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(40, 110, 60, 0.15) 0%, transparent 50%);
    z-index: -1;
}

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

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.greeting {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.name {
    font-size: 3.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.role {
    font-size: 2rem;
    color: var(--text-primary);
    font-weight: 600;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

.btn {
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

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

.hero-visual {
    animation: fadeInRight 0.8s ease-out;
}

.code-window {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
}

.code-header {
    background: var(--bg-dark);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red {
    background: #ef4444;
}

.code-dot.yellow {
    background: #f59e0b;
}

.code-dot.green {
    background: #10b981;
}

.code-title {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.code-content {
    padding: 1.5rem;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.code-line {
    margin-bottom: 0.5rem;
}

.code-keyword {
    color: #c678dd;
}

.code-var {
    color: #61afef;
}

.code-property {
    color: #e06c75;
}

.code-string {
    color: #98c379;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-dark);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

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

.about-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-text p {
    margin-bottom: 1.5rem;
}

.about-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Technologies Section */
.technologies {
    padding: 6rem 0;
}

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

.tech-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.tech-card:hover::before {
    transform: scaleX(1);
}

.tech-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.tech-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    height: 64px;
}

.tech-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(120deg) brightness(95%) contrast(85%);
    transition: transform 0.3s, filter 0.3s;
}

.tech-icon-multiple {
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-icon-multiple .tech-icon-img {
    width: 48px;
    height: 48px;
}

.tech-card:hover .tech-icon-img {
    transform: scale(1.1);
    filter: brightness(0) saturate(100%) invert(48%) sepia(79%) saturate(2476%) hue-rotate(120deg) brightness(110%) contrast(95%);
}

.tech-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tech-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

/* Experience Section */
.experience {
    padding: 6rem 0;
    background: var(--bg-dark);
}

.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-left: 2rem;
}

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

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

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

.timeline-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.timeline-content:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
}

.timeline-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    gap: 2rem;
}

.contact-item {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.contact-link {
    text-decoration: none;
    cursor: pointer;
}

.contact-link:hover {
    cursor: pointer;
}

.contact-link .contact-details p {
    color: var(--primary-color);
    transition: color 0.3s;
}

.contact-link:hover .contact-details p {
    color: var(--text-primary);
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
}

.contact-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
    transition: color 0.3s, transform 0.3s;
}

.contact-link:hover .contact-icon svg {
    color: var(--text-primary);
    transform: scale(1.1);
}

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

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

/* Footer */
.footer {
    background: var(--bg-darker);
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.footer-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero {
        padding-top: 90px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-visual {
        order: -1;
    }

    .name {
        font-size: 2.5rem;
    }

    .role {
        font-size: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-stats {
        flex-direction: row;
        justify-content: space-around;
        gap: 1rem;
    }

    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
        min-height: 70px;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        padding: 2rem;
        border-top: 1px solid var(--border-color);
        transition: left 0.3s;
        gap: 1rem;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding-top: 100px;
        min-height: auto;
        padding-bottom: 3rem;
    }

    .hero .container {
        gap: 2rem;
    }

    .name {
        font-size: 2rem;
    }

    .role {
        font-size: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 0.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .about,
    .technologies,
    .experience,
    .contact {
        padding: 4rem 0;
    }

    .about-content {
        gap: 2rem;
    }

    .about-text {
        font-size: 1rem;
    }

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

    .about-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .logo-img {
        height: 50px;
        padding: 8px 12px;
    }

    .code-window {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding-top: 110px;
        padding-bottom: 2rem;
    }

    .greeting {
        font-size: 1rem;
    }

    .name {
        font-size: 1.75rem;
    }

    .role {
        font-size: 1.125rem;
    }

    .hero-description {
        font-size: 0.9375rem;
        line-height: 1.6;
    }

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

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

    .about,
    .technologies,
    .experience,
    .contact {
        padding: 3rem 0;
    }

    .about-text {
        font-size: 0.9375rem;
    }

    .code-content {
        font-size: 0.75rem;
        padding: 1rem;
        line-height: 1.6;
    }

    .code-header {
        padding: 0.5rem 0.75rem;
    }

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

    .logo-img {
        height: 45px;
        padding: 6px 10px;
    }

    .nav-brand {
        gap: 0.5rem;
    }

    .contact-item {
        padding: 1.5rem;
        gap: 1rem;
    }

    .contact-icon {
        width: 40px;
        height: 40px;
    }

    .contact-icon svg {
        width: 28px;
        height: 28px;
    }

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

    .timeline-content {
        padding: 1.5rem;
    }
}

