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

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: url('images/main.jpg') center center / cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #0f172a;
    position: relative;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 0;
}

.container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    animation: fadeIn 0.35s ease-out;
    backdrop-filter: blur(8px);
}

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

/* subtle dev-ish grid on the page - 배경 이미지 사용 시 제거 */

/* terminal header */
.terminal-top {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: #0b1220;
    color: rgba(226, 232, 240, 0.9);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.traffic {
    display: flex;
    gap: 7px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.35) inset;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    opacity: 0.9;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.terminal-badge {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.25);
}

/* hero */
.hero {
    display: grid;
    grid-template-columns: 84px 1fr;
    gap: 14px;
    padding: 18px 16px 10px 16px;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.03), rgba(15, 23, 42, 0.00));
}

.avatar {
    width: 84px;
    height: 84px;
    border-radius: 14px;
    background: #0b1220;
    color: #e2e8f0;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.18);
}

.avatar-inner {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 28px;
    letter-spacing: -0.02em;
}

.hero-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.name {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.title {
    font-size: 13px;
    color: rgba(15, 23, 42, 0.72);
    font-weight: 600;
    margin-bottom: 8px;
}

.bio {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(15, 23, 42, 0.80);
}

/* prompt block */
.prompt {
    margin: 0 16px;
    padding: 12px 12px;
    border-radius: 12px;
    background: #0b1220;
    color: rgba(226, 232, 240, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.prompt-line {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.prompt-user { color: #93c5fd; }
.prompt-path { color: #a7f3d0; }
.prompt-git { color: #fca5a5; }
.prompt-dollar { color: #e2e8f0; margin-left: 4px; }
.prompt-cmd { color: #e2e8f0; }

.prompt-out {
    margin-top: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.85);
    white-space: pre-wrap;
}

.section-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(15, 23, 42, 0.55);
    margin: 14px 16px 8px 16px;
}

.stack-group {
    margin-bottom: 10px;
}

.stack-head {
    margin: 10px 16px 8px 16px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: rgba(15, 23, 42, 0.86);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tags {
    padding: 0 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.18);
    color: rgba(30, 64, 175, 0.95);
}

.actions {
    padding: 14px 16px 4px 16px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.btn {
    text-decoration: none;
    text-align: center;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: white;
    color: rgba(15, 23, 42, 0.88);
    font-weight: 800;
    font-size: 13px;
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    min-height: 44px; /* touch target */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn.primary {
    background: white;
    color: rgba(15, 23, 42, 0.92);
    border-color: rgba(15, 23, 42, 0.22);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.10);
}

.btn:active {
    transform: translateY(1px);
}

.btn:hover {
    border-color: rgba(15, 23, 42, 0.26);
    box-shadow: 0 8px 18px rgba(2, 6, 23, 0.10);
}

.contacts {
    padding-bottom: 10px;
}

.contact-row {
    width: calc(100% - 32px);
    margin: 0 16px 10px 16px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.95);
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    box-shadow: 0 1px 0 rgba(2, 6, 23, 0.05);
}

.contact-row:hover {
    border-color: rgba(15, 23, 42, 0.22);
    box-shadow: 0 10px 20px rgba(2, 6, 23, 0.08);
}

.contact-row:active {
    transform: translateY(1px);
}

.contact-row .k {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.55);
}

.contact-row .v {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    color: rgba(15, 23, 42, 0.90);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-row .hint {
    font-size: 11px;
    color: rgba(15, 23, 42, 0.45);
    white-space: nowrap;
}

.footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.10);
    color: rgba(15, 23, 42, 0.55);
    font-size: 12px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.92);
    color: rgba(226, 232, 240, 0.95);
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(-6px);
}

/* 모바일 최적화 */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .card {
        border-radius: 16px;
    }

    .hero {
        grid-template-columns: 72px 1fr;
        padding: 16px 14px 10px 14px;
    }

    .avatar { width: 72px; height: 72px; }
    .avatar-inner { font-size: 24px; }

    .actions {
        grid-template-columns: 1fr;
        padding: 12px 14px 4px 14px;
    }

    .name {
        font-size: 20px;
    }

    .contact-row {
        width: calc(100% - 28px);
        margin: 0 14px 10px 14px;
        grid-template-columns: 56px 1fr;
        grid-template-areas:
            "k v"
            "hint hint";
        row-gap: 6px;
    }

    .contact-row .k { grid-area: k; }
    .contact-row .v { grid-area: v; }
    .contact-row .hint { grid-area: hint; justify-self: start; }

    .prompt {
        margin: 0 14px;
    }

    .section-title {
        margin: 12px 14px 8px 14px;
    }
}

/* 터치 최적화 */
@media (hover: none) and (pointer: coarse) {
    .btn, .contact-row { -webkit-tap-highlight-color: transparent; }
}

/* 프로젝트 카드 스타일 */
.projects-list {
    padding: 0 16px 16px 16px;
}

.project-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:last-child {
    margin-bottom: 0;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.08);
}

.project-image {
    width: 100%;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.05);
}

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

.project-content {
    padding: 16px;
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: rgba(15, 23, 42, 0.95);
    margin-bottom: 8px;
}

.project-description {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(15, 23, 42, 0.70);
}

/* 모바일 프로젝트 카드 */
@media (max-width: 480px) {
    .projects-list {
        padding: 0 14px 14px 14px;
    }

    .project-card {
        margin-bottom: 12px;
    }

    .project-content {
        padding: 14px;
    }

    .project-title {
        font-size: 16px;
    }

    .project-description {
        font-size: 13px;
    }
}
