/* ─── COLOR SYSTEM ────────────────────────────────── */
/*
  주컬러   (Primary) : #111111 / dark #F1F1F1  — 메인 텍스트, 제목
  보조컬러 (Secondary): #6B7280 / dark #9CA3AF  — 서브 텍스트, 구분선
  이벤트  (Accent)  : #2563EB / dark #60A5FA  — 링크, 버튼, 강조
*/

:root {
    /* Primary */
    --primary: #111111;
    /* Secondary */
    --secondary: #6B7280;
    --secondary-light: #9CA3AF;
    /* Accent */
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    /* Background */
    --bg: #FAFAFA;
    --surface: #FFFFFF;
    /* Border */
    --border: #E5E7EB;
    /* Nav */
    --nav-bg: rgba(250, 250, 250, 0.9);
    /* Aliases */
    --text: var(--primary);
    --text-muted: var(--secondary);
    --text-light: var(--secondary-light);
    /* Layout */
    --max-width: 960px;
    --section-pad: 96px;

    color-scheme: light dark;
}

:root[data-theme="dark"] {
    --primary: #F1F1F1;
    --secondary: #9CA3AF;
    --secondary-light: #6B7280;
    --accent: #60A5FA;
    --accent-hover: #93C5FD;
    --bg: #0D0D0F;
    --surface: #161619;
    --border: #262630;
    --nav-bg: rgba(13, 13, 15, 0.9);
}

/* ─── BASE ────────────────────────────────────────── */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.3s, color 0.3s;
}

/* ─── NAV ─────────────────────────────────────────── */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.nav-logo {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.nav-logo:hover {
    color: var(--accent);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* 라이트모드: 달 아이콘 표시 */
.icon-sun { display: none; }
.icon-moon { display: block; }

/* 다크모드: 해 아이콘 표시 */
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.nav-links {
    list-style: none;
    display: flex;
    gap: 36px;
}

.nav-links a {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ─── CONTAINER ───────────────────────────────────── */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ─── HERO ────────────────────────────────────────── */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 60px;
    position: relative;
    overflow: hidden;
}

.hero-circle {
    position: absolute;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: var(--accent);
    z-index: 2;
    top: -34px;
    left: -64px;
    pointer-events: none;
    will-change: transform;
}

.hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 80px;
    width: 100%;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-text {
    flex: 1;
}

.eyebrow {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-text h1 {
    font-size: clamp(52px, 8vw, 88px);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 32px;
}

.hero-text h1 em {
    display: block;
    font-style: normal;
    font-size: 0.38em;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0em;
    margin-top: 16px;
    line-height: 1;
}

.tagline {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 44px;
    max-width: 400px;
    position: relative;
}

.tagline-ghost {
    visibility: hidden;
    display: block;
}

.tagline-typed {
    position: absolute;
    top: 0;
    left: 0;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.contact-row a {
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 2px;
    transition: color 0.2s, border-color 0.2s;
}

.contact-row a:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.dot {
    color: var(--border);
    user-select: none;
}

.hero-photo {
    width: 260px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.hero-photo img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
}

/* ─── SECTIONS ────────────────────────────────────── */

section {
    padding: var(--section-pad) 0;
    border-top: 1px solid var(--border);
}

#hero {
    border-top: none;
}

.section-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 56px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.03em;
}

.section-header span {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ─── TIMELINE ────────────────────────────────────── */

.timeline {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 28px;
    align-items: start;
}

.period {
    font-size: 13px;
    color: var(--text-muted);
    padding-top: 3px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.detail h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 6px;
    line-height: 1.4;
}

.detail h3 .role {
    font-weight: 400;
    color: var(--text-muted);
}

.detail p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
}

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 7px;
    border: 1px solid var(--accent);
    border-radius: 2px;
    color: var(--accent);
    vertical-align: middle;
    margin-left: 8px;
    letter-spacing: 0;
}

/* ─── PROJECTS ────────────────────────────────────── */

.project-list {
    display: flex;
    flex-direction: column;
}

.project-item {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 28px;
    align-items: start;
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s;
}

.project-item:first-child {
    border-top: 1px solid var(--border);
}

.tag {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 6px;
}

.cursor {
    display: inline-block;
    font-weight: 300;
    color: var(--accent);
    animation: blink 0.6s step-end infinite;
    margin-left: 1px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.store-links {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.store-btn {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 2px;
    padding: 4px 10px;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.store-btn:hover {
    opacity: 1;
}

/* ─── EDUCATION ───────────────────────────────────── */

.edu-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 64px;
}

.sub-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ─── CERTIFICATES ────────────────────────────────── */

.cert-list {
    display: flex;
    flex-direction: column;
}

.cert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: color 0.2s;
    cursor: pointer;
}

.cert-item:first-child {
    border-top: 1px solid var(--border);
}

.cert-item:hover {
    color: var(--accent);
}

.cert-item:hover .cert-info p {
    color: var(--accent);
    opacity: 0.7;
}

.cert-item:hover .cert-arrow {
    color: var(--accent);
}

.cert-info h3 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.cert-info p {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.2s;
}

.cert-arrow {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 24px;
    transition: color 0.2s;
}

/* ─── FOOTER ──────────────────────────────────────── */

footer {
    padding: 48px 0;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

footer p {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

/* ─── RESPONSIVE ──────────────────────────────────── */

@media (max-width: 768px) {
    nav {
        padding: 0 24px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links li:not(:last-child):not(:nth-last-child(2)):not(:nth-last-child(3)) {
        display: none;
    }

    .container {
        padding: 0 24px;
    }

    :root {
        --section-pad: 64px;
    }

    .hero-inner {
        flex-direction: column-reverse;
        gap: 40px;
        align-items: flex-start;
    }

    .hero-photo {
        width: 140px;
    }

    .tagline {
        font-size: 16px;
    }

    .timeline-item,
    .project-item {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .project-item {
        padding: 24px 0;
    }

    .edu-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .contact-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dot {
        display: none;
    }
}
