/* style.css */
body {
    margin: 0;
    padding: 0;
    background: #fff;
    color: #3c3c3c;
}

header {
    position: sticky;
    top: 0;
    background-color: pink;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff
}

.lnb ul {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.lnb a {
    display: block;
    width: 100px;
    color: #fff;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.5s;
    text-align: center;
}

.lnb a:hover {
    color: deeppink;
    font-weight: bold;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 4px 0;
    transition: 0.4s;
}


#about,
#skills,
#portfolio,
#contact {
    padding: 4rem 2rem;
}

.about-content {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 70px;
    margin: 0 auto;
}

.about-content img {
    width: 400px;
    height: auto;
    border-radius: 10px;
    margin: 0;
    flex-shrink: 0;
}

.about-content p {
    width: 520px;
    line-height: 1.8;
    text-align: justify;
    font-size: 16px;
    margin-top: 50px;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.skill-item img {
    width: 80px;
    height: auto;
}
.portfolio-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* ✅ PC에서 3열 고정 */
    gap: 2rem;                             /* ✅ 카드 간격 */
    justify-items: center;                 /* ✅ 가운데 정렬 */
    padding: 2rem 1rem;
    max-width: 1200px;                     /* ✅ 전체 넓이 제한 */
    margin: 0 auto;                        /* ✅ 가운데 정렬 */
    box-sizing: border-box;
}

.portfolio-item {
    width: 100%;
    max-width: 360px;                      /* ✅ 카드 크기를 조금 키움 */
    border: 1px solid pink;
    padding: 1rem;
    border-radius: 10px;
    background: white;
    box-sizing: border-box;
}


.portfolio-item img {
    width: 100%;
    border-radius: 10px;
}

.btn {
    display: inline-block;
    margin: 4px;
    padding: 0.5rem 1rem;
    background: pink;
    color: white;
    text-decoration: none;
    border-radius: 5px;
}



.btn:hover {
    background: deeppink;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    margin: 0.5rem 0;
}

.contact-list a {
    color: pink;
    text-decoration: none;
}

.contact-list a:hover {
    color: deeppink;
}

@media (max-width: 1023px) {
    .lnb {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .mobile-menu.active {
        display: flex;
    }

    .hamburger.active .bar1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.active .bar2 {
        opacity: 0;
    }

    .hamburger.active .bar3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .about-content img {
        width: 200px;
        height: auto;
        border-radius: 10px;
        margin: 0 auto;
    }

    .about-content {
        flex-direction: column;
        align-items: center;
    }

    .about-content p {
        width: 310px;
        text-align: justify;
    }
         .portfolio-list {
        grid-template-columns: repeat(2, 1fr); /* ✅ 태블릿에서는 2열 */
    }

    .portfolio-item {
        width: 280px;
        flex: 1 1 auto;
         margin: 0 auto;
        
    }
    
 
}

/* Responsive title sizes */
h2 {
    font-size: 64px;
    text-align: center;
}

@media (min-width: 700px) and (max-width: 1023px) {
    h2 {
        font-size: 48px;
    }
    .about-content img {
        width: 300px;
    }
    .about-content p {
        width: 600px;
        text-align: justify;
        font-size: 20px;
        margin-top: 0;
    }
    #mobileMenu a {
        font-size: 24px;
        padding: 0.7rem 0; 
    }

    #mobileMenu ul {
        width: 460px;
        gap: 0.8rem 0; 
    }
   
    #mobileMenu li {
    max-width: 110px; 
}
    
}


@media (max-width: 700px) {
    h2 {
        font-size: 32px;
    }

    body {
        font-size: 14px;
    }
 
    .about-content p {
        width: 280px;
        margin-top: 0;
        font-size: 16px;
    }
    .portfolio-list {
        grid-template-columns: 1fr;            /* ✅ 모바일에서는 1열 */
    }
    


    
}

.mobile-menu {
    display: none;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    background-color: pink;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    padding: 1rem 0;
    z-index: 9999;
}

.mobile-menu ul {
    width: 300px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem 0;
}

.mobile-menu li {
    flex: 1 1 22%; 
    max-width: 100px; 
    text-align: center;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #fff;
    text-decoration: none;
    font-size: 16px;
}


.mobile-menu a:hover {
    color: deeppink;
    font-weight: bold;
}

/* Hamburger X shape fix */
.hamburger.active .bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .bar2 {
    opacity: 0;
}

.hamburger.active .bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Contact section centered with title above */
#contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem 4rem;
    
}

#contact h2 {
    font-size: 32px;
}

.contact-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.contact-list {
    list-style: none;
    padding: 0;
    text-align: left;
}

.contact-list li {
    margin: 1rem 0;
}

.contact-list span {
    font-weight: bold;
    margin-right: 10px;
}

.contact-list a {
    color: pink;
    transition: color 0.3s;
    
}

.contact-list a:hover {
    color: deeppink;
}

#topButton {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: none;
    background-color: pink;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    z-index: 1000;
    transition: 0.3s;
}

#topButton:hover {
    background-color: deeppink;
}

