/*TEMAS */

:root {
    --primary-color: #00A9FF;
    --secondary-color: #89CFF3;
    --bg-color: #F0FAFF;
    --accent-color: #A0E9FF;
    --text-color: #17153B;
    --border-color: #03346E;
    --footer-bg-color: #89CFF3;
    --footer-text-color: #17153B;
}

[data-theme="dark"] {
    --bg-color: #021526;
    --accent-color: #004A69;
    --text-color: #F4F8D3;
    --primary-color: #03346E;
    --secondary-color: #004A69;
    --border-color: #FFF4B7;
    --footer-bg-color: #A0E9FF;
    --footer-text-color: #17153B;
}


/* GENERAL */

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

html {
    scroll-behavior: smooth;
}

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


/* LETRAS */

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 2.5rem;
    margin: 1rem 0 0.5rem;
}

h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.subtitle,
.nav-links a,
button {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
}

.subtitle {
    font-size: 1.2rem;
    letter-spacing: 0.3px;
}

.nav-links a {
    font-size: 1.1rem;
    letter-spacing: 0.2px;
}


/* HEADER */

header {
    position: relative;
    text-align: center;
    padding: 2rem 1.5rem 0;
    z-index: 1;
}

.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 100;
}

.theme-toggle button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.7;
    transition: opacity 0.3s;
}

.theme-toggle button[data-selected] {
    opacity: 1;
}


/* NAV */

[data-theme="dark"] .nav-container {
    box-shadow: 0 2px 8px rgba(255,255,255,0.1);
}

.nav-container {
    background: var(--accent-color);
    backdrop-filter: blur(8px);
    border: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
    padding: 1rem;
    width: auto;
    background: var(--accent-color);
    border-radius: 15px;
    margin: 1rem auto;
    max-width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 999;
    transition: transform 0.3s ease;
}


.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    width: max-content;
}

.nav-links a {

    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* MENÚ */ 
.hamburger {
    display: block;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 4px 0;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* LOGO */

.logo-img {
    width: clamp(140px, 40vw, 300px);
    height: auto;
    margin: 2rem auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
    display: block;
}
/*.logo-img {
    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 2rem auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
    display: block;
}*/

.logo-img:hover {
    transform: rotate(360deg) scale(1.1);
    cursor: pointer;
}


/* Etiqueta prácticas */

.name-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 1rem;
}

.badge-practicas {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--bg-color);
  background-color: var(--primary-color);
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.badge-practicas {
  animation: badge-pulse 3s ease-in-out infinite;
  animation-delay: 1s;
}
.badge-practicas:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

[data-theme="light"] .badge-practicas {
  color: var(--text-color) !important;
}

[data-theme="dark"] .badge-practicas {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

/* SECTIONS */

section {
    padding: 4rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}


/* SOBRE MÍ */

.about-container {
    display: flex;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.about-img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden; 
    margin: 0 1.5rem 1.5rem 0;
    position: relative;
    flex-shrink: 0; 
}
.about-container p {
    text-align: justify;
    hyphens: auto;
    line-height: 1.7;
    padding: 0.5rem;
    max-width: 600px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    transition: transform 0.3s ease;
    border: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 50%;
}

.profile-img:hover {
    transform: scale(1.1);
    border-color: rgba(52, 152, 219, 0.7);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    filter: drop-shadow(0 0 6px rgba(52, 152, 219, 0.3));
}

.about-cv-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .about-cv-btn {
    background: var(--secondary-color) !important; 
    border-color: var(--border-color) !important;
}

.cv-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--primary-color);
  color: white !important;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
}

.cv-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.cv-btn i {
  font-size: 1.2rem;
}

.cv-btn:hover i {
  animation: bounce 0.5s ease infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

.about-cv-btn:active {
    animation: pulse 0.3s ease;
}

.inline-cv-btn {
    margin: 1.5rem 0 0 1.5rem;
    width: fit-content;
    clear: both; 
}

.compact-cv-btn {
    background: var(--accent-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}


.compact-cv-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.1);
}

/* TECNOLOGÍAS */

.skills-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem;
}

.skill-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}


/* PROYECTOS */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

.project-card {
    padding: 1.5rem;
    background-color: var(--accent-color);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s, transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
    color: var(--text-color);
    font-weight: 600;
    opacity: 0.9;
    text-decoration: none !important;
    transition: color 0.3s ease, transform 0.3s ease;
}
  .projects-grid .project-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }

  [data-theme="dark"] .projects-grid .project-card {
    box-shadow: 0 4px 12px rgba(255,255,255,0.08);
  }

  [data-theme="dark"] .project-card:hover h3 {
    color: #FFF4B7 !important;
  }

  [data-theme="light"] .project-card h3 {
    color: #03346E;
  }

  [data-theme="light"] .project-card:hover h3 {
    color: #00A9FF;
  }

.project-card:hover h3 {
    color: var(--secondary-color);
    transform: translateX(5px);
    opacity: 1;
}

.project-card p {
    color: var(--text-color);
    opacity: 0.8;
    transition: opacity 0.3s ease;

}

.project-card:hover p {
    opacity: 1;
}

.project-card a::after {
  content: " ↗";
  transition: transform 0.25s ease;
  color: var(--text-color);
  text-decoration: none; 
  display: inline-block;   

}

.project-card a:hover::after {
  transform: translateX(4px);
}


.project-card a {
  text-decoration: none;
  font-weight: 700;
  color: inherit;
  text-decoration: underline;
  text-decoration-color: currentColor;
  text-decoration-thickness: 1.5px;

}


#cursos .project-card,
.project-card,
.skill-item,
.badge-practicas
{
  border: 2px solid var(--border-color) !important;
  background: var(--accent-color) !important;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


/* CURSOS Y CERTIFICACIONES*/

#cursos {
  padding: 4rem 1rem;
  text-align: center;
}

#cursos h2 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.curso-card {
  background-color: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.curso-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.curso-card__img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #fff;
}

.curso-card__info {
  padding: 1rem;
}

.curso-card__info h3 {
  font-size: 1.1rem;
  margin: 0.5rem 0;
  color: var(--text-primary);
}

.curso-card__info p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.curso-card__info a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.curso-card__info a:hover {
  background-color: var(--accent-hover);
}

  #cursos .compact-cv-btn {
  display: inline-block;
  margin-top: 0.75rem;
}

#cursos-certificados .project-card a::after {
  content: none;
}

/* CONTACTO */

.contact-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    padding: 1rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.contact-item i {
    font-size: 2.5rem;
    color: var(--border-color);
}

.contact-item a {
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-item a:hover {
    color: var(--primary-color);
}


/* Iconos contacto*/

.contact-item a {
    color: var(--text-color);
    transition: transform 0.3s;
}

.contact-item a:hover {
    transform: scale(1.1);
}
[data-theme="dark"] .contact-address {
    color: #F4F8D3 !important;
}

.contact-address {
    font-size: 0.9em;
    margin-top: 0.5rem;
    color: inherit !important;
    opacity: 0.8 !important;
}

[data-theme="dark"] .contact-address {
    opacity: 0.7;
}

/* FORMULARIO */

#contact-form {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1rem;
}

input,
textarea {
    width: 100%;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: var(--accent-color);
    border: 2px solid var(--border-color);
    color: var(--text-color);
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
}

button[type="submit"] {
    background: var(--primary-color);
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    background: var(--secondary-color);
}


/* FOOTER */

footer {
    background-color: var(--footer-bg-color);
    color: var(--text-color);
    padding: 1rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
}

.footer-links {
    color: var(--text-color);

    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0.5rem 0;
}

.footer-links a {
    color: white;
    font-size: 1.2rem;
}

.legal {
    font-size: 0.75rem;
    margin-top: 0.5rem;
}


/* MODO OSCURO */

[data-theme="dark"] input,
[data-theme="dark"] textarea {
    background: #012A4A;
    border: 2px solid #005F73;
    color: #F4F8D3;
}

[data-theme="dark"] footer {
    background-color: #013A63;
    color: #DEE2E6;
}

[data-theme="dark"] .skill-item,
[data-theme="dark"] .project-card {
    background-color: var(--secondary-color);
    border: 2px solid var(--footer-text-color);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.08);
}


/* MEDIA QUERIES */

/* Móvil pequeño (hasta 350px) */
@media (max-width: 350px) {
  .skills-container {
    grid-template-columns: 1fr;
  }
}

/* Móvil "normal" (hasta 400px) */
@media (max-width: 400px) {
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
  }
  .skill-item {
    padding: 1rem;
    min-height: auto;
  }
  .contact-item a {
    font-size: 1rem;
  }
}

/* Móvil medio (hasta 480px) */
@media (max-width: 480px) {
  .hamburger {
    display: block;
  }
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  .nav-links.active,
  .nav-container.active .nav-links {
    display: flex;
  }
}

/* Tablet pequeña (hasta 500px) */
@media (max-width: 500px) {
  .skills-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0.5rem;
  }
  .skill-item {
    padding: 1rem;
    min-height: 100px;
  }
  .skill-item span {
    font-size: 0.9rem;
  }
}

/* Tablet (hasta 570px) */
@media (max-width: 570px) {
  .nav-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    width: 100%;
  }
  .nav-links li {
    text-align: center;
  }
  .nav-links a {
    padding: 0.5rem 1rem;
    text-align: left;
    font-size: 1rem;
  }
}

/* Tablet grande (hasta 768px) */
@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }
  .about-img {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.2rem;
  }
  .nav-container {
    position: fixed;
    top: 0;
    left: -100%;
    height: 100vh;
    width: 250px;
    background: var(--accent-color);
    padding: 2rem;
    flex-direction: column;
    justify-content: flex-start;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }
  .nav-container.active {
    left: 0 !important;
  }
  .nav-links {
    flex-direction: column;
    margin-top: 3rem;
    width: 100%;
  }
  .nav-links a {
    padding: 1rem;
    font-size: 1.2rem;
    text-align: left;
  }
  .theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
  }
  .hamburger {
    display: block;
    background: var(--accent-color);
  }
  .logo-img {
    margin-top: 1.5rem;
    width: clamp(130px, 25vw, 180px);
}
  h1 {
    font-size: 2rem;
  }
  header {
    padding-top: 6rem;
  }
  .cv-download {
    top: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
  }
  .cv-btn span {
    display: none;
  }
  .cv-btn {
    padding: 0.6rem;
  }
  .about-cv-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
  .about-cv-btn i {
    font-size: 1rem;
  }
  .inline-cv-btn {
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
  }
  .compact-cv-btn {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
  }
}

/* Desktop pequeño (769px en adelante) */
@media (min-width: 769px) {
  .hamburger {
    display: none !important;
  }
  .nav-container {
    display: none;
  }
  .cv-btn span {
    display: inline-block;
  }
  .about-container {
    display: flex;
    gap: 2rem;
  }
  .about-content {
    flex: 1;
    display: flex;
    flex-direction: column;
  }
}

/* Pantallas grandes */
@media (min-width: 860px) {
  .name-with-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

@media (min-width: 769px) and (max-width: 1023px) {
  #cursos .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (min-width: 1024px) {
  #cursos .projects-grid {
    display: grid !important; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 1.25rem;   
  }
}

#cursos .project-card {
  padding: 1rem;  
  border-radius: 10px;
  background: var(--accent-color);
  border: 2px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

#cursos .project-card h3 {
  
  margin-bottom: 0.35rem;
  line-height: 1.25;
}

#cursos .project-card .compact-cv-btn {
  padding: 0.35rem 0.50rem;
  gap: 0.5rem;
}


#cursos .projects-grid {
 gap: 1rem;
}

#cursos .project-card a::after {
  content: none !important;
}
