/* Global typography
   - Keep to two fonts across the whole site for consistent cross-device rendering.
   - Loaded from Google Fonts in index.html.
*/

* {
  margin: 0px;
  padding: 0px;
}
.row {
  --bs-gutter-x: 0rem;
}
body {
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 300;
  line-height: 1.55;
}

h2 {
  font-size: 2.2rem;
}
h3 {
  font-size: 2.5rem;
}
h4 {
  font-size: 2rem;
}
h5 {
  font-size: 2rem;
}
h1,
h2,
h3,
h4,
h5 {
  font-weight: 300;
  line-height: 1.15;
}
p {
  font-size: 1.7rem;
  line-height: 1.75;
}
.formContacto,
input,
textarea,
.buttonForm {
  font-family: "Cousine", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400 !important; /* avoid inherited bold/faux weights */
  font-synthesis: none; /* prevent faux bold that makes Cousine look heavier than Consolas */
  border: none;
}

/* Baseline tuning for Cousine: it tends to sit slightly "high" vs Consolas in padded UI. */
.formContacto .form-control {
  font-size: 1.2rem !important;
  line-height: 1.5;
  padding-top: calc(0.375rem + 1px);
  padding-bottom: 0.375rem;
}

.buttonForm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  padding-top: calc(0.375rem + 1px);
  padding-bottom: 0.375rem;
}

footer {
  font-size: 1.15rem;
}

footer a:hover {
  color: gray !important;
}

.sectionTitle {
  font-size: 3rem;
}
.buttonType {
  font-size: 1.2rem !important;
  transition: background-color 0.3s;
}
.buttonType:hover {
  background-color: rgb(39, 39, 39) !important;
}

.main-wrapper {
  overflow-x: clip;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
}

#home {
  padding: 3rem;
  margin-top: 5rem;
  padding-bottom: 15rem;
  position: relative;
  isolation: isolate;
  background-color: #000;
  min-height: 80vh;
  height: auto;
  scroll-margin-top: 50px;
}
/* Keep hero content above the background layer */
#home > * {
  position: relative;
  z-index: 1;
}

/* Hero background image layer (starts hidden to avoid pre-fade flashing) */
#home::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../img/Hero_Andres_Rojas.webp");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 0px var(--hero-bg-pos-y, -50px);
  opacity: 0;
  transition: opacity 0.7s ease-out;
}

/* Reveal only the background when the image is loaded */
#home.hero-loaded::before {
  opacity: 1;
}

@media (max-width: 1200px) {
  #home::before {
    background-position: center center;
  }
}
.nav-link {
  font-size: 1.5rem;
  margin: 0.8rem;
  color: whitesmoke !important;
}
.navbar-brand {
  font-family: "Cousine", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace !important;
  font-weight: 400 !important;
  font-synthesis: none;
  line-height: 1.1;
}

.navbar-brand h1 {
  margin: 0;
  line-height: 1;
  position: relative;
  top: 1px;
}
.bg-dark {
  background-color: black !important;
}

#projects,
#about,
#virtual-instruments,
#contact {
  padding: 3rem;
  scroll-margin-top: 50px;
}

.buttonType {
  font-size: 1rem;
  background-color: rgb(16, 16, 16);
  color: white;
  margin: 1rem 0rem;
  margin-right: 1rem;
  width: 9rem;
}

.buttonForm {
  font-size: 1rem;
  background-color: rgb(16, 16, 16);
  color: white;
  margin: auto;
  width: 16rem;
}

.song {
  /* max-width: 300px !important; */
  max-height: 300px !important;
}

.formContacto input,
.formContacto textarea,
.formContacto button {
  margin: 1rem;
}

footer a {
  text-decoration: none;
  color: whitesmoke;
}

.project-item {
  transition: transform 0.4s;
}
.project-item:hover {
  transform: scale(1.05);
  transition: transform 0.4s;
  cursor: pointer;
}

.slideRight {
  animation-name: slideRight;
  -webkit-animation-name: slideRight;
  animation-duration: 1s;
  -webkit-animation-duration: 1s;
  visibility: visible;
}

.typing {
  /* Starts after name finishes (~1.3s) */
  animation:
    type 1.5s steps(30, end) 1.4s both,
    blink 0.75s step-end 1.4s infinite normal both;

  overflow: hidden !important;
  white-space: nowrap !important;
  border-right: 3px solid #fff;
  width: fit-content;
  max-width: 0;
}
.typing2-wrapper {
  display: inline-block;
  vertical-align: middle;
  overflow: hidden !important;
  white-space: nowrap !important;
  border-right: 3px solid transparent;
  width: fit-content;
  max-width: 0;
  animation:
    type-unified 0.8s steps(23, end) 0.5s both,
    blink 0.75s step-end 0.5s infinite;
}

.typing2-part1, 
.typing2-part2 {
  font-size: 2.7rem;
  font-family: "Cousine", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
  font-synthesis: none;
  display: inline-flex;
  align-items: center;
  vertical-align: bottom;
  line-height: 1;
  position: relative;
  top: 1px;
}

/* Specific paddings to avoid double-padding in the middle on Desktop */
.typing2-part1 {
  padding-right: 0 !important;
}
.typing2-part2 {
  padding-left: 0 !important;
}

@keyframes type-unified { from { max-width: 0; } to { max-width: 100%; } }
@keyframes type-part1 { from { max-width: 0; } to { max-width: 100%; } }
@keyframes type-part2 { from { max-width: 0; } to { max-width: 100%; } }

@keyframes cursor-part1 {
  from { border-right: 3px solid #fff; } 
  to { border-right: none !important; }
}

@keyframes blink {
  from, to { border-right-color: transparent; }
  50% { border-right-color: #ffffff; }
}
.modal-content {
  background-color: black !important;
  color: whitesmoke;
}
.modal {
  background-color: rgba(0, 0, 0, 0.733) !important;
  color: gray !important;
}
.modal-header,
.modal-footer {
  border-color: black !important;
  font-family: "Cousine", ui-monospace, SFMono-Regular, Menlo, Monaco, "Liberation Mono", "Courier New", monospace;
  font-weight: 400;
  font-synthesis: none;
  line-height: 1.25;
}

.modal-header *,
.modal-footer * {
  position: relative;
  top: 1px;
}

.modal-header .btn-close {
  top: 0;
}
.modal hr {
  color: black !important;
}

.btn-close {
  background-color: rgb(113, 113, 113) !important;
  opacity: 1;
}

.btn-video {
  width: 100%;
  background-color: rgb(39, 39, 39);
  color: whitesmoke;
  text-align: start;
  transform: scale(1);
  transition: transform 0.3s, background-color 0.5s;
}
.btn-video:hover {
  background-color: rgb(54, 54, 54);
  color: whitesmoke;
  transform: scale(1.003);
}
.btn-video:focus {
  box-shadow: none !important;
}
.active {
  background-color: rgb(113, 113, 113);
  color: whitesmoke;
}

.cta {
  transform: scale(1);
  transition: transform 1s;
  transition: background-color 0.3s;
  background-color: rgb(39, 39, 39) !important;
}
.cta:hover {
  background-color: rgb(64, 64, 64) !important;
  transform: scale(1.02);
}
.buttonForm {
  background-color: rgb(39, 39, 39) !important;
  transition: background-color 0.4s;
}
.buttonForm:hover {
  background-color: rgb(64, 64, 64) !important;
}

@keyframes slideRight {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }
  100% {
    opacity: 1;
    transform: translateX(0%);
  }
}

@keyframes type {
  from {
    max-width: 0;
  }
  to {
    max-width: 100%;
  }
}

/* Cursor animation is now handled by the updated 'blink' keyframes above */

/* Estado inicial (cuando el modal está oculto) */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: scale(0.8);
}

/* Estado final (cuando el modal se muestra) */
.modal.show .modal-dialog {
  transform: scale(1);
}
body.modal-open {
  overflow: hidden !important;
}

#mobile-aarv {
  margin-bottom: 4rem;
}
/* Removed unused .btn-glow gradient keyframe variant */
/* Efecto opcional: un pequeño aumento al presionar */
.btn-glow:active {
  transform: scale(0.96);
}
.btn-glow:focus {
  box-shadow: none !important;
}
.cta,
.btn-glow {
  min-width: 170px; /* Ajusta este valor a tu gusto */
}

.hero-btns-container {
  display: block;
}

@media (min-width: 992px) {
  .hero-btns-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
}

.btn-glow {
  background: #f8f9fa;
  color: #212529;
  border: none;
  box-shadow: 0 0 0 rgba(255, 255, 255, 0);
  transition: box-shadow 0.3s ease-in-out;

  transform: scale(1);
  transition: transform 0.3s;
}

.btn-glow:hover {
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.6); /* Crea un aura blanca */
  transform: scale(1.02);
}

.demoButton {
  min-width: 150px;
}
.demoButton:focus {
  box-shadow: none !important;
}

/* ── HERO ENTRANCE ANIMATIONS ──────────────────────────────────────────── */

/* CTA buttons slide up after typing is underway */
.hero-btn {
  animation: heroSlideUp 0.6s ease-out 1.5s both;
}

@keyframes heroReveal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes heroSlideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
