/* ============================================================
   Floating Ball Language Toggle
   A circular button fixed at bottom-right of the viewport.
   Shows current language; click to toggle EN ↔ CN.
   ============================================================ */
.lang-ball {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-accent, #B31B1B), #8a1414);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 4px 16px rgba(179, 27, 27, 0.3), 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
}
.lang-ball:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(179, 27, 27, 0.4), 0 3px 8px rgba(0,0,0,0.15);
}
.lang-ball:active {
    transform: scale(0.95);
}
.lang-ball .lang-ball-icon {
    font-size: 1.1rem;
    margin-bottom: 1px;
}
.lang-ball .lang-ball-text {
    font-size: 0.65rem;
    letter-spacing: 0.5px;
}

/* Subtle entrance animation */
.lang-ball {
    animation: langBallPop 0.4s ease-out;
}
@keyframes langBallPop {
    0%   { transform: scale(0); opacity: 0; }
    60%  { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Mobile: slightly smaller, closer to edge */
@media (max-width: 768px) {
    .lang-ball {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    .lang-ball .lang-ball-icon {
        font-size: 0.95rem;
    }
    .lang-ball .lang-ball-text {
        font-size: 0.55rem;
    }
}

/* ============================================================
   Dual-display: EN + dotted line + CN (always visible)
   Used by industry partners only (credentials toggle by lang).
   ============================================================ */

/* Industry partner separator — dotted line between EN and CN */
.partner-sep {
    width: 80% !important;
    height: 0 !important;
    background: transparent !important;
    border-top: 1px dotted var(--color-border, #ccc);
    margin: 4px 0;
}
.partner-cn {
    font-size: 0.78rem;
    color: var(--color-text-light, #666);
}

/* Credentials: language toggle — show EN in EN mode, CN in CN mode */
html[lang="en"] .cred-cn { display: none; }
html[lang="zh-CN"] .cred-en { display: none; }

/* Industry cards: vertically center content */
.industry-card {
    display: flex;
    align-items: center;
}
.industry-info {
    width: 100%;
}

/* ============================================================
   Homepage photo hover — subtle lift + scale, no red bar
   ============================================================ */
.home-photo {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.home-photo:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

/* ============================================================
   Homepage: credentials in sidebar (above Google Scholar)
   Cards size to content — 3 single-line cards equal height,
   Ph.D. card (3 lines) naturally taller. Padding/gap match
   .sidebar-link-card (padding 10px 14px, gap 8px).
   ============================================================ */
.home-credentials {
    display: flex;
    flex-direction: column;
    gap: 8px;            /* matches .sidebar-links gap */
    margin: 16px 0 6px;
    text-align: left;
}
.home-credentials .credential-card {
    width: 100%;
    padding: 10px 14px;  /* matches .sidebar-link-card */
    gap: 8px;
    align-items: center;
}
.home-credentials .credential-icon {
    width: 18px;
    height: 18px;
    font-size: 0.78rem;
}
.home-credentials .credential-title {
    font-size: 0.8rem;  /* matches .sidebar-link-card */
}
.home-credentials .credential-sub {
    font-size: 0.7rem;
}

/* About card no longer has a credentials column — let bio use full width */
.about-bio {
    padding-right: 0 !important;
}

/* Narrow screens: compact font/padding, still content-driven height */
@media (max-width: 768px) {
    .home-credentials {
        gap: 6px;
        margin: 12px 0 4px;
    }
    .home-credentials .credential-card {
        flex: 0 1 auto;      /* override style.css flex:1 1 180px — that sets 180px HEIGHT in column layout! */
        min-width: 0;         /* override min-width:160px from old grid layout */
        padding: 8px 12px;
    }
    .home-credentials .credential-icon {
        width: 16px;
        height: 16px;
        font-size: 0.7rem;
    }
    .home-credentials .credential-title {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 1px;
    }
    .home-credentials .credential-sub {
        font-size: 0.64rem;
        line-height: 1.3;
    }
}
