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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: var(--body-background, linear-gradient(135deg, #667eea 0%, #764ba2 100%));
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    animation: fadeIn 1s ease-in;
}

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

.sidebar {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.main-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
    border: 4px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.profile-img:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

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

h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.title {
    text-align: center;
    color: #718096;
    margin-bottom: 30px;
    font-size: 1.1rem;
    font-weight: 300;
}

.section {
    margin-bottom: 30px;
}

.section h2 {
    color: #667eea;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.08);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.contact-item i {
    width: 25px;
    color: #667eea;
    margin-right: 15px;
    font-size: 1.1rem;
}

.contact-item a {
    color: #4a5568;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #667eea;
}

.skill-item {
    background: rgba(102, 126, 234, 0.08);
    padding: 12px 18px;
    margin: 8px 0;
    border-radius: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.2);
    color: #4a5568;
}

.skill-item:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: #667eea;
    transform: scale(1.02);
}

.skill-bar {
    width: 60px;
    height: 6px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.skill-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 3px;
    transition: width 1s ease-in-out;
}

.experience-item, .project-item {
    background: rgba(102, 126, 234, 0.05);
    padding: 25px;
    margin-bottom: 20px;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.experience-item:hover, .project-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
}

.job-title {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.company {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.duration {
    color: #a0aec0;
    font-size: 0.9rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.tech-tag {
    background: rgba(102, 126, 234, 0.2);
    color: #667eea;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.tech-tag:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: scale(1.05);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.project-link:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* PDF 출력용: 원본 URL을 작게 표시 */
.project-link--url {
    background: none;
    padding: 0;
    margin-top: 8px;
    font-size: 0.75rem;
    color: #718096;
    font-weight: 400;
}

.project-link--url:hover {
    color: #667eea;
    transform: none;
}

.language-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    color: #4a5568;
}

.language-level {
    color: #667eea;
    font-weight: 600;
}

.achievement-item {
    background: rgba(102, 126, 234, 0.08);
    padding: 18px 20px;
    margin-bottom: 14px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.15);
}

.achievement-item:hover {
    background: rgba(102, 126, 234, 0.12);
    transform: translateX(4px);
}

.award-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 1rem;
    margin-bottom: 4px;
}

.award-work {
    color: #4a5568;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.award-prize {
    color: #667eea;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.award-prize i {
    margin-right: 6px;
}

.award-date {
    font-size: 0.85rem;
    color: #718096;
}

.award-date i {
    margin-right: 6px;
}

.download-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .sidebar {
        position: relative;
        top: 0;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========== PDF/인쇄 최적화 ========== */
@media print {
    body {
        background: #fff !important;
        color: #2d3748 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .container {
        max-width: 100%;
        padding: 0;
        gap: 20px;
        animation: none;
    }

    .sidebar,
    .main-content {
        background: #fff !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        overflow: visible;
    }

    .sidebar {
        position: relative;
        top: 0;
        page-break-inside: avoid;
    }

    .main-content {
        page-break-inside: avoid;
        overflow: visible;
    }

    /* 인쇄 시 다운로드 버튼 숨김 */
    .download-btn {
        display: none !important;
    }

    /* 카드/섹션이 페이지 중간에서 잘리지 않도록 */
    .section {
        page-break-inside: avoid;
    }

    /* backdrop-filter 제거 + 불투명 배경: 인쇄 시 내용이 비는 현상 방지 */
    .experience-item,
    .project-item,
    .achievement-item {
        background: #f8fafc !important;
        box-shadow: none;
        border: 1px solid #e2e8f0;
        page-break-inside: avoid;
        backdrop-filter: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 인쇄 시 텍스트·제목 색 명시 (일부 브라우저 대비) */
    .main-content .job-title,
    .main-content .company,
    .main-content .duration,
    .main-content p,
    .main-content li,
    .main-content .award-name,
    .main-content .award-work,
    .main-content .award-prize,
    .main-content .award-date {
        color: #2d3748 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .main-content .job-title {
        color: #5a67d8 !important;
    }

    /* 스킬 바·테그 등 배경색이 인쇄에 나오도록 */
    .skill-fill,
    .tech-tag,
    .project-link--url {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    /* 링크 URL이 인쇄물에 보이도록 (일부 브라우저) */
    a[href].project-link--url::after {
        content: "";
    }
}
