/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
  box-sizing: border-box;
}

p {
  font-family: 'Spline Sans', sans-serif;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

body {
  margin: 0;
  padding: 0;
  background: #f1f1f1;
  background-size: cover;
  background-position: center;
  font-family: 'Spline Sans', sans-serif;
  line-height: 1.6;
  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

section,
div[id] {
  scroll-margin-top: 80px;
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================
   CONTAINER SYSTEM
   ============================================ */

.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid-one-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

.grid-two-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.grid-three-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.grid-col {
  min-width: 0;
}

/* Grid para footer */
.grid-footer {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 30px;
}

.grid-col-footer {
  min-width: 0;
}

.footer-col-brand {
  grid-column: span 1;
}

/* Grid para proyectos */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

.section-spacing {
  margin-top: 30px;
  margin-bottom: 30px;
}

.section-spacing-bottom {
  margin-bottom: 30px;
}

.spacing-bottom {
  margin-bottom: 30px;
}

.card-padding {
  padding: 24px;
}

/* ============================================
   FLEXBOX UTILITIES
   ============================================ */

.flex-column {
  display: flex;
  flex-direction: column;
}

.flex-center {
  display: flex;
  align-items: center;
}

.flex-center-justify {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   TEXT UTILITIES
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: #6c757d;
}

/* ============================================
   NAVBAR STYLES
   ============================================ */

.navbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  background-color: #f5f5f5;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
  color: black;
  font-weight: 600;
  font-size: 24px;
  font-family: 'M PLUS 1p', sans-serif;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-brand img {
  height: 40px;
  margin-right: 10px;
}

/* Botón hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-line {
  width: 30px;
  height: 3px;
  background-color: #333;
  border-radius: 3px;
  transition: all 0.3s ease;
  transform-origin: center;
}

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

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

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

.nav-links {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: flex-end;
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-right: 20px;
}

.nav-item {
  margin-left: 15px;
}

.nav-link {
  font-family: 'Spline Sans', sans-serif;
  color: #333;
  text-decoration: none;
  padding: 8px 12px;
  display: block;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #DA22FF;
}

.navbar-text {
  font-family: 'Spline Sans', sans-serif;
  color: #333;
  font-size: 14px;
  font-weight: 500;
}

/* ============================================
   JUMBOTRON / HERO SECTION
   ============================================ */

.jumbotron {
  background: linear-gradient(135deg, #FF6FD8, #3813C2);
  background-size: 200% 200%;
  animation: gradientAnimation 15s ease infinite;
  padding: 100px 0;
  margin-bottom: 0;
}

.display-3 {
  color: #FDEB71;
  font-weight: 900;
  font-family: 'M PLUS 1p', sans-serif;
  font-size: 4.5rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.display-4 {
  color: #FDEB71;
  font-family: 'Spline Sans', sans-serif;
  font-size: 25px;
  font-weight: 400;
  margin-bottom: 50px;
}

.hero-tag {
  display: inline-block;
  background: rgba(253, 235, 113, 0.15);
  border: 1px solid rgba(253, 235, 113, 0.4);
  color: #FDEB71;
  font-family: 'VT323', monospace;
  font-size: 18px;
  letter-spacing: 3px;
  padding: 6px 18px;
  border-radius: 30px;
  margin-bottom: 28px;
  text-transform: uppercase;
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn-grad {
  background-image: linear-gradient(to right, #DA22FF 0%, #9733EE 51%, #DA22FF 100%);
  margin: 10px;
  padding: 15px 20px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  color: white;
  font-family: 'M PLUS 1p', sans-serif;
  font-size: 18px;
  box-shadow: 0 0 20px #eee;
  border-radius: 50px;
  border: none;
  max-width: 200px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn-grad:hover {
  background-position: right center;
  color: #FDEB71;
  text-decoration: none;
  box-shadow: 0 0 20px #FDEB71;
}

.btn-grad2 {
  background-image: linear-gradient(to right, #DA22FF 0%, #9733EE 51%, #DA22FF 100%);
  margin: 10px;
  padding: 10px 16px;
  text-align: center;
  text-transform: uppercase;
  transition: 0.5s;
  background-size: 200% auto;
  color: white;
  font-family: 'M PLUS 1p', sans-serif;
  font-size: 12px;
  box-shadow: 0 0 20px #eee;
  border-radius: 50px;
  border: none;
  max-width: 150px;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}

.btn-grad2:hover {
  background-position: right center;
  color: #FDEB71;
  text-decoration: none;
}

/* ============================================
   GENERAL CARD STYLES
   ============================================ */

h2 {
  font-family: 'M PLUS 1p', sans-serif;
}

.card {
  position: relative;
  border-radius: 15px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(218, 34, 255, 0.7);
}

.card img {
  border-radius: 15px;
}

/* ============================================
   PORTFOLIO / PROJECTS SECTION
   ============================================ */

.section-title {
  color: #FDEB71;
  text-align: center;
  font-family: 'M PLUS 1p', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  margin-top: 30px;
  margin-bottom: 20px;
}

.section-subtitle {
  color: rgba(253, 235, 113, 0.75);
  text-align: center;
  font-family: 'Spline Sans', sans-serif;
  font-size: 1rem;
  margin-bottom: 50px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-title-bottom {
  color: #FDEB71;
  text-align: center;
  font-family: 'VT323', monospace;
  font-size: 3em;
  margin-top: 30px;
  margin-bottom: 30px;
}

.project-challenges {
  position: relative;
  width: 100%;
  padding-top: 50px;
  padding-bottom: 50px;
}

.project-challenges::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 100vw;
  height: 100%;
  background: linear-gradient(320deg, #FF6FD8, #3813C2);
  background-size: 200% 200%;
  animation: gradientAnimation 15s ease infinite;
  transform: translateX(-50%);
  z-index: -1;
}

.container.project-challenges {
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
}

.project-image-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 75%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease-in-out;
  justify-content: center;
  cursor: default;
}

.project-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  transition: filter 0.5s ease-in-out, transform 0.3s ease-in-out;
}

/* Placeholder gradient for missing project images */
.project-image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 10px;
  transition: filter 0.5s ease-in-out, transform 0.3s ease-in-out;
}

.project-image-wrapper:hover,
.project-image-wrapper:focus-within {
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

.project-image-wrapper:hover .project-image,
.project-image-wrapper:focus-within .project-image,
.project-image-wrapper:hover .project-image-placeholder,
.project-image-wrapper:focus-within .project-image-placeholder {
  filter: grayscale(100%);
  transform: scale(1.2);
}

.project-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 130px;
  height: auto;
  transition: opacity 0.3s ease-in-out;
  z-index: 2;
  object-fit: contain;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.35));
}

.project-image-wrapper:hover .project-logo,
.project-image-wrapper:focus-within .project-logo {
  opacity: 0;
}

.project-description {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out, transform 0.3s ease-in-out;
  border-radius: 10px;
  pointer-events: none;
  z-index: 10;
  font-family: 'Spline Sans', sans-serif;
  line-height: 1.8;
}

.project-image-wrapper:hover .project-description,
.project-image-wrapper:focus-within .project-description {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.project-description h3 {
  font-family: 'M PLUS 1p', sans-serif;
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #FDEB71;
}

.project-description p {
  font-size: 13px;
  margin-bottom: 0;
  line-height: 1.6;
}

.project-button {
  display: block;
  margin: 10px auto 0;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 50px;
  transition: 0.5s;
  background-image: linear-gradient(to right, #DA22FF 0%, #9733EE 51%, #DA22FF 100%);
  background-size: 200% auto;
  color: white;
  font-family: 'M PLUS 1p', sans-serif;
  font-size: 14px;
  box-shadow: 0 0 20px #eee;
  max-width: 160px;
  border: 1px solid transparent;
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  cursor: pointer;
  pointer-events: auto;
  isolation: isolate;
  text-align: center;
  white-space: nowrap;
}

.project-button:hover {
  background-position: right center;
  color: #FDEB71;
  text-decoration: none;
  box-shadow: 0 0 20px #FDEB71;
  z-index: 20;
}

/* Project number badge */
.project-number {
  position: absolute;
  top: 14px;
  left: 14px;
  background: linear-gradient(135deg, #DA22FF, #9733EE);
  color: #FDEB71;
  font-family: 'VT323', monospace;
  font-size: 15px;
  letter-spacing: 1px;
  padding: 3px 12px;
  border-radius: 20px;
  z-index: 3;
  pointer-events: none;
}

/* Typing cursor animation */
.typing-cursor::after {
  content: '|';
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================
   FOOTER SECTION
   ============================================ */

.footer-professional {
  position: relative;
  background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
  color: #fff;
  font-family: 'Spline Sans', sans-serif;
  overflow: hidden;
}

.footer-professional::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(218, 34, 255, 0.1), transparent);
  animation: footerShine 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes footerShine {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.footer-main {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
}

.footer-brand {
  margin-bottom: 30px;
}

.footer-logo {
  height: 50px;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(253, 235, 113, 0.3));
  transition: filter 0.3s ease;
}

.footer-logo:hover {
  filter: drop-shadow(0 0 15px rgba(253, 235, 113, 0.6));
}

.footer-brand h5 {
  color: #FDEB71;
  font-family: 'VT323', monospace;
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 15px;
  text-shadow: 0 0 10px rgba(253, 235, 113, 0.3);
}

.footer-description {
  font-family: 'Spline Sans', sans-serif;
  color: #ccc;
  font-size: 14px;
  line-height: 1.8;
  margin-bottom: 25px;
  max-width: 350px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, rgba(218, 34, 255, 0.2), rgba(151, 51, 238, 0.2));
  border: 1px solid rgba(218, 34, 255, 0.3);
  border-radius: 50%;
  color: #FDEB71;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(253, 235, 113, 0.2), transparent);
  transition: left 0.5s ease;
}

.social-link:hover::before {
  left: 100%;
}

.social-link:hover {
  background: linear-gradient(135deg, #DA22FF, #9733EE);
  border-color: #FDEB71;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(218, 34, 255, 0.4);
}

.footer-section {
  margin-bottom: 30px;
}

.footer-title {
  color: #FDEB71;
  font-family: 'VT323', monospace;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: linear-gradient(90deg, #DA22FF, #9733EE);
  border-radius: 1px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  font-family: 'Spline Sans', sans-serif;
  color: #ccc;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  padding-left: 15px;
}

.footer-links a::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: transparent;
  font-size: 8px;
  transition: all 0.3s ease;
}

.footer-links a:hover::before {
  color: #DA22FF;
}

.footer-links a:hover {
  color: #FDEB71;
  padding-left: 20px;
}

.footer-contact {
  margin-top: 20px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.contact-item:hover {
  background: rgba(218, 34, 255, 0.1);
  transform: translateX(5px);
}

.contact-icon {
  color: #DA22FF;
  margin-right: 15px;
  margin-top: 3px;
  flex-shrink: 0;
}

.contact-info p {
  font-family: 'Spline Sans', sans-serif;
  color: #ccc;
  margin: 0;
  font-size: 14px;
  line-height: 1.8;
}

.contact-info a {
  font-family: 'Spline Sans', sans-serif;
  color: #FDEB71;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #DA22FF;
}

.footer-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(218, 34, 255, 0.5), transparent);
  margin: 0;
}

.footer-bottom {
  position: relative;
  z-index: 1;
  padding: 30px 0;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
  background: rgba(0, 0, 0, 0.3);
}

.footer-bottom-content {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

.footer-bottom-columns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom-column {
  flex: 1;
  text-align: center;
  min-width: 200px;
}

.footer-legal p {
  font-family: 'Spline Sans', sans-serif;
  color: #aaa;
  font-size: 13px;
  margin: 0;
}

.footer-legal-links {
  display: flex;
  gap: 15px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.footer-legal-links a {
  font-family: 'Spline Sans', sans-serif;
  color: #aaa;
  text-decoration: none;
  font-size: 13px;
  transition: color 0.3s ease;
}

.footer-legal-links a:hover {
  color: #FDEB71;
}

.footer-signature {
  color: #FDEB71;
  font-family: 'VT323', monospace;
  font-size: 16px;
  margin: 0;
  text-shadow: 0 0 10px rgba(253, 235, 113, 0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

hr {
  border: 0;
  height: 1px;
  background-color: #ddd;
  margin: 40px 0;
}

/* ============================================
   SCROLL ANIMATION
   ============================================ */

.scroll-animate {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
  .grid-two-cols {
    grid-template-columns: 1fr;
  }

  .grid-three-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-footer {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  body {
    padding-top: 70px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .display-3 {
    font-size: 2.5rem;
  }

  .display-4 {
    font-size: 18px;
  }

  .grid-footer {
    grid-template-columns: 1fr;
  }

  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: #f5f5f5;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 30px 20px;
    transition: left 0.3s ease-in-out;
    z-index: 999;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .navbar-nav {
    flex-direction: column;
    margin-right: 0;
    width: 100%;
    text-align: center;
  }

  .nav-item {
    margin-left: 0;
    margin-bottom: 15px;
    width: 100%;
  }

  .nav-link {
    padding: 12px 20px;
    font-size: 18px;
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .navbar-text {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(218, 34, 255, 0.2);
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .display-3 {
    font-size: 2rem;
  }

  .display-4 {
    font-size: 16px;
  }

  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
}
