/* ===== Reset & Global ===== */
*, *::before, *::after { box-sizing: border-box; }

:root {
    --bg: #080b12;
    --bg-card: rgba(255,255,255,0.025);
    --border: rgba(255,255,255,0.06);
    --text: #cbd5e1;
    --text-dim: #64748b;
    --accent: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}
main { flex: 1; }
a { color: #60a5fa; text-decoration: none; }
a:hover { color: #93bbfd; }

/* ===== Navbar ===== */
.navbar {
    background: rgba(8, 11, 18, 0.88) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.navbar-brand { letter-spacing: -0.5px; font-weight: 700; color: #fff !important; }
.nav-link { color: var(--text) !important; font-size: 0.9rem; }
.nav-link:hover { color: #fff !important; }

/* ===== Hero ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
#heroCanvas {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 50% 35%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 780px;
    padding: 0 1rem;
}
.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: 50px;
    color: #93bbfd;
    font-size: 0.8rem;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    background: rgba(59, 130, 246, 0.06);
    text-transform: uppercase;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}
.gradient-text {
    background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 40%, #60a5fa 80%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
}
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
.hero-sub {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}
.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
}
.btn-hero-primary {
    background: var(--accent);
    color: #fff !important;
    box-shadow: 0 4px 24px rgba(59, 130, 246, 0.35);
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.5);
    color: #fff !important;
}
.btn-hero-outline {
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text) !important;
    background: transparent;
}
.btn-hero-outline:hover {
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.04);
    color: #fff !important;
}
.btn-hero-light {
    background: #fff;
    color: #080b12 !important;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.btn-hero-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
}
.hero-scroll span {
    display: block;
    font-size: 0.65rem;
    color: #475569;
    letter-spacing: 3px;
    margin-bottom: 8px;
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, #475569, transparent);
    margin: 0 auto;
    animation: scrollLine 2s ease-in-out infinite;
}
@keyframes scrollLine {
    0%, 100% { transform: scaleY(1); transform-origin: top; }
    50% { transform: scaleY(0.3); transform-origin: top; }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Section Headers ===== */
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-tag {
    display: inline-block;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}
.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}
.section-sub {
    color: var(--text-dim);
    font-size: 0.95rem;
    max-width: 480px;
    margin: 0.5rem auto 0;
}

/* ===== Expertise Cards ===== */
.expertise-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.01) 50%, transparent 100%);
}
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

.exp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.75rem;
    transition: all 0.35s;
    position: relative;
    overflow: hidden;
}
.exp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glow, #3b82f6), transparent);
    opacity: 0;
    transition: opacity 0.35s;
}
.exp-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
}
.exp-card:hover::before { opacity: 1; }

.exp-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: color-mix(in srgb, var(--glow, #3b82f6) 12%, transparent);
    color: var(--glow, #3b82f6);
}
.exp-icon-wrap svg { width: 22px; height: 22px; }
.exp-card h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.exp-card p { color: #94a3b8; font-size: 0.85rem; line-height: 1.65; margin-bottom: 0.75rem; }
.exp-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.exp-tags span {
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(255,255,255,0.04);
    color: #94a3b8;
    font-size: 0.72rem;
    font-family: "SF Mono", "Fira Code", monospace;
}

/* ===== Stats ===== */
.stats-section {
    padding: 3rem 0;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.stats-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.stat-suffix { font-size: 1.6rem; font-weight: 700; color: var(--accent); }
.stat-label {
    display: block;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 2px;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.08);
}

/* ===== Tech Bars ===== */
.tech-section { padding: 5rem 0; }
.tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem 3rem;
    max-width: 750px;
    margin: 0 auto;
}
.tech-item { margin-bottom: 0.25rem; }
.tech-label {
    color: #e2e8f0;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.tech-bar {
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}
.tech-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
}
.tech-fill span {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
}

/* ===== Post Cards ===== */
.posts-section { padding: 5rem 0; }
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    height: 100%;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.post-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}
.post-card:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.12);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.post-card:hover .post-card-accent { opacity: 1; }
.post-card-body { padding: 1.5rem; position: relative; }
.post-card-date { font-size: 0.78rem; color: var(--text-dim); }
.post-card h3 { margin: 0.4rem 0; font-size: 1.05rem; font-weight: 700; }
.post-card h3 a { color: #e2e8f0; }
.post-card h3 a:hover { color: #60a5fa; }
.post-card p { color: #94a3b8; font-size: 0.88rem; line-height: 1.6; margin-bottom: 0.75rem; }
.post-card-tags span {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(59, 130, 246, 0.08);
    color: #60a5fa;
    font-size: 0.72rem;
    margin-right: 4px;
    margin-bottom: 4px;
}

/* ===== CTA ===== */
.cta-section {
    padding: 5rem 0;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-top: 1px solid rgba(255,255,255,0.04);
}
.cta-section h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.75rem;
}
.cta-section p {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 3rem 0; }
.empty-icon { font-size: 3rem; margin-bottom: 0.75rem; }
.empty-state p { color: var(--text-dim); font-size: 1rem; }

/* ===== Footer ===== */
footer {
    background: rgba(8, 11, 18, 0.98) !important;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: auto;
}

/* ===== Blog / About pages ===== */
.container.py-5 { max-width: 860px; }
.container.py-5 h1,
.container.py-5 h2,
.container.py-5 h3,
.container.py-5 h4 { color: #fff; }
.container.py-5 p,
.container.py-5 li { color: var(--text); }
.container.py-5 .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: #e2e8f0;
}
.container.py-5 .card .card-title { color: #fff; }
.container.py-5 .text-secondary { color: #94a3b8 !important; }
.container.py-5 .badge { font-weight: 500; }

/* ===== Post Content ===== */
.post-content { color: var(--text); }
.post-content img { max-width: 100%; border-radius: 8px; }
.post-content pre {
    background: rgba(255,255,255,0.04);
    padding: 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,0.06);
}
.post-content code {
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.88em;
    color: #e2e8f0;
}
.post-content pre code { background: none; padding: 0; }
.post-content table { width: 100%; border-collapse: collapse; }
.post-content th,
.post-content td { padding: 0.6rem; border: 1px solid rgba(255,255,255,0.08); }
.post-content th { background: rgba(255,255,255,0.03); }
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: #94a3b8;
    margin: 1.5rem 0;
}

/* ===== Admin Tables ===== */
.table { color: #e2e8f0; --bs-table-bg: transparent; }
.table code { font-size: 0.85em; color: #93bbfd; }
.table > :not(caption) > * > * {
    background: transparent;
    border-bottom-color: rgba(255,255,255,0.06);
}
.table-light {
    --bs-table-bg: rgba(255,255,255,0.03);
    border-bottom-color: rgba(255,255,255,0.08);
}
.table-light th { color: #94a3b8; font-weight: 600; }
.table-hover tbody tr:hover {
    --bs-table-bg-state: rgba(255,255,255,0.03);
    background: rgba(255,255,255,0.03);
}

/* ===== Admin Forms ===== */
.form-control,
.form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
}
.form-control:focus,
.form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.15);
}
.form-control::placeholder { color: #64748b; }
.form-text { color: #94a3b8; }

/* ===== Alerts ===== */
.alert { border: none; border-radius: 8px; }
.alert-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; }
.alert-success { background: rgba(16, 185, 129, 0.12); color: #6ee7b7; }
.alert-info { background: rgba(59, 130, 246, 0.12); color: #93bbfd; }
.alert .btn-close { filter: invert(1); }

/* ===== Pagination ===== */
.page-link {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
    color: #94a3b8;
}
.page-link:hover { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.15); }
.page-item.active .page-link {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.page-item.disabled .page-link {
    background: transparent;
    color: #334155;
    border-color: rgba(255,255,255,0.04);
}

/* ===== Modals ===== */
.modal-content {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.08);
    color: #e2e8f0;
    border-radius: 12px;
}
.modal-header { border-bottom: 1px solid rgba(255,255,255,0.06); }
.modal-footer { border-top: 1px solid rgba(255,255,255,0.06); }
.modal .btn-close { filter: invert(1); }

/* ===== Dropdown ===== */
.dropdown-menu {
    background: #111827;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    padding: 0.5rem 0;
}
.dropdown-item {
    color: #e2e8f0;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
}
.dropdown-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.dropdown-divider { border-color: rgba(255,255,255,0.06); margin: 0.25rem 0; }

/* ===== Badges ===== */
.badge.bg-secondary { background: rgba(255,255,255,0.08) !important; color: #94a3b8; }
.badge.bg-light { background: rgba(255,255,255,0.06) !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .expertise-grid { grid-template-columns: 1fr; }
    .tech-grid { grid-template-columns: 1fr; }
    .hero-sub br { display: none; }
    .stats-grid { gap: 1.5rem; }
    .stat-num { font-size: 2rem; }
    .stat-divider { display: none; }
    .hero-scroll { display: none; }
}

@media (max-width: 480px) {
    .hero-btns { flex-direction: column; align-items: center; }
    .btn-hero { width: 100%; max-width: 280px; justify-content: center; }
}
