/* ── CloudGuard Portfolio Revamp Styles ── */

/* ══════════════════════════════════════════
   1. NAVBAR FIX
   ══════════════════════════════════════════ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    height: 64px;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: 32px;
    width: auto;
}

.logo span {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    white-space: nowrap;
    font-family: 'Space Grotesk', sans-serif;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.05rem;
    flex-wrap: nowrap;
    flex: 1;
    justify-content: flex-end;
}

.nav-links a {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary, #cbd5e1);
    text-decoration: none;
    padding: 0.35rem 0.55rem;
    border-radius: 0.4rem;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    background: transparent !important;
    /* Override main.css bubble style */
    border-top: none;
    border-left: none;
    border-right: none;
}

.nav-links a:hover {
    color: var(--text-primary, #f1f5f9) !important;
    background: rgba(99, 102, 241, 0.08) !important;
    border-bottom-color: rgba(99, 102, 241, 0.4);
}

/* Active link: slim accent underline, no bubble */
.nav-links a.active {
    color: #fff !important;
    background: transparent !important;
    border-bottom: 2px solid var(--primary-color, #6366f1) !important;
    border-radius: 0 !important;
    font-weight: 600 !important;
    /* Kill main.css gradient bubble */
    background-image: none !important;
    box-shadow: none !important;
    padding: 0.35rem 0.55rem !important;
}

/* Book a Call nav button */
.nav-book-btn {
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6)) !important;
    color: #fff !important;
    padding: 0.4rem 0.9rem !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    font-size: 0.8rem !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0.35rem;
    transition: opacity 0.2s ease, transform 0.2s ease !important;
    margin-left: 0.25rem;
}

.nav-book-btn:hover {
    opacity: 0.88 !important;
    transform: translateY(-1px) !important;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6)) !important;
}

/* Hamburger toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.4rem;
    flex-shrink: 0;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary, #f1f5f9);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ══════════════════════════════════════════
   2. THEME PALETTE — LEFT SIDE (handled in theme-switcher.css)
   ══════════════════════════════════════════ */

/* Theme switcher is positioned on the left in theme-switcher.css */
@media (max-width: 480px) {
    .theme-switcher { left: 0.75rem !important; bottom: 4rem !important; }
}

/* ══════════════════════════════════════════
   3. CASE-STUDY-STYLE PROJECT CARDS
   ══════════════════════════════════════════ */

/* Force stats grid to always be 4 columns */
.stats-grid {
    grid-template-columns: repeat(4, 1fr) !important;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.cs-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 1rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    position: relative;
    overflow: hidden;
}

.cs-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cs-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.cs-card:hover::before { opacity: 1; }

.cs-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.cs-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-bottom: 0.35rem;
}

.cs-card-id {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted, #94a3b8);
    font-family: 'Space Grotesk', sans-serif;
}

.cs-card-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.cs-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.cs-badge.aws     { background: rgba(255,153,0,0.15); color: #FF9900; border: 1px solid rgba(255,153,0,0.3); }
.cs-badge.azure   { background: rgba(0,120,212,0.15); color: #4da6ff; border: 1px solid rgba(0,120,212,0.3); }
.cs-badge.gcp     { background: rgba(66,133,244,0.15); color: #6ba3f5; border: 1px solid rgba(66,133,244,0.3); }
.cs-badge.oci     { background: rgba(248,0,0,0.12); color: #ff6666; border: 1px solid rgba(248,0,0,0.25); }

.cs-badge.completed   { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.cs-badge.coming-soon { background: rgba(148,163,184,0.12); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }

.cs-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.35;
}

.cs-card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.6;
    flex: 1;
}

.cs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cs-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
    border-radius: 0.35rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--text-muted, #94a3b8);
    font-weight: 500;
}

.cs-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color, #334155);
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cs-cert {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.cs-cert i { color: var(--primary-color, #6366f1); }

.cs-view-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary-color, #6366f1);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: gap 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.cs-view-btn:hover {
    color: var(--secondary-color, #8b5cf6);
    gap: 0.55rem;
}

/* ══════════════════════════════════════════
   4. BOOKING SECTION
   ══════════════════════════════════════════ */

.booking-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(99,102,241,0.05) 0%, rgba(139,92,246,0.05) 50%, rgba(236,72,153,0.03) 100%);
    border-top: 1px solid var(--border-color, #334155);
    border-bottom: 1px solid var(--border-color, #334155);
}

.booking-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-color, #6366f1);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.booking-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin: 2.5rem 0;
}

.booking-service-card {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 1rem;
    padding: 2rem 1.75rem;
    position: relative;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.booking-service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.12);
}

.booking-service-card.featured {
    border-color: rgba(99, 102, 241, 0.5);
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(139,92,246,0.05));
}

.bsc-featured-label {
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.bsc-icon {
    width: 52px;
    height: 52px;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, rgba(99,102,241,0.2), rgba(139,92,246,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary-color, #6366f1);
    margin-bottom: 1.25rem;
}

.booking-service-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 0.75rem;
    font-family: 'Space Grotesk', sans-serif;
}

.booking-service-card p {
    font-size: 0.88rem;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.bsc-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.bsc-features li {
    font-size: 0.83rem;
    color: var(--text-secondary, #cbd5e1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bsc-features li i { color: #34d399; font-size: 0.75rem; flex-shrink: 0; }

.booking-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    background: var(--bg-card, #1e293b);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    flex-wrap: wrap;
}

.booking-cta-text h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin-bottom: 0.4rem;
    font-family: 'Space Grotesk', sans-serif;
}

.booking-cta-text p {
    font-size: 0.9rem;
    color: var(--text-secondary, #cbd5e1);
    max-width: 480px;
}

.booking-cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.btn-lg {
    padding: 0.85rem 1.75rem !important;
    font-size: 0.95rem !important;
}

/* ══════════════════════════════════════════
   5. FOOTER — Compact & Beautiful
   ══════════════════════════════════════════ */

.footer {
    background: #080e1c;
    border-top: 1px solid rgba(99,102,241,0.15);
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle top glow line */
.footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.5), rgba(139,92,246,0.4), transparent);
    pointer-events: none;
}

/* Main footer grid */
.footer-content {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1fr 1fr;
    gap: 2rem;
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid rgba(51,65,85,0.4);
}

/* Brand column heading */
.footer-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-section h3 img {
    height: 26px !important;
    width: auto !important;
    margin-right: 0 !important;
    border-radius: 4px;
}

/* Column headings */
.footer-section h4 {
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Space Grotesk', sans-serif;
}

/* Brand description */
.footer-section p {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 0.85rem;
}

/* Nav lists */
.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.footer-section ul li a {
    font-size: 0.82rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.footer-section ul li a i {
    width: 12px;
    font-size: 0.7rem;
    color: #334155;
    flex-shrink: 0;
}

.footer-section ul li a:hover {
    color: #a5b4fc;
    transform: translateX(3px);
}

/* Social icons */
.social-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-links a {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.8rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border-color: rgba(99,102,241,0.4);
}

/* Footer bottom bar */
.footer-bottom {
    padding: 0.85rem 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.75rem;
    color: #334155;
    margin: 0;
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-stats i {
    color: #6366f1;
    margin-right: 0.2rem;
    font-size: 0.7rem;
}

.footer-stats {
    font-size: 0.72rem;
    color: #334155;
}

/* ══════════════════════════════════════════
   6. RESPONSIVE — ALL DEVICE TYPES
   ══════════════════════════════════════════ */

/* Large desktop (1400px+) */
@media (min-width: 1400px) {
    .nav-container { padding: 0 2rem; }
    .nav-links a { font-size: 0.87rem; padding: 0.45rem 0.75rem; }
}

/* Tablet landscape (1024px - 1199px) */
@media (max-width: 1199px) {
    .nav-links a { font-size: 0.78rem; padding: 0.35rem 0.5rem; gap: 0.1rem; }
    .nav-book-btn { padding: 0.35rem 0.75rem !important; font-size: 0.76rem !important; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Tablet portrait (768px - 1023px) */
@media (max-width: 1023px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(10, 14, 26, 0.98);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem 1.5rem 1.5rem;
        border-bottom: 1px solid rgba(99, 102, 241, 0.2);
        gap: 0.25rem;
        z-index: 999;
    }

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

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.75rem 1rem;
        border-radius: 0.5rem;
        border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    }

    .nav-links a:last-child { border-bottom: none; }

    .nav-book-btn {
        margin-top: 0.5rem;
        justify-content: center;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
        border-radius: 0.5rem !important;
    }

    .nav-toggle { display: flex; }

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

    .booking-services { grid-template-columns: 1fr 1fr; }

    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Mobile (max 767px) */
@media (max-width: 767px) {
    .navbar { height: 60px; }
    .nav-container { height: 60px; padding: 0 1rem; }

    .logo span { font-size: 0.9rem; }
    .logo img { height: 28px; }

    .nav-links { top: 60px; padding: 0.75rem 1rem 1.25rem; }

    .projects-grid { grid-template-columns: 1fr; gap: 1rem; }

    .booking-services { grid-template-columns: 1fr; }

    .booking-cta {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .booking-cta-buttons {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }

    .booking-cta-buttons .btn { width: 100%; justify-content: center; }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-stats { justify-content: center; }

    .cs-card-top { flex-wrap: wrap; }
    .cs-card-badges { flex-direction: row; align-items: center; }

    .theme-switcher-widget {
        bottom: 4rem !important;
        left: 1rem !important;
    }

    .section-title { font-size: 1.6rem !important; }
}

/* Small mobile (max 480px) */
@media (max-width: 480px) {
    .nav-container { padding: 0 0.75rem; }
    .logo span { display: none; }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .booking-cta { padding: 1.25rem; }
}

/* ══════════════════════════════════════════
   FOOTER — footer-grid variant (project pages)
   ══════════════════════════════════════════ */
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(51,65,85,0.4);
    margin-bottom: 0;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.footer-logo img {
    height: 26px;
    width: auto;
    flex-shrink: 0;
    border-radius: 4px;
}

.footer-logo span {
    font-size: 0.9rem;
    font-weight: 700;
    color: #f1f5f9;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-brand p {
    font-size: 0.78rem;
    color: #475569;
    line-height: 1.5;
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 0.1rem;
}

.footer-social a {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.78rem;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.footer-social a:hover {
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border-color: rgba(99,102,241,0.4);
}

.footer-col h4 {
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.65rem;
    font-family: 'Space Grotesk', sans-serif;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.footer-col ul li a {
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-col ul li a:hover {
    color: #a5b4fc;
    transform: translateX(3px);
}

.footer-col ul li a i {
    width: 12px;
    font-size: 0.68rem;
    color: #334155;
    flex-shrink: 0;
}

.footer-bottom-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-bottom-stats span {
    font-size: 0.72rem;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-bottom-stats i {
    color: #6366f1;
    font-size: 0.68rem;
}

/* Responsive footer-grid */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .footer-bottom-stats { justify-content: center; }
}

/* ══════════════════════════════════════════
   FOUNDATION SECTION — REVAMPED
   ══════════════════════════════════════════ */

.foundation-section {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-primary, #0f172a) 0%, rgba(99,102,241,0.04) 50%, var(--bg-primary, #0f172a) 100%);
    border-top: 1px solid var(--border-color, #334155);
    border-bottom: 1px solid var(--border-color, #334155);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--primary-color, #6366f1);
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    margin-bottom: 0.75rem;
}

/* Key Metrics Row */
.foundation-metrics {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin: 2.5rem 0 3rem;
}

.foundation-metric {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
    text-align: center;
    min-width: 120px;
    transition: transform 0.2s, border-color 0.2s;
}

.foundation-metric:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color, #6366f1);
}

.fm-icon {
    font-size: 1.4rem;
    color: var(--primary-color, #6366f1);
    margin-bottom: 0.5rem;
}

.fm-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary, #f1f5f9);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1;
}

.fm-label {
    font-size: 0.75rem;
    color: var(--text-muted, #94a3b8);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Two-Column Layout */
.foundation-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .foundation-two-col {
        grid-template-columns: 1fr;
    }
}

/* Diagram Column */
.foundation-diagram-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.diagram-frame {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 16px;
    overflow: hidden;
}

.diagram-label {
    padding: 0.75rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #cbd5e1);
    background: rgba(99,102,241,0.08);
    border-bottom: 1px solid var(--border-color, #334155);
    letter-spacing: 0.03em;
}

.foundation-diagram-img {
    width: 100%;
    height: auto;
    display: block;
    padding: 1rem;
}

.foundation-cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.55rem 1.1rem !important;
    font-size: 0.85rem !important;
}

/* Content Column */
.foundation-content-col {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.foundation-block {
    background: var(--bg-card, #1e293b);
    border: 1px solid var(--border-color, #334155);
    border-radius: 16px;
    padding: 1.5rem;
}

.foundation-block-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.foundation-block-title i {
    color: var(--primary-color, #6366f1);
}

/* Account Table */
.account-table-wrapper {
    overflow-x: auto;
}

.account-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.account-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #94a3b8);
    border-bottom: 1px solid var(--border-color, #334155);
}

.account-table td {
    padding: 0.55rem 0.75rem;
    color: var(--text-secondary, #cbd5e1);
    border-bottom: 1px solid rgba(51,65,85,0.5);
    vertical-align: middle;
}

.account-table tr:last-child td {
    border-bottom: none;
}

.account-table tr:hover td {
    background: rgba(99,102,241,0.05);
}

/* Account Badges */
.acct-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.acct-badge.mgmt     { background: rgba(239,68,68,0.15);  color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.acct-badge.security { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.acct-badge.log      { background: rgba(99,102,241,0.15); color: #818cf8; border: 1px solid rgba(99,102,241,0.3); }
.acct-badge.sandbox  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); }
.acct-badge.mle      { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.acct-badge.sap      { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); }
.acct-badge.sec      { background: rgba(236,72,153,0.15); color: #f472b6; border: 1px solid rgba(236,72,153,0.3); }

/* Services Stack Grid */
.services-stack-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary, #cbd5e1);
    transition: background 0.2s, border-color 0.2s;
}

.service-chip:hover {
    background: rgba(99,102,241,0.2);
    border-color: rgba(99,102,241,0.5);
    color: var(--text-primary, #f1f5f9);
}

.service-chip i {
    color: var(--primary-color, #6366f1);
    font-size: 0.75rem;
}

/* ══════════════════════════════════════════
   FIX: Section header label + title stacking
   (animations.css sets section-title to inline-block
    which causes it to sit inline with preceding labels)
   ══════════════════════════════════════════ */

/* Make section-header a flex column so label stacks above title */
.section-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
}

/* Override inline-block from animations.css — must be block for stacking */
.section-header .section-title,
.section-header h2.section-title {
    display: block !important;
    width: 100%;
}

/* Booking section header fix — eyebrow must be on its own line */
.booking-section .section-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
}

.booking-eyebrow {
    display: inline-flex !important;
    align-self: center;
    margin-bottom: 1rem;
}

/* Foundation section header fix */
.foundation-section .section-header {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.section-label {
    display: inline-block !important;
    align-self: center;
    margin-bottom: 0.75rem;
}

/* ══════════════════════════════════════════
   FIX: Architecture page platform pills — keep on one row
   ══════════════════════════════════════════ */

.arch-platform-row {
    flex-wrap: nowrap !important;
    gap: 10px !important;
}

.arch-platform-pill {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: 0.82rem !important;
    padding: 8px 14px !important;
}

@media (max-width: 700px) {
    .arch-platform-row {
        flex-wrap: wrap !important;
    }
}

/* ══════════════════════════════════════════
   FIX: Footer bottom bar — improve appearance
   ══════════════════════════════════════════ */

.footer-bottom {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 0.75rem !important;
    padding: 1.5rem 0 !important;
    text-align: left !important;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
    margin: 0;
}

.footer-stats {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted, #94a3b8);
}

/* ══════════════════════════════════════════════════════════════
   FLOATING FILTER BAR — Projects Section (matches case-studies)
   ══════════════════════════════════════════════════════════════ */
.proj-filter-bar {
    position: sticky;
    top: 70px;
    z-index: 100;
    background: rgba(15,23,42,0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(51,65,85,0.6);
    border-top: 1px solid rgba(51,65,85,0.3);
    padding: 0.85rem 0;
    margin-bottom: 2.5rem;
}
.proj-filter-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.proj-filter-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.proj-filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}
.proj-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.proj-search-wrap > i {
    position: absolute;
    left: 0.9rem;
    color: #64748b;
    font-size: 0.82rem;
    pointer-events: none;
}
.proj-search {
    background: rgba(30,41,59,0.8);
    border: 1px solid rgba(51,65,85,0.8);
    color: #f1f5f9;
    padding: 0.45rem 1rem 0.45rem 2.4rem;
    border-radius: 50px;
    font-size: 0.85rem;
    width: 230px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.proj-search:focus {
    border-color: rgba(99,102,241,0.6);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.proj-search::placeholder { color: #475569; }
.proj-clear-search {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    line-height: 1;
}
.proj-clear-search:hover { color: #f1f5f9; }
.proj-filter-pills .cs-pill {
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(51,65,85,0.8);
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.proj-filter-pills .cs-pill:hover {
    border-color: rgba(99,102,241,0.5);
    color: #a5b4fc;
    background: rgba(99,102,241,0.08);
}
.proj-filter-pills .cs-pill.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 12px rgba(99,102,241,0.35);
}

/* ══════════════════════════════════════════════════════════════
   CERTIFICATION GRID — Real LinkedIn Data Layout
   ══════════════════════════════════════════════════════════════ */
.cert-filter-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.cert-tab {
    padding: 0.45rem 1.1rem;
    border-radius: 50px;
    font-size: 0.83rem;
    font-weight: 600;
    border: 1px solid rgba(51,65,85,0.8);
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.cert-tab:hover {
    border-color: rgba(99,102,241,0.5);
    color: #a5b4fc;
    background: rgba(99,102,241,0.08);
}
.cert-tab.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 0 14px rgba(99,102,241,0.4);
}
.cert-count {
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 0 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
}
.cert-tab.active .cert-count { background: rgba(255,255,255,0.25); }
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}
.cert-card {
    background: rgba(30,41,59,0.7);
    border: 1px solid rgba(51,65,85,0.6);
    border-radius: 1rem;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.cert-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    opacity: 0;
    transition: opacity 0.25s;
}
.cert-card:hover { border-color: rgba(99,102,241,0.35); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.1); }
.cert-card:hover::before { opacity: 1; }
.cert-card.hidden { display: none; }
.cert-card-logo {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; flex-shrink: 0;
}
.aws-logo    { background: rgba(255,153,0,0.15);  color: #FF9900; border: 1px solid rgba(255,153,0,0.3); }
.ms-logo     { background: rgba(0,120,212,0.15);  color: #0078D4; border: 1px solid rgba(0,120,212,0.3); }
.isaca-logo  { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.comptia-logo{ background: rgba(220,38,38,0.12);  color: #f87171; border: 1px solid rgba(220,38,38,0.25); }
.tf-logo     { background: rgba(94,58,238,0.15);  color: #9f7aea; border: 1px solid rgba(94,58,238,0.3); }
.itil-logo   { background: rgba(16,185,129,0.12); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.data-logo   { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.google-logo { background: rgba(66,133,244,0.15); color: #4285F4; border: 1px solid rgba(66,133,244,0.3); }
.cert-card-body { flex: 1; min-width: 0; }
.cert-card-issuer { font-size: 0.72rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 0.25rem; }
.cert-card-name { font-size: 0.95rem; font-weight: 700; color: #f1f5f9; line-height: 1.35; margin-bottom: 0.5rem; }
.cert-card-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.cert-status { font-size: 0.68rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 50px; text-transform: uppercase; letter-spacing: 0.05em; }
.cert-status.earned { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.cert-status.planned { background: rgba(245,158,11,0.1); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.cert-dates { font-size: 0.72rem; color: #64748b; font-family: 'Courier New', monospace; }
.cert-skills { font-size: 0.72rem; color: #64748b; }

/* ══════════════════════════════════════════════════════════════
   TECHY ANIMATIONS & EFFECTS
   ══════════════════════════════════════════════════════════════ */
@keyframes glitch-1 {
    0%   { clip-path: inset(20% 0 60% 0); transform: translate(-3px,0); }
    25%  { clip-path: inset(70% 0 5%  0); transform: translate(3px,0); }
    50%  { clip-path: inset(40% 0 40% 0); transform: translate(0,0); }
    75%  { clip-path: inset(5%  0 80% 0); transform: translate(-2px,0); }
    100% { clip-path: inset(50% 0 30% 0); transform: translate(2px,0); }
}
@keyframes glitch-2 {
    0%   { clip-path: inset(60% 0 10% 0); transform: translate(3px,0); }
    25%  { clip-path: inset(10% 0 70% 0); transform: translate(-3px,0); }
    50%  { clip-path: inset(80% 0 5%  0); transform: translate(2px,0); }
    75%  { clip-path: inset(30% 0 50% 0); transform: translate(-1px,0); }
    100% { clip-path: inset(15% 0 65% 0); transform: translate(1px,0); }
}
.hero-title { position: relative; }
.hero-title::before, .hero-title::after {
    content: attr(data-text);
    position: absolute; top: 0; left: 0; width: 100%;
    opacity: 0; pointer-events: none;
}
.hero-title:hover::before { color: #6366f1; opacity: 0.6; animation: glitch-1 0.4s steps(1) 1; }
.hero-title:hover::after  { color: #8b5cf6; opacity: 0.5; animation: glitch-2 0.4s steps(1) 1; }

@keyframes neon-border-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(99,102,241,0.3), inset 0 0 6px rgba(99,102,241,0.05); }
    50%       { box-shadow: 0 0 18px rgba(99,102,241,0.6), inset 0 0 12px rgba(99,102,241,0.1); }
}
.stat-card:hover { animation: neon-border-pulse 1.5s ease-in-out infinite; }

@keyframes scanline-move {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}
.hero::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, rgba(99,102,241,0.4), transparent);
    pointer-events: none;
    animation: scanline-move 6s linear infinite;
    z-index: 1;
}

@keyframes float-particle {
    0%   { transform: translateY(0px) translateX(0px); opacity: 0.6; }
    33%  { transform: translateY(-20px) translateX(10px); opacity: 1; }
    66%  { transform: translateY(-10px) translateX(-8px); opacity: 0.7; }
    100% { transform: translateY(0px) translateX(0px); opacity: 0.6; }
}
.grid-background::before {
    content: '';
    position: absolute; width: 4px; height: 4px;
    background: rgba(99,102,241,0.5); border-radius: 50%;
    top: 20%; left: 15%;
    animation: float-particle 4s ease-in-out infinite;
    box-shadow:
        120px 80px 0 rgba(139,92,246,0.4),
        240px 160px 0 rgba(99,102,241,0.3),
        360px 40px 0 rgba(168,85,247,0.35),
        480px 200px 0 rgba(99,102,241,0.25),
        600px 100px 0 rgba(139,92,246,0.3),
        80px 300px 0 rgba(99,102,241,0.2),
        200px 350px 0 rgba(168,85,247,0.25);
}

@keyframes cert-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
.cert-card:hover .cert-card-name {
    background: linear-gradient(90deg, #f1f5f9 30%, #a5b4fc 50%, #f1f5f9 70%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cert-shimmer 1.5s linear 1;
}

@keyframes gradient-border-spin {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.cloud-card { position: relative; }
.cloud-card::after {
    content: '';
    position: absolute; inset: -1px; border-radius: inherit;
    background: linear-gradient(270deg, #6366f1, #8b5cf6, #06b6d4, #6366f1);
    background-size: 400% 400%;
    opacity: 0; z-index: -1;
    transition: opacity 0.3s;
    animation: gradient-border-spin 3s ease infinite;
}
.cloud-card:hover::after { opacity: 1; }

@keyframes data-stream {
    0%   { transform: translateX(-100%); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}
.foundation-section::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, #8b5cf6, transparent);
    animation: data-stream 4s ease-in-out infinite;
    pointer-events: none;
}
.foundation-section { position: relative; overflow: hidden; }

/* Cert tab JS filter */
@media (max-width: 768px) {
    .proj-filter-inner { gap: 0.75rem; }
    .proj-search { width: 100%; }
    .cert-grid { grid-template-columns: 1fr; }
    .cert-filter-tabs { gap: 0.4rem; }
}

/* ══════════════════════════════════════════
   GLOBAL COMPACTION OVERRIDES
   Reduces excessive whitespace across all pages
   ══════════════════════════════════════════ */

/* Global section padding reduction */
section {
  padding: 3.5rem 0 !important;
}

/* Section header margin reduction */
.section-header {
  margin-bottom: 2.5rem !important;
}

/* Foundation section — keep slightly more padding */
.foundation-section {
  padding: 4rem 0 !important;
}

/* Hero sections — keep their own padding */
.hero-section,
.project-hero,
.cs-hero,
.arch-hero,
.about-hero {
  padding: 6rem 0 4rem !important;
}

/* Footer compaction */
.footer {
  padding: 2.5rem 0 0 !important;
}

.footer-content {
  gap: 2rem !important;
  padding-bottom: 2rem !important;
}

.footer-section ul {
  gap: 0.4rem !important;
}

.footer-section h4 {
  margin-bottom: 0.6rem !important;
}

.footer-section p {
  margin-bottom: 0.75rem !important;
}

.footer-bottom {
  padding: 1rem 0 !important;
}

/* Project page section padding */
.video-section,
.architecture-section,
.tech-stack-section,
.documentation-section,
.related-section {
  padding: 2.5rem 0 !important;
}

/* Business context and GRC accordion sections */
.bc-section,
.grc-section {
  padding: 1rem 0 !important;
}

/* Architecture section — keep diagram breathing room */
.architecture-section {
  padding: 2.5rem 0 3rem !important;
}
