/* Reset y Variables */
:root {
    --bg-color: #0a0a0a;
    --card-bg: #161616;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-primary: #00d2ff;
    --accent-secondary: #3a7bd5;
    --turismo-gradient: linear-gradient(135deg, #2ecc71, #27ae60);
    --fashion-gradient: linear-gradient(135deg, #9b59b6, #8e44ad);
    --fabularum-gradient: linear-gradient(135deg, #e67e22, #d35400);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #1a1a1a 0%, #0a0a0a 100%);
    overflow: hidden;
}

.background-animation::before {
    content: '';
    position: absolute;
    width: 200vw;
    height: 200vh;
    top: -50%;
    left: -50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveStars 100s linear infinite;
}

@keyframes moveStars {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ambient Lights */
.light {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: -1;
    animation: floatLight 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.light-1 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    top: -15%;
    left: -15%;
    animation-duration: 25s;
}

.light-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #9b59b6, transparent 70%);
    bottom: -10%;
    right: -10%;
    animation-duration: 32s;
    animation-delay: -5s;
}

.light-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #2ecc71, transparent 70%);
    top: 40%;
    left: 30%;
    animation-duration: 28s;
    animation-delay: -12s;
    opacity: 0.15;
}

@keyframes floatLight {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(60px, -80px) scale(1.1);
    }

    66% {
        transform: translate(-40px, 60px) scale(0.9);
    }

    100% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

/* Header & Nav */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    justify-content: center;
}

.navbar {
    width: 100%;
    max-width: 1200px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(to right, var(--accent-primary), var(--accent-secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.identity-badge {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-name {
    color: var(--accent-primary);
    font-weight: 700;
}

.subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
}

.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 210, 255, 0.5);
}

.secondary {
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-main);
    background: transparent;
}

.secondary:hover {
    border-color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

/* Projects Section */
.projects-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 4rem;
    text-align: center;
}

.highlight {
    color: var(--accent-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-speed);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
}

.card-visual {
    height: 200px;
    width: 100%;
    order: -1;
    /* Visual at top */
    position: relative;
    overflow: hidden;
}

/* Image Visuals for Cards */
.visual-1 {
    /* Turismo */
    background: url('Media/Imagenes/Cadereyta_logo1.webp') no-repeat center center;
    background-size: cover;
}

.visual-2 {
    /* Fashion */
    background: url('Media/Imagenes/Aram_Rios_Logo.jpg') no-repeat center center;
    background-size: cover;
}

.visual-3 {
    /* Fabularum */
    background: url('Media/Imagenes/Fabularum.png') no-repeat center center;
    background-size: cover;
}

.card-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* App Download Section */
.app-section {
    padding: 5rem 2rem;
    background: linear-gradient(to top, #0f0f0f, #1a1a1a);
    margin-top: 5rem;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4rem;
    flex-wrap: wrap;
}

.app-info {
    flex: 1;
    min-width: 300px;
}

.project-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-secondary);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.app-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #ff9966, #ff5e62);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.app-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.download-btn {
    background: #fff;
    color: #000;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.download-btn:hover {
    background: #eee;
    transform: translateY(-2px);
}

.note {
    font-size: 0.8rem;
    color: #555;
    margin-top: 1rem;
    font-style: italic;
}

.phone-mockup {
    width: 200px;
    height: 400px;
    background: #222;
    border-radius: 30px;
    border: 8px solid #333;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.screen {
    background: #fff;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-screenshot {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CV Section */
.cv-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.cv-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.cv-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.profile-card {
    height: fit-content;
    position: sticky;
    top: 6rem;
    background: linear-gradient(145deg, #1a1a1a, #111);
    border-top: 3px solid var(--accent-primary);
}

.profile-header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, #aaa);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.role {
    color: var(--accent-secondary);
    font-weight: 600;
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.profile-body p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.skills-group h4,
.cv-card h4 {
    color: var(--text-main);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-left: 3px solid var(--accent-primary);
    padding-left: 0.8rem;
}

.mt-2 {
    margin-top: 2rem;
}

.cv-details-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Timeline Items */
.timeline-item {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.year {
    display: block;
    font-size: 0.8rem;
    color: var(--accent-secondary);
    margin-bottom: 0.2rem;
}

.timeline-item h5 {
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.timeline-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.tags-container span,
.skill-tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #ddd;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.tags-container span:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.soft span {
    border-color: rgba(58, 123, 213, 0.3);
}

/* Footer & Contact Section */
footer {
    padding: 5rem 2rem 2rem;
    text-align: center;
    background: #050505;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem 2rem;
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--accent-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.contact-icon {
    font-size: 1.5rem;
}

.contact-text {
    font-weight: 500;
}

.copyright {
    color: #555;
    font-size: 0.9rem;
    margin-top: 4rem;
}

/* Animations Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design Improvements */
@media (max-width: 900px) {
    .cv-container {
        grid-template-columns: 1fr;
    }

    .profile-card {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }

    .navbar {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: flex;
        gap: 1rem;
        font-size: 0.9rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links a {
        padding: 0.5rem;
        display: block;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    /* Reduce spacing on mobile */
    .projects-section,
    .app-section,
    .cv-section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: 2.5rem;
    }

    /* App Section adjustments */
    .app-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }

    .app-info {
        align-items: center;
        display: flex;
        flex-direction: column;
    }

    .phone-mockup {
        width: 180px;
        height: 360px;
        margin: 0 auto;
    }

    /* Adjust lights for mobile to avoid covering content */
    .light {
        opacity: 0.2;
    }

    .light-1 {
        width: 400px;
        height: 400px;
        top: -10%;
        left: -20%;
    }

    .light-2 {
        width: 350px;
        height: 350px;
        bottom: 0%;
        right: -20%;
    }

    .light-3 {
        width: 300px;
        height: 300px;
        top: 30%;
        left: 10%;
        opacity: 0.1;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .logo {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.7rem 1.5rem;
        width: 100%;
        text-align: center;
    }

    .hero-buttons {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .project-card {
        margin-bottom: 1rem;
    }

    .contact-container {
        flex-direction: column;
        gap: 1rem;
    }

    .contact-card {
        width: 100%;
        justify-content: center;
    }
}