/* 赵先森的小屋 - 前端样式 */
/* 设计理念: 毛玻璃 + 液态玻璃(iOS风格) + 圆角 + 现实感 */

:root {
    /* 配色方案: 深色主题，蓝绿色系 */
    --bg-deep: #0a0e17;
    --bg-primary: #0f1520;
    --bg-surface: #151d2b;
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.10);
    --border-medium: rgba(255, 255, 255, 0.15);
    --text-primary: #e4e9f0;
    --text-secondary: #8c99ae;
    --text-muted: #4e5a6e;
    --accent-blue: #4a9eff;
    --accent-teal: #38c9b4;
    --accent-warm: #f0a050;
    --accent-rose: #e8637a;
    --glass-bg: rgba(18, 26, 40, 0.52);
    --glass-bg-light: rgba(30, 42, 60, 0.45);
    --glass-bg-strong: rgba(12, 18, 28, 0.7);
    --glass-blur: 24px;
    --glass-blur-strong: 40px;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --shadow-ambient: 0 2px 10px rgba(0, 0, 0, 0.25);
    --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-deep: 0 16px 48px rgba(0, 0, 0, 0.45);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== 背景装饰 ===== */

.bg-decoration {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(74, 158, 255, 0.3) 0%, transparent 70%);
    top: -10%;
    left: -5%;
    animation-delay: 0s;
}

.bg-orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(56, 201, 180, 0.25) 0%, transparent 70%);
    top: 40%;
    right: -8%;
    animation-delay: -7s;
    animation-duration: 25s;
}

.bg-orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(240, 160, 80, 0.15) 0%, transparent 70%);
    bottom: -5%;
    left: 30%;
    animation-delay: -14s;
    animation-duration: 22s;
}

.bg-mesh {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 40px 40px;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-20px, 30px) scale(0.95); }
    75% { transform: translate(15px, 15px) scale(1.02); }
}

/* ===== 液态玻璃核心 ===== */

.liquid-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.6);
    border: 1px solid var(--border-light);
    box-shadow:
        var(--shadow-ambient),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.liquid-glass-light {
    background: var(--glass-bg-light);
    backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.5);
    border: 1px solid var(--border-subtle);
    box-shadow:
        0 1px 6px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.liquid-glass-strong {
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur-strong)) saturate(1.8);
    -webkit-backdrop-filter: blur(var(--glass-blur-strong)) saturate(1.8);
    border: 1px solid var(--border-medium);
    box-shadow:
        var(--shadow-float),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

/* ===== 导航栏 ===== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-radius: 0;
    border-top: none;
    border-left: none;
    border-right: none;
    transition: var(--transition-smooth);
}

.navbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: var(--transition-base);
}

.navbar-brand:hover {
    color: var(--accent-teal);
}

.navbar-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    padding: 6px 14px;
    font-size: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-xs);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition-base);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    flex-direction: column;
    padding: 12px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur-strong));
    -webkit-backdrop-filter: blur(var(--glass-blur-strong));
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav-link {
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .navbar-nav { display: none; }
    .mobile-menu-btn { display: flex; }
}

/* ===== 主内容 ===== */

.main {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 40px;
}

/* ===== Section 通用 ===== */

.section {
    margin-bottom: 64px;
    scroll-margin-top: 80px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.3px;
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-light), transparent);
}

.empty-hint {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Hero / 简介 ===== */

.hero-section {
    padding-top: 48px;
    margin-bottom: 80px;
}

.hero-content {
    display: flex;
    justify-content: center;
}

.hero-card {
    padding: 48px 40px;
    border-radius: var(--radius-2xl);
    text-align: center;
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* 液态玻璃光泽效果 */
.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 30% 20%,
        rgba(255, 255, 255, 0.03) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.hero-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-muted);
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.06);
}

.hero-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-name {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-title {
    font-size: 15px;
    color: var(--accent-teal);
    margin-bottom: 20px;
}

.hero-bio {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== 时间轴 ===== */

.timeline-container {
    position: relative;
    padding-left: 28px;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-blue), var(--accent-teal), transparent);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 24px;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    animation: slideUp 0.4s ease both;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 24px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent-blue);
    border: 2px solid var(--bg-deep);
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.4);
}

.timeline-date {
    font-size: 13px;
    color: var(--accent-teal);
    font-weight: 500;
    margin-bottom: 6px;
}

.timeline-item-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 8px;
}

.timeline-item-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 技能 ===== */

.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.skill-card {
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 50% 0%,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 60%
    );
    pointer-events: none;
}

.skill-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-float),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.skill-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.skill-category {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.skill-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 3px;
    overflow: hidden;
}

.skill-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-teal));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(74, 158, 255, 0.3);
}

.skill-level {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 6px;
    text-align: right;
}

/* ===== 社交 ===== */

.social-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.social-card {
    padding: 24px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.social-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at 30% 30%,
        rgba(255, 255, 255, 0.02) 0%,
        transparent 50%
    );
    pointer-events: none;
}

.social-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-float),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.social-icon-kuaishou {
    background: rgba(255, 160, 50, 0.12);
    color: #ffa032;
}

.social-icon-douyin {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.social-icon-bilibili {
    background: rgba(0, 174, 236, 0.12);
    color: #00aeec;
}

.social-info {
    flex: 1;
    min-width: 0;
}

.social-platform {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.social-handle {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-arrow {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition-base);
}

.social-card:hover .social-arrow {
    color: var(--text-secondary);
    transform: translateX(3px);
}

/* ===== 项目 ===== */

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-smooth);
    text-decoration: none;
    display: block;
    position: relative;
}

.project-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-float),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.project-cover {
    width: 100%;
    height: 160px;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-cover img {
    transform: scale(1.05);
}

.project-cover-placeholder {
    color: var(--text-muted);
    font-size: 13px;
}

.project-body {
    padding: 20px 24px;
}

.project-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    font-size: 13px;
    color: var(--accent-teal);
    text-decoration: none;
    transition: var(--transition-base);
}

.project-link:hover {
    color: var(--accent-blue);
}

/* ===== 页脚 ===== */

.footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border-subtle);
    margin-top: 40px;
}

.footer-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 24px 20px;
    text-align: center;
}

.footer-inner p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 动画延迟 ===== */

.timeline-item:nth-child(1) { animation-delay: 0s; }
.timeline-item:nth-child(2) { animation-delay: 0.08s; }
.timeline-item:nth-child(3) { animation-delay: 0.16s; }
.timeline-item:nth-child(4) { animation-delay: 0.24s; }
.timeline-item:nth-child(5) { animation-delay: 0.32s; }
.timeline-item:nth-child(6) { animation-delay: 0.40s; }
.timeline-item:nth-child(7) { animation-delay: 0.48s; }
.timeline-item:nth-child(8) { animation-delay: 0.56s; }

/* ===== 响应式 ===== */

@media (max-width: 768px) {
    .main {
        padding: 72px 16px 32px;
    }

    .section {
        margin-bottom: 48px;
    }

    .section-title {
        font-size: 20px;
    }

    .hero-card {
        padding: 32px 24px;
        border-radius: var(--radius-xl);
    }

    .hero-name {
        font-size: 24px;
    }

    .hero-avatar {
        width: 80px;
        height: 80px;
    }

    .skills-container {
        grid-template-columns: 1fr;
    }

    .social-container {
        grid-template-columns: 1fr;
    }

    .projects-container {
        grid-template-columns: 1fr;
    }

    .timeline-container {
        padding-left: 24px;
    }
}

@media (max-width: 480px) {
    .hero-card {
        padding: 24px 18px;
    }

    .hero-name {
        font-size: 22px;
    }

    .timeline-item {
        padding: 16px 18px;
    }
}

/* ===== 滚动条 ===== */

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* ===== 选中样式 ===== */

::selection {
    background: rgba(74, 158, 255, 0.25);
    color: var(--text-primary);
}
