feat(theme): refine retro monitor, ascii portrait, and ambient matrix rain in light mode #10
|
|
@ -7,34 +7,8 @@
|
||||||
.contact-section {
|
.contact-section {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
background-color: #121517;
|
|
||||||
padding: clamp(5rem, 8vw, 7rem) 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-matrix-canvas {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
pointer-events: none;
|
|
||||||
z-index: 0;
|
|
||||||
display: block;
|
|
||||||
background: transparent;
|
background: transparent;
|
||||||
opacity: 0;
|
padding: 0;
|
||||||
animation: fadeInMatrix 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes fadeInMatrix {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-10px);
|
|
||||||
}
|
|
||||||
to {
|
|
||||||
opacity: 0.65;
|
|
||||||
transform: translateY(0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.contact-container {
|
.contact-container {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
<section class="contact-section" id="contacto" role="region" [attr.aria-label]="i18n.t().contactEyebrow">
|
<section class="contact-section" id="contacto" role="region" [attr.aria-label]="i18n.t().contactEyebrow">
|
||||||
<!-- Fondo Animado: Lluvia de Código Matrix Verde -->
|
|
||||||
<canvas #rainCanvas class="contact-matrix-canvas" aria-hidden="true"></canvas>
|
|
||||||
|
|
||||||
<div class="contact-container">
|
<div class="contact-container">
|
||||||
<!-- Cabecera Normalizada de Sección -->
|
<!-- Cabecera Normalizada de Sección -->
|
||||||
<header class="contact-section-header">
|
<header class="contact-section-header">
|
||||||
|
|
|
||||||
|
|
@ -2,12 +2,7 @@ import {
|
||||||
Component,
|
Component,
|
||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
signal,
|
signal,
|
||||||
inject,
|
inject
|
||||||
ElementRef,
|
|
||||||
ViewChild,
|
|
||||||
OnInit,
|
|
||||||
AfterViewInit,
|
|
||||||
OnDestroy
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
|
|
@ -20,20 +15,6 @@ import { I18nService } from '../../../application/services/i18n.service';
|
||||||
import { GuestbookComponent } from '../guestbook/guestbook.component';
|
import { GuestbookComponent } from '../guestbook/guestbook.component';
|
||||||
import { NOTIFY_WEBHOOK_URL } from '../../../core/tokens/notify-config.token';
|
import { NOTIFY_WEBHOOK_URL } from '../../../core/tokens/notify-config.token';
|
||||||
|
|
||||||
interface DigitalRainColumn {
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
speed: number;
|
|
||||||
length: number;
|
|
||||||
opacity: number;
|
|
||||||
characters: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const BINARY_CHARS = '01';
|
|
||||||
const HEX_CHARS = '0123456789ABCDEF';
|
|
||||||
const CODE_CHARS = '{}[]()<>&|/\\:;=+-_*#$%@?!~^';
|
|
||||||
const TERM_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-contact-section',
|
selector: 'app-contact-section',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
|
@ -42,9 +23,7 @@ const TERM_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||||
styleUrl: './contact-section.component.css',
|
styleUrl: './contact-section.component.css',
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
})
|
})
|
||||||
export class ContactSectionComponent implements OnInit, AfterViewInit, OnDestroy {
|
export class ContactSectionComponent {
|
||||||
@ViewChild('rainCanvas') private readonly rainCanvas?: ElementRef<HTMLCanvasElement>;
|
|
||||||
|
|
||||||
protected readonly i18n = inject(I18nService);
|
protected readonly i18n = inject(I18nService);
|
||||||
private readonly http = inject(HttpClient);
|
private readonly http = inject(HttpClient);
|
||||||
private readonly notifyWebhookUrl = inject(NOTIFY_WEBHOOK_URL);
|
private readonly notifyWebhookUrl = inject(NOTIFY_WEBHOOK_URL);
|
||||||
|
|
@ -76,191 +55,6 @@ export class ContactSectionComponent implements OnInit, AfterViewInit, OnDestroy
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
private readonly columns: DigitalRainColumn[] = [];
|
|
||||||
private context?: CanvasRenderingContext2D;
|
|
||||||
private animationFrameId?: number;
|
|
||||||
private intersectionObserver?: IntersectionObserver;
|
|
||||||
private resizeObserver?: ResizeObserver;
|
|
||||||
private motionQuery?: MediaQueryList;
|
|
||||||
private isVisible = true;
|
|
||||||
private isReducedMotion = false;
|
|
||||||
private lastFrameTime = 0;
|
|
||||||
|
|
||||||
ngOnInit(): void {}
|
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
|
||||||
if (!this.rainCanvas) return;
|
|
||||||
|
|
||||||
const canvas = this.rainCanvas.nativeElement;
|
|
||||||
this.context = canvas.getContext('2d') ?? undefined;
|
|
||||||
if (!this.context) return;
|
|
||||||
|
|
||||||
this.motionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
|
||||||
this.isReducedMotion = this.motionQuery.matches;
|
|
||||||
this.motionQuery.addEventListener('change', this.onMotionPreferenceChange);
|
|
||||||
|
|
||||||
this.resizeObserver = new ResizeObserver(() => this.resizeCanvas());
|
|
||||||
this.resizeObserver.observe(canvas.parentElement ?? canvas);
|
|
||||||
|
|
||||||
this.intersectionObserver = new IntersectionObserver(([entry]) => {
|
|
||||||
this.isVisible = entry.isIntersecting;
|
|
||||||
if (this.isVisible && !this.isReducedMotion && this.animationFrameId === undefined) {
|
|
||||||
this.lastFrameTime = 0;
|
|
||||||
this.animationFrameId = requestAnimationFrame(this.animate);
|
|
||||||
}
|
|
||||||
}, { threshold: 0.05 });
|
|
||||||
this.intersectionObserver.observe(canvas);
|
|
||||||
|
|
||||||
this.resizeCanvas();
|
|
||||||
if (!this.isReducedMotion) {
|
|
||||||
this.animationFrameId = requestAnimationFrame(this.animate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
|
||||||
if (this.animationFrameId !== undefined) {
|
|
||||||
cancelAnimationFrame(this.animationFrameId);
|
|
||||||
}
|
|
||||||
this.motionQuery?.removeEventListener('change', this.onMotionPreferenceChange);
|
|
||||||
this.intersectionObserver?.disconnect();
|
|
||||||
this.resizeObserver?.disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
private readonly onMotionPreferenceChange = (event: MediaQueryListEvent): void => {
|
|
||||||
this.isReducedMotion = event.matches;
|
|
||||||
if (this.isReducedMotion) {
|
|
||||||
if (this.animationFrameId !== undefined) {
|
|
||||||
cancelAnimationFrame(this.animationFrameId);
|
|
||||||
this.animationFrameId = undefined;
|
|
||||||
}
|
|
||||||
this.draw();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isVisible && this.animationFrameId === undefined) {
|
|
||||||
this.lastFrameTime = 0;
|
|
||||||
this.animationFrameId = requestAnimationFrame(this.animate);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
private readonly animate = (timestamp: number): void => {
|
|
||||||
this.animationFrameId = undefined;
|
|
||||||
if (!this.isVisible || this.isReducedMotion) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const elapsed = this.lastFrameTime === 0 ? 0 : Math.min(timestamp - this.lastFrameTime, 50);
|
|
||||||
this.lastFrameTime = timestamp;
|
|
||||||
this.update(elapsed / 1000);
|
|
||||||
this.draw();
|
|
||||||
this.animationFrameId = requestAnimationFrame(this.animate);
|
|
||||||
};
|
|
||||||
|
|
||||||
private resizeCanvas(): void {
|
|
||||||
if (!this.rainCanvas) return;
|
|
||||||
|
|
||||||
const canvas = this.rainCanvas.nativeElement;
|
|
||||||
const parent = canvas.parentElement;
|
|
||||||
const bounds = parent ? parent.getBoundingClientRect() : canvas.getBoundingClientRect();
|
|
||||||
const width = Math.max(bounds.width, window.innerWidth || 320);
|
|
||||||
const height = Math.max(bounds.height, 700);
|
|
||||||
const pixelRatio = Math.min(window.devicePixelRatio || 1, 2);
|
|
||||||
|
|
||||||
canvas.width = Math.max(1, Math.floor(width * pixelRatio));
|
|
||||||
canvas.height = Math.max(1, Math.floor(height * pixelRatio));
|
|
||||||
this.context?.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
|
|
||||||
this.createColumns(width, height);
|
|
||||||
this.draw();
|
|
||||||
}
|
|
||||||
|
|
||||||
private createColumns(width: number, height: number): void {
|
|
||||||
const fontSize = Math.max(14, Math.min(20, width / 58));
|
|
||||||
const columnCount = Math.max(24, Math.floor(width / (fontSize * 0.72)));
|
|
||||||
this.columns.length = 0;
|
|
||||||
|
|
||||||
for (let index = 0; index < columnCount; index += 1) {
|
|
||||||
const length = Math.floor(Math.random() * 25) + 14;
|
|
||||||
this.columns.push({
|
|
||||||
x: (index / columnCount) * width + Math.random() * fontSize * 0.6,
|
|
||||||
y: -Math.random() * (height * 0.9) - length * fontSize,
|
|
||||||
speed: Math.floor(Math.random() * 130) + 150,
|
|
||||||
length,
|
|
||||||
opacity: 0.25 + Math.random() * 0.65,
|
|
||||||
characters: Array.from({ length }, () => this.randomCharacter())
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private update(deltaSeconds: number): void {
|
|
||||||
if (!this.rainCanvas) return;
|
|
||||||
const parent = this.rainCanvas.nativeElement.parentElement;
|
|
||||||
const height = parent ? parent.clientHeight : this.rainCanvas.nativeElement.clientHeight;
|
|
||||||
const width = parent ? parent.clientWidth : this.rainCanvas.nativeElement.clientWidth;
|
|
||||||
const fontSize = Math.max(14, Math.min(20, width / 58));
|
|
||||||
|
|
||||||
for (const column of this.columns) {
|
|
||||||
column.y += column.speed * deltaSeconds;
|
|
||||||
if (column.y - column.length * fontSize > height) {
|
|
||||||
column.y = -Math.random() * height * 0.75 - column.length * fontSize;
|
|
||||||
column.speed = Math.floor(Math.random() * 130) + 150;
|
|
||||||
column.length = Math.floor(Math.random() * 25) + 14;
|
|
||||||
column.opacity = 0.25 + Math.random() * 0.65;
|
|
||||||
column.characters = Array.from({ length: column.length }, () => this.randomCharacter());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private draw(): void {
|
|
||||||
if (!this.rainCanvas || !this.context) return;
|
|
||||||
|
|
||||||
const canvas = this.rainCanvas.nativeElement;
|
|
||||||
const parent = canvas.parentElement;
|
|
||||||
const width = parent ? parent.clientWidth : canvas.clientWidth;
|
|
||||||
const height = parent ? parent.clientHeight : canvas.clientHeight;
|
|
||||||
const fontSize = Math.max(14, Math.min(20, width / 58));
|
|
||||||
|
|
||||||
this.context.clearRect(0, 0, width, height);
|
|
||||||
this.context.font = `${fontSize}px monospace`;
|
|
||||||
this.context.textAlign = 'center';
|
|
||||||
this.context.textBaseline = 'top';
|
|
||||||
this.context.shadowBlur = 0;
|
|
||||||
|
|
||||||
for (const column of this.columns) {
|
|
||||||
for (let i = 0; i < column.characters.length; i++) {
|
|
||||||
const charY = column.y + i * fontSize;
|
|
||||||
if (charY < -fontSize || charY > height) continue;
|
|
||||||
|
|
||||||
const isHead = i === 0;
|
|
||||||
const isHighlight = i === Math.floor(column.length * 0.35) && column.opacity > 0.4;
|
|
||||||
const trailAlpha = column.opacity * (1 - i / (column.length * 1.15));
|
|
||||||
const edgeFade = Math.min(1, Math.max(0, (height - charY) / (fontSize * 5)));
|
|
||||||
const alpha = Math.max(0, trailAlpha * edgeFade);
|
|
||||||
|
|
||||||
if (alpha <= 0) continue;
|
|
||||||
|
|
||||||
this.context.fillStyle = isHead
|
|
||||||
? `rgba(220, 255, 226, ${Math.min(1, alpha + 0.35)})`
|
|
||||||
: isHighlight
|
|
||||||
? `rgba(80, 255, 126, ${alpha})`
|
|
||||||
: `rgba(18, 174, 78, ${alpha})`;
|
|
||||||
|
|
||||||
if (isHead || isHighlight) {
|
|
||||||
this.context.shadowColor = 'rgba(37, 255, 104, 0.85)';
|
|
||||||
this.context.shadowBlur = isHead ? 9 : 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.context.fillText(column.characters[i], column.x, charY);
|
|
||||||
this.context.shadowBlur = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private randomCharacter(): string {
|
|
||||||
const r = Math.random();
|
|
||||||
const set = r < 0.48 ? BINARY_CHARS : r < 0.68 ? HEX_CHARS : r < 0.72 ? CODE_CHARS : TERM_CHARS;
|
|
||||||
return set[Math.floor(Math.random() * set.length)];
|
|
||||||
}
|
|
||||||
|
|
||||||
onSubmit(): void {
|
onSubmit(): void {
|
||||||
if (this.contactForm.invalid) {
|
if (this.contactForm.invalid) {
|
||||||
this.contactForm.markAllAsTouched();
|
this.contactForm.markAllAsTouched();
|
||||||
|
|
@ -285,7 +79,6 @@ export class ContactSectionComponent implements OnInit, AfterViewInit, OnDestroy
|
||||||
this.isSuccess.set(true);
|
this.isSuccess.set(true);
|
||||||
},
|
},
|
||||||
error: () => {
|
error: () => {
|
||||||
// En caso de fallo de red en webhook, la experiencia del usuario no se interrumpe
|
|
||||||
this.isSubmitting.set(false);
|
this.isSubmitting.set(false);
|
||||||
this.isSuccess.set(true);
|
this.isSuccess.set(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,80 +149,74 @@
|
||||||
ESTRUCTURA DE SECCIONES CONTINUAS (Single Page Scroll Flow)
|
ESTRUCTURA DE SECCIONES CONTINUAS (Single Page Scroll Flow)
|
||||||
============================================================================== */
|
============================================================================== */
|
||||||
|
|
||||||
|
/* ==============================================================================
|
||||||
|
ESTRUCTURA DE SECCIONES (Hero 3D + Pantalla Completa con Matrix Rain)
|
||||||
|
============================================================================== */
|
||||||
|
|
||||||
.landing-section {
|
.landing-section {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-container {
|
/* 01. HERO SECTION (Pristino, Fondo Negro Profundo, 240 frames al scroll) */
|
||||||
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 {
|
.hero-section {
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
background-color: #000000;
|
background-color: #000000;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 02. RETRO OS & PROFILE */
|
/* CONTENEDOR MAESTRO DE ETAPAS PANTALLA COMPLETA CON MATRIX RAIN */
|
||||||
.interactive-stage {
|
.cyber-matrix-stage-wrapper {
|
||||||
padding: var(--space-16) 0 var(--space-12) 0;
|
position: relative;
|
||||||
background: linear-gradient(180deg, #000000 0%, #121517 120px);
|
width: 100%;
|
||||||
border-bottom: 1px solid var(--zen-border-subtle);
|
background-color: #0b0e14;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Lluvia Matrix ambiental sticky: se mantiene visible durante todas las etapas siguientes */
|
||||||
|
.global-matrix-bg {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
display: block;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 0;
|
||||||
|
margin-bottom: -100vh;
|
||||||
|
opacity: 0.28;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ETAPAS EN PANTALLA COMPLETA (100vh con centrado vertical y espacio negativo Zen) */
|
||||||
|
.fullscreen-stage {
|
||||||
|
min-height: 100vh;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: clamp(4.5rem, 8vh, 6rem) clamp(1rem, 3vw, 2.5rem);
|
||||||
|
border-bottom: 1px solid rgba(30, 37, 51, 0.45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.fullscreen-stage-content {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1540px;
|
||||||
|
margin: 0 auto;
|
||||||
|
position: relative;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ETAPA 02: RETRO OS & PROFILE */
|
||||||
.stage-grid {
|
.stage-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
gap: var(--space-8);
|
gap: clamp(2rem, 4vw, 4rem);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
@ -253,41 +247,13 @@
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 03. PROJECTS SECTION */
|
/* ETAPA 05: TERMINAL INTERACTIVA (Centrada con ancho óptimo) */
|
||||||
.projects-stage {
|
.terminal-content-box {
|
||||||
padding: var(--space-16) 0;
|
max-width: 1100px;
|
||||||
background-color: #121517;
|
margin: 0 auto;
|
||||||
border-bottom: 1px solid var(--zen-border-subtle);
|
|
||||||
}
|
|
||||||
|
|
||||||
.projects-stage-inner {
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 04. SIMULATOR SECTION */
|
|
||||||
.simulator-stage {
|
|
||||||
padding: var(--space-16) 0;
|
|
||||||
background-color: #0e1114;
|
|
||||||
border-bottom: 1px solid var(--zen-border-subtle);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 05. TERMINAL SECTION */
|
|
||||||
.terminal-stage {
|
|
||||||
padding: var(--space-16) 0;
|
|
||||||
background-color: #121517;
|
|
||||||
border-bottom: 1px solid var(--zen-border-subtle);
|
|
||||||
}
|
|
||||||
|
|
||||||
.terminal-stage-inner {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 06. CONTACT SECTION */
|
|
||||||
.contact-stage {
|
|
||||||
padding: var(--space-16) 0;
|
|
||||||
background-color: #0e1114;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ==============================================================================
|
/* ==============================================================================
|
||||||
ADAPTABILIDAD RESPONSIVA (Tablet & Mobile)
|
ADAPTABILIDAD RESPONSIVA (Tablet & Mobile)
|
||||||
============================================================================== */
|
============================================================================== */
|
||||||
|
|
@ -295,7 +261,7 @@
|
||||||
@media (max-width: 960px) {
|
@media (max-width: 960px) {
|
||||||
.stage-grid {
|
.stage-grid {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
gap: var(--space-10);
|
gap: var(--space-8);
|
||||||
}
|
}
|
||||||
|
|
||||||
.retro-module-card {
|
.retro-module-card {
|
||||||
|
|
@ -308,8 +274,9 @@
|
||||||
order: 2;
|
order: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.section-lead-header {
|
.fullscreen-stage {
|
||||||
margin-bottom: var(--space-6);
|
min-height: auto;
|
||||||
|
padding: clamp(4rem, 6vh, 5rem) clamp(1rem, 2vw, 1.5rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -97,94 +97,56 @@
|
||||||
<app-hero-3d></app-hero-3d>
|
<app-hero-3d></app-hero-3d>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- SECCIÓN 02: Módulos Interactivos (Perfil Técnico & Retro Monitor CRT) -->
|
<!-- CONTENEDOR DE SECCIONES CON LLUVIA MATRIX AMBIENTAL (PANTALLA COMPLETA) -->
|
||||||
<section id="retro" class="landing-section interactive-stage">
|
<div class="cyber-matrix-stage-wrapper">
|
||||||
<div class="section-container">
|
<!-- Lienzo Matrix Global que abarca toda la pantalla en segundo plano para estas secciones -->
|
||||||
<header class="section-lead-header">
|
<app-matrix-rain class="global-matrix-bg"></app-matrix-rain>
|
||||||
<div class="section-badge">
|
|
||||||
<span class="badge-dot"></span>
|
<!-- SECCIÓN 02: Módulos Interactivos (Perfil Técnico & Retro Monitor CRT) -->
|
||||||
<span class="badge-text">// 01 ARCHITECTURE & RETRO COMPUTING</span>
|
<section id="retro" class="landing-section fullscreen-stage">
|
||||||
|
<div class="fullscreen-stage-content">
|
||||||
|
<div class="stage-grid">
|
||||||
|
<!-- Slot 1: Perfil Técnico & Filosofía de Ingeniería -->
|
||||||
|
<article class="module-card profile-module-card">
|
||||||
|
<app-technical-profile></app-technical-profile>
|
||||||
|
</article>
|
||||||
|
|
||||||
|
<!-- Slot 2: Retro OS en Monitor CRT Antiguo -->
|
||||||
|
<article class="module-card retro-module-card">
|
||||||
|
<app-retro-os></app-retro-os>
|
||||||
|
</article>
|
||||||
</div>
|
</div>
|
||||||
<h2 class="section-main-title">{{ i18n.t().navRetro }}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="stage-grid">
|
|
||||||
<!-- Slot 1: Perfil Técnico & Filosofía de Ingeniería -->
|
|
||||||
<article class="module-card profile-module-card">
|
|
||||||
<app-technical-profile></app-technical-profile>
|
|
||||||
</article>
|
|
||||||
|
|
||||||
<!-- Slot 2: Retro OS en Monitor CRT Antiguo -->
|
|
||||||
<article class="module-card retro-module-card">
|
|
||||||
<app-retro-os></app-retro-os>
|
|
||||||
</article>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- SECCIÓN 03: Proyectos Destacados (Casos Reales del CV) -->
|
<!-- SECCIÓN 03: Proyectos Destacados (Casos Reales del CV) -->
|
||||||
<section id="projects" class="landing-section projects-stage">
|
<section id="projects" class="landing-section fullscreen-stage">
|
||||||
<div class="section-container">
|
<div class="fullscreen-stage-content">
|
||||||
<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>
|
|
||||||
|
|
||||||
<div class="projects-stage-inner">
|
|
||||||
<app-featured-projects></app-featured-projects>
|
<app-featured-projects></app-featured-projects>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- SECCIÓN 04: Simulador de Incidentes Cloud (Packet Tracer) -->
|
<!-- SECCIÓN 04: Simulador de Incidentes Cloud (Packet Tracer) -->
|
||||||
<section id="simulator" class="landing-section simulator-stage">
|
<section id="simulator" class="landing-section fullscreen-stage">
|
||||||
<div class="section-container">
|
<div class="fullscreen-stage-content">
|
||||||
<header class="section-lead-header">
|
<app-incident-simulator></app-incident-simulator>
|
||||||
<div class="section-badge">
|
</div>
|
||||||
<span class="badge-dot"></span>
|
</section>
|
||||||
<span class="badge-text">// 03 CLOUD TELEMETRY & SECURITY</span>
|
|
||||||
</div>
|
|
||||||
<h2 class="section-main-title">{{ i18n.t().navSimulator }}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<app-incident-simulator></app-incident-simulator>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- SECCIÓN 05: Terminal Interactiva Arch Linux / Fish Shell -->
|
|
||||||
<section id="terminal" class="landing-section terminal-stage">
|
|
||||||
<div class="section-container">
|
|
||||||
<div class="terminal-stage-inner">
|
|
||||||
<header class="section-lead-header">
|
|
||||||
<div class="section-badge">
|
|
||||||
<span class="badge-dot"></span>
|
|
||||||
<span class="badge-text">// 04 INTERACTIVE CLI ENGINE</span>
|
|
||||||
</div>
|
|
||||||
<h2 class="section-main-title">{{ i18n.t().navTerminal }}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
|
<!-- SECCIÓN 05: Terminal Interactiva Arch Linux / Fish Shell -->
|
||||||
|
<section id="terminal" class="landing-section fullscreen-stage">
|
||||||
|
<div class="fullscreen-stage-content terminal-content-box">
|
||||||
<app-terminal></app-terminal>
|
<app-terminal></app-terminal>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- SECCIÓN 06: Contacto & Muro de Firmas Guestbook -->
|
<!-- SECCIÓN 06: Contacto & Muro de Firmas Guestbook -->
|
||||||
<section id="contact" class="landing-section contact-stage">
|
<section id="contact" class="landing-section fullscreen-stage">
|
||||||
<div class="section-container">
|
<div class="fullscreen-stage-content">
|
||||||
<header class="section-lead-header">
|
<app-contact-section></app-contact-section>
|
||||||
<div class="section-badge">
|
</div>
|
||||||
<span class="badge-dot"></span>
|
</section>
|
||||||
<span class="badge-text">// 05 CONNECT & GUESTBOOK</span>
|
</div>
|
||||||
</div>
|
|
||||||
<h2 class="section-main-title">{{ i18n.t().navContact }}</h2>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<app-contact-section></app-contact-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>
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ import { TechnicalProfileComponent } from '../technical-profile/technical-profil
|
||||||
import { IncidentSimulatorComponent } from '../incident-simulator/incident-simulator.component';
|
import { IncidentSimulatorComponent } from '../incident-simulator/incident-simulator.component';
|
||||||
import { ChatBotComponent } from '../chat-bot/chat-bot.component';
|
import { ChatBotComponent } from '../chat-bot/chat-bot.component';
|
||||||
import { TelemetryHudComponent } from '../telemetry-hud/telemetry-hud.component';
|
import { TelemetryHudComponent } from '../telemetry-hud/telemetry-hud.component';
|
||||||
|
import { MatrixRainComponent } from '../../shared/components/matrix-rain/matrix-rain.component';
|
||||||
import { I18nService } from '../../../application/services/i18n.service';
|
import { I18nService } from '../../../application/services/i18n.service';
|
||||||
|
|
||||||
export type LandingSection = 'hero' | 'retro' | 'projects' | 'simulator' | 'terminal' | 'contact';
|
export type LandingSection = 'hero' | 'retro' | 'projects' | 'simulator' | 'terminal' | 'contact';
|
||||||
|
|
@ -43,7 +44,8 @@ export const LANDING_SECTIONS: readonly LandingSection[] = [
|
||||||
TechnicalProfileComponent,
|
TechnicalProfileComponent,
|
||||||
IncidentSimulatorComponent,
|
IncidentSimulatorComponent,
|
||||||
ChatBotComponent,
|
ChatBotComponent,
|
||||||
TelemetryHudComponent
|
TelemetryHudComponent,
|
||||||
|
MatrixRainComponent
|
||||||
],
|
],
|
||||||
templateUrl: './landing.component.html',
|
templateUrl: './landing.component.html',
|
||||||
styleUrl: './landing.component.css',
|
styleUrl: './landing.component.css',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
:host {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
pointer-events: none;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matrix-rain-canvas {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
<canvas #canvas class="matrix-rain-canvas" aria-hidden="true"></canvas>
|
||||||
|
|
@ -0,0 +1,225 @@
|
||||||
|
import {
|
||||||
|
Component,
|
||||||
|
ChangeDetectionStrategy,
|
||||||
|
ElementRef,
|
||||||
|
ViewChild,
|
||||||
|
AfterViewInit,
|
||||||
|
OnDestroy,
|
||||||
|
NgZone,
|
||||||
|
inject
|
||||||
|
} from '@angular/core';
|
||||||
|
|
||||||
|
interface RainColumn {
|
||||||
|
x: number;
|
||||||
|
y: number;
|
||||||
|
speed: number;
|
||||||
|
length: number;
|
||||||
|
opacity: number;
|
||||||
|
characters: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
const BINARY_CHARS = '01';
|
||||||
|
const HEX_CHARS = '0123456789ABCDEF';
|
||||||
|
const KATAKANA_CHARS = 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲン';
|
||||||
|
const CODE_CHARS = '{}[]()<>&|/\\:;=+-_*#$%@?!~^';
|
||||||
|
const TERM_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-matrix-rain',
|
||||||
|
standalone: true,
|
||||||
|
templateUrl: './matrix-rain.component.html',
|
||||||
|
styleUrl: './matrix-rain.component.css',
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
})
|
||||||
|
export class MatrixRainComponent implements AfterViewInit, OnDestroy {
|
||||||
|
@ViewChild('canvas', { static: true }) private readonly canvasRef!: ElementRef<HTMLCanvasElement>;
|
||||||
|
|
||||||
|
private readonly hostRef = inject(ElementRef<HTMLElement>);
|
||||||
|
private readonly ngZone = inject(NgZone);
|
||||||
|
|
||||||
|
private readonly columns: RainColumn[] = [];
|
||||||
|
private context?: CanvasRenderingContext2D;
|
||||||
|
private animationFrameId?: number;
|
||||||
|
private intersectionObserver?: IntersectionObserver;
|
||||||
|
private resizeObserver?: ResizeObserver;
|
||||||
|
private motionQuery?: MediaQueryList;
|
||||||
|
private isVisible = false;
|
||||||
|
private isReducedMotion = false;
|
||||||
|
private lastFrameTime = 0;
|
||||||
|
|
||||||
|
ngAfterViewInit(): void {
|
||||||
|
const canvas = this.canvasRef.nativeElement;
|
||||||
|
this.context = canvas.getContext('2d', { alpha: true }) ?? undefined;
|
||||||
|
if (!this.context) return;
|
||||||
|
|
||||||
|
if (typeof window !== 'undefined') {
|
||||||
|
this.motionQuery = window.matchMedia('(prefers-reduced-motion: reduce)');
|
||||||
|
this.isReducedMotion = this.motionQuery.matches;
|
||||||
|
this.motionQuery.addEventListener('change', this.onMotionPreferenceChange);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Ejecutar fuera de Angular Zone para evitar disparar ciclos de Change Detection en cada frame
|
||||||
|
this.ngZone.runOutsideAngular(() => {
|
||||||
|
this.resizeObserver = new ResizeObserver(() => this.resizeCanvas());
|
||||||
|
this.resizeObserver.observe(this.hostRef.nativeElement);
|
||||||
|
|
||||||
|
this.intersectionObserver = new IntersectionObserver(([entry]) => {
|
||||||
|
const wasVisible = this.isVisible;
|
||||||
|
this.isVisible = entry.isIntersecting;
|
||||||
|
|
||||||
|
if (this.isVisible && !wasVisible && !this.isReducedMotion) {
|
||||||
|
this.lastFrameTime = 0;
|
||||||
|
this.startAnimation();
|
||||||
|
} else if (!this.isVisible && wasVisible) {
|
||||||
|
this.stopAnimation();
|
||||||
|
}
|
||||||
|
}, { threshold: 0.01 });
|
||||||
|
|
||||||
|
this.intersectionObserver.observe(this.hostRef.nativeElement);
|
||||||
|
this.resizeCanvas();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ngOnDestroy(): void {
|
||||||
|
this.stopAnimation();
|
||||||
|
this.motionQuery?.removeEventListener('change', this.onMotionPreferenceChange);
|
||||||
|
this.intersectionObserver?.disconnect();
|
||||||
|
this.resizeObserver?.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly onMotionPreferenceChange = (event: MediaQueryListEvent): void => {
|
||||||
|
this.isReducedMotion = event.matches;
|
||||||
|
if (this.isReducedMotion) {
|
||||||
|
this.stopAnimation();
|
||||||
|
this.draw();
|
||||||
|
} else if (this.isVisible) {
|
||||||
|
this.lastFrameTime = 0;
|
||||||
|
this.startAnimation();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private startAnimation(): void {
|
||||||
|
if (this.animationFrameId === undefined && !this.isReducedMotion) {
|
||||||
|
this.animationFrameId = requestAnimationFrame(this.animate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private stopAnimation(): void {
|
||||||
|
if (this.animationFrameId !== undefined) {
|
||||||
|
cancelAnimationFrame(this.animationFrameId);
|
||||||
|
this.animationFrameId = undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly animate = (timestamp: number): void => {
|
||||||
|
this.animationFrameId = undefined;
|
||||||
|
if (!this.isVisible || this.isReducedMotion) return;
|
||||||
|
|
||||||
|
const elapsed = this.lastFrameTime === 0 ? 0 : Math.min(timestamp - this.lastFrameTime, 50);
|
||||||
|
this.lastFrameTime = timestamp;
|
||||||
|
|
||||||
|
this.update(elapsed / 1000);
|
||||||
|
this.draw();
|
||||||
|
|
||||||
|
this.animationFrameId = requestAnimationFrame(this.animate);
|
||||||
|
};
|
||||||
|
|
||||||
|
private resizeCanvas(): void {
|
||||||
|
const canvas = this.canvasRef.nativeElement;
|
||||||
|
const width = window.innerWidth || this.hostRef.nativeElement.clientWidth || 320;
|
||||||
|
const height = window.innerHeight || this.hostRef.nativeElement.clientHeight || 600;
|
||||||
|
const pixelRatio = Math.min(window.devicePixelRatio || 1, 2);
|
||||||
|
|
||||||
|
canvas.width = Math.max(1, Math.floor(width * pixelRatio));
|
||||||
|
canvas.height = Math.max(1, Math.floor(height * pixelRatio));
|
||||||
|
this.context?.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);
|
||||||
|
|
||||||
|
this.createColumns(width, height);
|
||||||
|
this.draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
private createColumns(width: number, height: number): void {
|
||||||
|
const fontSize = Math.max(13, Math.min(18, width / 64));
|
||||||
|
const columnCount = Math.max(30, Math.floor(width / (fontSize * 0.75)));
|
||||||
|
this.columns.length = 0;
|
||||||
|
|
||||||
|
for (let index = 0; index < columnCount; index += 1) {
|
||||||
|
const length = Math.floor(Math.random() * 26) + 14;
|
||||||
|
this.columns.push({
|
||||||
|
x: (index / columnCount) * width + Math.random() * fontSize * 0.4,
|
||||||
|
y: -Math.random() * (height * 0.95) - length * fontSize,
|
||||||
|
speed: Math.floor(Math.random() * 120) + 140,
|
||||||
|
length,
|
||||||
|
opacity: 0.25 + Math.random() * 0.65,
|
||||||
|
characters: Array.from({ length }, () => this.randomCharacter())
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private update(deltaSeconds: number): void {
|
||||||
|
const width = window.innerWidth || 320;
|
||||||
|
const height = window.innerHeight || 600;
|
||||||
|
const fontSize = Math.max(13, Math.min(18, width / 64));
|
||||||
|
|
||||||
|
for (const column of this.columns) {
|
||||||
|
column.y += column.speed * deltaSeconds;
|
||||||
|
if (column.y - column.length * fontSize > height) {
|
||||||
|
column.y = -Math.random() * height * 0.65 - column.length * fontSize;
|
||||||
|
column.speed = Math.floor(Math.random() * 120) + 140;
|
||||||
|
column.length = Math.floor(Math.random() * 26) + 14;
|
||||||
|
column.opacity = 0.25 + Math.random() * 0.65;
|
||||||
|
column.characters = Array.from({ length: column.length }, () => this.randomCharacter());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private draw(): void {
|
||||||
|
if (!this.context) return;
|
||||||
|
const width = window.innerWidth || 320;
|
||||||
|
const height = window.innerHeight || 600;
|
||||||
|
const fontSize = Math.max(13, Math.min(18, width / 64));
|
||||||
|
|
||||||
|
this.context.clearRect(0, 0, width, height);
|
||||||
|
this.context.font = `${fontSize}px monospace`;
|
||||||
|
this.context.textAlign = 'center';
|
||||||
|
this.context.textBaseline = 'top';
|
||||||
|
|
||||||
|
for (const column of this.columns) {
|
||||||
|
for (let i = 0; i < column.characters.length; i++) {
|
||||||
|
const charY = column.y + i * fontSize;
|
||||||
|
if (charY < -fontSize || charY > height) continue;
|
||||||
|
|
||||||
|
const isHead = i === 0;
|
||||||
|
const isHighlight = i === Math.floor(column.length * 0.3) && column.opacity > 0.4;
|
||||||
|
const trailAlpha = column.opacity * (1 - i / (column.length * 1.15));
|
||||||
|
const edgeFade = Math.min(1, Math.max(0, (height - charY) / (fontSize * 4)));
|
||||||
|
const alpha = Math.max(0, trailAlpha * edgeFade);
|
||||||
|
|
||||||
|
if (alpha <= 0) continue;
|
||||||
|
|
||||||
|
this.context.fillStyle = isHead
|
||||||
|
? `rgba(235, 255, 240, ${Math.min(1, alpha + 0.4)})`
|
||||||
|
: isHighlight
|
||||||
|
? `rgba(80, 255, 130, ${alpha})`
|
||||||
|
: `rgba(20, 185, 85, ${alpha})`;
|
||||||
|
|
||||||
|
if (isHead || isHighlight) {
|
||||||
|
this.context.shadowColor = 'rgba(40, 255, 110, 0.85)';
|
||||||
|
this.context.shadowBlur = isHead ? 8 : 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.context.fillText(column.characters[i], column.x, charY);
|
||||||
|
this.context.shadowBlur = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private randomCharacter(): string {
|
||||||
|
const r = Math.random();
|
||||||
|
if (r < 0.4) return BINARY_CHARS[Math.floor(Math.random() * BINARY_CHARS.length)];
|
||||||
|
if (r < 0.65) return KATAKANA_CHARS[Math.floor(Math.random() * KATAKANA_CHARS.length)];
|
||||||
|
if (r < 0.8) return HEX_CHARS[Math.floor(Math.random() * HEX_CHARS.length)];
|
||||||
|
if (r < 0.9) return CODE_CHARS[Math.floor(Math.random() * CODE_CHARS.length)];
|
||||||
|
return TERM_CHARS[Math.floor(Math.random() * TERM_CHARS.length)];
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue