* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  height: 100%;
}

body {
  background: radial-gradient(circle at top, #17171f 0, #050509 60%);
  color: #f5f5f5;
  overflow: hidden;
}

/* HEADER / NAV */
.header {
  height: 70px;
  border-bottom: 1px solid rgba(255, 107, 157, 0.15);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  position: relative;
  z-index: 10;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-logo-container {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nav-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 107, 157, 0.3);
  background: rgba(255, 107, 157, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.nav-logo-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.nav-logo-icon:hover {
  border-color: rgba(255, 107, 157, 0.5);
  background: rgba(255, 107, 157, 0.15);
}

.nav-logo-icon svg {
  width: 22px;
  height: 22px;
}

.nav-logo-text {
  font-weight: 400;
  font-size: 1.05rem;
  color: #ffffff;
  text-transform: none;
  letter-spacing: 0.02em;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 400;
  padding: 0.5rem 0;
  transition: color 0.2s ease;
}

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

.nav-link.is-active {
  color: #ff6b9d;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #ff6b9d, #ff8fb3);
  transition: width 0.3s ease;
  box-shadow: 0 0 8px rgba(255, 107, 157, 0.5);
}

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

/* MAIN + SECCIONES */
.main {
  height: calc(100% - 130px);
  position: relative;
  z-index: 1;
}

.section {
  position: absolute;
  inset: 0;
  padding: 2rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
  display: none;
  overflow-y: auto;
}

.section.is-visible {
  display: block;
}

.section__title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.section__text {
  font-size: 0.95rem;
  color: #c0c0c0;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

/* SOBRE MÍ / HERO */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
}

.hero-main {
  max-width: 800px;
  width: 100%;
}

.hero-name {
  font-family: 'Dancing Script', cursive;
  font-size: 4.5rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.hero-role {
  font-family: 'Dancing Script', cursive;
  font-size: 2rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.hero-specialty {
  font-family: 'Dancing Script', cursive;
  font-size: 1.5rem;
  font-weight: 400;
  color: #ffffff;
  margin-bottom: 2.5rem;
  line-height: 1.2;
}

.hero-info {
  text-align: left;
  margin-top: 2rem;
}

.hero-text {
  font-size: 0.95rem;
  color: #ffffff;
  line-height: 1.6;
  margin-bottom: 1.2rem;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (max-width: 800px) {
  .hero-name {
    font-size: 3.5rem;
  }
  
  .hero-role {
    font-size: 1.6rem;
  }
  
  .hero-specialty {
    font-size: 1.2rem;
  }
}

/* TECH CARDS */
.tech-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: 1000px;
  width: 100%;
  margin: 3rem auto 0;
  padding: 0 1.5rem;
}

.tech-card {
  background: linear-gradient(145deg, rgba(35, 35, 45, 0.95), rgba(25, 25, 35, 0.9));
  border: 1px solid rgba(255, 107, 157, 0.25);
  border-radius: 12px;
  padding: 1.2rem;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tech-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 107, 157, 0.2),
              0 4px 15px rgba(0, 0, 0, 0.3),
              inset 0 1px 0 rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 107, 157, 0.45);
  background: linear-gradient(145deg, rgba(45, 45, 55, 0.95), rgba(30, 30, 40, 0.9));
}

.tech-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.tech-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.tech-card-close,
.tech-card-add {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  line-height: 1;
  padding: 0;
}

.tech-card-close {
  background: rgba(0, 0, 0, 0.4);
}

.tech-card-add {
  background: rgba(255, 255, 255, 0.15);
}

.tech-card-close:hover {
  background: rgba(255, 107, 157, 0.2);
  color: #ff6b9d;
}

.tech-card-add:hover {
  background: rgba(255, 107, 157, 0.25);
  color: #ff6b9d;
}

.tech-card-description {
  font-size: 0.85rem;
  color: #c0c0c0;
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 900px) {
  .tech-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .tech-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2rem;
  }
}

/* HABILIDADES */
.skills-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8rem;
  color: #d0d0d0;
  background: rgba(255, 255, 255, 0.02);
}

/* TRABAJOS / PROTOTIPOS */
.prototypes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.prototype-card {
  background: #141419;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.prototype-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0.3rem;
}

.prototype-card__title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.prototype-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
  margin: 0.3rem 0;
}

.tech-list {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0.3rem 0;
}

.prototype-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.view-pdf-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1.2rem;
  border-radius: 10px;
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #ba68c8 0%, #ff6b9d 100%);
  color: #ffffff;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(186, 104, 200, 0.4), 0 0 40px rgba(255, 107, 157, 0.3);
  position: relative;
  overflow: hidden;
}

.view-pdf-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.view-pdf-btn:hover::before {
  left: 100%;
}

.view-pdf-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(186, 104, 200, 0.5), 0 0 50px rgba(255, 107, 157, 0.4);
  background: linear-gradient(135deg, #ce93d8 0%, #ff8fb3 100%);
}

.pdf-icon-small {
  width: 18px;
  height: 18px;
  color: #ffffff;
  stroke-width: 2;
}

/* CONTACTO */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-data a {
  color: #ff6b9d;
  text-decoration: none;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
}

.contact-form__input,
.contact-form__textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #111118;
  color: #f5f5f5;
}

.contact-form__textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form__button {
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  border: none;
  background: #ff6b9d;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

/* FOOTER */
.footer {
  height: 60px;
  border-top: 1px solid rgba(255, 107, 157, 0.15);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
}

.footer-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.footer-info {
  flex: 1;
}

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

.footer-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.footer-link {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.footer-link:hover {
  color: #ff6b9d;
  text-shadow: 0 0 8px rgba(255, 107, 157, 0.5);
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
  }
  
  .footer-text {
    text-align: center;
    font-size: 0.8rem;
  }
  
  .footer-links {
    gap: 1rem;
  }
}

/* PDF MODAL */
.pdf-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.pdf-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.pdf-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.pdf-modal-content {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  max-height: 900px;
  background: #1a1a1f;
  border-radius: 16px;
  border: 1px solid rgba(255, 107, 157, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.pdf-modal.is-open .pdf-modal-content {
  transform: scale(1);
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 107, 157, 0.15);
  background: rgba(0, 0, 0, 0.3);
}

.pdf-modal-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
}

.pdf-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 107, 157, 0.1);
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
}

.pdf-modal-close:hover {
  background: rgba(255, 107, 157, 0.25);
  color: #ff6b9d;
  transform: rotate(90deg);
}

.pdf-modal-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: #0f0f14;
}

.pdf-viewer {
  width: 100%;
  height: 100%;
  border: none;
  background: #0f0f14;
}

/* Deshabilitar menú contextual en el iframe (ayuda a prevenir descargas) */
.pdf-viewer {
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
}

@media (max-width: 768px) {
  .pdf-modal-content {
    width: 95%;
    height: 95vh;
    max-height: none;
    border-radius: 12px;
  }
  
  .pdf-modal-header {
    padding: 1rem 1.2rem;
  }
  
  .pdf-modal-title {
    font-size: 1rem;
  }
  
  .pdf-modal-close {
    width: 32px;
    height: 32px;
    font-size: 1.3rem;
  }
}
