/**
 * Jesoo Tech Lab - 主样式文件
 * 简洁、现代、响应式设计
 */

/* ========== 基础样式 ========== */
:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
    font-size: 16px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
}

/* ========== 头部 ========== */
.header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.header-right {
    display: flex;
    align-items: center;
    position: relative;
}

.logo-text {
    font-size: 24px;
    font-weight: 900;
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: none;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--primary-color);
}

.nav .admin-link {
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-sm);
}

.nav .admin-link:hover {
    background: var(--primary-hover);
}

/* 关闭按钮默认隐藏 */
.nav-close {
    display: none;
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.mobile-menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 60px 40px;
        z-index: 9999;
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-close {
        position: absolute;
        top: 30px;
        right: 30px;
        background: transparent;
        border: none;
        font-size: 32px;
        color: var(--text-primary);
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: color 0.3s ease;
    }
    
    .nav-close:hover {
        color: var(--primary-color);
    }
    
    .nav a {
        font-size: 18px;
        font-weight: 400;
        color: var(--text-primary);
        text-decoration: none;
        padding: 12px 0;
        border-bottom: none;
        width: auto;
        text-align: center;
        transition: color 0.3s ease;
    }
    
    .nav a:hover,
    .nav a.active {
        color: var(--primary-color);
    }
    
    .nav .admin-link {
        margin: 20px 0 0 0;
        padding: 12px 0;
        background: transparent;
        color: var(--text-primary);
        border-radius: 0;
        font-size: 18px;
        font-weight: 400;
    }
    
    .nav .admin-link:hover {
        background: transparent;
        color: var(--primary-color);
    }
}

/* ========== 主要内容 ========== */
.main {
    padding: 0;
}

/* Hero 横幅区域 */
.hero-banner {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a7b 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at right, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.hero-left {
    color: white;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: 32px;
    line-height: 1.2;
}

.hero-links {
    display: flex;
    gap: 16px;
}

.hero-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.hero-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.hero-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.badge-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
}

.badge-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
}

.badge-item svg {
    margin-bottom: 16px;
    opacity: 0.9;
}

.badge-item span {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

/* 关于区域 */
.about {
    padding: 100px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    align-items: start;
}

.about-left h2 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.about-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.about-text p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.about-text strong {
    color: var(--primary-color);
    font-weight: 700;
}

.about-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tech-badge {
    background: var(--bg-primary);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px;
    text-align: center;
    transition: all 0.3s ease;
}

.tech-badge:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.tech-badge svg {
    color: var(--primary-color);
    margin-bottom: 16px;
}

.tech-badge span {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

/* 项目列表 */
.projects {
    margin-bottom: 80px;
}

.projects h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 48px;
    text-align: left;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.project-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.project-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.project-icon {
    font-size: 36px;
    margin-right: 15px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    width: 36px;
    height: 36px;
}

.project-icon svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

.project-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.project-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    transition: color 0.2s;
    line-height: 1.2;
}

.project-title:hover {
    color: var(--primary-color);
}

.project-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.project-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: var(--primary-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.project-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.empty-state h3 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

/* ========== 页脚 ========== */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    padding: 32px 0;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-left {
    color: var(--text-secondary);
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-right a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-right a:hover {
    opacity: 0.7;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    /* 关于我们区域移动端样式 */
    .about-right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
        margin-top: 32px;
    }
    
    /* 技术标签移动端样式 */
    .tech-badge {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 16px;
        gap: 12px;
        min-height: 70px;
    }
    
    .tech-badge svg {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .tech-badge span {
        font-size: 14px;
        margin: 0;
        line-height: 1.3;
    }
    
    .nav {
        gap: 20px;
    }
    
    .logo-text {
        font-size: 19px;
    }
    
    .hero-banner {
        padding: 60px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-right {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .badge-item {
        display: flex;
        align-items: center;
        text-align: left;
        padding: 16px;
        gap: 12px;
        min-height: 70px;
    }
    
    .badge-item svg {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .badge-item span {
        font-size: 14px;
        margin: 0;
        line-height: 1.3;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-left h2 {
        font-size: 28px;
    }
    
    .about-text p {
        font-size: 16px;
    }
    
    .projects h2 {
        font-size: 28px;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-right {
        gap: 16px;
    }
}

/* ========== 动画 ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card {
    animation: fadeIn 0.5s ease-out;
}

/* ========== 最新文章 ========== */

.latest-articles {
    margin-bottom: 80px;
}

.latest-articles h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 48px;
    text-align: left;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.article-card {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--border-color);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    animation: fadeIn 0.5s ease-out;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.article-header {
    margin-bottom: 15px;
}

.article-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.article-category {
    background: var(--bg-secondary);
    color: var(--accent-color);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--accent-color);
}

.article-date {
    display: flex;
    align-items: center;
    gap: 4px;
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.section-footer {
    text-align: center;
    margin-top: 40px;
}

.view-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: background-color 0.3s, transform 0.2s;
}

.view-more-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* 响应式设计 - 文章 */
@media (max-width: 768px) {
    .latest-articles h2 {
        font-size: 28px;
        margin-bottom: 32px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .article-card {
        padding: 24px;
    }
    
    .article-title {
        font-size: 18px;
    }
}


