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

:root {
    --text: rgba(255, 255, 255, 0.92);
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-dim: rgba(255, 255, 255, 0.4);
    --accent: #fff;
    --accent-rgb: 255, 255, 255;
    --accent-glow: rgba(255, 255, 255, 0.1);
    --accent-glow-strong: rgba(255, 255, 255, 0.2);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-bg-hover: rgba(255, 255, 255, 0.09);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.18);
    --glass-blur: 12px;
    --gradient-start: #ff6b6b;
    --gradient-middle: #ffd93d;
    --gradient-end: #6bcb77;
    --gradient-extra1: #4d96ff;
    --gradient-extra2: #9b59b6;
}

body {
    margin: 0;
    padding: 48px 20px;
    min-height: 100vh;
    background: #181c21;
    color: var(--text);
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

.bg-blur {
    position: fixed;
    inset: 0;
    z-index: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 2;
    width: min(1200px, 100%);
    margin: 0 auto;
    display: block;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== 左侧栏 ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 20px;
    height: fit-content;
    align-self: start;
}

/* 头像卡片 */
.avatar-card,
.avatar-card:hover {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.avatar:hover {
    border-color: rgba(var(--accent-rgb), 0.5);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.avatar-placeholder {
    font-size: 16px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
    letter-spacing: 0.5px;
}

.avatar-img {
    display: block;
    min-width: 100%;
    min-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

/* 头像持续旋转动画 */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.avatar,
.mobile-avatar {
    animation: spin 21s linear infinite;
    transform-origin: center center;
    will-change: transform;
}

.avatar:hover,
.mobile-avatar:hover {
    animation-play-state: paused;
}

/* 个签容器，保持左侧留白 */
.radio-container {
    --main-color: #fff;
    --main-color-opacity: rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-left: 0.5rem;
}

.radio-container input {
    cursor: pointer;
    appearance: none;
}

.radio-container .glider-container {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, rgba(27,27,27,1) 50%, rgba(0,0,0,0) 100%);
    width: 1px;
}

.radio-container .glider-container .glider {
    position: relative;
    height: calc(100% / var(--total-radio));
    width: 100%;
    background: linear-gradient(0deg, rgba(0,0,0,0) 0%, var(--main-color) 50%, rgba(0,0,0,0) 100%);
    transition: transform 0.5s cubic-bezier(0.37, 1.95, 0.66, 0.56);
}

.radio-container .glider-container .glider::before {
    content: "";
    position: absolute;
    height: 60%;
    width: 300%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--main-color);
    filter: blur(10px);
}

.radio-container .glider-container .glider::after {
    content: "";
    position: absolute;
    left: 0;
    height: 100%;
    width: 150px;
    background: linear-gradient(90deg, var(--main-color-opacity) 0%, rgba(0,0,0,0) 100%);
}

.radio-container label {
    cursor: pointer;
    padding: 1rem;
    position: relative;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease-in-out;
}

.radio-container input:checked + label {
    color: var(--main-color);
}

/* 根据 input 的索引动态控制 glider 位置 */
.radio-container input:nth-of-type(1):checked ~ .glider-container .glider { transform: translateY(0); }
.radio-container input:nth-of-type(2):checked ~ .glider-container .glider { transform: translateY(100%); }
.radio-container input:nth-of-type(3):checked ~ .glider-container .glider { transform: translateY(200%); }
.radio-container input:nth-of-type(4):checked ~ .glider-container .glider { transform: translateY(300%); }
.radio-container input:nth-of-type(5):checked ~ .glider-container .glider { transform: translateY(400%); }
.radio-container input:nth-of-type(6):checked ~ .glider-container .glider { transform: translateY(500%); }
.radio-container input:nth-of-type(7):checked ~ .glider-container .glider { transform: translateY(600%); }
.radio-container input:nth-of-type(8):checked ~ .glider-container .glider { transform: translateY(700%); }
.radio-container input:nth-of-type(9):checked ~ .glider-container .glider { transform: translateY(800%); }
.radio-container input:nth-of-type(10):checked ~ .glider-container .glider { transform: translateY(900%); }
/* ===== 右侧主内容区 ===== */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 标题卡片 */
.title-card,
.title-card:hover {
    padding: 40px 4px 16px;
    text-align: left;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.title-wrap {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 48px;
    font-weight: 700;
    font-family: 'ZQKNNY', sans-serif;
}

.title-prefix {
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-size: inherit;
    font-weight: inherit;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.title {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-middle), var(--gradient-end), var(--gradient-extra1), var(--gradient-extra2), var(--gradient-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* 副标题卡片 */
.subtitle-card,
.subtitle-card:hover {
    padding: 0 4px 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.subtitle-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 32px;
    font-weight: 600;
    letter-spacing: 1px;
    font-family: 'ZQKNNY', sans-serif;
}

.subtitle-prefix {
    color: var(--text-muted);
    font-size: inherit;
    font-weight: inherit;
    flex-shrink: 0;
}

.subtitle-name {
    font-size: inherit;
    font-weight: inherit;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-middle), var(--gradient-end), var(--gradient-extra1), var(--gradient-extra2), var(--gradient-start));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientText 4s ease infinite;
}

/* 个人简介卡片 */
.intro-card {
    padding: 16px 4px 8px;
    line-height: 1.8;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.intro-text {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.9;
}

/* ===== 技能展示 ===== */
.skills-card {
    padding: 16px 4px 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.skills-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
    font-size: 13px;
    letter-spacing: 0.3px;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.skill-tag:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
}

/* ===== 项目展示 ===== */
.projects-card,
.projects-card:hover {
    padding: 28px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.comms-card {
    max-width: 900px;
    padding: 18px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.comms-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.comms-card .section-title.comms-title {
    margin-bottom: 0;
}

.comms-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.comms-grid {
    display: grid;
    grid-template-columns: 1fr 1px 1.3fr;
    gap: 16px;
    align-items: start;
}

.comms-divider {
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    opacity: 0.9;
}

.comms-col-title {
    margin: 0 0 10px 0;
    font-size: 13px;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
}

.comms-card .contact-info {
    gap: 10px;
}

.comms-card .contact-item {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.comms-card .contact-item:hover {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(255, 255, 255, 0.18);
}

.comms-card .email-header {
    margin-bottom: 10px;
}

.email-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.email-actions .email-hint {
    margin-top: 0;
}

@media (max-width: 900px) {
    .comms-grid {
        grid-template-columns: 1fr;
    }

    .comms-divider {
        display: none;
    }
}

.email-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.email-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-label {
    font-size: 13px;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.email-input,
.email-textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.1s ease;
}

.email-input::placeholder,
.email-textarea::placeholder {
    color: var(--text-muted);
}

.email-input:focus,
.email-textarea:focus {
    border-color: rgba(255, 255, 255, 0.65);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
}

.email-textarea {
    resize: vertical;
    min-height: 96px;
}

.email-submit {
    align-self: flex-start;
    margin-top: 4px;
    padding: 8px 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.email-submit:hover {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}

.email-submit:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.email-hint {
    margin-top: 2px;
    font-size: 12px;
    color: var(--text-muted);
}

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

.email-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35), transparent 55%),
                radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.15), transparent 55%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.email-icon svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 1.6;
    fill: none;
}

.email-title {
    margin-bottom: 2px;
}

.email-subtitle {
    font-size: 12px;
    color: var(--text-muted);
}

.email-header-text {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .email-form {
        gap: 16px;
    }

    .email-row-inline {
        flex-direction: row;
        gap: 12px;
    }

    .email-row-inline .email-field {
        flex: 1;
    }

    .email-row-inline .email-input {
        flex: 1;
    }
}

.section-title {
    font-size: 20px;
    color: var(--text);
    margin-bottom: 20px;
    font-weight: 600;
    padding-left: 4px;
    letter-spacing: 0.5px;
}

/* ===== 项目网格（桌面端：3列，平板：2列，手机：1列） ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 16px;
}

@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-item {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border-radius: 14px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.project-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(var(--accent-rgb), 0.05);
}

.project-item:hover::before {
    opacity: 1;
}

.project-icon {
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-icon svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
}

.project-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.project-desc {
    font-size: 13px;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

/* ===== 联系方式 ===== */
.contact-card,
.contact-card:hover {
    padding: 28px 0 0;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-item {
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    color: var(--text-muted);
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-item svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.7);
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}

.contact-item:hover {
    background: rgba(var(--accent-rgb), 0.08);
    color: var(--text);
    border-color: rgba(var(--accent-rgb), 0.15);
}

/* ===== 移动端头像 ===== */
.mobile-avatar-card {
    display: none; /* 桌面端隐藏 */
}

.mobile-avatar {
    width: 150px;
    height: 150px;
    min-width: 150px;
    min-height: 150px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(var(--accent-rgb), 0.25);
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.mobile-avatar .avatar-placeholder {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    z-index: 1;
}

.mobile-avatar .avatar-img,
.mobile-avatar img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    transform: none !important;
    z-index: 2;
    pointer-events: none;
    position: absolute;
    inset: 0;
}

/* ===== 响应式设计 ===== */

/* 无侧边栏：单列自适应，所有尺寸交给浏览器 */
@media (max-width: 1024px) {
    body {
        padding: clamp(12px, 3vw, 48px) clamp(10px, 3vw, 20px);
    }

    .container {
        grid-template-columns: 1fr;
        gap: 0;
        max-width: 100%;
        overflow: hidden;
    }

  .main-content {
    margin-left: 0;
    width: 100%;
}
  
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: rgba(24, 28, 33, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    overflow-y: auto;
    border-right: 1px solid var(--card-border);
    display: block !important; /* 覆盖原有的隐藏 */
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.sidebar-overlay.show {
    display: block;
}

/* 移动端头像卡片内布局调整 */
.mobile-avatar-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.menu-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

/* 隐藏侧边栏内的头像卡片（避免重复） */
.sidebar .avatar-card {
    display: none;
}
  

    /* 显示移动端头像 */
    .mobile-avatar-card {
        display: flex;
        justify-content: center;
        padding: 10px 0 6px;
    }

    /* 标题自适应 */
    .title-card, .title-card:hover {
        padding: clamp(8px, 2vw, 40px) 0 clamp(4px, 1vw, 16px);
    }

    .title-wrap {
        font-size: clamp(22px, 6vw, 48px);
        flex-wrap: wrap;
        gap: 6px;
    }

    .title-prefix {
        flex-shrink: 1;
    }

    /* 副标题自适应 */
    .subtitle-card, .subtitle-card:hover {
        padding: 0 0 clamp(8px, 1.5vw, 24px);
    }

    .subtitle-wrap {
        font-size: clamp(13px, 3.5vw, 32px);
        flex-wrap: wrap;
        gap: 4px;
    }

    .subtitle-prefix {
        flex-shrink: 1;
    }


    /* 内容间距自适应 */
    .main-content {
        gap: clamp(10px, 2vw, 20px);
        max-width: 100%;
        overflow: hidden;
    }

    .section-title {
        font-size: clamp(16px, 4vw, 20px);
    }

    /* 简介文字自动换行 */
    .intro-text {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* 技能标签自适应 */
    .skills-grid {
        gap: 8px;
    }

    .skill-tag {
        font-size: 12px;
        padding: 6px 14px;
    }

    /* 项目网格自适应 — 平板为两列，已在全局媒体查询中定义，此处无需重复 */
    .project-item {
        padding: 20px 14px;
    }

    .project-icon svg {
        width: 28px;
        height: 28px;
    }

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

    .project-desc {
        font-size: 12px;
    }

    /* 联系模块单列 */
    .comms-grid {
        grid-template-columns: 1fr;
    }

    .comms-divider {
        display: none;
    }

    /* 邮件表单双栏 → 单栏 */
    .email-row-inline {
        flex-direction: column !important;
        gap: 14px !important;
    }

    /* 发送按钮全宽 */
    .email-submit {
        width: 100%;
    }

    /* 联系方式卡片 */
    .contact-item {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ===== 焦点样式（键盘导航） ===== */
:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

input:focus-visible + label,
button:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.6);
    outline-offset: 2px;
}

/* ===== 减少动效偏好 ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}



/* 简介+技能 与 时钟 并排行 */
.intro-skills-clock-row {
    display: flex;
    gap: 20px;
    align-items: flex-start; /* 顶部对齐，防止拉伸 */
    margin-bottom: 20px;
}

.left-column {
    flex: 2; /* 左列宽度占 2/3 */
    display: flex;
    flex-direction: column;
    gap: 20px; /* 简介与技能之间的间距 */
}

.right-column {
    flex: 1; /* 右列宽度占 1/3 */
}

/* 左列内的卡片去掉原有下边距，由父容器 gap 控制 */
.left-column .intro-card,
.left-column .skills-card {
    margin-bottom: 0;
}

/* 时钟卡片样式（毛玻璃风格） */
.clock-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(120%);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    padding: 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.clock-card .section-title {
    margin-bottom: 10px;
    font-size: 16px;
}

#clockCanvas {
    width: 120px;
    height: 120px;
    display: block;
    margin: 0 auto 10px;
}

.clock-digital {
    font-size: 14px;
    color: var(--text-muted);
    letter-spacing: 1px;
    font-family: monospace;
}

/* 移动端适配：改为垂直堆叠 */
@media (max-width: 1024px) {
    .intro-skills-clock-row {
        flex-direction: column;
    }
    .right-column {
        margin-top: 10px;
    }
}




.leftlinks-card {
    margin-top: 25px;
    border-top: 0px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.leftlink-item {
    position: relative;
    display: inline-block;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.3s ease;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.leftlink-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background-color: #fff;
    transition: width 0.3s ease;
}

.leftlink-item:hover::after {
    width: 100%;
}

.leftlink-item:hover {
    color: #fff;
}

.leftlink-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.leftlink-desc {
    font-size: 12px;
    color: inherit;
    opacity: 0.7;
}



/* 桌面端固定侧边栏 (屏幕宽度 ≥ 1025px) */
@media (min-width: 1025px) {
    .sidebar {
        position: fixed;
        top: 48px; /* 与 body 的 padding-top 一致 */
        left: calc((100% - 1200px) / 2); /* 使左侧栏与容器左边缘对齐 */
        width: 280px;
        height: calc(100vh - 96px); /* 减去上下内边距 (48px * 2) */
        overflow-y: auto; /* 如果内容过多，允许内部滚动 */
        display: flex;
        flex-direction: column;
        gap: 16px;
        background: transparent; /* 保持原有透明背景 */
        /* 保留其他原有样式，如 z-index 等可根据需要添加 */
    }

    /* 右侧主内容区添加左边距，避免被固定侧边栏遮挡 */
    .main-content {
        margin-left: 304px; /* 280px (侧边栏宽度) + 24px (原有 gap) */
        width: calc(100% - 304px);
    }
}


.bg {
    position: fixed;
    inset: 0;
    background: #4C5054; /* 可调整，如 #34495e、#3a3f44 等 */
    width: 100%;
    height: 100%;
    margin: 0;
    z-index: 0;
}

/* 移除原有的 pattern-bg 和立方体动画 */
.pattern-bg {
    display: none;
}

/* 模糊遮罩层，可根据需要调整颜色和透明度 */
.bg-blur {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.3); /* 半透明黑色，增加对比度 */
    backdrop-filter: blur(0); /* 纯色背景无需模糊，设为0 */
    -webkit-backdrop-filter: blur(0);
    pointer-events: none;
}

/* ===== Toast 提示（前台） ===== */
.toast-container {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 12px;
    background: rgba(30, 34, 40, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    font-size: 13.5px;
    color: rgba(255, 255, 255, 0.92);
    pointer-events: auto;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    max-width: 360px;
}

.toast.success {
    border-color: rgba(107, 203, 119, 0.3);
}

.toast.success::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6bcb77;
    flex-shrink: 0;
}

.toast.error {
    border-color: rgba(255, 107, 107, 0.3);
}

.toast.error::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff6b6b;
    flex-shrink: 0;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}

/* 移动端适配 */
@media (max-width: 600px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 10px;
        left: 10px;
    }
    .toast {
        max-width: 100%;
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* 折叠面板样式（如果已有则跳过） */
.collapse-panel {
    margin: 20px 0;
}

.collapse-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 40px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collapse-trigger:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.trigger-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    transition: transform 0.3s ease;
}

.collapse-trigger.active .trigger-icon {
    transform: rotate(180deg);
}

.collapse-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.4s ease;
    margin-top: 0;
}

.collapse-content.expanded {
    max-height: 2000px; /* 足够容纳表单 */
    opacity: 1;
    margin-top: 20px;
}
