/* Utilidades y variables base */
:root {
	--bg-dark:#000;
	--bg-accent:#6d2e05;
	--accent:#fe7e26;
	--text:#fff;
	--text-sub:#e0e0e0;
	--card:#181818;
	--radius:16px;
	/* Fondo sutil degradado global */
	--bg-gradient-soft: linear-gradient(135deg, rgba(254, 126, 38, 0.05) 0%, rgba(0, 0, 0, 0) 55%);
}

*, *::before, *::after { box-sizing:border-box; }

html { scroll-behavior:smooth; overflow-x:hidden; }

body {
	margin:0;
	padding:0;
	background: var(--bg-gradient-soft), var(--bg-dark);
	background-repeat: no-repeat, repeat;
	background-attachment: fixed, scroll;
	color:var(--text);
	font-family:'Segoe UI', Arial, sans-serif;
	overflow-x:hidden;
}

img { max-width:100%; height:auto; }

/* Elementos globales de primer plano para evitar superposición con BG animado */
h1, h2, h3, h4, h5, h6, .showcase__logo, .about__tech img, .project__image, .contact__title, .showcase__icon img { position: relative; z-index: 20; }

/* Enlace para saltar al contenido */
.skip-link { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip-link:focus { left:1rem; top:1rem; width:auto; height:auto; background:#fff; color:#000; padding:.5rem .75rem; border-radius:6px; z-index:1000; }

/* Navbar */
.navbar {
	width:100%;
	background:var(--bg-dark);
	border-bottom:3px solid var(--accent);
	box-shadow:0 2px 8px rgba(0,0,0,0.2);
	position:fixed; top:0; left:0; z-index:999;
	box-sizing:border-box;
	display:flex; align-items:center; justify-content:space-between;
	padding:0 2vw;
}
.title { font-weight:bolder; text-decoration:none; color:inherit; }
.title__dev { color:var(--accent); }

.nav__list { display:flex; justify-content:flex-end; align-items:center; list-style:none; margin:0; padding:0 4vw 0 0; height:60px; }
.nav__list .nav__item { margin:0 2rem; }
.nav__list .nav__title { color:#e7e7e7; text-decoration:none; font-size:1rem; font-weight:500; padding:8px 18px; border-radius:6px; transition:background .2s, color .2s, box-shadow .2s; display:block; }
.nav__list .nav__item:hover .nav__title { background:var(--accent); color:#181f2b; box-shadow:0 2px 12px 0 #fe7e2655; }

/* Secciones principales */
.about, .projects, .contact { padding:2rem 0; min-height:90vh; box-sizing:border-box; display:flex; align-items:center; width:100%; margin:0; border-radius:0; box-shadow:none; justify-content:center; }

.showcase { position:relative; z-index:1; min-height:100vh; width:100%; max-width:1200px; margin:0 auto; gap:3rem; align-items:center; justify-content:space-between; display:flex; }

.about__container, .projects__container, .contact__container { width:100%; max-width:1200px; margin:0 auto; }

/* Showcase */
.showcase__info { flex:1 1 45%; display:flex; flex-direction:column; gap:1.2rem; }
.showcase__subtitle { font-size:1rem; color:var(--accent); letter-spacing:1px; margin-bottom:0; }
.showcase__title, .showcase__titulo { font-size:2.5rem; font-weight:bold; margin:0 0 .5rem 0; color:var(--text); line-height:1.1; }
.showcase__desc { font-size:1.1rem; color:var(--text-sub); margin-bottom:1.2rem; }
.showcase__buttons, .showcase__botones { display:flex; gap:1.2rem; margin-bottom:1.2rem; }

.buttons { padding:.7rem 1.6rem; border:none; border-radius:6px; font-size:1rem; font-weight:500; cursor:pointer; background:var(--accent); color:#181f2b; transition:background .2s, color .2s, box-shadow .2s; text-decoration:none; box-shadow:0 2px 8px 0 #fe7e2633; }
.buttons__cv:hover { background:#c9621e; color:#fff; }
.buttons__contacto { background:transparent; color:var(--accent); border:2px solid var(--accent); }
.buttons__contacto:hover { background:var(--accent); color:#181f2b; }

.showcase__socials { display:flex; gap:1.2rem; margin-top:.5rem; padding-left:1.2rem; }
.showcase__icon img { width:32px; height:32px; filter:drop-shadow(0 2px 6px #fe7c2623); transition:transform .2s; }
.showcase__icon img:hover { transform:scale(1.12) rotate(-6deg); }

.showcase__logo { width:170px; height:170px; display:flex; align-items:center; justify-content:center; background:transparent; border-radius:50%; border:2.5px solid var(--accent); margin-left:30px; margin-right:0; padding:0; position:relative; overflow:visible; z-index:1; transition: box-shadow .3s, transform .3s; cursor: pointer; }
.showcase__logo img { width:110px; height:110px; object-fit:contain; display:block; z-index:2; background:transparent; }
.showcase__logo:hover { box-shadow: 0 0 32px 8px #fe7e26cc, 0 0 0 4px #fff2; transform: scale(1.08) rotate(-4deg); }

/* Orbit system */
.showcase__logo-container { position: relative; }
.orbit-system { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 360px; height: 360px; pointer-events: none; z-index: 1; filter: drop-shadow(0 0 10px rgba(254, 126, 38, .35)); }
.orbit { position: absolute; top: 50%; left: 50%; width: var(--size, 260px); height: var(--size, 260px); margin-left: calc(var(--size, 260px) / -2); margin-top: calc(var(--size, 260px) / -2); border-radius: 50%; transform-origin: center; animation: orbit-rotate var(--speed, 24s) linear infinite; animation-delay: var(--delay, 0s); z-index: 1; }
.orbit.reverse { animation-direction: reverse; }
.orbit.front { z-index: 3; }
.orbit__ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 18%, transparent), inset 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent); opacity: 0; display: none !important; }
.orbit .bubble { position: absolute; --b-size: 50px; top: calc(var(--b-size) * -0.5); left: calc(50% - var(--b-size) * 0.5); width: var(--b-size); height: var(--b-size); border-radius: 50%; padding: 8px; background: transparent; border: 2px solid rgba(254,126,38,.75); box-shadow: 0 0 7px rgba(254,126,38,.5), 0 0 14px rgba(254,126,38,.28); transform: translateZ(0); }
.orbit .bubble img, .orbit .bubble { display: block; }
.bubble img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 7px rgba(254, 126, 38, .5)); }

@keyframes orbit-rotate { from { transform: rotate(var(--tilt, 0deg)) scaleY(var(--squash, 1)) rotate(var(--start, 0deg)); } to { transform: rotate(var(--tilt, 0deg)) scaleY(var(--squash, 1)) rotate(calc(var(--start, 0deg) + 360deg)); } }

/* Responsive scaling for the orbit system */
@media (max-width: 1024px) { .orbit-system { width: 300px; height: 300px; } }
@media (max-width: 820px) { .orbit-system { width: 240px; height: 240px; } }
@media (max-width: 640px) { .orbit-system { display: none; } }

.github img { filter:brightness(0) saturate(100%) invert(54%) sepia(89%) saturate(1112%) hue-rotate(346deg) brightness(101%) contrast(101%); }

/* About */
.about { background:var(--bg-dark); position:relative; z-index:1; }
.about__container { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 3rem; width: 100%; max-width: 1200px; margin: 0 auto; }
.about__container--column { flex-direction: column; align-items: center; gap: 2.5rem; }
.about__cards-row { display: flex; flex-direction: row; justify-content: center; align-items: stretch; gap: 2rem; width: 100%; margin-bottom: 1.5rem; flex-wrap: wrap; }
.about__card { background: var(--card); border: 1.5px solid var(--accent); border-radius: var(--radius); box-shadow: 0 2px 16px 0 #fe7e2622; padding: 2rem 1.5rem 1.5rem 1.5rem; min-width: 260px; max-width: 340px; flex: 1 1 300px; display: flex; flex-direction: column; align-items: center; text-align: center; transition: box-shadow .2s, transform .2s; }
.about__card:hover { box-shadow: 0 4px 32px 0 #fe7e2644; transform: translateY(-6px) scale(1.03); }
.about__card-title { color: var(--accent); font-size: 1.2rem; font-weight: bold; margin-bottom: .7rem; letter-spacing: 1px; }
.about__card-desc { color: var(--text-sub); font-size: 1.05rem; line-height: 1.5; }
.about__subtitle-techs { color: var(--accent); font-size: 1.3rem; font-weight: bold; margin: 1.5rem 0 .5rem 0; text-align: center; letter-spacing: 1px; }
.about__techs--center { justify-content: center !important; gap: 2.5rem; width: 100%; margin-top: 0.5rem; flex-wrap: wrap; }
.about__text { flex:1 1 45%; display:flex; flex-direction:column; justify-content:center; align-items:flex-start; }
.about__title { color:var(--text); font-size:2rem; margin-bottom:1rem; font-weight:bold; text-align:center; width:100%; }
.about__desc { color:#fff8f0; font-size:1.1rem; text-align:left; margin-bottom:2rem; max-width:700px; }
.about__techs { flex:1 1 45%; display:flex; gap:2.5rem; justify-content:flex-end; flex-wrap:wrap; margin-top:.5rem; align-items:center; }
.about__tech { display:flex; flex-direction:column; align-items:center; }
.about__tech img { width:54px; height:54px; margin-bottom:.5rem; border-radius:12px; padding:0; transition:box-shadow .2s, transform .2s, filter .2s; }
.about__tech img:hover { transform:scale(1.08) rotate(-4deg); }
.about__tech-name { color:#fff; font-size:1rem; font-weight:500; margin-top:.2rem; letter-spacing:1px; }

/* Projects */
.projects { background:var(--bg-dark); position:relative; z-index:1; }
.projects__container { max-width:1200px; margin:0 auto; padding:0 2rem; }
.projects__title { color:var(--accent); font-size:2rem; font-weight:bold; margin-bottom:2.5rem; text-align:left; }
.projects__grid { display:flex; gap:2.5rem; justify-content:space-between; flex-wrap:wrap; }
.project__card { background:var(--card); border-radius:var(--radius); box-shadow:0 2px 16px #000a; flex:1 1 45%; min-width:320px; max-width:500px; display:flex; flex-direction:column; align-items:flex-start; padding:2rem 1.5rem; transition:box-shadow .2s, transform .2s; }
.project__card:hover { box-shadow:0 6px 32px #fe7e2655; transform:translateY(-6px) scale(1.03); }
.project__image { width:100%; height:160px; background:#222; border-radius:10px; margin-bottom:1.2rem; }
.project__image--main {
	position: relative;
	width: 100%;
	height: 180px;
	background: #222;
	border-radius: 12px;
	overflow: hidden;
	margin-bottom: 1.2rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
.project__image-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

.project__techs {
	margin-top: 0.7rem;
	display: flex;
	gap: 0.5rem;
	align-items: center;
}
.project__techs-icon {
	width: 20px;
	height: 20px;
	vertical-align: middle;
	display: inline-block;
}
.project__techs-name {
	font-size: 0.95rem;
	color: var(--text-sub);
	margin-right: 0.7rem;
	display: inline-block;
}
.project__info { width:100%; }
.project__name { color:#fff; font-size:1.3rem; margin-bottom:.5rem; }
.project__desc { color:var(--text-sub); font-size:1rem; }

/* Contact */
.contact { background:var(--bg-dark); position:relative; z-index:1; }
.contact__container { max-width:600px; margin:0 auto; display:flex; flex-direction:column; align-items:center; }
.contact__title { color:#fff; font-size:2rem; font-weight:bold; margin-bottom:2rem; }
.contact__form { width:100%; display:flex; flex-direction:column; gap:1.2rem; }
.contact__input, .contact__textarea { width:100%; padding:.9rem 1.2rem; border:none; border-radius:8px; font-size:1rem; background:#fff8f0; color:#181818; resize:none; box-sizing:border-box; }
.contact__input:focus, .contact__textarea:focus { outline:2px solid #c9621e; }
.contact__button { background:#181818; color:#fff; border:none; border-radius:8px; padding:.9rem 1.2rem; font-size:1rem; font-weight:600; cursor:pointer; transition:background .2s, color .2s; }
.contact__button:hover { background:#fff; color:var(--accent); }

/* Contacto adaptado tipo tarjeta */
.contact__container--row { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 3rem; max-width: 1080px; width: 100%; margin: 0 auto; display: flex; flex-wrap: nowrap; }
.contact__info { flex: 1 1 45%; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; min-width: 260px; max-width: 500px; margin-bottom: 2rem; order: 1; }
.contact__desc { color: var(--text-sub); font-size: 1.08rem; margin-bottom: 1.5rem; line-height: 1.6; }
.contact__socials { display: flex; gap: 1.2rem; margin-top: 1.2rem; }
.contact__social img { width: 32px; height: 32px; filter: drop-shadow(0 2px 6px #fe7c2623); transition: transform .2s; background: transparent; border-radius: 8px; }
.contact__social img:hover { transform: scale(1.12) rotate(-6deg); box-shadow: 0 0 12px #fe7e26cc; }
.contact__formbox { flex: 1 1 45%; background: var(--card); border: 1.5px solid var(--accent); border-radius: var(--radius); box-shadow: 0 2px 16px 0 #fe7e2622; padding: 2.2rem 2rem 2rem 2rem; min-width: 300px; max-width: 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; order: 2; min-height: 440px; }
.contact__success { display: none; flex-direction: column; align-items: center; justify-content: center; background: rgba(24, 24, 24, 0.96); border: 2px solid var(--accent); border-radius: var(--radius); box-shadow: 0 0 24px 0 #fe7e2633, inset 0 0 0 1px #ffffff10; padding: 2.2rem 1.5rem 2rem 1.5rem; min-width: 240px; max-width: 380px; margin: 0 auto; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; animation: fadeIn .4s; }
.contact__success-icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #0d1f14; color: #26d07c; border: 2px solid #26d07c; font-size: 1.8rem; margin-bottom: 1rem; box-shadow: 0 0 14px #26d07c55; }
.contact__success-title { color: var(--accent); font-size: 1.4rem; font-weight: bold; margin-bottom: .5rem; text-align: center; }
.contact__success-desc { color: #e7e7e7; font-size: 1.05rem; text-align: center; }
@keyframes fadeIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }

@media (max-width: 900px) {
	.contact__container--row { flex-direction: column; align-items: center; gap: 3rem; flex-wrap: wrap; }
	.contact__info { max-width: 100%; min-width: 220px; order: 1; }
	.contact__formbox { max-width: 100%; min-width: 220px; order: 2; }
}

/* Enforce two-column layout when both classes present */
.contact__container.contact__container--row { max-width: 1080px; width: 100%; display: flex; flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 3rem; flex-wrap: nowrap; }
.contact__container.contact__container--row .contact__info { flex: 1 1 45%; max-width: 500px; order: 1; }
.contact__container.contact__container--row .contact__formbox { flex: 1 1 45%; max-width: 480px; order: 2; }
@media (max-width: 900px) {
  .contact__container.contact__container--row { flex-direction: column; align-items: center; gap: 3rem; flex-wrap: wrap; max-width: 100%; }
  .contact__container.contact__container--row .contact__info { order: 1; max-width: 100%; }
  .contact__container.contact__container--row .contact__formbox { order: 2; max-width: 100%; }
}

/* Footer */
.footer { width:100%; background:var(--bg-dark); color:#fff8f0; text-align:center; padding:1.2rem 0 1rem; font-size:1rem; letter-spacing:1px; border-top:3px solid var(--accent); }

/* Efecto de mouse */
#mouse-trail { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; pointer-events: none; z-index: 10; display: block; }

.code-bg-animated { position: absolute; top: 19.7vh; left: 12vh; width: 100%; height: calc(100% - 64px); z-index: 100; pointer-events: none; opacity: 0.18; font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace; color: #fe7e26; background: transparent; overflow: hidden; white-space: pre; font-size: 1.1rem; line-height: 1.5; }

/* Fondo sutil degradado para toda la página */

body, .about, .projects, .contact { background: var(--bg-gradient-soft), var(--bg-dark); background-repeat: no-repeat, repeat; background-attachment: fixed, scroll; }

/* Utilidad de sólo lectura visual (labels ocultas) */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }