/* ==========================================================================
   星核网络 SparkCore - Main Stylesheet v3.13
   Refined light theme — geometric clarity, subtle depth
   ========================================================================== */

:root {
    --primary: #2563A0;
    --primary-dark: #1D4ED8;
    --primary-light: #EFF6FF;
    --accent: #3B82C4;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --footer-bg: #0F172A;
    --footer-text: #CBD5E1;
    --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.03);
    --shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
    --shadow-glow: 0 4px 20px rgba(37,99,160,0.12);
    --t: 0.2s ease;
    --t-slow: 0.35s ease;
    --header-h: 64px;
    --max-w: 1200px;
    --sp: 8px;
}

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

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,160,0.04) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(59,130,196,0.03) 0%, transparent 50%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: 2.75rem; } h2 { font-size: 2.125rem; font-weight: 800; } h3 { font-size: 1.5rem; } h4 { font-size: 1.125rem; }
code, .mono { font-family: var(--font-mono); font-size: 0.9em; }

/* Effects */
.scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 9999; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(15,23,42,0.012) 2px, rgba(15,23,42,0.012) 4px); }
.dot-grid { background-image: radial-gradient(circle, rgba(37,99,160,0.10) 1px, transparent 1px); background-size: 24px 24px; } /* deprecated — kept for reference */

/* Layout */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.main-content { min-height: 60vh; }
.section { padding: 96px 0; }
.section-bg-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin-bottom: 12px; }
.section-label::before { content: ''; display: inline-block; width: 24px; height: 1.5px; background: var(--primary); opacity: 0.5; border-radius: 1px; }
.section-title { font-size: 2.125rem; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.02em; }
.section-subtitle, .section-desc { font-size: 1.0625rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; line-height: 1.7; }
.section-footer { text-align: center; margin-top: 48px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8125rem; }

/* Page Hero (inner pages) */
.page-hero { padding: 120px 0 64px; text-align: center; background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 60%); position: relative; }
.page-hero::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 200px; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); }
.page-hero h1 { font-size: 2.75rem; font-weight: 800; margin-bottom: 12px; animation: fadeInUp 0.5s ease-out; letter-spacing: -0.02em; }
.page-hero p { font-size: 1.0625rem; color: var(--text-secondary); animation: fadeInUp 0.5s ease-out 0.1s both; }

/* Hero Docs Card */
.hero-docs-card { display: inline-flex; align-items: center; gap: 20px; margin-top: 32px; padding: 18px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); animation: fadeInUp 0.5s ease-out 0.2s both; text-align: left; max-width: 560px; width: 100%; }
.hero-docs-icon { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: var(--primary-light); border-radius: var(--radius); color: var(--primary); }
.hero-docs-text { flex: 1; min-width: 0; }
.hero-docs-text h3 { font-size: 0.9375rem; font-weight: 700; margin-bottom: 2px; letter-spacing: -0.01em; }
.hero-docs-text p { font-size: 0.8125rem; color: var(--text-muted); line-height: 1.5; animation: none; margin: 0; }
.hero-docs-card .btn { flex-shrink: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* Header */
.site-header { position: fixed; top: 0; left: 0; right: 0; height: var(--header-h); background: rgba(255,255,255,0.85); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); z-index: 1000; transition: all var(--t-slow); }
.site-header.scrolled { box-shadow: 0 1px 8px rgba(0,0,0,0.04); background: rgba(255,255,255,0.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; font-size: 1.125rem; flex-shrink: 0; }
.logo:hover { color: var(--primary); }
.logo-img { height: 40px; width: auto; border-radius: var(--radius-sm); }
.logo-text small { font-weight: 400; font-size: 0.75rem; color: var(--text-muted); display: block; letter-spacing: 0.05em; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-link { display: inline-flex; align-items: center; padding: 8px 16px; font-size: 0.9375rem; font-weight: 500; color: var(--text-secondary); border-radius: var(--radius); transition: all var(--t); position: relative; }
.nav-link::after { content: ''; position: absolute; bottom: 2px; left: 50%; transform: translateX(-50%) scaleX(0); width: 20px; height: 2px; background: var(--primary); border-radius: 1px; transition: transform var(--t); }
.nav-link:hover { color: var(--primary); background: var(--primary-light); }
.nav-link.active { color: var(--primary); }
.nav-link.active::after { transform: translateX(-50%) scaleX(1); }
.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.mobile-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 1px; transition: all var(--t); }
.mobile-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero — Digital Industrial — light refined + hex grid + circuit accents
   ========================================================================== */
.hero, .hero-section {
    position: relative;
    padding: 200px 0 160px;
    text-align: center;
    overflow: hidden;
    background: #F4F6FA;
    isolation: isolate;
}
/* Hex grid overlay */
.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(60deg, rgba(59,130,196,0.11) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(59,130,196,0.11) 1px, transparent 1px),
        linear-gradient(0deg, rgba(59,130,196,0.08) 1px, transparent 1px);
    background-size: 48px 83px, 48px 83px, 48px 48px;
    background-position: 0 0, 0 0, 0 0;
    mask-image: radial-gradient(ellipse 65% 55% at 50% 42%, black 25%, transparent 68%);
    -webkit-mask-image: radial-gradient(ellipse 65% 55% at 50% 42%, black 25%, transparent 68%);
}
.hero-grid-pulse {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(700px, 90vw);
    height: min(700px, 90vw);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,196,0.12) 0%, rgba(59,130,196,0.05) 35%, transparent 65%);
    z-index: 0;
    pointer-events: none;
    animation: gridPulse 5s ease-in-out infinite;
}
@keyframes gridPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
}

.hero-canvas, #heroCanvas { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* Ambient geometric glow: luminous core + concentric rings */
.hero-ambient {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
}
.hero-ambient-core {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(59,130,196,0.25) 0%, rgba(59,130,196,0.10) 30%, transparent 68%);
    animation: coreBreath 4s ease-in-out infinite;
}
@keyframes coreBreath {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.12); }
}
.hero-ambient-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}
.hero-ambient-ring.ring-1 {
    width: 440px;
    height: 440px;
    border: 1px solid rgba(59,130,196,0.16);
    animation: ringSpin 22s linear infinite;
}
.hero-ambient-ring.ring-2 {
    width: 540px;
    height: 540px;
    border: 1px solid rgba(245,158,11,0.10);
    animation: ringSpin 30s linear infinite reverse;
}
@keyframes ringSpin { from { transform: translate(-50%, -50%) rotate(0deg); } to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Circuit SVG accents */
.hero-circuit {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.22;
    color: #3B82C4;
}
.hero-circuit-svg { width: 100%; height: 100%; }
.circuit-path {
    stroke-dasharray: 0 300;
    animation: circuitDraw 2.8s ease-out forwards;
    opacity: 0;
}
.circuit-path.c1 { animation-delay: 0.2s; }
.circuit-path.c2 { animation-delay: 0.5s; }
.circuit-path.c3 { animation-delay: 0.4s; }
.circuit-path.c4 { animation-delay: 0.7s; }
@keyframes circuitDraw { to { stroke-dasharray: 300 0; opacity: 0.55; } }

/* Content wrapper (legacy - now using hero-container) */
.hero-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Dark mode - Code card */
[data-theme="dark"] .hero-tech-badge {
    background: rgba(30,41,59,0.9);
    border-color: rgba(96,165,250,0.2);
    color: #E2E8F0;
}

[data-theme="dark"] .hero-desc {
    color: #94A3B8;
}

/* Badge — Liquid Glass */
.hero-badge-glass {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: #1E40AF;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, rgba(255,255,255,0.3) 50%, rgba(239,246,255,0.4) 100%);
    border: 1px solid rgba(255,255,255,0.5);
    margin-bottom: 32px;
    border-radius: 100px;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    box-shadow:
        0 8px 32px rgba(37,99,160,0.12),
        0 2px 8px rgba(37,99,160,0.06),
        inset 0 1px 0 rgba(255,255,255,0.8),
        inset 0 -1px 0 rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}
.hero-badge-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: glassShine 3s ease-in-out infinite;
}
@keyframes glassShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}
.hero-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    box-shadow: 0 0 12px rgba(59,130,246,0.5);
    animation: dotPulse 2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(59,130,246,0.5); transform: scale(1); }
    50% { opacity: 0.6; box-shadow: 0 0 18px rgba(59,130,246,0.8); transform: scale(0.85); }
}

/* Badge — Liquid Glass Dark Mode */
[data-theme="dark"] .hero-badge-glass {
    color: #93BBFD;
    background: linear-gradient(135deg, rgba(30,41,59,0.7) 0%, rgba(30,41,59,0.4) 50%, rgba(30,58,95,0.5) 100%);
    border: 1px solid rgba(96,165,250,0.2);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.3),
        0 2px 8px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.1),
        inset 0 -1px 0 rgba(255,255,255,0.05);
}
[data-theme="dark"] .hero-badge-glass::before {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

/* Hero Container - Two Column Layout */
.hero-container {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    gap: 60px;
}

/* Hero Left - Content */
.hero-left {
    flex: 1;
    max-width: 560px;
    text-align: left;
}

.hero-desc {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 420px;
}

/* Stats */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
}

.hero-stat {
    text-align: left;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563A0 0%, #3B82C4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Hero Right - Code Card */
.hero-right {
    flex: 1;
    max-width: 520px;
    position: relative;
}

/* Code Card - Light Mode (Default) */
.hero-code-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 10px 30px rgba(0,0,0,0.08),
        0 1px 0 rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.08);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.hero-code-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.hero-code-card:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
    box-shadow:
        0 8px 12px rgba(0,0,0,0.06),
        0 20px 50px rgba(0,0,0,0.12),
        0 1px 0 rgba(0,0,0,0.08);
    border-color: rgba(0,0,0,0.12);
}

.hero-code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 2;
}

.hero-code-dots {
    display: flex;
    gap: 8px;
}

.hero-code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.06);
}

.hero-code-dots span:nth-child(1) {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 1px 2px rgba(238,90,36,0.2);
}
.hero-code-dots span:nth-child(2) {
    background: linear-gradient(135deg, #ffd93d 0%, #f6b93b 100%);
    box-shadow: 0 1px 2px rgba(246,185,59,0.2);
}
.hero-code-dots span:nth-child(3) {
    background: linear-gradient(135deg, #6bff6b 0%, #26de81 100%);
    box-shadow: 0 1px 2px rgba(38,222,129,0.2);
}

.hero-code-title {
    font-size: 0.78rem;
    color: #9ca3af;
    font-family: var(--font-mono);
    letter-spacing: 0.02em;
    font-weight: 500;
}

.hero-code-body {
    padding: 24px;
    margin: 0;
    font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    color: #1f2937;
    overflow-x: auto;
    tab-size: 2;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.hero-code-body code {
    font-family: inherit;
}

/* Code syntax highlighting - Light Mode (GitHub Light) */
.code-keyword { color: #cf222e; font-weight: 600; }
.code-var { color: #0550ae; }
.code-key { color: #116329; }
.code-string { color: #0a3069; }
.code-fn { color: #953800; font-weight: 600; }
.code-param { color: #953800; }
.code-comment { color: #6e7781; font-style: italic; }

/* Code Card - Dark Mode */
[data-theme="dark"] .hero-code-card {
    background: linear-gradient(145deg, #1a1f2e 0%, #0d1117 100%);
    border-color: rgba(255,255,255,0.1);
    box-shadow:
        0 25px 60px rgba(0,0,0,0.5),
        0 10px 20px rgba(0,0,0,0.3),
        0 0 0 1px rgba(255,255,255,0.1);
}

[data-theme="dark"] .hero-code-card::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 50%);
}

[data-theme="dark"] .hero-code-card:hover {
    box-shadow:
        0 30px 70px rgba(0,0,0,0.6),
        0 15px 30px rgba(0,0,0,0.4),
        0 0 0 1px rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .hero-code-header {
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    border-bottom-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .hero-code-dots span {
    position: relative;
    border-color: transparent;
}

[data-theme="dark"] .hero-code-dots span::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
}

[data-theme="dark"] .hero-code-dots span:nth-child(1) {
    background: #ff5f57;
    box-shadow: 0 0 8px rgba(255,95,87,0.3);
}
[data-theme="dark"] .hero-code-dots span:nth-child(2) {
    background: #febc2e;
    box-shadow: 0 0 8px rgba(254,188,46,0.3);
}
[data-theme="dark"] .hero-code-dots span:nth-child(3) {
    background: #28c840;
    box-shadow: 0 0 8px rgba(40,200,64,0.3);
}

[data-theme="dark"] .hero-code-title {
    color: #6b7280;
}

[data-theme="dark"] .hero-code-body {
    color: #e6e6e6;
    background: transparent;
}

/* Code syntax highlighting - Dark Mode (One Dark) */
[data-theme="dark"] .code-keyword { color: #e06c75; }
[data-theme="dark"] .code-var { color: #61afef; }
[data-theme="dark"] .code-key { color: #98c379; }
[data-theme="dark"] .code-string { color: #98c379; }
[data-theme="dark"] .code-fn { color: #e5c07b; }
[data-theme="dark"] .code-param { color: #d19a66; }
[data-theme="dark"] .code-comment { color: #5c6370; font-style: italic; }

/* Floating tech badges */
.hero-tech-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(37,99,160,0.15);
    border-radius: 100px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-size: 0.8rem;
    font-weight: 600;
    color: #1E293B;
    backdrop-filter: blur(10px);
    animation: floatBadge 3s ease-in-out infinite;
}

.hero-tech-badge svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
}

.hero-tech-1 {
    top: -10px;
    right: -20px;
    animation-delay: 0s;
}

.hero-tech-2 {
    bottom: 40px;
    left: -30px;
    animation-delay: 1.5s;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Title — gradient text with depth */
.hero-title {
    font-size: 4.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    line-height: 1.05;
    background: linear-gradient(135deg, #0F172A 0%, #1E40AF 50%, #3B82C4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-subtitle-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
    height: 3.6em;
    overflow: hidden;
}
.hero-subtitle { word-break: break-word; overflow-wrap: break-word; font-size: 1.15rem; color: #475569; font-family: var(--font-mono);
    line-height: 1.6;
}
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1.15em;
    background: #F59E0B;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: cursorBreath 1.2s ease-in-out infinite;
}
@keyframes cursorBreath { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 48px;
}
.hero-stat {
    text-align: left;
}
.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2563A0 0%, #3B82C4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
}

/* Floating decorative elements */
.hero-float {
    position: absolute;
    z-index: 1;
    pointer-events: none;
    opacity: 0.15;
}
.hero-float-1 {
    top: 15%;
    left: 8%;
    width: 80px;
    height: 80px;
    border: 2px solid #3B82C4;
    border-radius: 50%;
    animation: float1 8s ease-in-out infinite;
}
.hero-float-2 {
    bottom: 20%;
    right: 10%;
    width: 60px;
    height: 60px;
    border: 2px solid #F59E0B;
    transform: rotate(45deg);
    animation: float2 10s ease-in-out infinite;
}
.hero-float-3 {
    top: 25%;
    right: 15%;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3B82C4 0%, #2563A0 100%);
    border-radius: 8px;
    animation: float3 6s ease-in-out infinite;
}
@keyframes float1 {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}
@keyframes float2 {
    0%, 100% { transform: rotate(45deg) translateY(0); }
    50% { transform: rotate(45deg) translateY(-15px); }
}
@keyframes float3 {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-25px) scale(1.1); }
}

/* Hero-specific button overrides */
/* Hero Buttons */
.hero .btn {
    padding: 14px 32px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 12px;
    letter-spacing: 0;
    position: relative;
    overflow: hidden;
}

.hero .btn-primary {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #1E40AF 100%);
    color: #fff;
    border: none;
    box-shadow:
        0 4px 16px rgba(37,99,235,0.3),
        0 1px 3px rgba(37,99,235,0.2),
        inset 0 1px 0 rgba(255,255,255,0.15);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
    pointer-events: none;
}

.hero .btn-primary:hover {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    box-shadow:
        0 8px 24px rgba(37,99,235,0.4),
        0 2px 8px rgba(37,99,235,0.3),
        inset 0 1px 0 rgba(255,255,255,0.2);
    transform: translateY(-2px);
    color: #fff;
}

.hero .btn-primary:active {
    transform: translateY(0);
    box-shadow:
        0 2px 8px rgba(37,99,235,0.3),
        0 1px 2px rgba(37,99,235,0.2);
}

.hero .btn-outline {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(8px);
    color: #334155;
    border: 1.5px solid rgba(148,163,184,0.3);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero .btn-outline:hover {
    background: rgba(255,255,255,0.9);
    color: #0F172A;
    border-color: rgba(37,99,235,0.3);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.hero .btn-outline:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: fadeInUp 0.5s ease-out 0.5s both;
}
.hero-scroll-arrow {
    display: block;
    width: 18px;
    height: 18px;
    border-right: 1.5px solid rgba(71,85,105,0.35);
    border-bottom: 1.5px solid rgba(71,85,105,0.35);
    transform: rotate(45deg);
    animation: scrollBounce 2.4s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: rotate(45deg) translateY(0); opacity: 0.35; }
    50% { transform: rotate(45deg) translateY(6px); opacity: 0.75; }
}

/* Hide deprecated hero elements */
.hero-glow { display: none; }
.hero-rings { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 24px; font-size: 0.9375rem; font-weight: 600; font-family: var(--font); border: 1.5px solid transparent; border-radius: var(--radius); cursor: pointer; transition: all var(--t); white-space: nowrap; line-height: 1.4; letter-spacing: -0.01em; }
.btn-primary { background: linear-gradient(135deg, var(--primary) 0%, #1D4ED8 100%); color: #fff; border-color: transparent; box-shadow: 0 2px 8px rgba(37,99,160,0.15); }
.btn-primary:hover { background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%); border-color: transparent; box-shadow: 0 6px 24px rgba(37,99,160,0.30); transform: translateY(-1px); color: #fff; }
.btn-outline { background: var(--surface); color: var(--primary); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-outline:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(37,99,160,0.08); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--border-light); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { background: #FEF2F2; border-color: var(--danger); }
.btn-sm { padding: 6px 14px; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 14px 32px; font-size: 1.0625rem; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: all 0.3s ease; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); border-color: rgba(37,99,160,0.25); }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card { padding: 36px 28px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); transition: all 0.3s ease; position: relative; }
.service-card::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius-lg); background: linear-gradient(180deg, rgba(37,99,160,0.03) 0%, transparent 50%); pointer-events: none; }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,160,0.25); }
.service-icon { width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 20px; border-radius: 18px; background: var(--primary-light); color: var(--primary); transition: all var(--t); }
.service-icon svg { width: 32px; height: 32px; stroke-width: 2; }
.service-card:hover .service-icon { transform: scale(1.05); box-shadow: 0 4px 12px rgba(37,99,160,0.12); }
.service-card .service-title, .service-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.service-card .service-desc, .service-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; }

/* Advantages */
.advantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.adv-card, .advantage-card {
    padding: 44px 36px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: all var(--t-slow);
    position: relative;
    overflow: hidden;
}
.adv-card::after, .advantage-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37,99,160,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 1px;
}
.adv-card:hover, .advantage-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: rgba(37,99,160,0.2); }
.adv-card:hover::after, .advantage-card:hover::after { opacity: 1; }
.adv-icon, .advantage-icon { width: 60px; height: 60px; margin: 0 auto 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--primary-light); color: var(--primary); transition: all var(--t); }
.adv-card:hover .adv-icon, .advantage-card:hover .advantage-icon { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(37,99,160,0.06); }
.adv-card h3, .advantage-card h3, .advantage-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.adv-card p, .advantage-card p { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.7; }

/* Projects */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.project-card { background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.3s ease; display: flex; flex-direction: column; color: var(--text); }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,160,0.25); color: var(--text); }
.project-card-img, .project-image { width: 100%; height: 200px; object-fit: cover; background: var(--border-light); overflow: hidden; flex-shrink: 0; transition: transform 0.4s ease; }
.project-card:hover .project-card-img img, .project-card:hover .project-image img { transform: scale(1.04); }
.project-card-img img, .project-image img { transition: transform 0.4s ease; }
.project-card-img.img-placeholder, .project-image.img-placeholder { height: 200px; }
.project-card-img.img-placeholder svg, .project-image.img-placeholder svg { width: 100%; height: 100%; }
.project-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.project-card-body h3, .project-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 8px; letter-spacing: -0.01em; }
.project-card-body p, .project-card p { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; margin-bottom: 16px; flex: 1; }
.tech-tags, .project-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag, .project-tag { display: inline-block; padding: 3px 12px; font-size: 0.75rem; font-family: var(--font-mono); font-weight: 500;
    color: var(--primary);
    background: var(--primary-light);
    border-radius: var(--radius-full);
    border: 1px solid rgba(37,99,160,0.08);
}

/* News List (compact - homepage) */
.news-list-compact { display: flex; flex-direction: column; gap: 2px; max-width: 900px; margin: 0 auto; }
.news-item-compact { display: flex; align-items: baseline; gap: 20px; padding: 14px 20px; border-radius: var(--radius); transition: all var(--t); text-decoration: none; color: inherit; border: 1px solid transparent; }
.news-item-compact:hover { background: var(--primary-light); border-color: rgba(37,99,160,0.12); }
.news-date-compact { font-size: 0.85rem; color: var(--text-muted); white-space: nowrap; font-family: var(--font-mono); min-width: 90px; }
.news-title-compact { font-size: 0.95rem; font-weight: 600; color: var(--text); flex: 1; letter-spacing: -0.01em; }

/* News List (full - news page) */
.news-page-list { display: flex; flex-direction: column; gap: 20px; }
.news-card { display: grid; grid-template-columns: 200px 1fr; gap: 24px; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); transition: all 0.3s ease; }
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,160,0.2); }
.news-card-img, .news-thumb { width: 200px; height: 150px; object-fit: cover; background: var(--border-light); flex-shrink: 0; overflow: hidden; }
.news-card-img.img-placeholder, .news-thumb.img-placeholder { height: 150px; }
.news-card-img.img-placeholder svg, .news-thumb.img-placeholder svg { width: 100%; height: 100%; }
.news-card-img img, .news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card-body { padding: 20px 20px 20px 0; display: flex; flex-direction: column; justify-content: center; }
.news-card-body h3, .news-title { font-size: 1.125rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.news-card-body h3 a, .news-title a { color: var(--text); }
.news-card-body h3 a:hover, .news-title a:hover { color: var(--primary); }
.news-card-meta, .news-date { font-size: 0.8125rem; color: var(--text-muted); font-family: var(--font-mono); margin-bottom: 8px; }
.news-card-summary, .news-summary { color: var(--text-secondary); font-size: 0.9375rem; line-height: 1.6; }
.news-list { display: flex; flex-direction: column; gap: 16px; }
.news-item { display: flex; gap: 20px; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all 0.25s ease; }
.news-item:hover { box-shadow: var(--shadow-md); border-color: rgba(59,130,196,0.2); }

/* News Detail */
.news-detail { max-width: 800px; margin: 0 auto; }
.news-detail-meta { text-align: center; margin-bottom: 32px; color: var(--text-muted); font-family: var(--font-mono); font-size: 0.875rem; }
.news-detail-cover { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; }
.news-detail-cover img { width: 100%; height: auto; display: block; }
.news-detail .content, .news-detail .detail-body { line-height: 1.85; font-size: 1.0625rem; }
.news-detail .content p, .news-detail .detail-body p { margin-bottom: 16px; }
.news-detail .content ul, .news-detail .content ol, .news-detail .detail-body ul, .news-detail .detail-body ol { margin-bottom: 16px; padding-left: 24px; }
.news-detail .content li, .news-detail .detail-body li { margin-bottom: 6px; list-style: disc; }

/* Partners */
.partners-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; align-items: center; }
.partner-item, .partner-logo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; min-height: 88px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all 0.3s ease; }
.partner-item:hover, .partner-logo:hover { border-color: rgba(37,99,160,0.3); box-shadow: var(--shadow-glow); transform: translateY(-2px); }
.partner-item img, .partner-logo img { max-height: 44px; max-width: 100%; filter: grayscale(100%); opacity: 0.6; transition: all 0.3s ease; }
.partner-item:hover img, .partner-logo:hover img { filter: grayscale(0%); opacity: 1; }
.partner-item .img-placeholder, .partner-logo .img-placeholder { width: 100%; height: 100%; }
.partner-item a { display: flex; flex-direction: column; align-items: center; gap: 8px; text-decoration: none; color: inherit; width: 100%; }
.partner-name { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); text-align: center; margin-top: 4px; }

/* Contact */
.contact-cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-page-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; }
.contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-detail-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-sm); }
.contact-detail-card h3 { margin-bottom: 16px; font-size: 1.2rem; font-weight: 700; }
.contact-detail-item { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.contact-detail-item + .contact-detail-item { border-top: 1px solid var(--border); }
.contact-detail-item svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.contact-detail-item strong { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 2px; }
.contact-detail-item span { font-size: 0.95rem; color: var(--text-secondary); }
.contact-info-list { display: flex; flex-direction: column; gap: 24px; }
.contact-info-item { display: flex; align-items: flex-start; gap: 14px; font-size: 1rem; color: var(--text-secondary); padding: 4px 0; }
.contact-info-item svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.contact-info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }
.contact-info-card-title { font-size: 1.25rem; font-weight: 700; margin: 0 0 20px; letter-spacing: -0.01em; }
.contact-form-card, .contact-form-wrapper { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow); }

.contact-form-card h3, .contact-form-wrapper h3 { margin-bottom: 24px; font-size: 1.25rem; font-weight: 700; }
.contact-form, .contact-form-wrapper form { margin-top: 0; }
.map-placeholder { margin-top: 24px; border-radius: var(--radius); background: var(--border-light); border: 2px dashed var(--border); display: flex; align-items: center; justify-content: center; height: 200px; color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-input, .form-textarea, .form-select { width: 100%; padding: 12px 16px; font-size: 0.9375rem; font-family: var(--font); color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius); transition: all var(--t); outline: none; }
.form-input:focus, .form-textarea:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,160,0.08); background: #FAFBFC; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: 0.8125rem; color: var(--text-muted); margin-top: 4px; }
.form-inline { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 12px; align-items: end; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-feedback { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9375rem; margin-bottom: 20px; }
.form-feedback.success, .form-success, .alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-feedback.error, .alert-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9375rem; margin-bottom: 16px; }
.alert-info { background: #EFF6FF; color: #1E40AF; border: 1px solid #BFDBFE; }
.checkbox-label { display: inline-flex; align-items: center; gap: 8px; font-size: 0.875rem; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }

/* Team */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.team-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 36px 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); transition: all 0.3s ease; }
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(37,99,160,0.25); }
.team-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 3px solid var(--primary-light); overflow: hidden; flex-shrink: 0; transition: all var(--t); }
.team-card:hover .team-avatar { border-color: var(--primary); box-shadow: 0 0 0 6px rgba(37,99,160,0.08); }
.team-avatar.img-placeholder svg { width: 100%; height: 100%; }
.team-name, .team-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 2px; }
.team-position { font-size: 0.875rem; color: var(--primary); font-weight: 500; margin-bottom: 12px; }
.team-bio { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; flex: 1; }
.team-email { font-size: 0.8125rem; font-family: var(--font-mono); word-break: break-all; margin-top: auto; padding-top: 12px; display: block; color: var(--text-secondary); }
.team-email:hover { color: var(--primary); }
.team-socials { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }
.team-socials a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--border-light); color: var(--text-secondary); transition: all var(--t); }
.team-socials a:hover { background: var(--primary); color: #fff; }
.team-socials svg { width: 18px; height: 18px; }
.social-link { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--border-light); color: var(--text-secondary); transition: all var(--t); }
.social-link:hover { background: var(--primary); color: #fff; }
.social-link svg { width: 18px; height: 18px; }

/* About */
.about-intro { max-width: 800px; margin: 0 auto 64px; text-align: center; font-size: 1.125rem; color: var(--text-secondary); line-height: 1.8; }
.about-content { max-width: 800px; margin: 0 auto; }
.about-content p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 16px; font-size: 1.0625rem; }

/* Project Detail */
.detail-hero { padding: 120px 0 48px; text-align: center; }
.detail-hero .project-image { width: 100%; max-width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 24px; }
.detail-hero .project-image.img-placeholder { max-height: 300px; }
.detail-hero .project-image.img-placeholder svg { width: 100%; height: auto; max-height: 300px; }
.detail-content { max-width: 800px; margin: 0 auto; padding-bottom: 80px; }
.detail-content h1 { font-size: 2rem; margin-bottom: 12px; }
.detail-content .tech-tags, .detail-content .project-tags { justify-content: center; margin-bottom: 32px; }
.detail-content .description { line-height: 1.8; color: var(--text-secondary); margin-bottom: 32px; }
.project-detail-hero { position: relative; min-height: 360px; display: flex; align-items: flex-end; background: var(--border-light); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 32px; }
.project-detail-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.project-detail-hero-overlay { position: relative; z-index: 2; padding: 48px; background: linear-gradient(transparent, rgba(0,0,0,0.6)); color: #fff; width: 100%; }
.project-detail-hero-overlay h1 { font-size: 2rem; font-weight: 700; color: #fff; }
.project-detail-content { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; min-width: 0; }
.project-detail-content > * { min-width: 0; }
.project-detail-content h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.project-detail-content .description { font-size: 1rem; color: var(--text-secondary); line-height: 1.8; word-break: break-word; overflow-wrap: break-word; overflow: hidden; }
.project-detail-content .description pre,
.project-detail-content .description code { display: block; max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-all; overflow-wrap: break-word; }
.project-detail-content .description table { display: block; max-width: 100%; overflow-x: auto; word-break: break-word; }
.project-detail-content .description img { max-width: 100%; height: auto; }
.project-detail-sidebar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.screenshots-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 32px 0; }
.screenshot-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.screenshot-item img { width: 100%; height: 240px; object-fit: cover; }

/* Back link */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 0.9375rem; margin-bottom: 24px; transition: color var(--t); }
.back-link:hover { color: var(--primary); }

/* Badges */
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; font-size: 0.6875rem; font-weight: 600; color: #fff; background: var(--danger); border-radius: 99px; margin-left: auto; }
.pinned-badge, .badge-pinned { display: inline-block; padding: 2px 10px; background: #FEF3C7; color: #92400E; border-radius: 20px; font-size: 0.8rem; font-weight: 600; }
.status-badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 0.75rem; font-weight: 500; }
.status-visible { background: #ECFDF5; color: #065F46; }
.status-hidden { background: #F1F5F9; color: var(--text-secondary); }
.status-read { background: #F1F5F9; color: var(--text-secondary); }
.status-unread { background: #EFF6FF; color: var(--primary); }

/* Pagination */
.pagination { margin-top: 48px; }
.pagination ul { display: flex; justify-content: center; gap: 6px; }
.pagination li a, .pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; height: 38px; padding: 0 8px; font-size: 0.875rem; font-weight: 600; color: var(--text-secondary); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); transition: all var(--t); }
.pagination li a:hover, .pagination a:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.pagination li.active a, .pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 2px 8px rgba(37,99,160,0.2); }
.pagination li.disabled span { opacity: 0.35; cursor: not-allowed; }
.pagination li.ellipsis span { border-color: transparent; background: transparent; color: var(--text-muted); min-width: auto; padding: 0 2px; }

/* Image placeholder */
.img-placeholder { display: flex; align-items: center; justify-content: center; background: var(--border-light); color: var(--text-muted); border-radius: var(--radius); overflow: hidden; max-width: 100%; }
.img-placeholder svg { max-width: 100%; height: auto; }
.img-placeholder svg { max-width: 100%; height: auto; }

/* Empty / Not Found */
[data-theme="dark"] {
    --primary: #60A5FA;
    --primary-dark: #93BBFD;
    --primary-light: #1E3A5F;
    --accent: #7CB7EB;
    --bg: #0B1120;
    --surface: #1E293B;
    --text: #F1F5F9;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --border: #334155;
    --border-light: #1E293B;
    --footer-bg: #060B16;
    --footer-text: #94A3B8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.35);
    --shadow: 0 1px 3px rgba(0,0,0,0.45);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.55);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
    --shadow-glow: 0 4px 20px rgba(96,165,250,0.10);
}
[data-theme="dark"] body { background-image: none; }
[data-theme="dark"] .section-bg-alt { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .site-header { background: rgba(11,17,32,0.88); border-bottom-color: var(--border); }
[data-theme="dark"] .site-header.scrolled { background: rgba(11,17,32,0.95); }
[data-theme="dark"] .project-card,
[data-theme="dark"] .service-card,
[data-theme="dark"] .adv-card,
[data-theme="dark"] .news-item-compact,
[data-theme="dark"] .partner-item,
[data-theme="dark"] .contact-info-card,
[data-theme="dark"] .contact-form-wrapper,
[data-theme="dark"] .contact-form-card,
[data-theme="dark"] .team-card,
[data-theme="dark"] .news-card { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea { background: var(--bg); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus { background: var(--bg); }
[data-theme="dark"] .btn-outline { border-color: var(--border); color: var(--text-secondary); background: var(--surface); }
[data-theme="dark"] .btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--surface); }
[data-theme="dark"] .news-date-compact { color: var(--text-muted); }
[data-theme="dark"] .tech-tag { background: var(--primary-light); color: var(--primary); border-color: rgba(96,165,250,0.12); }
[data-theme="dark"] .img-placeholder { background: var(--border) !important; }
[data-theme="dark"] .dot-grid { opacity: 0.4; }
[data-theme="dark"] .scanlines { background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.015) 2px, rgba(255,255,255,0.015) 4px); }
[data-theme="dark"] .section-label::before { background: var(--primary); }
/* Hero — dark mode: reverts to atmospheric dark with blue glow */
[data-theme="dark"] .hero, [data-theme="dark"] .hero-section { background: #080C14; }
[data-theme="dark"] .hero-grid {
    background-image:
        linear-gradient(60deg, rgba(96,165,250,0.07) 1px, transparent 1px),
        linear-gradient(-60deg, rgba(96,165,250,0.07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(96,165,250,0.05) 1px, transparent 1px);
}
[data-theme="dark"] .hero-grid-pulse { background: radial-gradient(circle, rgba(96,165,250,0.08) 0%, rgba(96,165,250,0.03) 35%, transparent 65%); }
[data-theme="dark"] .hero-ambient-core { background: radial-gradient(circle, rgba(96,165,250,0.20) 0%, rgba(96,165,250,0.06) 30%, transparent 68%); }
[data-theme="dark"] .hero-ambient-ring.ring-1 { border-color: rgba(96,165,250,0.12); }
[data-theme="dark"] .hero-ambient-ring.ring-2 { border-color: rgba(245,158,11,0.07); }
[data-theme="dark"] .hero-circuit { opacity: 0.16; color: #60A5FA; }
[data-theme="dark"] .hero-badge { color: #60A5FA; background: rgba(96,165,250,0.06); border-color: rgba(96,165,250,0.16); }
[data-theme="dark"] .hero-title {
    background: linear-gradient(135deg, #F1F5F9 0%, #60A5FA 50%, #93BBFD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}
[data-theme="dark"] .hero-subtitle { color: #94A3B8; }
[data-theme="dark"] .hero-stat-value {
    background: linear-gradient(135deg, #60A5FA 0%, #93BBFD 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="dark"] .hero .btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    box-shadow:
        0 4px 16px rgba(59,130,246,0.35),
        0 1px 3px rgba(59,130,246,0.25),
        inset 0 1px 0 rgba(255,255,255,0.1);
}
[data-theme="dark"] .hero .btn-primary:hover {
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 50%, #2563EB 100%);
    box-shadow:
        0 8px 24px rgba(59,130,246,0.45),
        0 2px 8px rgba(59,130,246,0.35),
        inset 0 1px 0 rgba(255,255,255,0.15);
}
[data-theme="dark"] .hero .btn-outline {
    color: #94A3B8;
    border-color: rgba(148,163,184,0.2);
    background: rgba(30,41,59,0.5);
    backdrop-filter: blur(8px);
}
[data-theme="dark"] .hero .btn-outline:hover {
    color: #F1F5F9;
    border-color: rgba(96,165,250,0.3);
    background: rgba(30,41,59,0.8);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
[data-theme="dark"] .hero-scroll-arrow { border-color: rgba(148,163,184,0.35); }
.theme-toggle {
    background: none; border: 1px solid var(--border); border-radius: var(--radius);
    width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: var(--text-secondary); transition: all var(--t); font-size: 1.1rem; position: relative; margin-left: 12px;
}
.header-actions { display: flex; align-items: center; gap: 0; }
.lang-switch { display: flex; align-items: center; gap: 2px; font-size: 0.82rem; font-weight: 500; margin-right: 10px; }
.lang-switch a { color: var(--text-secondary); text-decoration: none; padding: 2px 6px; border-radius: 4px; transition: all var(--t); }
.lang-switch a:hover { color: var(--primary); background: var(--primary-light); }
.lang-switch a.active { color: var(--primary); font-weight: 700; }
.lang-switch span { color: var(--border); user-select: none; }
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.theme-toggle svg { width: 20px; height: 20px; display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
@media (max-width: 767px) {
    .theme-toggle { width: 36px; height: 36px; border: none; margin-left: 0; }
}

.empty-state { text-align: center; padding: 80px 20px; color: var(--text-muted); }
.empty-state h2 { font-size: 1.5rem; margin-bottom: 12px; }
.empty-state p { margin-bottom: 16px; }
.not-found { text-align: center; padding: 160px 0 120px; }
.not-found h1 { font-size: 6rem; font-weight: 800; font-family: var(--font-mono); color: var(--primary); margin-bottom: 8px; }
.not-found p { color: var(--text-secondary); font-size: 1.125rem; margin-bottom: 32px; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 64px 0 0; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 56px; }
.footer-col h4 { color: #fff; font-size: 1.0625rem; font-weight: 700; margin-bottom: 20px; letter-spacing: -0.01em; }
.footer-col a, .footer-col p { display: block; color: var(--footer-text); font-size: 0.9375rem; margin-bottom: 10px; line-height: 1.6; transition: color var(--t); }
.footer-col a:hover { color: #fff; }
.footer-desc { line-height: 1.7 !important; }
.footer-bottom { margin-top: 48px; padding: 24px 0; border-top: 1px solid rgba(255,255,255,0.06); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 0.8125rem; }
.footer-icp { color: var(--footer-text); }

/* =============================================
   RESPONSIVE - Tablet (768px - 1023px)
   ============================================= */
@media (max-width: 1023px) {
    h1 { font-size: 2.25rem; } h2 { font-size: 1.75rem; }
    .hero-title { font-size: 2.5rem; }
    .hero, .hero-section { padding: 140px 0 100px; }

    .hero-container {
        flex-direction: column;
        gap: 40px;
        padding: 0 24px;
    }

    .hero-left {
        max-width: 100%;
    }

    .hero-right {
        max-width: 100%;
    }

    .hero-code-card {
        transform: none;
    }

    .hero-tech-1 {
        right: 10px;
        top: -15px;
    }

    .hero-tech-2 {
        left: 10px;
        bottom: 20px;
    }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .advantages-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .partners-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-section, .contact-cta-grid, .contact-page-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .news-card { grid-template-columns: 140px 1fr; }
    .news-card-img, .news-card .news-thumb { width: 140px; height: 120px; }
    .project-detail-content { grid-template-columns: 1fr; }
    .screenshots-gallery { grid-template-columns: 1fr; }
    .section { padding: 72px 0; }
    .page-hero { padding: 100px 0 48px; }
    .page-hero h1 { font-size: 2.25rem; }
    .hero-docs-card { max-width: 100%; }
}

/* =============================================
   RESPONSIVE - Mobile (< 768px)
   ============================================= */
@media (max-width: 767px) {
    .mobile-toggle { display: flex; }
    .main-nav { position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); padding: 12px 16px; gap: 2px; transform: translateY(calc(-100% - var(--header-h))); transition: transform 0.3s ease; z-index: 999; }
    .main-nav.active, .main-nav.open { transform: translateY(0); }
    .nav-link { width: 100%; padding: 12px 16px; border-radius: var(--radius); }
    .nav-link::after { display: none; }

    .hero-container {
        flex-direction: column;
        padding: 0 20px;
        gap: 40px;
    }

    .hero-left {
        max-width: 100%;
        text-align: center;
    }

    .hero-right {
        display: none;
    }

    .hero-desc {
        display: none;
    }

    .hero-badge-glass {
        padding: 8px 18px;
        font-size: 0.7rem;
        letter-spacing: 1px;
        margin-bottom: 20px;
    }
    .hero-title { font-size: 2.5rem; letter-spacing: 0.02em; }
    .hero-subtitle { font-size: 0.95rem; word-break: break-word; overflow-wrap: break-word; }
    .hero-subtitle-wrap { height: 4.8em; margin-bottom: 24px; justify-content: center; overflow: hidden; }
    .hero, .hero-section { min-height: 100vh; min-height: 100dvh; }
    .hero-ambient-core { width: 220px; height: 220px; }
    .hero-ambient-ring.ring-1 { width: 300px; height: 300px; }
    .hero-ambient-ring.ring-2 { width: 380px; height: 380px; }

    /* Mobile button styles */
    .hero .btn {
        padding: 14px 32px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 0.9375rem;
        min-height: 48px;
        width: 240px;
    }
    .hero .btn-primary {
        background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 50%, #1E40AF 100%);
        color: #fff;
        border: none;
        box-shadow:
            0 4px 16px rgba(37,99,235,0.3),
            0 1px 3px rgba(37,99,235,0.2),
            inset 0 1px 0 rgba(255,255,255,0.15);
    }
    .hero .btn-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 50%;
        background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 100%);
        pointer-events: none;
        border-radius: 12px 12px 0 0;
    }
    .hero .btn-outline {
        background: rgba(255,255,255,0.8);
        color: #334155;
        border: 1.5px solid rgba(148,163,184,0.3);
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    /* Dark mode mobile buttons */
    [data-theme="dark"] .hero .btn-primary {
        background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
        box-shadow:
            0 4px 16px rgba(59,130,246,0.35),
            0 1px 3px rgba(59,130,246,0.25),
            inset 0 1px 0 rgba(255,255,255,0.1);
    }
    [data-theme="dark"] .hero .btn-outline {
        background: rgba(30,41,59,0.7);
        color: #94A3B8;
        border-color: rgba(148,163,184,0.2);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    .hero-stats {
        justify-content: center;
        gap: 24px;
        margin-top: 40px;
    }
    .hero-stat {
        text-align: center;
    }
    .hero-stat-value { font-size: 1.5rem; }
    .hero-stat-label { font-size: 0.75rem; }
    .hero-float { display: none; }

    .section { padding: 56px 0; }
    .section-header { margin-bottom: 40px; }
    .section-title { font-size: 1.625rem; }
    .section-subtitle, .section-desc { font-size: 1rem; }
    .section-footer { margin-top: 36px; }

    .services-grid, .projects-grid, .advantages-grid, .team-grid { grid-template-columns: 1fr; gap: 20px; }
    .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .service-card, .adv-card, .team-card { padding: 28px 20px; }
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
    .contact-section, .contact-cta-grid, .contact-page-grid { grid-template-columns: 1fr; gap: 32px; }
    .contact-form-card, .contact-form-wrapper, .contact-info-card { padding: 24px; }

    .news-card { grid-template-columns: 1fr; }
    .news-card-img, .news-card .news-thumb { width: 100%; height: 180px; }
    .news-card-body { padding: 20px; }

    .detail-hero { padding: 100px 0 32px; }
    .detail-content h1 { font-size: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .not-found h1 { font-size: 4rem; }
    .page-hero { padding: 90px 0 40px; }
    .page-hero h1 { font-size: 2rem; }
    .hero-docs-card { flex-direction: column; text-align: center; gap: 14px; padding: 20px 24px; }
    .hero-docs-card .btn { width: 100%; }
    .form-inline { grid-template-columns: 1fr; }

    /* Project detail mobile */
    .project-detail-hero { min-height: 220px; }
    .project-detail-hero-overlay { padding: 24px; }
    .project-detail-hero-overlay h1 { font-size: 1.25rem; }
    .project-detail-content { grid-template-columns: 1fr; gap: 24px; min-width: 0; }
    .project-detail-content > * { min-width: 0; }
    .project-detail-content .description { word-break: break-word; overflow-wrap: break-word; overflow: hidden; }
    .project-detail-content .description pre,
    .project-detail-content .description code { display: block; max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-all; overflow-wrap: break-word; }
    .project-detail-content .description table { display: block; max-width: 100%; overflow-x: auto; word-break: break-word; }
    .project-detail-content .description img { max-width: 100%; height: auto; }
    .project-detail-sidebar { max-width: 100%; min-width: 0; overflow: hidden; }
    .screenshots-gallery { grid-template-columns: 1fr; }
    .container { padding: 0 16px; }
}
