/* ================================
   skills.html 专属样式 - 代码技巧布局
================================ */

/* Hero 区域 */
.skills-hero {
    position: relative;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    padding: 140px 0 100px;
    overflow: hidden;
}

.code-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    opacity: 0.08;
    pointer-events: none;
}

.code-bg pre {
    margin: 0;
    padding: 40px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #58a6ff;
    white-space: pre-wrap;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.skill-badge {
    display: inline-block;
    font-size: 12px;
    letter-spacing: 3px;
    color: #58a6ff;
    margin-bottom: 20px;
    padding: 6px 15px;
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 20px;
}

.skills-hero h1 {
    font-size: 52px;
    color: #f0f6fc;
    margin-bottom: 20px;
}

.skills-hero p {
    font-size: 18px;
    color: #8b949e;
    max-width: 600px;
    margin: 0 auto;
}

/* 筛选区 */
.skills-filter {
    background: #f6f8fa;
    padding: 30px 0;
    border-bottom: 1px solid #d0d7de;
}

.filter-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    padding: 10px 22px;
    border: 1px solid #d0d7de;
    background: #fff;
    color: #24292f;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 25px;
}

.chip:hover,
.chip.active {
    background: #0969da;
    border-color: #0969da;
    color: #fff;
}

/* 技巧卡片区 */
.skills-cards-section {
    padding: 100px 0;
    background: #fff;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.skill-card {
    background: #f6f8fa;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #d0d7de;
    transition: all 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-5px);
    border-color: #0969da;
    box-shadow: 0 10px 30px rgba(9, 105, 218, 0.15);
}

.skill-icon {
    font-size: 42px;
    margin-bottom: 15px;
}

.skill-card h3 {
    font-size: 18px;
    color: #24292f;
    margin-bottom: 12px;
}

.skill-card p {
    font-size: 14px;
    color: #57606a;
    line-height: 1.6;
    margin-bottom: 15px;
}

.code-preview {
    background: #0d1117;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow-x: auto;
}

.code-preview code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #7ee787;
}

.skill-link {
    color: #0969da;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.skill-link:after {
    content: "→";
    transition: transform 0.3s ease;
}

.skill-link:hover:after {
    transform: translateX(5px);
}

/* 速查表区域 */
.cheatsheet-section {
    padding: 100px 0;
    background: #f6f8fa;
}

.cheatsheet-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.cheatsheet-section h2 {
    font-size: 36px;
    color: #24292f;
    margin-bottom: 15px;
}

.cheatsheet-section p {
    font-size: 16px;
    color: #57606a;
}

.cheatsheet-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.cheat-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #d0d7de;
}

.cheat-card h4 {
    font-size: 16px;
    color: #0969da;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0969da;
}

.cheat-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cheat-card li {
    padding: 8px 0;
    font-size: 13px;
    color: #57606a;
    border-bottom: 1px dashed #eaeef2;
}

.cheat-card li:last-child {
    border-bottom: none;
}

.cheat-card code {
    background: #f6f8fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #cf222e;
}

/* 响应式适配 */
@media (max-width: 1024px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cheatsheet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .skills-hero h1 {
        font-size: 36px;
    }
    
    .code-bg {
        display: none;
    }
    
    .skills-grid,
    .cheatsheet-grid {
        grid-template-columns: 1fr;
    }
}
