html, body {
  box-sizing: border-box;
  overflow-x: hidden;
}

body {
  background: #ede5de;
  margin: 0;
  font-family: 'Roboto Mono', monospace;
  padding-top: 2rem;
  padding-bottom: 2.2rem;
}

.container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 0;
  /* Escalado general */
  transform: scale(0.9);
  transform-origin: top center;
}

.header-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  max-width: none;
  padding-right: 2em;
}

.header-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.header-right {
  display: flex;
  align-items: center;
  padding-right: 2rem;
}

.logo {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 2.2rem;
  color: #222;
  letter-spacing: 0.05em;
  margin-bottom: 0;
  transition: font-family 0.3s;
  line-height: 1.1;
  text-align: left;
  display: block;
  max-width: 900px;
}

.subtitle {
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #222;
  margin-bottom: 1.2rem;
  letter-spacing: 0.05em;
  text-align: left;
}

.cta-btn {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #222;
  background: #fff;
  border: 2px solid #222;
  border-radius: 6px;
  padding: 0.5em 1.5em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: block;
  margin-left: 1.5rem;
  margin-bottom: 0;
  margin-top: 0;
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  margin: 0;
  z-index: 10;
}

.cta-btn:hover {
  background: #222;
  color: #fff;
}

.portfolio {
  margin: 3rem 0 0 0;
  padding: 0;
  align-items: flex-start;
  width: 100%;
  max-width: none;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
}

.portfolio h2 {
  font-family: 'Roboto Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 2rem;
  letter-spacing: 0.05em;
  text-align: left;
  margin-left: 0;
}

.experience-list {
  display: flex;
  flex-direction: column !important;
  width: 100%;
  gap: 0.3rem;
}

.experience-item {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
  padding: 0;
  margin-bottom: 0.3rem;
}

.experience-item.open {
  background: #ede5de;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  padding: 1.2rem 1.2rem;
  width: 100%;
  max-width: 900px;
  margin-left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.exp-title {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: #222;
  margin-bottom: 0.7rem;
  margin-right: 1.2rem;
  transition: font-family 0.3s;
  line-height: 1.1;
  width: 100%;
  min-height: 1.3em;
  text-align: left;
  display: block;
  white-space: pre-line;
  cursor: pointer;
}
.exp-title:hover {
  font-family: 'Permanent Marker', cursive;
}

.exp-desc {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 0.92rem;
  color: #444;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  margin-bottom: 0;
  background: transparent;
  display: block;
  max-width: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  width: 100%;
}

.experience-item.open .exp-desc {
  max-height: 800px;
  opacity: 1;
  margin-bottom: 0.5rem;
}

.exp-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(30, 30, 30, 0.7);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.exp-overlay.active {
  display: flex;
}
.exp-overlay-content {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
  background: rgba(255,255,255,0.1);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.exp-overlay-close {
  position: absolute;
  top: 10px; right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 2;
}
#exp-media iframe, #exp-media img, #exp-media video {
  width: 60vw;
  height: 34vw;
  min-width: 320px;
  min-height: 180px;
  max-width: 80vw;
  max-height: 45vw;
  border: none;
  background: #000;
  display: block;
}

#exp-bg-media {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.7,0,0.3,1);
}
#exp-bg-media.active {
  display: block;
}
#exp-bg-media.fade-in {
  opacity: 1;
}
#exp-bg-media.fade-out {
  opacity: 0;
}
#exp-bg-media video, #exp-bg-media iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100vh;
  width: 100%;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.7;
}

body.bg-translucent {
  background: rgba(237, 229, 222, 0.85) !important;
  transition: background 0.3s;
}

/* Asegurar que el contenido principal esté sobre el video */
.container, .portfolio, .exp-overlay {
  position: relative;
  z-index: 2;
}

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding-left: 0.2rem;
  padding-right: 0.2rem;
  position: relative;
}

@media (max-width: 600px) {
  .portfolio {
    margin-top: 3rem;
    max-width: 98vw;
    padding-left: 0;
    padding-right: 0;
  }
  .main-content {
    padding-left: 0;
    padding-right: 0;
  }
} 

.exp-gallery {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  max-width: 700px;
  width: 100%;
}
.exp-gallery::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}
.exp-gallery img, .exp-gallery video {
  height: 140px;
  width: 220px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
  flex-shrink: 0;
  filter: grayscale(1);
  transition: filter 0.3s;
  display: block;
}
.exp-gallery img:hover, .exp-gallery video:hover {
  filter: grayscale(0.2);
}
.exp-gallery video {
  pointer-events: auto;
}
.exp-gallery video {
  /* Eliminar controles por defecto para personalizar play on hover */
  outline: none;
}
.exp-brief {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 0.5rem;
  text-align: justify;
  max-width: 280px;
  font-style: normal;
  font-weight: normal;
}
.exp-link-btn {
  font-family: 'Roboto Mono', monospace;
  font-weight: 700;
  font-size: 0.95rem;
  color: #222;
  background: #fff;
  border: 2px solid #222;
  border-radius: 6px;
  padding: 0.5em 1.5em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  display: inline-block;
  margin-left: 0;
  margin-bottom: 0;
  margin-top: 0.3rem;
}
.exp-link-btn:hover {
  background: #222;
  color: #fff;
} 

.site-footer {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  font-weight: bold;
  color: #888;
  position: fixed;
  left: 0;
  bottom: 0;
  margin: 0;
  padding: 0.5rem 1.2rem 0.5rem 1.2rem;
  letter-spacing: 0.03em;
  background: transparent;
  z-index: 100;
}
.site-footer .footer-socials {
  display: flex;
  gap: 1.1rem;
}
.site-footer .footer-socials a {
  color: #888;
  text-decoration: none;
  font-size: 1.35rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}
.site-footer .footer-socials a:hover {
  color: #222;
} 