/* ===== Common CSS - Shared by all pages ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4f46e5;
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --bg: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ===== Navbar ===== */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.navbar-brand .logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.navbar-links {
    display: flex;
    gap: 4px;
    list-style: none;
    flex-wrap: wrap;
}

.navbar-links a {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.navbar-links a:hover {
    color: var(--text);
    background: var(--bg-card-hover);
}

.navbar-links a.active {
    color: var(--primary-light);
    background: rgba(79, 70, 229, 0.15);
}

/* ===== Page Header ===== */
.page-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e1b4b 100%);
    border-bottom: 1px solid var(--border);
    padding: 50px 20px 35px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(129, 140, 248, 0.1) 0%, transparent 50%);
    animation: float 8s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-20px, 20px); }
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #c084fc, #f0abfc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    position: relative;
}

/* ===== Main ===== */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid var(--primary);
    color: var(--text);
}

/* ===== Chart Card ===== */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.chart-card h3 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card h3 .icon {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-light);
}

.chart-container {
    width: 100%;
    height: 500px;
}

/* ===== Back Button ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-bottom: 24px;
}

.back-btn:hover {
    color: var(--text);
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

/* ===== Tech Stack ===== */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: default;
}

.tech-tag:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
    transform: scale(1.05);
}

.tech-tag .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ===== Tech Detail Grid ===== */
.tech-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.tech-detail-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.tech-detail-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.tech-detail-card .tech-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tech-detail-card .tech-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
}

.tech-detail-card h4 {
    font-size: 1.1rem;
}

.tech-detail-card .tech-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.tech-detail-card .tech-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.tech-detail-card .tech-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 1s ease;
}

.tech-detail-card .tech-level {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ===== Article Cards ===== */
.articles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}

.article-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.15);
}

.article-card .more-link {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    z-index: 2;
}

.article-card .more-link:hover {
    color: var(--primary-light);
}

.article-card .tag {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.article-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.article-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-card .meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* ===== Timeline ===== */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.timeline-item:hover {
    border-color: var(--primary);
    transform: translateX(5px);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 28px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item .date {
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 6px;
    font-weight: 600;
}

.timeline-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.timeline-item p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ===== Footer ===== */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

footer .copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

footer .beian a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
}

footer .beian a:hover {
    color: var(--primary-light);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .page-header h1 { font-size: 1.5rem; }
    .navbar-inner { flex-direction: column; height: auto; padding: 10px 0; }
    .navbar-links { overflow-x: auto; width: 100%; justify-content: flex-start; }
    .chart-container { height: 350px; }
    .articles { grid-template-columns: 1fr; }
    .tech-detail-grid { grid-template-columns: 1fr; }
}
