/*
  CSS 변수 정의:
  기본 테마를 다크 모드로 설정합니다.
*/
:root {
    --bg: #18181b;
    --fg: #e5e7eb;
    --accent: #38bdf8;
    --card: #23232a;
    --skill-bg: #26263a; /* 스킬 태그 배경색 변수 추가 */
    --shadow: 0 4px 24px rgba(0,0,0,0.2);
    --footer-text: #6b7280;
}

/*
  라이트 모드일 때만 변수 값을 덮어씁니다.
  이렇게 하면 body.dark 규칙이 필요 없어집니다.
*/
body.light {
    --bg: #f9fafb;
    --fg: #111827;
    --card: #ffffff;
    --skill-bg: #e0f2fe; /* 라이트 모드용 스킬 태그 배경색 */
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --footer-text: #9ca3af;
}

/* --- Global Styles --- */
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'Fira Mono', monospace;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* --- Layout & Main Card --- */
.container {
    max-width: 600px;
    margin: 60px auto;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 2.5rem 2rem 2rem 2rem;
    text-align: center;
    animation: fadeIn 1s ease-out;
}

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

/* --- Components --- */
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    margin-bottom: 1.2rem;
    box-shadow: 0 2px 12px rgba(56,189,248,0.15);
    object-fit: cover;
    background: #222;
}

h1 {
    font-size: 2.1rem;
    margin: 0.2em 0 0.1em 0;
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--fg);
}

.role {
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 1.2em;
    font-weight: 500;
}

.desc {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5em;
    color: var(--fg);
}

.links {
    display: flex;
    justify-content: center;
    gap: 1.2em;
    margin-bottom: 1.5em;
}

.links a {
    color: var(--accent);
    font-size: 1.5rem;
    transition: color 0.2s;
    text-decoration: none;
}

.links a:hover {
    color: var(--fg);
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
    justify-content: center;
    margin-bottom: 1.2em;
    padding: 0;
    list-style: none;
}

.skill {
    background: var(--skill-bg); /* 변수 사용 */
    color: var(--accent);
    border-radius: 6px;
    padding: 0.3em 0.8em;
    font-size: 0.98em;
    font-weight: 500;
    margin-bottom: 0.2em;
    transition: background 0.3s; /* 테마 변경 시 부드러운 전환 */
}

.toggle-dark {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.3rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.toggle-dark:hover {
    transform: scale(1.1);
}

.dev-banner {
    background: #ffe066;
    color: #222;
    font-weight: 600;
    padding: 0.7em 1em;
    border-radius: 10px;
    margin-bottom: 1.2em;
    font-size: 1.05em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: inline-block;
}

.footer {
    font-size: 0.95em;
    color: var(--footer-text);
    margin-top: 1.2em;
    padding-bottom: 2em;
    text-align: center;
}

/* --- Experience Section --- */
.experience {
    margin-top: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    color: #a1a1aa;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    transition: color 0.3s;
}

body.light .experience {
    color: #4b5563;
}

.experience strong {
    color: var(--fg);
    font-weight: 600;
}

.experience .separator {
    opacity: 0.5;
}

.experience a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    padding: 2px 4px;
    border-radius: 4px;
}

.experience a:hover {
    filter: brightness(1.2);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* --- Responsive Design --- */
@media (max-width: 600px) {
    .container {
        margin: 24px 12px;
        padding: 2rem 1rem;
    }
    .avatar {
        width: 72px;
        height: 72px;
    }
}