File size: 30,427 Bytes
bfd0ac4 b362095 bfd0ac4 b362095 bfd0ac4 067fe8a bfd0ac4 067fe8a bfd0ac4 067fe8a b362095 067fe8a bfd0ac4 2734142 b362095 c00ec19 b362095 067fe8a b362095 067fe8a cb26e78 067fe8a d09f3cb bfd0ac4 b362095 d09f3cb b362095 13b6b21 bfd0ac4 d09f3cb 13b6b21 cb26e78 b362095 5d2a495 b362095 bfd0ac4 b362095 067fe8a bfd0ac4 b362095 bfd0ac4 b362095 5644974 b362095 bfd0ac4 b362095 bfd0ac4 b362095 69b0b57 b362095 69b0b57 b362095 69b0b57 bfd0ac4 b362095 bfd0ac4 69b0b57 067fe8a bfd0ac4 d09f3cb 067fe8a b362095 f72baf5 b362095 123060e acc3625 b362095 067fe8a b362095 d78267e b362095 067fe8a b362095 680568a e2e845c 067fe8a b362095 cb26e78 b362095 cb26e78 b362095 cb26e78 067fe8a acc3625 cb26e78 c8023b6 b362095 cb26e78 b362095 bfd0ac4 cb26e78 b362095 cb26e78 b362095 0308a1d bfd0ac4 0308a1d b362095 0308a1d b362095 bfd0ac4 b362095 bfd0ac4 067fe8a b362095 225d188 b362095 c00ec19 067fe8a bfd0ac4 067fe8a bfd0ac4 b362095 bfd0ac4 b362095 067fe8a b362095 cb26e78 067fe8a b362095 067fe8a de121ef 5cbd4d2 b362095 067fe8a bfd0ac4 b362095 | 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 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Oskar L.K | Game Designer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Space Grotesk', sans-serif;
scroll-behavior: smooth;
}
.skill-icon {
transition: all 0.3s ease;
}
.skill-icon:hover {
transform: scale(1.1);
}
.project-card {
transition: all 0.3s ease;
}
.project-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.2);
}
</style>
</head>
<body class="bg-gray-50 text-gray-800 relative">
<!-- Scroll Indicator -->
<div class="fixed right-8 top-1/2 transform -translate-y-1/2 h-screen flex flex-col items-center justify-center z-40">
</div>
<custom-navbar></custom-navbar>
<!-- Hero Section -->
<section class="relative h-screen flex items-center justify-center text-white pt-16 overflow-hidden">
<video autoplay muted loop playsinline class="absolute w-full h-full object-cover z-0">
<source src="https://assets.mixkit.co/videos/preview/mixkit-abstract-digital-grid-of-dots-8541-large.mp4" type="video/mp4">
</video>
<div class="absolute w-full h-full bg-black/50 z-10"></div>
<div class="text-center px-4 z-20 relative max-w-4xl">
<h1 class="text-4xl md:text-7xl font-bold mb-6 animate-fade-in">
<span class="text-red-500">Oskar Lundmark Koblanck</span>
<div class="text-3xl md:text-5xl font-medium mt-4">Game Design & Interactive Experiences</div>
</h1>
<p class="text-xl md:text-2xl mb-8 max-w-2xl mx-auto">Creating immersive worlds and engaging gameplay mechanics that tell memorable stories</p>
<div class="flex flex-col sm:flex-row justify-center gap-4 hovered-element">
<a href="#works" class="relative inline-block px-8 py-4 border-2 border-white hover:border-transparent rounded-full font-medium transition-all duration-300 transform hover:scale-105 group overflow-hidden">
<span class="relative z-10 flex items-center hovered-element">View Projects</span>
<span class="absolute inset-0 bg-red-500 opacity-0 group-hover:opacity-40 transition-opacity duration-300 rounded-full hovered-element"></span>
</a>
<a href="#contact" class="relative inline-block px-8 py-4 border-2 border-white hover:border-transparent rounded-full font-medium transition-all duration-300 transform hover:scale-105 group overflow-hidden">
<span class="relative z-10 hovered-element">Get in Touch</span>
<span class="absolute inset-0 bg-red-500 opacity-0 group-hover:opacity-40 transition-opacity duration-300 rounded-full hovered-element"></span>
</a>
</div>
</div>
<div class="absolute bottom-8 left-1/2 transform -translate-x-1/2 animate-bounce">
<i data-feather="chevron-down" class="w-8 h-8"></i>
</div>
</section>
<style>
.hero-image {
position: relative;
}
.hero-image video {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: 0;
}
.hero-image .content {
position: relative;
z-index: 1;
}
.bg-orange-500 {
background-color: #ff0000;
}
.bg-orange-600 {
background-color: #cc0000;
}
.bg-orange-700 {
background-color: #990000;
}
.text-orange-500 {
color: #ff0000;
}
.border-orange-500 {
border-color: #ff0000;
}
.bg-orange-100 {
background-color: #ffcccc;
}
.text-orange-800 {
color: #800000;
}
</style>
<!-- About Section -->
<section id="about" class="py-20 bg-white relative overflow-hidden">
<div class="absolute -right-32 -top-32 w-64 h-64 bg-red-100 rounded-full opacity-20 mix-blend-multiply"></div>
<div class="absolute -left-32 -bottom-32 w-64 h-64 bg-red-200 rounded-full opacity-20 mix-blend-multiply"></div>
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0 md:pr-10 relative z-10">
<h2 class="text-4xl font-bold mb-6 bg-gradient-to-r from-red-600 to-red-800 bg-clip-text text-transparent">Hello There!</h2>
<p class="text-xl mb-6 font-medium">My name is <span class="text-red-600">Oskar Lundmark Koblanck</span></p>
<div class="prose lg:prose-xl">
<p>Hello! My name is Oskar, and I'm a passionate game designer and maker. At 18, my journey into game development took an unexpected start. Initially, I pursued a career as an aircraft mechanic, but as I approached graduation during the COVID-19 pandemic, I decided to follow a passion of mine for game-making.</p>
<p class="mt-4">I began my formal education in game and UX & Game Design in the charming northern town of Skellefteå, Sweden. After two enriching years there (and a few too many cups of coffee and a couple of student parties), I decided to level up my skills and knowledge. This quest led me to Kortrijk, Belgium, where I'm enrolled in the Independent Game Production course at DAE. My diverse background and experiences fuel my ambition to create engaging and immersive gaming experiences, because let's be honest, who doesn't want to escape reality occasionally?</p>
<p class="mt-4">Thank you for visiting my portfolio!</p>
</div>
<a href="https://www.oskarlkportfolio.com/_files/ugd/6588f2_702049f1c21a4c0093148d8d58579f11.pdf" class="mt-6 inline-flex items-center px-6 py-3 border border-red-600 text-red-600 rounded-full hover:bg-red-700 hover:text-white transition">
Download CV
<i data-feather="download" class="ml-2"></i>
</a>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="relative">
<img src="https://static.wixstatic.com/media/6588f2_4fd8efde373342ed96ab1e31ce703032~mv2.jpg" alt="Oskar photo" class="rounded-lg shadow-xl w-full max-w-md">
<img src="https://static.wixstatic.com/media/6588f2_89c0a3ecc407460e9dd1208d6f38f934~mv2.png" alt="Portfolio map" class="absolute -bottom-16 -right-16 w-32 h-32 md:w-48 md:h-48 rounded-full border-4 border-white shadow-lg bg-white">
</div>
</div>
</div>
</div>
</section>
<!-- Skills Section -->
<section id="skills" class="py-20 bg-gray-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-center mb-16">Skills & Expertise</h2>
<div class="space-y-10">
<!-- Programs -->
<div class="bg-white p-8 rounded-xl shadow-sm">
<h3 class="text-xl font-semibold mb-6">Programs</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-6">
<div class="flex items-start space-x-4">
<img src="https://static.wixstatic.com/media/6588f2_343426c645c343119c7573fe9fc062a2~mv2.png" alt="Github" class="w-12 h-12 skill-icon">
<div>
<h4 class="font-medium">Github</h4>
<p class="text-sm text-gray-600">Have a understanding working with it and solve problems</p>
</div>
</div>
<div class="flex items-start space-x-4">
<img src="https://static.wixstatic.com/media/6588f2_77819fb153d5430193f6193fb2b62d99~mv2.png" alt="Substance Painter" class="w-12 h-12 skill-icon">
<div>
<h4 class="font-medium">Substance Painter</h4>
<p class="text-sm text-gray-600">Creating stylized materials and simple smart materials</p>
</div>
</div>
<div class="flex items-start space-x-4">
<img src="https://static.wixstatic.com/media/6588f2_843589acdd1c45089176640ba6cda12e~mv2.png" alt="Unity" class="w-12 h-12 skill-icon">
<div>
<h4 class="font-medium">Unity</h4>
<p class="text-sm text-gray-600">Understand and able to work with unity, scripting, level creation & shaders</p>
</div>
</div>
<div class="flex items-start space-x-4">
<img src="https://static.wixstatic.com/media/6588f2_f66aff1b5b324761a9f8ac39505c480e~mv2.png" alt="Blender" class="w-12 h-12 skill-icon">
<div>
<h4 class="font-medium">Blender</h4>
<p class="text-sm text-gray-600">Able to understand and create stylized 3d assets, simple animations & sculpting</p>
</div>
</div>
</div>
</div>
<!-- Education -->
<div class="bg-white p-8 rounded-xl shadow-sm mt-10">
<h3 class="text-xl font-semibold mb-6">Education & Languages</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<div class="space-y-6">
<div>
<h4 class="font-medium">DEA, Howest - IGP</h4>
<p class="text-gray-600">Kortrijk, Belgium</p>
<p class="text-sm text-gray-500">2022 - expected (2026)</p>
</div>
<div>
<h4 class="font-medium">Futuregames - UX & Game Designer</h4>
<p class="text-gray-600">Skelletfeå, Sweden</p>
<p class="text-sm text-gray-500">2020 - 2022</p>
</div>
</div>
<div>
<h4 class="font-medium">Languages</h4>
<p class="text-gray-600">Swedish - Native speaker</p>
<p class="text-gray-600">English - Highly proficient</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Projects Section -->
<section id="works" class="py-20 bg-gradient-to-b from-white to-gray-50">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<h2 class="text-3xl font-bold text-center mb-6">Featured Projects</h2>
<div class="flex justify-center space-x-4 mb-16">
<button id="all-btn" class="px-6 py-2 bg-red-600 text-white rounded-full font-medium" onclick="filterProjects('all')">All</button>
<button id="games-btn" class="px-6 py-2 border border-red-600 text-red-600 rounded-full font-medium hover:bg-red-50" onclick="filterProjects('games')">Games</button>
<button id="art-btn" class="px-6 py-2 border border-red-600 text-red-600 rounded-full font-medium hover:bg-red-50" onclick="filterProjects('art')">Art</button>
</div>
<div id="projects-grid" class="w-full max-w-7xl mx-auto">
<!-- Games Column -->
<div id="games-col" class="w-full">
<h3 class="text-3xl font-bold mb-10 text-center">Games</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="https://static.wixstatic.com/media/6588f2_d9fdecb14bfc48ac99bd5efed3e1b054~mv2.png" alt="Bap Cat" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Bap Cat</h2>
<h3 class="text-xl font-semibold mb-2">A game about a cat spreading chaos in their owners cafe</h3>
<p class="text-gray-600 mb-4">Why? Simply because it wants to spend more time with their owner.</p>
<a href="BapCatProject.html" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="http://static.photos/gaming/640x360/101" alt="Mech Warrior" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Mech Warrior</h2>
<h3 class="text-xl font-semibold mb-2">Epic mech battles in futuristic cities</h3>
<p class="text-gray-600 mb-4">Strategic combat game with customizable mech units</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
</div>
</div>
<!-- Art Column -->
<div id="art-col" class="w-full">
<h3 class="text-3xl font-bold mb-10 text-center">Art</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="https://static.wixstatic.com/media/6588f2_24e4126d37144f21863c7c78faba9f93~mv2.jpg" alt="The Fireflies Night" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">The Fireflies Night</h2>
<h3 class="text-xl font-semibold mb-2">In the full moonlight, there is a house, where the fireflies lead weary travelers to its doors.</h3>
<p class="text-gray-600 mb-4">Take control of a powerful mech and engage in intense combat scenarios</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="http://static.photos/art/640x360/42" alt="Concept Art Collection" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Concept Art Collection</h2>
<h3 class="text-xl font-semibold mb-2">Stylized character designs</h3>
<p class="text-gray-600 mb-4">A series of character concepts for fantasy RPG game</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Games Column (Filtered State) -->
<div id="games-col-filtered" class="w-full" style="display: none;">
<h3 class="text-3xl font-bold mb-10 text-center">Games</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-8">
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="https://static.wixstatic.com/media/6588f2_d9fdecb14bfc48ac99bd5efed3e1b054~mv2.png" alt="Project 1" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Bap Cat</h2>
<h3 class="text-xl font-semibold mb-2">A game about a cat spreading chaos in their owners cafe</h3>
<p class="text-gray-600 mb-4">Why? Simply because it wants to spend more time with their owner.</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="http://static.photos/gaming/640x360/101" alt="Game Project 1" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Mech Warrior</h2>
<h3 class="text-xl font-semibold mb-2">Epic mech battles in futuristic cities</h3>
<p class="text-gray-600 mb-4">Strategic combat game with customizable mech units</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
<div class="project-card bg-gray-50 rounded-xl overflow-hidden shadow-sm h-full">
<img src="http://static.photos/gaming/640x360/102" alt="Game Project 2" class="w-full h-48 object-cover">
<div class="p-6">
<h2 class="text-2xl font-bold mb-2">Pixel Adventure</h2>
<h3 class="text-xl font-semibold mb-2">Retro-style platformer with modern mechanics</h3>
<p class="text-gray-600 mb-4">Explore a vibrant pixel world full of secrets and challenges</p>
<a href="#" class="text-red-600 hover:text-red-800 font-medium inline-flex items-center">
View Project
<i data-feather="arrow-right" class="ml-2"></i>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="text-center mt-16">
<a href="projects.html" class="inline-block px-8 py-3 bg-red-600 text-white rounded-full font-medium transition hover:bg-red-700">
View All Projects
<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 inline ml-2" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-8.707l-3-3a1 1 0 00-1.414 1.414L10.586 9H7a1 1 0 100 2h3.586l-1.293 1.293a1 1 0 101.414 1.414l3-3a1 1 0 000-1.414z" clip-rule="evenodd" />
</svg>
</a>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-20 bg-red-600 text-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center">
<h2 class="text-3xl font-bold mb-12">Get In Touch</h2>
<div class="flex flex-col items-center">
<div class="mb-8">
<h3 class="text-xl font-semibold mb-4">Email</h3>
<a href="mailto:Oskar.nr1.one@gmail.com" class="text-xl hover:underline">Oskar.nr1.one@gmail.com</a>
</div>
<div>
<h3 class="text-xl font-semibold mb-4">Follow Me</h3>
<div class="flex space-x-4 justify-center">
<a href="https://bsky.app/profile/oskarlk.bsky.social" class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center hover:bg-white/30 transition">
<img src="https://static.wixstatic.com/media/6588f2_8c8e8a9f68d245f29656f1bbda771871~mv2.png" alt="Bluesky" class="w-5 h-5">
</a>
<a href="https://www.linkedin.com/in/oskar-lundmark-koblanck-ab8010211/" class="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center hover:bg-white/30 transition">
<img src="https://static.wixstatic.com/media/6ea5b4a88f0b4f91945b40499aa0af00.png" alt="LinkedIn" class="w-5 h-5">
</a>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-red-800 text-red-100 py-8 hovered-element">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center hovered-element">
<p class="hovered-element">© 2025 Oskar Lundmark Koblanck. All rights reserved.</p>
<p class="mt-2 text-sm hovered-element">Game Designer & Developer</p>
</div>
</footer>
<script src="components/navbar.js"></script>
<script>
// Mobile menu toggle
document.getElementById('menu-toggle').addEventListener('click', function () {
document.getElementById('mobile-menu').classList.toggle('hidden');
});
// Close mobile menu when clicking a link
document.querySelectorAll('#mobile-menu a').forEach(link => {
link.addEventListener('click', function () {
document.getElementById('mobile-menu').classList.add('hidden');
});
});
// Smooth scrolling for anchor links
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
// Initialize feather icons
feather.replace();
// Project filtering functionality
function filterProjects(filter) {
const gamesCol = document.getElementById('games-col');
const artCol = document.getElementById('art-col');
const gamesBtn = document.getElementById('games-btn');
const artBtn = document.getElementById('art-btn');
const allBtn = document.getElementById('all-btn');
// Reset all buttons
gamesBtn.classList.remove('bg-red-600', 'text-white');
gamesBtn.classList.add('border', 'border-red-600', 'text-red-600');
artBtn.classList.remove('bg-red-600', 'text-white');
artBtn.classList.add('border', 'border-red-600', 'text-red-600');
allBtn.classList.remove('bg-red-600', 'text-white');
allBtn.classList.add('border', 'border-red-600', 'text-red-600');
if (filter === 'games') {
gamesCol.style.display = 'grid';
artCol.style.display = 'none';
gamesBtn.classList.add('bg-red-600', 'text-white');
gamesBtn.classList.remove('border', 'border-red-600', 'text-red-600');
} else if (filter === 'art') {
gamesCol.style.display = 'none';
artCol.style.display = 'grid';
artBtn.classList.add('bg-red-600', 'text-white');
artBtn.classList.remove('border', 'border-red-600', 'text-red-600');
} else { // all
gamesCol.style.display = 'grid';
artCol.style.display = 'grid';
allBtn.classList.add('bg-red-600', 'text-white');
allBtn.classList.remove('border', 'border-red-600', 'text-red-600');
}
}
// Initialize with all shown by default
document.addEventListener('DOMContentLoaded', function () {
filterProjects('all');
});
// Scroll to section function
function scrollToSection(sectionId) {
if (sectionId === 'hero') {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
} else {
const section = document.getElementById(sectionId);
if (section) {
section.scrollIntoView({
behavior: 'smooth'
});
}
}
}
// Scroll position indicator that moves smoothly with scroll
function updateScrollIndicator() {
const indicator = document.getElementById('scroll-indicator');
const dots = document.querySelectorAll('[data-section]');
const sections = document.querySelectorAll('section');
const viewportMiddle = window.scrollY + (window.innerHeight / 2);
let activeSection = null;
let closestDistance = Infinity;
const positions = {
'hero': 10,
'about': 30,
'skills': 55,
'works': 80,
'contact': 95
};
// Find which section is currently in focus
sections.forEach(section => {
const sectionTop = section.offsetTop;
const sectionHeight = section.offsetHeight;
const sectionMiddle = sectionTop + (sectionHeight / 2);
const distance = Math.abs(viewportMiddle - sectionMiddle);
if (distance < closestDistance) {
closestDistance = distance;
activeSection = section.id;
}
});
// Move red indicator to active section
if (activeSection && positions[activeSection]) {
}
// Update dot highlighting
dots.forEach(dot => {
const section = dot.getAttribute('data-section');
const innerDot = dot.querySelector('div');
if (section === activeSection) {
innerDot.classList.add('bg-gray-600', 'hover:bg-gray-700');
innerDot.classList.remove('bg-gray-400', 'hover:bg-gray-500');
} else {
innerDot.classList.add('bg-gray-400', 'hover:bg-gray-500');
innerDot.classList.remove('bg-red-600', 'hover:bg-red-700');
}
});
}
// Add click handlers for section dots (excluding top dot which has separate handler)
document.querySelectorAll('[data-section]').forEach(dot => {
dot.addEventListener('click', function () {
const sectionId = this.getAttribute('data-section');
scrollToSection(sectionId);
});
});
// Throttle scroll events for performance
let isScrolling;
window.addEventListener('scroll', function () {
window.clearTimeout(isScrolling);
isScrolling = setTimeout(function () {
updateScrollIndicator();
}, 16); // ~60fps
}, false);
window.addEventListener('load', updateScrollIndicator);
// Update dot highlighting based on scroll position
function updateScrollIndicator() {
const sections = document.querySelectorAll('section');
const viewportMiddle = window.scrollY + (window.innerHeight / 2);
let activeSection = null;
let closestDistance = Infinity;
sections.forEach(section => {
const sectionTop = section.offsetTop;
const sectionHeight = section.offsetHeight;
const sectionMiddle = sectionTop + (sectionHeight / 2);
const distance = Math.abs(viewportMiddle - sectionMiddle);
if (distance < closestDistance) {
closestDistance = distance;
activeSection = section.id;
}
});
document.querySelectorAll('[data-section]').forEach(dot => {
const section = dot.getAttribute('data-section');
const innerDot = dot.querySelector('div');
if (section === activeSection) {
innerDot.classList.add('bg-gray-600', 'hover:bg-gray-700');
innerDot.classList.remove('bg-gray-400', 'hover:bg-gray-500');
} else {
innerDot.classList.add('bg-gray-400', 'hover:bg-gray-500');
innerDot.classList.remove('bg-gray-600', 'hover:bg-gray-700');
}
});
}
</script>
</body>
</html> |