html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

:root {
    --bg-black: #000000;
    --grid-dot: rgba(255, 255, 255, 0.14);
    --block-white: #ffffff;
    --block-ink: #09090b;
    --block-sub: #3f3f46;
    --block-border: #e4e4e7;
    --surface-soft: #f4f4f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
    background-color: var(--bg-black);
    background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
    background-size: 28px 28px;
    color: var(--block-white);
    min-height: 100vh;
    overflow-x: hidden;
    word-break: keep-all;
}

/* =========================================
   1. 명함 페이지 스타일 (#business-card-view)
   ========================================= */
.card-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.business-card {
    max-width: 540px;
    width: 100%;
}

.block-header.no-drag {
    cursor: default;
}

.status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: #52525b;
    letter-spacing: 0.06em;
}

.card-name {
    font-size: 1.9rem;
    font-weight: 900;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
}

.card-role {
    font-size: 0.95rem;
    font-weight: 700;
    color: #52525b;
}

.card-desc {
    margin-bottom: 18px;
}

.contact-box {
    background: var(--surface-soft);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    padding: 14px 16px;
}

.contact-box p {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-box p:last-child {
    margin-bottom: 0;
}

/* =========================================
   2. 상단 네비게이션 & 캔버스 스테이지
   ========================================= */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 9000;
}

.brand,
.brand:hover,
.brand:focus,
.brand:visited {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-nav a {
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.top-nav a:hover {
    opacity: 1;
}

.canvas-stage {
    max-width: 1280px;
    margin: 0 auto;
    padding: 100px 24px 120px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    align-items: start;
}

/* =========================================
   3. 화이트 블록 공통 & 가변 프로젝트 그리드
   ========================================= */
.white-block {
    background-color: var(--block-white);
    color: var(--block-ink);
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.9);
    position: relative;
    user-select: text;
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.white-block.dragging {
    box-shadow: 0 28px 60px rgba(255, 255, 255, 0.22), 0 0 0 2px #ffffff;
    transition: none;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--block-border);
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.block-header:active {
    cursor: grabbing;
}

.block-label {
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: #000000;
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
}

.drag-handle {
    color: #71717a;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.span-12 { grid-column: span 12; }
.span-8  { grid-column: span 8; }
.span-7  { grid-column: span 7; }
.span-6  { grid-column: span 6; }
.span-5  { grid-column: span 5; }
.span-4  { grid-column: span 4; }

/* 요구사항 4: 가변 개수 프로젝트 카드 반응형 CSS Grid */
.dynamic-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    align-items: stretch;
}

.project-card {
    height: 100%;
    justify-content: space-between;
}

.project-body {
    flex-grow: 1;
}

/* 타이포그래피 & 내부 요소 */
.white-block h1 {
    font-size: 2.05rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.white-block h2 {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.white-block p,
.white-block li {
    font-size: 0.94rem;
    color: var(--block-sub);
    line-height: 1.65;
    margin-bottom: 8px;
}

.white-block strong {
    color: var(--block-ink);
    font-weight: 700;
}

.white-block code {
    background: var(--surface-soft);
    color: #18181b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    border: 1px solid var(--block-border);
}

.white-block ul {
    padding-left: 18px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 14px 0 16px;
}

.kpi-card {
    background: var(--surface-soft);
    border: 1px solid var(--block-border);
    border-radius: 8px;
    padding: 10px 12px;
}

.kpi-value {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--block-ink);
    letter-spacing: -0.02em;
}

.kpi-label {
    font-size: 0.75rem;
    color: #52525b;
    margin-top: 2px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.tag-pill {
    font-size: 0.76rem;
    font-weight: 700;
    background: var(--surface-soft);
    color: #18181b;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--block-border);
}

.link-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--block-border);
}

.btn-black {
    background: #000000;
    color: #ffffff;
    text-decoration: none;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.btn-black:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-outline {
    background: #ffffff;
    color: #000000;
    border: 1.5px solid #000000;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 7px 13px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.btn-outline:hover {
    background: var(--surface-soft);
    transform: translateY(-1px);
}

.copy-status {
    font-size: 0.8rem;
    font-weight: 700;
    color: #18181b;
    margin-left: 4px;
}

@media (max-width: 900px) {
    .top-bar {
        padding: 14px 18px;
    }

    .top-nav {
        gap: 12px;
    }

    .top-nav a {
        font-size: 0.82rem;
    }

    .canvas-stage {
        grid-template-columns: 1fr;
        padding: 88px 16px 80px;
    }

    .span-12,
    .span-8,
    .span-7,
    .span-6,
    .span-5,
    .span-4 {
        grid-column: span 1;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .drag-handle {
        display: none !important;
    }

    .block-header {
        cursor: default;
        touch-action: auto;
    }

    .white-block {
        transform: none !important;
    }
}