Spaces:
Running
Running
File size: 8,096 Bytes
76c6e64 ec87762 76c6e64 ec87762 76c6e64 ec87762 76c6e64 ec87762 76c6e64 ec87762 76c6e64 ec87762 76c6e64 ec87762 76c6e64 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | class CustomHero extends HTMLElement {
connectedCallback() {
this.attachShadow({ mode: 'open' });
this.shadowRoot.innerHTML = `
<style>
:host {
display: block;
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
position: relative;
padding: 6rem 1rem;
overflow: hidden;
}
.container {
max-width: 1200px;
margin: 0 auto;
text-align: center;
z-index: 2;
}
.status-badge {
display: inline-flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: rgba(234, 179, 8, 0.1);
border: 1px solid rgba(234, 179, 8, 0.3);
border-radius: 9999px;
color: #EAB308;
font-family: 'Fira Code', monospace;
font-size: 0.875rem;
margin-bottom: 1.5rem;
}
.status-dot {
width: 8px;
height: 8px;
background-color: #EAB308;
border-radius: 50%;
box-shadow: 0 0 10px #EAB308;
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 1; }
50% { opacity: 0.5; }
100% { opacity: 1; }
}
h1 {
font-size: clamp(2.5rem, 5vw, 4.5rem);
font-weight: 800;
line-height: 1.1;
margin-bottom: 1rem;
color: white;
}
.highlight {
color: #EAB308;
display: block;
}
p {
font-size: 1.125rem;
color: #9ca3af;
max-width: 600px;
margin: 0 auto 2.5rem auto;
line-height: 1.6;
}
.cta-group {
display: flex;
gap: 1rem;
justify-content: center;
align-items: center;
}
.btn-primary {
background-color: #EAB308;
color: black;
padding: 0.75rem 2rem;
border-radius: 0.375rem;
font-weight: 600;
text-decoration: none;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(234, 179, 8, 0.3);
}
.btn-secondary {
color: white;
padding: 0.75rem 2rem;
border-radius: 0.375rem;
font-weight: 500;
text-decoration: none;
border: 1px solid #333;
transition: all 0.3s ease;
}
.btn-secondary:hover {
border-color: #EAB308;
color: #EAB308;
}
/* Background Decor */
.glow-bg {
position: absolute;
width: 600px;
height: 600px;
background: radial-gradient(circle, rgba(234, 179, 8, 0.08) 0%, rgba(0,0,0,0) 70%);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 1;
pointer-events: none;
}
.grid-bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
background-size: 50px 50px;
z-index: 0;
mask-image: radial-gradient(circle at center, black 30%, transparent 100%);
animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
0% { transform: perspective(500px) rotateX(60deg) translateY(0); }
100% { transform: perspective(500px) rotateX(60deg) translateY(50px); }
}
.floating-shapes {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1;
}
.shape {
position: absolute;
border-radius: 50%;
opacity: 0.1;
animation: float 15s ease-in-out infinite;
}
.shape-1 {
width: 300px;
height: 300px;
background: #EAB308;
top: 10%;
right: 10%;
animation-delay: 0s;
}
.shape-2 {
width: 200px;
height: 200px;
background: #EAB308;
bottom: 20%;
left: 10%;
animation-delay: 5s;
}
.shape-3 {
width: 150px;
height: 150px;
background: #EAB308;
top: 50%;
left: 5%;
animation-delay: 10s;
}
@keyframes float {
0%, 100% { transform: translateY(0) rotate(0deg); }
25% { transform: translateY(-20px) rotate(5deg); }
50% { transform: translateY(0) rotate(0deg); }
75% { transform: translateY(20px) rotate(-5deg); }
}
.typing-text {
display: inline-block;
overflow: hidden;
border-right: 3px solid #EAB308;
white-space: nowrap;
animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}
@keyframes typing {
from { width: 0 }
to { width: 100% }
}
@keyframes blink-caret {
from, to { border-color: transparent }
50% { border-color: #EAB308 }
}
</style>
<div class="grid-bg"></div>
<div class="floating-shapes">
<div class="shape shape-1"></div>
<div class="shape shape-2"></div>
<div class="shape shape-3"></div>
</div>
<div class="glow-bg"></div>
<div class="container animate-fade-in">
<div class="status-badge">
<div class="status-dot"></div>
<span>Open to Work</span>
</div>
<h1>
Hi, I'm <span style="background: linear-gradient(135deg, #EAB308, #CA8A04); -webkit-background-clip: text; -webkit-text-fill-color: transparent;">Kent Vuong</span>
<span class="highlight">Full-Stack & DevOps Engineer</span>
</h1>
<p>
I build scalable web applications and robust cloud infrastructure.
Passionate about clean code, automation, and delivering exceptional user experiences.
</p>
<div class="cta-group">
<a href="#projects" class="btn-primary">
View Projects <i data-feather="arrow-right" style="width: 18px;"></i>
</a>
<a href="#contact" class="btn-secondary">Contact Me</a>
</div>
</div>
`;
// Re-run feather replace for this shadow DOM content
// Since feather.replace() in main body won't reach shadow root
const svg = this.shadowRoot.querySelector('svg');
// We manually set the SVG content or assume the global feather script handles it if the element exists in DOM.
// However, Feather Icons replace() only targets elements in the document.
// A quick workaround for Shadow DOM:
const icons = this.shadowRoot.querySelectorAll('[data-feather]');
icons.forEach(icon => {
const name = icon.getAttribute('data-feather');
// Simple SVG strings for icons used in this component
let svgContent = '';
if(name === 'arrow-right') {
svgContent = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>`;
}
icon.outerHTML = svgContent;
});
}
}
customElements.define('custom-hero', CustomHero); |