* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #080b12;
    color: #f5f7fa;
    line-height: 1.6;
}

.container {
    width: min(1100px, 90%);
    margin: auto;
}

header {
    border-bottom: 1px solid #1c2330;
    background: rgba(8, 11, 18, 0.95);
}

.nav {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 2px;
}

.logo span {
    opacity: 0.5;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #aeb7c5;
    text-decoration: none;
    font-size: 14px;
}

.nav-links a:hover {
    color: white;
}

.hero {
    padding: 130px 0 150px;
    background:
        radial-gradient(circle at 80% 20%, #16263c 0, transparent 35%),
        #080b12;
}

.badge,
.eyebrow {
    color: #7f8da3;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 3px;
}

.hero h1 {
    margin-top: 25px;
    font-size: clamp(48px, 7vw, 82px);
    line-height: 1.02;
    letter-spacing: -3px;
    max-width: 850px;
}

.hero h1 span {
    color: #7d8da5;
}

.intro {
    max-width: 620px;
    margin: 30px 0;
    color: #aeb7c5;
    font-size: 19px;
}

.button {
    display: inline-block;
    margin-top: 10px;
    padding: 13px 22px;
    border: 1px solid #46546a;
    border-radius: 6px;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.button:hover {
    background: #151d29;
}

.projects {
    padding: 110px 0;
    background: #0d1119;
}

.section-heading {
    margin-bottom: 45px;
}

h2 {
    margin-top: 8px;
    font-size: 42px;
    letter-spacing: -1px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.card {
    padding: 32px;
    min-height: 230px;
    border: 1px solid #202938;
    border-radius: 10px;
    background: #111722;
    transition: transform 0.2s, border-color 0.2s;
}

.card:hover {
    transform: translateY(-4px);
    border-color: #40506a;
}

.icon {
    font-size: 28px;
    margin-bottom: 18px;
}

.card h3 {
    font-size: 21px;
    margin-bottom: 10px;
}

.card p {
    color: #8f9bad;
    margin-bottom: 20px;
}

.status {
    font-size: 10px;
    letter-spacing: 2px;
    color: #66758c;
}

.about {
    padding: 120px 0;
}

.about p:last-child {
    max-width: 650px;
    color: #9da8b8;
    font-size: 18px;
    margin-top: 20px;
}

footer {
    border-top: 1px solid #1c2330;
    padding: 35px 0;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer p {
    color: #66758c;
    font-size: 13px;
}

@media (max-width: 700px) {

    .nav-links {
        display: none;
    }

    .hero {
        padding: 90px 0 100px;
    }

    .hero h1 {
        font-size: 48px;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    h2 {
        font-size: 34px;
    }

    footer .container {
        flex-direction: column;
        gap: 15px;
    }
}

/* Clickable project cards */

.project-grid a.card {
    display: block;
    color: inherit !important;
    text-decoration: none !important;
}

.project-grid a.card h3,
.project-grid a.card p,
.project-grid a.card .status {
    color: inherit !important;
    text-decoration: none !important;
}

.project-grid a.card:visited,
.project-grid a.card:hover,
.project-grid a.card:active {
    color: inherit !important;
    text-decoration: none !important;
}

/* Data & Finance submenu */

.finance-menu {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.finance-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    transition: background 0.2s ease, transform 0.2s ease;
}

.finance-menu a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(3px);
}

#map {
    width: 100%;
    height: 360px;
    border-radius: 10px;
    overflow: hidden;
}

.stress-gauge {
    width: 100%;
    height: 14px;
    background: #26304a;
    border-radius: 10px;
    overflow: hidden;
    margin: 16px 0 6px;
}

.stress-gauge-fill {
    height: 100%;
    width: 0%;
    border-radius: 10px;
    transition: width 0.8s ease, background 0.5s ease;
    background: #4caf50;
}

.stress-gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    opacity: 0.7;
    margin-bottom: 12px;
}

.section-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin: 30px 0;
}

/* ================================
   Loading Overlay
   ================================ */

#loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.97);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-box {
    text-align: center;
    color: white;
}

.loading-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 25px;
}

.loading-spinner {
    width: 42px;
    height: 42px;
    margin: 0 auto 25px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: kerrytech-spin 0.9s linear infinite;
}

.loading-message {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.loading-submessage {
    font-size: 0.85rem;
    opacity: 0.65;
}

@keyframes kerrytech-spin {
    to {
        transform: rotate(360deg);
    }
}