/* Base reset & custom properties */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #040B14;
    color: #ffffff;
    overflow-x: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #040B14;
}
::-webkit-scrollbar-thumb {
    background: #1A4578;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #06b87d;
}

/* Selection color */
::selection {
    background: rgba(6, 184, 125, 0.3);
    color: #ffffff;
}

/* ─── Geometric Background Shapes ─── */
.geo-shape {
    position: absolute;
    pointer-events: none;
    opacity: 0.04;
}

.geo-circle {
    border-radius: 50%;
    background: #06b87d;
}

.geo-triangle {
    background: #06b87d;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.geo-rect {
    background: #06b87d;
    border-radius: 8px;
    transform: rotate(45deg);
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -150px;
}

.geo-triangle-1 {
    width: 300px;
    height: 300px;
    top: 40%;
    left: -80px;
}

.geo-rect-1 {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    opacity: 0.03;
}

.geo-circle-2 {
    width: 200px;
    height: 200px;
    bottom: 15%;
    left: 5%;
    opacity: 0.03;
}

.geo-rect-2 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 5%;
    opacity: 0.025;
}

/* ─── Navigation ─── */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#navbar.nav-scrolled {
    background-color: rgba(4, 11, 20, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.mobile-nav-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ─── Service Cards ─── */
.service-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ─── Project Cards ─── */
.project-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-4px);
}

/* ─── Scroll Reveal Animations ─── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* ─── Form select arrow ─── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ─── Pulse animation for hero dot ─── */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* ─── Floating accent card animation ─── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* ─── Button hover glow ─── */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #06b87d;
    outline-offset: 2px;
}
