/* CSS 变量系统 */
:root {
    /* 颜色系统 */
    --color-primary: #ffffff;
    --color-bg: #000000;
    --color-text-primary: #ffffff;
    --color-text-secondary: #cccccc;
    --color-text-muted: #999999;
    --color-border: #666666;
    --color-border-light: #444444;

    /* 字体系统 */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'Fira Code', 'SF Mono', Monaco, Consolas, monospace;

    /* 字体大小 */
    --font-size-base: clamp(15px, 1vw, 17px);
    --font-size-lg: clamp(1.05rem, 1.3vw, 1.2rem);
    --font-size-code: 0.9em;

    /* 背景层次系统 */
    --bg-primary: #000000;      /* 主背景 */
    --bg-elevated: #0d0d0d;     /* 提升层（替代 #0a0a0a）*/
    --bg-elevated-2: #1a1a1a;   /* 二级提升 */
    --bg-elevated-3: #1f1f1f;   /* 三级提升（新增） */

    /* 扩展灰度系统 */
    --gray-950: #0a0a0a;
    --gray-900: #141414;
    --gray-850: #1f1f1f;
    --gray-800: #2b2b2b;
    --gray-700: #3d3d3d;
    --gray-600: #525252;
    --gray-500: #6b6b6b;
    --gray-400: #858585;
    --gray-300: #a3a3a3;
    --gray-200: #c7c7c7;

    /* 间距系统 - 8px基准 */
    --spacing-xs: 0.5rem;    /* 8px */
    --spacing-sm: 1rem;      /* 16px */
    --spacing-md: 1.5rem;    /* 24px */
    --spacing-lg: 2rem;      /* 32px */
    --spacing-xl: 3rem;      /* 48px */
    --spacing-2xl: 4rem;     /* 64px */
    --spacing-3xl: 6rem;     /* 96px */

    /* 边距细分 */
    --spacing-1: 0.25rem;    /* 4px */
    --spacing-2: 0.625rem;   /* 10px */
    --spacing-3: 0.9375rem;  /* 15px */
    --spacing-4: 1.25rem;    /* 20px */
    --spacing-5: 1.875rem;   /* 30px */

    /* 动画时序函数系统 */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

    /* 新增弹性动画 */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);        /* 弹簧效果 */
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);   /* 反弹效果 */
    --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);           /* 平滑效果 */

    /* 组合动画 */
    --transition-spring: 0.5s var(--ease-spring);
    --transition-bounce: 0.6s var(--ease-bounce);
    --transition-smooth: 0.4s var(--ease-smooth);

    /* 边框效果 */
    --border-width-thin: 1px;
    --border-width-normal: 2px;
    --border-width-thick: 3px;

    /* 双层边框效果（通过box-shadow模拟） */
    --border-dual-light:
        0 0 0 1px var(--gray-700),
        0 0 0 2px var(--gray-900);

    --border-dual-strong:
        0 0 0 1px var(--gray-500),
        0 0 0 2px var(--gray-800);

    /* 渐变边框 */
    --border-gradient:
        0 0 0 1px var(--gray-700),
        inset 0 1px 0 rgba(255,255,255,0.05);

    /* 切角系统 */
    --clip-sm: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    --clip-md: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    --clip-lg: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);

    /* 双切角（右上+左下） */
    --clip-dual: polygon(
        8px 0,
        calc(100% - 8px) 0,
        100% 8px,
        100% calc(100% - 8px),
        calc(100% - 8px) 100%,
        8px 100%,
        0 calc(100% - 8px),
        0 8px
    );

    /* 多层次阴影系统 */
    --shadow-sm:
        0 1px 2px rgba(255, 255, 255, 0.05),
        0 1px 3px rgba(255, 255, 255, 0.03);

    --shadow-md:
        0 2px 4px rgba(255, 255, 255, 0.06),
        0 4px 8px rgba(255, 255, 255, 0.04),
        0 1px 16px rgba(255, 255, 255, 0.02);

    --shadow-lg:
        0 4px 8px rgba(255, 255, 255, 0.08),
        0 8px 16px rgba(255, 255, 255, 0.06),
        0 2px 24px rgba(255, 255, 255, 0.04);

    /* 发光效果（悬停用） */
    --shadow-glow:
        0 0 20px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(255, 255, 255, 0.1);

    --shadow-glow-strong:
        0 0 30px rgba(255, 255, 255, 0.3),
        0 0 60px rgba(255, 255, 255, 0.15),
        0 0 90px rgba(255, 255, 255, 0.08);
}

#loading-screen {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99999;
    display: grid;
    place-items: center;
    transition: opacity .4s, visibility .4s;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 40px;
    height: 40px;
    border: 3px solid #000;
    border-top: 3px solid transparent;
    animation: load 1.2s infinite;
}

@keyframes load {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 公共样式类 */
/* 文本梯度效果 - 复用于标题 */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary) 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 列表项基础样式 - 复用于所有列表 */
.list-item-base {
    margin-bottom: 0.75rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    font-family: var(--font-mono);
    letter-spacing: 0.3px;
    border-left: var(--border-width-thick) solid var(--color-border);
    padding-left: 15px;
    transition: border-color var(--transition-fast),
                padding-left var(--transition-fast),
                color var(--transition-fast);
}

.list-item-base:hover {
    border-left-color: var(--color-primary);
    padding-left: 20px;
    color: var(--color-primary);
}

/* 卡片边框效果 */
.card-border {
    border: var(--border-width-normal) solid var(--color-border);
    transition: border-color var(--transition-normal),
                box-shadow var(--transition-normal);
}

.card-border:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

/* 基础样式 - 使用流体字体 */
html {
    font-size: clamp(14px, 0.8vw + 12px, 18px);
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    overflow-x: hidden;
    background-image:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0px, transparent 1px, transparent 2px, rgba(255,255,255,0.05) 3px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0px, transparent 1px, transparent 2px, rgba(255,255,255,0.05) 3px);
    background-size: 20px 20px, 20px 20px;
}

/* 页面内容默认隐藏，加载完成后显示 */
.navbar,
.hero,
.section,
.footer {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

body.loaded .navbar,
body.loaded .hero,
body.loaded .section,
body.loaded .footer {
    opacity: 1;
}

/* 容器样式 */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 滚动时导航栏效果 */
.navbar.scrolled {
    padding: 1rem 0;
    background-color: rgba(0, 0, 0, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

/* 滚动时的body样式 */
body.scrolling {
    overflow: hidden;
}

/* 菜单打开时的body样式 */
body.menu-open {
    overflow: hidden;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand a:hover {
    transform: translateY(-2px);
    transition: transform var(--transition-bounce);
}

/* 导航菜单样式 */
.navbar-menu {
    display: flex;
    gap: var(--spacing-lg);
    transition: all 0.3s ease;
}

.navbar-menu a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
    text-decoration: none;
    transition: all 0.2s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0.75rem;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-menu a:hover {
    color: var(--color-text-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* 外部链接样式 */
.navbar-menu a.external-link {
    opacity: 0.7;
    font-size: 0.9em;
}

.navbar-menu a.external-link::before {
    content: '↗';
    margin-right: 4px;
    font-size: 0.8em;
}

.navbar-menu a.external-link:hover {
    opacity: 1;
}

/* 下拉菜单样式 */
.navbar-dropdown {
    position: relative;
    display: inline-block;
}

.navbar-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
}

.navbar-dropdown .dropdown-arrow {
    font-size: 0.7em;
    transition: transform var(--transition-fast);
}

.navbar-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: var(--spacing-2) 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-fast);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.navbar-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: var(--spacing-3) var(--spacing-4);
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    padding-left: var(--spacing-5);
}

.dropdown-menu a.external-link::before {
    content: '↗';
    margin-right: 6px;
    font-size: 0.8em;
}

/* 汉堡菜单 - 侧边栏设计 */
.menu-btn {
    display: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    z-index: 1002;
    background: none;
    border: none;
    padding: 0;
}

.menu-btn__lines {
    width: 20px;
    height: 14px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.menu-btn__line {
    display: block;
    width: 100%;
    height: 1.5px;
    background: #ffffff;
    position: absolute;
    left: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.menu-btn__line:nth-child(1) {
    top: 0;
}

.menu-btn__line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.menu-btn__line:nth-child(3) {
    bottom: 0;
}

/* 汉堡菜单动画 */
.menu-btn.active .menu-btn__line:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.menu-btn.active .menu-btn__line:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}

.menu-btn.active .menu-btn__line:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* 遮罩层 */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 1000;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 英雄区域样式 - 优化 */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--color-bg);
    padding: 100px 2rem 4rem;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.hero .container {
    position: relative;
    z-index: 10;
    max-width: 1000px;
    margin: 0 auto;
}

/* 终端窗口样式 */
.terminal {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    z-index: 9999; /* 最顶层 */
    user-select: none;
    pointer-events: auto; /* 改为 auto，允许点击 */
    cursor: pointer; /* 添加鼠标指针 */
}

/* 终端主体 */
.terminal-body {
    cursor: auto;
}

/* 每个终端透明度略有不同 */
.terminal-top-left {
    background: rgba(0, 0, 0, 0.88);
}

.terminal-top-right {
    background: rgba(0, 0, 0, 0.82);
}

.terminal-mid-left {
    background: rgba(0, 0, 0, 0.86);
}

.terminal-mid-right {
    background: rgba(0, 0, 0, 0.84);
}

.terminal-bottom-left {
    background: rgba(0, 0, 0, 0.87);
}

.terminal-bottom-right {
    background: rgba(0, 0, 0, 0.83);
}

/* 终端位置 - 6个终端完全随机分布 */
.terminal-top-left {
    top: 90px;
    left: 15px;
    transform: rotate(-1.8deg);
    animation: fadeInTerminal 1s ease forwards 0.6s;
}

.terminal-top-right {
    top: 160px;
    right: 120px;
    transform: rotate(2.3deg);
    animation: fadeInTerminal 1s ease forwards 0.2s;
}

.terminal-mid-left {
    top: 38%;
    left: 85px;
    transform: translateY(-50%) rotate(-1.2deg);
    animation: fadeInTerminalMid 1s ease forwards 1.3s;
}

.terminal-mid-right {
    top: 58%;
    right: 40px;
    transform: translateY(-50%) rotate(1.6deg);
    animation: fadeInTerminalMid 1s ease forwards 0.8s;
}

.terminal-bottom-left {
    bottom: 140px;
    left: 35px;
    transform: rotate(1.4deg);
    animation: fadeInTerminal 1s ease forwards 1.6s;
}

.terminal-bottom-right {
    bottom: 90px;
    right: 85px;
    transform: rotate(-1.9deg);
    animation: fadeInTerminal 1s ease forwards 0.4s;
}

@keyframes fadeInTerminal {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInTerminalMid {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(0);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

/* 点击显示终端的动画 */
@keyframes fadeInTerminalClick {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px 6px 0 0;
}

.terminal-button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.terminal-button:nth-child(1) {
    background: rgba(255, 255, 255, 0.4);
}

.terminal-button:nth-child(2) {
    background: rgba(255, 255, 255, 0.3);
}

.terminal-button:nth-child(3) {
    background: rgba(255, 255, 255, 0.2);
}

.terminal-title {
    margin-left: auto;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.terminal-body {
    padding: 12px;
    min-width: 280px;
    max-width: 350px;
}

/* 每个终端大小变化更大 */
.terminal-top-left .terminal-body {
    min-width: 320px;
    max-width: 390px;
}

.terminal-top-right .terminal-body {
    min-width: 245px;
    max-width: 315px;
}

.terminal-mid-left .terminal-body {
    min-width: 260px;
    max-width: 330px;
}

.terminal-mid-right .terminal-body {
    min-width: 305px;
    max-width: 375px;
}

.terminal-bottom-left .terminal-body {
    min-width: 275px;
    max-width: 345px;
}

.terminal-bottom-right .terminal-body {
    min-width: 290px;
    max-width: 360px;
}

.terminal-line {
    margin-bottom: 6px;
    line-height: 1.6;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.terminal-line:last-child {
    margin-bottom: 0;
}

.prompt {
    color: #ffffff;
    font-weight: 600;
    flex-shrink: 0;
}

.command {
    color: #cccccc;
    font-weight: 400;
}

.output {
    color: #999999;
    font-weight: 300;
    padding-left: 16px;
}

/* 打字光标效果 */
.typing::after {
    content: '▋';
    color: #ffffff;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* 终端悬停效果 - 保持原有旋转 */
.terminal:hover {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.15),
                0 0 20px rgba(255, 255, 255, 0.1);
}

/* 设置每个终端的旋转变量 */
.terminal-top-left {
    --terminal-rotation: -1.8deg;
}

.terminal-top-right {
    --terminal-rotation: 2.3deg;
}

.terminal-mid-left {
    --terminal-rotation: -1.2deg;
}

.terminal-mid-right {
    --terminal-rotation: 1.6deg;
}

.terminal-bottom-left {
    --terminal-rotation: 1.4deg;
}

.terminal-bottom-right {
    --terminal-rotation: -1.9deg;
}

/* 终端标题颜色变化 */
.terminal:hover .terminal-title {
    color: rgba(255, 255, 255, 0.8);
}

/* 终端按钮悬停时的彩色效果 */
.terminal:hover .terminal-button:nth-child(1) {
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.terminal:hover .terminal-button:nth-child(2) {
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

.terminal:hover .terminal-button:nth-child(3) {
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}


.hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-3);
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.3s;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 10;
}

.hero h1:hover {
    transform: translateY(-2px);
    filter: brightness(1.2);
}

.hero .status {
    color: var(--color-text-muted);
    font-size: clamp(0.875rem, 1.5vw, 1.25rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards 0.6s;
    position: relative;
    z-index: 10;
}

.hero .status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    margin-right: 8px;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* 淡入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 打字机动画 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--color-text-primary); }
}

/* 呼吸效果（用于状态指示器） */
@keyframes breathe {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.9);
    }
}

/* 脉冲效果（用于按钮） */
@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* 区块样式 - 优化 */
.section {
    padding: 8rem 0;
    background: var(--color-bg);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.section.animate {
    opacity: 1;
    transform: translateY(0);
}

.section:nth-child(odd) {
    background: var(--color-bg);
}

.section h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--spacing-5);
    color: var(--color-text-primary);
    text-align: center;
    position: relative;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 内容样式 */
.content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: var(--spacing-5);
    margin-bottom: var(--spacing-5);
    box-shadow: var(--shadow-lg);
    border-radius: 4px;
}

.content p {
    font-size: clamp(0.95rem, 1.2vw, 1.125rem);
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--color-text-primary);
    letter-spacing: 0.5px;
    font-family: var(--font-mono);
}

/* 区块网格背景 */
.section .grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* 技能网格样式 - 优化 */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: clamp(2rem, 4vw, 3.5rem);
    margin-top: clamp(3rem, 6vw, 5rem);
    position: relative;
    z-index: 1;
}

.skill-item {
    padding: var(--spacing-5);
    background: var(--bg-elevated-2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.skill-item:hover {
    background: var(--bg-elevated-3);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: var(--shadow-glow);
    transform: translateX(5px) scale(1.02);
    transition:
        transform var(--transition-smooth),
        background var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-normal);
}

.skill-item h3 {
    font-size: clamp(1.125rem, 1.8vw, 1.5rem);
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.skill-item h4 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.skill-item p {
    font-size: clamp(0.85rem, 1.1vw, 1rem);
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    letter-spacing: 0.5px;
}

.skill-item ul {
    list-style: none;
    margin: 1rem 0 1.5rem 0;
    text-align: left;
    padding-left: 1.5em;
}

.skill-item li {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    letter-spacing: 0.3px;
    padding-left: 0;
    position: relative;
    transition: color 0.2s ease;
}

.skill-item li::before {
    content: '•';
    position: absolute;
    left: -1.2em;
    color: var(--color-text-muted);
    font-weight: bold;
    transition: color 0.2s ease;
}

.skill-item li:hover {
    color: var(--color-text-primary);
}

.skill-item li:hover::before {
    color: var(--color-primary);
}

/* 页脚样式 - 优化 */
.footer {
    padding: 8rem 0 4rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer .container {
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.footer h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--color-text-primary);
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, #888888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer p {
    font-size: clamp(0.9rem, 1.3vw, 1.125rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
    letter-spacing: 0.5px;
}

.copyright {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #666;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* 备案号超链接样式 */
.copyright a {
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s ease;
}

.copyright a:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

/* 邮箱链接样式 */
.email-link {
    color: var(--color-text-primary);
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.email-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--color-primary);
    transition: width var(--transition-fast);
}

.email-link:hover::after {
    width: 100%;
}

.email-link:hover {
    color: var(--color-primary);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.email-protected {
    display: inline-block;
}

/* 复制反馈提示 */
.copy-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
    border: 1px solid #ffffff;
}

.copy-feedback.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 767px) {
    .copy-feedback {
        font-size: 0.85rem;
        padding: 0.875rem 1.5rem;
    }
}

/* RISE.L.net 相关样式 */
.content h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 600;
    margin: 3rem 0 1.5rem;
    color: #fff;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.content h4 {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.content ul {
    list-style: none;
    margin: 1.5rem 0 2rem 0;
    padding-left: 1.5em;
}

.content li {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    letter-spacing: 0.3px;
    padding-left: 0;
    position: relative;
    transition: color 0.2s ease;
}

.content li::before {
    content: '•';
    position: absolute;
    left: -1.2em;
    color: var(--color-text-muted);
    font-weight: bold;
    transition: color 0.2s ease;
}

.content li:hover {
    color: var(--color-text-primary);
}

.content li:hover::before {
    color: var(--color-primary);
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
    background-color: var(--color-bg);
    color: var(--color-text-primary);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    font-weight: 500;
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    background-color: var(--color-text-primary);
    color: #000000;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px) scale(1.03);
    transition: all var(--transition-spring);
    border-color: var(--color-text-primary);
}

/* 资源链接容器 */
.resources {
    margin-top: 2rem;
}

/* 代码示例样式 */
pre {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2rem;
    margin: 3rem 0;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: clamp(0.8rem, 1vw, 0.9rem);
    line-height: 1.7;
    min-height: 220px;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    display: block;
    white-space: pre;
    text-align: left;
}

/* 代码语言标注 */
pre::before {
    content: "// PYTHON CODE";
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-muted);
    opacity: 0.7;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: absolute;
    top: 0.75rem;
    left: 2rem;
    border-left: 3px solid #ffffff;
    padding-left: 10px;
}

/* 代码内容容器 */
pre code {
    margin-top: 1.5rem;
}

/* Python 语法高亮 */
code .keyword {
    color: var(--color-text-primary);
    font-weight: 600;
}

code .string {
    color: #bbb;
}

code .comment {
    color: #888;
    font-style: italic;
}

code .function {
    color: var(--color-text-primary);
    font-weight: 500;
}

code .class {
    color: var(--color-text-primary);
    font-weight: 600;
}

code .operator {
    color: #999;
}

code .number {
    color: #ccc;
}

/* 技能项样式调整 */
.skill-item {
    min-height: 380px;
    display: flex;
    flex-direction: column;
}


.skill-item pre {
    flex: 1;
    min-height: 200px;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
}

/* 响应式调整 */
@media (max-width: 767px) {
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    }

    .content {
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
        border: 1px solid #ffffff;
        padding: 20px;
    }

    .content ul {
        margin-left: 1rem;
        padding-left: 10px;
    }

    pre {
        font-size: 0.7rem;
        padding: 1.25rem;
        min-height: 150px;
        clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
        border: 1px solid #666;
    }

    pre::before {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
        top: 0.5rem;
        left: 1.25rem;
    }

    pre code {
        margin-top: 1rem;
        font-size: 0.75rem;
    }

    .skill-item {
        min-height: auto;
        padding: 20px;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
        border: 1px solid #666;
    }

    .skill-item pre {
        min-height: 120px;
        border: 1px solid #666;
    }
}

/* 响应式设计 - 超大屏幕 (1440px+) */
@media (min-width: 1440px) {
    /* 超大屏幕上调整终端位置，更加分散 */
    .terminal-top-left {
        top: 110px;
        left: 40px;
        transform: rotate(-1.8deg);
    }

    .terminal-top-right {
        top: 190px;
        right: 150px;
        transform: rotate(2.3deg);
    }

    .terminal-mid-left {
        top: 36%;
        left: 110px;
        transform: translateY(-50%) rotate(-1.2deg);
    }

    .terminal-mid-right {
        top: 60%;
        right: 70px;
        transform: translateY(-50%) rotate(1.6deg);
    }

    .terminal-bottom-left {
        bottom: 170px;
        left: 60px;
        transform: rotate(1.4deg);
    }

    .terminal-bottom-right {
        bottom: 110px;
        right: 120px;
        transform: rotate(-1.9deg);
    }

    .terminal {
        font-size: 0.85rem;
    }

    .terminal-body {
        min-width: 340px;
        max-width: 420px;
    }
}

/* 响应式设计 - 大屏幕 (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1600px;
        padding: 0 4rem;
    }

    .hero h1 {
        font-size: 5rem;
    }

    /* 大屏幕上调整终端位置 - 完全随机分布 */
    .terminal-top-left {
        top: 100px;
        left: 30px;
        transform: rotate(-1.8deg);
    }

    .terminal-top-right {
        top: 175px;
        right: 110px;
        transform: rotate(2.3deg);
    }

    .terminal-mid-left {
        top: 37%;
        left: 95px;
        transform: translateY(-50%) rotate(-1.2deg);
    }

    .terminal-mid-right {
        top: 59%;
        right: 55px;
        transform: translateY(-50%) rotate(1.6deg);
    }

    .terminal-bottom-left {
        bottom: 155px;
        left: 50px;
        transform: rotate(1.4deg);
    }

    .terminal-bottom-right {
        bottom: 100px;
        right: 95px;
        transform: rotate(-1.9deg);
    }

    .terminal {
        font-size: 0.8rem;
    }

    .terminal-body {
        min-width: 320px;
        max-width: 400px;
    }

    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4rem;
    }

    .content {
        max-width: 1400px;
        padding: 50px;
    }
}

/* 中等屏幕 (992px - 1199px) */
@media (max-width: 1199px) {
    .container {
        max-width: 1100px;
        padding: 0 2.5rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    /* 调整终端大小和位置 - 完全随机分布 */
    .terminal {
        font-size: 0.7rem;
    }

    .terminal-body {
        min-width: 240px;
        max-width: 300px;
    }

    .terminal-top-left {
        top: 80px;
        left: 15px;
        transform: rotate(-1.8deg);
    }

    .terminal-top-right {
        top: 145px;
        right: 60px;
        transform: rotate(2.3deg);
    }

    .terminal-mid-left {
        top: 38%;
        left: 50px;
        transform: translateY(-50%) rotate(-1.2deg);
    }

    .terminal-mid-right {
        top: 58%;
        right: 25px;
        transform: translateY(-50%) rotate(1.6deg);
    }

    .terminal-bottom-left {
        bottom: 110px;
        left: 30px;
        transform: rotate(1.4deg);
    }

    .terminal-bottom-right {
        bottom: 75px;
        right: 50px;
        transform: rotate(-1.9deg);
    }

    .skills-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 3rem;
    }

    .content {
        max-width: 1000px;
        padding: 35px;
    }

    .skill-item {
        padding: 30px;
    }
}

/* 平板 (768px - 991px) */
@media (max-width: 991px) {
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }

    /* 调整终端窗口大小和位置 - 隐藏中间两个，4个分散分布 */
    .terminal {
        font-size: 0.65rem;
    }

    .terminal-body {
        min-width: 200px;
        max-width: 260px;
        padding: 10px;
    }

    .terminal-top-left {
        top: 70px;
        left: 8px;
        transform: rotate(-1.8deg);
    }

    .terminal-top-right {
        top: 125px;
        right: 40px;
        transform: rotate(2.3deg);
    }

    /* 隐藏中间的终端窗口 */
    .terminal-mid-left,
    .terminal-mid-right {
        display: none;
    }

    .terminal-bottom-left {
        bottom: 95px;
        left: 20px;
        transform: rotate(1.4deg);
    }

    .terminal-bottom-right {
        bottom: 60px;
        right: 30px;
        transform: rotate(-1.9deg);
    }

    .navbar {
        padding: 1.25rem 0;
        border-bottom: 2px solid #ffffff;
    }

    .navbar-brand a {
        font-size: 1.25rem;
    }

    .navbar-menu {
        gap: 1.5rem;
    }

    .navbar-menu a {
        font-size: 0.9rem;
    }

    .hero {
        padding-top: 60px;
        border-bottom: 2px solid #ffffff;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero .typed-subtext {
        font-size: 1.1rem;
    }

    .section {
        padding: 6rem 0;
        border-bottom: 1px solid #444;
    }

    .section h2 {
        font-size: 2.25rem;
        margin-bottom: 3rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        margin-top: 3rem;
    }

    .skill-item {
        padding: 25px;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
        border: 1px solid #666;
        min-height: auto;
    }

    .skill-item pre {
        border: 1px solid #666;
        min-height: 150px;
    }

    .content {
        padding: 30px;
        max-width: 100%;
        clip-path: polygon(0 0, calc(100% - 25px) 0, 100% 25px, 100% 100%, 0 100%);
        border: 1px solid #ffffff;
    }

    .content p {
        font-size: 1.05rem;
    }

    pre {
        padding: 25px;
        min-height: 180px;
    }

    .footer {
        padding: 6rem 0;
        border-top: 2px solid #ffffff;
    }

    .footer h2 {
        font-size: 2.25rem;
    }
}

/* 手机 (576px - 767px) */
@media (max-width: 767px) {
    .container {
        padding: 0 1.25rem;
    }

    /* 在小屏幕上隐藏终端窗口 */
    .terminal {
        display: none;
    }

    .navbar {
        border-bottom: 2px solid #ffffff;
    }

    .navbar-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 75vw;
        max-width: 300px;
        height: 100vh;
        background-color: var(--color-bg);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 0;
        padding: 100px 1.5rem 2rem;
        opacity: 1;
        visibility: visible;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -5px 0 30px rgba(255, 255, 255, 0.3);
        z-index: 1001;
        border-left: 2px solid #ffffff;
    }

    .navbar-menu.active {
        transform: translateX(0);
    }

    .navbar-menu a {
        font-size: 0.9rem;
        font-weight: 400;
        letter-spacing: 0.02em;
        opacity: 1;
        transform: none;
        transition: all 0.3s ease;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
        color: var(--color-text-primary);
    }

    .navbar-menu a:last-child {
        border-bottom: none;
    }

    .navbar-menu a::after {
        display: none;
    }

    .navbar-menu a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: var(--color-text-primary);
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    /* 移动端下拉菜单样式 */
    .navbar-dropdown {
        width: 100%;
    }

    .navbar-dropdown .dropdown-toggle {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        width: 100%;
        justify-content: space-between;
    }

    .navbar-dropdown .dropdown-arrow {
        transition: transform var(--transition-fast);
    }

    .navbar-dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-normal);
        box-shadow: none;
    }

    .navbar-dropdown.active .dropdown-menu {
        max-height: 500px;
    }

    .dropdown-menu a {
        padding: 0.75rem 1.5rem 0.75rem 2.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 0.85rem;
    }

    .dropdown-menu a:hover {
        background: rgba(255, 255, 255, 0.08);
        padding-left: 3rem;
    }

    .menu-btn {
        display: block;
    }

    .hero {
        padding-top: 80px;
        min-height: 100vh;
        height: auto;
        padding-bottom: 3rem;
        border-bottom: 2px solid #ffffff;
    }

    .hero h1 {
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 3.5rem 0;
        border-bottom: 1px solid #444;
    }

    .section h2 {
        margin-bottom: 2rem;
    }

    .section .grid-bg {
        background-size: 30px 30px;
    }

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-top: 2rem;
    }

    .skill-item {
        padding: 20px;
        min-height: auto;
    }

    .skill-item h3 {
        margin-bottom: 0.875rem;
        font-size: 1rem;
    }

    .skill-item h4 {
        font-size: 0.95rem;
        margin-bottom: 0.875rem;
    }

    .content {
        padding: 20px;
    }

    .content p {
        margin-bottom: 1.25rem;
        font-size: 0.95rem;
    }

    .content h3 {
        font-size: 1.1rem;
        margin: 2rem 0 1rem;
    }

    .content h4 {
        font-size: 1rem;
    }

    .footer {
        padding: 3.5rem 0 2rem;
        border-top: 2px solid #ffffff;
    }

    .footer h2 {
        margin-bottom: 1.5rem;
    }

    /* 优化移动端代码块显示 */
    pre {
        padding: 20px;
        min-height: 160px;
    }

    pre::before {
        font-size: 0.65rem;
        margin-bottom: 0.75rem;
        top: 0.75rem;
        left: 1.25rem;
    }

    pre code {
        margin-top: 1rem;
        font-size: 0.75rem;
    }

    /* 优化移动端按钮显示 */
    .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 1rem;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    }

    /* 优化移动端列表显示 */
    .content ul {
        margin-left: 0.5rem;
        padding-left: 15px;
    }

    .content li {
        font-size: 0.9rem;
    }
}

/* 小手机 (480px - 575px) */
@media (max-width: 575px) {
    .container {
        padding: 0 0.875rem;
    }

    .navbar {
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-menu {
        width: 85vw;
        padding: 100px 1.25rem 2rem;
    }

    .hero {
        padding-top: 70px;
    }

    .section {
        padding: 2.5rem 0;
    }

    .content {
        padding: 1rem;
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 0 100%);
    }

    .skill-item {
        padding: 1rem;
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    }

    pre {
        padding: 1rem;
        min-height: 120px;
        clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
    }

    pre::before {
        font-size: 0.6rem;
        left: 1rem;
        top: 0.5rem;
    }

    pre code {
        font-size: 0.7rem;
    }

    .btn {
        clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 0 100%);
    }
}

/* 超小屏幕 (320px - 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 0.75rem;
    }

    .navbar-brand a {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .navbar-menu {
        width: 90vw;
        padding: 80px 1rem 2rem;
    }

    .navbar-menu a {
        font-size: 0.85rem;
        padding: 0.75rem 0;
        padding-left: 12px;
    }

    .hero {
        padding-top: 60px;
    }

    .section {
        padding: 2rem 0;
    }

    .section h2 {
        margin-bottom: 1.5rem;
        font-size: 1.5rem;
    }

    .section .grid-bg {
        background-size: 20px 20px;
    }

    .content {
        padding: 0.875rem;
        clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
    }

    .content p {
        line-height: 1.7;
        font-size: 0.9rem;
    }

    .content h3 {
        font-size: 1rem;
        margin: 1.5rem 0 0.875rem;
    }

    .content h4 {
        font-size: 0.9rem;
    }

    .skill-item {
        padding: 0.875rem;
    }

    .skill-item h4 {
        font-size: 0.9rem;
    }

    .skill-item p, .skill-item li {
        font-size: 0.85rem;
    }

    pre {
        padding: 0.875rem;
        min-height: 100px;
    }

    pre::before {
        font-size: 0.55rem;
        left: 0.875rem;
    }

    pre code {
        font-size: 0.65rem;
        margin-top: 0.875rem;
    }

    .footer {
        padding: 2.5rem 0 1.5rem;
    }

    .footer h2 {
        font-size: 1.5rem;
    }

    .footer p {
        font-size: 0.875rem;
    }

    .copyright {
        margin-top: 2rem;
        padding-top: 1.25rem;
        font-size: 0.75rem;
        border-top: 1px solid #666;
    }
}

/* 横屏手机 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 100px 0 3rem;
    }

    /* 横屏时也隐藏终端 */
    .terminal {
        display: none;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .section {
        padding: 3rem 0;
    }
}

/* 针对极小屏幕的内容溢出修复 */
@media (max-width: 360px) {
    html {
        font-size: 13px;
    }

    .navbar-brand a {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }

    .content, .skill-item {
        overflow-x: hidden;
    }

    pre {
        font-size: 0.6rem;
        padding: 0.75rem;
    }

    code {
        font-size: 0.6rem;
    }
}

/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    color: var(--color-primary);
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal),
                visibility var(--transition-normal),
                transform var(--transition-fast);
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-primary);
    color: var(--color-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

