@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
  --bg: #fff6f8;
  --text: #2e2e2e;
  --accent: #f4c6d7;
  --accent-light: #fef4c0;
  --link: #a681b4;
  --shadow: rgba(0, 0, 0, 0.05);
  --cursor: url('../images/cursor-pixel.png'), auto;
}

[data-theme="dark"] {
  --bg: #1a1a1a;
  --text: #f0f0f0;
  --accent: #f4c6d7;
  --accent-light: #3c3c3c;
  --link: #f4c6d7;
  --shadow: rgba(255, 255, 255, 0.05);
  --cursor: url('../images/cursor-pixel.png'), auto;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  cursor: var(--cursor);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* HEADER */
header {
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo {
  font-family: 'Press Start 2P', cursive;
  font-size: 1rem;
  color: var(--accent);
}

.main-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 24px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent);
  transform: scale(1.05);
}

/* SOCIAL & TOGGLE */
.header-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.social-buttons {
  display: flex;
  gap: 8px;
}

.social-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background-color: var(--accent-light);
  color: var(--text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background-color: var(--accent);
  color: var(--bg);
  transform: scale(1.05);
}

#darkModeToggle {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#darkModeToggle:hover {
  background: var(--accent);
  color: var(--bg);
  transform: scale(1.1);
}

/* HERO */
#hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 100px 20px 60px;
  gap: 1rem;
  text-align: left;
}

#hero > div:first-child {
  max-width: 600px;
}

#hero h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
}

#hero h2.fade-in {
  opacity: 1;
}

#hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0;
}

/* Contenedor del GIF */
#heroGifContainer {
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

#heroGifContainer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive para móvil */
@media (max-width: 600px) {
  #hero {
    flex-direction: column;
    text-align: center;
  }
  #hero > div:first-child {
    max-width: 100%;
  }
  #heroGifContainer {
    width: 100px;
    height: 100px;
    margin-top: 1rem;
  }
}

/* SECTIONS */
section {
  padding: 80px 20px;
  max-width: 1100px;
  margin: 0 auto;
}

section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 40px;
}

/* PROJECTS */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
}

.project-card {
  background-color: var(--accent-light);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 6px 12px var(--shadow);
  transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-6px);
  background-color: var(--accent);
  color: var(--bg);
}

.project-card img {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 15px;
}

/* Botón para ver proyecto */
.project-link {
  display: inline-block;
  padding: 10px 18px;
  background-color: var(--accent);
  color: var(--bg);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease, transform 0.3s ease;
  margin-top: 10px;
}

.project-link:hover {
  background-color: var(--accent-light);
  color: var(--text);
  transform: scale(1.05);
}

/* Role text */
.project-role {
  font-style: italic;
  margin-bottom: 10px;
  color: var(--text);
  transition: color 0.3s ease;
}

.project-card:hover .project-role {
  color: var(--bg);
}

/* BIO & CONTACT */
.bio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

#contact {
  text-align: center;
}

.social-links {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* FOOTER */
footer {
  padding: 40px 20px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

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

  .header-right {
    justify-content: flex-start;
  }
}

/* MODAL VIDEO */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.modal.hidden {
  opacity: 0;
  pointer-events: none;
}

.modal-content {
  position: relative;
  background: var(--bg);
  padding: 20px;
  border-radius: 10px;
  max-width: 90vw;
  max-height: 80vh;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-content video {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 10px;
}

/* Close button */
.close-button {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 2rem;
  font-weight: bold;
  color: var(--text);
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-button:hover {
  color: var(--accent);
}
/*TERMINAL SECTIONS*/

/* TERMINAL INICIAL */
.intro-terminal {
  background-color: var(--accent-light);
  color: var(--accent);
  font-family: 'Press Start 2P', monospace;
  font-size: 0.85rem;
  padding: 1rem;
  border: 2px solid var(--accent);
  border-radius: 12px;
  width: 480px;
  height: 180px;
  max-width: 100%;
  margin: 0 auto;
  box-shadow: 0 0 15px rgba(255, 180, 220, 0.2);
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
  position: relative;
  text-align: left;
}

/* TEXTO Y CURSOR */
#terminalText {
  white-space: pre-line;
}

#terminalCursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  margin-left: 4px;
}

/* TERMINAL BENJAMIN */
.benjamin-terminal {
  background-color: var(--accent-light);
  color: var(--text);
  font-family: monospace;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 12px;
  width: 100%;
  height: 300px;
  max-width: 100%;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.benjamin-terminal pre {
  margin: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

#benjaminCursor {
  color: var(--accent);
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}


/* BIO SECTION REFINED */
.bio-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
  color: var(--text);
}

#skills {
  position: relative;
  padding: 100px 20px;
  overflow: hidden;
  background: radial-gradient(ellipse at center, var(--accent-light), transparent 70%);
}

.skills-visual {
  position: relative;
  width: 100%;
  height: 400px;
  max-width: 900px;
  margin: 0 auto;
}

#skillsCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.skills-galaxy {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.skill-bubble {
  position: absolute;
  background-color: var(--accent);
  color: var(--bg);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
  text-align: center;
  user-select: none;
  white-space: nowrap;
  animation: float 5s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-bubble:hover {
  transform: scale(1.2);
  box-shadow: 0 0 12px var(--accent);
  z-index: 2;
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}


/* EXPERIENCE */
.experience-timeline {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}

.experience-item {
  position: relative;
  margin-bottom: 30px;
}

.experience-item::before {
  content: "";
  position: absolute;
  left: -9px;
  top: 4px;
  width: 14px;
  height: 14px;
  background-color: var(--accent);
  border-radius: 50%;
}

.experience-item h4 {
  margin-bottom: 5px;
  font-size: 1rem;
  color: var(--accent);
}

.experience-item p {
  margin: 0;
  font-size: 0.95rem;
}

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

#globalParticles {
  position: fixed;
  top: 0;
  left: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.9;
}

/*STYLE FOR ELEVATOR PITCH AND GAMEREEL*/

.pitch-embed-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 180, 220, 0.1);
}

.pitch-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 1rem;
}

.video-embed-container {
  position: relative;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  margin-bottom: 2rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(255, 180, 220, 0.1);
}

.video-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 1rem;
}

.reference-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  margin-top: 1.5rem;
}

.reference-gallery figure {
  max-width: 400px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text);
}

.reference-gallery img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.reference-gallery img:hover {
  transform: scale(1.05);
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  cursor: zoom-out;
  transition: opacity 0.3s ease;
}

.lightbox.hidden {
  opacity: 0;
  pointer-events: none;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
}

.dialogue-system-showcase {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
}

.dialogue-gif img {
  max-width: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.dialogue-terminal-container {
  flex: 1;
  min-width: 260px;
}

#dialogueTerminalBox {
  background-color: rgba(0, 0, 0, 0.5);
  border: 2px solid var(--accent);
  border-radius: 12px;
  padding: 24px;
  font-family: 'Fira Code', monospace;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.6;
  white-space: pre-line;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

#dialogueCursor {
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
  color: var(--accent);
}

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

.dialogue-details {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.dialogue-column {
  flex: 1;
  min-width: 280px;
  background-color: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--accent);
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 0 10px var(--shadow);
  transition: background-color 0.3s ease;
}

[data-theme="dark"] .dialogue-column {
  background-color: rgba(255, 255, 255, 0.03);
}

.dialogue-column h4 {
  margin-bottom: 1rem;
  color: var(--accent);
}

.dialogue-column ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.dialogue-column li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

