:root {
    --navy: #081527;
    --ink: #152033;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --mint: #10b981;
    --muted: #667085;
    --line: #dbe3ef;
    --soft: #f5f8fc;
    --card: #ffffff;
}

* { letter-spacing: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--ink);
    background: #fff;
}

[data-bs-theme="dark"] body, [data-bs-theme="dark"] {
    --ink: #eef5ff;
    --muted: #b7c4d6;
    --line: #253852;
    --soft: #0f1c2f;
    --card: #132238;
    background: #0a1220;
    color: var(--ink);
}

a { text-decoration: none; }
.btn { border-radius: 8px; font-weight: 700; }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--cyan)); border: 0; box-shadow: 0 12px 28px rgba(37, 99, 235, .25); }
.btn-outline-primary { border-color: var(--blue); color: var(--blue); }
.btn-outline-primary:hover { background: var(--blue); border-color: var(--blue); }

#loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--navy);
    transition: opacity .35s ease, visibility .35s ease;
}
#loader.hide { opacity: 0; visibility: hidden; }
.loader-ring {
    width: 56px;
    height: 56px;
    border: 4px solid rgba(255,255,255,.18);
    border-top-color: var(--cyan);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.brand-mark { display: inline-flex; align-items: center; gap: .65rem; font-weight: 800; color: inherit; }
.brand-mark span {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--mint));
}

.public-navbar {
    padding: 1rem 0;
    color: #fff;
    background: transparent;
    transition: background .25s ease, box-shadow .25s ease, padding .25s ease;
}
.public-navbar .nav-link, .public-navbar .navbar-brand { color: #fff; font-weight: 700; }
.public-navbar.scrolled, .public-navbar:has(.navbar-collapse.show) {
    padding: .7rem 0;
    background: rgba(8, 21, 39, .92);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 34px rgba(8, 21, 39, .18);
}
.theme-toggle {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    color: #fff;
    background: transparent;
}

.hero-section {
    position: relative;
    min-height: 92vh;
    display: grid;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: var(--navy);
}
.hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(8,21,39,.98), rgba(8,21,39,.78), rgba(37,99,235,.35)),
        url("https://images.unsplash.com/photo-1515879218367-8466d910aaa4?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.hero-content { position: relative; z-index: 1; padding-top: 5rem; }
.hero-section h1, .page-header h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: .98; font-weight: 800; max-width: 820px; }
.hero-section .lead { max-width: 720px; color: #d7e7ff; }
.section-kicker { display: inline-block; margin-bottom: .8rem; color: var(--cyan); font-weight: 800; text-transform: uppercase; font-size: .78rem; }
.typing-line { color: #d6f7ff; font-weight: 800; font-size: 1.2rem; }
#typingText { color: #7dd3fc; }
.hero-code-panel {
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 8px;
    padding: 1.2rem;
    background: rgba(6, 16, 34, .72);
    box-shadow: 0 28px 70px rgba(0,0,0,.35);
}
.code-dots span { display:inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: #ef4444; }
.code-dots span:nth-child(2) { background: #f59e0b; }
.code-dots span:nth-child(3) { background: #10b981; }
pre { color: #c6f6ff; margin: 1rem 0 0; white-space: pre-wrap; }

.stats-band { margin-top: -54px; position: relative; z-index: 2; }
.stat-item, .service-card, .portfolio-card, .team-card, .value-card, .feature-panel, .contact-panel, .contact-info {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: 0 18px 42px rgba(15, 36, 65, .08);
}
.stat-item { padding: 1.4rem; }
.stat-item strong { display: block; font-size: 2rem; color: var(--blue); }
.stat-item span { color: var(--muted); font-weight: 700; }
.section-pad { padding: 6rem 0; }
.section-heading { max-width: 720px; margin: 0 auto 2.4rem; text-align: center; }
.section-heading h2, .cta-section h2 { font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 800; }
.text-muted { color: var(--muted) !important; }

.service-card, .value-card, .feature-panel, .contact-panel, .contact-info { padding: 1.5rem; }
.service-card { transition: transform .25s ease, border-color .25s ease; }
.service-card:hover, .portfolio-card:hover, .team-card:hover, .value-card:hover { transform: translateY(-6px); border-color: rgba(37,99,235,.45); }
.service-card > i, .value-card > i {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--mint));
    font-size: 1.5rem;
}
.service-card h5, .portfolio-card h5, .team-card h5, .value-card h5 { font-weight: 800; }
.service-card p, .portfolio-card p, .team-card p, .feature-panel p { color: var(--muted); }

.portfolio-card { position: relative; overflow: hidden; transition: transform .25s ease; }
.portfolio-image { height: 190px; background-size: cover; background-position: center; }
.portfolio-body { padding: 1.25rem; }
.portfolio-body span { color: var(--blue); font-size: .8rem; font-weight: 800; }
.portfolio-body small { color: var(--mint); font-weight: 800; }
.portfolio-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(8,21,39,.78);
    opacity: 0;
    transition: opacity .25s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-filters { display: flex; flex-wrap: wrap; gap: .6rem; }
.portfolio-filters button {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: .55rem .9rem;
    color: var(--ink);
    background: var(--card);
    font-weight: 700;
}
.portfolio-filters button.active { color: #fff; background: var(--blue); border-color: var(--blue); }

.team-card { padding: 1.3rem; text-align: center; transition: transform .25s ease; }
.team-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; margin-bottom: 1rem; }
.team-card span { color: var(--blue); font-weight: 800; }
.social-links { display: flex; gap: .75rem; }
.social-links a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--soft); color: var(--blue); }
.page-header { padding: 9rem 0 5rem; color: #fff; background: linear-gradient(135deg, var(--navy), #12356a 58%, #0f766e); }
.page-header p { max-width: 760px; color: #d8e8ff; font-size: 1.15rem; }
.cta-section { padding: 5rem 0; color: #fff; background: linear-gradient(135deg, #12356a, #0f766e); }
.contact-info { height: 100%; display: grid; gap: 1rem; }
.contact-info > div:not(.map-placeholder) { display: flex; gap: .8rem; align-items: center; font-weight: 700; }
.contact-info i { color: var(--blue); font-size: 1.3rem; }
.map-placeholder { min-height: 240px; border-radius: 8px; display: grid; place-items: center; text-align: center; background: linear-gradient(135deg, #eaf3ff, #d7f9f2); color: #0f2744; }
.map-placeholder i { font-size: 2rem; }

.site-footer { padding: 4rem 0 1.5rem; color: #d8e7fb; background: #071120; }
.site-footer h6 { color: #fff; font-weight: 800; }
.site-footer a { display: block; margin: .45rem 0; color: #b7c9df; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 2.5rem; padding-top: 1.2rem; color: #93a6bd; }
#backToTop {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
#backToTop.show { opacity: 1; pointer-events: auto; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

.admin-body, .login-body { min-height: 100vh; background: var(--soft); }
.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    padding: 1.4rem;
    color: #fff;
    background: #071120;
}
.admin-sidebar nav { display: grid; gap: .4rem; margin-top: 2rem; }
.admin-sidebar a { color: #d8e7fb; padding: .8rem; border-radius: 8px; font-weight: 700; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-main { margin-left: 260px; padding: 2rem; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.admin-topbar h1 { font-size: 2rem; font-weight: 800; margin: 0; }
.admin-topbar p { color: var(--muted); margin: 0; }
.admin-panel, .admin-stat {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 36, 65, .07);
}
.admin-panel { padding: 1.25rem; }
.admin-stat { padding: 1.25rem; display: grid; gap: .3rem; }
.admin-stat i { color: var(--blue); font-size: 1.7rem; }
.admin-stat span { color: var(--muted); font-weight: 700; }
.admin-stat strong { font-size: 2.2rem; }
.admin-thumb { width: 82px; height: 54px; border-radius: 8px; background-size: cover; background-position: center; }
.admin-avatar { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; }
.message-body { white-space: pre-line; color: var(--muted); }
.login-body { display: grid; place-items: center; background: linear-gradient(135deg, #071120, #12356a 64%, #0f766e); }
.login-card { width: min(92vw, 430px); padding: 2rem; border-radius: 8px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.25); }

@media (max-width: 991px) {
    .hero-section { min-height: auto; padding: 8rem 0 5rem; }
    .stats-band { margin-top: 0; padding-top: 1rem; background: var(--soft); }
    .admin-sidebar { position: static; width: auto; }
    .admin-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-main { margin-left: 0; padding: 1rem; }
    .admin-topbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 575px) {
    .section-pad { padding: 4rem 0; }
    .hero-section h1, .page-header h1 { font-size: 2.55rem; }
    .portfolio-filters button { flex: 1 1 auto; }
}
