/* =============================================== */
/* 1. Global Styles & Variables                    */
/* =============================================== */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

:root {
    /* Colors */
    --primary-color: #3182f6;
    --border-color: #e9ecef;
    --shadow-color: rgba(0, 0, 0, 0.05);

    /* Light Mode (default) */
    --background-color: #f8f9fa;
    --card-background-color: #ffffff;
    --text-color: #212529;
    --secondary-text-color: #6c757d;

    /* Typography */
    --base-font-size: 14px;
}

body.dark-mode {
    --primary-color: #3182f6;
    --border-color: #495057;
    --shadow-color: rgba(0, 0, 0, 0.2);

    --background-color: #121212;
    --card-background-color: #1e1e1e;
    --text-color: #e9ecef;
    --secondary-text-color: #adb5bd;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: var(--base-font-size);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin: 0;
    padding: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

ul {
    padding-left: 20px;
    list-style-position: outside;
}

/* =============================================== */
/* 2. Main Layout & Container                      */
/* =============================================== */
.resume-container {
    width: 90%;
    max-width: 820px;
    margin: 60px auto;
    padding: 50px;
    background-color: var(--card-background-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px var(--shadow-color);
    transition: all 0.3s ease;
}

/* =============================================== */
/* 3. Header & Controls                            */
/* =============================================== */
.header-section {
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
    margin-bottom: 10px;
}

.header-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.job-title {
    font-size: 1.3rem;
    color: var(--secondary-text-color);
    margin-bottom: 24px;
    font-weight: 500;
}

.contact-info p {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--secondary-text-color);
}

.contact-info a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--secondary-text-color);
}
.contact-info a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Controls */
.controls {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    gap: 10px;
    background-color: var(--card-background-color);
    padding: 12px;
    border-radius: 50px;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    z-index: 1000;
}

.controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease-in-out;
}
.controls button:hover {
    background-color: var(--background-color);
    transform: scale(1.1);
}

#font-size-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: auto;
    padding: 0 15px;
    border: none;
    border-radius: 20px;
    font-family: 'Pretendard', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    background-color: var(--background-color);
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}
#font-size-select:hover {
    opacity: 0.8;
}

/* =============================================== */
/* 4. Section Styles                               */
/* =============================================== */
.section {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}
.section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}

.summary-section p,
.skill-group p,
.work-item p,
.activity-item p {
    color: var(--secondary-text-color);
    margin-bottom: 1em;
}

.result {
    font-style: normal;
    font-weight: 500;
    color: var(--text-color);
    margin-top: 12px;
    padding-left: 14px;
    border-left: 3px solid var(--primary-color);
    opacity: 0.9;
}

/* =============================================== */
/* 5. Work Experience Timeline                     */
/* =============================================== */
.timeline-container {
    position: relative;
    padding-left: 30px;
}
.timeline-container::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    background-color: var(--border-color);
    border-radius: 3px;
}

.work-item {
    position: relative;
    padding-left: 25px;
    margin-bottom: 40px;
}
.work-item:last-child {
    margin-bottom: 0;
}
.work-item::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--card-background-color);
    border: 3px solid var(--border-color);
    z-index: 1;
    transition: all 0.3s ease;
}

.work-item h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    font-weight: 600;
}
.work-item span {
    font-size: 0.9rem;
    color: var(--secondary-text-color);
    margin-bottom: 12px;
    display: block;
}

/* Current Item Highlight */
.work-item.current::before {
    border-color: var(--primary-color);
    transform: scale(1.1);
    background-color: var(--primary-color);
}
.work-item.current h3 {
    color: var(--primary-color);
}
.work-item:not(.current) > *{
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.work-item:not(.current):hover > * {
    opacity: 1;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(49, 130, 246, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(49, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(49, 130, 246, 0); }
}
.work-item.current::before {
    animation: pulse 2s infinite;
}

/* =============================================== */
/* 6. Skills Section (Card Layout)                 */
/* =============================================== */
/* =============================================== */
/* 6. Skills Section (Card & Tag Layout)           */
/* =============================================== */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.skill-group {
    padding: 10px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.skill-group > h4,
.skill-group > p {
    margin: 0;
    padding: 0
}

.skill-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skill-icon {
    width: 24px;
    height: 24px;
}
body.dark-mode .skill-icon {
    /* 어두운 배경에서 아이콘이 잘 보이도록 필터 적용 */
    filter: invert(1) opacity(0.8);
}

.skill-description {
    font-size: 0.95rem;
    color: var(--secondary-text-color);
    margin-bottom: 16px;
    flex-grow: 1; /* 카드 높이가 달라도 태그가 항상 아래에 위치하도록 함 */
}

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

.tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
    font-weight: 500;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.tag:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
}
/* =============================================== */
/* 7. Other Sections (Activities, Education)       */
/* =============================================== */
.activity-item, .education {
    margin-bottom: 24px;
}
.activity-item h3, .education h3 {
    font-size: 1.2rem;
    margin-bottom: 4px;
    font-weight: 600;
}
.activity-item p, .education p {
    margin-top: 0;
}

/* =============================================== */
/* 8. Responsive Design                            */
/* =============================================== */
@media (max-width: 768px) {
    body {
        --base-font-size: 13px;
    }
    .resume-container {
        width: 100%;
        margin: 0;
        padding: 25px;
        border-radius: 0;
        border: none;
    }
    .header-section h1 {
        font-size: 2.2rem;
    }
    .job-title {
        font-size: 1.1rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .controls {
        bottom: 15px;
        right: 15px;
    }
}
