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

:root {
    --primary-color: #00aaff;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #e0e0e0;
    --secondary-text-color: #a0a0a0;
}

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

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header {
    background-color: var(--surface-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    background-color: rgba(30, 30, 30, 0.95);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
    
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav li {
    margin-left: 2rem;
}


nav a {
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

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

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

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

main {
    padding: 2rem;
}

#hero {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1500x800') no-repeat center center/cover;
    background-attachment: fixed;
    background-size: 110% 110%;
    animation: heroBackgroundZoom 20s infinite alternate ease-in-out, heroGradientShift 15s infinite alternate ease-in-out;
}

@keyframes heroBackgroundZoom {
    from {
        background-size: 110% 110%;
    }
    to {
        background-size: 100% 100%;
    }
}

@keyframes heroGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #ffffff;
    
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--secondary-text-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
    z-index: -1;
}

.btn:hover::before {
    width: 200%;
    height: 200%;
    opacity: 1;
}

.btn:hover {
    background-color: #0088cc;
    text-decoration: none;
}

section {
    padding: 4rem 2rem;
    border-bottom: 1px solid var(--surface-color);
}

section:last-child {
    border-bottom: none;
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
    
}


#about {
    text-align: center;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--surface-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border: 1px solid transparent;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.project-card:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 170, 255, 0.7); 
    border-color: var(--primary-color);
}

.project-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.project-card .project-details-btn { 
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    color: var(--primary-color);
    background-color: transparent;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    text-decoration: none; 
}

.project-card .project-details-btn:hover {
    background-color: var(--primary-color);
    color: var(--background-color); 
    border-color: var(--primary-color); 
    text-decoration: none; 
}

#contact {
    text-align: center;
    padding-bottom: 6rem; 
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details .contact-info {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-color);
}

.contact-email-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    margin-top: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.contact-email-btn::before { 
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: width 0.4s ease-out, height 0.4s ease-out, opacity 0.4s ease-out;
    z-index: -1;
}

.contact-email-btn:hover::before {
    width: 200%;
    height: 200%;
    opacity: 1;
}

.contact-email-btn:hover {
    background-color: #0088cc;
    transform: translateY(-3px); 
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.social-links a {
    color: var(--secondary-text-color);
    font-size: 2.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
}


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

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

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}


#hero .hero-text h1,
#hero .hero-text p,
#hero .hero-text .btn {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

#hero .hero-text h1 {
    animation-delay: 0.2s;
}

#hero .hero-text p {
    animation-delay: 0.4s;
}

#hero .hero-text .btn {
    animation-delay: 0.6s;
}


.typing-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-right-color: transparent }
    50% { border-right-color: var(--primary-color); }
}


.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--surface-color);
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    animation: modalOpen 0.3s ease-out forwards;
}

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

.close-button {
    color: var(--secondary-text-color);
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    color: var(--primary-color);
    margin-top: 0;
    font-size: 2rem;
}

.modal-content p {
    color: var(--text-color);
    margin-bottom: 1.5rem;
}


.scroll-to-top-btn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s;
}

.scroll-to-top-btn:hover {
    background-color: #0088cc;
    transform: translateY(-5px);
}


#languages, #games {
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--surface-color);
}

#languages h2, #games h2 {
    margin-bottom: 3rem;
    font-size: 2.5rem; 
    color: #ffffff; 
    
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#languages h2 i, #games h2 i {
    font-size: 2.2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}


@media (min-width: 768px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skill-card, .game-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.skill-card:hover, .game-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 170, 255, 0.5); 
    border-color: var(--primary-color);
}

.skill-card h4, .game-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    position: relative;
    z-index: 1;
}

.skill-card p, .game-card p {
    color: var(--secondary-text-color);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    cursor: default; 
}


.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0, 170, 255, 0.1), rgba(0, 170, 255, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.game-card:hover::before {
    opacity: 1;
}
.contact-ul {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.contact-li a {
    font-size: 3rem; 
    color: var(--secondary-text-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-li a:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}
.skill-card, .game-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;

    
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.8rem; 
    text-align: center;
}

.skill-card i, .game-card i {
    font-size: 1.8rem; 
    color: var(--primary-color);
    margin: 0; 
}

.skill-card h4, .game-card h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.2rem;
}



.game-card {
    justify-content: center;
}


.game-card h4 {
    margin: 0;
}

.project-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    height: 100%; 
}

.project-card h3, .project-card p {
    margin-bottom: 1rem; 
}

.project-card .view-details-btn {
    margin-top: auto; 
    align-self: flex-start; 
}

#about p {
    max-width: 800px; 
    margin: 0 auto; 
    color: var(--secondary-text-color); 
    font-size: 1rem; 
    line-height: 1.8; 
    text-align: justify; 
    hyphens: auto; 
}

footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--surface-color);
    color: var(--secondary-text-color);
    font-size: 0.9rem;
    border-top: 1px solid #2a2a2a;
}

footer p {
    margin: 0;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: center;
    }

    nav .logo {
        margin-bottom: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    nav li {
        margin: 0.5rem 0;
        width: 100%;
        text-align: center;
    }

    nav a::after {
        display: none; 
    }

    #hero {
        height: 60vh;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    section {
        padding: 3rem 1rem;
    }

    h2 {
        font-size: 2rem;
    }

    .project-grid, .card-grid {
        grid-template-columns: 1fr; 
    }

    .modal-content {
        width: 90%;
    }

    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px 17px;
    }
}