feat(theme): refine retro monitor, ascii portrait, and ambient matrix rain in light mode #10

Merged
Bryan.bano merged 6 commits from feature/light-mode-refinements into develop 2026-10-23 18:08:42 +00:00
8 changed files with 388 additions and 899 deletions
Showing only changes of commit e828754de5 - Show all commits

View File

@ -3,7 +3,11 @@ import { InjectionToken } from '@angular/core';
export const API_BASE_URL = new InjectionToken<string>('API_BASE_URL', { export const API_BASE_URL = new InjectionToken<string>('API_BASE_URL', {
providedIn: 'root', providedIn: 'root',
factory: () => { factory: () => {
if (typeof window !== 'undefined' && window.location.hostname.includes('bryan-bano.com')) { if (
typeof window !== 'undefined' &&
(window.location.hostname.includes('bryan-bano.com') ||
window.location.hostname.includes('pages.dev'))
) {
return 'https://api.bryan-bano.com/api/v1'; return 'https://api.bryan-bano.com/api/v1';
} }
return 'http://localhost:5000/api/v1'; return 'http://localhost:5000/api/v1';

View File

@ -23,6 +23,58 @@
50% { opacity: 1; transform: scale(1.15); } 50% { opacity: 1; transform: scale(1.15); }
} }
.zen-scroll-hint {
position: absolute;
bottom: 28px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 10px;
padding: 6px 14px;
background: rgba(12, 14, 20, 0.7);
backdrop-filter: blur(8px);
border: 1px solid var(--zen-border-subtle);
border-radius: var(--zen-radius-xs);
z-index: 20;
transition: opacity 0.4s ease, transform 0.4s ease;
pointer-events: none;
}
.zen-scroll-hint.faded {
opacity: 0;
transform: translate(-50%, 12px);
}
.scroll-mouse-icon {
width: 14px;
height: 22px;
border: 1.5px solid var(--zen-accent-kintsugi);
border-radius: 8px;
position: relative;
display: block;
}
.scroll-wheel-dot {
width: 2.5px;
height: 4px;
background: var(--zen-accent-kintsugi);
border-radius: 1px;
position: absolute;
top: 4px;
left: 50%;
transform: translateX(-50%);
animation: scrollWheelPulse 1.6s infinite ease-in-out;
}
@keyframes scrollWheelPulse {
0% { transform: translate(-50%, 0); opacity: 1; }
100% { transform: translate(-50%, 8px); opacity: 0; }
}
.scroll-hint-text {
font-family: var(--font-mono);
font-size: 0.6875rem;
font-weight: 600;
letter-spacing: 0.1em;
color: var(--zen-text-secondary);
}
.lateral-panel { .lateral-panel {
position: absolute; z-index: 10; width: min(100%, 25rem); opacity: 0; visibility: hidden; pointer-events: none; position: absolute; z-index: 10; width: min(100%, 25rem); opacity: 0; visibility: hidden; pointer-events: none;
transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s; transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;

View File

@ -130,6 +130,14 @@
</div> </div>
</div> </div>
</aside> </aside>
<!-- Indicador Zen de Scroll Interactivo (se oculta al avanzar fases) -->
<div class="zen-scroll-hint" [class.faded]="activePhase() > 1" aria-hidden="true">
<span class="scroll-mouse-icon">
<span class="scroll-wheel-dot"></span>
</span>
<span class="scroll-hint-text">SCROLL // DESARMAR ARQUITECTURA</span>
</div>
</div> </div>
</section> </section>

View File

@ -50,11 +50,10 @@ export class Hero3dComponent implements OnInit, AfterViewInit, OnDestroy {
private mediaQueryList?: MediaQueryList; private mediaQueryList?: MediaQueryList;
ngOnInit(): void { ngOnInit(): void {
const isBottom = this.initialPosition() === 'bottom'; this.targetFrame = 1;
this.targetFrame = isBottom ? TOTAL_FRAMES : 1; this.currentInterpolatedFrame = 1;
this.currentInterpolatedFrame = isBottom ? TOTAL_FRAMES : 1; this.lastRenderedFrame = 1;
this.lastRenderedFrame = isBottom ? TOTAL_FRAMES : 1; this.activePhase.set(1);
this.activePhase.set(isBottom ? 3 : 1);
this.checkReducedMotion(); this.checkReducedMotion();
if (typeof window !== 'undefined' && window.innerWidth <= 900) { if (typeof window !== 'undefined' && window.innerWidth <= 900) {
@ -91,41 +90,9 @@ export class Hero3dComponent implements OnInit, AfterViewInit, OnDestroy {
}); });
if (typeof window !== 'undefined' && window.innerWidth > 900) { if (typeof window !== 'undefined' && window.innerWidth > 900) {
const container = this.containerRef.nativeElement;
const isBottom = this.initialPosition() === 'bottom';
if (isBottom) {
const scrollableDistance = container.offsetHeight - window.innerHeight;
window.scrollTo({ top: scrollableDistance > 0 ? scrollableDistance : 3000, behavior: 'instant' });
this.targetFrame = TOTAL_FRAMES;
this.currentInterpolatedFrame = TOTAL_FRAMES;
this.lastRenderedFrame = TOTAL_FRAMES;
this.activePhase.set(3);
} else {
window.scrollTo({ top: 0, behavior: 'instant' });
this.targetFrame = 1;
this.currentInterpolatedFrame = 1;
this.lastRenderedFrame = 1;
this.activePhase.set(1);
}
this.onResize(); this.onResize();
this.onScroll();
this.renderFrame(Math.round(this.currentInterpolatedFrame)); this.renderFrame(Math.round(this.currentInterpolatedFrame));
// Reasegurar la posición al desbloquear el scroll
if (isBottom) {
setTimeout(() => {
const maxDist = container.offsetHeight - window.innerHeight;
if (maxDist > 0) {
window.scrollTo({ top: maxDist, behavior: 'instant' });
}
this.targetFrame = TOTAL_FRAMES;
this.currentInterpolatedFrame = TOTAL_FRAMES;
this.lastRenderedFrame = TOTAL_FRAMES;
this.activePhase.set(3);
this.renderFrame(TOTAL_FRAMES);
}, 780);
}
} }
} }

View File

@ -9,18 +9,16 @@
.landing-container { .landing-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%;
min-height: 100vh; min-height: 100vh;
position: relative; position: relative;
background-color: #121517; background-color: #121517;
} }
.landing-container.transitioning-lock { /* ==============================================================================
overflow: hidden !important; HEADER MINIMALISTA FLOTANTE (Glassmorphism & Cyber-Zen)
height: 100vh !important; ============================================================================== */
max-height: 100vh !important;
}
/* Header Minimalista Flotante */
.zen-header { .zen-header {
position: fixed; position: fixed;
top: 0; top: 0;
@ -32,7 +30,7 @@
justify-content: space-between; justify-content: space-between;
height: 56px; height: 56px;
padding: 0 clamp(0.75rem, 2vw, 2rem); padding: 0 clamp(0.75rem, 2vw, 2rem);
background: rgba(10, 10, 11, 0.85); background: rgba(10, 10, 11, 0.88);
backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%);
border-bottom: 1px solid var(--zen-border-subtle); border-bottom: 1px solid var(--zen-border-subtle);
gap: var(--space-3); gap: var(--space-3);
@ -47,6 +45,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
flex-shrink: 0; flex-shrink: 0;
transition: transform 0.2s ease;
}
.brand-block-btn:hover {
transform: scale(1.05);
} }
.brand-logo { .brand-logo {
@ -77,7 +80,7 @@
font-family: var(--font-sans); font-family: var(--font-sans);
font-size: 0.8125rem; font-size: 0.8125rem;
font-weight: 600; font-weight: 600;
padding: 5px 10px; padding: 5px 12px;
border-radius: var(--zen-radius-xs); border-radius: var(--zen-radius-xs);
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.2s ease;
@ -86,19 +89,13 @@
.nav-item:hover { .nav-item:hover {
color: var(--zen-text-primary); color: var(--zen-text-primary);
background: rgba(255, 255, 255, 0.04); background: rgba(255, 255, 255, 0.05);
} }
.nav-item.active { .nav-item.active {
color: var(--zen-accent-kintsugi); color: var(--zen-accent-kintsugi);
background: rgba(197, 155, 39, 0.1); background: rgba(197, 155, 39, 0.12);
border-color: rgba(197, 155, 39, 0.35); border-color: rgba(197, 155, 39, 0.4);
}
.nav-item.nav-all {
font-family: var(--font-mono);
font-size: 0.75rem;
opacity: 0.85;
} }
.header-right-group { .header-right-group {
@ -133,7 +130,7 @@
font-family: var(--font-sans); font-family: var(--font-sans);
font-size: 0.75rem; font-size: 0.75rem;
font-weight: 700; font-weight: 700;
color: var(--zen-text-primary); color: var(--zen-text-secondary);
background: var(--zen-bg-surface); background: var(--zen-bg-surface);
border: 1px solid var(--zen-border-subtle); border: 1px solid var(--zen-border-subtle);
border-radius: var(--zen-radius-xs); border-radius: var(--zen-radius-xs);
@ -148,144 +145,78 @@
background: var(--zen-bg-elevated); background: var(--zen-bg-elevated);
} }
.hero-container {
width: 100%;
}
/* Vista Aislada (Single Component View) */
.isolated-view {
min-height: calc(100vh - 56px);
padding-top: calc(56px + var(--space-4));
box-sizing: border-box;
background-color: #121517;
flex: 1 0 auto;
animation: zenViewEnter 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes zenViewEnter {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.hero-container.isolated-view {
padding-top: 0;
background-color: #000000;
animation: none;
}
.interactive-stage.isolated-view {
height: 100vh;
min-height: 100vh;
max-height: 100vh;
overflow: hidden;
padding: 56px clamp(1rem, 3vw, 2.5rem) 0 clamp(1rem, 3vw, 2.5rem);
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.interactive-stage.isolated-view .stage-grid {
height: 100%;
max-height: calc(100vh - 72px);
align-items: center;
}
.interactive-stage.isolated-view .retro-module-card {
height: 100%;
max-height: calc(100vh - 72px);
display: flex;
align-items: center;
justify-content: center;
}
.interactive-stage.isolated-view .retro-module-card app-retro-os {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
max-height: 100%;
width: 100%;
}
.interactive-stage.isolated-view .vintage-monitor-wrapper {
max-height: calc(100vh - 90px);
width: auto;
aspect-ratio: 1398 / 1564;
}
.interactive-stage.isolated-view .profile-module-card {
max-height: calc(100vh - 72px);
overflow: hidden;
display: flex;
justify-content: center;
}
@media (max-width: 960px) {
.hero-container.isolated-view {
padding: calc(56px + var(--space-4)) clamp(0.75rem, 3vw, 1.5rem) var(--space-8);
background-color: #121517;
min-height: calc(100vh - 56px);
height: auto;
overflow-y: visible;
display: block;
}
.interactive-stage.isolated-view {
height: auto;
min-height: calc(100vh - 56px);
max-height: none;
overflow-y: visible;
display: block;
padding: calc(56px + var(--space-4)) clamp(0.75rem, 3vw, 1.5rem) var(--space-12) clamp(0.75rem, 3vw, 1.5rem);
}
.interactive-stage.isolated-view .stage-grid {
display: flex;
flex-direction: column;
height: auto;
max-height: none;
gap: var(--space-8);
}
.interactive-stage.isolated-view .retro-module-card {
order: 1;
height: auto;
max-height: none;
width: 100%;
}
.interactive-stage.isolated-view .profile-module-card {
order: 2;
height: auto;
max-height: none;
overflow: visible;
width: 100%;
}
.interactive-stage.isolated-view .vintage-monitor-wrapper {
max-height: none;
width: 100%;
max-width: 520px;
margin: 0 auto;
}
}
/* ============================================================================== /* ==============================================================================
MÓDULOS INTERACTIVOS (50/50 HORIZONTAL) ESTRUCTURA DE SECCIONES CONTINUAS (Single Page Scroll Flow)
============================================================================== */ ============================================================================== */
.interactive-stage { .landing-section {
width: 100%; width: 100%;
padding: var(--space-16) clamp(1rem, 3vw, 2.5rem) var(--space-12) clamp(1rem, 3vw, 2.5rem); position: relative;
background-color: #121517; box-sizing: border-box;
background: linear-gradient(180deg, #000000 0%, #121517 var(--space-12)); }
.section-container {
width: 100%;
max-width: 1540px;
margin: 0 auto;
padding: 0 clamp(1rem, 3vw, 2.5rem);
box-sizing: border-box;
}
/* Cabeceras de Sección Cyber-Zen */
.section-lead-header {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: var(--space-8);
padding-bottom: var(--space-3);
border-bottom: 1px solid var(--zen-border-subtle);
}
.section-badge {
display: inline-flex;
align-items: center;
gap: 8px;
}
.badge-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background-color: var(--zen-accent-kintsugi);
box-shadow: 0 0 10px var(--zen-accent-kintsugi);
}
.badge-text {
font-family: var(--font-mono);
font-size: 0.6875rem;
font-weight: 700;
letter-spacing: 0.12em;
color: var(--zen-accent-kintsugi);
text-transform: uppercase;
}
.section-main-title {
margin: 0;
font-family: var(--font-sans);
font-size: clamp(1.75rem, 3.2vw, 2.5rem);
font-weight: 800;
letter-spacing: -0.02em;
color: var(--zen-text-primary);
line-height: 1.15;
}
/* 01. HERO SECTION */
.hero-section {
background-color: #000000;
width: 100%;
}
/* 02. RETRO OS & PROFILE */
.interactive-stage {
padding: var(--space-16) 0 var(--space-12) 0;
background: linear-gradient(180deg, #000000 0%, #121517 120px);
border-bottom: 1px solid var(--zen-border-subtle);
} }
.stage-grid { .stage-grid {
@ -293,397 +224,106 @@
grid-template-columns: 1fr 1fr; grid-template-columns: 1fr 1fr;
gap: var(--space-8); gap: var(--space-8);
width: 100%; width: 100%;
align-items: stretch; align-items: center;
}
@media (max-width: 960px) {
.stage-grid {
grid-template-columns: 1fr;
}
} }
.module-card { .module-card {
background: var(--zen-bg-surface);
border: 1px solid var(--zen-border-subtle);
border-radius: var(--zen-radius-sm);
overflow: hidden;
box-shadow: var(--zen-shadow-sm);
}
.retro-module-card {
background: #121517;
border: none;
box-shadow: none;
}
.profile-module-card {
background: transparent; background: transparent;
border: none; border: none;
box-shadow: none; box-shadow: none;
height: 100%; overflow: visible;
display: flex;
flex-direction: column;
} }
.profile-module-card app-technical-profile { .profile-module-card {
display: block;
height: 100%;
}
/* ==============================================================================
SECCIÓN DE PROYECTOS DESTACADOS
============================================================================== */
.projects-stage {
width: 100%;
padding: var(--space-16) clamp(1rem, 3vw, 2.5rem);
background-color: #121517;
box-sizing: border-box;
}
.projects-stage.isolated-view {
min-height: calc(100vh - 56px);
padding-top: calc(56px + var(--space-6));
padding-bottom: var(--space-8);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
}
.retro-module-card {
display: flex;
align-items: center; align-items: center;
justify-content: center;
}
.retro-module-card app-retro-os {
display: block;
width: 100%;
max-width: 680px;
margin: 0 auto;
}
/* 03. PROJECTS SECTION */
.projects-stage {
padding: var(--space-16) 0;
background-color: #121517; background-color: #121517;
border-bottom: 1px solid var(--zen-border-subtle);
} }
.projects-stage-inner { .projects-stage-inner {
width: 100%; width: 100%;
max-width: 1540px;
margin: 0 auto;
} }
/* ============================================================================== /* 04. SIMULATOR SECTION */
SECCIÓN: SIMULADOR DE RESPUESTA A INCIDENTES CLOUD
============================================================================== */
.simulator-stage { .simulator-stage {
width: 100%; padding: var(--space-16) 0;
padding: var(--space-12) clamp(1rem, 3vw, 2.5rem); background-color: #0e1114;
background-color: #121517; border-bottom: 1px solid var(--zen-border-subtle);
box-sizing: border-box;
} }
.simulator-stage.isolated-view { /* 05. TERMINAL SECTION */
min-height: calc(100vh - 56px);
padding-top: calc(56px + var(--space-4));
padding-bottom: var(--space-6);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #121517;
box-sizing: border-box;
}
/* ==============================================================================
SECCIÓN: TERMINAL ARCH LINUX
============================================================================== */
.terminal-stage { .terminal-stage {
width: 100%; padding: var(--space-16) 0;
padding: var(--space-16) clamp(1rem, 3vw, 2.5rem);
background-color: #121517; background-color: #121517;
box-sizing: border-box; border-bottom: 1px solid var(--zen-border-subtle);
}
.terminal-stage.isolated-view {
min-height: calc(100vh - 56px);
padding-top: calc(56px + var(--space-4));
padding-bottom: var(--space-6);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #121517;
box-sizing: border-box;
} }
.terminal-stage-inner { .terminal-stage-inner {
max-width: 1540px;
margin: 0 auto;
width: 100%; width: 100%;
display: flex;
flex-direction: column;
gap: var(--space-4);
} }
/* Cabecera Normalizada de Sección */ /* 06. CONTACT SECTION */
.terminal-section-header {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding-bottom: var(--space-2);
border-bottom: 1px solid var(--zen-border-subtle);
margin-bottom: var(--space-1);
}
.terminal-section-header .header-left,
.terminal-section-header .title-with-badge {
display: flex;
align-items: center;
gap: var(--space-3);
}
.terminal-section-header .pulse-indicator {
width: 10px;
height: 10px;
border-radius: 50%;
background-color: var(--zen-accent-kintsugi);
box-shadow: 0 0 12px var(--zen-accent-kintsugi);
flex-shrink: 0;
}
.terminal-section-header .section-title {
margin: 0;
font-family: var(--font-sans);
font-size: clamp(1.6rem, 3vw, 2.25rem);
font-weight: 800;
letter-spacing: -0.01em;
color: var(--zen-text-primary);
line-height: 1.15;
text-transform: uppercase;
}
/* ==============================================================================
SECCIÓN: CONTACTO
============================================================================== */
.contact-stage { .contact-stage {
width: 100%; padding: var(--space-16) 0;
background-color: #121517; background-color: #0e1114;
}
.contact-stage.isolated-view {
min-height: calc(100vh - 56px);
padding-top: 56px;
background-color: #121517;
} }
/* ============================================================================== /* ==============================================================================
FLECHAS SUTILES FLOTANTES DE NAVEGACIÓN (DEBAJO DEL NAVBAR) ADAPTABILIDAD RESPONSIVA (Tablet & Mobile)
============================================================================== */ ============================================================================== */
.zen-floating-nav-controls { @media (max-width: 960px) {
position: fixed; .stage-grid {
top: 68px; grid-template-columns: 1fr;
left: 0; gap: var(--space-10);
right: 0; }
width: 100%;
pointer-events: none; .retro-module-card {
z-index: 950; order: 1;
display: flex; max-width: 520px;
justify-content: space-between; margin: 0 auto;
padding: 0 clamp(0.75rem, 2.5vw, 2.5rem); }
box-sizing: border-box;
.profile-module-card {
order: 2;
}
.section-lead-header {
margin-bottom: var(--space-6);
}
} }
.zen-nav-arrow-btn { @media (max-width: 640px) {
pointer-events: auto;
display: inline-flex;
align-items: center;
gap: 8px;
background: rgba(10, 13, 20, 0.75);
backdrop-filter: blur(12px) saturate(160%);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 999px;
padding: 6px 14px;
color: #9aa5b8;
font-family: var(--font-mono, monospace);
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
opacity: 1;
}
.zen-nav-arrow-btn:hover:not(:disabled) {
color: #f0f3f8;
border-color: rgba(197, 155, 39, 0.5);
background: rgba(18, 22, 32, 0.9);
transform: translateY(-1px);
box-shadow: 0 0 14px rgba(197, 155, 39, 0.25);
}
.zen-nav-arrow-btn.disabled,
.zen-nav-arrow-btn:disabled {
opacity: 0;
pointer-events: none;
transform: scale(0.92);
}
.nav-arrow-svg {
width: 14px;
height: 14px;
stroke: #c59b27;
flex-shrink: 0;
transition: transform 0.2s ease;
}
.nav-arrow-left:hover:not(:disabled) .nav-arrow-svg {
transform: translateX(-3px);
}
.nav-arrow-right:hover:not(:disabled) .nav-arrow-svg {
transform: translateX(3px);
}
.nav-arrow-label {
letter-spacing: 0.02em;
white-space: nowrap;
}
/* ==============================================================================
TELÓN DE TRANSICIÓN SUAVE Y SCANLINE ZEN
============================================================================== */
.zen-transition-curtain {
position: fixed;
inset: 0;
z-index: 9999;
background: rgba(8, 10, 14, 0.94);
backdrop-filter: blur(10px);
pointer-events: none;
opacity: 0;
overflow: hidden;
transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.zen-transition-curtain.visible {
opacity: 1;
pointer-events: auto;
}
.curtain-logo-wrapper {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 14px;
animation: logoWrapperEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.logo-glow-ring {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 120px;
height: 120px;
border-radius: 50%;
background: radial-gradient(circle, rgba(197, 155, 39, 0.5) 0%, rgba(56, 189, 248, 0.2) 50%, transparent 70%);
filter: blur(16px);
animation: logoPulseGlow 1.2s ease-in-out infinite alternate;
pointer-events: none;
}
.logo-image-container {
position: relative;
width: 78px;
height: 78px;
border-radius: 14px;
overflow: hidden;
border: 1px solid rgba(197, 155, 39, 0.5);
box-shadow: 0 0 28px rgba(197, 155, 39, 0.35), 0 8px 32px rgba(0, 0, 0, 0.85);
background: #000000;
display: flex;
align-items: center;
justify-content: center;
}
.curtain-logo-img {
width: 100%;
height: 100%;
object-fit: cover;
transform: scale(0.92);
animation: logoBreath 1.2s ease-in-out infinite alternate;
}
.logo-shimmer-sweep {
position: absolute;
inset: 0;
background: linear-gradient(110deg, transparent 25%, rgba(255, 255, 255, 0.45) 50%, transparent 75%);
transform: translateX(-100%);
animation: logoShimmer 1.0s cubic-bezier(0.4, 0, 0.2, 1) infinite;
pointer-events: none;
}
@keyframes logoWrapperEnter {
from { opacity: 0; transform: scale(0.92); }
to { opacity: 1; transform: scale(1); }
}
@keyframes logoPulseGlow {
0% { transform: scale(0.85); opacity: 0.4; }
100% { transform: scale(1.3); opacity: 0.95; }
}
@keyframes logoBreath {
0% { transform: scale(0.88); filter: drop-shadow(0 0 4px rgba(197, 155, 39, 0.3)); }
100% { transform: scale(0.96); filter: drop-shadow(0 0 12px rgba(197, 155, 39, 0.7)); }
}
@keyframes logoShimmer {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
@media (max-width: 768px) {
.zen-header { .zen-header {
padding: 0 8px; padding: 0 0.75rem;
gap: 6px;
height: 50px;
} }
.time-location-block { .time-location-block {
display: none; display: none;
} }
.zen-nav {
gap: 3px;
padding: 3px 6px;
background: rgba(255, 255, 255, 0.03);
border: 1px solid rgba(255, 255, 255, 0.06);
border-radius: 20px;
flex: 1;
min-width: 0;
scroll-behavior: smooth;
}
.nav-item { .nav-item {
padding: 4px 7px; font-size: 0.75rem;
font-size: 0.6875rem; padding: 4px 8px;
border-radius: 14px;
flex-shrink: 0;
}
.lang-toggle-btn {
padding: 3px 6px;
font-size: 0.6875rem;
}
.zen-floating-nav-controls {
top: 58px;
padding: 0 10px;
}
.nav-arrow-label {
display: none;
}
.zen-nav-arrow-btn {
padding: 6px 10px;
} }
} }

View File

@ -1,7 +1,12 @@
<div class="landing-container" [class.transitioning-lock]="isCurtainVisible()"> <div class="landing-container">
<!-- Header Minimalista Flotante (Glassmorphism & Zen High-Contrast) --> <!-- Header Minimalista Flotante (Glassmorphism & Zen High-Contrast) -->
<header class="zen-header"> <header class="zen-header">
<button type="button" class="brand-block-btn" (click)="setSection('hero')" [attr.aria-label]="i18n.t().navHome"> <button
type="button"
class="brand-block-btn"
(click)="scrollToSection('hero')"
[attr.aria-label]="i18n.t().navHome"
>
<img src="assets/images/logo.jpg" alt="Bryan Baño" class="brand-logo" /> <img src="assets/images/logo.jpg" alt="Bryan Baño" class="brand-logo" />
</button> </button>
@ -12,7 +17,7 @@
class="nav-item" class="nav-item"
data-nav="hero" data-nav="hero"
[class.active]="activeSection() === 'hero'" [class.active]="activeSection() === 'hero'"
(click)="setSection('hero')" (click)="scrollToSection('hero')"
> >
{{ i18n.t().navHome }} {{ i18n.t().navHome }}
</button> </button>
@ -22,7 +27,7 @@
class="nav-item" class="nav-item"
data-nav="retro" data-nav="retro"
[class.active]="activeSection() === 'retro'" [class.active]="activeSection() === 'retro'"
(click)="setSection('retro')" (click)="scrollToSection('retro')"
> >
{{ i18n.t().navRetro }} {{ i18n.t().navRetro }}
</button> </button>
@ -32,7 +37,7 @@
class="nav-item" class="nav-item"
data-nav="projects" data-nav="projects"
[class.active]="activeSection() === 'projects'" [class.active]="activeSection() === 'projects'"
(click)="setSection('projects')" (click)="scrollToSection('projects')"
> >
{{ i18n.t().navProjects }} {{ i18n.t().navProjects }}
</button> </button>
@ -42,7 +47,7 @@
class="nav-item" class="nav-item"
data-nav="simulator" data-nav="simulator"
[class.active]="activeSection() === 'simulator'" [class.active]="activeSection() === 'simulator'"
(click)="setSection('simulator')" (click)="scrollToSection('simulator')"
> >
{{ i18n.t().navSimulator }} {{ i18n.t().navSimulator }}
</button> </button>
@ -52,7 +57,7 @@
class="nav-item" class="nav-item"
data-nav="terminal" data-nav="terminal"
[class.active]="activeSection() === 'terminal'" [class.active]="activeSection() === 'terminal'"
(click)="setSection('terminal')" (click)="scrollToSection('terminal')"
> >
{{ i18n.t().navTerminal }} {{ i18n.t().navTerminal }}
</button> </button>
@ -62,7 +67,7 @@
class="nav-item" class="nav-item"
data-nav="contact" data-nav="contact"
[class.active]="activeSection() === 'contact'" [class.active]="activeSection() === 'contact'"
(click)="setSection('contact')" (click)="scrollToSection('contact')"
> >
{{ i18n.t().navContact }} {{ i18n.t().navContact }}
</button> </button>
@ -76,126 +81,111 @@
<span class="location-label"> {{ i18n.t().location }}</span> <span class="location-label"> {{ i18n.t().location }}</span>
</div> </div>
<button type="button" class="lang-toggle-btn" (click)="i18n.toggleLanguage()" <button
[attr.aria-label]="i18n.t().switchLangAria"> type="button"
class="lang-toggle-btn"
(click)="i18n.toggleLanguage()"
[attr.aria-label]="i18n.t().switchLangAria"
>
{{ i18n.currentLang() === 'es' ? 'EN' : 'ES' }} {{ i18n.currentLang() === 'es' ? 'EN' : 'ES' }}
</button> </button>
</div> </div>
</header> </header>
<!-- Flechas Sutiles de Navegación Flotantes (Izquierda y Derecha debajo del Navbar) --> <!-- SECCIÓN 01: Hero con Laptop 3D desarmable al scroll (240 frames) -->
<aside class="zen-floating-nav-controls" aria-label="Navegación entre secciones"> <section id="hero" class="landing-section hero-section">
<button <app-hero-3d></app-hero-3d>
type="button" </section>
class="zen-nav-arrow-btn nav-arrow-left"
[class.disabled]="!hasPrevSection()"
[disabled]="!hasPrevSection()"
(click)="goToPrevSection()"
[attr.aria-label]="i18n.t().navPrevSection + ': ' + prevSectionName()"
[title]="hasPrevSection() ? i18n.t().navPrevSection + ' (' + prevSectionName() + ')' : ''"
>
<svg class="nav-arrow-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<polyline points="15 18 9 12 15 6"></polyline>
</svg>
<span class="nav-arrow-label">{{ prevSectionName() }}</span>
</button>
<button <!-- SECCIÓN 02: Módulos Interactivos (Perfil Técnico & Retro Monitor CRT) -->
type="button" <section id="retro" class="landing-section interactive-stage">
class="zen-nav-arrow-btn nav-arrow-right" <div class="section-container">
[class.disabled]="!hasNextSection()" <header class="section-lead-header">
[disabled]="!hasNextSection()" <div class="section-badge">
(click)="goToNextSection()" <span class="badge-dot"></span>
[attr.aria-label]="i18n.t().navNextSection + ': ' + nextSectionName()" <span class="badge-text">// 01 ARCHITECTURE & RETRO COMPUTING</span>
[title]="hasNextSection() ? i18n.t().navNextSection + ' (' + nextSectionName() + ')' : ''" </div>
> <h2 class="section-main-title">{{ i18n.t().navRetro }}</h2>
<span class="nav-arrow-label">{{ nextSectionName() }}</span> </header>
<svg class="nav-arrow-svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</button>
</aside>
<!-- Telón de Transición Suave con Animación de Logo Zen -->
<div
class="zen-transition-curtain"
[class.visible]="isCurtainVisible()"
aria-hidden="true"
>
<div class="curtain-logo-wrapper">
<div class="logo-glow-ring"></div>
<div class="logo-image-container">
<img src="assets/images/logo.jpg" alt="Bryan Baño Logo" class="curtain-logo-img" />
<div class="logo-shimmer-sweep"></div>
</div>
</div>
</div>
<!-- Hero con Laptop 3D desarmable al scroll (240 frames) -->
@if (activeSection() === 'hero') {
<main class="hero-container isolated-view">
<app-hero-3d [initialPosition]="heroEntryPosition()"></app-hero-3d>
</main>
}
<!-- Contenedor Base para Módulos Interactivos (50/50 Perfil Técnico y Retro Monitor) -->
@if (activeSection() === 'retro') {
<section class="interactive-stage isolated-view">
<div class="stage-grid"> <div class="stage-grid">
<!-- Slot 1: Perfil Técnico & Filosofía de Ingeniería --> <!-- Slot 1: Perfil Técnico & Filosofía de Ingeniería -->
<article class="module-card profile-module-card"> <article class="module-card profile-module-card">
<app-technical-profile></app-technical-profile> <app-technical-profile></app-technical-profile>
</article> </article>
<!-- Slot 2: Retro OS en Monitor CRT Antiguo (50% Horizontal) --> <!-- Slot 2: Retro OS en Monitor CRT Antiguo -->
<article class="module-card retro-module-card"> <article class="module-card retro-module-card">
<app-retro-os></app-retro-os> <app-retro-os></app-retro-os>
</article> </article>
</div> </div>
</section> </div>
} </section>
<!-- SECCIÓN 03: Proyectos Destacados (Casos Reales del CV) -->
<section id="projects" class="landing-section projects-stage">
<div class="section-container">
<header class="section-lead-header">
<div class="section-badge">
<span class="badge-dot"></span>
<span class="badge-text">// 02 ENTERPRISE SYSTEMS</span>
</div>
<h2 class="section-main-title">{{ i18n.t().navProjects }}</h2>
</header>
<!-- Sección de Proyectos Destacados (Casos Reales del CV a Ancho Completo) -->
@if (activeSection() === 'projects') {
<section class="projects-stage isolated-view">
<div class="projects-stage-inner"> <div class="projects-stage-inner">
<app-featured-projects></app-featured-projects> <app-featured-projects></app-featured-projects>
</div> </div>
</section> </div>
} </section>
<!-- SECCIÓN 04: Simulador de Incidentes Cloud (Packet Tracer) -->
<section id="simulator" class="landing-section simulator-stage">
<div class="section-container">
<header class="section-lead-header">
<div class="section-badge">
<span class="badge-dot"></span>
<span class="badge-text">// 03 CLOUD TELEMETRY & SECURITY</span>
</div>
<h2 class="section-main-title">{{ i18n.t().navSimulator }}</h2>
</header>
<!-- Sección Simulador de Respuesta a Incidentes (Visualización de Arquitectura Cloud Security Serverless) -->
@if (activeSection() === 'simulator') {
<section class="simulator-stage isolated-view">
<app-incident-simulator></app-incident-simulator> <app-incident-simulator></app-incident-simulator>
</section> </div>
} </section>
<!-- Sección Dedicada para la Terminal Interactiva Arch Linux / Fish Shell (Espaciosa y a Escala Completa) --> <!-- SECCIÓN 05: Terminal Interactiva Arch Linux / Fish Shell -->
@if (activeSection() === 'terminal') { <section id="terminal" class="landing-section terminal-stage">
<section class="terminal-stage isolated-view"> <div class="section-container">
<div class="terminal-stage-inner"> <div class="terminal-stage-inner">
<!-- Cabecera Normalizada de Sección --> <header class="section-lead-header">
<header class="terminal-section-header"> <div class="section-badge">
<div class="header-left"> <span class="badge-dot"></span>
<div class="title-with-badge"> <span class="badge-text">// 04 INTERACTIVE CLI ENGINE</span>
<span class="pulse-indicator" aria-hidden="true"></span>
<h2 class="section-title">{{ i18n.t().navTerminal }}</h2>
</div>
</div> </div>
<h2 class="section-main-title">{{ i18n.t().navTerminal }}</h2>
</header> </header>
<app-terminal></app-terminal> <app-terminal></app-terminal>
</div> </div>
</section> </div>
} </section>
<!-- SECCIÓN 06: Contacto & Muro de Firmas Guestbook -->
<section id="contact" class="landing-section contact-stage">
<div class="section-container">
<header class="section-lead-header">
<div class="section-badge">
<span class="badge-dot"></span>
<span class="badge-text">// 05 CONNECT & GUESTBOOK</span>
</div>
<h2 class="section-main-title">{{ i18n.t().navContact }}</h2>
</header>
<!-- Sección de Contacto Corporativa Premium (Full Width debajo de la Terminal) -->
@if (activeSection() === 'contact') {
<section class="contact-stage isolated-view">
<app-contact-section></app-contact-section> <app-contact-section></app-contact-section>
</section> </div>
} </section>
<!-- Asistente Virtual Flotante Cyber-Zen (n8n + Gemini) --> <!-- Asistente Virtual Flotante Cyber-Zen (n8n + Gemini) -->
<app-chat-bot></app-chat-bot> <app-chat-bot></app-chat-bot>
</div> </div>

View File

@ -1,4 +1,14 @@
import { Component, ChangeDetectionStrategy, OnInit, OnDestroy, signal, computed, inject, ViewChild, ElementRef } from '@angular/core'; import {
Component,
ChangeDetectionStrategy,
OnInit,
AfterViewInit,
OnDestroy,
signal,
inject,
ElementRef,
ViewChild
} from '@angular/core';
import { Hero3dComponent } from '../hero-3d/hero-3d.component'; import { Hero3dComponent } from '../hero-3d/hero-3d.component';
import { RetroOsComponent } from '../retro-os/retro-os.component'; import { RetroOsComponent } from '../retro-os/retro-os.component';
import { TerminalComponent } from '../terminal/terminal.component'; import { TerminalComponent } from '../terminal/terminal.component';
@ -39,305 +49,118 @@ export const LANDING_SECTIONS: readonly LandingSection[] = [
styleUrl: './landing.component.css', styleUrl: './landing.component.css',
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class LandingComponent implements OnInit, OnDestroy { export class LandingComponent implements OnInit, AfterViewInit, OnDestroy {
protected readonly i18n = inject(I18nService); protected readonly i18n = inject(I18nService);
protected readonly currentYear = signal(new Date().getFullYear()); protected readonly currentYear = signal(new Date().getFullYear());
protected readonly currentTime = signal<string>(''); protected readonly currentTime = signal<string>('');
protected readonly activeSection = signal<LandingSection>('hero'); protected readonly activeSection = signal<LandingSection>('hero');
protected readonly heroEntryPosition = signal<'top' | 'bottom'>('top');
protected readonly isCurtainVisible = signal<boolean>(false);
protected readonly transitionTargetSection = signal<LandingSection>('hero');
protected readonly hasPrevSection = computed(() => {
return LANDING_SECTIONS.indexOf(this.activeSection()) > 0;
});
protected readonly hasNextSection = computed(() => {
return LANDING_SECTIONS.indexOf(this.activeSection()) < LANDING_SECTIONS.length - 1;
});
protected readonly prevSectionName = computed(() => {
const idx = LANDING_SECTIONS.indexOf(this.activeSection());
return idx > 0 ? this.getSectionTitle(LANDING_SECTIONS[idx - 1]) : '';
});
protected readonly nextSectionName = computed(() => {
const idx = LANDING_SECTIONS.indexOf(this.activeSection());
return idx < LANDING_SECTIONS.length - 1 ? this.getSectionTitle(LANDING_SECTIONS[idx + 1]) : '';
});
protected readonly transitionTargetTitle = computed(() => {
return this.getSectionTitle(this.transitionTargetSection());
});
private clockInterval: ReturnType<typeof setInterval> | null = null; private clockInterval: ReturnType<typeof setInterval> | null = null;
private readonly timeFormatter = new Intl.DateTimeFormat('en-GB', { private sectionObserver?: IntersectionObserver;
timeZone: 'America/Guayaquil', private isUserClickScrolling = false;
hour: '2-digit', private clickScrollTimer: ReturnType<typeof setTimeout> | null = null;
minute: '2-digit',
second: '2-digit',
hour12: false
});
@ViewChild('navContainer') private navContainerRef?: ElementRef<HTMLElement>; @ViewChild('navContainer') private navContainerRef?: ElementRef<HTMLElement>;
private isTransitioning = false;
private touchStartY = 0;
private touchStartX = 0;
private touchStartAtTop = false;
private touchStartAtBottom = false;
private wheelDeltaAccum = 0;
private wheelGestureArmed = false;
private lastWheelAt = 0;
private transitionTimer: ReturnType<typeof setTimeout> | null = null;
ngOnInit(): void { ngOnInit(): void {
this.updateClock(); this.updateClock();
this.clockInterval = setInterval(() => this.updateClock(), 1000); this.clockInterval = setInterval(() => this.updateClock(), 1000);
}
ngAfterViewInit(): void {
this.setupIntersectionObserver();
this.parseInitialHash(); this.parseInitialHash();
this.setupScrollTransitions();
} }
getSectionTitle(section: LandingSection): string { ngOnDestroy(): void {
const dict = this.i18n.t(); if (this.clockInterval) clearInterval(this.clockInterval);
switch (section) { if (this.clickScrollTimer) clearTimeout(this.clickScrollTimer);
case 'hero': return dict.navHome; if (this.sectionObserver) {
case 'retro': return dict.navRetro; this.sectionObserver.disconnect();
case 'projects': return dict.navProjects;
case 'simulator': return dict.navSimulator;
case 'terminal': return dict.navTerminal;
case 'contact': return dict.navContact;
} }
} }
setSection(section: LandingSection, entryPosition: 'top' | 'bottom' = 'top'): void { scrollToSection(section: LandingSection): void {
if (this.activeSection() === section || this.isTransitioning) return; this.activeSection.set(section);
this.isTransitioning = true; this.isUserClickScrolling = true;
this.transitionTargetSection.set(section); if (this.clickScrollTimer) clearTimeout(this.clickScrollTimer);
this.isCurtainVisible.set(true); this.clickScrollTimer = setTimeout(() => {
this.isUserClickScrolling = false;
}, 900);
if (typeof document !== 'undefined') { if (typeof window === 'undefined') return;
document.documentElement.style.overflow = 'hidden';
document.body.style.overflow = 'hidden'; if (section === 'hero') {
window.scrollTo({ top: 0, behavior: 'smooth' });
} else {
const el = document.getElementById(section);
if (el) {
const headerOffset = 64;
const elementPosition = el.getBoundingClientRect().top;
const offsetPosition = elementPosition + window.pageYOffset - headerOffset;
window.scrollTo({ top: offsetPosition, behavior: 'smooth' });
}
} }
if (this.transitionTimer) clearTimeout(this.transitionTimer); const hash = section === 'hero' ? '' : `#${section}`;
const url = window.location.pathname + window.location.search + hash;
window.history.replaceState(null, '', url);
this.scrollActiveNavIntoView(section);
}
// Initial phase: show curtain and animated logo private setupIntersectionObserver(): void {
this.transitionTimer = setTimeout(() => { if (typeof window === 'undefined' || !('IntersectionObserver' in window)) return;
if (section === 'hero') {
this.heroEntryPosition.set(entryPosition);
}
this.activeSection.set(section); this.sectionObserver = new IntersectionObserver((entries) => {
if (this.isUserClickScrolling) return;
if (typeof window !== 'undefined') { for (const entry of entries) {
const hash = section === 'hero' ? '' : `#${section}`; if (entry.isIntersecting) {
const url = window.location.pathname + window.location.search + hash; const id = entry.target.id as LandingSection;
window.history.replaceState(null, '', url); if (LANDING_SECTIONS.includes(id)) {
this.scrollActiveNavIntoView(section); this.activeSection.set(id);
const hash = id === 'hero' ? '' : `#${id}`;
if (entryPosition === 'bottom') { window.history.replaceState(null, '', window.location.pathname + window.location.search + hash);
const maxScroll = Math.max(0, document.documentElement.scrollHeight - window.innerHeight); this.scrollActiveNavIntoView(id);
window.scrollTo({ top: maxScroll, behavior: 'instant' });
} else {
window.scrollTo({ top: 0, behavior: 'instant' });
}
}
// Appreciate the animated logo for a full animation cycle before smoothly fading out
setTimeout(() => {
this.isCurtainVisible.set(false);
if (typeof document !== 'undefined') {
document.documentElement.style.overflow = '';
document.body.style.overflow = '';
}
if (typeof window !== 'undefined') {
if (entryPosition === 'bottom') {
const maxScroll = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
window.scrollTo({ top: maxScroll, behavior: 'instant' });
} else {
window.scrollTo({ top: 0, behavior: 'instant' });
} }
} }
setTimeout(() => {
this.isTransitioning = false;
}, 300);
}, 550);
}, 220);
}
private setupScrollTransitions(): void {
if (typeof window === 'undefined') return;
window.addEventListener('wheel', this.onWheel, { passive: false });
window.addEventListener('touchstart', this.onTouchStart, { passive: true });
window.addEventListener('touchend', this.onTouchEnd, { passive: true });
}
private onWheel = (e: WheelEvent): void => {
if (this.isTransitioning || this.isCurtainVisible()) {
e.preventDefault();
return;
}
// Ignorar si el usuario está interactuando con un modal
const target = e.target as HTMLElement | null;
if (target?.closest('.project-detail-overlay')) {
return;
}
const now = performance.now();
const isNewGesture = now - this.lastWheelAt > 160;
this.lastWheelAt = now;
const scrollY = window.scrollY || window.pageYOffset;
const maxScroll = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
const goingDown = e.deltaY > 0;
const atBoundary = goingDown ? scrollY >= maxScroll - 6 : scrollY <= 6;
const innerCanScroll = atBoundary && this.canInnerScroll(target, goingDown);
if (innerCanScroll) {
this.wheelDeltaAccum = 0;
this.wheelGestureArmed = false;
return;
}
if (isNewGesture) {
this.wheelDeltaAccum = 0;
this.wheelGestureArmed = atBoundary;
}
if (!this.wheelGestureArmed || !atBoundary) {
this.wheelDeltaAccum = 0;
return;
}
this.wheelDeltaAccum += e.deltaY;
if (Math.abs(this.wheelDeltaAccum) > 160) {
this.wheelDeltaAccum = 0;
this.wheelGestureArmed = false;
if (goingDown) {
this.goToNextSection();
} else {
this.goToPrevSection();
} }
} }, {
}; rootMargin: '-20% 0px -60% 0px',
threshold: 0
});
private canInnerScroll(target: HTMLElement | null, goingDown: boolean): boolean { LANDING_SECTIONS.forEach(id => {
for (let el = target; el && el !== document.documentElement; el = el.parentElement) { const el = document.getElementById(id);
const overflowY = getComputedStyle(el).overflowY; if (el) this.sectionObserver?.observe(el);
if (overflowY !== 'auto' && overflowY !== 'scroll') continue; });
if (goingDown ? el.scrollTop + el.clientHeight < el.scrollHeight - 1 : el.scrollTop > 0) {
return true;
}
}
return false;
}
private onTouchStart = (e: TouchEvent): void => {
if (this.isTransitioning || this.isCurtainVisible()) return;
if (e.touches.length > 0) {
this.touchStartY = e.touches[0].clientY;
this.touchStartX = e.touches[0].clientX;
const scrollY = window.scrollY || window.pageYOffset;
const maxScroll = Math.max(0, document.documentElement.scrollHeight - window.innerHeight);
const target = e.target as HTMLElement | null;
this.touchStartAtTop = scrollY <= 10 && !this.canInnerScroll(target, false);
this.touchStartAtBottom = scrollY >= maxScroll - 10 && !this.canInnerScroll(target, true);
}
};
private onTouchEnd = (e: TouchEvent): void => {
if (this.isTransitioning || this.isCurtainVisible() || e.changedTouches.length === 0) return;
const target = e.target as HTMLElement | null;
if (target?.closest('.project-detail-overlay')) {
return;
}
const touchEndY = e.changedTouches[0].clientY;
const touchEndX = e.changedTouches[0].clientX;
const diffY = this.touchStartY - touchEndY;
const diffX = this.touchStartX - touchEndX;
if (Math.abs(diffY) > 50 && Math.abs(diffY) > Math.abs(diffX) * 1.3) {
if (diffY > 0 && this.touchStartAtBottom) {
this.goToNextSection();
} else if (diffY < 0 && this.touchStartAtTop) {
this.goToPrevSection();
}
}
};
protected goToNextSection(): void {
const currentIndex = LANDING_SECTIONS.indexOf(this.activeSection());
if (currentIndex >= 0 && currentIndex < LANDING_SECTIONS.length - 1) {
const next = LANDING_SECTIONS[currentIndex + 1];
this.setSection(next, 'top');
}
}
protected goToPrevSection(): void {
const currentIndex = LANDING_SECTIONS.indexOf(this.activeSection());
if (currentIndex > 0) {
const prev = LANDING_SECTIONS[currentIndex - 1];
this.setSection(prev, 'bottom');
}
}
private scrollActiveNavIntoView(section: LandingSection): void {
if (typeof window === 'undefined') return;
setTimeout(() => {
if (!this.navContainerRef) return;
const activeEl = this.navContainerRef.nativeElement.querySelector(`[data-nav="${section}"]`);
if (activeEl) {
activeEl.scrollIntoView({ behavior: 'smooth', inline: 'center', block: 'nearest' });
}
}, 60);
} }
private parseInitialHash(): void { private parseInitialHash(): void {
if (typeof window === 'undefined') return; if (typeof window === 'undefined') return;
const hash = window.location.hash.toLowerCase().replace('#', ''); const hash = window.location.hash.replace('#', '') as LandingSection;
let targetSection: LandingSection = 'hero'; if (LANDING_SECTIONS.includes(hash)) {
if (hash === 'retro' || hash === 'desktop') { setTimeout(() => this.scrollToSection(hash), 120);
targetSection = 'retro'; }
} else if (hash === 'projects' || hash === 'proyectos') { }
targetSection = 'projects';
} else if (hash === 'simulator' || hash === 'simulador') { private scrollActiveNavIntoView(section: LandingSection): void {
targetSection = 'simulator'; if (!this.navContainerRef) return;
} else if (hash === 'terminal') { const navEl = this.navContainerRef.nativeElement;
targetSection = 'terminal'; const activeBtn = navEl.querySelector(`[data-nav="${section}"]`) as HTMLElement | null;
} else if (hash === 'contact' || hash === 'contacto') { if (activeBtn) {
targetSection = 'contact'; activeBtn.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'center' });
} }
this.activeSection.set(targetSection);
this.scrollActiveNavIntoView(targetSection);
} }
private updateClock(): void { private updateClock(): void {
this.currentTime.set(this.timeFormatter.format(new Date())); const formatter = new Intl.DateTimeFormat('en-GB', {
} timeZone: 'America/Guayaquil',
hour: '2-digit',
ngOnDestroy(): void { minute: '2-digit',
if (this.clockInterval !== null) { second: '2-digit',
clearInterval(this.clockInterval); hour12: false
} });
if (this.transitionTimer !== null) { this.currentTime.set(formatter.format(new Date()));
clearTimeout(this.transitionTimer);
}
if (typeof document !== 'undefined') {
document.documentElement.style.overflow = '';
document.body.style.overflow = '';
}
if (typeof window !== 'undefined') {
window.removeEventListener('wheel', this.onWheel);
window.removeEventListener('touchstart', this.onTouchStart);
window.removeEventListener('touchend', this.onTouchEnd);
}
} }
} }

View File

@ -120,6 +120,11 @@
padding: 0; padding: 0;
} }
html {
scroll-behavior: smooth;
scroll-padding-top: 64px;
}
html, body { html, body {
width: 100%; width: 100%;
min-height: 100vh; min-height: 100vh;