:root {
    --bg-color: #050505;
    --card-bg: #111111;
    --text-main: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #1e40af;
    --hover-gold: #ffd700;
    --transition: all 0.3s ease;
}

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

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.1s ease-out;
}

#earth-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Detrás de la tierra y el canvas */
    pointer-events: none;
    background: radial-gradient(ellipse at bottom, #1B2735 0%, #090A0F 100%);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: transparent;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    font-family: 'JetBrains Mono', monospace;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 0 20px rgba(30, 64, 175, 0.6);
}

.cursor {
    color: var(--accent-color);
    -webkit-text-fill-color: var(--accent-color);
    animation: blink 0.7s infinite;
    margin-left: 5px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.intro {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

/* Section Common */
section {
    padding: 100px 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 600;
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.skill-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    padding: 1.5rem;
    width: 100%;
    text-align: center;
    border-radius: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.skill-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.skill-desc {
    font-size: 0.8rem;
    opacity: 1;
    max-height: 200px;
    transition: var(--transition);
    line-height: 1.4;
}

.skill-card:hover {
    color: #fff;
    border-color: var(--accent-color);
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0,0,0,0.7), 0 0 10px rgba(59, 130, 246, 0.2);
}

.skill-card:hover .skill-name {
    transform: translateY(-2px);
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(59, 130, 246, 0.15),
        transparent
    );
    transition: 0.6s;
}

.skill-card:hover::before {
    left: 100%;
}

/* About/Contact Section */
.about-contact {
    padding: 100px 0;
    background-color: #0f0f0f;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-box, .contact-box {
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid #333;
    transition: var(--transition);
}

.about-box:hover, .contact-box:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.about-box h2, .contact-box h2 {
    text-align: left;
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--accent-color);
    width: 25px;
    text-align: center;
}

@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }
}

/* Certifications Section */
.cert-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    padding: 2rem;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.cert-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cert-icon {
    font-size: 3rem;
    color: #ffffff;
}

.cert-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

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

.btn-link {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
}

.btn-link:hover {
    background-color: #ffffff;
    color: #000000;
}

.cert-badge img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--card-bg);
    border: 1px solid #333;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-content {
    padding: 2.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.project-short {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.project-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: var(--transition);
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
}

.project-card:hover .project-short {
    opacity: 0;
    max-height: 0;
    margin: 0;
}

.project-card:hover .project-desc {
    max-height: 200px;
    opacity: 1;
    margin-bottom: 1rem;
}

.project-card i {
    font-size: 2.5rem;
    margin-top: 1rem;
    transition: var(--transition);
}

.project-card:hover {
    transform: scale(1.1);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    z-index: 10;
}

.project-card:hover i {
    color: var(--accent-color);
}

/* LinkedIn Float */
.linkedin-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background-color: #0077b5;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
    z-index: 1000;
}

.linkedin-float:hover {
    transform: scale(1.1) rotate(10deg);
    background-color: #008cc2;
}

.gmail-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #ea4335;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: var(--transition);
    z-index: 1000;
    overflow: hidden;
}

.float-icon {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.gmail-float:hover {
    transform: scale(1.1) rotate(-10deg);
    background-color: #d93025;
}

footer {
    background-color: #0a0a0a;
    padding: 4rem 0 2rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid #222;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    text-align: left;
}

.footer-about h3, .footer-contact h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: 'JetBrains Mono', monospace;
}

.footer-about p {
    line-height: 1.6;
    font-size: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.footer-contact-item i {
    color: var(--accent-color);
    width: 20px;
    text-align: center;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-contact-item {
        justify-content: center;
    }
    .footer-about h3, .footer-contact h3 {
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .cert-card {
        flex-direction: column;
        text-align: center;
    }
    .cert-info {
        flex-direction: column;
        text-align: center;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
}
