/* ==========================================================================
   layout.css — 页面骨架：侧栏 / 主内容 / 首屏 / 区块标题 / 页脚
   ========================================================================== */

.page {
    position: relative;
    z-index: 1;
    width: min(var(--max-w), 100% - var(--gap-page) * 2);
    margin: 0 auto;
    padding: var(--gap-page) 0 clamp(120px, 14vh, 180px);
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    gap: clamp(20px, 3.2vw, 60px);
    align-items: start;
}

/* ==========================================================================
   左侧栏：吸顶的个人名片
   ========================================================================== */

.sidebar {
    position: sticky;
    top: var(--gap-page);
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 26px 20px 22px;
    text-align: center;
}

/* 头像：外圈流光 + 内圈图片 */
.avatar {
    position: relative;
    width: 116px;
    height: 116px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 2px;
    background: conic-gradient(
        from 140deg,
        rgba(var(--c2-rgb), 0.9),
        rgba(var(--c1-rgb), 0.9),
        rgba(var(--c3-rgb), 0.85),
        rgba(var(--c2-rgb), 0.9)
    );
    box-shadow: 0 0 0 1px var(--hair), 0 16px 40px -20px rgba(var(--c1-rgb), 0.55);
}

.avatar::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px dashed var(--line-strong);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.brand:hover .avatar::after {
    opacity: 1;
    transform: scale(1);
}

.avatar__inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(160deg, var(--avatar-1), var(--avatar-2));
    display: grid;
    place-items: center;
}

.avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease);
}

.brand:hover .avatar__img {
    transform: scale(1.06);
}

.avatar__initial {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand__name {
    font-size: 21px;
    font-weight: 680;
    letter-spacing: -0.01em;
}

.brand__handle {
    margin-top: 2px;
    font-family: var(--font-mono);
    font-size: var(--fs-xs);
    color: var(--ink-3);
    letter-spacing: 0.04em;
}

.brand__role {
    margin-top: 10px;
    font-size: var(--fs-sm);
    color: var(--ink-2);
    line-height: 1.6;
}

/* 状态徽标：呼吸绿点 */
.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding: 6px 14px 6px 11px;
    border-radius: var(--r-pill);
    border: 1px solid var(--ok-line);
    background: var(--ok-bg);
    font-size: var(--fs-xs);
    color: var(--ok-ink);
    letter-spacing: 0.02em;
}

.status__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
    animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(52, 211, 153, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(52, 211, 153, 0);
    }
}

/* 社交图标行 */
.socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}

.social-btn {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--ink-2);
    transition: color 0.3s var(--ease), background 0.3s var(--ease),
        border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.social-btn svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.social-btn:hover {
    color: #fff;
    background: rgba(var(--c1-rgb), 0.16);
    border-color: rgba(var(--c1-rgb), 0.45);
    transform: translateY(-2px);
}

/* 侧栏导航 */
.nav {
    padding: 10px;
}

.nav__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: var(--fs-sm);
    color: var(--ink-3);
    transition: color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav__item span.nav__idx {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-4);
    transition: color 0.25s var(--ease);
}

.nav__item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 2px;
    height: 0;
    border-radius: 2px;
    background: var(--grad-btn);
    transform: translateY(-50%);
    transition: height 0.3s var(--ease);
}

.nav__item:hover {
    color: var(--ink);
    background: var(--surface-2);
}

.nav__item.is-active {
    color: #fff;
    background: rgba(var(--c1-rgb), 0.13);
}

.nav__item.is-active::before {
    height: 18px;
}

.nav__item.is-active span.nav__idx {
    color: rgba(var(--c2-rgb), 0.9);
}

/* 侧栏底部：复制邮箱 */
.side-cta {
    padding: 14px;
}

.copy-mail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px dashed var(--line-strong);
    color: var(--ink-2);
    font-size: var(--fs-sm);
    transition: border-color 0.3s var(--ease), color 0.3s var(--ease),
        background 0.3s var(--ease);
}

.copy-mail span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 12px;
}

.copy-mail svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    stroke: currentColor;
    stroke-width: 1.7;
    fill: none;
}

.copy-mail:hover {
    color: #fff;
    border-color: rgba(var(--c2-rgb), 0.5);
    background: rgba(var(--c2-rgb), 0.08);
}

.copy-mail.is-done {
    color: var(--ok-ink);
    border-color: var(--ok-line);
    background: var(--ok-bg);
}

/* ==========================================================================
   主内容区
   ========================================================================== */

.main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gap-section);
}

/* ---------- 首屏 ---------- */
.hero {
    position: relative;
    isolation: isolate;
    padding-top: clamp(18px, 4vh, 52px);
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* 左栏：文案；右栏：北京时间挂钟 */
.hero__body {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.hero__clock {
    display: flex;
    justify-content: center;
}

/* 够宽时把挂钟挪到右上，和文案并排 */
@media (min-width: 900px) {
    .hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
        align-items: center;
        column-gap: clamp(24px, 3vw, 40px);
        row-gap: 22px;
    }

    .hero__body {
        grid-column: 1;
        grid-row: 1;
    }

    .hero__clock {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        justify-content: flex-end;
    }

    /* 并排之后标题拆成两行（你好，我是 / 小狐务器），既保住大字号又不会挤出奇怪的折行 */
    .hero .hero__br {
        display: inline;
    }

    .hero .hero__lead {
        max-width: 46ch;
    }
}

/* 背景视频亮起来以后，首屏文字背后垫一层柔和的暗光，保证对比度 */
.hero::before {
    content: "";
    position: absolute;
    inset: -3% -6% -7% -5%;
    z-index: -1;
    border-radius: 34px;
    background: radial-gradient(
        74% 88% at 26% 42%,
        rgba(var(--veil-rgb), 0.66),
        rgba(var(--veil-rgb), 0.28) 58%,
        rgba(var(--veil-rgb), 0) 82%
    );
    pointer-events: none;
}

.hero__eyebrow,
.hero__lead {
    text-shadow: 0 1px 2px var(--halo), 0 2px 12px var(--halo-2);
}

/* 渐变字不能用 text-shadow（会从透明字缝里透出来），改用 drop-shadow */
.hero__title {
    filter: drop-shadow(0 1px 1px var(--halo)) drop-shadow(0 4px 16px var(--halo-2));
}

.section__title,
.footer {
    text-shadow: 0 1px 2px var(--halo), 0 2px 12px var(--halo-2);
}

.section__note {
    text-shadow: 0 1px 2px var(--halo);
}

/* 默认不换行；够宽、要和挂钟并排时才拆成两行（见上方 @media） */
.hero__br {
    display: none;
}

.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 7px 16px 7px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--line);
    background: var(--surface-2);
    font-family: var(--font-mono);
    font-size: 11.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.hero__eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c2);
    box-shadow: 0 0 10px rgba(var(--c2-rgb), 0.9);
}

.hero__title {
    font-size: var(--fs-hero);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.hero__title em {
    font-style: normal;
    background: var(--grad-text);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: sheen 9s ease-in-out infinite;
}

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

.hero__lead {
    max-width: 46ch;
    font-size: var(--fs-lead);
    line-height: 1.85;
    color: var(--ink-2);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

/* 首屏数据条 */
.stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(14px, 2.4vw, 34px);
    margin-top: 12px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat__value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: var(--grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat__label {
    font-size: var(--fs-xs);
    color: var(--ink-3);
    letter-spacing: 0.04em;
}

/* ---------- 区块标题 ---------- */
.section {
    scroll-margin-top: 28px;
}

.section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.section__kicker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--kicker);
}

.section__kicker::after {
    content: "";
    flex: 1;
    height: 1px;
    max-width: 46px;
    background: linear-gradient(90deg, rgba(var(--c2-rgb), 0.6), transparent);
}

.section__title {
    font-size: var(--fs-h2);
    font-weight: 680;
}

.section__note {
    font-size: var(--fs-xs);
    color: var(--ink-3);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative;
    z-index: 1;
    width: min(var(--max-w), 100% - var(--gap-page) * 2);
    margin: 0 auto;
    padding: 26px 0 34px;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: var(--fs-xs);
    color: var(--ink-3);
}

.footer a {
    color: var(--ink-2);
    transition: color 0.25s var(--ease);
}

.footer a:hover {
    color: var(--ink);
}

.footer__extra {
    font-family: var(--font-mono);
    letter-spacing: 0.03em;
}
