/* ===============================================
   ELENA LÓPEZ GAMBÍN — PORTFOLIO · DARK MODE
   =============================================== */

html {
  scroll-behavior: smooth;
}

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

:root {
  --primary:       #641c34;
  --primary-light: #8c2749;
  --accent:        #fecaca;
  --bg:            #0e0e0e;
  --bg-alt:        #111111;
  --card-bg:       #1a1a1a;
  --text:          #e0e0e0;
  --text-muted:    #9a9a9a;
}

body {
  font-family: "Space Mono", "Courier New", monospace;
  background-color: var(--bg);
  color: var(--text);
}

/* ===== SECTION UTILITIES ===== */
.section-padding {
  padding: 100px 0;
}

.section-header .section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0;
}

.section-line {
  width: 56px;
  height: 4px;
  background: var(--accent);
  margin: 14px auto 0;
  border-radius: 2px;
}

.section-line-accent {
  background: var(--accent);
}

/* ===== REVEAL ANIMATION ===== */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ===== NAVBAR ===== */
.navbar {
  background-color: #0a0a0a;
  padding: 10px 0;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.nav-link {
  color: rgba(224, 224, 224, 0.8) !important;
  margin-left: 18px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
  position: relative;
  padding-bottom: 4px !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent) !important;
}

.navbar-dark .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

/* ===== HERO ===== */
.hero-section {
  background-image: url("../images/fondo-hero5.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-greeting {
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.6);
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--accent);
  min-height: 2.2rem;
  margin-bottom: 18px;
}

.typing-cursor {
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-desc {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.95rem;
  max-width: 540px;
  margin: 0 auto 10px;
  line-height: 1.7;
}

.hero-buttons .btn {
  padding: 13px 30px;
  font-weight: 700;
  letter-spacing: 1px;
}

.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator a {
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.4rem;
  text-decoration: none;
  display: block;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(8px); }
}

/* ===== BUTTONS ===== */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  padding: 12px 28px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(100, 28, 52, 0.5);
}

.btn-outline-light:hover {
  transform: translateY(-2px);
}

.btn-outline-secondary {
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.btn-outline-secondary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

/* ===== SOBRE MÍ ===== */
#acerca {
  background-color: var(--bg-alt);
  color: var(--text);
}

.profile-img-wrapper {
  display: inline-block;
}

.profile-img {
  border-radius: 20px;
  border: 4px solid var(--primary);
  box-shadow: 0 20px 60px rgba(100, 28, 52, 0.3);
  max-width: 380px;
  width: 100%;
  transition: transform 0.35s ease;
}

.profile-img:hover {
  transform: scale(1.025) rotate(1deg);
}

#acerca h3 {
  color: var(--accent);
  font-weight: 700;
}

#acerca p {
  color: var(--text);
}

#acerca .text-muted {
  color: var(--text-muted) !important;
}

/* ===== HABILIDADES ===== */
.skills-section {
  background-color: var(--bg);
}

.skill-card {
  padding: 28px 12px 20px;
  border-radius: 16px;
  background: var(--card-bg);
  border: 2px solid #2a2a2a;
  transition: all 0.3s ease;
  cursor: default;
}

.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(254, 202, 202, 0.08);
}

.skill-icon {
  font-size: 2.6rem;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.skill-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: var(--text);
  text-transform: uppercase;
}

/* ===== PROYECTOS ===== */
.proyectos-section {
  background-image: url("../images/fondo-hero5.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.proyectos-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.76);
}

.proyectos-section .container {
  position: relative;
  z-index: 1;
}

.projects-tag {
  color: var(--accent) !important;
}

.proyectos-section h2 {
  color: #fff !important;
}

/* Cards */
.project-card {
  border-radius: 16px !important;
  overflow: hidden;
  background-color: var(--card-bg);
  color: var(--text);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55) !important;
}

.card-img-wrapper {
  position: relative;
  overflow: hidden;
}

.card-img-top {
  height: 340px;
  width: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project-card:hover .card-img-top {
  transform: scale(1.08);
}

.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(100, 28, 52, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.card-title {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}

.card-text {
  font-size: 0.83rem;
  color: #aaa;
  line-height: 1.55;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 10px;
}

.tech-tag {
  background: rgba(254, 202, 202, 0.12);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1px solid rgba(254, 202, 202, 0.25);
}

/* ===== CAROUSEL PROYECTOS ===== */
.proyecto-control {
  width: 48px;
  height: 48px;
  top: 50%;
  transform: translateY(-60%);
  background: rgba(100, 28, 52, 0.75);
  border-radius: 50%;
  border: 2px solid rgba(254, 202, 202, 0.3);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.proyecto-control:hover {
  background: var(--primary);
  border-color: var(--accent);
}

.proyecto-arrow {
  font-size: 1rem;
  color: #fecaca;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proyecto-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(254, 202, 202, 0.4);
  border: none;
  margin: 0 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.proyecto-indicators .active {
  background-color: var(--accent);
  transform: scale(1.3);
}

/* ===== CONTACTO ===== */
#contacto {
  background-color: var(--bg-alt);
  color: var(--text);
}

#contacto .text-muted {
  color: var(--text-muted) !important;
}

.form-control {
  border-radius: 8px;
  border: 2px solid #2d2d2d;
  padding: 12px 15px;
  background-color: var(--card-bg);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(254, 202, 202, 0.12);
  background-color: var(--card-bg);
  color: var(--text);
  outline: none;
}

.form-control::placeholder {
  color: #555;
}

.form-label {
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 0.9rem;
}

/* ===== BTN-FANCY (Uiverse ripple style) ===== */
.btn-fancy {
  display: inline-block;
  font-size: 1rem;
  line-height: 1.5;
  padding: .375rem 1.5rem;
  font-weight: 600;
  background: var(--primary);
  color: #fecaca;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  border-radius: 0.6em;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  vertical-align: middle;
  transition: transform 0.1s ease;
}

.btn-fancy .btn-ripple {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
  transition-duration: 500ms;
  background-color: rgba(254, 202, 202, 0.3);
  border-radius: 9999px;
  width: 0;
  height: 0;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.btn-fancy:hover .btn-ripple {
  width: 14em;
  height: 14em;
}

.btn-fancy .btn-shine {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border-radius: 0.6em;
  margin-top: -0.25em;
  background-image: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0), rgba(0,0,0,0.2));
  pointer-events: none;
}

.btn-fancy .btn-label {
  position: relative;
  top: -1px;
}

.btn-fancy:active {
  transform: scale(0.97);
}

.btn-fancy-lg {
  font-size: 1.25rem;
  padding: 0.5rem 1.5rem;
}

.btn-fancy:hover {
  color: #fecaca;
  text-decoration: none;
}

/* LinkedIn variant */
.btn-fancy-linkedin {
  background: #0a66c2;
  color: #fff;
}

.btn-fancy-linkedin .btn-ripple {
  background-color: rgba(255, 255, 255, 0.25);
}

.btn-fancy-linkedin:hover,
.btn-fancy-linkedin:focus {
  color: #fff;
}

/* ===== LINKEDIN CARD ===== */
.linkedin-card {
  background: var(--card-bg);
  border-radius: 16px;
  border: 1px solid rgba(254, 202, 202, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.linkedin-icon {
  font-size: 3rem;
  color: #0a66c2;
  line-height: 1;
}

.linkedin-card h5 {
  font-weight: 700;
  color: var(--text);
}

.btn-linkedin {
  background-color: #0a66c2;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 10px 20px;
  transition: background-color 0.25s ease, transform 0.2s ease;
}

.btn-linkedin:hover {
  background-color: #004182;
  color: #fff;
  transform: translateY(-2px);
}

.linkedin-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== FOOTER ===== */
footer {
  background-color: #000 !important;
  color: var(--text);
}

.footer-logo {
  max-width: 110px;
  filter: brightness(1.3);
}

footer h5 {
  color: var(--accent) !important;
  font-weight: 700;
}

.footer-subtitle {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.85rem;
}

.footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

.footer-copy {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
}

.social-links a {
  display: inline-block;
  margin-left: 8px;
  text-decoration: none;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.social-links a img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  filter: brightness(0.9);
}

.social-links a:hover {
  transform: translateY(-4px) scale(1.15);
  filter: drop-shadow(0 4px 8px rgba(254, 202, 202, 0.4));
}

/* ===== SWITCH MODO OSCURO ===== */
.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 3.5em;
  height: 2em;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #223243;
  transition: 0.4s;
  border-radius: 30px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 1.4em;
  width: 1.4em;
  border-radius: 50%;
  left: 0.3em;
  bottom: 0.3em;
  background-color: #223243;
  box-shadow: inset 2px -2px 0 1.8px #fff;
  transition: 0.4s;
  animation: anima1 0.3s linear;
}

@keyframes anima1 {
  0%   { transform: translateX(1.5em); }
  80%  { transform: translateX(-0.3em); }
  100% { transform: translateX(0); }
}

.switch input:checked + .slider::before {
  background-color: #ffb409;
  box-shadow: none;
  transform: translateX(1.5em);
  animation: anima 0.3s linear;
}

@keyframes anima {
  0%   { transform: translateX(0); }
  80%  { transform: translateX(1.6em); }
  100% { transform: translateX(1.4em); }
}

/* ===== SCROLL PROGRESS BAR ===== */
#scrollProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--primary), #e05a7a, var(--accent));
  z-index: 9999;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* ===== NAVBAR BLUR ON SCROLL ===== */
.navbar-scrolled {
  background-color: rgba(5, 5, 5, 0.88) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
}

/* ===== HERO TITLE GRADIENT ===== */
.hero-title {
  background: linear-gradient(135deg, #ffffff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== PROFILE IMAGE — ANIMATED BORDER ===== */
.profile-img-wrapper {
  display: inline-block;
  padding: 5px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary), #e05a7a, var(--accent), var(--primary));
  background-size: 300% 300%;
  animation: gradientBorder 4s ease infinite;
  box-shadow: 0 10px 40px rgba(254, 202, 202, 0.15);
}

@keyframes gradientBorder {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.profile-img {
  border: none !important;
  box-shadow: none !important;
  border-radius: 20px !important;
}

/* ===== STATS ===== */
.about-stats {
  border-top: 1px solid rgba(254, 202, 202, 0.15);
  padding-top: 20px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== SKILL ICON COLORS ===== */
.skill-html:hover  { border-color: #e34c26 !important; box-shadow: 0 14px 32px rgba(227,76,38,0.2) !important; }
.skill-css:hover   { border-color: #264de4 !important; box-shadow: 0 14px 32px rgba(38,77,228,0.2) !important; }
.skill-js:hover    { border-color: #f7df1e !important; box-shadow: 0 14px 32px rgba(247,223,30,0.2) !important; }
.skill-php:hover   { border-color: #8892be !important; box-shadow: 0 14px 32px rgba(136,146,190,0.2) !important; }
.skill-mysql:hover { border-color: #00758f !important; box-shadow: 0 14px 32px rgba(0,117,143,0.2) !important; }
.skill-bootstrap:hover { border-color: #7952b3 !important; box-shadow: 0 14px 32px rgba(121,82,179,0.2) !important; }
.skill-wordpress:hover { border-color: #21759b !important; box-shadow: 0 14px 32px rgba(33,117,155,0.2) !important; }
.skill-git:hover   { border-color: #f14e32 !important; box-shadow: 0 14px 32px rgba(241,78,50,0.2) !important; }
.skill-python:hover { border-color: #3776ab !important; box-shadow: 0 14px 32px rgba(55,118,171,0.2) !important; }

.skill-html .skill-icon  { color: #e34c26; }
.skill-css .skill-icon   { color: #4d7fe8; }
.skill-js .skill-icon    { color: #f7df1e; }
.skill-php .skill-icon   { color: #aab0d4; }
.skill-mysql .skill-icon { color: #00a8cc; }
.skill-bootstrap .skill-icon { color: #a07ee0; }
.skill-wordpress .skill-icon { color: #4ba3cc; }
.skill-git .skill-icon   { color: #f14e32; }
.skill-python .skill-icon { color: #5ca0d8; }

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary), #e05a7a);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ===== SECTION H2 SUBTLE GRADIENT ===== */
.section-header h2 {
  background: linear-gradient(135deg, var(--accent) 0%, #ffb3c6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: unset !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
  .section-padding {
    padding: 70px 0;
  }
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin-bottom: 12px;
  }
  .hero-buttons .me-3 {
    margin-right: 0 !important;
  }
  .about-stats {
    gap: 20px !important;
  }
}
