.card {
    position: absolute;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-card);
    cursor: grab;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
    backdrop-filter: blur(12px);
    min-width: 0;
    z-index: 10;
    animation: cardAppear 0.5s ease backwards;
}

.card:hover { box-shadow: var(--shadow-hover); z-index: 20; transform: translateY(-1px); }
.card.dragging { cursor: grabbing; z-index: 100; box-shadow: 0 12px 40px rgba(0,0,0,0.15); transform: scale(1.02); }
.card.is-connection-source {
    border-color: rgba(232, 93, 138, 0.38);
    box-shadow:
        0 0 0 1px rgba(232, 93, 138, 0.12),
        0 12px 32px rgba(232, 93, 138, 0.14);
}
.card.is-connection-neighbor {
    border-color: rgba(133, 160, 214, 0.3);
    box-shadow:
        0 0 0 1px rgba(133, 160, 214, 0.1),
        0 10px 28px rgba(82, 102, 145, 0.1);
}

.card-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    line-height: 1.35;
}

.card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }

.card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffd6a5, #ff8fab);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(255,143,171,0.2);
}

.card-title { font-size: 17px; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.card-body { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.card-body p { margin-bottom: 8px; }
.card-footer { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border: 1.5px solid transparent;
    transition: all 0.2s;
    cursor: default;
}

.tag:hover { transform: translateY(-1px); }
.tag.yellow { background: var(--cream); color: #c9842b; border-color: rgba(255,214,165,0.5); }
.tag.blue { background: var(--sky); color: #4a7fb5; border-color: rgba(133,193,233,0.4); }
.tag.green { background: var(--mint); color: #3a9b6b; border-color: rgba(125,211,168,0.4); }
.tag.pink { background: var(--pink-light); color: var(--pink-dark); border-color: rgba(255,143,171,0.4); }
.tag.orange { background: var(--peach); color: #c9842b; border-color: rgba(240,178,122,0.4); }
.tag.purple { background: var(--lavender); color: #7d6b8d; border-color: rgba(184,169,201,0.4); }
.tag.red { background: var(--rose); color: #c0392b; border-color: rgba(231,76,60,0.3); }
.tag.cyan { background: #d4f1f9; color: #2980b9; border-color: rgba(133,193,233,0.4); }

.project-tag,
.modal-tag,
.modal-stack-pill {
    --tone-bg: rgba(214, 234, 248, 0.8);
    --tone-border: rgba(133, 193, 233, 0.55);
    --tone-text: #4a7fb5;
}

.tag-tone-sky {
    --tone-bg: rgba(214, 234, 248, 0.84);
    --tone-border: rgba(133, 193, 233, 0.58);
    --tone-text: #4277aa;
}

.tag-tone-mint {
    --tone-bg: rgba(212, 245, 224, 0.84);
    --tone-border: rgba(125, 211, 168, 0.56);
    --tone-text: #34885f;
}

.tag-tone-amber {
    --tone-bg: rgba(253, 235, 208, 0.88);
    --tone-border: rgba(240, 178, 122, 0.54);
    --tone-text: #b3742b;
}

.tag-tone-blush {
    --tone-bg: rgba(255, 228, 236, 0.9);
    --tone-border: rgba(255, 143, 171, 0.48);
    --tone-text: #d25b86;
}

.tag-tone-lilac {
    --tone-bg: rgba(232, 224, 240, 0.9);
    --tone-border: rgba(184, 169, 201, 0.54);
    --tone-text: #7d6b8d;
}

.card-timeline { min-width: 0; }
.timeline-item { display: flex; gap: 14px; margin-bottom: 18px; position: relative; }
.timeline-item:last-child { margin-bottom: 0; }

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pink);
    border: 3px solid white;
    box-shadow: 0 0 0 2px var(--pink);
    flex-shrink: 0;
    margin-top: 3px;
}

.timeline-content { flex: 1; }
.timeline-date { font-size: 11px; color: var(--pink-dark); font-weight: 700; margin-bottom: 3px; letter-spacing: 0.5px; }
.timeline-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.timeline-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

.card-skills { min-width: 0; }
.skills-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.general-groups { display: flex; flex-direction: column; gap: 12px; }
.general-group {
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(255, 143, 171, 0.22);
}
.general-group:last-child {
    padding-bottom: 0;
    border-bottom: none;
}
.general-group-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.general-group-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.65;
}

.card-quote {
    background: linear-gradient(135deg, rgba(255,214,165,0.15), rgba(255,143,171,0.1));
    border-color: rgba(255,143,171,0.2);
}

.quote-text { font-style: italic; font-size: 14px; color: var(--text); line-height: 1.9; margin-bottom: 10px; }
.quote-author { font-size: 12px; color: var(--text-muted); }

.card-sticky { min-width: 0; padding: 18px; }
.card[data-card="sticky-agent-native"],
.card[data-card="sticky-intj"],
.card[data-card="sticky-agent"],
.card[data-card="motto"] {
    min-width: 0;
}

.sticky-yellow { background: linear-gradient(135deg, #fef9e7, #fdebd0); border-color: rgba(243,156,18,0.15); }
.sticky-blue { background: linear-gradient(135deg, #ebf5fb, #d4e6f1); border-color: rgba(52,152,219,0.15); }
.sticky-pink { background: linear-gradient(135deg, #fdedec, #fadbd8); border-color: rgba(231,76,60,0.15); }
.sticky-purple { background: linear-gradient(135deg, var(--lavender), #f0e6ff); border-color: rgba(184,169,201,0.3); }
.sticky-title { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.sticky-body { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.card-hub {
    padding: 16px 18px;
    border-style: dashed;
    box-shadow: 0 10px 28px rgba(80, 90, 120, 0.08);
}

.card-hub:hover {
    transform: translateY(-1px);
}

.card-subhub {
    padding: 14px 16px;
}

.hub-label {
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
    font-weight: 700;
}

.card-hub .sticky-title {
    margin-bottom: 6px;
}

.card-hub .sticky-body {
    font-size: 12px;
    line-height: 1.55;
}

.card-project { min-width: 0; }
.project-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.project-header > div:last-child { min-width: 0; }

.project-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.project-name {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
}

.project-link {
    overflow-wrap: anywhere;
}
.project-link { font-size: 11px; color: var(--pink-dark); font-weight: 500; }
.project-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-bottom: 12px; }
.project-summary {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 10px;
}

.project-points {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.project-point {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.65;
}

.project-label {
    display: inline-flex;
    align-items: center;
    margin-right: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 143, 171, 0.12);
    border: 1px solid rgba(255, 143, 171, 0.2);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--pink-dark);
    vertical-align: middle;
}

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

.project-tag,
.modal-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--tone-border);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.46)),
        var(--tone-bg);
    color: var(--tone-text);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: 0 6px 18px rgba(88, 93, 122, 0.06);
}

.project-tag::before,
.modal-tag::before,
.modal-stack-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.72;
}

.project-tag {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(88, 93, 122, 0.1);
}

.card-click-hint {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: var(--text-muted);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover .card-click-hint { opacity: 0.5; }

.card-section-banner {
    padding: 14px 16px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(255, 143, 171, 0.08);
}

.section-index {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(45, 45, 58, 0.46);
}

.section-caption {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.section-tone-sky {
    background: linear-gradient(135deg, rgba(214, 234, 248, 0.88), rgba(235, 245, 251, 0.96));
}

.section-tone-lilac {
    background: linear-gradient(135deg, rgba(232, 224, 240, 0.88), rgba(243, 237, 248, 0.96));
}

.section-tone-peach {
    background: linear-gradient(135deg, rgba(253, 235, 208, 0.86), rgba(255, 242, 230, 0.96));
}

.section-tone-blush {
    background: linear-gradient(135deg, rgba(255, 228, 236, 0.86), rgba(255, 241, 245, 0.96));
}

.section-tone-blue {
    background: linear-gradient(135deg, rgba(228, 239, 255, 0.88), rgba(240, 246, 255, 0.96));
}

.card-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 118px;
}

.card-pill-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 8px 18px rgba(255, 143, 171, 0.12);
}

.tone-pink { background: linear-gradient(135deg, #ffe1ef, #ffc4d8); }
.tone-blue { background: linear-gradient(135deg, #dff2ff, #c3e5ff); }
.tone-peach { background: linear-gradient(135deg, #ffecd8, #ffd2b0); }
.tone-lavender { background: linear-gradient(135deg, #eee2ff, #d9c8ff); }
.tone-amber { background: linear-gradient(135deg, #fff2cf, #ffe0a6); }
.tone-mint { background: linear-gradient(135deg, #ddffe9, #bdf3d4); }

.mini-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.mini-card-copy {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.card-timeline-compact {
    padding-bottom: 18px;
}

.card-timeline-compact .timeline-item {
    margin-bottom: 18px;
}

.card-timeline-compact .timeline-title {
    font-size: 12.5px;
}

.card-timeline-compact .timeline-desc {
    font-size: 11.5px;
    line-height: 1.55;
}

.card-skill-summary,
.card-list,
.card-soft-quote,
.card-contact-card,
.card-collab-card,
.card-stats-card,
.card-links-card,
.card-tech-card,
.card-terminal-note {
    min-height: 0;
}

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

.simple-list {
    list-style: none;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.simple-list li {
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding-left: 14px;
    position: relative;
}

.simple-list li::before {
    content: '✦';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--pink-dark);
    font-size: 10px;
}

.card-soft-quote {
    background: linear-gradient(135deg, rgba(255, 241, 246, 0.92), rgba(255, 249, 241, 0.9));
}

.card-soft-quote-center {
    text-align: center;
}

.card-micro-label {
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 245, 230, 0.98), rgba(255, 238, 218, 0.95));
}

.micro-label-text {
    font-size: 11px;
    font-weight: 700;
    color: #b8823b;
    letter-spacing: 0.03em;
}

.card-project-compact {
    padding: 18px;
}

.card-project-compact .project-header {
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-project-compact .project-icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 16px;
}

.card-project-compact .project-name {
    font-size: 13px;
    line-height: 1.3;
}

.card-project-compact .project-link {
    margin-top: 2px;
    font-size: 10.5px;
}

.card-project-compact .project-summary {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
}

.card-project-compact .project-tags {
    gap: 6px;
}

.card-project-compact .project-tag {
    padding: 5px 9px;
    font-size: 9.5px;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

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

.contact-row span:first-child {
    width: 16px;
    color: var(--pink-dark);
    font-weight: 700;
    flex-shrink: 0;
}

.contact-row span:last-child {
    overflow-wrap: anywhere;
}

.cta-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.stat-block {
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 247, 252, 0.88));
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-block strong {
    font-size: 14px;
    color: var(--text);
}

.stat-block span {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

.quick-link-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 143, 171, 0.1);
}

.quick-link-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-link-row strong {
    display: block;
    font-size: 12px;
    color: var(--text);
    margin-bottom: 3px;
}

.quick-link-row span {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.45;
}

.quick-link-row em {
    font-style: normal;
    color: var(--pink-dark);
    font-weight: 700;
    margin-top: 2px;
}

.card-terminal-note {
    background: linear-gradient(160deg, #1e223f, #171a2c);
    border-color: rgba(255, 143, 171, 0.08);
    color: #ffe9f0;
}

.terminal-note-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #fff3f7;
    margin-bottom: 10px;
}

.terminal-note-line {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
    color: rgba(255, 231, 239, 0.84);
}

@media (max-width: 1180px) {
    .card {
        padding: 16px;
    }

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

    .card-project-compact .project-name {
        font-size: 12.5px;
    }

    .stats-grid {
        gap: 8px;
    }

    .card-body,
    .project-desc,
    .project-summary {
        font-size: 12.5px;
    }
}

@media (max-width: 767px) {
    .card {
        padding: 18px;
        border-radius: 15px;
    }

    .card-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .card-avatar {
        width: 46px;
        height: 46px;
        font-size: 20px;
    }

    .card-title,
    .project-name {
        font-size: 15px;
    }

    .card-subtitle,
    .project-link,
    .timeline-date {
        font-size: 11px;
    }

    .card-body,
    .project-desc,
    .project-summary,
    .project-point,
    .sticky-body,
    .timeline-desc {
        font-size: 12px;
        line-height: 1.7;
    }

    .timeline-item {
        gap: 12px;
        margin-bottom: 16px;
    }

    .tag,
    .project-tag {
        font-size: 10px;
    }
}

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