@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap');

/* CSS Variables & Reset */
:root {
    --bg-color: #0b1220;
    --bg-alt: rgba(16, 24, 40, 0.6);
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --primary: #6fa8ff;
    --primary-hover: #5a91e6;
    --secondary: #101828;
    --border: rgba(255, 255, 255, 0.08);
    --soft-glow: rgba(111, 168, 255, 0.3);

    --font-main: 'Inter', sans-serif;

    --transition: all 0.3s ease;
    --radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    animation: pageFade 0.8s ease forwards;
    opacity: 0;
}

@keyframes pageFade {
    to {
        opacity: 1;
    }
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.video-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(5, 10, 20, 0.85) 0%,
            rgba(5, 10, 20, 0.65) 40%,
            rgba(5, 10, 20, 0.85) 100%);
    backdrop-filter: blur(2px);
    z-index: -1;
}

.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(111, 168, 255, 0.15) 0%,
            rgba(111, 168, 255, 0.05) 40%,
            transparent 70%);
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease-out;
    z-index: 0;
    opacity: 0.8;
}

.light-reflection {
    position: fixed;
    inset: 0;
    background: linear-gradient(120deg,
            rgba(255, 255, 255, 0.01) 0%,
            rgba(255, 255, 255, 0.04) 40%,
            rgba(255, 255, 255, 0.01) 80%);
    mix-blend-mode: overlay;
    animation: shimmer 12s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) rotate(10deg);
    }

    100% {
        transform: translateX(100%) rotate(10deg);
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.bg-alt {
    background-color: var(--bg-alt);
    backdrop-filter: blur(8px);
}



/* Space Button Design */
.btn-space {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: auto;
    min-width: 10rem;
    padding: 0 1.5rem;
    overflow: hidden;
    height: 3rem;
    background-size: 300% 300%;
    cursor: pointer;
    backdrop-filter: blur(1rem);
    border-radius: 5rem;
    transition: 0.5s;
    animation: gradient_301 5s ease infinite;
    border: double 4px transparent;
    background-image: linear-gradient(#212121, #212121),
        linear-gradient(137.48deg,
            #ffdb3b 10%,
            #fe53bb 45%,
            #8f51ea 67%,
            #0044ff 87%);
    background-origin: border-box;
    background-clip: content-box, border-box;
    text-decoration: none;
    /* Ensure links don't have underlines */
    position: relative;
    /* Reset default button outlines */
    outline: none;
}

.btn-space strong {
    z-index: 2;
    font-family: inherit;
    /* Use site font */
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ffffff;
    text-shadow: 0 0 4px white;
    text-transform: uppercase;
}

.container-stars {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: 0.5s;
    backdrop-filter: blur(1rem);
    border-radius: 5rem;
    pointer-events: none;
    /* Let clicks pass through */
}

.glow {
    position: absolute;
    display: flex;
    width: 12rem;
    pointer-events: none;
}

.circle {
    width: 100%;
    height: 30px;
    filter: blur(2rem);
    animation: pulse_3011 4s infinite;
    z-index: -1;
}

.circle:nth-of-type(1) {
    background: rgba(254, 83, 186, 0.636);
}

.circle:nth-of-type(2) {
    background: rgba(142, 81, 234, 0.704);
}

.btn-space:hover .container-stars {
    z-index: 1;
    background-color: #212121;
}

.btn-space:hover {
    transform: scale(1.1);
    color: white;
    /* Ensure text remains white */
}

.btn-space:active {
    border: double 4px #fe53bb;
    background-origin: border-box;
    background-clip: content-box, border-box;
    animation: none;
}

.btn-space:active .circle {
    background: #fe53bb;
}

.stars-inner {
    position: relative;
    background: transparent;
    width: 200rem;
    height: 200rem;
}

.stars-inner::after {
    content: "";
    position: absolute;
    top: -10rem;
    left: -100rem;
    width: 100%;
    height: 100%;
    animation: animStarRotate 90s linear infinite;
}

.stars-inner::after {
    background-image: radial-gradient(#ffffff 1px, transparent 1%);
    background-size: 50px 50px;
}

.stars-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 170%;
    height: 500%;
    animation: animStar 60s linear infinite;
}

.stars-inner::before {
    background-image: radial-gradient(#ffffff 1px, transparent 1%);
    background-size: 50px 50px;
    opacity: 0.5;
}

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

    to {
        transform: translateY(-135rem);
    }
}

@keyframes animStarRotate {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0);
    }
}

@keyframes gradient_301 {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulse_3011 {
    0% {
        transform: scale(0.75);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }

    100% {
        transform: scale(0.75);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(12px);
    background: rgba(10, 15, 25, 0.6);
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
}

/* User's Periodic Table Design - Scaled for Navbar */
.logo-element {
    width: 45px;
    height: 45px;
    background: linear-gradient(136deg,
            var(--primary) 60%,
            var(--primary-hover) 92%);
    border: 2px solid var(--primary-hover);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    /* Slight rounding for better UI */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.element-symbol {
    color: #fcfeff;
    font-size: 18px;
    font-weight: 600;
    position: relative;
    line-height: 1;
}

.element-number {
    font-size: 9px;
    position: absolute;
    top: -4px;
    right: -10px;
    font-weight: normal;
}

.logo-text {
    font-family: Georgia, serif;
    font-weight: 900;
    /* Clean white to match site theme */
    color: var(--text-main);
    font-size: 1.5rem;
    padding: 0 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    text-shadow: 0 0 8px var(--soft-glow);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 60px;
}

.hero-content {
    max-width: 800px;
    z-index: 1;
}

.hero .subtitle {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.8);
}

.hero .highlight {
    color: var(--primary);
    text-shadow: 0 0 15px var(--soft-glow);
}

.hero .description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-bg-accent {
    position: absolute;
    top: 20%;
    right: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(15, 23, 42, 0) 70%);
    z-index: 0;
    pointer-events: none;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal on Scroll Class */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

/* ---------- New About Section Card (Uiverse - Spacious74) ---------- */
.about-container-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 0;
}

.outer {
  width: 100%;
  max-width: 750px;
  height: 520px;
  border-radius: 20px;
  padding: 1px;
  background: radial-gradient(circle 400px at 0% 0%, var(--primary), #0a0f19);
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.dot {
  width: 6px;
  aspect-ratio: 1;
  position: absolute;
  background-color: var(--primary);
  box-shadow: 0 0 15px var(--primary);
  border-radius: 100px;
  z-index: 2;
  right: 10%;
  top: 10%;
  animation: moveDot 8s linear infinite;
}

@keyframes moveDot {
  0%, 100% { top: 8%; right: 8%; }
  25% { top: 8%; right: calc(100% - 40px); }
  50% { top: calc(100% - 40px); right: calc(100% - 40px); }
  75% { top: calc(100% - 40px); right: 8%; }
}

.outer .card {
  z-index: 1;
  width: 100%;
  height: 100%;
  border-radius: 19px;
  border: solid 1px rgba(255, 255, 255, 0.05);
  background: radial-gradient(circle 400px at 0% 0%, rgba(30, 41, 59, 0.8), #0a0f19);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-direction: column;
  color: #fff;
  padding: 2rem;
  text-align: center;
  margin: 0; /* Reset previous margin */
  backdrop-filter: blur(10px);
}

.ray {
  width: 280px;
  height: 60px;
  border-radius: 100px;
  position: absolute;
  background-color: var(--primary);
  opacity: 0.25;
  box-shadow: 0 0 60px var(--primary);
  filter: blur(15px);
  transform-origin: 10%;
  top: 0%;
  left: 0;
  transform: rotate(35deg);
  pointer-events: none;
}

.outer .card .text {
  font-weight: 800;
  font-size: 3.5rem;
  background: linear-gradient(45deg, #ffffff 10%, var(--primary), #ffffff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  font-family: 'Orbitron', sans-serif;
  letter-spacing: -1px;
}

.about-desc {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
}

.line {
  width: 100%;
  height: 1px;
  position: absolute;
  background-color: rgba(255, 255, 255, 0.05);
}

.topl {
  top: 15%;
  background: linear-gradient(90deg, var(--primary) 0%, transparent 70%);
  opacity: 0.4;
}

.bottoml {
  bottom: 15%;
}

.leftl {
  left: 10%;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary) 0%, transparent 70%);
  opacity: 0.4;
}

.rightl {
  right: 10%;
  width: 1px;
  height: 100%;
}

@media (max-width: 768px) {
  .outer {
    height: auto;
    min-height: 300px;
  }
  .outer .card .text {
    font-size: 2.5rem;
  }
  .about-desc {
    font-size: 0.95rem;
  }
}



.card:hover .card-title {
    color: #ffffff;
}

/* Mobile adjustments for card */
@media screen and (max-width: 768px) {
    .card {
        padding: 2em 1.2em;
        max-width: 90%;
    }

    .card-title {
        font-size: 1.5em;
    }
}


/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.skill-category {
    background-color: var(--bg-alt);
    /* slightly lighter than main bg */
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.skill-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.skill-category h3 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    color: var(--text-main);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.skill-tags span {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}



@keyframes fadeIn {
    to {
        opacity: 1;
    }
}


/* Education Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--border);
    top: 0;
    bottom: 0;
    left: 20px;
    /* Aligned left for easier mobile response */
    margin-left: -1px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 100%;
    margin-bottom: 2rem;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: auto;
    left: 12px;
    background-color: var(--bg-color);
    border: 3px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-date {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.institution {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Contact */
.contact-container {
    max-width: 600px;
    text-align: center;
}

.contact-subtitle {
    margin-bottom: 3rem;
    color: var(--text-muted);
}

.contact-form {
    text-align: left;
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-main);
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
}

.social-links a:hover {
    color: var(--primary);
}

/* Footer */
.footer {
    padding: 2rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 100vh;
        top: 60px;
        background-color: var(--bg-alt);
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        padding-top: 2rem;
        border-left: 1px solid var(--border);
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .nav-links>li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
    }

    .hamburger {
        display: block;
    }

    .hamburger.toggle .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .hamburger.toggle .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.toggle .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    /* Hero Section Mobile */
    .hero {
        padding-top: 80px;
        text-align: center;
        /* Center content on mobile */
        justify-content: center;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        /* Smaller font for mobile */
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .hero .description {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .cta-group {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .cta-group .btn-ridge {
        margin-left: 0 !important;
        /* Remove inline style margin */
        width: 80%;
        /* Wider buttons */
    }

    /* About Section Mobile */
    .about-content {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 2rem;
    }

    /* Skills Mobile */
    .skills-grid {
        grid-template-columns: 1fr;
        /* Single column for skills */
    }

    /* Projects Mobile */
    .projects-grid-modern {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* General Padding */
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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



/* Matrix Grid Background Removed */


/* Removed unused book design */




/* Carousel 3D Cards */
.carousel-wrapper {
    width: 100%;
    height: 400px;
    /* Allocated height for the 3D rotator */
    position: relative;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 3rem;
    perspective: 1000px;
}

.carousel-inner {
    --w: 120px;
    /* Reduced specific width for cleaner look on responsive */
    --h: 170px;
    --translateZ: calc((var(--w) + var(--h)) + 20px);
    --rotateX: -15deg;
    --perspective: 1000px;
    position: absolute;
    width: var(--w);
    height: var(--h);
    top: 10%;
    left: calc(50% - (var(--w) / 2));
    z-index: 2;
    transform-style: preserve-3d;
    transform: perspective(var(--perspective));
    animation: rotating 40s linear infinite;
}

/* Pause animation on hover for better interaction */
.carousel-inner:hover {
    animation-play-state: paused;
}

@keyframes rotating {
    from {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(0);
    }

    to {
        transform: perspective(var(--perspective)) rotateX(var(--rotateX)) rotateY(1turn);
    }
}

.carousel-card {
    position: absolute;
    border: 1px solid rgba(var(--color-card), 0.5);
    border-radius: 12px;
    overflow: hidden;
    inset: 0;
    transform: rotateY(calc((360deg / var(--quantity)) * var(--index))) translateZ(var(--translateZ));
    background: rgba(15, 23, 42, 0.6);
    /* More transparent dark background */
    transition: all 0.5s;
    cursor: pointer;
}

.carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle,
            rgba(var(--color-card), 0.2) 0%,
            rgba(var(--color-card), 0.6) 80%,
            rgba(var(--color-card), 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    padding: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Contact Section - Galaxy Design (Uiverse.io by Amankrah) */
.galaxy {
    height: 800px;
    width: 800px;
    background-image: radial-gradient(#ffffff 1px, transparent 1px),
        radial-gradient(#ffffff 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: twinkle 5s infinite;
    opacity: 0.3;
    pointer-events: none;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

.cosmic-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.cosmic-input-main {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.input {
    background-color: #05071b;
    border: none;
    width: 100%;
    height: 56px;
    border-radius: 10px;
    color: #a9c7ff;
    padding-inline: 59px;
    font-size: 1rem;
    box-sizing: border-box;
}

textarea.input {
    height: 150px;
    padding-top: 15px;
    resize: vertical;
}

.input::placeholder {
    color: #6e8cff;
}

.input:focus {
    outline: none;
}

.cosmic-input-main:focus-within>.cosmic-input-mask {
    display: none;
}

.cosmic-input-mask {
    pointer-events: none;
    width: 100px;
    height: 20px;
    position: absolute;
    background: linear-gradient(90deg, transparent, #05071b);
    top: 18px;
    left: 70px;
}

.cosmic-glow {
    pointer-events: none;
    width: 30px;
    height: 20px;
    position: absolute;
    background: #4d6dff;
    top: 10px;
    left: 5px;
    filter: blur(20px);
    opacity: 0.8;
    transition: all 2s;
}

.cosmic-input-main:hover>.cosmic-glow {
    opacity: 0;
}

/* Background Elements */
.stardust,
.cosmic-ring,
.starfield,
.nebula {
    max-height: 70px;
    max-width: 420px;
    /* Allow slightly wider to fit mask */
    height: 100%;
    width: 100%;
    position: absolute;
    overflow: hidden;
    z-index: -1;
    border-radius: 12px;
    filter: blur(3px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.textarea-wrapper .stardust,
.textarea-wrapper .cosmic-ring,
.textarea-wrapper .starfield,
.textarea-wrapper .nebula {
    max-height: 165px;
}


.stardust {
    max-height: 63px;
    max-width: 410px;
    border-radius: 10px;
    filter: blur(2px);
}

.textarea-wrapper .stardust {
    max-height: 158px;
}

.stardust::before {
    content: "";
    z-index: -2;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(83deg);
    position: absolute;
    width: 600px;
    height: 600px;
    background-repeat: no-repeat;
    background-position: 0 0;
    filter: brightness(1.4);
    background-image: conic-gradient(rgba(0, 0, 0, 0) 0%,
            #4d6dff,
            rgba(0, 0, 0, 0) 8%,
            rgba(0, 0, 0, 0) 50%,
            #6e8cff,
            rgba(0, 0, 0, 0) 58%);
    transition: all 2s;
}

.cosmic-ring {
    max-height: 59px;
    max-width: 405px;
    border-radius: 11px;
    filter: blur(0.5px);
}

.textarea-wrapper .cosmic-ring {
    max-height: 154px;
}

.cosmic-ring::before {
    content: "";
    z-index: -2;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(70deg);
    position: absolute;
    width: 600px;
    height: 600px;
    filter: brightness(1.3);
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(#05071b,
            #4d6dff 5%,
            #05071b 14%,
            #05071b 50%,
            #6e8cff 60%,
            #05071b 64%);
    transition: all 2s;
}

.starfield {
    max-height: 65px;
    max-width: 415px;
}

.textarea-wrapper .starfield {
    max-height: 160px;
}

.starfield::before {
    content: "";
    z-index: -2;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(82deg);
    position: absolute;
    width: 600px;
    height: 600px;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(rgba(0, 0, 0, 0),
            #1c2452,
            rgba(0, 0, 0, 0) 10%,
            rgba(0, 0, 0, 0) 50%,
            #2a3875,
            rgba(0, 0, 0, 0) 60%);
    transition: all 2s;
}

/* Animations on Hover */
.cosmic-input-wrapper:hover>.starfield::before {
    transform: translate(-50%, -50%) rotate(-98deg);
}

.cosmic-input-wrapper:hover>.nebula::before {
    transform: translate(-50%, -50%) rotate(-120deg);
}

.cosmic-input-wrapper:hover>.stardust::before {
    transform: translate(-50%, -50%) rotate(-97deg);
}

.cosmic-input-wrapper:hover>.cosmic-ring::before {
    transform: translate(-50%, -50%) rotate(-110deg);
}

/* Animations on Focus */
.cosmic-input-wrapper:focus-within>.starfield::before {
    transform: translate(-50%, -50%) rotate(442deg);
    transition: all 4s;
}

.cosmic-input-wrapper:focus-within>.nebula::before {
    transform: translate(-50%, -50%) rotate(420deg);
    transition: all 4s;
}

.cosmic-input-wrapper:focus-within>.stardust::before {
    transform: translate(-50%, -50%) rotate(443deg);
    transition: all 4s;
}

.cosmic-input-wrapper:focus-within>.cosmic-ring::before {
    transform: translate(-50%, -50%) rotate(430deg);
    transition: all 4s;
}

.nebula {
    overflow: hidden;
    filter: blur(30px);
    opacity: 0.4;
    max-height: 130px;
    max-width: 450px;
}

.textarea-wrapper .nebula {
    max-height: 200px;
}

.nebula:before {
    content: "";
    z-index: -2;
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(60deg);
    position: absolute;
    width: 999px;
    height: 999px;
    background-repeat: no-repeat;
    background-position: 0 0;
    background-image: conic-gradient(#000,
            #4d6dff 5%,
            #000 38%,
            #000 50%,
            #6e8cff 60%,
            #000 87%);
    transition: all 2s;
}

.wormhole-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    max-height: 40px;
    max-width: 38px;
    height: 100%;
    width: 100%;
    isolation: isolate;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(180deg, #1c2452, #05071b, #2a3875);
    border: 1px solid transparent;
}

.textarea-wrapper .wormhole-icon {
    /* Stick to top right even in textarea */
    bottom: auto;
}

.wormhole-border {
    height: 42px;
    width: 40px;
    position: absolute;
    overflow: hidden;
    top: 7px;
    right: 7px;
    border-radius: 10px;
}

.wormhole-border::before {
    content: "";
    text-align: center;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
    position: absolute;
    width: 600px;
    height: 600px;
    background-repeat: no-repeat;
    background-position: 0 0;
    filter: brightness(1.35);
    background-image: conic-gradient(rgba(0, 0, 0, 0),
            #4d6dff,
            rgba(0, 0, 0, 0) 50%,
            rgba(0, 0, 0, 0) 50%,
            #6e8cff,
            rgba(0, 0, 0, 0) 100%);
    animation: rotate 4s linear infinite;
}

.input-icon {
    position: absolute;
    left: 20px;
    top: 16px;
    z-index: 2;
}

@keyframes rotate {
    100% {
        transform: translate(-50%, -50%) rotate(450deg);
    }
}

/* BB-8 Toggle Button Design (Uiverse.io by Galahhad) */
.bb8-toggle {
    --toggle-size: 10px;
    /* Scaled down for button usage */
    --toggle-width: 10.625em;
    --toggle-height: 5.625em;
    --toggle-offset: calc((var(--toggle-height) - var(--bb8-diameter)) / 2);
    --toggle-bg: linear-gradient(#2c4770, #070e2b 35%, #628cac 50% 70%, #a6c5d4) no-repeat;
    --bb8-diameter: 4.375em;
    --radius: 99em;
    --transition: 0.4s;
    --accent: #38bdf8;
    /* Modified to match site primary color (Cyan) */
    --bb8-bg: #fff;
    cursor: pointer;
    margin-top: var(--margin-top-for-head);
    font-size: var(--toggle-size);
    display: inline-block;
    position: relative;
    /* Ensure it sits nicely in flow */
    vertical-align: middle;
}

.bb8-toggle *,
.bb8-toggle *::before,
.bb8-toggle *::after {
    box-sizing: border-box;
}

.bb8-toggle__checkbox {
    appearance: none;
    display: none;
}

.bb8-toggle__container {
    width: var(--toggle-width);
    height: var(--toggle-height);
    background: var(--toggle-bg);
    background-size: 100% 11.25em;
    background-position-y: -5.625em;
    border-radius: var(--radius);
    position: relative;
    transition: var(--transition);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    /* Added shadow for depth */
}

/* Button Text Overlay */
.bb8-action-text {
    position: absolute;
    top: 50%;
    right: 1.5em;
    /* Moved to right to avoid overlap with BB-8 on the left */
    left: auto;
    transform: translateY(-50%);
    z-index: 0;
    /* Start behind droid to handle overlap gracefully during animation */
    color: #fff;
    font-size: 1.4em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    pointer-events: none;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    white-space: nowrap;
    opacity: 0.9;
    mix-blend-mode: normal;
}

/* Hover effect to reveal clear scenery or emphasize text */
.bb8-toggle:hover .bb8-action-text {
    opacity: 1;
    mix-blend-mode: normal;
}

.bb8 {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
    top: calc(var(--toggle-offset) - 1.688em + 0.188em);
    left: var(--toggle-offset);
    transition: var(--transition);
    z-index: 2;
}

.bb8__head-container {
    position: relative;
    transition: var(--transition);
    z-index: 2;
    transform-origin: 1.25em 3.75em;
}

.bb8__head {
    overflow: hidden;
    margin-bottom: -0.188em;
    width: 2.5em;
    height: 1.688em;
    background: linear-gradient(transparent 0.063em,
            dimgray 0.063em 0.313em,
            transparent 0.313em 0.375em,
            var(--accent) 0.375em 0.5em,
            transparent 0.5em 1.313em,
            silver 1.313em 1.438em,
            transparent 1.438em),
        linear-gradient(45deg, transparent 0.188em, var(--bb8-bg) 0.188em 1.25em, transparent 1.25em),
        linear-gradient(135deg, transparent 0.188em, var(--bb8-bg) 0.188em 1.25em, transparent 1.25em),
        linear-gradient(var(--bb8-bg) 1.25em, transparent 1.25em);
    border-radius: var(--radius) var(--radius) 0 0;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 0.063em 0.125em gray);
}

.bb8__head::before {
    content: '';
    position: absolute;
    width: 0.563em;
    height: 0.563em;
    background: radial-gradient(0.125em circle at 0.25em 0.375em, red, transparent),
        radial-gradient(0.063em circle at 0.375em 0.188em, var(--bb8-bg) 50%, transparent 100%),
        linear-gradient(45deg, #000 0.188em, dimgray 0.313em 0.375em, #000 0.5em);
    border-radius: var(--radius);
    top: 0.413em;
    left: 50%;
    transform: translate(-50%);
    box-shadow: 0 0 0 0.089em lightgray, 0.563em 0.281em 0 -0.148em,
        0.563em 0.281em 0 -0.1em var(--bb8-bg), 0.563em 0.281em 0 -0.063em;
    z-index: 1;
    transition: var(--transition);
}

.bb8__head::after {
    content: '';
    position: absolute;
    bottom: 0.375em;
    left: 0;
    width: 100%;
    height: 0.188em;
    background: linear-gradient(to right,
            var(--accent) 0.125em,
            transparent 0.125em 0.188em,
            var(--accent) 0.188em 0.313em,
            transparent 0.313em 0.375em,
            var(--accent) 0.375em 0.938em,
            transparent 0.938em 1em,
            var(--accent) 1em 1.125em,
            transparent 1.125em 1.875em,
            var(--accent) 1.875em 2em,
            transparent 2em 2.063em,
            var(--accent) 2.063em 2.25em,
            transparent 2.25em 2.313em,
            var(--accent) 2.313em 2.375em,
            transparent 2.375em 2.438em,
            var(--accent) 2.438em);
    transition: var(--transition);
}

.bb8__antenna {
    position: absolute;
    transform: translateY(-90%);
    width: 0.059em;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: var(--transition);
}

.bb8__antenna:nth-child(1) {
    height: 0.938em;
    right: 0.938em;
    background: linear-gradient(#000 0.188em, silver 0.188em);
}

.bb8__antenna:nth-child(2) {
    height: 0.375em;
    left: 50%;
    transform: translate(-50%, -90%);
    background: silver;
}

.bb8__body {
    width: 4.375em;
    height: 4.375em;
    background: var(--bb8-bg);
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    z-index: 1;
    transform: rotate(45deg);
    background: linear-gradient(-90deg,
            var(--bb8-bg) 4%,
            var(--accent) 4% 10%,
            transparent 10% 90%,
            var(--accent) 90% 96%,
            var(--bb8-bg) 96%),
        linear-gradient(var(--bb8-bg) 4%,
            var(--accent) 4% 10%,
            transparent 10% 90%,
            var(--accent) 90% 96%,
            var(--bb8-bg) 96%),
        linear-gradient(to right, transparent 2.156em, silver 2.156em 2.219em, transparent 2.188em),
        linear-gradient(transparent 2.156em, silver 2.156em 2.219em, transparent 2.188em);
    background-color: var(--bb8-bg);
}

.bb8__body::after {
    content: '';
    bottom: 1.5em;
    left: 0.563em;
    position: absolute;
    width: 0.188em;
    height: 0.188em;
    background: rgb(236, 236, 236);
    color: rgb(236, 236, 236);
    border-radius: 50%;
    box-shadow: 0.875em 0.938em, 0 -1.25em, 0.875em -2.125em, 2.125em -2.125em,
        3.063em -1.25em, 3.063em 0, 2.125em 0.938em;
}

.bb8__body::before {
    content: '';
    width: 2.625em;
    height: 2.625em;
    position: absolute;
    border-radius: 50%;
    z-index: 0.1;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0.313em solid var(--accent);
    background: radial-gradient(1em circle at center, rgb(236, 236, 236) 50%, transparent 51%),
        radial-gradient(1.25em circle at center, var(--bb8-bg) 50%, transparent 51%),
        linear-gradient(-90deg, transparent 42%, var(--accent) 42% 58%, transparent 58%),
        linear-gradient(var(--bb8-bg) 42%, var(--accent) 42% 58%, var(--bb8-bg) 58%);
}

.artificial__hidden {
    position: absolute;
    border-radius: inherit;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.bb8__shadow {
    content: '';
    width: var(--bb8-diameter);
    height: 20%;
    border-radius: 50%;
    background: #3a271c;
    box-shadow: 0.313em 0 3.125em #3a271c;
    opacity: 0.25;
    position: absolute;
    bottom: 0;
    left: calc(var(--toggle-offset) - 0.938em);
    transition: var(--transition);
    transform: skew(-70deg);
    z-index: 1;
}

.bb8-toggle__scenery {
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    position: relative;
    border-radius: inherit;
}

.bb8-toggle__scenery::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 30%;
    bottom: 0;
    background: #b18d71;
    z-index: 1;
}

.bb8-toggle__cloud {
    z-index: 1;
    position: absolute;
    border-radius: 50%;
}

.bb8-toggle__cloud:nth-last-child(1) {
    width: 0.875em;
    height: 0.625em;
    filter: blur(0.125em) drop-shadow(0.313em 0.313em #ffffffae) drop-shadow(-0.625em 0 #fff) drop-shadow(-0.938em -0.125em #fff);
    right: 1.875em;
    top: 2.813em;
    background: linear-gradient(to top right, #ffffffae, #ffffffae);
    transition: var(--transition);
}

.bb8-toggle__cloud:nth-last-child(2) {
    top: 0.625em;
    right: 4.375em;
    width: 0.875em;
    height: 0.375em;
    background: #dfdedeae;
    filter: blur(0.125em) drop-shadow(-0.313em -0.188em #e0dfdfae) drop-shadow(-0.625em -0.188em #bbbbbbae) drop-shadow(-1em 0.063em #cfcfcfae);
    transition: 0.6s;
}

.bb8-toggle__cloud:nth-last-child(3) {
    top: 1.25em;
    right: 0.938em;
    width: 0.875em;
    height: 0.375em;
    background: #ffffffae;
    filter: blur(0.125em) drop-shadow(0.438em 0.188em #ffffffae) drop-shadow(-0.625em 0.313em #ffffffae);
    transition: 0.8s;
}

.gomrassen,
.hermes,
.chenini {
    position: absolute;
    border-radius: var(--radius);
    background: linear-gradient(#fff, #6e8ea2);
    top: 100%;
}

.gomrassen {
    left: 0.938em;
    width: 1.875em;
    height: 1.875em;
    box-shadow: 0 0 0.188em #ffffff52, 0 0 0.188em #6e8ea24b;
    transition: var(--transition);
}

.gomrassen::before,
.gomrassen::after {
    content: '';
    position: absolute;
    border-radius: inherit;
    box-shadow: inset 0 0 0.063em rgb(140, 162, 169);
    background: rgb(184, 196, 200);
}

.gomrassen::before {
    left: 0.313em;
    top: 0.313em;
    width: 0.438em;
    height: 0.438em;
}

.gomrassen::after {
    width: 0.25em;
    height: 0.25em;
    left: 1.25em;
    top: 0.75em;
}

.hermes {
    left: 3.438em;
    width: 0.625em;
    height: 0.625em;
    box-shadow: 0 0 0.125em #ffffff52, 0 0 0.125em #6e8ea24b;
    transition: 0.6s;
}

.chenini {
    left: 4.375em;
    width: 0.5em;
    height: 0.5em;
    box-shadow: 0 0 0.125em #ffffff52, 0 0 0.125em #6e8ea24b;
    transition: 0.8s;
}

.tatto-1,
.tatto-2 {
    position: absolute;
    width: 1.25em;
    height: 1.25em;
    border-radius: var(--radius);
}

.tatto-1 {
    background: #fefefe;
    right: 3.125em;
    top: 0.625em;
    box-shadow: 0 0 0.438em #fdf4e1;
    transition: var(--transition);
}

.tatto-2 {
    background: linear-gradient(#e6ac5c, #d75449);
    right: 1.25em;
    top: 2.188em;
    box-shadow: 0 0 0.438em #e6ad5c3d, 0 0 0.438em #d755494f;
    transition: 0.7s;
}

.bb8-toggle__star {
    position: absolute;
    width: 0.063em;
    height: 0.063em;
    background: #fff;
    border-radius: var(--radius);
    filter: drop-shadow(0 0 0.063em #fff);
    color: #fff;
    top: 100%;
}

.bb8-toggle__star:nth-child(1) {
    left: 3.75em;
    box-shadow: 1.25em 0.938em, -1.25em 2.5em, 0 1.25em, 1.875em 0.625em,
        -3.125em 1.875em, 1.25em 2.813em;
    transition: 0.2s;
}

.bb8-toggle__star:nth-child(2) {
    left: 4.688em;
    box-shadow: 0.625em 0, 0 0.625em, -0.625em -0.625em, 0.625em 0.938em,
        -3.125em 1.25em, 1.25em -1.563em;
    transition: 0.3s;
}

.bb8-toggle__star:nth-child(3) {
    left: 5.313em;
    box-shadow: -0.625em -0.625em, -2.188em 1.25em, -2.188em 0,
        -3.75em -0.625em, -3.125em -0.625em, -2.5em -0.313em, 0.75em -0.625em;
    transition: var(--transition);
}

.bb8-toggle__star:nth-child(4) {
    left: 1.875em;
    width: 0.125em;
    height: 0.125em;
    transition: 0.5s;
}

.bb8-toggle__star:nth-child(5) {
    left: 5em;
    width: 0.125em;
    height: 0.125em;
    transition: 0.6s;
}

.bb8-toggle__star:nth-child(6) {
    left: 2.5em;
    width: 0.125em;
    height: 0.125em;
    transition: 0.7s;
}

.bb8-toggle__star:nth-child(7) {
    left: 3.438em;
    width: 0.125em;
    height: 0.125em;
    transition: 0.8s;
}

/* Actions */

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(1) {
    top: 0.625em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(2) {
    top: 1.875em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(3) {
    top: 1.25em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(4) {
    top: 3.438em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(5) {
    top: 3.438em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(6) {
    top: 0.313em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__star:nth-child(7) {
    top: 1.875em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8-toggle__cloud {
    right: -100%;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .gomrassen {
    top: 0.938em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .hermes {
    top: 2.5em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .chenini {
    top: 2.75em;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container {
    background-position-y: 0;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .tatto-1 {
    top: 100%;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .tatto-2 {
    top: 100%;
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8 {
    left: calc(100% - var(--bb8-diameter) - var(--toggle-offset));
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8__shadow {
    left: calc(100% - var(--bb8-diameter) - var(--toggle-offset) + 0.938em);
    transform: skew(70deg);
}

.bb8-toggle__checkbox:checked+.bb8-toggle__container .bb8__body {
    transform: rotate(225deg);
}

.bb8-toggle__checkbox:hover+.bb8-toggle__container .bb8__head::before {
    left: 100%;
}

.bb8-toggle__checkbox:not(:checked):hover+.bb8-toggle__container .bb8__antenna:nth-child(1) {
    right: 1.5em;
}

.bb8-toggle__checkbox:hover+.bb8-toggle__container .bb8__antenna:nth-child(2) {
    left: 0.938em;
}

.bb8-toggle__checkbox:hover+.bb8-toggle__container .bb8__head::after {
    background-position: 1.375em 0;
}

.bb8-toggle__checkbox:checked:hover+.bb8-toggle__container .bb8__head::before {
    left: 0;
}

.bb8-toggle__checkbox:checked:hover+.bb8-toggle__container .bb8__antenna:nth-child(2) {
    left: calc(100% - 0.938em);
}

.bb8-toggle__checkbox:checked:hover+.bb8-toggle__container .bb8__head::after {
    background-position: -1.375em 0;
}

.bb8-toggle__checkbox:active+.bb8-toggle__container .bb8__head-container {
    transform: rotate(25deg);
}

.bb8-toggle__checkbox:checked:active+.bb8-toggle__container .bb8__head-container {
    transform: rotate(-25deg);
}

.bb8:hover .bb8__head::before,
.bb8:hover .bb8__antenna:nth-child(2) {
    left: 50% !important;
}

.bb8:hover .bb8__antenna:nth-child(1) {
    right: 0.938em !important;
}

.bb8:hover .bb8__head::after {
    background-position: 0 0 !important;
}

/* Send Button Design (Uiverse.io by adamgiebl) */
.btn-send {
    font-family: inherit;
    font-size: 20px;
    background: royalblue;
    color: white;
    padding: 0.7em 1em;
    padding-left: 0.9em;
    display: flex;
    align-items: center;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    margin-top: 2rem;
    /* Spacing from inputs */
}

.btn-send span {
    display: block;
    margin-left: 0.3em;
    transition: all 0.3s ease-in-out;
}

.btn-send svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
}

.btn-send:hover .svg-wrapper {
    animation: fly-1 0.6s ease-in-out infinite alternate;
}

.btn-send:hover svg {
    transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

.btn-send:hover span {
    transform: translateX(5em);
}

.btn-send:active {
    transform: scale(0.95);
}

@keyframes fly-1 {
    from {
        transform: translateY(0.1em);
    }

    to {
        transform: translateY(-0.1em);
    }
}


/* Ridge Button Design (Uiverse.io by Navarog21) */
.btn-ridge {
    padding: 0.8rem 2rem;
    background: rgba(30, 60, 120, 0.6);
    border: 1px solid rgba(100, 150, 255, 0.4);
    backdrop-filter: blur(6px);
    color: white;
    transition: all 0.3s ease;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-ridge:hover {
    background: rgba(50, 90, 180, 0.8);
    box-shadow: 0 0 20px rgba(80, 140, 255, 0.6);
    transform: translateY(-2px);
}

.btn-ridge::after,
.btn-ridge::before {
    display: none;
}


/* GitHub Button Design (Uiverse.io by vinodjangid07) */
.btn-github {
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: .4s;
    cursor: pointer;
    position: relative;
    background-color: rgb(31, 31, 31);
    overflow: hidden;
    text-decoration: none;
    /* For text inside anchor */
}

.btn-github .svgIcon {
    transition-duration: .3s;
}

.btn-github .svgIcon path {
    fill: white;
}

.btn-github .text {
    position: absolute;
    color: rgb(255, 255, 255);
    width: 120px;
    font-weight: 600;
    opacity: 0;
    transition-duration: .4s;
    font-size: 0.8rem;
    /* Adjusted for fit */
    white-space: nowrap;
    /* Prevent wrap */
    text-align: center;
}

.btn-github:hover {
    width: 140px;
    /* Slight increase to fit text */
    transition-duration: .4s;
    border-radius: 30px;
}

.btn-github:hover .text {
    opacity: 1;
    transition-duration: .4s;
}

.btn-github:hover .svgIcon {
    opacity: 0;
    transition-duration: .3s;
}


/* Ensure GitHub button opacity transitions are explicit */
.btn-github .svgIcon {
    opacity: 1;
    transition: all 0.3s;
}

.btn-github:hover .svgIcon {
    opacity: 0;
}


/* Light Button Design (Uiverse.io by SalladShooter) */
/* Scaled down version for social links */

/* Social Media Icons Styling */
.social-wrapper {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-top: 2rem;
    align-items: center;
}

.icon {
    display: inline-flex;
    width: 60px;
    height: 60px;
    text-decoration: none;
    font-size: 25px;
    outline: 2px solid white;
    border-radius: 50%;
    transition-property: outline-offset, outline-color, background-color;
    transition-duration: 0.25s;
    color: white;
    background-color: transparent;
}

.icon:hover {
    outline-offset: 4px;
}

.icon svg {
    margin: auto;
    width: 31px;
}

.icon-instagram:hover {
    background-color: #e4405f;
    outline-color: #e4405f;
}

.icon-github:hover {
    background-color: #555555;
    outline-color: #555555;
}

.icon-in:hover {
    background-color: #0a66c2;
    outline-color: #0a66c2;
}

.icon-gmail:hover {
    background-color: #d14836;
    outline-color: #d14836;
}

.icon:hover svg {
    animation: shake_icon 0.25s;
}

@keyframes shake_icon {
    10% {
        transform: rotate(15deg);
    }

    20% {
        transform: rotate(-15deg);
    }
}


/* Race Card Design (from Uiverse.io by Vosoone) */
.race-card {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 500px;
    /* Increased slightly for content */
    width: 90%;
    padding: 20px 30px;
    border-radius: 35px;
    background: rgba(15, 23, 42, 0.8);
    /* Adapted to dark theme */
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    /* Primary color border */
    color: #fff;
    font-family: 'Inter', sans-serif;
    margin: 0 auto;
    /* Center it */
}

.track-container {
    width: 55%;
    text-align: center;
    position: relative;
}

.track-svg {
    width: 100%;
    height: auto;
    transform: rotate(0deg);
    /* Adjusted rotation */
    filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.5));
}

.sector-text {
    margin-top: 10px;
    font-size: 14px;
    color: #94a3b8;
    /* text-muted */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.lap-times {
    width: 45%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Increased gap */
    font-size: 14px;
    color: #38bdf8;
    /* Primary color */
}

.lap-times div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.lap-times .current-lap {
    font-weight: bold;
    font-size: 18px;
    color: #fff;
    border-bottom: 2px solid #38bdf8;
}

.lap-times span:first-child {
    color: #cbd5e1;
    /* Lighter gray */
}

/* Response adjustments */
@media (max-width: 480px) {
    .race-card {
        flex-direction: column;
        width: 90%;
        gap: 30px;
    }

    .track-container,
    .lap-times {
        width: 100%;
    }
}


/* Skills Grid Layout */
.skills-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    margin-top: 2rem;
}

.race-card {
    /* Adjust width for grid */
    width: 45%;
    min-width: 350px;
    flex-direction: column;
    /* Stack track on top of times for better fit */
    gap: 15px;
    padding: 25px;
    /* Keep existing styles */
    display: flex;
    align-items: center;
    border-radius: 35px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #fff;
    font-family: 'Inter', sans-serif;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.race-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.6);
}

.track-container {
    width: 100%;
    text-align: center;
    height: 180px;
    /* Fixed height for track area */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.track-svg {
    width: 100%;
    height: 100%;
    max-width: 250px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

.sector-text {
    margin-top: 5px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #f8fafc;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.lap-times {
    width: 100%;
    margin-top: 10px;
}

/* F1 Car Style */
.f1-car-body {
    fill: #ef4444;
}

.f1-car-tire {
    fill: #1f2937;
}

.f1-car-wing {
    fill: #b91c1c;
}

.f1-car-cockpit {
    fill: #111827;
}

/* Responsive Grid */
@media (max-width: 768px) {
    .race-card {
        width: 100%;
    }
}



.navbar {
    background-color: rgba(10, 15, 25, 0.3) !important;
    /* Highly translucent */
    backdrop-filter: blur(15px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, opacity 0.4s ease, background-color 0.3s ease;
}

.navbar.nav-hidden {
    transform: translateY(-100%);
    opacity: 0;
}

.logo {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.logo .dot {
    text-shadow: 0 0 10px var(--primary);
}

.nav-links a {
    font-family: 'Orbitron', sans-serif !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    position: relative;
    text-decoration: none;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
    box-shadow: 0 0 8px var(--primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(56, 189, 248, 0.6);
}



/* Glitch Text Effect */
.glitch {
    position: relative;
    color: var(--text-main);
    font-size: 2.5rem;
    font-weight: 700;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    /* Match background to hide original text */
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1px 0 #00fff9;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(2px, 9999px, 86px, 0);
        transform: skew(0.75deg);
    }

    5% {
        clip: rect(65px, 9999px, 3px, 0);
        transform: skew(0.48deg);
    }

    10% {
        clip: rect(59px, 9999px, 5px, 0);
        transform: skew(0.57deg);
    }

    15% {
        clip: rect(81px, 9999px, 66px, 0);
        transform: skew(0.35deg);
    }

    20% {
        clip: rect(59px, 9999px, 61px, 0);
        transform: skew(0.58deg);
    }

    25% {
        clip: rect(55px, 9999px, 96px, 0);
        transform: skew(0.95deg);
    }

    30% {
        clip: rect(10px, 9999px, 3px, 0);
        transform: skew(0.18deg);
    }

    35% {
        clip: rect(58px, 9999px, 78px, 0);
        transform: skew(0.85deg);
    }

    40% {
        clip: rect(98px, 9999px, 92px, 0);
        transform: skew(0.24deg);
    }

    45% {
        clip: rect(31px, 9999px, 30px, 0);
        transform: skew(0.27deg);
    }

    50% {
        clip: rect(25px, 9999px, 76px, 0);
        transform: skew(0.53deg);
    }

    55% {
        clip: rect(74px, 9999px, 80px, 0);
        transform: skew(0.97deg);
    }

    60% {
        clip: rect(69px, 9999px, 82px, 0);
        transform: skew(0.66deg);
    }

    65% {
        clip: rect(85px, 9999px, 20px, 0);
        transform: skew(0.9deg);
    }

    70% {
        clip: rect(4px, 9999px, 81px, 0);
        transform: skew(0.61deg);
    }

    75% {
        clip: rect(11px, 9999px, 86px, 0);
        transform: skew(0.73deg);
    }

    80% {
        clip: rect(76px, 9999px, 86px, 0);
        transform: skew(0.86deg);
    }

    85% {
        clip: rect(64px, 9999px, 49px, 0);
        transform: skew(0.9deg);
    }

    90% {
        clip: rect(9px, 9999px, 12px, 0);
        transform: skew(0.11deg);
    }

    95% {
        clip: rect(97px, 9999px, 5px, 0);
        transform: skew(0.74deg);
    }

    100% {
        clip: rect(79px, 9999px, 17px, 0);
        transform: skew(0.53deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(92px, 9999px, 59px, 0);
        transform: skew(0.54deg);
    }

    5% {
        clip: rect(90px, 9999px, 7px, 0);
        transform: skew(0.79deg);
    }

    10% {
        clip: rect(42px, 9999px, 23px, 0);
        transform: skew(0.81deg);
    }

    15% {
        clip: rect(4px, 9999px, 16px, 0);
        transform: skew(0.38deg);
    }

    20% {
        clip: rect(80px, 9999px, 81px, 0);
        transform: skew(0.04deg);
    }

    25% {
        clip: rect(66px, 9999px, 34px, 0);
        transform: skew(0.76deg);
    }

    30% {
        clip: rect(74px, 9999px, 92px, 0);
        transform: skew(0.24deg);
    }

    35% {
        clip: rect(95px, 9999px, 17px, 0);
        transform: skew(0.03deg);
    }

    40% {
        clip: rect(76px, 9999px, 19px, 0);
        transform: skew(0.27deg);
    }

    45% {
        clip: rect(3px, 9999px, 90px, 0);
        transform: skew(0.4deg);
    }

    50% {
        clip: rect(65px, 9999px, 91px, 0);
        transform: skew(0.91deg);
    }

    55% {
        clip: rect(100px, 9999px, 95px, 0);
        transform: skew(0.64deg);
    }

    60% {
        clip: rect(19px, 9999px, 85px, 0);
        transform: skew(0.88deg);
    }

    65% {
        clip: rect(60px, 9999px, 21px, 0);
        transform: skew(0.76deg);
    }

    70% {
        clip: rect(31px, 9999px, 94px, 0);
        transform: skew(0.86deg);
    }

    75% {
        clip: rect(98px, 9999px, 21px, 0);
        transform: skew(0.18deg);
    }

    80% {
        clip: rect(61px, 9999px, 32px, 0);
        transform: skew(0.85deg);
    }

    85% {
        clip: rect(82px, 9999px, 60px, 0);
        transform: skew(0.96deg);
    }

    90% {
        clip: rect(43px, 9999px, 64px, 0);
        transform: skew(0.5deg);
    }

    95% {
        clip: rect(81px, 9999px, 2px, 0);
        transform: skew(0.06deg);
    }

    100% {
        clip: rect(14px, 9999px, 96px, 0);
        transform: skew(0.2deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-background {
        display: none;
    }

    body {
        background: #0b1220;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}