/* ============================================================
   Case Renders — Interactive HTML renders of real project UIs
   ============================================================ */

/* --- Cases Section Overrides --- */

.cases-subtitle {
    text-align: center;
    max-width: 600px;
    margin: -1.5rem auto 3rem auto;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.case-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
    box-shadow: var(--card-shadow);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.4s var(--transition-bezier);
    opacity: 1;
    transform: translateY(0);
}

[data-animate].case-card {
    opacity: 0;
    transform: translateY(30px);
}

.case-card.in-view {
    opacity: 1;
    transform: translateY(0);
}

.case-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-4px);
}

.case-card.in-view:hover {
    transform: translateY(-4px);
}

.case-info {
    padding: 28px 32px;
}

.case-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
}

.case-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: rgba(93, 63, 211, 0.1);
    color: #7c5ce0;
    border: 1px solid rgba(93, 63, 211, 0.2);
}

.cases-link-wrapper {
    text-align: center;
    margin-top: 16px;
}

.cases-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 8px;
    transition: background 0.3s ease, color 0.3s ease;
}

.cases-link:hover {
    background: rgba(93, 63, 211, 0.08);
}

.cases-link i {
    transition: transform 0.3s ease;
}

.cases-link:hover i {
    transform: translateX(4px);
}


/* --- General Render Container --- */

.case-render {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #0f1117;
    font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    aspect-ratio: 16 / 9;
    position: relative;
    display: flex;
}


/* --- Shared Sidebar --- */

.render-sidebar {
    width: 48px;
    background: #0a0b10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 0;
    gap: 8px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 13px;
    cursor: default;
    transition: color 0.2s ease, background 0.2s ease;
}

.sidebar-icon.active {
    color: #a78bfa;
    background: rgba(93, 63, 211, 0.2);
}


/* ============================================================
   Render 1: Realistic Logistics Dashboard
   Faithful reproduction of a real React+Tailwind dark-mode app
   ============================================================ */

.render-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #111827; /* gray-900 */
}

/* --- Sidebar (expanded look) --- */
.lw-sidebar {
    width: 52px;
    background: #111827;
    padding: 8px 0;
    gap: 4px;
    border-right: 1px solid #1f2937;
}

.lw-sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    font-family: 'Montserrat', sans-serif;
}

.lw-sidebar .sidebar-icon {
    color: #9ca3af;
    font-size: 12px;
}

.lw-sidebar .sidebar-icon.active {
    background: #1f2937;
    color: #fff;
}

.lw-sidebar-spacer {
    flex: 1;
}

/* --- Top bar --- */
.lw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 42px;
    background: #1f2937; /* gray-800 */
    border-bottom: 1px solid #374151; /* gray-700 */
    flex-shrink: 0;
}

.lw-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lw-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lw-stat-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.lw-stat-icon.blue { background: rgba(59,130,246,0.15); color: #93bbfd; }
.lw-stat-icon.green { background: rgba(34,197,94,0.15); color: #86efac; }
.lw-stat-icon.purple { background: rgba(139,92,246,0.15); color: #c4b5fd; }

.lw-stat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.lw-stat-label {
    font-size: 7px;
    font-weight: 500;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.lw-stat-value {
    font-size: 12px;
    font-weight: 700;
    color: #f3f4f6;
}

.lw-divider {
    width: 1px;
    height: 20px;
    background: #374151;
}

.lw-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 1px solid #374151;
    padding-left: 10px;
}

.lw-clock {
    font-size: 8px;
    color: #9ca3af;
}

.lw-version {
    font-size: 7px;
    color: #6b7280;
}

.lw-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #9ca3af;
}

/* --- Toolbar --- */
.lw-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    flex-shrink: 0;
}

.lw-add-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #2563eb;
    color: #fff;
    font-size: 9px;
    font-weight: 500;
    white-space: nowrap;
}

.lw-search {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 4px;
    background: #1f2937;
    border: 1px solid #374151;
    color: #6b7280;
    font-size: 9px;
    flex: 1;
    max-width: 200px;
}

/* --- Table --- */
.lw-table-wrap {
    flex: 1;
    overflow: hidden;
    padding: 0 8px 8px 8px;
}

.lw-table {
    background: #1f2937;
    border-radius: 6px;
    border: 1px solid #374151;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.lw-thead {
    display: flex;
    padding: 4px 6px;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}

.lw-th {
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    color: #6b7280;
    text-align: center;
    padding: 3px 2px;
    flex-shrink: 0;
    letter-spacing: 0.2px;
}

/* Colored column headers */
.lw-th.lw-col-expense { background: rgba(139, 69, 19, 0.25); color: #ffe5cc; }
.lw-th.lw-col-client { background: rgba(154, 123, 10, 0.25); color: #ffeb3b; }
.lw-th.lw-col-income { background: rgba(46, 125, 50, 0.25); color: #c8e6c9; }

.lw-tbody {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.lw-row {
    display: flex;
    padding: 0 6px;
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    align-items: center;
    min-height: 22px;
}

.lw-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.lw-cell {
    font-size: 8px;
    color: #d1d5db;
    text-align: center;
    padding: 2px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Default width matches header pattern */
}

/* Match exact widths from thead */
.lw-row .lw-cell:nth-child(1) { width: 36px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(2) { width: 68px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(3) { width: 64px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(4) { width: 40px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(5) { width: 40px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(6) { width: 68px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(7) { width: 68px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(8) { width: 56px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(9) { width: 80px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(10) { width: 64px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(11) { width: 56px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(12) { width: 64px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(13) { width: 56px; flex-shrink: 0; }
.lw-row .lw-cell:nth-child(14) { width: 56px; flex-shrink: 0; }

.lw-cell-id { color: #6b7280; font-size: 7px; }
.lw-cell-num { color: #93bbfd; font-weight: 600; }
.lw-cell-dim { color: #9ca3af; font-size: 7px; }

/* Colored cells */
.lw-cell.lw-col-expense {
    background: rgba(139, 69, 19, 0.12);
    color: #ffe5cc;
    text-align: right;
    font-size: 7px;
}

.lw-cell.lw-col-client {
    background: rgba(154, 123, 10, 0.12);
    color: #ffeb3b;
    text-align: right;
    font-size: 7px;
}

.lw-cell.lw-col-income {
    background: rgba(46, 125, 50, 0.15);
    color: #c8e6c9;
    text-align: right;
    font-size: 7px;
    font-weight: 600;
}

/* Date cells with confirmation colors */
.lw-cell-date { font-size: 8px; }
.lw-date-confirmed { color: #86efac; }
.lw-date-unconfirmed { color: #fbbf24; }

/* Status badges — Tailwind dark mode style */
.lw-badge {
    display: inline-flex;
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 7px;
    font-weight: 600;
}

.lw-badge-info { background: rgba(59, 130, 246, 0.2); color: #93bbfd; }
.lw-badge-success { background: rgba(34, 197, 94, 0.2); color: #86efac; }
.lw-badge-warning { background: rgba(234, 179, 8, 0.2); color: #fde047; }

/* Row animations — keep existing */
.row-animate {
    opacity: 0;
    transform: translateY(8px);
}

.in-view .row-animate {
    animation: fadeInRow 0.4s ease-out forwards;
    animation-delay: calc(0.3s + var(--row-delay) * 0.1s);
}

@keyframes fadeInRow {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.row-highlight {
    position: relative;
}

.in-view .row-highlight {
    animation: fadeInRow 0.4s ease-out forwards, pulseHighlight 2s ease-in-out 1.2s infinite;
}

@keyframes pulseHighlight {
    0%, 100% {
        background: rgba(255, 255, 255, 0.02);
    }
    50% {
        background: rgba(45, 212, 191, 0.08);
    }
}


/* ============================================================
   Render 1b: Telegram Bot Screenshot (Logistics)
   ============================================================ */

.lw-tg-img {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.lw-tg-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    display: block;
}


/* ============================================================
   Render 2: Content Factory Chat
   ============================================================ */

.cf-sidebar {
    width: 180px;
    padding: 12px 8px;
    gap: 4px;
    align-items: stretch;
}

.cf-session {
    padding: 8px 10px;
    border-radius: 6px;
    cursor: default;
}

.cf-session.active {
    background: rgba(93, 63, 211, 0.15);
}

.cf-session-title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cf-session-time {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.3);
}

.render-chat {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow: hidden;
}

.chat-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.5;
    font-family: 'Roboto', sans-serif;
}

.user-msg {
    align-self: flex-end;
    background: linear-gradient(135deg, #5D3FD3 0%, #8A2BE2 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.bot-msg {
    align-self: flex-start;
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
}

.bot-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A3A3 0%, #008080 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}

.bot-content {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border-top-left-radius: 4px;
    padding: 10px 14px;
}

.bot-content p {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.85);
}

.generated-text {
    font-style: italic;
    color: rgba(255, 255, 255, 0.6) !important;
}

.format-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.format-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    cursor: default;
}

.format-btn.active-btn {
    background: rgba(93, 63, 211, 0.25);
    border-color: rgba(93, 63, 211, 0.4);
    color: #a78bfa;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding-top: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.in-view .typing-indicator span {
    animation: typingDot 1.4s ease-in-out infinite;
}

.in-view .typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.in-view .typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-3px);
    }
}

/* Chat message animations */
.msg-animate {
    opacity: 0;
    transform: translateY(10px);
}

.in-view .msg-animate {
    animation: fadeInMsg 0.5s ease-out forwards;
    animation-delay: calc(0.2s + var(--msg-delay) * 0.5s);
}

@keyframes fadeInMsg {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   Render 3: Pipeline Flow
   ============================================================ */

.pipeline-render {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 7;
}

.pipeline-flow {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 20px 24px;
    width: 100%;
    justify-content: center;
}

.pipeline-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.node-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(93, 63, 211, 0.15);
    border: 2px solid rgba(93, 63, 211, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #a78bfa;
    transition: all 0.3s ease;
}

.node-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    max-width: 80px;
    line-height: 1.3;
}

.pipeline-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    flex-shrink: 0;
    margin-bottom: 20px;
    overflow: hidden;
}

.pipeline-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, #a78bfa 50%, transparent 100%);
}

/* Pipeline node animations */
.node-animate {
    opacity: 0;
    transform: scale(0.8);
}

.in-view .node-animate {
    animation: fadeInNode 0.4s ease-out forwards;
    animation-delay: calc(0.2s + var(--node-delay) * 0.2s);
}

@keyframes fadeInNode {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.line-animate::after {
    left: -100%;
}

.in-view .line-animate::after {
    animation: pulseLine 2s ease-in-out infinite;
    animation-delay: calc(0.8s + var(--line-delay) * 0.3s);
}

@keyframes pulseLine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* Sequential node glow */
.in-view .pipeline-node:nth-child(1) .node-circle { animation: nodeGlow 3s ease-in-out 1s infinite; }
.in-view .pipeline-node:nth-child(3) .node-circle { animation: nodeGlow 3s ease-in-out 1.6s infinite; }
.in-view .pipeline-node:nth-child(5) .node-circle { animation: nodeGlow 3s ease-in-out 2.2s infinite; }
.in-view .pipeline-node:nth-child(7) .node-circle { animation: nodeGlow 3s ease-in-out 2.8s infinite; }
.in-view .pipeline-node:nth-child(9) .node-circle { animation: nodeGlow 3s ease-in-out 3.4s infinite; }

@keyframes nodeGlow {
    0%, 100% {
        background: rgba(93, 63, 211, 0.15);
        border-color: rgba(93, 63, 211, 0.3);
        box-shadow: none;
    }
    30% {
        background: rgba(93, 63, 211, 0.3);
        border-color: rgba(93, 63, 211, 0.6);
        box-shadow: 0 0 16px rgba(93, 63, 211, 0.3);
    }
}


/* ============================================================
   Portfolio Page — Case Grid
   ============================================================ */

.portfolio-hero {
    padding: 140px 0 60px 0;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-light) 0%, #fff 100%);
}

.portfolio-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 16px;
}

.portfolio-hero p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}

.filter-chips {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 24px 0 48px 0;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: #fff;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-chip.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 32px;
    padding-bottom: 80px;
}

.portfolio-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.4s var(--transition-bezier), transform 0.4s var(--transition-bezier);
    opacity: 0;
    transform: translateY(20px);
}

.portfolio-card.in-view {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out, box-shadow 0.4s var(--transition-bezier);
}

.portfolio-card:hover {
    box-shadow: var(--card-hover-shadow);
    transform: translateY(-6px);
}

.portfolio-card.in-view:hover {
    transform: translateY(-6px);
}

.portfolio-card-header {
    background: #0f1117;
    padding: 24px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.portfolio-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(93, 63, 211, 0.2);
    border: 2px solid rgba(93, 63, 211, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #a78bfa;
}

.portfolio-card-body {
    padding: 24px;
}

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.category-badge.platform {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.category-badge.automation {
    background: rgba(0, 163, 163, 0.1);
    color: #00a3a3;
}

.category-badge.bot {
    background: rgba(234, 179, 8, 0.1);
    color: #ca8a04;
}

.category-badge.infra {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.portfolio-card-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 8px;
}

.portfolio-card-body p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {

    .case-render {
        aspect-ratio: auto;
        min-height: 240px;
    }

    /* Liwei: hide sidebar on mobile, keep table scrollable */
    .lw-sidebar {
        display: none;
    }

    .lw-topbar-right {
        display: none;
    }

    .lw-stats {
        gap: 6px;
    }

    /* Liwei: hide Telegram screenshot on mobile */
    .lw-tg-img {
        display: none;
    }

    /* CF: hide sidebar */
    .cf-sidebar {
        display: none;
    }

    /* Pipeline: vertical layout */
    .pipeline-render {
        aspect-ratio: auto;
        min-height: 300px;
    }

    .pipeline-flow {
        flex-direction: column;
        padding: 16px;
    }

    .pipeline-line {
        width: 2px;
        height: 24px;
        margin-bottom: 0;
        margin-right: 0;
    }

    .pipeline-line::after {
        width: 100%;
        height: 100%;
        left: 0;
        top: -100%;
    }

    .in-view .pipeline-line::after {
        animation: pulseLineVertical 2s ease-in-out infinite;
    }

    @keyframes pulseLineVertical {
        0% { top: -100%; }
        50% { top: 100%; }
        100% { top: 100%; }
    }

    .node-label {
        max-width: 120px;
    }

    .case-info {
        padding: 20px;
    }

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

    .portfolio-hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .render-header {
        gap: 6px;
    }

    .stat-number {
        font-size: 12px;
    }

    .stat-label {
        font-size: 9px;
    }

    .table-header,
    .table-row {
        grid-template-columns: 60px 1fr 70px;
        font-size: 10px;
    }

    .node-circle {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}
