:root {
    /* Dark + Yellow palette */
    --bg-0: #0a0f14;
    --bg-1: #0f151b;
    --text-0: #e9f3ff;
    --muted: #9db0bf;
    --accent-blue: #f59e0b;
    /* primary yellow (amber-500) */
    --accent-green: #fbbf24;
    /* secondary yellow (amber-400) */
    --gold: #e3d28f;
    --border: rgba(233, 243, 255, 0.12);
    --shadow-duo: 0 0 24px rgba(245, 158, 11, 0.2), 0 0 36px rgba(251, 191, 36, 0.14);
}

html,
body {
    height: 100%;
    background: var(--bg-0);
    color: var(--text-0);
    font-display: swap !important;
    font-family: 'League Spartan', 'Manrope', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* AOS animation styles */
[data-aos] {
    opacity: 0;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

p {
    line-height: 1.7;
    margin-bottom: 1.1rem;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    color: var(--accent-green);
}

/* Cinematic GTA V vibe: neon gradient accents + subtle scanlines */
.site-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: var(--bg-0);
    filter: saturate(0.95);
    animation: bgPulse 14s ease-in-out infinite alternate;
}

.scanlines::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 3px;
    mix-blend-mode: soft-light;
    opacity: .18;
    animation: scan 12s linear infinite;
}

@keyframes bgPulse {
    from {
        filter: saturate(0.9) brightness(0.95);
    }

    to {
        filter: saturate(1.15) brightness(1.05);
    }
}

@keyframes scan {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(3px);
    }
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(13, 17, 23, 0.65);
    border-bottom: 1px solid var(--border);
}
/* Compact navbar on small screens */
@media (max-width: 576px) {
    .navbar .container {
        padding-top: .35rem !important;
        padding-bottom: .35rem !important;
    }
    .navbar-brand img {
        max-height: 32px !important;
    }
    .menu-toggle {
        padding: 0.25rem .6rem 0.2rem .6rem;
        font-size: 14px;
        border-radius: 8px;
    }
}

.brand-badge {
    font-family: 'Montserrat', 'Space Grotesk', system-ui;
    letter-spacing: .5px;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--text-0);
    text-transform: uppercase;
}

.brand-badge .accent {
    color: var(--accent-blue);
    text-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

/* Buttons */
.btn-neon {
    border: 1px solid rgba(233, 243, 255, 0.18);
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.03);
    transition: transform .6s cubic-bezier(.22, .61, .36, 1), box-shadow .6s ease, border-color .6s ease;
    padding: 0.35rem .74rem .25rem .79rem;
}

.btn-neon:hover {
    border-color: rgba(233, 243, 255, 0.35);
    box-shadow: var(--shadow-duo);
    color: var(--text-0);
    transform: none;
}

/* Hero Section */
.hero {
    padding: 1.5rem 0 1.5rem;
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 0 0.1rem 0;
    }
}

.hero-title {
    font-family: 'Montserrat', 'Space Grotesk', system-ui;
    font-weight: 700;
    font-size: clamp(2.6rem, 7.5vw, 5.5rem);
    line-height: 1;
    letter-spacing: .5px;
    text-transform: uppercase;
    text-rendering: optimizeLegibility;
}

.hero-title .stroke {
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.25);
    color: transparent;
    text-shadow: none;
}

.hero-title .gradient {
    color: var(--accent-blue);
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    text-shadow: none;
}

.hero-sub {
    color: var(--muted);
    max-width: 740px;
}

/* Project Details Hero */
.hero h1 {
    font-family: 'Montserrat', 'Space Grotesk';
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-size: clamp(2.3rem, 6vw, 4rem);
}

.hero .subtitle {
    color: var(--muted);
}

/* Sections */
.section {
    padding: 2rem 0 2rem 0;
}

/* Project Details Section */
.section.details {
    padding: 1.5rem 0;
}

/* Reduce space between title and content on small screens for project details */
@media (max-width: 768px) {
    .section.details {
        padding: 1rem 0 2rem;
    }
}

/* Cards */
.card-glass {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
    transition: transform .8s cubic-bezier(.22, .61, .36, 1), box-shadow .8s ease, border-color .8s ease, background .8s ease;
    will-change: transform;
}

.card-glass:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Chips/Tags */
.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: 0.35rem .74rem .25rem .79rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-0);
    background: rgba(255, 255, 255, 0.03);
    font-size: .85rem;
    transition: transform .6s ease, box-shadow .6s ease, background .6s ease, border-color .6s ease;
}

.chip:hover {
    box-shadow: none;
    border-color: var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.chip i {
    color: var(--accent-blue);
}

/* Tech mini icons inside chips */
.chip .tech-mini {
    width: 16px;
    height: 16px;
    object-fit: contain;
    display: inline-block;
    margin-right: 6px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
    vertical-align: -2px;
}

/* Highlights Tags */
.highlights-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-start;
    align-items: center;
}

/* Prevent chip overflow and maintain wrapping on narrow screens */
.highlights-tags,
.highlights-tags .chip {
    overflow-wrap: anywhere;
}

@media (max-width: 576px) {
    .highlights-tags {
        gap: 0.5rem;
    }

    .highlights-tags .chip {
        padding-top: 0.3rem;
        padding-bottom: 0.25rem;
    }
}

/* Titles */
.section-title {
    font-family: 'Montserrat', 'Space Grotesk';
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-size: 2rem;
    margin-bottom: 1.25rem;
}

.divider {
    height: 2px;
    width: 100%;
    background: rgba(233, 243, 255, 0.18);
    opacity: .9;
}

/* Project Details Divider - using same style as index */
.divider.details {
    height: 2px;
    width: 100%;
    background: rgba(233, 243, 255, 0.18);
    opacity: .9;
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px dashed rgba(255, 255, 255, 0.12);
    margin-left: .5rem;
    padding-left: 1.25rem;
}

.timeline .item {
    position: relative;
    margin-bottom: 1.7rem;
}

.timeline .item::before {
    content: "";
    position: absolute;
    left: -1.6rem;
    top: .4rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(42, 168, 255, 0.2);
}

.timeline .item p {
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Tech Grid */
.tech-grid .card-glass {
    transition: transform .7s cubic-bezier(.22, .61, .36, 1), box-shadow .7s ease, background .6s ease, border-color .6s ease;
    border: none !important; /* remove box border inside tech grid */
    background: rgba(255, 255, 255, 0.03); /* slightly clearer glass */
    perspective: 800px; /* enable 3D for children (logo) */
}

.tech-grid .card-glass:hover {
    box-shadow: 0 14px 46px rgba(0, 0, 0, 0.45);
    transform: translateY(-6px);
}

/* Make technology cards a bit smaller */
.tech-grid .card-glass {
    padding: 0.6rem 0.7rem !important; /* override Bootstrap p-3 */
}

.tech-grid .card-glass span {
    font-size: 0.95rem;
}

/* Flexible, content-based widths for tech grid items (override row-cols widths) */
.tech-grid .col {
    flex: 0 0 auto;
    width: auto !important;
}

/* 3D logo tilt on hover */
.tech-grid .tech-logo {
    transition: transform .8s cubic-bezier(.22, .61, .36, 1), filter .6s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.tech-grid .card-glass:hover .tech-logo {
    transform: rotateY(16deg) rotateX(8deg) scale(1.06);
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45));
}

.tech-grid .icon {
    display: none;
}

.tech-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* Slightly smaller logos inside technology grid */
.tech-grid .tech-logo {
    width: 28px;
    height: 28px;
}

/* Technology Categories - visual separation between sections */
.category-section {
    position: relative;
}

/* Add a subtle divider before every category except the first */
.category-section + .category-section {
    padding-top: 1.25rem;
}

.category-section + .category-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            rgba(233, 243, 255, 0) 0%,
            rgba(233, 243, 255, 0.18) 16%,
            rgba(233, 243, 255, 0.22) 50%,
            rgba(233, 243, 255, 0.18) 84%,
            rgba(233, 243, 255, 0) 100%);
}

/* Responsive gallery grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 0.5rem;
    margin: 0 auto;
}

.gallery-tile {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}


/* Tile aspect presets using padding-top trick */
.tile-1x1 {
    grid-column: span 4;
}

.tile-1x1::before {
    content: "";
    display: block;
    padding-top: 100%;
}

.tile-3x4 {
    grid-column: span 3;
}

.tile-3x4::before {
    content: "";
    display: block;
    padding-top: 133.333%;
}

.tile-4x3 {
    grid-column: span 5;
}

.tile-4x3::before {
    content: "";
    display: block;
    padding-top: 75%;
}

.tile-16x9 {
    grid-column: span 12;
}

.tile-16x9::before {
    content: "";
    display: block;
    padding-top: 56.25%;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .tile-1x1 {
        grid-column: span 6;
    }

    .tile-3x4 {
        grid-column: span 6;
    }

    .tile-4x3 {
        grid-column: span 12;
    }

    .tile-16x9 {
        grid-column: span 12;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .tile-1x1 {
        grid-column: span 6;
    }

    .tile-3x4 {
        grid-column: span 6;
    }

    .tile-4x3 {
        grid-column: span 6;
    }

    .tile-16x9 {
        grid-column: span 6;
    }
}

/* Large screens: force three columns, one tile per column */
@media (min-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery-grid .tile-1x1,
    .gallery-grid .tile-3x4,
    .gallery-grid .tile-4x3,
    .gallery-grid .tile-16x9 {
        grid-column: span 1;
    }
}

/* Project Cards */
.project-card {
    position: relative;
    overflow: hidden;
}

.project-card img {
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    transition: transform 1.2s ease, filter 1.2s ease;
    will-change: transform;
    height: 180px;
    width: 100%;
    object-fit: cover;
}

.project-card:hover img {
    transform: none;
    filter: none;
}

.project-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
}

.project-year {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: #0b1320;
    color: #fff;
    border: 1px solid var(--border);
}

.project-card:hover .project-badge {
    box-shadow: 0 0 0 2px rgba(42, 168, 255, 0.25);
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    right: 48px;
    bottom: 48px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(8px);
    transition: opacity .3s ease, visibility .3s ease, transform .3s ease, box-shadow .3s ease, background .3s ease, border-color .3s ease;
    z-index: 11001;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(233, 243, 255, 0.35);
    box-shadow: var(--shadow-duo);
    transform: translateY(-2px);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

.back-to-top i {
    color: var(--accent-blue);
    font-size: 1.1rem;
    margin-bottom: -5px;
}

/* Nav link underline and smooth color */
.nav-link {
    position: relative;
    transition: color .6s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 6px;
    height: 2px;
    width: 0;
    background: var(--accent-blue);
    transition: width .6s cubic-bezier(.22, .61, .36, 1);
    opacity: .9;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link:hover::after {
    width: 100%;
}

/* Social icon gentle lift/tilt in hero card */
.hero .card-glass .d-flex a i {
    transition: transform .8s cubic-bezier(.22, .61, .36, 1), color .6s ease, text-shadow .8s ease;
}

.hero .card-glass .d-flex a:hover i {
    color: inherit;
    text-shadow: none;
}

/* Languages popover styling */
.popover.languages-popover {
    --bs-popover-bg: rgba(13, 19, 28, 0.98);
    --bs-popover-border-color: rgba(233, 243, 255, 0.12);
    --bs-popover-header-bg: rgba(255, 255, 255, 0.04);
    --bs-popover-header-color: #e9f3ff;
    --bs-popover-body-color: #d7e6f4;
    --bs-popover-max-width: 900px; /* override Bootstrap variable */
    max-width: 900px; /* fallback */
    width: auto;
    border-radius: 12px;
    backdrop-filter: blur(6px);
}

.popover.languages-popover .popover-body {
    padding: 0.9rem 1rem;
    line-height: 1.6;
}

.popover.languages-popover .popover-header {
    border-bottom-color: rgba(233, 243, 255, 0.12);
}

.popover.languages-popover .badge {
    border: 1px solid rgba(233, 243, 255, 0.12);
}

.popover.languages-popover ul {
    margin: 0;
    padding: 0;
}

.popover.languages-popover li {
    padding: 0.55rem 0.25rem;
    border-bottom: 1px solid rgba(233, 243, 255, 0.08);
}

.popover.languages-popover li:last-child {
    border-bottom: 0;
}

.popover.languages-popover .d-flex {
    gap: 0.75rem;
}

.popover.languages-popover strong {
    letter-spacing: 0.2px;
}

.popover.languages-popover small {
    display: block;
    margin-top: 0.35rem;
    line-height: 1.55;
}

/* Tighter spacing for project title on small screens */
@media (max-width: 576px) {
    .hero h1 {
        margin-bottom: 0.25rem !important;
    }
}

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {

    .card-glass,
    .btn-neon,
    .chip,
    .tech-grid .card-glass,
    .project-card img,
    .nav-link::after,
    .hero .card-glass .d-flex a i {
        transition-duration: .01ms !important;
    }

    .site-bg {
        animation: none;
    }

    .scanlines::before {
        animation: none;
    }
}

/* Fullscreen overlay menu */
.menu-toggle {
    position: relative;
    border: none;
    background: transparent;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem .74rem .25rem .79rem;
    border-radius: 10px;
    cursor: pointer;
    transition: box-shadow .6s ease, transform .6s ease, background .6s ease;
    font-weight: 600;
    letter-spacing: .5px;
    color: #fff;
}

.menu-toggle:hover {
    box-shadow: var(--shadow-duo);
}

/* Remove hover effect for the specific header menu button */
#menuBtn:hover {
    box-shadow: none !important;
}

.overlay-menu {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: rgba(8, 10, 14, 0.98);
    transform: translateX(100%);
    transition: transform .8s cubic-bezier(.22, .61, .36, 1);
    display: flex;
    overflow: hidden;
}

.overlay-menu.open {
    transform: translateX(0);
}

.overlay-menu .content {
    margin: auto;
    text-align: center;
    padding: 2rem;
    max-width: 100vw;
    overflow-x: hidden;
    box-sizing: border-box;
}

.overlay-menu .menu-title {
    font-family: 'Montserrat', 'Space Grotesk';
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.overlay-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.overlay-menu li {
    margin: .75rem 0;
}

.overlay-menu a {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    color: #fff;
    text-decoration: none;
    display: inline-block;
    padding: .25rem .75rem;
    transition: transform .6s cubic-bezier(.22, .61, .36, 1), text-shadow .6s ease;
}

.overlay-menu a:hover {
    text-shadow: 0 0 18px rgba(0, 229, 255, 0.6);
}

.overlay-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: transform .6s ease, box-shadow .6s ease, background .6s ease;
}

.overlay-close:hover {
    box-shadow: var(--shadow-duo);
}

.overlay-close span {
    position: absolute;
    width: 22px;
    height: 2px;
    background: #fff;
}

.overlay-close .x1 {
    transform: rotate(45deg);
}

.overlay-close .x2 {
    transform: rotate(-45deg);
}

/* Ensure menu label sits on the right on large screens */
@media (min-width: 992px) {
    .navbar .menu-toggle {
        margin-left: auto !important;
        margin-right: 0 !important;
    }
}

/* Place menu button at far right on all screens */
.navbar .menu-toggle {
    margin-left: auto !important;
    margin-right: 0 !important;
}

/* Contact form styling */
.contact-form .form-label {
    color: var(--text-0);
    opacity: .9;
}

.contact-form .form-control,
.contact-form .form-select,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-0) !important;
    border-radius: 10px;
    padding-top: 1rem;
    padding-bottom: 0.6rem;
    padding-left: 1rem;
    padding-right: 2.5rem; /* extra room for right-side icon */
    font-size: 0.95rem;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.25);
}

.contact-form .form-control::placeholder,
.contact-form textarea::placeholder {
    color: var(--muted);
}

.contact-form .form-control:focus,
.contact-form .form-select:focus,
.contact-form textarea:focus {
    border-color: rgba(42, 168, 255, 0.6) !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(42, 168, 255, 0.12) !important;
    outline: none;
}

/* Floating labels and icons */
.contact-form .form-floating > label {
    color: var(--muted);
    background-color: transparent !important; /* remove default bg behind floating labels */
}

/* Ensure overrides apply against Bootstrap's .form-floating rules */
.contact-form .form-floating > .form-control,
.contact-form .form-floating > .form-select,
.contact-form .form-floating > textarea {
    padding-left: 1rem !important;
    padding-right: 2.5rem !important; /* extra room for right-side icon */
    padding-top: 1rem !important;
    padding-bottom: 0.6rem !important;
}

.contact-form .form-floating > label {
    padding-left: 1.25rem !important;
    padding-right: 2.75rem !important;
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Keep label transparent in all floated states */
.contact-form .form-floating > .form-control:focus ~ label,
.contact-form .form-floating > .form-control:not(:placeholder-shown) ~ label,
.contact-form .form-floating > textarea:focus ~ label,
.contact-form .form-floating > textarea:not(:placeholder-shown) ~ label {
    background: transparent !important;
}

.contact-form .form-floating > .form-control::placeholder {
    color: transparent;
}

.contact-form .form-floating > .form-control:focus ~ label,
.contact-form .form-floating > .form-control:not(:placeholder-shown) ~ label,
.contact-form .form-floating > textarea:focus ~ label,
.contact-form .form-floating > textarea:not(:placeholder-shown) ~ label {
    opacity: .9;
}

.contact-form .has-icon {
    position: relative;
}

.contact-form .form-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-blue);
    opacity: .85;
    pointer-events: none;
}

.contact-form .form-floating textarea ~ .form-icon {
    top: 18px;
    transform: none;
}

/* Smaller textarea height */
.contact-form textarea {
    min-height: 120px !important;
}

.btn-submit {
    border: 1px solid var(--accent-blue);
    color: var(--accent-blue);
    background: transparent;
    font-weight: 700;
    border-radius: 12px;
    transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
    padding: 0.5rem .74rem .25rem .79rem;
}

.btn-submit:hover {
    background: var(--accent-blue);
    color: #0b1320;
    border-color: var(--accent-blue);
    box-shadow: 0 10px 24px rgba(42, 168, 255, 0.25);
}

.btn-submit:active {
    transform: translateY(0);
}

/* Align small outline buttons' content vertically and balance padding */
.btn.btn-sm.btn-outline-light {
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    padding-top: 0.45rem;
    padding-bottom: 0.35rem;
}

/* Electricity effect - Sparkling circles */
.electricity-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.electricity-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: electricity-sparkle 1.2s ease-out forwards;
}

.electricity-circle.small {
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, #fff 30%, var(--accent-blue) 70%, transparent 100%);
    box-shadow:
        0 0 4px var(--accent-blue),
        0 0 8px rgba(42, 168, 255, 0.6),
        0 0 12px rgba(42, 168, 255, 0.3);
}

.electricity-circle.medium {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #fff 20%, var(--accent-green) 50%, var(--accent-blue) 80%, transparent 100%);
    box-shadow:
        0 0 6px var(--accent-green),
        0 0 12px rgba(0, 197, 142, 0.6),
        0 0 18px rgba(42, 168, 255, 0.4);
}

.electricity-circle.large {
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, #fff 15%, var(--accent-blue) 40%, var(--accent-green) 70%, transparent 100%);
    box-shadow:
        0 0 8px var(--accent-blue),
        0 0 16px var(--accent-green),
        0 0 24px rgba(255, 255, 255, 0.3);
}

@keyframes electricity-sparkle {
    0% {
        opacity: 0;
        transform: rotate(0deg);
    }

    20% {
        opacity: 1;
        transform: rotate(180deg);
    }

    40% {
        opacity: 0.9;
        transform: rotate(360deg);
    }

    60% {
        opacity: 1;
        transform: rotate(540deg);
    }

    80% {
        opacity: 0.7;
        transform: rotate(720deg);
    }

    100% {
        opacity: 0;
        transform: rotate(900deg);
    }
}

/* Screen flicker effect */
.screen-flicker {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    opacity: 0;
    pointer-events: none;
    z-index: 10000;
    animation: flicker 0.1s ease-out forwards;
}

@keyframes flicker {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 0.3;
    }

    100% {
        opacity: 0;
    }
}

/* Electric glow overlay */
.electric-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--glow-x, 50%) var(--glow-y, 50%),
            rgba(42, 168, 255, 0.1) 0%,
            rgba(0, 197, 142, 0.05) 30%,
            transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 9998;
    animation: electric-glow 1.2s ease-out forwards;
}

@keyframes electric-glow {
    0% {
        opacity: 0;
        transform: none;
    }

    30% {
        opacity: 0.8;
        transform: none;
    }

    100% {
        opacity: 0;
        transform: none;
    }
}

/* Preloader */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-0);
    display: grid;
    place-items: center;
    z-index: 9999;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.preloader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-inner {
    display: inline-flex;
    gap: 10px;
    align-items: center;
}

.preloader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--muted);
    opacity: 0.85;
    animation: preloader-bounce 1s infinite ease-in-out;
}

.preloader-dot:nth-child(2) {
    animation-delay: 0.15s;
}

.preloader-dot:nth-child(3) {
    animation-delay: 0.30s;
}

@keyframes preloader-bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {

    .preloader,
    .preloader * {
        animation: none !important;
        transition: none !important;
    }
}

.navbar-brand img {
    max-height: 40px;
}

.contact-form-section .form-control {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: #0d0c14;
    background-clip: padding-box;
    border: var(--bs-border-width) solid #283543;
    border-radius: var(--bs-border-radius);
    transition: border-color .15s 
ease-in-out, box-shadow .15s 
ease-in-out;
}

.contact-form-section .form-control:focus {
    background-color: #0d0c14;
    color: var(--text-0) !important;
}

.contact-form-section .form-floating > label {
    background-color: transparent !important;
    backdrop-filter: none !important;
    color:white !important;
}

.contact-form-section .form-floating > label::after {
    background: transparent !important;
}

.contact-form-section .form-floating>.form-control:not(:placeholder-shown)~label {
    color:white;
}
