/* 기본 스타일 */

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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8fafc;
}

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

/* 네비게이션 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-logo i {
    font-size: 1.8rem;
}

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

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #2563eb;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* 블로그 헤더 */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

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


.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.blog-title i {
    color: #fbbf24;
}

.blog-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.header-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.stat-item i {
    color: #fbbf24;
}

/* 메인 콘텐츠 */
.main-content {
    padding: 4rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
}

/* 포스트 섹션 */
.posts-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    font-size: 0.9rem;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box i {
    position: absolute;
    left: 0.75rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header i {
    color: #2563eb;
}

.filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tab-btn:hover,
.tab-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* 포스트 그리드 */
.posts-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s ease;
    background: white;
    opacity: 1;
    transform: translateY(0);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #2563eb;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.post-date i {
    color: #2563eb;
}

.post-categories {
    display: flex;
    gap: 0.5rem;
}

.category-tag {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.category-tag.erp {
    background: #dbeafe;
    color: #1e40af;
}

.category-tag.frontend {
    background: #fef3c7;
    color: #92400e;
}

.category-tag.backend {
    background: #f3e8ff;
    color: #7c3aed;
}

.category-tag.project {
    background: #d1fae5;
    color: #065f46;
}

.category-tag.learning {
    background: #fce7f3;
    color: #be185d;
}

.post-title {
    margin-bottom: 1rem;
}

.post-title a {
    color: #333;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #2563eb;
}

.post-excerpt {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tag {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.read-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.9rem;
}

.read-time i {
    color: #2563eb;
}

.read-more {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Coming Soon */
.coming-soon {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    background: #f9fafb;
}

.coming-soon-content i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.coming-soon-content h3 {
    color: #374151;
    margin-bottom: 0.5rem;
}

.coming-soon-content p {
    color: #6b7280;
}

/* 사이드바 */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-card,
.widget {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.profile-card {
    text-align: center;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1rem;
    border: 3px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.profile-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.profile-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.profile-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2563eb;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.profile-link:hover {
    background: #f3f4f6;
}

.widget h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.widget h3 i {
    color: #2563eb;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: #f3f4f6;
    color: #374151;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: #2563eb;
    color: white;
}

.recent-activity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 8px;
}

.activity-item i {
    color: #2563eb;
    width: 20px;
}

.activity-item span {
    flex: 1;
    font-size: 0.9rem;
}

.activity-item small {
    color: #6b7280;
    font-size: 0.8rem;
}

.subscribe-widget {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.subscribe-widget h3,
.subscribe-widget p {
    color: white;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.subscribe-form input {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
}

.subscribe-form button {
    padding: 0.75rem;
    background: #fbbf24;
    color: #333;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: #f59e0b;
}

/* GitHub 통계 위젯 */
.github-stats {
    overflow: hidden;
}

.github-stats-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.github-stats-container img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.github-stats-container img:hover {
    transform: scale(1.02);
}

/* 푸터 */
.footer {
    background: #1f2937;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
}

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

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

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fbbf24;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

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


    .blog-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .header-controls {
        width: 100%;
        align-items: stretch;
    }
    
    .search-box input {
        width: 100%;
        max-width: 300px;
    }

    .filter-tabs {
        width: 100%;
        justify-content: center;
        gap: 0.25rem;
    }
    
    .tab-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .post-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.5rem;
    }

    .posts-section,
    .profile-card,
    .widget {
        padding: 1.5rem;
    }

    .post-card {
        padding: 1.5rem;
    }
}

/* 블로그 포스트 모바일 최적화 */
@media (max-width: 768px) {
    .post-content {
        padding: 1rem;
    }
    
    .post-content h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .post-content h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .post-content h3 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .post-content h4 {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .post-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .post-content img {
        max-width: 100% !important;
        height: auto !important;
        margin: 1rem 0;
    }
    
    .post-content .code-block {
        font-size: 0.8rem;
        overflow-x: auto;
        margin: 1rem 0;
    }
    
    .post-content .code-block pre {
        padding: 1rem;
        overflow-x: auto;
    }
    
    /* 그리드 레이아웃 모바일 최적화 */
    .post-content div[style*="grid-template-columns"] {
        display: block !important;
    }
    
    .post-content div[style*="grid-template-columns"] > div {
        margin-bottom: 1rem;
    }
    
    /* 팀원 소개 그리드 */
    .post-content div[style*="repeat(2, 1fr)"] {
        display: block !important;
    }
    
    .post-content div[style*="repeat(2, 1fr)"] > div {
        margin-bottom: 1.5rem;
    }
    
    /* 버튼과 링크 모바일 최적화 */
    .post-content a[style*="padding: 1rem 2rem"] {
        display: block !important;
        text-align: center;
        padding: 1rem !important;
        margin: 1rem 0;
    }
    
    /* 박스 스타일 모바일 최적화 */
    .post-content div[style*="padding: 2rem"] {
        padding: 1.5rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .post-content div[style*="padding: 1.5rem"] {
        padding: 1rem !important;
        margin: 1rem 0 !important;
    }
    
    /* 테이블 모바일 최적화 */
    .post-content table {
        font-size: 0.8rem;
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    /* 코드 블록 모바일 최적화 */
    .post-content pre {
        font-size: 0.75rem;
        line-height: 1.4;
        padding: 0.8rem;
        overflow-x: auto;
    }
    
    /* 인라인 스타일 오버라이드 */
    .post-content div[style*="display: grid"] {
        display: block !important;
    }
    
    .post-content div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    .post-content div[style*="grid-template-columns: repeat(2, 1fr)"] {
        display: block !important;
    }
}

@media (max-width: 480px) {
    .post-content {
        padding: 0.8rem;
    }
    
    .post-content h1 {
        font-size: 1.6rem;
    }
    
    .post-content h2 {
        font-size: 1.4rem;
    }
    
    .post-content h3 {
        font-size: 1.2rem;
    }
    
    .post-content h4 {
        font-size: 1rem;
    }
    
    .post-content p {
        font-size: 0.9rem;
    }
    
    .post-content .code-block {
        font-size: 0.7rem;
    }
    
    .post-content pre {
        font-size: 0.7rem;
        padding: 0.6rem;
    }
    
    /* 더 작은 화면에서 패딩 조정 */
    .post-content div[style*="padding: 2rem"] {
        padding: 1rem !important;
    }
    
    .post-content div[style*="padding: 1.5rem"] {
        padding: 0.8rem !important;
    }
    
    /* 팀원 사진 크기 조정 */
    .post-content img[style*="width: 120px"] {
        width: 100px !important;
        height: 100px !important;
    }
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 스크롤 스타일 */
html {
    scroll-behavior: smooth;
}

/* 스크롤바 스타일 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1d4ed8;
}
