*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'DM Sans', sans-serif; font-weight: 300; transition: background 0.8s, color 0.8s; }
body.day { background: #f9f9f9; color: #111; }
body.night { background: #0e0e14; color: #f0eaf5; }

nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 4rem; backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(128,128,128,0.1); transition: background 0.8s;
}
body.day nav { background: rgba(249,249,249,0.85); }
body.night nav { background: rgba(14,14,20,0.85); }

.nav-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: #e6007e; text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 1rem; }
#hamburger { display: none; }
.nav-logo-tld { color: #6b6666; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: color 0.3s; }
body.day .nav-links a { color: #aaa; }
body.night .nav-links a { color: #755c8d; }
.nav-links a:hover { color: #e6007e !important; }
.nav-links a.active { color: #e6007e !important; }
#mobile-menu ul a.active { color: #e6007e !important; }

#dark-toggle {
  background: transparent; border: 1px solid rgba(128,128,128,0.3);
  border-radius: 100px; padding: 6px 16px; font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all 0.3s;
}
body.day #dark-toggle { color: #888; border-color: #ddd; }
body.night #dark-toggle { color: #9966aa; border-color: #443355; }
#dark-toggle-mobile {
  background: transparent; border: 1px solid rgba(128,128,128,0.3);
  border-radius: 100px; padding: 6px 16px; font-size: 10px;
  letter-spacing: 0.15em; text-transform: uppercase; cursor: pointer;
  font-family: 'DM Sans', sans-serif; transition: all 0.3s; margin-top: 1rem;
}
body.day #dark-toggle-mobile { color: #888; border-color: #ddd; }
body.night #dark-toggle-mobile { color: #9966aa; border-color: #443355; }

#tunnel-hero { width: 100%; height: 100vh; position: relative; overflow: hidden; cursor: ns-resize; }
#tunnel-inner { position: relative; width: 100%; height: 100%; overflow: hidden; }
.tframes { position: absolute; inset: 0; pointer-events: none; }
.frame { position: absolute; border-radius: 2px; }

.tsection {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 2rem;
}
.stag { font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; margin-bottom: 1rem; transition: color 0.6s; }
body.day .stag { color: #bbb; }
body.night .stag { color: #554466; }
.sbig { font-family: 'Syne', sans-serif; font-size: clamp(2rem,5vw,3.5rem); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; transition: color 0.6s; }
body.day .sbig { color: #111; }
body.night .sbig { color: #f0eaf5; }
.sbig em { color: #e6007e; font-style: normal; }
.sline { width: 28px; height: 1.5px; background: #e6007e; margin: 0.8rem auto; }
.ssub { font-size: 0.85rem; line-height: 1.7; margin-top: 0.3rem; max-width: 320px; transition: color 0.6s; }
body.day .ssub { color: #888; }
body.night .ssub { color: #665577; }
.skill-row { display: flex; gap: 0.4rem; margin-top: 1rem; flex-wrap: wrap; justify-content: center; }
.skill { font-size: 9px; padding: 3px 12px; border-radius: 100px; letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.6s; }
body.day .skill { border: 1px solid #e0e0e0; color: #aaa; }
body.night .skill { border: 1px solid #332244; color: #554466; }
.skill.hi { border-color: #e6007e !important; color: #e6007e !important; }

#creature-stage { position: absolute; bottom: 0; left: 0; right: 0; height: 90px; pointer-events: none; z-index: 10; }

#hud-prog { position: absolute; top: 5.5rem; left: 2rem; font-size: 9px; letter-spacing: 0.2em; font-family: 'DM Sans', sans-serif; z-index: 20; transition: color 0.6s; }
body.day #hud-prog { color: #ccc; }
body.night #hud-prog { color: #443355; }
#hud-section { position: absolute; bottom: 6.5rem; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 0.25em; text-transform: uppercase; font-family: 'DM Sans', sans-serif; z-index: 20; transition: color 0.6s; white-space: nowrap; }
body.day #hud-section { color: #ccc; }
body.night #hud-section { color: #443355; }
#hint { position: absolute; bottom: 1.8rem; left: 50%; transform: translateX(-50%); font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase; display: flex; align-items: center; gap: 5px; transition: opacity 0.5s; white-space: nowrap; z-index: 20; font-family: 'DM Sans', sans-serif; }
body.day #hint { color: #ccc; }
body.night #hint { color: #443355; }
.harrow { width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 0%,100%{transform:rotate(45deg) translateY(0)}50%{transform:rotate(45deg) translateY(3px)} }

.full-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 8rem 4rem; }
.section-inner { max-width: 900px; width: 100%; }
.section-label { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: #e6007e; margin-bottom: 0.75rem; }
.section-title { font-family: 'Syne', sans-serif; font-size: clamp(2rem,4vw,3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
.section-sub { max-width: 540px; margin-bottom: 3rem; font-size: 0.9rem; transition: color 0.6s; }
body.day .section-sub { color: #888; }
body.night .section-sub { color: #554466; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.about-text p { margin-bottom: 1.2rem; font-size: 0.9rem; line-height: 1.75; transition: color 0.6s; }
body.day .about-text p { color: #666; }
body.night .about-text p { color: #887799; }
.skills-block { margin-bottom: 1.5rem; }
.skills-title { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 0.6rem; transition: color 0.6s; }
body.day .skills-title { color: #bbb; }
body.night .skills-title { color: #443355; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { font-size: 0.78rem; padding: 0.3rem 0.9rem; border-radius: 100px; transition: all 0.3s; cursor: default; }
body.day .tag { background: #f0f0f0; color: #666; border: 1px solid #e8e8e8; }
body.night .tag { background: #1a1025; color: #665577; border: 1px solid #2a1a35; }
.tag:hover { border-color: #e6007e !important; color: #e6007e !important; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 1.25rem; }
.project-card { border-radius: 12px; overflow: hidden; transition: transform 0.3s, border-color 0.3s; }
body.day .project-card { background: #fff; border: 1px solid #eee; }
body.night .project-card { background: #13101a; border: 1px solid #1f1530; }
.project-card:hover { transform: translateY(-4px); border-color: rgba(230,0,126,0.3) !important; }
.project-img { height: 140px; display: flex; align-items: center; justify-content: center; font-size: 2rem; transition: background 0.6s; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
body.day .project-img { background: #f7f7f7; }
body.night .project-img { background: #1a1025; }
.project-body { padding: 1.25rem; }
.project-type { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: #e6007e; margin-bottom: 0.4rem; }
.project-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 0.4rem; }
.project-desc { font-size: 0.8rem; line-height: 1.6; transition: color 0.6s; }
body.day .project-desc { color: #999; }
body.night .project-desc { color: #554466; }

.blog-grid { display: flex; flex-direction: column; gap: 1rem; }
.blog-card { padding: 1.5rem; border-radius: 10px; transition: all 0.3s; cursor: pointer; text-decoration: none; display: block; color: inherit; }
body.day .blog-card { background: #fff; border: 1px solid #eee; }
body.night .blog-card { background: #13101a; border: 1px solid #1f1530; }
.blog-card:hover { border-color: rgba(230,0,126,0.3) !important; }
.blog-date { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #e6007e; margin-bottom: 0.4rem; }
.blog-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1rem; margin-bottom: 0.4rem; }
.blog-excerpt { font-size: 0.8rem; line-height: 1.6; transition: color 0.6s; }
body.day .blog-excerpt { color: #999; }
body.night .blog-excerpt { color: #554466; }

.pub-card { display: flex; gap: 2.5rem; align-items: flex-start; border-radius: 12px; overflow: hidden; padding: 2rem; }
body.day .pub-card { background: #fff; border: 1px solid #eee; }
body.night .pub-card { background: #13101a; border: 1px solid #1f1530; }
.pub-cover { flex-shrink: 0; width: 160px; }
.pub-cover img { width: 100%; border-radius: 6px; display: block; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.pub-body { flex: 1; }
.pub-title { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.3rem; margin: 0.5rem 0 0.75rem; line-height: 1.3; }
.pub-desc { font-size: 0.85rem; line-height: 1.7; }
body.day .pub-desc { color: #666; }
body.night .pub-desc { color: #887799; }
@media (max-width: 600px) {
  .pub-card { flex-direction: column; }
  .pub-cover { width: 130px; }
}

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.contact-links { display: flex; flex-direction: column; gap: 1rem; }
.contact-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: 10px; text-decoration: none; transition: all 0.3s; }
body.day .contact-item { background: #fff; border: 1px solid #eee; color: #111; }
body.night .contact-item { background: #13101a; border: 1px solid #1f1530; color: #f0eaf5; }
.contact-item:hover { border-color: rgba(230,0,126,0.3) !important; transform: translateX(4px); }
.contact-icon { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0; transition: background 0.6s; }
body.day .contact-icon { background: #f5f5f5; }
body.night .contact-icon { background: #1a1025; }
.contact-detail { display: flex; flex-direction: column; }
.contact-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: #e6007e; }
.contact-value { font-size: 0.85rem; }

.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; transition: color 0.6s; }
body.day .form-group label { color: #aaa; }
body.night .form-group label { color: #443355; }
.form-group input, .form-group textarea { border-radius: 8px; padding: 0.8rem 1rem; font-family: 'DM Sans', sans-serif; font-size: 0.88rem; transition: all 0.3s; resize: vertical; }
body.day .form-group input, body.day .form-group textarea { background: #fff; border: 1px solid #eee; color: #111; }
body.night .form-group input, body.night .form-group textarea { background: #13101a; border: 1px solid #1f1530; color: #f0eaf5; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: rgba(230,0,126,0.5) !important; }
.form-group textarea { min-height: 110px; }
.btn-submit { align-self: flex-start; background: #e6007e; color: #fff; border: none; border-radius: 100px; padding: 0.75rem 1.8rem; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.88rem; cursor: pointer; transition: background 0.2s, transform 0.2s; }
.btn-submit:hover { background: #ff1a90; transform: translateY(-2px); }

.section-divider { height: 1px; margin: 0 4rem; transition: background 0.6s; }
body.day .section-divider { background: #eee; }
body.night .section-divider { background: #1f1530; }

footer { padding: 3rem 6rem; border-top: 1px solid; display: flex; justify-content: space-between; align-items: center; font-size: 1rem; transition: all 0.6s; }
body.day footer { border-color: #eee; color: #bbb; }
body.night footer { border-color: #1f1530; color: #443355; }
.footer-logo { font-family: 'Syne', sans-serif; font-weight: 800; color: #e6007e; }
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 0.8rem; }
.footer-brand img { height: 95px; width: auto; }
.footer-links { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }
.footer-mascot { height: 80px; width: auto; }
.footer-links a { font-size: 0.9rem; text-decoration: none; transition: color 0.2s; }
body.day .footer-links a { color: #9c9999; }
body.night .footer-links a { color: #664c80; }
.footer-links a:hover { color: #e6007e !important; }

#torito-wrap {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  pointer-events: all; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0; transition: opacity 0.6s;
  cursor: pointer;
}
#torito-mood {
  font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase;
  font-family: 'DM Sans', sans-serif; transition: color 0.4s; text-align: center;
}

#torito-bubble {
  position: absolute; bottom: calc(100% + 10px); right: 0;
  display: flex; flex-direction: column; gap: 6px;
  padding: 0.75rem 1rem; border-radius: 12px;
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none; white-space: nowrap;
  border: 1px solid rgba(230,0,126,0.2);
}
/* puente invisible que cubre el gap entre el bubble y el torito */
#torito-bubble::before {
  content: ''; position: absolute; bottom: -10px; left: 0;
  width: 100%; height: 10px;
}
body.day #torito-bubble { background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,0.08); }
body.night #torito-bubble { background: #13101a; box-shadow: 0 4px 20px rgba(0,0,0,0.4); }

#torito-bubble::after {
  content: ''; position: absolute; bottom: -6px; right: 28px;
  width: 10px; height: 10px; rotate: 45deg;
  border-right: 1px solid rgba(230,0,126,0.2);
  border-bottom: 1px solid rgba(230,0,126,0.2);
}
body.day #torito-bubble::after { background: #fff; }
body.night #torito-bubble::after { background: #13101a; }

#torito-bubble a, #torito-bubble p, #torito-bubble div {
  font-family: 'DM Sans', sans-serif; font-size: 0.78rem;
  text-decoration: none; transition: color 0.2s; margin: 0;
}
body.day #torito-bubble a, body.day #torito-bubble p, body.day #torito-bubble div { color: #666; }
body.night #torito-bubble a, body.night #torito-bubble p, body.night #torito-bubble div { color: #887799; }
#torito-bubble a:hover { color: #e6007e !important; }

#torito-wrap:hover #torito-bubble, #torito-bubble.open {
  opacity: 1; transform: translateY(0);
  pointer-events: all;
  transition: opacity 0.25s, transform 0.25s;
}

#mobile-menu {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999; background: #f9f9f9;
  flex-direction: column; align-items: center; justify-content: center; gap: 2rem;
}
body.night #mobile-menu { background: #0e0e14; }
#mobile-menu.open { display: flex; }
#mobile-menu ul { list-style: none; display: flex; flex-direction: column; align-items: center; gap: 1.8rem; }
#mobile-menu ul a { font-size: 1.4rem; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: color 0.2s; }
body.day #mobile-menu ul a, #mobile-menu ul a { color: #111; }
body.night #mobile-menu ul a { color: #f0eaf5; }
#mobile-menu ul a:hover { color: #e6007e; }
#mobile-menu .mobile-menu-logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.1rem; color: #e6007e; text-decoration: none; margin-bottom: 2rem; text-transform: none; letter-spacing: normal; }

@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  #dark-toggle { display: none; }
  #hamburger { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; z-index: 101; position: relative; }
  #hamburger span { display: block; width: 22px; height: 2px; background: currentColor; transition: transform 0.3s, opacity 0.3s; }
  #hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  #hamburger.open span:nth-child(2) { opacity: 0; }
  #hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .full-section { padding: 6rem 1.5rem; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  footer { flex-direction: column; gap: 1rem; padding: 2rem 1.5rem; text-align: center; }
  .section-divider { margin: 0 1.5rem; }
}
