@font-face {
font-family: 'Pretendard';
src: url('fonts/Pretendard-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
}
@font-face {
font-family: 'Pretendard';
src: url('fonts/Pretendard-Bold.woff2') format('woff2');
font-weight: 700;
font-style: normal;
}
:root {
--bg-color: #111827;
--primary-color: #1f2937;
--secondary-color: #374151;
--accent-color: #34d399;
--text-color: #f3f4f6;
--text-muted-color: #9ca3af;
}
html {
scroll-behavior: smooth;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: 'Pretendard', sans-serif;
}
#main-header {
background-color: transparent;
}
#main-header.scrolled {
background-color: rgba(17, 24, 39, 0.8);
backdrop-filter: blur(10px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}
.nav-link {
position: relative;
color: var(--text-muted-color);
transition: color 0.3s ease;
padding: 8px 0;
}
.nav-link:hover,
.nav-link.active {
color: var(--accent-color);
}
.nav-link::after {
content: '';
position: absolute;
width: 0;
height: 2px;
bottom: 0;
left: 50%;
transform: translateX(-50%);
background-color: var(--accent-color);
transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
width: 100%;
}
#typing-text::after {
content: '|';
animation: blink 0.7s infinite;
color: var(--accent-color);
font-weight: bold;
}
@keyframes blink {
50% {
opacity: 0;
}
}
.section-title {
font-size: 2.25rem;
font-weight: 700;
position: relative;
display: inline-block;
padding-bottom: 0.5rem;
}
.section-title::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 60px;
height: 4px;
background-color: var(--accent-color);
border-radius: 2px;
}
.project-card {
background-color: var(--primary-color);
border-radius: 0.75rem;
overflow: hidden;
transition: transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.project-card:hover {
transform: translateY(-10px);
box-shadow: 0 20px 25px -5px rgba(52, 211, 153, 0.2), 0 8px 10px -6px rgba(52, 211, 153, 0.2);
}
.project-card img {
transition: transform 0.3s ease;
}
.project-card:hover img {
transform: scale(1.05);
}
.social-link {
display: inline-flex;
align-items: center;
justify-content: center;
width: 50px;
height: 50px;
border-radius: 50%;
background-color: var(--secondary-color);
color: var(--text-color);
font-size: 1.5rem;
font-weight: bold;
transition: all 0.3s ease;
}
.social-link:hover {
background-color: var(--accent-color);
color: var(--bg-color);
transform: translateY(-5px) scale(1.1);
}
#lightbox-close {
transition: transform 0.2s ease;
}
#lightbox-close:hover {
transform: rotate(90deg);
}
.scroll-animate {
opacity: 0;
transform: translateY(30px);
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.scroll-animate.visible {
opacity: 1;
transform: translateY(0);
}
@media (max-width: 767px) {
.nav-link {
width: 100%;
text-align: center;
}
.nav-link::after {
left: 0;
transform: none;
}
}
document.addEventListener('DOMContentLoaded', () => {
const header = document.getElementById('main-header');
const mobileMenuButton = document.getElementById('mobile-menu-button');
const mobileMenu = document.getElementById('mobile-menu');
const navLinks = document.querySelectorAll('.nav-link');
const sections = document.querySelectorAll('main section');
window.addEventListener('scroll', () => {
if (window.scrollY > 50) {
header.classList.add('scrolled');
} else {
header.classList.remove('scrolled');
}
});
mobileMenuButton.addEventListener('click', () => {
mobileMenu.classList.toggle('hidden');
});
navLinks.forEach(link => {
link.addEventListener('click', () => {
if (!mobileMenu.classList.contains('hidden')) {
mobileMenu.classList.add('hidden');
}
});
});
const typingTextElement = document.getElementById('typing-text');
const textsToType = [
"사용자 중심의 인터페이스를 설계하고 개발합니다.",
"견고하고 확장 가능한 백엔드 시스템을 구축합니다.",
"새로운 기술을 탐구하고 적용하는 것을 즐깁니다."
];
let textIndex = 0;
let charIndex = 0;
let isDeleting = false;
function type() {
const currentText = textsToType[textIndex];
if (isDeleting) {
typingTextElement.textContent = currentText.substring(0, charIndex - 1);
charIndex--;
} else {
typingTextElement.textContent = currentText.substring(0, charIndex + 1);
charIndex++;
}
let typeSpeed = isDeleting ? 50 : 100;
if (!isDeleting && charIndex === currentText.length) {
typeSpeed = 2000;
isDeleting = true;
} else if (isDeleting && charIndex === 0) {
isDeleting = false;
textIndex = (textIndex + 1) % textsToType.length;
typeSpeed = 500;
}
setTimeout(type, typeSpeed);
}
type();
const characterElement = document.getElementById('character-wakaba');
const expressions = [
'images/wakaba-normal.webp',
'images/wakaba-wink.webp',
'images/wakaba-happy.webp',
'images/wakaba-thinking.webp'
];
let currentExpressionIndex = 0;
characterElement.style.backgroundImage = `url('${expressions[0]}')`;
setInterval(() => {
currentExpressionIndex = (currentExpressionIndex + 1) % expressions.length;
characterElement.style.backgroundImage = `url('${expressions[currentExpressionIndex]}')`;
}, 4000);
const lightbox = document.getElementById('lightbox');
const lightboxImage = document.getElementById('lightbox-image');
const lightboxClose = document.getElementById('lightbox-close');
const galleryItems = document.querySelectorAll('.gallery-item');
galleryItems.forEach(item => {
item.addEventListener('click', () => {
lightboxImage.src = item.src;
lightbox.classList.remove('hidden');
lightbox.classList.add('flex');
});
});
function closeLightbox() {
lightbox.classList.add('hidden');
lightbox.classList.remove('flex');
lightboxImage.src = '';
}
lightboxClose.addEventListener('click', closeLightbox);
lightbox.addEventListener('click', (e) => {
if (e.target === lightbox) {
closeLightbox();
}
});
const scrollObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('visible');
}
});
}, { threshold: 0.1 });
document.querySelectorAll('.scroll-animate').forEach(el => {
scrollObserver.observe(el);
});
const navObserver = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
navLinks.forEach(link => {
link.classList.remove('active');
if (link.getAttribute('href').substring(1) === entry.target.id) {
link.classList.add('active');
}
});
}
});
}, { rootMargin: "-50% 0px -50% 0px" });
sections.forEach(section => {
navObserver.observe(section);
});
const ctx = document.getElementById('skillsChart');
if (ctx) {
new Chart(ctx, {
type: 'radar',
data: {
labels: ['JavaScript', 'React', 'Node.js', 'Python', 'Database', 'CSS/HTML', 'DevOps'],
datasets: [{
label: 'Proficiency',
data: [90, 85, 80, 75, 80, 95, 70],
backgroundColor: 'rgba(52, 211, 153, 0.2)',
borderColor: 'rgba(52, 211, 153, 1)',
pointBackgroundColor: 'rgba(52, 211, 153, 1)',
pointBorderColor: '#fff',
pointHoverBackgroundColor: '#fff',
pointHoverBorderColor: 'rgba(52, 211, 153, 1)',
borderWidth: 2
}]
},
options: {
maintainAspectRatio: false,
responsive: true,
scales: {
r: {
angleLines: { color: 'rgba(255, 255, 255, 0.2)' },
grid: { color: 'rgba(255, 255, 255, 0.2)' },
pointLabels: {
color: '#f3f4f6',
font: {
size: 14,
family: 'Pretendard'
}
},
ticks: {
color: '#111827',
backdropColor: 'rgba(255, 255, 255, 0.8)',
stepSize: 20
}
}
},
plugins: {
legend: {
display: false
},
tooltip: {
backgroundColor: '#1f2937',
titleFont: { size: 14, family: 'Pretendard' },
bodyFont: { size: 12, family: 'Pretendard' },
padding: 10,
cornerRadius: 4,
callbacks: {
label: function(context) {
let label = context.dataset.label || '';
if (label) {
label += ': ';
}
if (context.parsed.r !== null) {
label += context.parsed.r + '%';
}
return label;
}
}
}
}
}
});
}
});