/* 바디 기본 설정 */
body {
    font-family: 'Roboto', sans-serif; /* 구글 폰트 로보토 적용 */
    line-height: 1.7;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
    color: #797979ff;
    scroll-behavior: smooth;
}

/* 컨테이너 너비 및 가운데 정렬 */
.container {
    width: 85%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

/* 제목 태그 스타일 */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    color: #212529;
    margin-bottom: 15px;
}

/* 링크 기본 스타일 */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 버튼 기본 스타일 */
.btn {
    display: inline-block;
    color: #fff;
    background: #007bff;
    padding: 12px 25px;
    margin-top: 25px;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    margin: 10px;
}
.btn:hover {
    background: #ffffffff;
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.4);
    text-decoration: none;
}
.btn-secondary {
    background: #6c757d;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}
.btn-secondary:hover {
    background: #ffffffff;
    box-shadow: 0 8px 16px rgba(108, 117, 125, 0.4);
}

/* 헤더 전체를 flex 컨테이너로 */
header {
    display: flex;
    justify-content: space-between; /* 좌측 h1, 우측 nav */
    align-items: center;
    padding: 20px 20px;
    background: #212529;
    color: #fff;
    min-height: 70px;
    border-bottom: #007bff 4px solid;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* 헤더 제목 (왼쪽) */
header h1 {
    margin: 0;
    padding: 0;
    font-size: 2.2em;
    flex-shrink: 1;      /* 공간 부족 시 줄어듦 */
    flex-grow: 1;        /* 남는 공간 차지 */
    min-width: 0;        /* 말줄임 작동 */
    white-space: nowrap; /* 한 줄 유지 */
    overflow: hidden;
    text-overflow: ellipsis; /* 말줄임표 */
    color: #fff;
}

/* 네비게이션 (오른쪽) */
header nav {
    flex-shrink: 0;  /* 크기 줄어들지 않음 */
    min-width: 0;
}

/* nav ul을 flex로 배치, 메뉴가 넘치면 스크롤 가능 */
header nav ul {
    display: flex;
    gap: 15px;
    margin: 5px;
    padding: 5px;
    list-style: none;
    overflow-x: auto;            /* 넘칠 때 가로 스크롤 */
    -webkit-overflow-scrolling: touch; /* 터치 스크롤 부드럽게 */
}

/* 메뉴 아이템 */
header nav ul li {
    flex-shrink: 0; /* 작아지지 않게 */
}

/* 메뉴 링크 */
header nav ul li a {
    font-size: 1.1em;
    color: #fff;
    text-transform: uppercase;
    font-weight: 500;
    white-space: nowrap;
    padding: 0 8px;
    transition: color 0.3s ease, transform 0.2s ease;
}
header nav ul li a:hover {
    color: #007bff;
    transform: translateY(-2px);
    text-decoration: none;
}
/* 자격증 */
.certificates {
    padding: 60px 0;
    background-color: #f8f9fa;
    text-align: center;
}

.certificate-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 30px;
}

.certificate-item {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.certificate-item:hover {
    transform: translateY(-5px);
}

.certificate-item i {
    font-size: 2rem;
    color: #ff9800;
    margin-bottom: 10px;
}

.certificate-item h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: bold;
}


/* 히어로 섹션 */
#hero {
    min-height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
                url('https://via.placeholder.com/1500x500/007bff/ffffff?text=Your+Hero+Image') no-repeat center center/cover;
    background-attachment: fixed;
    text-align: center;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    position: relative;
}
#hero h2 {
    font-size: 3.5em;
    margin-bottom: 15px;
    color: #fff;
}
#hero p.lead {
    font-size: 1.4em;
    max-width: 700px;
    margin: 0 auto 10px;
}
#hero p.sub-lead {
    font-size: 1.1em;
    max-width: 600px;
    margin: 0 auto 20px;
    opacity: 0.8;
}

/* 타이핑 효과 */
#typing-text {
    border-right: 2px solid #fff;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3.5s steps(40, end) forwards, blink-caret .75s step-end infinite;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #fff; }
}

/* 섹션 기본 스타일 */
section {
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
    opacity: 1;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
section.is-visible {
    opacity: 1;
    transform: translateY(0);
}
section:nth-child(even) {
    background: #f1f3f5;
}
section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 3em;
    color: #007bff;
    position: relative;
    padding-bottom: 10px;
}
section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: #007bff;
    border-radius: 2px;
}

/* 소개 섹션 */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}
.about-image {
    flex: 1;
    min-width: 250px;
    text-align: center;
}
.about-image img {
    max-width: 100%;
    border-radius: 50%;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}
.about-image img:hover {
    transform: scale(1.05);
}
.about-text {
    flex: 2;
    font-size: 1.1em;
    text-align: justify;
}
.about-text p {
    margin-bottom: 15px;
}

/* 기술 스택 */
.skills .skill-category {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.skills .skill-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.skills .skill-category h3 {
    color: #007bff;
    margin-top: 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.8em;
}
.skills ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.skills li {
    background: #e9ecef;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1em;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.skills li:hover {
    background: #d0d7dd;
    transform: scale(1.05);
}
.skills li i {
    color: #007bff;
    font-size: 1.1em;
}

/* 포트폴리오 */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.portfolio-item {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}
.portfolio-item img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.portfolio-item h3 {
    color: #007bff;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8em;
}
.portfolio-item p {
    margin-bottom: 25px;
    font-size: 1.05em;
}
.portfolio-item a {
    font-weight: bold;
}

/* 연락처 섹션 */
.contact ul {
    list-style: none;
    padding: 0;
    text-align: center;
}
.contact li {
    margin-bottom: 20px;
}
.contact li a {
    font-size: 1.2em;
    transition: color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.contact li a:hover {
    color: #0056b3;
    transform: translateX(8px);
}
.contact li i {
    color: #007bff;
    font-size: 1.3em;
}

/* 푸터 */
footer {
    background: #212529;
    color: #fff;
    text-align: center;
    padding: 30px 0;
    font-size: 0.95em;
    box-shadow: 0 -3px 6px rgba(0, 0, 0, 0.25);
}

/* 스크롤 투 탑 버튼 */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    font-size: 1.5em;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}
#scrollToTopBtn:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 123, 255, 0.4);
}

/* 반응형 디자인: 992px 이하 */
@media (max-width: 992px) {
    .container {
        width: 90%;
    }
    #hero h2 {
        font-size: 3em;
    }
    #hero p.lead {
        font-size: 1.2em;
    }
    #hero p.sub-lead {
        font-size: 1em;
    }
    section h2 {
        font-size: 2.5em;
    }
    .skills .skill-category h3,
    .portfolio-item h3 {
        font-size: 1.6em;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-image img {
        margin-bottom: 20px;
    }
}

/* 반응형 디자인: 768px 이하 */
@media (max-width: 768px) {
    header {
        padding: 0 15px;
        gap: 10px;
    }
    header h1 {
        font-size: 1.4em;
        flex-grow: 1;
    }
    header nav ul {
        gap: 8px;
    }
    header nav ul li a {
        font-size: 0.9em;
        padding: 6px 6px;
    }
    #hero {
        min-height: 400px;
    }
    #hero h2 {
        font-size: 2.5em;
    }
    #hero p.lead {
        font-size: 1.1em;
    }
    #hero p.sub-lead {
        font-size: 0.9em;
    }
    .container {
        width: 95%;
    }
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .skills li {
        margin-right: 5px;
    }
    section h2 {
        font-size: 2.2em;
    }
    #scrollToTopBtn {
        padding: 12px;
        font-size: 1.2em;
        bottom: 20px;
        right: 20px;
    }
}

/* 반응형 디자인: 480px 이하 */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.1em;
    }
    header nav ul li {
        display: block;
        padding: 8px 0;
    }
    header nav ul li a {
        font-size: 0.8em;
        padding: 4px 6px;
    }
    #hero {
        min-height: 350px;
    }
    #hero h2 {
        font-size: 2em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    section h2 {
        font-size: 1.8em;
    }
    .skills ul {
        justify-content: center;
    }
    .skills .skill-category,
    .portfolio-item {
        padding: 20px;
    }
}

/* 파티클 캔버스 */
#particle-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.15);
}
