:root {
    --bg-dark: #1E1E1E;
    --bg-light: #252526;
    --bg-lighter: #2D2D2D;
    --primary: #569CD6;
    --secondary: #9CDCFE;
    --accent: #CE9178;
    --text: #D4D4D4;
    --text-light: #858585;
    --green: #608B4E;
    --purple: #C586C0;
    --yellow: #DCDCAA;
    --orange: #CE9178;
}

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

body {
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg-dark);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.code-font {
    font-family: 'Fira Code', monospace;
}

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

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

/* Header */
header {
    background-color: var(--bg-light);
    color: var(--text);
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--bg-lighter);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 70px;
}

header.scrolled {
    background-color: rgba(37, 37, 38, 0.95);
    padding: 0.2rem 0;
    height: 60px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
}

.logo span {
    color: var(--purple);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.nav-links a i {
    margin-right: 8px;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--secondary);
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
    margin-top: 70px; /* Asegura espacio para el header fijo */
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(86, 156, 214, 0.1) 0%, transparent 50%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
}

.profile-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    margin-bottom: 2rem;
    box-shadow: 0 0 30px rgba(86, 156, 214, 0.3);
    animation: fadeIn 1s ease, float 4s ease-in-out infinite;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    animation: fadeIn 1s ease;
}

.typewriter {
    display: inline-block;
    overflow: hidden;
    border-right: 3px solid var(--primary);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: 1px;
    animation: 
        typewriter 3.5s steps(40, end),
        blink 0.75s step-end infinite;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.8;
    animation: fadeIn 1.5s ease;
}

.hero p span {
    color: var(--secondary);
    font-family: 'Fira Code', monospace;
}

.social-links {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    animation: fadeIn 2s ease;
}

.social-links a {
    color: var(--text);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: all 0.3s;
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-5px);
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--bg-dark);
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Fira Code', monospace;
    animation: fadeIn 2s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn:hover::after {
    transform: translateX(100%);
}

.btn:hover {
    background-color: var(--secondary);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(86, 156, 214, 0.4);
}
  
  /* Terminal Effect */
  .terminal {
    background-color: var(--bg-light);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 3rem auto 0;
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 2.5s ease;
  }
  
  .terminal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
  }
  
  .terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
  }
  
  .terminal-btn.red {
    background-color: #ff5f56;
  }
  
  .terminal-btn.yellow {
    background-color: #ffbd2e;
  }
  
  .terminal-btn.green {
    background-color: #27c93f;
  }
  
  .terminal-title {
    flex-grow: 1;
    text-align: center;
    color: var(--text-light);
    font-family: "Fira Code", monospace;
    font-size: 0.9rem;
  }
  
  .terminal-body {
    font-family: "Fira Code", monospace;
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .terminal-prompt {
    color: var(--green);
  }
  
  .terminal-command {
    color: var(--secondary);
  }
  
  .terminal-comment {
    color: var(--text-light);
    font-style: italic;
  }
  
  /* Sections */
  section {
    padding: 100px 0;
    background-color: var(--bg-light);
    border-top: 1px solid var(--bg-lighter);
    border-bottom: 1px solid var(--bg-lighter);
  }
  
  .section-title {
    text-align: center;
    margin-bottom: 4rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    display: inline-block;
    padding-bottom: 5px;
    font-family: "Fira Code", monospace;
    position: relative;
  }
  
  .section-title h2::after {
    content: "";
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: var(--primary);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* About Section */
  .about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
  }
  
  .about-text {
    flex: 1;
    min-width: 300px;
    padding-right: 3rem;
  }
  
  .about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
  }
  
  .about-text p span {
    color: var(--secondary);
    font-family: "Fira Code", monospace;
  }
  
  .skills {
    flex: 1;
    min-width: 300px;
    background-color: var(--bg-lighter);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--bg-dark);
}

.skill-item {
    margin-bottom: 1.8rem;
    display: flex;
    align-items: center;
}

.skill-icon {
    width: 40px;
    height: 40px;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-dark);
    border-radius: 8px;
    padding: 8px;
}

.skill-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.skill-info {
    flex-grow: 1;
    min-width: 0;
}

.skill-name {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-weight: 600;
    font-family: 'Fira Code', monospace;
    color: var(--text);
}

.skill-bar {
    height: 10px;
    background-color: var(--bg-dark);
    border-radius: 5px;
    overflow: hidden;
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    border-radius: 5px;
    width: 0;
    transition: width 1.5s ease;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.tech-tag {
    background-color: var(--bg-dark);
    color: var(--secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-family: 'Fira Code', monospace;
    border: 1px solid rgba(156, 220, 254, 0.3);
}
  
  /* Experience Section */
  .timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .timeline::after {
    content: "";
    position: absolute;
    width: 4px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 5px;
  }
  
  .timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
  }
  
  .timeline-item::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--bg-light);
    border: 4px solid var(--primary);
    border-radius: 50%;
    top: 15px;
    z-index: 1;
  }
  
  .left {
    left: 0;
  }
  
  .right {
    left: 50%;
  }
  
  .left::after {
    right: -12px;
  }
  
  .right::after {
    left: -12px;
  }
  
  .timeline-content {
    padding: 25px;
    background-color: var(--bg-lighter);
    border-radius: 8px;
    border: 1px solid var(--bg-dark);
    position: relative;
    transition: all 0.3s;
  }
  
  .timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  .timeline-icon {
    position: absolute;
    top: -20px;
    left: 20px;
    background-color: var(--primary);
    color: var(--bg-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
  }
  
  .timeline-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
    padding-top: 10px;
    font-size: 1.3rem;
  }
  
  .timeline-content h4 {
    color: var(--secondary);
    margin-bottom: 0.8rem;
    font-size: 1rem;
    font-family: "Fira Code", monospace;
  }
  
  .timeline-content p {
    color: var(--text-light);
    line-height: 1.7;
  }
  
  .timeline-content p span {
    color: var(--yellow);
    font-family: "Fira Code", monospace;
  }
  
  /* Education Section */
  .education-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
  
  .education-card {
    background-color: var(--bg-lighter);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--bg-dark);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
  }
  
  .education-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  }
  
  .education-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--primary);
    font-size: 2.5rem;
    opacity: 0.1;
    z-index: 0;
  }
  
  .university-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border: 1px solid var(--bg-dark);
  }
  
  .education-card h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
  }
  
  .education-card h4 {
    color: var(--secondary);
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    font-family: "Fira Code", monospace;
  }
  
  .education-card p {
    position: relative;
    z-index: 1;
    color: var(--text-light);
  }
  
  /* Contact Section */
  .contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--bg-lighter);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--bg-dark);
  }
  
  .form-group {
    margin-bottom: 1.8rem;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    font-family: "Fira Code", monospace;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 12px;
    background-color: var(--bg-dark);
    border: 1px solid var(--bg-dark);
    border-radius: 4px;
    font-size: 1rem;
    color: var(--text);
    transition: all 0.3s;
    font-family: "Fira Code", monospace;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(86, 156, 214, 0.3);
  }
  
  .form-group textarea {
    height: 150px;
    resize: vertical;
  }
  
  /* Footer */
  footer {
    background-color: var(--bg-dark);
    color: var(--text);
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--bg-lighter);
  }
  
  .footer-content {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .footer-links {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }
  
  .footer-links li {
    margin: 0 15px;
  }
  
  .footer-links a {
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    font-family: "Fira Code", monospace;
  }
  
  .footer-links a i {
    margin-right: 8px;
    font-size: 0.9rem;
  }
  
  .footer-links a:hover {
    color: var(--primary);
  }
  
  .social-links-footer {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .social-links-footer a {
    color: var(--text);
    font-size: 1.5rem;
    margin: 0 15px;
    transition: all 0.3s;
  }
  
  .social-links-footer a:hover {
    color: var(--primary);
    transform: translateY(-3px);
  }
  
  .copyright {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 2rem;
    font-family: "Fira Code", monospace;
  }
  
  /* Responsive Design */
  @media (max-width: 768px) {
    .nav-links {
      position: fixed;
      top: 80px;
      left: -100%;
      width: 100%;
      height: calc(100vh - 80px);
      background-color: var(--bg-light);
      flex-direction: column;
      align-items: center;
      padding: 2rem;
      transition: left 0.4s ease;
      z-index: 999;
      border-top: 1px solid var(--bg-lighter);
    }
  
    .nav-links.active {
      left: 0;
    }
  
    .nav-links li {
      margin: 1.5rem 0;
      width: 100%;
      text-align: center;
    }
  
    .nav-links a {
      padding: 0.8rem 0;
      font-size: 1.1rem;
      justify-content: center;
    }
  
    .hamburger {
      display: block;
    }
  
    .hero {
      padding: 150px 0 80px;
    }
  
    .hero h1 {
      font-size: 2rem;
    }
  
    .hero p {
      font-size: 1rem;
    }
  
    .terminal {
      margin: 2rem auto 0;
    }
  
    .timeline::after {
      left: 31px;
    }
  
    .timeline-item {
      width: 100%;
      padding-left: 70px;
      padding-right: 25px;
    }
  
    .timeline-item::after {
      left: 21px;
    }
  
    .left::after,
    .right::after {
      left: 21px;
    }
  
    .right {
      left: 0;
    }
  
    .about-content {
      flex-direction: column;
    }
  
    .about-text {
      padding-right: 0;
      margin-bottom: 3rem;
    }
  
    .footer-links li {
      margin: 0.8rem 15px;
    }
  }
  