/* ============================================================
   FoxBlog · layout.css
   顶部导航 / 首屏 / 主体网格 / 侧边栏 / 页脚 / 响应式
   ============================================================ */

/* ---------- 顶部导航 ---------- */
.fx-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--fx-nav-h);
    z-index: 60;
    transition: height .35s cubic-bezier(.22, .8, .24, 1), background-color .35s ease,
        box-shadow .35s ease, backdrop-filter .35s ease;
}
.fx-nav::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--fx-border-strong) 18%, var(--fx-border-strong) 82%, transparent);
    opacity: 0;
    transition: opacity .35s ease;
}
.fx-nav.is-stuck {
    background: var(--fx-glass-strong);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    box-shadow: 0 12px 34px -26px rgba(0, 0, 0, .55);
    height: 60px;
}
.fx-nav.is-stuck::after { opacity: 1; }

.fx-nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 18px;
}
.fx-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-right: auto;
    min-width: 0;
}
.fx-brand img {
    width: 38px; height: 38px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--fx-border-strong);
    box-shadow: var(--fx-shadow);
    transition: transform .5s cubic-bezier(.22, .8, .24, 1);
}
.fx-brand:hover img { transform: rotate(-6deg) scale(1.05); }
.fx-brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.fx-brand-name {
    font-family: var(--fx-font-display);
    font-size: 1.12rem;
    font-weight: 700;
    white-space: nowrap;
}
.fx-brand-sub {
    font-size: .72rem;
    color: var(--fx-text-3);
    letter-spacing: .06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fx-nav-links { display: flex; align-items: center; gap: 4px; }
.fx-nav-links a {
    position: relative;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: .93rem;
    color: var(--fx-text-2);
    white-space: nowrap;
    transition: color .25s ease, background-color .25s ease;
}
.fx-nav-links a:hover { color: var(--fx-text); background: var(--fx-accent-soft); }

/* 当前所在页面：实心高亮，明显到一眼能看出来 */
.fx-nav-links a.is-current,
.fx-nav-links a.is-current:hover {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(120deg, var(--fx-accent), color-mix(in srgb, var(--fx-accent) 58%, var(--fx-accent-2)));
    box-shadow: var(--fx-glow);
    text-shadow: 0 1px 2px rgba(0, 0, 0, .18);
}
/* 深色 / 护眼模式下同样保持实心对比 */
:root[data-theme="dark"] .fx-nav-links a.is-current,
:root[data-theme="eye"] .fx-nav-links a.is-current {
    color: #fff;
}

/* ---------- 外观模式切换（三段式） ---------- */
.fx-modes {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.fx-mode-btn {
    display: grid;
    place-items: center;
    width: 30px; height: 30px;
    border-radius: 9px;
    color: var(--fx-text-3);
    transition: color .25s ease, background-color .25s ease, transform .25s ease;
}
.fx-mode-btn svg { width: 16px; height: 16px; }
.fx-mode-btn:hover { color: var(--fx-text); transform: translateY(-1px); }
.fx-mode-btn.is-active {
    color: var(--fx-accent);
    background: var(--fx-accent-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fx-accent) 32%, transparent);
}

.fx-nav-actions { display: flex; align-items: center; gap: 8px; }
.fx-icon-btn {
    display: grid; place-items: center;
    width: 36px; height: 36px;
    border-radius: 11px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
    color: var(--fx-text-2);
    transition: color .25s, border-color .25s, transform .25s;
}
.fx-icon-btn svg { width: 17px; height: 17px; }
.fx-icon-btn:hover { color: var(--fx-accent); border-color: var(--fx-border-strong); transform: translateY(-2px); }

.fx-nav-toggle { display: none; }

/* 移动端抽屉 */
.fx-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(84vw, 340px);
    z-index: 70;
    padding: calc(var(--fx-nav-h) + 14px) 22px 30px;
    background: var(--fx-glass-strong);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-left: 1px solid var(--fx-border);
    transform: translateX(102%);
    transition: transform .42s cubic-bezier(.22, .8, .24, 1);
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.fx-drawer.is-open { transform: none; }
.fx-drawer a {
    padding: 13px 14px;
    border-radius: 12px;
    color: var(--fx-text-2);
    border: 1px solid transparent;
}
.fx-drawer a:hover { background: var(--fx-accent-soft); color: var(--fx-text); border-color: var(--fx-border); }
.fx-drawer a.is-current,
.fx-drawer a.is-current:hover {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(120deg, var(--fx-accent), color-mix(in srgb, var(--fx-accent) 58%, var(--fx-accent-2)));
    box-shadow: var(--fx-glow);
}
.fx-drawer-mask {
    position: fixed; inset: 0; z-index: 65;
    background: rgba(0, 0, 0, .38);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s;
}
.fx-drawer-mask.is-open { opacity: 1; visibility: visible; }

/* ---------- 首屏 ---------- */
.fx-hero {
    position: relative;
    padding: calc(var(--fx-nav-h) + 76px) 0 64px;
    text-align: center;
}
.fx-hero-avatar {
    position: relative;
    width: 118px; height: 118px;
    margin: 0 auto 26px;
    border-radius: 34px;
    padding: 3px;
    background: linear-gradient(140deg, var(--fx-accent), var(--fx-accent-2));
    box-shadow: var(--fx-glow);
    animation: fx-float 7s ease-in-out infinite;
}
.fx-hero-avatar img {
    width: 100%; height: 100%;
    border-radius: 31px;
    object-fit: cover;
    background: var(--fx-surface);
}
.fx-hero-avatar::after {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 44px;
    border: 1px dashed color-mix(in srgb, var(--fx-accent) 40%, transparent);
    animation: fx-spin 26s linear infinite;
    pointer-events: none;
}
@keyframes fx-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-9px); }
}
@keyframes fx-spin { to { transform: rotate(360deg); } }

.fx-hero-name {
    font-family: var(--fx-font-display);
    font-size: clamp(2.3rem, 6vw, 3.7rem);
    line-height: 1.16;
    margin-bottom: .35em;
}
.fx-hero-slogan {
    color: var(--fx-text-2);
    font-size: clamp(1rem, 2.3vw, 1.16rem);
    max-width: 620px;
    margin: 0 auto 30px;
}
.fx-hero-slogan .fx-caret {
    display: inline-block;
    width: 2px; height: 1.05em;
    vertical-align: -0.14em;
    background: var(--fx-accent);
    margin-left: 3px;
    animation: fx-blink 1.05s steps(2) infinite;
}
@keyframes fx-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* 首屏快捷入口（纯文字，不做浮窗） */
.fx-hero-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px 30px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}
.fx-hero-links a {
    position: relative;
    padding-bottom: 4px;
    font-size: 1.02rem;
    color: var(--fx-text-2);
    transition: color .25s ease;
}
.fx-hero-links a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: currentColor;
    opacity: .3;
    transition: opacity .25s ease;
}
.fx-hero-links a:hover { color: var(--fx-accent); }
.fx-hero-links a:hover::after { opacity: .85; }

/* 首屏指标（纯文字，不做浮窗） */
.fx-hero-metrics {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 12px 36px;
    flex-wrap: wrap;
}
.fx-hero-metric { display: inline-flex; align-items: baseline; gap: 8px; }
.fx-hero-metric i { font-style: normal; font-size: .8rem; color: var(--fx-text-3); }
.fx-hero-metric b {
    font-family: var(--fx-font-display);
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--fx-text);
}

/* UV 说明 */
.fx-hero-note {
    max-width: 560px;
    margin: 24px auto 0;
    font-size: .76rem;
    line-height: 1.9;
    color: var(--fx-text-3);
}

/* ---------- 主体网格 ---------- */
.fx-main { padding: 42px 0 80px; }
.fx-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: var(--fx-gap);
    align-items: start;
}
.fx-layout.fx-noside { grid-template-columns: minmax(0, 1fr); }

/* 分节标题 */
.fx-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}
.fx-section-head h2 {
    font-family: var(--fx-font-display);
    font-size: 1.28rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fx-section-head h2::before {
    content: "";
    width: 5px; height: 1.05em;
    border-radius: 3px;
    background: linear-gradient(var(--fx-accent), var(--fx-accent-2));
}
.fx-section-head .fx-count {
    font-size: .78rem;
    color: var(--fx-text-3);
    padding: 2px 9px;
    border-radius: 99px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
}
.fx-section-head .fx-more {
    margin-left: auto;
    font-size: .84rem;
    color: var(--fx-text-3);
}
.fx-section-head .fx-more:hover { color: var(--fx-accent); }

/* ---------- 侧边栏 ---------- */
.fx-side { display: flex; flex-direction: column; gap: var(--fx-gap); position: sticky; top: calc(var(--fx-nav-h) + 12px); }
.fx-side-card { padding: 20px; overflow: hidden; }
.fx-side-card > h3 {
    font-size: .98rem;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--fx-font-display);
}
.fx-side-card > h3::before {
    content: "";
    width: 4px; height: .95em;
    border-radius: 2px;
    background: var(--fx-accent);
}
.fx-side-profile { text-align: center; }
.fx-side-profile .fx-avatar-lg {
    width: 78px; height: 78px;
    border-radius: 24px;
    margin: 0 auto 12px;
    object-fit: cover;
    border: 1px solid var(--fx-border-strong);
    background: var(--fx-surface);
}
.fx-side-profile .fx-name {
    font-family: var(--fx-font-display);
    font-size: 1.1rem;
    margin-bottom: 4px;
}
.fx-side-profile .fx-bio { font-size: .84rem; color: var(--fx-text-3); margin-bottom: 14px; }
.fx-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.fx-social a {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 10px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
    color: var(--fx-text-2);
    transition: transform .25s, color .25s, border-color .25s;
}
.fx-social a:hover { transform: translateY(-3px); color: var(--fx-accent); border-color: var(--fx-border-strong); }
.fx-social a svg { width: 17px; height: 17px; }

.fx-side-list li { border-bottom: 1px dashed var(--fx-border); }
.fx-side-list li:last-child { border-bottom: 0; }
.fx-side-list a {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 9px 0;
    font-size: .89rem;
    color: var(--fx-text-2);
    transition: color .22s, transform .22s;
}
.fx-side-list a:hover { color: var(--fx-accent); transform: translateX(3px); }
.fx-side-list .fx-dot {
    flex: none;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--fx-border-strong);
    transform: translateY(-2px);
}
.fx-side-list a:hover .fx-dot { background: var(--fx-accent); }
.fx-side-list .fx-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fx-side-list .fx-date { margin-left: auto; font-size: .74rem; color: var(--fx-text-3); white-space: nowrap; }

.fx-tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.fx-tagcloud a {
    font-size: .8rem;
    padding: 5px 11px;
    border-radius: 99px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
    color: var(--fx-text-2);
    transition: all .25s;
}
.fx-tagcloud a:hover {
    color: var(--fx-accent);
    border-color: color-mix(in srgb, var(--fx-accent) 45%, transparent);
    background: var(--fx-accent-soft);
    transform: translateY(-2px);
}
.fx-tagcloud a i { font-style: normal; opacity: .55; font-size: .72rem; margin-left: 2px; }

/* 侧栏友链 */
.fx-side-links { display: flex; flex-direction: column; gap: 9px; }
.fx-side-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass);
    font-size: .86rem;
    transition: transform .25s, border-color .25s, background-color .25s;
}
.fx-side-links a:hover { transform: translateY(-2px); border-color: var(--fx-border-strong); background: var(--fx-accent-soft); }
.fx-side-links img, .fx-side-links .fx-lk-fallback {
    flex: none;
    width: 26px; height: 26px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--fx-accent-soft);
}
.fx-side-links .fx-lk-fallback { display: grid; place-items: center; font-size: .72rem; color: var(--fx-accent); font-weight: 700; }
.fx-side-links .fx-lk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 页脚 ---------- */
.fx-footer {
    position: relative;
    margin-top: 40px;
    border-top: 1px solid var(--fx-border);
    background: var(--fx-glass);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.fx-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 40px;
    padding: 52px 0 34px;
}
.fx-footer h4 {
    font-size: .92rem;
    margin-bottom: 14px;
    font-family: var(--fx-font-display);
    display: flex; align-items: center; gap: 8px;
}
.fx-footer h4::before {
    content: ""; width: 4px; height: .95em; border-radius: 2px;
    background: linear-gradient(var(--fx-accent), var(--fx-accent-2));
}
.fx-footer p, .fx-footer li { font-size: .86rem; color: var(--fx-text-3); line-height: 1.9; }
.fx-footer a { color: var(--fx-text-2); }
.fx-footer a:hover { color: var(--fx-accent); }
.fx-footer .fx-foot-links { display: flex; flex-direction: column; gap: 8px; }
.fx-footer .fx-foot-contact { display: flex; flex-direction: column; gap: 9px; }
.fx-footer .fx-foot-contact li { display: flex; align-items: center; gap: 9px; }
.fx-footer .fx-foot-contact svg { width: 15px; height: 15px; color: var(--fx-accent); flex: none; }
.fx-foot-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.fx-foot-brand img { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--fx-border); }
.fx-foot-brand b { font-family: var(--fx-font-display); font-size: 1.02rem; }

.fx-footer-bottom {
    border-top: 1px solid var(--fx-border);
    padding: 18px 0 26px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 22px;
    justify-content: space-between;
    font-size: .78rem;
    color: var(--fx-text-3);
}
.fx-footer-bottom a { color: var(--fx-text-3); }
.fx-footer-bottom a:hover { color: var(--fx-accent); }
.fx-beian { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.fx-license { font-size: .74rem; opacity: .82; }

/* 返回顶部 */
.fx-totop {
    position: fixed;
    right: 22px; bottom: 26px;
    z-index: 55;
    display: grid; place-items: center;
    width: 44px; height: 44px;
    border-radius: 14px;
    border: 1px solid var(--fx-border);
    background: var(--fx-glass-strong);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--fx-text-2);
    box-shadow: var(--fx-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: all .35s cubic-bezier(.22, .8, .24, 1);
}
.fx-totop.is-show { opacity: 1; visibility: visible; transform: none; }
.fx-totop:hover { color: var(--fx-accent); transform: translateY(-3px); }
.fx-totop svg { width: 18px; height: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
    .fx-layout { grid-template-columns: minmax(0, 1fr); }
    .fx-side { position: static; }
    .fx-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 860px) {
    :root { --fx-gap: 20px; }
    .fx-nav-links { display: none; }
    .fx-nav-toggle { display: grid; }
    .fx-hero { padding-top: calc(var(--fx-nav-h) + 46px); }
    .fx-hero-links { gap: 8px 22px; }
}
@media (max-width: 640px) {
    body { font-size: 16px; }
    .fx-wrap { padding: 0 16px; }
    .fx-footer-grid { grid-template-columns: 1fr; padding: 38px 0 24px; }
    .fx-footer-bottom { flex-direction: column; align-items: flex-start; }
    .fx-totop { right: 14px; bottom: 16px; }
}
