* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #5D4037;
    /* Café oscuro tipo madera */
    --secondary-color: #7C9D8E;
    /* Verde musgo suave */
    --accent-color: #E8E0D9;
    /* Crema cálida */
    --background-color: #FFF8F0;
    /* Fondo blanco roto */
    --text-color: #4E413B;
    /* Café texto cálido */
    --detail-color: #A78B7F;
    /* Café claro para detalles */
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 249, 240, 0.95);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px rgba(107, 79, 79, 0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hamburger {
    display: block !important;
    cursor: pointer;
    padding: 10px;
    z-index: 1000;
}

.hamburger .line {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

.scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.logo {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    text-shadow: 2px 2px 4px rgba(93, 64, 55, 0.2);
    font-weight: bold;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-links {
    display: none;
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background: white;
    width: 100%;
    max-width: 300px;
    padding: 20px;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
}

.nav-links.active {
    display: flex;
    right: 0;
}


.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    padding: 0.5rem;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger.active .line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.hero {
    height: 100vh;
    background: linear-gradient(rgba(93, 64, 55, 0.3), rgba(93, 64, 55, 0.3)),
        url('https://images.unsplash.com/photo-1670594457103-129309beb706?q=80&w=1770&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
    animation-delay: 0.5s;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
    animation-delay: 1s;
}

.section-active {
    animation: sectionFocus 1.5s ease-out;
}

@keyframes sectionFocus {
    0% {
        transform: translateY(20px);
        opacity: 0.8;
    }

    50% {
        transform: translateY(-5px);
        opacity: 1;
    }

    100% {
        transform: translateY(0);
    }
}

section {
    padding: 5rem 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
}

.profile {
    background: linear-gradient(135deg, #dbab59 0%, #ffbd54 100%);
    position: relative;
    overflow: hidden;
}

.profile::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30% 70% 70% 30%;
    transform: rotate(45deg);
}

.profile-text h2 {
    font-size: 2.5rem;
    color: #2d2d2d;
    margin-bottom: 1.5rem;
    position: relative;
    font-family: 'Playfair Display', serif;
}

.profile-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-img {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transform: translateX(-50px);
}

.profile-text {
    flex: 1;
    opacity: 0;
    transform: translateX(50px);
}

.decorative-line {
    display: block;
    width: 60px;
    height: 3px;
    background: #ffffff;
    margin: 1rem 0;
}

.profile-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item i {
    font-size: 1.8rem;
    color: #ffffff;
    min-width: 40px;
}

.highlight-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 1.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid #ffffff;
}

.hobbies {
    background: linear-gradient(135deg, #E8E0D9 0%, #F5EFE6 100%);
    position: relative;
    overflow: hidden;
}

.section-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 90%, rgba(167, 139, 127, 0.1) 20%, transparent 40%),
        linear-gradient(45deg, transparent 70%, rgba(124, 157, 142, 0.1) 100%);
}

.hobbies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hobby-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(93, 64, 55, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(167, 139, 127, 0.2);
}

.hobby-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 12px 40px rgba(93, 64, 55, 0.15);
}

.hobby-icon {
    font-size: 2.5rem;
    color: #5D4037;
    margin-bottom: 1.5rem;
    transition: transform 0.3s;
}

.hobby-card:hover .hobby-icon {
    transform: scale(1.1) rotate(-5deg);
}

.hobby-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.hobby-tags span {
    background: rgba(93, 64, 55, 0.1);
    color: #5D4037;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .hobbies-grid {
        grid-template-columns: 1fr;
    }

    .hobby-card {
        padding: 1.5rem;
    }
}

.projects {
    background: var(--primary-color);
    color: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.project-card {
    background: var(--accent-color);
    border: 2px solid var(--detail-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--accent-color);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.3s;
    perspective: 1000px;
    height: 400px;
}

.image-container {
    height: 200px;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
}

.project-image {
    height: 200px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.3s;
}

.project-card:hover .project-image {
    transform: scale(1.1);
}

.project-card h3 {
    padding: 1rem;
    margin: 0;
    color: #363333;
}

.project-card p {
    padding: 0 1rem 1rem;
    color: #666;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .profile-content {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        display: none;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

.animate-left {
    animation: slideInLeft 1s forwards;
}

.animate-right {
    animation: slideInRight 1s forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
}

.visible {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.skills {
    background-color: #A78B7F;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.skills-tags span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #523600;
    backdrop-filter: blur(5px);
}

.cv-button {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    background: #ffffff;
    color: #674100;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.cv-button:hover {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

@media (max-width: 768px) {
    .profile-content {
        flex-direction: column;
        text-align: center;
    }

    .detail-item {
        flex-direction: column;
        text-align: center;
    }

    .decorative-line {
        margin: 1rem auto;
    }
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;;
}

.skill-card {
    background: var(--accent-color);
    padding: 2rem;
    display: flex;
    border: 2px solid var(--detail-color);
    border-radius: 15px;
    min-height: 250px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    border: 2px solid var(--secondary-color);
    flex-direction: column;
  justify-content: center;
  align-items: center;
}

.skill-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.skill-card:hover {
    transform: translateY(-5px) rotate(2deg);
    box-shadow: 5px 5px 15px rgba(107, 79, 79, 0.1);
}

.social {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #000000;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.social-icon {
    font-size: 2rem;
    color: white;
    transition: all 0.3s;
    padding: 1rem;
    border-radius: 50%;
}

.social-icon:hover {
    color: var(--secondary-color);
    transform: scale(1.2);
    background: rgba(255, 255, 255, 0.1);
}

.coffee-credit {
    margin-top: 3rem;
    font-family: 'Courier New', monospace;
    opacity: 0.8;
}

/* Animaciones adicionales */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.social-icon {
    animation: float 3s ease-in-out infinite;
}

.skill-card:nth-child(odd) {
    animation: float 4s ease-in-out infinite;
}

.skill-card:nth-child(even) {
    animation: float 5s ease-in-out infinite;
}

.skill-card,
.project-card,
.hobby-card {
    position: relative;
    overflow: hidden;
}

.skill-card::before,
.project-card::before,
.hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
            transparent 25%,
            rgba(167, 139, 127, 0.1) 25%,
            rgba(167, 139, 127, 0.1) 50%,
            transparent 50%,
            transparent 75%,
            rgba(167, 139, 127, 0.1) 75%);
    background-size: 4px 4px;
    pointer-events: none;
}

/* Animación de café humeante */
@keyframes coffee-steam {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translateY(-50px) scale(1.2);
    }
}

.coffee-steam {
    position: relative;
    display: inline-block;
}

.coffee-steam::after {
    content: '☕';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    animation: coffee-steam 3s infinite;
}


.project-card {
    perspective: 1000px;
    position: relative;
    height: 400px;
    /* Ajusta según tus necesidades */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
  justify-content: space-between;
}



.info-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    background: #2c3e50;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
  }

.info-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Media Queries para dispositivos móviles */
@media (max-width: 768px) {
    .skill-card {
      padding: 1.5rem;
    }
    
    .project-card {
      height: 350px;
    }
    
    .project-image {
      height: 150px;
    }
    
    .card-back h3 {
      font-size: 1.2rem;
    }
    
    .card-back p {
      font-size: 0.9rem;
    }
  }
  
  @media (max-width: 480px) {
    .skills-grid,
    .projects-grid {
      grid-template-columns: 1fr;
    }
    
    .project-card {
      height: 300px;
      margin: 0 10px;
    }
    
    .info-btn {
      padding: 0.6rem 1.5rem;
      font-size: 0.9rem;
    }
    
    .card-back button {
      align-self: center;
    }
  }

  /* Asegurar que las imágenes se ajusten */
.project-image {
    background-size: cover;
    background-position: center;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
  }