/* 기본 설정 및 폰트 */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Noto+Sans+KR:wght@300;400;700&display=swap');

:root {
    --primary-color: #e74c3c; /* 포인트 색상: 강렬한 빨간색 */
    --secondary-color: #2c3e50; /* 보조 색상: 다크 블루 */
    --background-light: #f9f9f9;
    --background-dark: #222;
    --text-light: #fff;
    --text-dark: #333;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Noto Sans KR', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.section {
    padding: 100px 0;
    text-align: center;
}

.section h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    margin-bottom: 50px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 10px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.dark-bg {
    background-color: var(--background-dark);
    color: var(--text-light);
}

.dark-bg h2 {
    color: var(--text-light);
}
.dark-bg .section h2::after {
    background-color: var(--primary-color);
}

/* --- 헤더 및 내비게이션 --- */
#main-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

#main-nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-list {
    display: flex;
    gap: 30px;
}

.nav-list a {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--secondary-color);
}

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

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 30px;
    height: 25px;
    position: relative;
}

.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary-color);
    transition: transform 0.3s ease;
}

.hamburger-icon::before {
    position: absolute;
    top: -8px;
}

.hamburger-icon::after {
    position: absolute;
    top: 8px;
}

/* --- 인트로 섹션 --- */
#intro {
    padding: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero-background-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.7)), url('assets/hero_bg.jpg') no-repeat center center/cover;
    z-index: -1;
}

.hero-content {
    z-index: 1;
    animation: fadeIn 1.5s ease-out;
}

.hero-content .subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 5px;
    margin-bottom: 20px;
    opacity: 0.8;
}

.hero-content .title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: var(--primary-color);
    color: var(--text-light);
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 1px;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.cta-button:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

/* --- 포트폴리오 섹션 --- */
.portfolio-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.portfolio-filter button {
    background: var(--background-light);
    color: var(--secondary-color);
    border: 3px solid var(--secondary-color);
    padding: 10px 15px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.portfolio-filter button:hover,
.portfolio-filter button.active {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

#portfolio-search {
    width: 100%;
    max-width: 300px;
    padding: 10px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 1rem;
}

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

.portfolio-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.item-overlay p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.view-link {
    background: var(--primary-color);
    color: var(--text-light);
    padding: 8px 20px;
    border-radius: 50px;
}

.no-results-message {
    font-size: 1.2rem;
    color: #888;
    margin-top: 40px;
    display: none; /* JS로 제어 */
}

/* --- 스킬 섹션 --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.skill-item {
    background: #333;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

/* --- 자기소개 섹션 --- */
.about-section h2 {
    text-align: left;
}
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 50px;
}

.profile-photo {
    flex-shrink: 0;
    width: 300px;
    height: 300px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-text {
    flex-grow: 1;
    text-align: left;
}

.profile-text h2 {
    margin-bottom: 20px;
}

.profile-text p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- 연락 방법 섹션 --- */
.contact-message {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.contact-info a {
    color: var(--primary-color);
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* --- 푸터 --- */
footer {
    background: #111;
    color: #888;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

/* --- 반응형 디자인 --- */
@media (max-width: 992px) {
    .section {
        padding: 80px 0;
    }
    .section h2 {
        font-size: 2.2rem;
    }
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .about-section h2 {
        text-align: center;
    }
    .profile-photo {
        width: 250px;
        height: 250px;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
        text-align: center;
    }
    .nav-list a {
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    .menu-toggle {
        display: block;
    }
    .nav-list.active {
        display: flex;
    }
    .hamburger-icon.open {
        transform: rotate(45deg);
    }
    .hamburger-icon.open::before {
        transform: rotate(-90deg) translate(-8px);
    }
    .hamburger-icon.open::after {
        opacity: 0;
    }
    .hero-content .title {
        font-size: 3rem;
    }
}

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