:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --neon-blue: #00f3ff;
    --neon-purple: #bc13fe;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #111;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--neon-purple));
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Navbar */
.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all 0.3s ease-in-out;
    background-color: rgba(10, 10, 20, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 243, 255, 0.2);
}

.navbar-brand {
    font-weight: 700;
    text-shadow: 0 0 10px rgba(13, 110, 253, 0.5);
}

.nav-link {
    font-weight: 500;
    margin-left: 10px;
    position: relative;
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue);
    transition: width 0.3s;
}

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

/* Overlay Menu */
.overlay-menu {
    height: 0;
    width: 100%;
    position: fixed;
    z-index: 2000;
    top: 0;
    left: 0;
    background-color: rgba(10, 10, 20, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow-y: hidden;
    transition: 0.5s;
}

.overlay-content {
    position: relative;
    top: 25%;
    width: 100%;
    text-align: center;
    margin-top: 30px;
}

.overlay-menu a {
    padding: 15px;
    text-decoration: none;
    font-size: 36px;
    color: #818181;
    display: block;
    transition: 0.3s;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
}

.overlay-menu a:hover, .overlay-menu a:focus {
    color: var(--neon-blue);
    text-shadow: 0 0 20px var(--neon-blue);
    transform: scale(1.1);
}

.overlay-menu .closebtn {
    position: absolute;
    top: 20px;
    right: 45px;
    font-size: 60px;
    cursor: pointer;
}

@media screen and (max-height: 450px) {
  .overlay-menu a {font-size: 20px}
  .overlay-menu .closebtn {
    font-size: 40px;
    top: 15px;
    right: 35px;
  }
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Hero Section */
.hero-section {
    position: relative;
    background-color: #050510;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tech-grid {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: 
        linear-gradient(rgba(0, 243, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 243, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) translateZ(-200px);
    animation: gridMove 20s linear infinite;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(60deg) translateY(0) translateZ(-200px); }
    100% { transform: perspective(500px) rotateX(60deg) translateY(50px) translateZ(-200px); }
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #050510 90%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.profile-img {
    border: 3px solid var(--neon-blue);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.3);
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 0 50px rgba(0, 243, 255, 0.6);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(to right, #00f3ff, #bc13fe, #00f3ff);
    background-size: 200% auto;
    color: #000;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Section Styling */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--neon-blue);
}

/* Glassmorphism Cards */
.glass-card {
    background: rgba(20, 20, 35, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 243, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Neon Cards */
.neon-card {
    background: #111;
    border: 1px solid #333;
    border-radius: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.neon-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(0, 243, 255, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.5s;
}

.neon-card:hover::before {
    transform: translateX(100%);
}

.neon-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.2);
}

.skill-icon {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.3));
}

.neon-card:hover .skill-icon {
    transform: scale(1.2);
    filter: drop-shadow(0 0 10px var(--neon-blue));
}

/* Portfolio Cards */
.project-card {
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #333;
    background: #151520;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--neon-purple);
    box-shadow: 0 0 25px rgba(188, 19, 254, 0.3) !important;
}

.project-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-img-top {
    transform: scale(1.1);
}

/* Contact Section Parallax */
.contact-section {
    position: relative;
    background-color: #050510;
    padding: 100px 0;
    overflow: hidden;
}

.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, #050510 80%);
    z-index: 1;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #0d6efd, #0b5ed7);
    border: none;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: linear-gradient(45deg, var(--neon-blue), #0d6efd);
    transform: translateY(-2px);
    box-shadow: 0 0 25px var(--neon-blue);
}

.btn-outline-light:hover {
    color: #050510;
    background: var(--neon-blue);
    border-color: var(--neon-blue);
    box-shadow: 0 0 20px var(--neon-blue);
    transform: translateY(-2px);
}

/* Footer Styling */
.footer-section {
    background: #020205 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--neon-blue);
    transform: translateX(5px);
    text-shadow: 0 0 10px var(--neon-blue);
}

.social-icon-link {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon-link:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px var(--neon-blue);
    transform: translateY(-3px);
}

/* Glitch Effect */
#matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

/* Portfolio Filters */
.portfolio-filters .btn {
    margin: 0 5px;
    border-radius: 50px;
    padding: 8px 20px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.portfolio-filters .btn.active, .portfolio-filters .btn:hover {
    background: var(--neon-blue);
    color: #000;
    border-color: var(--neon-blue);
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Floating Action Button */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.fab-main {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--neon-blue), var(--neon-purple));
    border: none;
    color: white;
    font-size: 24px;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.5);
    cursor: pointer;
    transition: transform 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-main:hover {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: 60px; /* Reduced from 70px to remove gap */
    right: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px; /* Added padding to bridge the gap */
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s;
}

.fab-container:hover .fab-menu {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.fab-item {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #111;
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s;
    position: relative;
}

.fab-item:hover {
    background: var(--neon-blue);
    color: #000;
    box-shadow: 0 0 15px var(--neon-blue);
}

/* Tooltip */
.fab-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.fab-item:hover::before {
    opacity: 1;
}

/* Glitch Effect */
.glitch {
    position: relative;
    color: #fff;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #050510;
}

.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(30px, 9999px, 10px, 0); }
    5% { clip: rect(85px, 9999px, 5px, 0); }
    10% { clip: rect(10px, 9999px, 80px, 0); }
    15% { clip: rect(60px, 9999px, 20px, 0); }
    20% { clip: rect(25px, 9999px, 65px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(15px, 9999px, 60px, 0); }
    5% { clip: rect(70px, 9999px, 30px, 0); }
    10% { clip: rect(5px, 9999px, 40px, 0); }
    15% { clip: rect(50px, 9999px, 15px, 0); }
    20% { clip: rect(80px, 9999px, 35px, 0); }
    100% { clip: rect(0, 0, 0, 0); }
}
