/* ===================================
   Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* ===================================
   Navigation Styles
   =================================== */
.nav-container {
    background: #2c3e50;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.nav-brand {
    color: white;
    font-size: 1.5em;
    font-weight: 700;
    padding: 15px 0;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-brand:hover {
    color: #3498db;
}

.nav-tabs {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px;
}

.lang-btn {
    background: transparent;
    color: #ecf0f1;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lang-btn.active {
    background: #3498db;
    color: white;
}

/* Hide elements based on language */
[data-lang]:not(.active-lang) {
    display: none !important;
}

.nav-tab {
    color: #ecf0f1;
    text-decoration: none;
    padding: 20px 0;
    position: relative;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-tab:hover {
    color: #3498db;
}

.nav-tab.active {
    color: #3498db;
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #3498db;
}

.download-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.download-btn:hover {
    background: #2980b9;
}

/* ===================================
   Layout Styles
   =================================== */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s;
}

.content-section.active {
    display: block;
}

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


/* ===================================
   Resume Styles
   =================================== */
.resume-container {
    background-color: white;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

#resume-content {
    padding: 40px;
}

.header {
    border-bottom: 3px solid #3498db;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.name {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
}

.contact-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: #666;
    font-size: 0.95em;
}

.contact-info span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Section Styles */
.section {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* Project Sections with Toggle */
.project-section {
    margin-bottom: 20px;
}

.project-header-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.project-header-with-toggle h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.toggle-details-inline {
    background: transparent;
    color: #3498db;
    border: 1px solid #3498db;
    padding: 3px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.toggle-details-inline:hover {
    background: #3498db;
    color: white;
}

.toggle-details-inline.expanded {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.toggle-details-inline.expanded:hover {
    background: #c0392b;
    border-color: #c0392b;
}

.project-details {
    margin-left: 20px;
    margin-top: 10px;
    padding-left: 20px;
    border-left: 2px solid #ecf0f1;
    transition: all 0.3s ease;
}

.project-details.collapsed {
    display: none;
}

/* Experience Styles */
.experience-item {
    margin-bottom: 30px;
    padding-left: 20px;
    border-left: 3px solid #3498db;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}

.company-name {
    font-size: 1.2em;
    font-weight: 600;
    color: #2c3e50;
}

.period {
    color: #7f8c8d;
    font-size: 0.9em;
}

.position {
    font-weight: 500;
    color: #3498db;
    margin-bottom: 15px;
}

.achievement-list {
    list-style: none;
    padding-left: 0;
}

.achievement-list li {
    padding-left: 20px;
    margin-bottom: 8px;
    position: relative;
}

.achievement-list li:before {
    content: "▸";
    position: absolute;
    left: 0;
    color: #3498db;
}

.achievement-list li ul {
    margin-top: 5px;
    padding-left: 20px; /* 내부 리스트가 안쪽으로 들어가 보이도록 여백 추가 */
    list-style: none;   /* 기본 스타일 제거 */
}

.achievement-list li li {
    padding-left: 15px; /* 마커와 텍스트 사이 간격 조정 */
    margin-bottom: 5px; /* 아이템 간 간격 조정 */
}
.career-link {
    margin-top: 10px;
}
.career-link a {
    display: inline-block;
    padding: 4px 8px;
    background: #3498db;
    color: white;
    border-radius: 6px;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.career-link a:hover {
    background: #3280bd;
}

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

.skill-category {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.skill-category h4 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85em;
}

/* Project Styles */
.project-item {
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.project-title {
    font-size: 1.1em;
    font-weight: 600;
    color: #2c3e50;
}

.project-tech {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.github-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.github-link:hover {
  text-decoration: none;
  color: inherit;
}

.tech-tag {
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
}

/* ===================================
   Blog Styles
   =================================== */
.blog-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}


.blog-search-container {
    margin-bottom: 20px;
}

.blog-search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 0.95em;
    transition: all 0.3s;
    background: #f8f9fa;
}

.blog-search-input:focus {
    border-color: #3498db;
    background: white;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.blog-sidebar {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.blog-categories {
    list-style: none;
}

.blog-categories li {
    margin-bottom: 12px;
}

.blog-categories a {
    color: #2c3e50;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 5px;
    transition: all 0.3s;
}

.blog-categories a:hover {
    background: #f8f9fa;
    color: #3498db;
}

.post-count {
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Blog Posts */
.blog-posts {
    display: grid;
    gap: 25px;
}

.blog-post {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.blog-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.post-title {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.post-meta {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.post-excerpt {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.8;
}

.read-more {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 10px;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.post-tag {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8em;
}

/* ===================================
   Responsive Styles
   =================================== */
@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        padding: 10px 20px;
    }
    
    .nav-tabs {
        gap: 15px;
    }
    
    .nav-tab {
        padding: 10px 0;
    }
    
    .download-btn {
        margin-bottom: 10px;
    }
    
    #resume-content {
        padding: 20px;
    }
    
    .experience-header {
        flex-direction: column;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: static;
    }
    
    .name {
        font-size: 2em;
    }
    
    .section-title {
        font-size: 1.3em;
    }
}

/* ===================================
   Print Styles
   =================================== */
@media print {
    .nav-container {
        display: none;
    }
    
    .blog-section {
        display: none;
    }
    
    .resume-container {
        box-shadow: none;
    }
    
    body {
        background: white;
    }
    
    .main-container {
        padding: 0;
    }

    * {
        -webkit-print-color-adjust: exact !important;   /* Chrome, Safari */
        print-color-adjust: exact !important;           /* Firefox */
    }
    
    .tech-tag {
        background-color: #fff3cd !important;  /* 기술 스택 태그 배경색 강제 */
        color: #856404 !important;            /* 글자색 강제 */
        border: 1px solid #ffeeba;            /* 인쇄 시 가독성을 위해 테두리 추가 권장 */
    }

    .project-item {
        background-color: #f8f9fa !important; /* 프로젝트 박스 배경색 강제 */
        border: 1px solid #ddd;               /* 테두리 추가 */
    }
    
    .skill-category {
        background-color: #f8f9fa !important; /* 스킬 카테고리 배경색 강제 */
        border: 1px solid #ddd;
    }
    
    .skill-tag {
        background-color: #e3f2fd !important;
        color: #1976d2 !important;
        border: 1px solid #bbdefb;
    }
}
