/* ===== 기본 설정 ===== */
:root {
    --primary-color: #ffffff;
    --secondary-color: #e5e5e5;
    --accent-color: #cccccc;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-light: #808080;
    --bg-primary: #171717;
    --bg-secondary: #0a0a0a;
    --bg-dark: #000000;
    --border-color: #333333;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 콘텐츠 뷰 전환 ===== */
.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out forwards;
}

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

/* ===== 헤더 & 네비게이션 ===== */
.header {
    background-color: var(--bg-primary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.logo-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.logo-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #b3b3b3;
    line-height: 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: white;
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===== 히어로 섹션 ===== */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #000000 100%);
    color: white;
    padding: 120px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.hero-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) blur(3px);
}

.hero-slide-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    font-size: 4rem;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 20px;
}

.slider-nav.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.hero .container {
    position: relative;
    z-index: 5;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: left;
    opacity: 0.85;
    color: #dddddd;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: white;
    color: #171717;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    animation: fadeInUp 0.8s ease 0.6s backwards;
    border: 2px solid white;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.3);
    background-color: transparent;
    color: white;
}

/* ===== 섹션 공통 ===== */
section {
    padding: 80px 0;
}

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

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: white;
    border-radius: 2px;
}

/* ===== 필터 버튼 ===== */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.4rem 0.8rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.filter-btn:hover {
    background-color: var(--bg-secondary);
    border-color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background-color: white;
    color: #171717;
    border-color: white;
}

/* ===== 프로젝트 섹션 ===== */
.projects {
    background-color: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

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

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

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

.project-info {
    padding: 1.5rem;
}

.project-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
    flex-wrap: wrap;
    min-height: 28px;
}

.project-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-category {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: white;
    color: #171717;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    height: 28px;
}

.project-type {flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid;
    height: 28px
    border: 1px solid;
}

.project-type-professional {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
}

.project-type-personal {
    background-color: rgba(180, 180, 180, 0.1);
    color: #b3b3b3;
    border-color: #808080;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 15px;
    font-size: 0.85rem;
}

/* ===== About 섹션 ===== */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.skill-card {
    padding: 1.5rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid white;
    border: 1px solid var(--border-color);
    border-left: 4px solid white;
}

.skill-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.skill-card p {
    color: var(--text-secondary);
}

.tech-stack-title {
    font-size: 1.8rem;
    margin: 2rem 0 1.5rem;
    color: var(--text-primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag {
    padding: 0.5rem 1rem;
    background-color: white;
    color: #171717;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ===== Blog 섹션 ===== */
.blog-hero {
    background-color: var(--bg-primary);
    padding: 12rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('src/images/sb/sb_02.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(0.4) blur(3px);
    z-index: 0;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(23, 23, 23, 0.3);
    z-index: 1;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    animation: fadeInUp 0.8s ease;
}

.blog-hero-description {
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.8;
    margin: 0;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.blog {
    background-color: var(--bg-primary);
    padding: 4rem 0 6rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

.blog-main {
    width: 100%;
}

.blog-filters {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.blog-card {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.1);
}

.blog-card-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #222;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-card-image.no-image::before {
    content: 'NO IMAGE';
    color: #666;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-date-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.blog-date-overlay .day {
    font-size: 2.0rem;
    line-height: 1;
    display: block;
}

.blog-date-overlay .month {
    font-size: 0.9rem;
    line-height: 1;
    display: block;
    margin-top: 0.25rem;
    text-transform: uppercase;
}

.blog-card:hover .blog-date-overlay {
    opacity: 0;
}

.blog-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.blog-category {
    background-color: white;
    color: #171717;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
}

.blog-date {
    color: var(--text-secondary);
}

.blog-card-title {
    font-size: 1.4rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.blog-card-tags .tag {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination button {
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background-color: var(--bg-primary);
    border-color: white;
}

.pagination button.active {
    background-color: white;
    color: #171717;
    border-color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pagination button:disabled:hover {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

/* 사이드바 */
.blog-sidebar {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}

.sidebar-widget {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    letter-spacing: 0.5px;
}

/* 프로필 위젯 */
.profile-widget {
    text-align: center;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    border: 3px solid white;
}

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

.profile-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Featured Posts */
.featured-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.featured-post-item {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.featured-post-item:hover {
    transform: translateX(3px);
}

.featured-post-item h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.featured-post-item .post-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Tags 위젯 */
.tags-widget {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-widget .tag {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tags-widget .tag:hover {
    background-color: var(--bg-primary);
    transform: translateY(-2px);
}

/* 블로그 포스트 상세 모달 */
.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-post-meta .blog-category {
    font-size: 0.9rem;
}

.blog-post-meta .blog-date {
    font-size: 0.9rem;
}

.blog-post-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.blog-post-thumbnail img {
    width: 100%;
    height: auto;
}

.blog-post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.blog-post-content h3 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    color: var(--text-primary);
}

.blog-post-content h4 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.blog-post-content h5 {
    font-size: 1.2rem;
    margin: 1rem 0 0.5rem;
    color: var(--text-primary);
}

.blog-post-content p {
    margin-bottom: 1rem;
}

.blog-post-content strong {
    color: var(--text-primary);
    font-weight: 700;
}

.blog-content-image {
    transition: transform 0.3s ease;
}

.blog-content-image:hover {
    transform: scale(1.02);
}

.empty-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem;
    font-size: 1.1rem;
}

/* ===== Contact 섹션 ===== */
.contact {
    background-color: var(--bg-secondary);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-content p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border 0.3s ease;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.contact-link:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: white;
    background-color: var(--bg-secondary);
    border: 1px solid white;
}

.contact-link span {
    font-size: 1.5rem;
}

/* ===== 모달 ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 20px;
    padding: 2rem;
    border-radius: 12px;
    width: 900px;
    height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    border: 1px solid var(--border-color);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.project-meta-info {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.project-company,
.project-date {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}

/* 모달 내 배지 크기 통일 */
.modal-meta .project-category,
.modal-meta .project-type,
.modal-meta .tag {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 20px;
    font-weight: 600;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: 1px solid var(--border-color);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* ===== 미디어 갤러리 ===== */
.media-gallery {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.media-item {
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-secondary);
}

.media-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.media-item img:hover {
    transform: scale(1.05);
}

.media-video {
    grid-column: 1 / -1;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 비율 */
    height: 0;
    overflow: hidden;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.media-caption {
    padding: 0.75rem 0.75rem 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    background-color: var(--bg-secondary);
}

.media-description {
    padding: 0 0.75rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
    background-color: var(--bg-secondary);
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.modal-section p,
.modal-section ul {
    color: var(--text-secondary);
    line-height: 1.8;
}

.modal-section ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.modal-section li {
    margin-bottom: 0.5rem;
}

/* ===== 블로그 포스트 상세 페이지 ===== */
.tag-count {
    background-color: #6699cc;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ===== 블로그 상세 페이지 (인라인) ===== */
.back-to-list-btn {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-to-list-btn:hover {
    background-color: var(--bg-primary);
    border-color: white;
    transform: translateX(-5px);
}

#blogDetailView .blog-post-title {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

#blogDetailView .blog-post-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

#blogDetailView .blog-post-meta .post-date,
#blogDetailView .blog-post-meta .post-author {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

#blogDetailView .blog-post-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

#blogDetailView .blog-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

#blogDetailView .blog-post-content {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
    margin-bottom: 3rem;
}

#blogDetailView .blog-post-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

#blogDetailView .blog-post-content h4 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}

#blogDetailView .blog-post-content h5 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin: 1rem 0 0.5rem;
}

#blogDetailView .blog-post-content p {
    margin-bottom: 1.5rem;
}

#blogDetailView .blog-post-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.blog-post-tags-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.blog-post-tags-section h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-post-tags .tag {
    background-color: white;
    color: #171717;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-post-tags .tag:hover {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ===== 이미지 라이트박스 ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95%;
    max-height: 95%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    cursor: default;
    animation: lightboxZoom 0.3s ease;
}

.lightbox-info {
    background-color: rgba(0, 0, 0, 0.8);
    padding: 1rem 2rem;
    margin-top: 1rem;
    border-radius: 8px;
    max-width: 800px;
    text-align: center;
}

.lightbox-caption {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.lightbox-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.lightbox-info:empty {
    display: none;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
    z-index: 10002;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--bg-dark);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer p {
    opacity: 0.8;
}

/* ===== 애니메이션 ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* ===== 반응형 디자인 ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .slider-nav.prev {
        left: 10px;
    }

    .slider-nav.next {
        right: 10px;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow-lg);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        padding: 1rem 0;
    }

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

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

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

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

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }

    .modal-content {
        margin: 10px;
        padding: 1.5rem;
        width: calc(100vw - 20px);
        height: 95vh;
    }

    .modal-title {
        font-size: 2rem;
    }

    .modal-image {
        height: 250px;
    }

    .blog-post-main {
        order: 1;
        padding-right: 0;
    }

    .blog-post-title {
        font-size: 1.8rem;
    }

    .social-icons {
        gap: 0.75rem;
    }

    /* 블로그 레이아웃 모바일 */
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar {
        position: static;
        order: 2;
    }

    .blog-main {
        order: 1;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-date-overlay {
        padding: 0.5rem 0.75rem;
    }

    .blog-date-overlay .day {
        font-size: 1.2rem;
    }

    .blog-date-overlay .month {
        font-size: 0.8rem;
    }

    .pagination button {
        min-width: 35px;
        height: 35px;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .sidebar-widget {
        padding: 1rem;
    }

    .profile-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    section {
        padding: 60px 0;
    }

    .cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }

    /* 블로그 모바일 최적화 */
    .blog {
        padding: 4rem 0;
    }

    .blog-card-image {
        height: 180px;
    }

    .blog-card-content {
        padding: 1rem;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    .blog-card-excerpt {
        font-size: 0.9rem;
    }

    .blog-date-overlay {
        padding: 0.4rem 0.6rem;
    }

    .blog-date-overlay .day {
        font-size: 1rem;
    }

    .blog-date-overlay .month {
        font-size: 0.75rem;
    }

    .pagination {
        gap: 0.3rem;
        margin-top: 2rem;
        padding: 1rem 0;
    }

    .pagination button {
        min-width: 30px;
        height: 30px;
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }

    .filter-btn {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .widget-title {
        font-size: 0.9rem;
    }

    .featured-post-item h4 {
        font-size: 0.85rem;
    }

    .featured-post-item .post-date {
        font-size: 0.75rem;
    }
}

/* ===========================
   Giscus 댓글 시스템 스타일
   =========================== */

.blog-post-comments {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-post-comments h3 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: white;
}

#giscus-container {
    margin-top: 2rem;
}

/* Giscus 다크 테마 커스터마이징 */
.giscus,
.giscus-frame {
    width: 100%;
    border: none;
}

/* Giscus 컨테이너 배경 */
#giscus-container .giscus {
    background: transparent;
}

/* Giscus 전체 테마 오버라이드 */
:root {
    --giscus-background: #171717;
    --giscus-text: #e5e5e5;
    --giscus-border: rgba(255, 255, 255, 0.1);
    --giscus-primary: #ffffff;
    --giscus-link: #60a5fa;
}

/* 반응형: 모바일 */
@media (max-width: 768px) {
    .blog-post-comments {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .blog-post-comments h3 {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
}

/* ===========================
   Resume 페이지 스타일
   =========================== */

.resume-section {
    padding: 4rem 0;
    min-height: 100vh;
}

.resume-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.resume-header .section-title {
    margin-bottom: 0;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--bg-primary);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-download:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.resume-description {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid var(--primary-color);
    border-radius: 4px;
}

.resume-description p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

.resume-block {
    margin-bottom: 4rem;
}

.resume-block-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.resume-block-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), rgba(255, 255, 255, 0.1));
}

.timeline-item {
    position: relative;
    padding-bottom: 2.5rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(4px);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
}

.timeline-company {
    color: var(--text-secondary);
    font-size: 1rem;
}

.timeline-period {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
    padding-left: 0rem;
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    color: var(--primary-color);
    font-size: 0.85rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
}

.timeline-description li {
    margin-bottom: 0.5rem;
}

/* Skills Grid */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-category h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* Achievements */
.achievements-list {
    display: grid;
    gap: 1rem;
}

.achievement-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 3px solid var(--primary-color);
}

.achievement-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.achievement-issuer {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* 반응형: 태블릿 */
@media (max-width: 768px) {
    .resume-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-marker {
        left: -1.5rem;
    }
    
    .timeline-header {
        flex-direction: column;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

/* 반응형: 모바일 */
@media (max-width: 480px) {
    .resume-section {
        padding: 2rem 0;
    }
    
    .resume-block-title {
        font-size: 1.5rem;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}

/* ===== 인쇄용 스타일 ===== */
@media print {
    /* 불필요한 요소 숨김 */
    .header,
    .footer,
    .btn-download,
    #resumePdfDownload {
        display: none !important;
    }
    
    /* Resume 뷰만 표시 */
    .content-view {
        display: none !important;
    }
    
    #resumeView {
        display: block !important;
    }
    
    /* 페이지 설정 */
    @page {
        margin: 1cm;
        size: A4;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    /* Resume 섹션 */
    .resume-section {
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }
    
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* 헤더 */
    .resume-header {
        border-bottom: 2px solid #333 !important;
        margin-bottom: 0.8rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    .section-title {
        color: #000 !important;
        font-size: 1.8rem !important;
        margin: 0 !important;
    }
    
    /* Description */
    .resume-description {
        background: #f5f5f5 !important;
        border-left: 3px solid #333 !important;
        color: #333 !important;
        margin-bottom: 0.8rem !important;
        padding: 0.6rem !important;
    }
    
    .resume-description p {
        color: #333 !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    /* Resume 블록 */
    .resume-block {
        margin-bottom: 1rem !important;
    }
    
    .resume-block-title {
        color: #000 !important;
        border-bottom: 1px solid #ddd !important;
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.3rem !important;
    }
    
    .resume-block-title i {
        font-size: 1rem !important;
    }
    
    /* 타임라인 */
    .timeline {
        padding-left: 1.5rem !important;
    }
    
    .timeline::before {
        background: #ddd !important;
        left: 0.3rem !important;
    }
    
    .timeline-item {
        padding-bottom: 0.8rem !important;
    }
    
    .timeline-marker {
        background: #333 !important;
        border-color: white !important;
        width: 8px !important;
        height: 8px !important;
        left: 0 !important;
        top: 0.3rem !important;
    }
    
    .timeline-content {
        background: white !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
        padding: 0.6rem !important;
    }
    
    .timeline-header {
        margin-bottom: 0.2rem !important;
    }
    
    .timeline-title {
        color: #000 !important;
        font-size: 1rem !important;
        margin: 0 !important;
    }
    
    .timeline-company {
        color: #555 !important;
        font-size: 0.85rem !important;
    }
    
    .timeline-period {
        background: #f0f0f0 !important;
        color: #333 !important;
        font-size: 0.8rem !important;
        padding: 0.15rem 0.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .timeline-description {
        color: #444 !important;
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }
    
    /* Skills */
    .skills-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    
    .skill-category h4 {
        color: #000 !important;
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .skill-tags {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.3rem !important;
    }
    
    .skill-tag {
        background: #f0f0f0 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
        font-size: 0.75rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    /* Project Technologies */
    .project-technologies {
        margin-top: 0.4rem !important;
        gap: 0.3rem !important;
    }
    
    .tech-tag {
        background: #f5f5f5 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
        font-size: 0.75rem !important;
        padding: 0.2rem 0.5rem !important;
    }
    
    /* Achievements */
    .achievements-list {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.6rem !important;
    }
    
    .achievement-item {
        background: white !important;
        border: 1px solid #ddd !important;
        color: #333 !important;
        padding: 0.5rem !important;
    }
    
    .achievement-item h4 {
        color: #000 !important;
        font-size: 0.9rem !important;
        margin: 0 0 0.2rem 0 !important;
    }
    
    .achievement-issuer {
        color: #555 !important;
        font-size: 0.8rem !important;
        margin: 0 !important;
    }
    
    /* 링크 */
    a {
        color: #000 !important;
        text-decoration: none !important;
    }
    
    /* 페이지 나눔 방지 해제 - 자동으로 나누게 함 */
    .resume-block,
    .timeline-item,
    .skill-category,
    .achievement-item {
        page-break-inside: auto !important;
    }
}
