/* Global Styles */
html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #1a1a1a;
}

/* Webkit (Chrome, Safari, etc) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent);
    border-radius: 20px;
    border: 3px solid #1a1a1a;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #ff3333;
}

:root {
    --primary: #000000;
    --secondary: #ffffff;
    --accent: #ff0000;
    --text: #ffffff;
    --bg: #000000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background: linear-gradient(-45deg, #1a1a1a, #000000, #1a0000, #000000);
    background-size: 400% 400%;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    animation: gradientBG 15s ease infinite;
}

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

/* Animated Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 0, 0, 0.5);
    border-radius: 50%;
    animation: float 15s infinite linear;
    box-shadow: 0 0 10px 2px rgba(255, 0, 0, 0.5);
}

@keyframes float {
    0% { 
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { 
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* Glitch Effect */
.glitch {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    background: 
        linear-gradient(to right, #000 1px, transparent 1px) 0 0,
        linear-gradient(to right, #000 1px, transparent 1px) 0 100%,
        linear-gradient(to left, #000 1px, transparent 1px) 100% 0,
        linear-gradient(to left, #000 1px, transparent 1px) 100% 100%,
        linear-gradient(to bottom, #000 1px, transparent 1px) 0 0,
        linear-gradient(to bottom, #000 1px, transparent 1px) 100% 0,
        linear-gradient(to top, #000 1px, transparent 1px) 0 100%,
        linear-gradient(to top, #000 1px, transparent 1px) 100% 100%;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    animation: glitch 0.5s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
    100% { transform: translate(0); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation Animation */
nav {
    animation: fadeInDown 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes scaleIn {
    from { 
        opacity: 0;
        transform: scale(0.8);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

/* Page Header */
.page-header {
    text-align: center;
    padding: 30px 20px;
    margin: 0 0 30px;
    position: relative;
    z-index: 1;
    animation: fadeInDown 0.8s ease-out forwards;
}

.page-header h1 {
    font-size: 3.2rem;
    margin: 0 0 10px 0;
    background: linear-gradient(45deg, #fff, #ff4d4d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1.2;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ff4d4d, transparent);
    border-radius: 3px;
}

.page-header .subtitle {
    color: #aaa;
    font-size: 1.1rem;
    margin: 0;
    padding: 0 20px;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    animation: fadeIn 1s ease-out 0.3s forwards;
    opacity: 0;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 0, 0, 0.1);
}

.logo:hover {
    background: var(--accent);
    color: #000;
    transform: rotate(360deg);
    box-shadow: 0 0 15px var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li a {
    color: var(--text);
    text-decoration: none;
    margin-left: 30px;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 10px;
    border-radius: 4px;
    overflow: hidden;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--accent);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 80%;
    background: var(--accent);
}

/* Add a subtle pulse effect on active link */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(255, 0, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0); }
}

nav ul li a.active {
    animation: pulse 2s infinite;
}

/* Main Content */
main {
    min-height: calc(100vh - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    display: inline-block;
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    animation-delay: 0.3s;
}

.hero h1:after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: var(--accent);
    bottom: -10px;
    left: 25%;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #aaa;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.6s;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:hover {
    color: var(--text);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover:before {
    width: 100%;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

footer p {
    margin: 5px 0;
    color: #aaa;
    font-size: 0.9rem;
}

footer p:first-child {
    color: var(--accent);
    font-weight: bold;
}

/* Social Icons */
.social-icons {
    margin-top: 50px;
    display: flex;
    gap: 20px;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
    animation-delay: 0.9s;
}

.icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text);
    font-size: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    transform-style: preserve-3d;
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.5s ease-out forwards;
    opacity: 0;
}

.icon:nth-child(1) { animation-delay: 1s; }
.icon:nth-child(2) { animation-delay: 1.1s; }
.icon:nth-child(3) { animation-delay: 1.2s; }
.icon:nth-child(4) { animation-delay: 1.3s; }

.icon:hover {
    background: var(--accent);
    transform: perspective(1000px) rotateY(10deg) rotateX(10deg) translateY(-5px);
    box-shadow: 0 15px 25px rgba(255, 0, 0, 0.2);
}

/* About Page */
.about-page {
    padding: 50px 0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.profile-image {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 30px;
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.3);
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, #ff0000, #ff6b6b, #ff0000);
    background-size: 200% 200%;
    z-index: -1;
    border-radius: 50%;
    opacity: 0.7;
    animation: gradientGlow 3s ease infinite;
    margin: -3px;
}

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

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    border-radius: 50%;
    display: block;
}

.profile-image:hover img {
    transform: scale(1.1);
}

.profile-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(15, 15, 15, 0.8);
    border-radius: 20px;
    padding: 40px 30px;
    margin: 30px 0;
    border: 1px solid rgba(255, 0, 0, 0.15);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.3);
}

.bio {
    text-align: center;
    margin: 0 0 20px;
    position: relative;
    z-index: 1;
    padding: 25px;
    background: rgba(20, 20, 20, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    max-width: 600px;
}

.bio:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.1);
}

.bio p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #ddd;
    position: relative;
}

.skills {
    text-align: center;
    margin: 60px 0 30px;
    position: relative;
    z-index: 1;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.skills h2 {
    font-size: 2.2rem;
    margin-bottom: 40px;
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.skills h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.skills-category {
    margin-bottom: 40px;
    text-align: left;
}

.skills-category h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.skills-category h3 i {
    color: var(--accent);
    font-size: 1.2em;
}

.skill-tags {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 20px;
    width: 100%;
    padding: 0 10px;
}

.skill-item {
    background: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: default;
}

.skill-item i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.skill-item span {
    display: block;
    color: #eee;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.skill-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 10px 25px rgba(255, 0, 0, 0.15);
}

/* Skill Level Tooltip */
.skill-level {
    position: absolute;
    top: -10px;
    right: -10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10;
}

.skill-item[data-level="Advanced"] .skill-level {
    background: rgba(0, 200, 83, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.skill-item[data-level="Intermediate"] .skill-level {
    background: rgba(255, 171, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.skill-item[data-level="Beginner"] .skill-level {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.skill-item[data-level="Code Editor"] .skill-level {
    background: rgba(0, 122, 204, 0.4);
    color: #007ACC;
    border: 1px solid rgba(0, 122, 204, 0.5);
}

.skill-item[data-level="Package Manager"] .skill-level {
    background: rgba(203, 56, 55, 0.1);
    color: #CB3837;
    border: 1px solid rgba(203, 56, 55, 0.2);
}

.skill-item[data-level="Database"] .skill-level {
    background: rgba(71, 162, 72, 0.4);
    color: #47A248;
    border: 1px solid rgba(71, 162, 72, 0.5);
}

.skill-item:hover .skill-level {
    opacity: 1;
    transform: translateY(0);
}

/* Add indicator dot */
.skill-item::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.skill-item[data-level="Advanced"]::after {
    background: #4caf50;
    box-shadow: 0 0 5px #4caf50;
}

.skill-item[data-level="Intermediate"]::after {
    background: #ff9800;
    box-shadow: 0 0 5px #ff9800;
}

.skill-item[data-level="Beginner"]::after {
    background: #f44336;
    box-shadow: 0 0 5px #f44336;
}

.skill-item[data-level="Code Editor"]::after {
    background: #007ACC;
    box-shadow: 0 0 5px #007ACC;
}

.skill-item[data-level="Package Manager"]::after {
    background: #CB3837;
    box-shadow: 0 0 5px #CB3837;
}

.skill-item[data-level="Database"]::after {
    background: #47A248;
    box-shadow: 0 0 5px #47A248;
}

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

.skill-item:hover i {
transform: scale(1.1);
}

.skill-item:hover span {
color: #fff;
}

/* Specific icon colors */
/* Tech Stack Icons */
.fa-html5 { color: #e34f26; }
.fa-css3-alt { color: #264de4; }
.fa-js { color: #f7df1e; }
.fa-react { color: #61dafb; }
.fa-node-js { color: #68a063; }
.fa-paint-brush { color: #ff6b6b; }

/* Tools Icons */
.fa-code { color: #0078d7; } /* VS Code blue */
.fa-box { color: #cb3837; } /* NPM red */
.fa-database { color: #4db33d; } /* MongoDB green */

/* Animation for about page elements */
.about-content > * {
opacity: 0;
animation: fadeInUp 0.8s ease-out forwards;
}

.about-content h1 { animation-delay: 0.2s; }
.profile-container { animation-delay: 0.4s; }
.skills { animation-delay: 0.6s; }

/* Responsive Design */
@media (max-width: 768px) {
    .skills {
        margin: 40px 0;
    }
    
    .skills h2 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .skills-category {
        margin-bottom: 30px;
    }
    
    .skill-tags {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .skill-item {
        padding: 15px 10px;
    }
    
    .skill-item i {
        font-size: 2rem;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    nav {
        flex-direction: column;
        padding: 20px 0;
    }
    
    nav ul {
        margin-top: 20px;
    }
    
    nav ul li a {
        margin: 0 10px;
    }
    
    .social-icons {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

.loading-content {
    text-align: center;
    width: 100%;
    max-width: 200px;
}

.loading-logo {
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.loading-logo img {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    animation: pulse 2s infinite ease-in-out;
}

.logo-text {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 10px;
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

.loading-screen .progress-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 0 auto;
    max-width: 200px;
}

.loading-screen.active {
    opacity: 1;
    pointer-events: all;
}

.progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, 
        #ff4d4d, 
        #ff6b6b, 
        #ff8f8f,
        #ff6b6b,
        #ff4d4d
    );
    background-size: 200% 100%;
    position: relative;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: width, background-position;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.6);
    animation: gradientFlow 2s linear infinite;
}

@keyframes gradientFlow {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        transparent,
        rgba(255, 255, 255, 0.8),
        transparent
    );
    transform: translateX(-100%);
    animation: shine 1.5s infinite;
    border-radius: 2px;
}

@keyframes shine {
    100% {
        transform: translateX(100%);
    }
}

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

/* Page Transitions */
.page-transition-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.page-transition-out {
    animation: fadeOut 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

footer p:first-child {
    color: var(--accent);
    font-weight: bold;
}
