/* Custom Styles */
:root {
    --primary-gradient: linear-gradient(90deg, #E50914, #FFC300);
    --primary-color: #E50914;
    --secondary-color: #FFC300;
    --bg-color: #000000;
    --card-bg-color: rgba(18, 18, 18, 0.25);
    /* Darker glass for better contrast */
    --card-border-color: rgba(229, 9, 20, 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: #e0e0e0;
    overflow-x: hidden;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Aurora Background */
.aurora-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    opacity: 0.7;
    /* ADDED: Made aurora stronger */
}

.aurora-bg .aurora {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    /* ADDED: Increased blur */
    opacity: 0.25;
    /* ADDED: Increased opacity */
}

.aurora-1 {
    width: 500px;
    height: 500px;
    /* CHANGED: Larger size */
    background: var(--primary-color);
    top: 10%;
    left: 20%;
    animation: move-aurora-1 20s infinite alternate;
}

.aurora-2 {
    width: 400px;
    height: 400px;
    /* CHANGED: Larger size */
    background: var(--secondary-color);
    top: 50%;
    left: 60%;
    animation: move-aurora-2 25s infinite alternate;
}

@keyframes move-aurora-1 {
    from {
        transform: translate(0, 0) rotate(0deg);
    }

    to {
        transform: translate(200px, 100px) rotate(180deg);
    }

    /* CHANGED: Simpler movement */
}

@keyframes move-aurora-2 {
    from {
        transform: translate(0, 0) rotate(0deg);
    }

    to {
        transform: translate(-200px, -100px) rotate(-180deg);
    }

    /* CHANGED: Simpler movement */
}

/* ADDED: 4K/8K Responsiveness. This is the fix for large monitors. */
.container {
    transition: max-width 0.3s ease;
}

@media (min-width: 1920px) {
    .container {
        max-width: 1600px;
    }

    /* For 4K monitors */
}

@media (min-width: 2560px) {
    .container {
        max-width: 1920px;
    }

    /* For 4K/5K */
}

@media (min-width: 3840px) {
    .container {
        max-width: 2560px;
    }

    /* For 8K monitors */
}


.navbar {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(229, 9, 20, 0.2);
}

.navbar .nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.section {
    padding: 100px 0;
    position: relative;
    z-index: 2;
}

.section-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-image: var(--primary-gradient);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.profile-img-container {
    position: relative;
    width: 250px;
    height: 250px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid rgba(229, 9, 20, 0.1);
}

/* CHANGED: Replaced fast spin with a slower, more professional pulse */
.profile-img-container::before {
    absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--primary-gradient);
    z-index: -1;
    filter: blur(15px);
    opacity: 0.75;
    animation: pulse-glow 4s infinite alternate;
}

@keyframes pulse-glow {
    from {
        transform: scale(1);
        opacity: 0.5;
    }

    to {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
}

.hero .lead {
    font-size: 1.5rem;
    font-weight: 300;
    min-height: 84px;
}

.typed-cursor {
    opacity: 1;
    animation: blink 0.7s infinite;
    color: var(--primary-color);
}

@keyframes blink {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.btn {
    transition: all 0.3s ease;
}

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

.btn-gradient {
    background-image: var(--primary-gradient);
    background-size: 200% auto;
    border: none;
    color: white;
    font-weight: 600;
}

.btn-gradient:hover {
    background-position: right center;
    color: white;
    transform: scale(1.05);
}

.btn-outline-light {
    border-color: rgba(229, 9, 20, 0.5);
    color: var(--primary-color);
}

.btn-outline-light:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ADDED: Unified Glassmorphism Card Style */
.glass-card {
    background-color: var(--card-bg-color);
    backdrop-filter: blur(10px);
    border: 1px solid var(--card-border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    /* ADDED: Ensures cards in a row are same height */
    padding: 10px;
}

.glass-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(229, 9, 20, 0.3);
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(229, 9, 20, 0.4);
}

/* Image */
.project-card img {
    width: 100%;
    height: auto;
    border-radius: 1.2rem 1.2rem 0 0;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.08);
    filter: brightness(0.8);
}

/* Gradient Overlay Effect */
.project-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.1), rgba(255, 51, 102, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

.project-card:hover::before {
    opacity: 1;
}

/* Card Body */
.project-card .card-body {
    position: relative;
    z-index: 2;
    padding: 1.25rem 1.5rem;
    text-align: left;
    transition: all 0.3s ease;
}

.project-card .card-title {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: #fff;
    margin-bottom: 0.6rem;
}

.project-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #d1d1d1;
}

/* Buttons */
.project-card .btn {
    border-radius: 50px;
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
    transition: all 0.3s ease;
}

.project-card .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.project-card .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-gradient {
    background: linear-gradient(135deg, #E50914, #FF3366);
    color: #fff;
    border: none;
}

.btn-gradient:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Small Glow Accent Line */
.project-card::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, #E50914, #FF3366, #FFC300);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 0 0 1.2rem 1.2rem;
}

.project-card:hover::after {
    opacity: 1;
}

/* ADDED: About Me Section Image Style */
.about-img {
    width: 100%;
    max-width: 350px;
    border-radius: 10px;
    border: 1px solid var(--card-border-color);
    padding: 8px;
    background-color: var(--card-bg-color);
}

/* ADDED: Skill Card Redesign */
.skill-card-icons {
    font-size: 1.75rem;
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 15px;
    background-image: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.skill-card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 20px;
    width: 2px;
    background-color: rgba(229, 9, 20, 0.1);
}

.timeline-item {
    margin-bottom: 50px;
    position: relative;
    padding-left: 60px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: 20px;
    top: 5px;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-image: var(--primary-gradient);
}

/* CHANGED: Applied glass-card style to timeline */
.timeline-content {
    padding: 20px;
    border-radius: 8px;
}

.timeline-content .date {
    font-weight: 600;
    color: var(--primary-color);
}

.contact-icon {
    font-size: 2rem;
    background-image: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: rgba(229, 9, 20, 0.1);
}

.form-control:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(229, 9, 20, 0.25);
    color: #fff;
}

#formStatus {
    margin-top: 15px;
    text-align: center;
    font-weight: 600;
}

footer {
    background-color: transparent;
    border-top: 1px solid rgba(229, 9, 20, 0.1);
}

.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease;
}

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

/* ADDED: Mobile Responsiveness Fixes */
@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

    .about-img {
        margin-bottom: 30px;
    }

    /* Stack image on top of text on mobile */
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    /* Scale down hero title */
    .hero .lead {
        font-size: 1.25rem;
        min-height: 0;
    }

    /* Scale down subtitle */
    .profile-img-container {
        width: 180px;
        /* Scale down profile image */
        height: 180px;
    }

    .profile-img-container::before {
        top: -5px;
        left: -5px;
        right: -5px;
        bottom: -5px;
    }

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


}

.gradient-text {
    background: linear-gradient(90deg, #E50914, #FFC300);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
}

/* Gradient buttons */
.btn-gradient2 {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    color: white;
    font-weight: 500;
    border-radius: 10px;
    padding: 0.75rem 2rem;
    width: 180px; /* fixed width for all buttons */
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.btn-gradient2:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(255, 75, 43, 0.4);
}

/* Responsive spacing */
.contact-links {
    gap: 1rem;
}

@media (max-width: 768px) {
    .contact-links {
        flex-direction: column;
        gap: 1rem;
    }
}


/* Smaller Chatbot */
.chatbot {
    position: fixed; /* important for corner positioning */
    width: 280px; 
    height: 400px;
    bottom: 20px;   /* distance from bottom */
    right: 20px;    /* distance from right */
    background: #1a1a1a;
    border-radius: 15px;
    display: none; /* hidden initially */
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    font-family: 'Poppins', sans-serif;
    z-index: 9999;

    /* Slide-up animation setup */
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease-out;
}

/* Active class for showing chatbot */
.chatbot.active {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

/* Chat bubble in bottom-right */
.chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #FF4C00;
    color: #fff;
    padding: 10px 16px;
    border-radius: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 9999;
    cursor: pointer;
    animation: popupFade 0.5s ease-out;
    gap: 6px; /* space between text and emoji */
}

/* Wave animation */
.wave-hand {
    display: inline-block;
    transform-origin: 70% 70%;
    animation: wave 1.2s ease-in-out 3 forwards; /* 3 iterations */
}

/* Keyframes for waving */
@keyframes wave {
    0% { transform: rotate(0deg); }
    15% { transform: rotate(14deg); }
    30% { transform: rotate(-8deg); }
    45% { transform: rotate(14deg); }
    60% { transform: rotate(-4deg); }
    75% { transform: rotate(10deg); }
    100% { transform: rotate(0deg); }
}

/* Popup fade animation (optional) */
@keyframes popupFade {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}


.chat-bubble:hover {
    transform: scale(1.1);
}


/* Header */
.chat-header {
    background: #FF4C00;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Chat body */
.chat-body {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    gap: 6px;
}

/* User messages - right */
.user-msg {
    background: #FF4C00;
    color: white;
    align-self: flex-end;
    border-radius: 20px 20px 5px 20px;
    padding: 10px 15px;
    max-width: 80%;
    word-wrap: break-word;
    animation: slideInRight 0.4s ease forwards;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* Bot messages - left */
.bot-msg {
    background: #222;
    color: white;
    align-self: flex-start;
    border-radius: 20px 20px 20px 5px;
    padding: 10px 15px;
    max-width: 80%;
    word-wrap: break-word;
    animation: slideInLeft 0.4s ease forwards;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
}

/* Typing dots for bot */
.bot-msg.typing::after {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-left: 5px;
    border-radius: 50%;
    background: #fff;
    animation: blink 1s infinite alternate;
}

/* Animations */
@keyframes slideInRight {
    from {opacity:0; transform: translateX(50px);}
    to {opacity:1; transform: translateX(0);}
}
@keyframes slideInLeft {
    from {opacity:0; transform: translateX(-50px);}
    to {opacity:1; transform: translateX(0);}
}
@keyframes blink {
    0% {opacity: 0;}
    50% {opacity: 0.6;}
    100% {opacity: 1;}
}

/* Input */
.chat-input {
    display: flex;
    border-top: 1px solid #333;
}
.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    background: #111;
    color: white;
    font-size: 0.95rem;
}
.chat-input button {
    background: #FF4C00;
    border: none;
    padding: 0 15px;
    color: white;
    cursor: pointer;
}

