@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #6a89cc;
    --secondary-color: #4a69bd;
    --background-color: #1e272e;
    --text-color: #ecf0f1;
    --card-bg-color: #2c3e50;
    --header-bg-color: rgba(30, 39, 46, 0.8);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
}

header {
    background-color: var(--header-bg-color);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    text-align: center;
    transition: background-color 0.3s;
}

nav a {
    color: white;
    margin: 0 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s, transform 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--primary-color);
}

nav a:hover::after {
    width: 100%;
}

main {
    padding-top: 80px;
}

section {
    padding: 6rem 2rem;
    text-align: center;
    border-bottom: 1px solid #3a4a5a;
}

section:last-of-type {
    border-bottom: none;
}

#about {
    background: linear-gradient(rgba(30, 39, 46, 0.9), rgba(30, 39, 46, 0.9)), url('https://images.unsplash.com/photo-1526374965328-7f61d4dc18c5?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    background-attachment: fixed;
}

#home {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1534972195531-d756b9bfa9f2?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px var(--shadow-color);
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.5rem;
    font-weight: 300;
    animation: fadeInUp 1s ease-out;
}

h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.project-item {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px var(--shadow-color);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: left;
    border-left: 5px solid var(--primary-color);
}

.project-item:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px var(--shadow-color);
}

.project-item h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

#contact a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2rem;
    transition: color 0.3s;
}

#contact a:hover {
    color: var(--secondary-color);
}

footer {
    background-color: var(--card-bg-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }
    .hero p {
        font-size: 1.2rem;
    }
    h2 {
        font-size: 2.5rem;
    }
    nav a {
        margin: 0 10px;
        font-size: 1rem;
    }
}

#about h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

#about ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

#about li {
    background-color: var(--primary-color);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 8px var(--shadow-color);
    transition: transform 0.3s, background-color 0.3s;
}

#about li:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color);
}

.project-link {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.8rem 1.8rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background-color 0.3s, transform 0.3s;
}

.project-link:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.cursor {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--primary-color);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    transition: transform 0.1s;
}

.trail {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--primary-color);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9998;
    animation: fadeOut 0.5s forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

#home .hero {
    position: relative;
    z-index: 2;
}

.project-item {
    transform-style: preserve-3d;
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    text-decoration: none;
}

#scrollTopBtn:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1);
}

#scrollTopBtn.show {
    opacity: 1;
}
