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

/* --- 기본 리셋 및 폰트 --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-bg: #0A0A0A; /* 거의 검은색 배경 */
    --secondary-bg: #1A1A1A;
    --card-bg: #222222;
    --text-color: #E0E0E0; /* 밝은 회색 텍스트 */
    --accent-color: #FF6B6B; /* 이미지의 레드-블루 그라데이션 대신 단색으로 임시 지정 */
    --link-hover: #ffffff;
    --font-family-primary: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-family-primary);
    color: var(--text-color);
    background-color: var(--primary-bg);
    line-height: 1.6;
    scroll-behavior: smooth;
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

.accent-text {
    color: var(--accent-color);
}

/* --- 내비게이션 바 --- */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background-color: rgba(0, 0, 0, 0.8); /* 약간 투명한 배경 */
    backdrop-filter: blur(5px); /* 배경 블러 효과 */
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 40px;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.1rem;
    position: relative;
}

.nav-links a::after { /* 호버 시 밑줄 효과 */
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-out;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* 데스크톱에서는 숨김 */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1001;
}

/* --- 히어로 섹션 --- */
.hero-section {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background: url('https://via.placeholder.com/1920x1080/000000/000000?text=BACKGROUND') center center/cover no-repeat;
    position: relative;
    overflow: hidden; /* 자식 요소의 배경 패턴 오버플로우 방지 */
}

.hero-section::before { /* 배경에 그라데이션과 미세 노이즈 효과 추가 */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(20,20,20,0.7) 100%), 
                url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48ZmlsdGVyIGlkPSJhIj48ZmUgZGlzdGFudGxpdGU9IjIuNzUiIHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHR5cGU9ImRpcGxhY2VtZW50TWFwIiBpbj0iU291cmNlQWxwaGEiIHJlc291bHRzPSJkIj48L2ZlPjxmZSAgeD0iMCIgeT0iMCInIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHR5cGU9InR1cmJ1bGVuY2UiIGJhc2VmcmVxdWVuY3k9IjAuMSIgcmVzdWx0cz0iZiI+PC9mPjxmZSBjb2xvcm9yLWludGVycG9sYXRpb24tZmlsdGVycz0ic1JHQiIgZmUtY29tcG9zaXRlPSJpbiIgYXV0b2xheW91dD0idHJ1ZSIgaW4yPSJmIiBpbj0iZCIgcmVzdWx0cz0iZSI+PC9mPjxmZSBhbHBoYXRpbXM9InN0cmluZyIgeD0iMCIgeT0iMCciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHJlc3VsdHM9ImYiPjwvZmU+PC9maWx0ZXI+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0icmdoYmEoMCwwLDAsMC4wNSkiIGZpbHRlcj0idXJsKCNhKSIvPjwvc3ZnPg=='); /* 미세한 노이즈 패턴 */
    opacity: 1; /* 초기 투명도 설정 */
    animation: fadeInBackground 1.5s ease-out forwards;
}

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

.hero-title {
    font-size: 5rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 24px;
    line-height: 1;
    text-shadow: 0 0 20px rgba(255, 107, 107, 0.3); /* 이미지의 네온 효과 */
    opacity: 0;
    transform: translateY(20px);
    animation: slideInText 1s ease-out forwards 0.5s;
}

.hero-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    letter-spacing: 1px;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInText 1s ease-out forwards 0.8s;
}

@keyframes slideInText {
    to { opacity: 1; transform: translateY(0); }
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, #FF6B6B, #F06292); /* 그라데이션 버튼 */
    color: var(--primary-bg);
    text-decoration: none;
    font-weight: bold;
    border-radius: 50px; /* 둥근 버튼 */
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: slideInText 1s ease-out forwards 1.1s;
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

/* --- 공통 섹션 스타일 --- */
.section {
    padding: 100px 5%;
    min-height: 60vh;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after { /* 제목 하단에 강조선 */
    content: '';
    position: absolute;
    width: 180px;
    height: 4px;
    background: var(--accent-color);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    border-radius: 2px;
}

/* --- Featured Work 섹션 --- */
.featured-work-section {
    background-color: var(--secondary-bg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.2);
}

.project-card img {
    width: 100%;
    height: 250px; /* 이미지 고정 높이 */
    object-fit: cover; /* 이미지 비율 유지하며 채움 */
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.card-content p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.card-content span {
    font-size: 0.85rem;
    background-color: rgba(255, 107, 107, 0.1);
    color: var(--accent-color);
    padding: 5px 10px;
    border-radius: 5px;
    margin-right: 8px;
    display: inline-block;
}

/* --- Skills 섹션 --- */
.skills-section {
    background-color: var(--primary-bg);
    padding-top: 50px; /* Featured work와 간격 조정 */
}

.skill-bar-container {
    margin: 30px auto;
    max-width: 800px;
    padding: 15px;
    background-color: var(--secondary-bg);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.skill-bar-container p {
    margin-bottom: 10px;
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--text-color);
}

.bar {
    background: #333;
    height: 18px;
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, #FF6B6B, #F06292); /* 스킬 바 그라데이션 */
    width: 0;
    transition: width 1.5s ease-out;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    font-size: 0.9rem;
    font-weight: bold;
    color: var(--primary-bg);
}

/* --- Contact 섹션 --- */
.contact-section {
    background-color: var(--secondary-bg);
    text-align: center;
}

.contact-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(45deg, #4CAF50, #8BC34A); /* 컨택 버튼은 다른 색상 */
    color: var(--primary-bg);
    font-weight: bold;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.contact-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.6);
}

/* --- 푸터 --- */
.footer {
    background-color: var(--primary-bg);
    padding: 40px 5%;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer .social-links {
    margin-top: 15px;
}

.footer .social-links a {
    color: #999;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: var(--accent-color);
}

/* --- AOS (Animate On Scroll) 기본 스타일 --- */
.aos-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.aos-item.aos-animate { /* JavaScript에서 추가할 클래스명 */
    opacity: 1;
    transform: translateY(0);
}

/* --- 반응형 디자인 --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
    .nav-links li {
        margin-left: 30px;
    }
    .project-grid {
        gap: 30px;
    }
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 15px 20px;
    }
    .nav-links {
        display: none; /* 모바일에서는 기본 숨김 */
        flex-direction: column;
        position: absolute;
        top: 60px; /* nav height */
        left: 0;
        width: 100%;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(8px);
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        padding: 20px 0;
        transform: translateY(-100%);
        transition: transform 0.4s ease-out;
    }

    .nav-links.active { /* JS로 토글 */
        transform: translateY(0);
    }

    .nav-links li {
        margin: 15px 0;
        text-align: center;
    }
    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.8rem;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .cta-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    .section {
        padding: 60px 20px;
    }
    .section-title {
        font-size: 2rem;
        margin-bottom: 50px;
    }
    .project-card img {
        height: 200px;
    }
    .card-content h3 {
        font-size: 1.3rem;
    }
    .card-content p {
        font-size: 0.9rem;
    }
    .skill-bar-container {
        padding: 12px;
    }
    .skill-bar-container p {
        font-size: 1rem;
    }
    .progress {
        font-size: 0.8rem;
    }
    .contact-text {
        font-size: 1rem;
    }
    .contact-button {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
    .footer {
        padding: 30px 20px;
    }
}

/* AOS (Animate On Scroll)를 위한 추가 스타일 */
[data-aos="fade-up"] {
    opacity: 0;
    transform: translateY(20px);
    transition-property: transform, opacity;
}
[data-aos="fade-up"].aos-animate {
    opacity: 1;
    transform: translateY(0);
}
[data-aos="fade-right"] {
    opacity: 0;
    transform: translateX(-20px);
    transition-property: transform, opacity;
}
[data-aos="fade-right"].aos-animate {
    opacity: 1;
    transform: translateX(0);
}

/* 햄버거버튼 */
/* --- 내비게이션 바 --- */
.main-nav {
    /* ... (기존 코드) ... */
    z-index: 1000;
    /* position: fixed가 필요합니다. 이미 있을 것으로 가정합니다. */
}

/* 햄버거 버튼 */

.mobile-menu {
    display: non1e;
    opacity: 0.8;
    position: absolute;
    z-index:9999;
    background-color: rgb(0, 0, 0);;
    width: 100%;;
    margin-top:80px;

}
.mobile-menu ul{padding:20px; text-align: center;}
.mobile-menu ul li{padding:20px; }
.mobile-menu ul li:hover {
    background-color: #F06292;
}


/* 기본적으로 모바일 메뉴는 숨김 */
.mobile-menu {
  display: none;
}

/* 메뉴 토글 시 나타나도록 클래스 추가 */
.mobile-menu.active {
  display: block;
}

/* 간단한 스타일 */
.mobile-menu ul {
  list-style: none;
  padding: 0;
}

.mobile-menu li {
  padding: 10px;
  border-bottom: 1px solid #ccc;
}

/*X자*/
.menu-toggle span {
  display: block;
  height: 20px;
  width: 20px;
  background: #ffffff;
  border-radius: 2px;
  transition: 0.3s;
}

/* X자로 변할 때 */
.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.menu-toggle{
    width:55px;
    height:37px;
    display:inline-flex;
    flex-direction:column;
    justify-content:space-between;
    align-items:center;
    padding:10px;
    border:0;
    background:transparent;
    cursor:pointer;
  }

  .menu-toggle span{
    display:block;
    width:100%;
    height:3px;
    background:#ffffff;
    border-radius:3px;
    transition: transform 300ms cubic-bezier(.4,0,.2,1), opacity 200ms ease, width 200ms ease;
    transform-origin:center;
  }

  /* 변환된 상태 (X자) */
  .menu-toggle.open span:nth-child(1){
    transform: translateY(9px) rotate(45deg);
  }
  .menu-toggle.open span:nth-child(2){
    opacity:0;
    transform: scaleX(0.6);
  }
  .menu-toggle.open span:nth-child(3){
    transform: translateY(-9px) rotate(-45deg);
  }

  /* (선택) 포커스 스타일 */
  .menu-toggle:focus {
    outline: 2px solid rgba(0,0,0,0.12);
    outline-offset: 4px;
    border-radius:6px;
  }

  /* pc에서는 none, 모바일에서는 보이게*/
.menu-toggle {
  display: none;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex; /* 또는 flex */
  }
}

/**/
.top-btn{
  position: fixed;
  bottom: 20px;      /* 아래에서 20px */
  right: 20px;       /* 오른쪽에서 20px */
  padding: 12px 16px;
  background: #333;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease;
}

.top-btn:hover{
    transition: 0.5s;
    background-color:#F06292;
}

/* 나타날 때 */
.top-btn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* 백그라운드 유튜브 */
/* 비디오 컨테이너 설정 */
        .video-background {
            /* 1. 컨테이너를 부모 요소에 맞게 상대적으로 배치 */
            position: relative;
            width: 100%;
            height: 100vh; /* 화면 전체 높이 */
            overflow: hidden; /* iframe이 튀어나오지 않도록 숨김 */
            background-color: #333; /* 영상 로딩 전 대체 배경색 */
        }

        /* 비디오 Iframe 설정 */
        .video-foreground {
            /* 2. iframe을 부모 기준으로 절대 위치에 배치 */
            position: absolute;
            top: 50%;
            left: 50%;
            /* 3. iframe 크기를 화면보다 크게 설정 (화면 비율 맞추기) */
            width: 100vw;
            height: 56.25vw; /* 16:9 비율 (100/16 * 9 = 56.25) */
            min-width: 177.77vh; /* (100 / 56.25 = 1.7777) */
            min-height: 100vh;
            /* 4. 중앙 정렬 */
            transform: translate(-50%, -50%);
            z-index: 1; /* 콘텐츠보다 뒤로 보냄 */
            pointer-events: none; /* 영상 클릭 방지 */
        }

        /* 오버레이 (텍스트 가독성 향상) */
        .video-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4); /* 40% 투명도의 검은색 */
            z-index: 2; /* 영상 위, 콘텐츠 아래 */
        }

        /* 히어로 콘텐츠 (텍스트 등) */
        .hero-content {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 3; /* 가장 앞에 표시 */
            text-align: center;
        }