/* ============================================
   QnMax 趣诺科技 - 主样式表
   液态玻璃风格 · 蓝色调 · Glassmorphism
   ============================================ */

/* ----- CSS Variables ----- */
:root {
    --bg: #0a0e1a;
    --bg-light: #111827;
    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);
    --glass-active: rgba(255, 255, 255, 0.12);
    --blue-primary: #3b82f6;
    --blue-light: #60a5fa;
    --blue-dark: #1d4ed8;
    --blue-glow: rgba(59, 130, 246, 0.25);
    --cyan: #22d3ee;
    --cyan-glow: rgba(34, 211, 238, 0.2);
    --text: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 60px rgba(0, 0, 0, 0.4);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated background mesh */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(59, 130, 246, 0.08), transparent),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(34, 211, 238, 0.06), transparent),
        radial-gradient(ellipse 50% 40% at 50% 50%, rgba(59, 130, 246, 0.03), transparent);
    pointer-events: none;
}

/* Grid dots overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

a { color: var(--blue-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--cyan); }

img { max-width: 100%; height: auto; display: block; }

/* ----- Glass Card ----- */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.glass:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-lg), 0 0 40px var(--blue-glow);
    transform: translateY(-2px);
}

.glass-sm { border-radius: var(--radius-sm); }
.glass-lg { border-radius: var(--radius-lg); }

/* ----- Container ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm { max-width: 900px; }
.container-xs { max-width: 640px; }

/* ----- Navigation ----- */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 48px);
    max-width: 1200px;
    background: rgba(10, 14, 26, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 14, 26, 0.9);
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.nav-brand .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue-primary), var(--cyan));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    padding: 10px 20px;
    border-radius: 100px;
    color: var(--text-secondary);
    font-size: 0.925rem;
    font-weight: 500;
    transition: var(--transition);
    display: block;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: var(--glass-hover);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px 16px;
}

/* ----- Hero Section ----- */
.hero {
    padding: 160px 0 100px;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--cyan);
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #93c5fd 50%, var(--cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary), var(--blue-dark));
    color: #fff;
    box-shadow: 0 4px 20px var(--blue-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--blue-primary);
    background: rgba(59, 130, 246, 0.1);
    color: #fff;
}

.btn-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: var(--glass-hover);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ----- Section ----- */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--blue-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* ----- Stats ----- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: -40px;
}

.stat-card {
    text-align: center;
    padding: 32px 20px;
}

.stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--blue-light), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
}

/* ----- Projects Grid ----- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 28px;
}

.project-card {
    overflow: hidden;
}

.project-card .card-img {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(34,211,238,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.project-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card .card-img .icon-placeholder {
    color: var(--blue-light);
    opacity: 0.6;
}

.project-card .card-body {
    padding: 24px;
}

.project-card .card-category {
    font-size: 0.8rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.project-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card .card-desc {
    color: var(--text-secondary);
    font-size: 0.925rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card .card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.tag {
    padding: 3px 10px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 6px;
    font-size: 0.78rem;
    color: var(--blue-light);
}

/* ----- Team Grid ----- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.team-card {
    text-align: center;
    padding: 36px 24px;
}

.team-card .avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--blue-primary), var(--cyan));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
    font-weight: 700;
    border: 3px solid rgba(255,255,255,0.1);
}

.team-card .avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.team-card .name {
    font-size: 1.15rem;
    font-weight: 600;
}

.team-card .title {
    color: var(--blue-light);
    font-size: 0.875rem;
    margin: 4px 0 12px;
}

.team-card .bio {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.team-card .skills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 14px;
}

/* ----- Jobs List ----- */
.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-card {
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.job-card .job-info { flex: 1; }

.job-card .job-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.job-card .job-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.job-card .job-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.job-detail-header {
    padding: 40px;
    margin-bottom: 32px;
}

.job-detail-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.job-detail-header .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.job-detail-content {
    padding: 40px;
}

.job-detail-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 28px 0 12px;
    color: var(--blue-light);
}

.job-detail-content ul {
    padding-left: 20px;
}

.job-detail-content li {
    color: var(--text-secondary);
    margin-bottom: 6px;
}

/* ----- Forms ----- */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px var(--blue-glow);
    background: rgba(255, 255, 255, 0.06);
}

.form-control::placeholder { color: var(--text-muted); }

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%2394a3b8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* ----- Page Banner ----- */
.page-banner {
    padding: 140px 0 60px;
    text-align: center;
}

.page-banner h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.page-banner p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ----- Footer ----- */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.footer-col a {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 4px 0;
}

.footer-col a:hover { color: #fff; }

.icp-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 24px;
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.icp-site-name { color: var(--text); }

.icp-link { color: var(--blue-light); }

.icp-link:hover { color: var(--cyan); }

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ----- Contact ----- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info {
    padding: 40px;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.contact-info p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}

.contact-item .icon {
    width: 44px;
    height: 44px;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item strong {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.contact-item span {
    color: var(--text);
}

/* ----- Toast / Alert ----- */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* ----- Back to top ----- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    font-size: 1.1rem;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--glass-hover);
    border-color: var(--blue-primary);
    box-shadow: 0 0 20px var(--blue-glow);
}

/* ----- Breadcrumb ----- */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb .sep { color: var(--text-muted); }

/* ----- Empty State ----- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state .icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ----- Animations ----- */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-up {
    animation: fadeUp 0.6s ease both;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .projects-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 16px;
        right: 16px;
        background: rgba(10, 14, 26, 0.95);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius);
        flex-direction: column;
        padding: 12px;
        backdrop-filter: blur(24px);
        display: none;
    }

    .nav-links.open { display: flex; }

    .nav-links a { border-radius: var(--radius-sm); }

    .nav-toggle { display: block; }

    .hero { padding: 120px 0 60px; }

    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .icp-card {
        flex-direction: column;
        gap: 6px;
        width: 100%;
        text-align: center;
    }
}

/* ----- Page-specific adjustments ----- */
.project-detail .content {
    padding: 40px;
    line-height: 1.9;
}

.project-detail .content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}
