/* 기본 스타일 */
:root {
    --primary: #1E4D6B; /* 짙은 블루 */
    --secondary: #2C614A; /* 짙은 그린 */
    --accent: #4A90A0; /* 청록색 강조 */
    --light: #F0F4F8; /* 연한 블루그레이 */
    --dark: #0D1927; /* 더 짙은 네이비 */
    --text: #1A3A54; /* 주요 텍스트 */
    --text-secondary: #5B7A8C; /* 보조 텍스트 */
    --bg: #FFFFFF; /* 배경 */
    --gradient: linear-gradient(to right, var(--primary), var(--secondary)); /* 그라데이션 */
    
    /* 간격 변수 */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;
    
    /* 반경 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* 애니메이션 */
    --transition: all 0.3s ease;
}

/* 추가 스타일 */
body.menu-open {
    overflow: hidden;
}

.timeline-container.active {
    cursor: grabbing;
    user-select: none;
}

/* 기본 애니메이션 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* 네비게이션 바 스타일 */
.navbar {
    background: var(--gradient);
    color: white;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(30, 77, 107, 0.95);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 8px 0;
    position: relative;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--light);
}

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

.nav-links a.active {
    color: var(--light);
}

/* 모바일 메뉴 버튼 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* 모바일 메뉴 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(13, 25, 39, 0.95);
    backdrop-filter: blur(10px);
    padding: 100px 20px 20px;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.5px;
}

.mobile-menu a:hover {
    color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

/* 모바일 메뉴 Home 버튼 스타일 */
.mobile-menu a.mobile-home {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.mobile-menu a.mobile-home:hover {
    opacity: 1;
}

/* 헤더 공간 확보 */
.spacer {
    height: 80px;
}

/* 플로팅 공지 버튼 */
.floating-notice {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 130px;
    height: 130px;
    background: var(--accent); 
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.floating-notice:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.floating-notice-content {
    text-align: center;
    padding: 5px;
}

.floating-notice-text {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
}

@keyframes pulse {
    0% {
        box-shadow: 0 5px 20px rgba(74, 144, 160, 0.4);
    }
    50% {
        box-shadow: 0 5px 20px rgba(74, 144, 160, 0.7);
    }
    100% {
        box-shadow: 0 5px 20px rgba(74, 144, 160, 0.4);
    }
}

/* 히어로 섹션 */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--dark);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: var(--spacing-lg);
    position: relative;
    z-index: 2;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-image {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, var(--dark), transparent);
}

.hero-image img {
    max-width: 80%;
    display: block;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.hero-cta {
    display: inline-block;
    background-color: var(--accent);
    color: white;
    padding: 12px 30px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(74, 144, 160, 0.4);
    margin-top: var(--spacing-md);
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(74, 144, 160, 0.5);
}

/* 양쪽 정렬 및 단어 단위 줄바꿈 */
.hero-subtitle,
.project-description,
.area-description,
.timeline-content,
.hero-hashtags {
    text-align: justify;
    hyphens: auto;
    word-break: keep-all;
}

.hero-hashtags {
    font-size: 1rem;
    color: var(--accent);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    font-weight: 500;
    text-align: justify;
    word-break: keep-all;
}

/* 콘텐츠 섹션 기본 스타일 */
.content-section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    color: var(--primary);
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 솔로프리너 스토리 섹션 */
.solopreneur-story {
    background-color: var(--light);
    padding: var(--spacing-xl) 0;
}

/* TimelineJS3 커스텀 스타일 */
#timeline-embed {
    margin: var(--spacing-lg) 0;
}

.tl-timeline {
    font-family: 'Noto Sans KR', sans-serif !important;
}

.tl-headline {
    font-family: 'Noto Sans KR', sans-serif !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.tl-text {
    font-family: 'Noto Sans KR', sans-serif !important;
    color: var(--text-secondary) !important;
}

.tl-timemarker {
    background-color: var(--accent) !important;
}

.tl-timemarker:hover {
    background-color: var(--primary) !important;
}

.tl-timegroup-message {
    color: var(--primary) !important;
}

.tl-timegroup {
    border-color: var(--primary) !important;
}

.tl-slidenav-title {
    font-family: 'Noto Sans KR', sans-serif !important;
    color: var(--primary) !important;
}

.tl-slidenav-description {
    font-family: 'Noto Sans KR', sans-serif !important;
    color: var(--text-secondary) !important;
}

/* TimelineJS 출처 숨기기 */
.tl-attribution {
    display: none !important;
}

.tl-credit {
    display: none !important;
}

.publications-section {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.publications-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-lg);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    max-width: 1200px;
    margin: 0 auto;
}

.book-item {
    text-align: center;
    transition: var(--transition);
}

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

.book-cover {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: var(--spacing-sm);
}

.book-title {
    font-size: 1rem;
    color: var(--text);
    font-weight: 500;
}

/* 데스크탑에서는 캐러셀 컬트롤 숨김 */
.books-carousel-controls {
    display: none;
}

.carousel-dots {
    display: none;
}

.books-carousel-wrapper {
    position: relative;
}


.projects-section {
    padding: var(--spacing-xl) 0;
}

.project-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

.project-filter-btn {
    background: none;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.project-filter-btn:hover,
.project-filter-btn.active {
    background-color: var(--primary);
    color: white;
}

.projects-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.projects-list {
    background: var(--light);
    border-radius: 0; /* 라운드 제거 */
    padding: var(--spacing-md);
}

.projects-list ul {
    list-style: none;
}

.projects-list li {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--bg);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text);
}

.projects-list li:last-child {
    border-bottom: none;
}

.projects-list li:hover,
.projects-list li.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.project-details {
    position: relative;
}

.project-detail {
    display: none;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.project-detail.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.project-detail .project-image {
    height: 300px;
    overflow: hidden;
}

.project-detail .project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-detail .project-content {
    padding: var(--spacing-lg);
}

.project-detail .project-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.project-info {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.project-info li {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    display: flex;
    align-items: baseline;
}

.project-info li::before {
    content: '\2022';
    color: var(--accent);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: 0.5em;
}

.project-detail .project-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.project-detail .project-link {
    display: inline-block;
    color: white;
    background: var(--accent);
    padding: 12px 30px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.project-detail .project-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* 모바일용 아코디언 내용 */
.project-detail-mobile {
    display: none;
}

/* 모바일 아코디언 스타일 */
@media (max-width: 992px) {
    .projects-container {
        display: block;
    }
    
    .projects-list {
        padding: 0;
        background: transparent;
    }
    
    .projects-list li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        position: relative;
        padding: var(--spacing-md) var(--spacing-xs); /* 좌우 여백 더 축소 */
    }
    
    /* 아코디언 스타일 */
    .projects-list li::after {
        content: '\25BC';
        position: absolute;
        right: 10px;
        top: 20px;
        transform: translateY(-50%);
        color: var(--primary);
        transition: var(--transition);
        font-size: 0.8rem;
    }
    
    .project-info li::after {
        display: none !important;
    }   


    .projects-list li.active::after {
        transform: translateY(-50%) rotate(180deg);
    }

    .project-image img{
        width: 100%;
        margin: auto;
    }


    
    /* 모바일용 아코디언 내용 표시 */
    .project-detail-mobile {
        display: none;
        margin-top: var(--spacing-sm);
        margin-bottom: var(--spacing-md);
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        transition: all 0.3s ease;
        padding: var(--spacing-xs); /* 내부 여백 추가 */
    }
    
    .projects-list li.active .project-detail-mobile {
        display: block;
    }
    
    .project-detail-mobile .project-image {
        height: auto; /* 고정된 높이 제거 */
        margin-bottom: var(--spacing-sm);
        padding-bottom: var(--spacing-sm); /* 이미지와 글 사이 여백 확보 */
    }

    
    .project-detail-mobile .project-content {
        padding: 0;
    }
    
    /* 데스크탑 상세 내용 숨김 */
    .project-details {
        display: none;
    }
}

/* 데스크탑에서 프로젝트 섹션 스타일 */
@media (min-width: 993px) {
    .project-detail-mobile {
        display: none !important;
    }
    
    .project-details {
        display: block;
    }
    
    .projects-container {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: var(--spacing-lg);
        margin-top: var(--spacing-lg);
    }
    
    .projects-list {
        background: var(--light);
        border-radius: 0;
        padding: var(--spacing-md);
    }
}

/* 캐러셀 간단한 만들기 - 모바일 */
@media (max-width: 992px) {
    /* 캐러셀 간단한 만들기 */
    .books-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: var(--spacing-md);
        padding: var(--spacing-md) 10%;
        position: relative;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .books-grid::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .book-item {
        flex: 0 0 70%;
        scroll-snap-align: center;
    }
    
    .books-carousel-wrapper {
        position: relative;
    }
    
    .books-carousel-controls {
        display: flex;
        position: absolute;
        top: 40%;
        left: 0;
        right: 0;
        justify-content: space-between;
        transform: translateY(-50%);
        pointer-events: none;
        padding: 0 5px;
        z-index: 10;
    }
    
    .carousel-btn {
        background: rgba(30, 77, 107, 0.8);
        color: white;
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        pointer-events: auto;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        transition: var(--transition);
    }
    
    .carousel-btn:hover {
        background: var(--primary);
    }
    
    .carousel-btn:disabled {
        background: var(--text-secondary);
        opacity: 0.5;
        cursor: not-allowed;
    }
    
    /* 닷 인디케이터 */
    .carousel-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: var(--spacing-md);
    }
    
    .carousel-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--text-secondary);
        opacity: 0.5;
        cursor: pointer;
        transition: var(--transition);
    }
    
    .carousel-dot.active {
        background: var(--primary);
        opacity: 1;
        width: 24px;
        border-radius: 12px;
    }
}

/* 영역(Areas) 섹션 */
.areas-section {
    background-color: var(--primary);
    color: white;
    padding: var(--spacing-xl) 0;
}

.areas-section .section-title {
    color: white;
}

.areas-section .section-title::after {
    background: var(--accent);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.area-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: var(--transition);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.area-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.area-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: var(--accent);
}

.area-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.area-description {
    opacity: 0.9;
    line-height: 1.8;
}

/* CTA 섹션 */
.cta-section {
    background: var(--gradient);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><path d="M30 5L55 30L30 55L5 30L30 5Z" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: 60px 60px;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.cta-description {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.cta-btn {
    display: inline-block;
    background-color: white;
    color: var(--primary);
    padding: 15px 40px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* 푸터 스타일 */
.footer {
    background-color: var(--dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.footer-info p {
    margin-bottom: var(--spacing-sm);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-links h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: var(--spacing-md);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* 애니메이션 클래스 */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

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

/* 미디어 쿼리 */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: var(--spacing-md);
        max-width: 400px;
        margin: auto;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .mobile-menu.active {
        display: flex;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .content-section {
        padding: var(--spacing-lg) 0;
    }
    
    .project-cards {
        grid-template-columns: 1fr;
    }
    
    /* 모바일에서 플로팅 공지 버튼 조정 */
    .floating-notice {
        right: 15px;
        bottom: 15px;
        width: 110px;
        height: 110px;
    }
    
    .floating-notice-text {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .story-card,
    .area-card,
    .dashboard-card {
        padding: var(--spacing-sm);
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-description {
        font-size: 1rem;
    }
}