/* ====== VARIABLES ====== */
:root {
    --best-color: #ff4500;
    --primary-color: #0dcaf0;
    --primary-hover: #0bb8dc;
    --accent-color: #0d6efd;
    --text-color: #333;
    --bg-light: #ffffff;
    --bg-dark: #121212;
    --bg-darker: #1c1c1c;
    --text-light: #e0e0e0;
    --font-family: 'Inter', sans-serif;
}

/* ====== GENERAL ====== */
body {
    font-family: var(--font-family);
    background: linear-gradient(to bottom, var(--bg-light), #f8f9fa);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh; /* ensures body fills viewport */
    transition: background 0.3s ease, color 0.3s ease;
    text-rendering: optimizeLegibility; /* smoother fonts */
}

@media (prefers-color-scheme: dark) {
    body {
        background: var(--bg-dark);
        color: var(--text-light);
    }
}













/* ====== DARK MODE ====== */
body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

body.dark-mode .navbar,
body.dark-mode footer {
    background-color: var(--bg-darker);
}

body.dark-mode .navbar-nav .nav-link,
body.dark-mode footer .social-icons a {
    color: var(--text-light);
    transition: color 0.3s ease; /* smooth hover/focus transitions */
}

body.dark-mode .navbar-nav .nav-link:hover,
body.dark-mode .navbar-nav .nav-link.active,
body.dark-mode footer .social-icons a:hover {
    color: var(--primary-color);
}

/* Buttons dark mode adjustments */
body.dark-mode .btn-outline-primary,
body.dark-mode .btn-custom,
body.dark-mode .design-button {
    background-color: var(--primary-hover);
    color: #fff;
    transition: all 0.3s ease;
}

body.dark-mode .btn-outline-primary:hover,
body.dark-mode .btn-custom:hover,
body.dark-mode .design-button:hover {
    background-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 212, 255, 0.4);
}

/* Cards and sections in dark mode */
body.dark-mode .card-custom,
body.dark-mode .p-4.border.rounded.shadow-sm {
    background-color: var(--bg-darker);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    transition: all 0.3s ease;
}

/* Dark mode hero background override */
body.dark-mode .hero,
body.dark-mode .hero-section {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('../img/hero-bg-dark.jpg') center/cover no-repeat;
}

/* Interactive elements smooth transitions */
body.dark-mode a,
body.dark-mode a:hover,
body.dark-mode a.active,
body.dark-mode a:focus {
    color: var(--text-light);
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

body.dark-mode a:hover,
body.dark-mode a.active,
body.dark-mode a:focus {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Dark mode scrollbars (modern browsers) */
body.dark-mode::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

body.dark-mode::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 10px;
    border: 2px solid var(--bg-darker);
}

/* Smooth transition for the entire page */
body, .hero, .hero-section, .navbar, footer, .card-custom, .btn-outline-primary, .btn-custom, .design-button {
    transition: all 0.3s ease;
}












/* ====== HEADER ====== */
.navbar {
    background-color: #000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    padding: 0.75rem 1.5rem;
    position: relative;
    z-index: 100;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--primary-hover);
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar-nav .nav-link {
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid var(--primary-color);
    transform: scale(1.05);
}

.navbar-nav .nav-link:focus {
    outline: 2px dashed var(--primary-color);
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }

    .navbar-brand {
        font-size: 1.3rem;
    }

    .navbar-nav {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }

    .navbar-nav .nav-link {
        font-size: 0.95rem;
        text-align: center;
        margin-right: 0;
    }
}

body.dark-mode .navbar {
    background-color: var(--bg-darker);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

body.dark-mode .navbar-brand {
    color: var(--primary-color);
}

body.dark-mode .navbar-brand:hover {
    color: var(--primary-hover);
}

body.dark-mode .navbar-nav .nav-link {
    color: var(--text-light);
}

body.dark-mode .navbar-nav .nav-link:hover,
body.dark-mode .navbar-nav .nav-link.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}













/* ====== HERO SECTION ====== */
.hero,
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100vh;
    color: #fff;
    background: url('../images/SH.png') center/cover no-repeat;
    background-attachment: scroll;
    overflow: hidden;
    padding: 0;
}

/* Overlay for readability */
.hero-section::before {
    content: "";
    position: absolute;
    top:0; left:0;
    width:100%; height:100%;
    background: rgba(0,0,0,0.35);
    z-index:0;
}

/* Container above overlay */
.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Hero Heading */
.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.65);
    font-weight: 800;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

/* Typewriter / Subtitle */
.hero-section h2#roles {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    margin-top: 0.5rem;
    color: #00d4ff;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* Hero Paragraph */
.hero-section p {
    font-size: clamp(1rem, 2vw, 1.3rem);
    margin-top: 15px;
    color: #f0f0f0;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Hero Buttons */
.hero-section .btn-outline-primary,
.hero-section .btn-outline-light {
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-section .btn-outline-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,212,255,0.35);
}

.hero-section .btn-outline-light:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(255,255,255,0.35);
}

.text-best {
    color: var(--best-color);
    transition: color 0.3s ease;
}

/* Typewriter text style */
#typewriter {
    color: rgb(6, 231, 252);
    font-size: 2rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    display: inline-block;
}

/* Optional separate blinking cursor */
#cursor {
    display: inline-block;
    margin-left: 2px;
    width: 2px;                  /* cursor width */
    background-color: var(--primary-color);
    animation: fadeCursor 1s infinite;
}

/* Smooth fading effect for cursor */
@keyframes fadeCursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}


@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }
    .hero-section h2#roles {
        font-size: 1.5rem;
    }
    .hero-section p {
        font-size: 1rem;
        padding: 0 15px;
    }
    .hero-section .btn-outline-primary,
    .hero-section .btn-outline-light {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    .hero-section h2#roles {
        font-size: 1.2rem;
    }
    .hero-section p {
        font-size: 0.95rem;
        padding: 0 10px;
    }
    .hero-section .btn-outline-primary,
    .hero-section .btn-outline-light {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}











/* ====== BUTTONS ====== */
.btn-outline-primary {
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-weight: 600;
    border: 2px solid var(--primary-color);
    background-color: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 8px 16px rgba(13, 110, 253, 0.4);
    transform: scale(1.05);
}

.btn-custom {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    padding: 0.6rem 2rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-custom:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(13, 202, 240, 0.4);
}

@media (max-width: 768px) {
    .btn-outline-primary,
    .btn-custom {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .btn-outline-primary,
    .btn-custom {
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }
}












/* ====== FOOTER ====== */
footer {
    background-color: #000;
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Social Icons */
footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

footer .social-icons a {
    color: var(--primary-color);
    font-size: 1.5rem;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

footer .social-icons a:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

@media (max-width: 768px) {
    footer {
        padding: 30px 15px;
    }

    footer .social-icons a {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    footer {
        padding: 25px 10px;
    }

    footer .social-icons a {
        font-size: 1.2rem;
    }
}












/* ====== SCROLL PROGRESS BAR ====== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background-color: var(--accent-color);
    width: 0%;
    z-index: 9999;
    transition: width 0.2s ease-out;
}

/* ====== SECTIONS ====== */
.section-title {
    text-align: center;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 40px;
    color: #212529;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 0.5rem;
}

@media (max-width: 1024px) {
    .section-title {
        font-size: clamp(1.6rem, 4vw, 2.2rem);
        margin-bottom: 35px;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.4rem, 5vw, 2rem);
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.2rem, 6vw, 1.6rem);
        margin-bottom: 20px;
    }
}












/* ====== RESPONSIVE ALL SECTIONS ====== */
@media (max-width: 1024px) {
    /* Hero Section */
    .hero-section h1 {
        font-size: clamp(2.5rem, 6vw, 3.5rem);
    }
    .hero-section h2#roles {
        font-size: clamp(1.5rem, 4vw, 1.8rem);
    }
    .hero-section p {
        font-size: clamp(1rem, 2.5vw, 1.2rem);
    }
    .hero-section .btn-outline-primary,
    .hero-section .btn-outline-light,
    .btn-custom,
    .design-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Tablet / medium devices */
@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.8rem, 4vw, 2rem);
        margin-bottom: 25px;
    }

    .hero-section h1 {
        font-size: clamp(2rem, 5vw, 2.5rem);
    }

    .hero-section h2#roles {
        font-size: clamp(1.4rem, 3vw, 1.6rem);
    }

    .hero-section p {
        font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    }

    .btn-outline-primary,
    .btn-custom,
    .design-button {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }

    .navbar-nav .nav-link {
        margin-right: 10px;
    }

    /* Cards & services */
    .card-custom,
    .p-4.border.rounded.shadow-sm {
        margin-bottom: 20px;
    }

    /* Gallery grid */
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

/* Small devices / phones */
@media (max-width: 480px) {
    .section-title {
        font-size: clamp(1.4rem, 5vw, 1.5rem);
        margin-bottom: 15px;
    }

    .hero-section h1 {
        font-size: clamp(1.6rem, 6vw, 1.8rem);
    }

    .hero-section h2#roles {
        font-size: clamp(1.2rem, 5vw, 1.4rem);
    }

    .hero-section p {
        font-size: clamp(0.9rem, 3vw, 1rem);
    }

    .btn-outline-primary,
    .btn-custom,
    .design-button {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
    }

    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
        padding: 10px;
    }

    /* Footer adjustments */
    footer p,
    footer .social-icons a {
        font-size: 0.85rem;
    }
}











/* ====== BACK TO TOP BUTTON ====== */
#back-to-top {
    position: fixed;
    bottom: 40px;
    right: 30px;
    background-color: var(--primary-color);
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(13, 202, 240, 0.5);
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
    display: none; /* Hidden by default */
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1000;
    animation: pulse 2.5s infinite; /* Subtle pulse effect */
}

/* Hover effect with scale and subtle shadow */
#back-to-top:hover {
    background-color: var(--primary-hover);
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(13, 202, 240, 0.6);
    animation: none; /* Stop pulsing on hover */
}

/* Focus for accessibility */
#back-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 202, 240, 0.4);
}

/* Show button when active - toggle this class with JS */
#back-to-top.show {
    display: block;
    animation: fadeInUp 0.5s ease forwards; /* initial entrance animation */
}

/* Smooth fade-in + upward movement */
@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Subtle idle pulse */
@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(13, 202, 240, 0.5); }
    50% { transform: scale(1.05); box-shadow: 0 6px 16px rgba(13, 202, 240, 0.6); }
}

/* Dark mode adaptation (optional) */
@media (prefers-color-scheme: dark) {
    #back-to-top {
        background-color: var(--primary-hover);
    }

    #back-to-top:hover {
        background-color: var(--primary-color);
    }
}













/* ====== PRELOADER ====== */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  color: var(--primary-color);
  font-family: var(--font-family);
  transition: background 0.5s ease, color 0.5s ease, opacity 0.5s ease;
}

#preloader .spinner {
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

#preloader .preloader-text {
  margin-top: 15px;
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--primary-color);
  animation: pulse 1.5s infinite;
}

/* Spin animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Pulse animation for text */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Fade-out effect */
#preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

/* ====== SYSTEM DARK/LIGHT THEME ====== */
@media (prefers-color-scheme: light) {
  #preloader {
    background: var(--bg-light);
    color: var(--primary-color);
  }

  #preloader .spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--primary-color);
  }
}











/* ====== GALLERY ====== */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    cursor: pointer;
    will-change: transform;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease, filter 0.4s ease;
    border-radius: 12px;
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    filter: brightness(1.1); /* subtle glow/shine effect */
}

.gallery-item .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.4s ease, background 0.4s ease;
    border-radius: 12px;
}

.gallery-item:hover .overlay {
    opacity: 1;
    background: rgba(0, 0, 0, 0.55);
}

.overlay .caption {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    padding: 0 12px;
    transform: translateY(10px);
    transition: transform 0.4s ease, text-shadow 0.4s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.7); /* soft glow on text */
}

/* Animated shine effect */
.gallery-item::after {
    content: "";
    position: absolute;
    top: 0; left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0.2), rgba(255,255,255,0) 70%);
    transform: skewX(-25deg);
    transition: left 0.7s ease;
}

.gallery-item:hover::after {
    left: 125%;
}

/* ====== DARK MODE GALLERY ====== */
@media (prefers-color-scheme: dark) {
    .gallery-item {
        box-shadow: 0 2px 6px rgba(255, 255, 255, 0.05);
    }

    .gallery-item:hover {
        box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3); /* bright glow for dark mode */
        filter: brightness(1.2);
    }

    .gallery-item .overlay {
        background: rgba(0, 0, 0, 0.6);
    }

    .gallery-item:hover .overlay {
        background: rgba(0, 212, 255, 0.1); /* subtle accent overlay */
    }

    .overlay .caption {
        color: #e0e0e0;
    }

    .gallery-item:hover .caption {
        text-shadow: 0 0 12px rgba(0, 212, 255, 0.8);
    }

    .gallery-item::after {
        background: linear-gradient(120deg, rgba(0, 212, 255, 0.2), rgba(0, 212, 255, 0) 70%);
    }
}













/* ====== CARDS & SERVICES ====== */
.card-custom {
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    background: var(--bg-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    overflow: hidden; /* ensures inner animations stay inside */
    position: relative;
}

.card-custom:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

/* Inner content animation */
.card-custom .card-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.card-custom:hover .card-content {
    transform: translateY(-10px);
    opacity: 1;
}

/* Small shadow hover for subtle cards */
.p-4.border.rounded.shadow-sm {
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    background: var(--bg-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.p-4.border.rounded.shadow-sm:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.p-4.border.rounded.shadow-sm .card-content {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.p-4.border.rounded.shadow-sm:hover .card-content {
    transform: translateY(-8px);
    opacity: 1;
}














/* ====== BACK TO TOP BUTTON ====== */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 25px;
    z-index: 999;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    padding: 12px 15px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

#back-to-top.show {
    display: block;
    opacity: 1;
}

#back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-3px) scale(1.1);
}

#back-to-top:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.5);
}











/* ====== ANIMATIONS ====== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 1s ease forwards;
    animation-delay: var(--fade-delay, 0s); /* optional: allows staggered fade-in */
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== BOUNCE ====== */
:root {
    --bounce-height: 20px;
    --bounce-duration: 1.5s;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(calc(-1 * var(--bounce-height)));
    }
}

.bounce {
    display: inline-block;
    animation: bounce var(--bounce-duration) ease-in-out infinite;
}











/* ====== COUNTDOWN ====== */
#countdown {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem; /* optional, makes it more visible */
    letter-spacing: 1px;
}

/* ====== LINKS ====== */
a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    position: relative;
}

a:hover,
a.active,
a:focus {
    color: var(--primary-color);
    font-weight: bold;
    outline: none;
}

/* Optional: smooth underline effect */
a::after {
    content: '';
    display: block;
    width: 0%;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
    position: absolute;
    bottom: -2px;
    left: 0;
}

a:hover::after,
a.active::after,
a:focus::after {
    width: 100%;
}











/* ====== DESIGN BUTTON ====== */
.design-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 10px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    transition: 
        background-color 0.3s ease, 
        transform 0.2s ease, 
        box-shadow 0.3s ease;
    position: relative;
}

/* Smooth hover animation with lift and shadow */
.design-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(13, 202, 240, 0.35);
}

/* Focus & accessibility */
.design-button:focus {
    outline: 2px dashed var(--accent-color);
    outline-offset: 4px;
    background-color: var(--primary-hover);
}

/* Active click state */
.design-button:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 6px rgba(13, 202, 240, 0.25);
}

/* Icon inside button */
.design-button i {
    display: inline-block;
    transition: transform 0.3s ease;
}

/* Icon animation on hover */
.design-button:hover i {
    transform: translateX(5px);
}

/* ====== RESPONSIVE BUTTON ====== */
@media (max-width: 768px) {
    .design-button {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    .design-button:hover i {
        transform: translateX(3px);
    }
}

/* ====== DARK MODE BUTTON ====== */
@media (prefers-color-scheme: dark) {
    .design-button {
        background-color: var(--primary-hover);
        color: #fff;
    }

    .design-button:hover,
    .design-button:focus {
        background-color: var(--primary-color);
    }
}










/* ====== 404 Page Styles ====== */

/* Container */
.error-page {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  padding: 100px 20px;
  min-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #1a1a1a;
  color: #fff;
}

/* Bounce digits */
.bounce {
  font-weight: bold;
  display: inline-block;
  font-size: 6rem;
  color: #ff5c1a;
  margin: 0 5px;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
  animation: bounce 1.5s ease-in-out infinite;
}

/* Bounce keyframes */
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Headings and text */
.error-page h2 {
  font-size: 2rem;
  margin-top: 20px;
  margin-bottom: 15px;
  color: #fff;
}

.error-page p {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #ddd;
}

/* Button */
.error-page .btn-outline-primary {
  font-size: 1.1rem;
  padding: 10px 25px;
  transition: all 0.3s ease-in-out;
}

.error-page .btn-outline-primary:hover {
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.4);
  color: #fff;
  transform: translateY(-3px);
}

/* ====== Particles ====== */
.particle-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 8px; height: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  animation-name: float;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

.particle:nth-child(odd) {
  animation-duration: 4s;
  background-color: rgba(255, 255, 255, 0.8);
}
.particle:nth-child(even) {
  animation-duration: 6s;
  background-color: rgba(255, 255, 255, 0.5);
}

@keyframes float {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-50px) scale(1.3); opacity: 0.7; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* Fade-in on load */
body.loaded .error-page {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .bounce {
    font-size: 4rem;
  }
  .error-page h2 {
    font-size: 1.6rem;
  }
  .error-page p {
    font-size: 1rem;
  }
}