Update index.html
Browse files- index.html +13 -14
index.html
CHANGED
|
@@ -22,6 +22,11 @@
|
|
| 22 |
|
| 23 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
body {
|
| 26 |
background-color: var(--bg-color);
|
| 27 |
color: var(--text-main);
|
|
@@ -30,7 +35,7 @@
|
|
| 30 |
line-height: 1.6;
|
| 31 |
}
|
| 32 |
|
| 33 |
-
/* ---
|
| 34 |
@keyframes spin {
|
| 35 |
0% { transform: rotate(0deg); }
|
| 36 |
100% { transform: rotate(360deg); }
|
|
@@ -144,7 +149,6 @@
|
|
| 144 |
padding-right: 2rem;
|
| 145 |
letter-spacing: 0.5rem;
|
| 146 |
white-space: nowrap;
|
| 147 |
-
/* Glitch Animation trigger class */
|
| 148 |
}
|
| 149 |
|
| 150 |
.glitch-effect:hover {
|
|
@@ -152,7 +156,7 @@
|
|
| 152 |
color: var(--accent-red);
|
| 153 |
}
|
| 154 |
|
| 155 |
-
/* --- PROFILE IMAGE
|
| 156 |
.hero-img-container {
|
| 157 |
width: 100%;
|
| 158 |
height: 400px;
|
|
@@ -165,7 +169,6 @@
|
|
| 165 |
align-items: center;
|
| 166 |
}
|
| 167 |
|
| 168 |
-
/* Loading Spinner */
|
| 169 |
.img-loader {
|
| 170 |
width: 50px;
|
| 171 |
height: 50px;
|
|
@@ -183,7 +186,7 @@
|
|
| 183 |
object-fit: cover;
|
| 184 |
filter: grayscale(100%) contrast(120%);
|
| 185 |
transition: filter 0.5s ease, transform 0.5s ease;
|
| 186 |
-
opacity: 0;
|
| 187 |
position: relative;
|
| 188 |
z-index: 2;
|
| 189 |
}
|
|
@@ -195,7 +198,6 @@
|
|
| 195 |
transform: scale(1.05);
|
| 196 |
}
|
| 197 |
|
| 198 |
-
/* Decorative Corners */
|
| 199 |
.hero-img-container::after {
|
| 200 |
content: '';
|
| 201 |
position: absolute;
|
|
@@ -246,9 +248,11 @@
|
|
| 246 |
}
|
| 247 |
|
| 248 |
/* --- SECTIONS --- */
|
| 249 |
-
section {
|
| 250 |
padding: 5rem 0;
|
| 251 |
border-bottom: 1px solid rgba(255,255,255,0.05);
|
|
|
|
|
|
|
| 252 |
}
|
| 253 |
|
| 254 |
.section-title {
|
|
@@ -463,21 +467,17 @@
|
|
| 463 |
</footer>
|
| 464 |
|
| 465 |
<script>
|
| 466 |
-
// Toggle Mobile Menu
|
| 467 |
function toggleMenu() {
|
| 468 |
document.getElementById('navLinks').classList.toggle('active');
|
| 469 |
}
|
| 470 |
|
| 471 |
-
// Image Load Handler
|
| 472 |
function imageLoaded() {
|
| 473 |
const img = document.querySelector('.hero-img');
|
| 474 |
const loader = document.getElementById('imgLoader');
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
loader.style.display = 'none'; // Hide spinner
|
| 478 |
}
|
| 479 |
|
| 480 |
-
// Intersection Observer for Scroll Animations
|
| 481 |
const observer = new IntersectionObserver((entries) => {
|
| 482 |
entries.forEach(entry => {
|
| 483 |
if (entry.isIntersecting) {
|
|
@@ -487,7 +487,6 @@
|
|
| 487 |
});
|
| 488 |
}, { threshold: 0.1 });
|
| 489 |
|
| 490 |
-
// Apply animations to elements
|
| 491 |
document.querySelectorAll('.skill-card, .project-item').forEach((el) => {
|
| 492 |
el.style.opacity = 0;
|
| 493 |
el.style.transform = 'translateY(30px)';
|
|
|
|
| 22 |
|
| 23 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 24 |
|
| 25 |
+
html {
|
| 26 |
+
/* 1. ENABLE SMOOTH SCROLLING GLOBALLY */
|
| 27 |
+
scroll-behavior: smooth;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
body {
|
| 31 |
background-color: var(--bg-color);
|
| 32 |
color: var(--text-main);
|
|
|
|
| 35 |
line-height: 1.6;
|
| 36 |
}
|
| 37 |
|
| 38 |
+
/* --- ANIMATIONS --- */
|
| 39 |
@keyframes spin {
|
| 40 |
0% { transform: rotate(0deg); }
|
| 41 |
100% { transform: rotate(360deg); }
|
|
|
|
| 149 |
padding-right: 2rem;
|
| 150 |
letter-spacing: 0.5rem;
|
| 151 |
white-space: nowrap;
|
|
|
|
| 152 |
}
|
| 153 |
|
| 154 |
.glitch-effect:hover {
|
|
|
|
| 156 |
color: var(--accent-red);
|
| 157 |
}
|
| 158 |
|
| 159 |
+
/* --- PROFILE IMAGE --- */
|
| 160 |
.hero-img-container {
|
| 161 |
width: 100%;
|
| 162 |
height: 400px;
|
|
|
|
| 169 |
align-items: center;
|
| 170 |
}
|
| 171 |
|
|
|
|
| 172 |
.img-loader {
|
| 173 |
width: 50px;
|
| 174 |
height: 50px;
|
|
|
|
| 186 |
object-fit: cover;
|
| 187 |
filter: grayscale(100%) contrast(120%);
|
| 188 |
transition: filter 0.5s ease, transform 0.5s ease;
|
| 189 |
+
opacity: 0;
|
| 190 |
position: relative;
|
| 191 |
z-index: 2;
|
| 192 |
}
|
|
|
|
| 198 |
transform: scale(1.05);
|
| 199 |
}
|
| 200 |
|
|
|
|
| 201 |
.hero-img-container::after {
|
| 202 |
content: '';
|
| 203 |
position: absolute;
|
|
|
|
| 248 |
}
|
| 249 |
|
| 250 |
/* --- SECTIONS --- */
|
| 251 |
+
section, footer {
|
| 252 |
padding: 5rem 0;
|
| 253 |
border-bottom: 1px solid rgba(255,255,255,0.05);
|
| 254 |
+
/* 2. FIX SCROLL POSITION BEHIND HEADER */
|
| 255 |
+
scroll-margin-top: 80px;
|
| 256 |
}
|
| 257 |
|
| 258 |
.section-title {
|
|
|
|
| 467 |
</footer>
|
| 468 |
|
| 469 |
<script>
|
|
|
|
| 470 |
function toggleMenu() {
|
| 471 |
document.getElementById('navLinks').classList.toggle('active');
|
| 472 |
}
|
| 473 |
|
|
|
|
| 474 |
function imageLoaded() {
|
| 475 |
const img = document.querySelector('.hero-img');
|
| 476 |
const loader = document.getElementById('imgLoader');
|
| 477 |
+
img.classList.add('loaded');
|
| 478 |
+
loader.style.display = 'none';
|
|
|
|
| 479 |
}
|
| 480 |
|
|
|
|
| 481 |
const observer = new IntersectionObserver((entries) => {
|
| 482 |
entries.forEach(entry => {
|
| 483 |
if (entry.isIntersecting) {
|
|
|
|
| 487 |
});
|
| 488 |
}, { threshold: 0.1 });
|
| 489 |
|
|
|
|
| 490 |
document.querySelectorAll('.skill-card, .project-item').forEach((el) => {
|
| 491 |
el.style.opacity = 0;
|
| 492 |
el.style.transform = 'translateY(30px)';
|