/* =====================================================
   PORTAFOLIO DE SITIOS WEB - RONNY FELIZ
   Versión refinada con animaciones y efectos de color
   ===================================================== */

:root {
  --azul-oscuro: #2b4cb8; /* Azul más claro y vibrante */
  --azul-claro: #4d94ff;
  --verde-resalte: #00ff99;
  --fondo-principal: #0e1421;
  --texto-claro: #ffffff;
  --gris-suave: #b3b3b3;
  --sombra-suave: 0 4px 20px rgba(0, 0, 0, 0.4);
  --transicion: 0.3s ease;
}

/* ---------- Reset ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ---------- Base ---------- */
body {
  font-family: 'Poppins', sans-serif;
  color: var(--texto-claro);
  background: radial-gradient(circle at top, #1a1a1c, #101016);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ---------- HEADER ---------- */
header {
  background: linear-gradient(90deg, var(--azul-oscuro), var(--azul-claro));
  color: white;
  text-align: center;
  padding: 15px 0;
  position: relative;
  box-shadow: var(--sombra-suave);
  z-index: 10;
  transition: all 0.4s ease;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(0, 0, 0, 0.3);
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}

/* Agrandamiento hacia arriba del título principal */
header h1:hover {
  transform: scale(1.15) translateY(-5px);
  text-shadow: 0 0 20px var(--verde-resalte);
}

/* ---------- NAVEGACIÓN ---------- */
nav {
  margin-top: 15px;
}

nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  transition: all var(--transicion);
}

nav ul li a {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 500;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
}

/* Efecto hover: fondo verde, texto azul */
nav ul li a:hover {
  background: var(--verde-resalte);
  color: var(--azul-oscuro);
  transform: translateY(-3px);
  box-shadow: 0 0 15px rgba(0, 255, 160, 0.5);
}

/* ---------- MAIN / PORTAFOLIO ---------- */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 20% 20%, #11131a, #0c0e13);
  padding: 60px 20px;
  position: relative;
}

/* Luz suave flotante */
main::before {
  content: "";
  position: absolute;
  top: -50px;
  left: -50px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(0, 255, 200, 0.15), transparent 70%);
  animation: moverLuz 10s infinite alternate;
  z-index: 0;
}
@keyframes moverLuz {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60vw, 40vh); }
}

/* ---------- PORTAFOLIO BOX ---------- */
.portfolio {
  position: relative;
  z-index: 1;
  background: var(--fondo-principal);
  border-radius: 14px;
  padding: 40px;
  text-align: center;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
  width: 90%;
  max-width: 700px;
  transition: transform var(--transicion), box-shadow var(--transicion);
}

.portfolio:hover {
  transform: scale(1.02);
  box-shadow: 0 0 40px rgba(0, 255, 200, 0.15);
}

.portfolio h2 {
  color: var(--verde-resalte);
  font-size: 2rem;
  margin-bottom: 10px;
  text-shadow: 0 0 10px rgba(0, 255, 200, 0.3);
  transition: transform 0.4s ease, text-shadow 0.4s ease;
}

/* Agrandamiento hacia arriba en el texto Bienvenido/a */
.portfolio h2:hover {
  transform: scale(1.15) translateY(-5px);
  text-shadow: 0 0 20px var(--verde-resalte);
}

/* Texto descriptivo */
.portfolio p {
  color: var(--gris-suave);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 25px;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

/* Cambia a verde al pasar el mouse o hacer clic */
.portfolio p:hover {
  color: var(--verde-resalte);
}

/* Lista de proyectos */
.portfolio ul {
  list-style: none;
}

.portfolio li {
  background: rgba(255, 255, 255, 0.08);
  margin: 15px 0;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

/* Efecto de borde verde al pasar o hacer clic */
.portfolio li:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--verde-resalte);
  transform: translateY(-4px);
  box-shadow: 0 0 15px rgba(0, 255, 160, 0.3);
}

.portfolio a {
  display: block;
  padding: 14px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transicion);
}

.portfolio a:hover {
  color: var(--verde-resalte);
}

/* ---------- FOOTER ---------- */
footer {
  background: linear-gradient(90deg, var(--azul-oscuro), var(--azul-claro));
  color: #fff;
  text-align: center;
  padding: 20px 10px;
  box-shadow: var(--sombra-suave);
}

footer p {
  margin-bottom: 10px;
  font-size: 0.9rem;
}

footer ul {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
}

footer ul li a {
  color: white;
  text-decoration: none;
  transition: color var(--transicion);
  font-size: 0.95rem;
}

footer ul li a:hover {
  color: var(--verde-resalte);
}

/* ---------- HAMBURGUESA ---------- */
.hamburger {
  display: none;
  position: absolute;
  top: 18px;
  right: 20px;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 18px;
  cursor: pointer;
  z-index: 20;
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

#menu-toggle {
  display: none;
}

/* Animación de la X */
#menu-toggle:checked + .hamburger span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
#menu-toggle:checked + .hamburger span:nth-child(2) {
  opacity: 0;
}
#menu-toggle:checked + .hamburger span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* Mostrar menú al marcar */
#menu-toggle:checked ~ nav ul {
  display: flex;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  nav ul {
    display: none;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.95);
    position: absolute;
    top: 70px;
    right: 0;
    width: 100%;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  }

  nav ul li {
    margin: 10px 0;
  }

  nav ul li a {
    width: 80%;
    margin: auto;
    text-align: center;
    font-size: 1rem;
  }

  .portfolio {
    padding: 25px;
  }
}

/* ---------- Animación de fondo ---------- */
@keyframes backgroundMove {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
/* === RELOJ === */
#clock {
  font-size: 0.95rem;
  color: var(--accent);
  margin-left: 1rem;
  font-weight: 500;
  letter-spacing: 1px;
  animation: fadeIn 1.5s ease;
}

/* === BOTÓN DARK MODE === */
#dark-mode-toggle {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 12px;
  margin-left: auto;
  margin-right: 10px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
#dark-mode-toggle:hover {
  background: #3cff83;
  color: #222;
  transform: scale(1.1);
}

/* === EFECTOS DE ANIMACIÓN === */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-title {
  animation: slideUp 1.2s ease forwards;
}
.animate-text {
  animation: floatUp 1.2s ease-in-out infinite alternate;
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes floatUp {
  from { transform: translateY(0); }
  to { transform: translateY(-10px); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* === EFECTO AL PASAR EL MOUSE SOBRE PÁRRAFO === */
.highlight-hover:hover {
  color: var(--accent);
  transition: color 0.4s ease;
}

/* === DARK MODE === */
body.dark-mode {
  background-color: #0f111a;
  color: #e4e4e4;
}

body.dark-mode header {
  background-color: rgba(25, 28, 39, 0.95);
}

body.dark-mode nav ul li a {
  color: #9fcfff;
}

body.dark-mode footer {
  background-color: #11131c;
}

body.dark-mode #dark-mode-toggle {
  background: #3cff83;
  color: #222;
}
