
:root {
    --bg-main: #d4d4d8;
    --bg-surface: #c4c4c9;
    --bg-navbar: #0f1226;

    --text-main: #000000;
    --text-muted: #52525b;
    --text-invert: #ffffff;

    --accent: #4f46e5;        /* Indigo */
    --accent-soft: #e0e7ff;

    --border-subtle: rgba(0, 0, 0, 0.12);
}

/* Body & Page Background */
html, body {
    background-color: var(--bg-main) !important;
    color: var(--text-main);
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-surface);
}


/* Webkit Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: rgba(79, 70, 229, 0.35);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 70, 229, 0.6);
}

/* Loading Screen */

#loading-screen {
    position: fixed;
    inset: 0;
    background-color: var(--bg-navbar);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.spinner {
    border: 8px solid rgba(255, 255, 255, 0.15);
    border-top: 8px solid var(--accent);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1.5s linear infinite;
    margin-bottom: 20px;
}

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

.lock {
    font-size: 48px;
    color: var(--text-invert);
    transition: transform 1.5s ease, opacity 1.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide content initially */
body > :not(#loading-screen) {
    padding-top: 112px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease, visibility 1s ease;
}

/* ========================= */
/* RESPONSIVE MOBILE STYLES */
/* ========================= */

@media (max-width: 768px) {
    body > :not(#loading-screen) {
        padding-top: 80px;
    }

    #loading-screen {
        padding: 0;
        margin: 0;
    }

    .spinner {
        width: 25px;
        height: 25px;
        border-width: 6px;
    }

    .lock {
        font-size: 40px;
    }

    .navbar {
        height: 70px;
        padding: 0 12px;
        flex-wrap: nowrap !important;
    }

    .navbar > .container {
        flex-wrap: nowrap !important;
        padding: 0;
    }

    .navbar .btn-group {
        flex-shrink: 0;
    }

    .navbar .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .navbar-gif {
        height: 45px;
    }

    .display-2 {
        font-size: 2rem !important;
    }

    .display-4 {
        font-size: 1.5rem !important;
    }

    .lead {
        font-size: 0.9rem !important;
    }

    .exp-header {
        flex-direction: column;
        gap: 4px;
    }

    .exp-header h4 {
        font-size: 1rem;
    }

    .jumbotron p {
        font-size: 0.9rem;
    }

    .badge {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.6rem !important;
    }

    .pendulum {
        transform: scale(0.7);
        margin: 40px auto;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Project tabs - horizontal on mobile */
    #project-list {
        flex-direction: row !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    #project-list .nav-link {
        margin: 4px !important;
        font-size: 0.85rem;
    }

    .tab-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Blog list responsive */
    .list-group-item h5 {
        font-size: 1rem;
    }

    .list-group-item p {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .display-2 {
        font-size: 1.6rem !important;
    }

    .display-4 {
        font-size: 1.25rem !important;
    }

    .navbar-nav {
        padding: 10px 0;
    }

    .navbar-nav a {
        padding: 8px 12px !important;
    }

    .btn-group {
        width: 100%;
        margin-top: 8px;
    }

    .btn-group .btn {
        width: 100%;
    }

    .koala-sparkle-link svg {
        display: none;
    }
}

/* Navbar */

.navbar {
    position: fixed;
    inset: 0 0 auto 0;
    height: 96px;
    z-index: 1000;
    background-color: var(--bg-navbar);
    padding: 0 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.navbar-gif {
    height: 90px;
}



.text-primary {
    color: var(--text-main) !important;
}

.text-secondary {
    color: var(--text-muted) !important;
}

.text-info {
    color: #1e1b4b !important;
}

.text-grey {
    color: #000000 !important;
}

.text-dark {
    color: #000000 !important;
}

/* Terminal bullet point icons */
.fa-terminal {
    color: #dc3545 !important;
}

/* Contact Me button (in dark navbar) */
.navbar .btn-outline-info {
    --bs-btn-color: #ffffff;
    --bs-btn-border-color: #1e1b4b;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #1e1b4b;
    --bs-btn-hover-border-color: #1e1b4b;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #312e81;
    --bs-btn-active-border-color: #312e81;
    box-shadow: 0 0 15px rgba(30, 27, 75, 0.4);
}

.navbar .btn-outline-info:hover,
.navbar .btn-outline-info:focus,
.navbar .btn-outline-info:active,
.navbar .btn-outline-info.active {
    box-shadow: 0 0 20px rgba(30, 27, 75, 0.6);
}

/* My Resume button (on white background) */
.jumbotron .btn-outline-info,
.btn-outline-info {
    --bs-btn-color: #1e1b4b;
    --bs-btn-border-color: #1e1b4b;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #1e1b4b;
    --bs-btn-hover-border-color: #1e1b4b;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #312e81;
    --bs-btn-active-border-color: #312e81;
    --bs-btn-disabled-color: #1e1b4b;
    --bs-btn-disabled-border-color: #1e1b4b;
    box-shadow: 0 0 15px rgba(30, 27, 75, 0.3);
}

.jumbotron .btn-outline-info:hover,
.btn-outline-info:hover,
.btn-outline-info:focus,
.btn-outline-info:active,
.btn-outline-info.active {
    box-shadow: 0 0 20px rgba(30, 27, 75, 0.5);
}

/* Project buttons */
.btn-outline-primary {
    --bs-btn-color: #1e1b4b;
    --bs-btn-border-color: #1e1b4b;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #1e1b4b;
    --bs-btn-hover-border-color: #1e1b4b;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #1e1b4b;
    --bs-btn-active-border-color: #1e1b4b;
    box-shadow: 0 0 15px rgba(30, 27, 75, 0.4);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active {
    box-shadow: 0 0 20px rgba(30, 27, 75, 0.6);
}

/* Nav pills for project tabs */
.nav-pills .nav-link.active {
    background-color: #1e1b4b;
    color: #ffffff;
    box-shadow: 0 0 20px rgba(30, 27, 75, 0.6);
}

/* Dropdown Menu */
.dropdown-menu {
    --bs-dropdown-link-hover-bg: #f5f5f5;
    --bs-dropdown-link-hover-color: #000000;
    --bs-dropdown-link-active-bg: #e8e8e8;
    background-color: var(--bg-main);
    border: 1px solid var(--border-subtle);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.dropdown-item {
    color: #000000;
}

/* Badges */
.badge-info,
.bg-info {
    background-color: rgba(30, 27, 75, 0.1) !important;
    border: 1px solid #1e1b4b !important;
    color: #1e1b4b !important;
    box-shadow: 0 0 10px rgba(30, 27, 75, 0.3);
}

.badge-outline-primary {
    background-color: rgba(30, 27, 75, 0.1);
    border: 1px solid #1e1b4b;
    color: #1e1b4b;
    box-shadow: 0 0 10px rgba(30, 27, 75, 0.3);
}

.badge-outline-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}


.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-subtle);
}

.exp-header h4 {
    font-size: 1.35rem;
    font-weight: 600;
}

.exp-header small {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.exp-header small i {
    margin-right: 6px;
}

.nav-pills {
    margin-bottom: auto;
}


.tab-content .tab-pane {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}

.tab-content .tab-pane.show.active {
    opacity: 1;
    visibility: visible;
}


.htbuserbadge {
    width: 220px;
    margin: auto;
}

/* ========================= */
/* Badges (unchanged) */
/* ========================= */

.badge {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.badge-info {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.5);
}

.badge-info:hover {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.8);
    transform: translateY(-2px);
}

.badge-outline-primary {
    background-color: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--accent);
    color: var(--accent);
}

.badge-outline-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #dc3545;
}

/* Koala Icon Sparkle Effect */
.koala-sparkle-link {
    --color: var(--accent);
    --shadow: var(--bg-navbar);
    --glare: rgba(79, 70, 229, 0.75);
    --transition: 0.2s;
    --hover: 0.4;
    --pos: 0;

    --padding: 0.5rem;
    padding: var(--padding);
    border-radius: 1rem;
    text-decoration: none;
    position: relative;
    transition: background 0.2s;
    display: inline-block;
}

.koala-sparkle-link:hover {
    background: rgba(79, 70, 229, 0.1);
    --hover: 1;
    --pos: 1;
}

.koala-sparkle-link:active {
    --hover: 0;
}

.koala-sparkle-link .navbar-gif {
    display: inline-block;
    transition: all 0.2s;
    filter: drop-shadow(0 0 0 transparent);
}

.koala-sparkle-link:hover .navbar-gif {
    filter: drop-shadow(0 10px 20px rgba(79, 70, 229, 0.4));
    transform: translateY(-3px) scale(1.05);
}

.koala-sparkle-link:active .navbar-gif {
    transform: translateY(0) scale(1);
}

.koala-sparkle-link svg {
    position: absolute;
    z-index: 3;
    width: 20px;
    height: 20px;
    --delay-step: 0.15;
    top: calc(var(--y, 50) * 1%);
    left: calc(var(--x, 0) * 1%);
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
}

.koala-sparkle-link svg path {
    fill: var(--glare);
}

/* Animation for sparkles */
.koala-sparkle-link:hover svg {
    animation: sparkle 0.75s calc((var(--delay-step) * var(--d)) * 1s) both;
}

@keyframes sparkle {
    50% {
        transform: translate(-50%, -50%) scale(var(--s, 1));
    }
}

.koala-sparkle-link svg:nth-of-type(1) {
    --x: 0;
    --y: 20;
    --s: 1.1;
    --d: 1;
}

.koala-sparkle-link svg:nth-of-type(2) {
    --x: 15;
    --y: 80;
    --s: 1.25;
    --d: 2;
}

.koala-sparkle-link svg:nth-of-type(3) {
    --x: 45;
    --y: 40;
    --s: 1.1;
    --d: 3;
}

.koala-sparkle-link svg:nth-of-type(4) {
    --x: 75;
    --y: 60;
    --s: 0.9;
    --d: 2;
}

.koala-sparkle-link svg:nth-of-type(5) {
    --x: 100;
    --y: 30;
    --s: 0.8;
    --d: 4;
}

.pendulum {
    position: relative;
    width: 220px;
    height: 180px;
    background-color: #e0e7ff;
    margin: 100px auto;
    border-radius: 5%;
    align-items: center;
    border-top: 15px solid #c7d2fe;
}

.pendulum_box {
    display: flex;
    padding: 120px 0 0 10px;
    position: absolute;
    flex: 1;
}

.ball {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background-color: #1e1b4b;
    position: relative;
    transform-origin: 50% -300%;
}

.ball::before {
    content: '';
    width: 2px;
    height: 120px;
    background-color: #c7d2fe;
    left: 18px;
    top: -120px;
    position: absolute;
}

.ball.first {
    animation: firstball .9s alternate ease-in infinite;
}

@keyframes firstball {
    0% {
        transform: rotate(35deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

.ball.last {
    animation: lastball .9s alternate ease-out infinite;
}

@keyframes lastball {
    50% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(-35deg);
    }
}

/* Section Titles */
.display-4,
h3.display-4 {
    font-weight: 700 !important;
    color: #1e1b4b !important;
}

/* Blog List Items */
.list-group-item.border-secondary {
    border-color: #000000 !important;
}

.list-group-item .text-primary,
.list-group-item h5.text-primary {
    font-weight: 600;
    color: var(--accent) !important;
}

