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

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(-45deg, #679cf1b5, #0932fe69, #ae75fd77, #f20c3678);
    background-size: 400% 400%;
    animation: gradientBG 20s ease infinite;
    color: #333;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 30px;
    background: rgba(199, 185, 185, 0.845);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Top Buttons Horizontal Layout */
.top-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    gap: 15px;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #f57a2e;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 140, 66, 0.3);
    flex-shrink: 0;
}

.home-btn:hover {
    background: #ff7321;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(255, 140, 66, 0.4);
}

/* Coding Platform Icons */
.platform-icons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.platform-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.platform-icons a:hover {
    background: #ff8c42;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(255, 140, 66, 0.3);
}

/* Custom icons for platforms */
.icon-codechef,
.icon-gfg, 
.icon-leetcode,
.icon-hackerrank,
.icon-hackerearth {
    display: inline-block;
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-codechef {
    background-image: url('img/codechef.png');
}

.icon-gfg {
    background-image: url('img/geeksforgeeks.png');
}

.icon-leetcode {
    background-image: url('img/leetcode.png');
}

.icon-hackerrank {
    background-image: url('img/hackerrank.png');
}

.icon-hackerearth {
    background-image: url('img/hackerearth.png');
}

/* Intro Section */
.intro-section {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1.5s forwards;
}

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

.intro-text {
    flex: 2;
    min-width: 300px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #010815;
}

.tagline {
    font-size: 1.2rem;
    color: #010814;
    margin-bottom: 10px;
    font-weight: 500;
}

.contact-info {
    margin-bottom: 20px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0;
    color: #021631;
    word-break: break-all;
}

.contact-info i {
    color: #ff8c42;
    width: 20px;
    flex-shrink: 0;
}

.highlight {
    color: #ff8c42;
    font-weight: 700;
}

.about-content p {
    margin: 15px 0;
    font-size: 1.05rem;
    color: #010834;
    line-height: 1.8;
}

.goal {
    font-style: italic;
    background: rgba(255, 140, 66, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #ff8c42;
    margin-top: 20px;
}

/* Skills Section */
.skills-section {
    margin: 25px 0;
}

.skills-section h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #19212e;
    border-bottom: 2px solid #943d07;
    padding-bottom: 5px;
    display: inline-block;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.skill-category {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    border-left: 4px solid #ff8c42;
}

.skill-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.skill-category h3 {
    color: #e25502;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.skill-category p {
    color: #4a5568;
    font-size: 0.95rem;
    margin: 0;
}

/* Profile Section */
.profile-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    min-width: 280px;
}

.profile-image {
    text-align: center;
}

.profile-image img {
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: cover;
    border-radius: 20px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.profile-image img:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
    border: 3px solid #ff8c42;
    outline: 2px solid rgba(255, 140, 66, 0.5);
    outline-offset: 3px;
}

.profile-highlights {
    background: rgba(255, 255, 255, 0.7);
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.profile-highlights h3 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 2px solid #ff8c42;
    padding-bottom: 5px;
    display: inline-block;
}

.profile-highlights ul {
    list-style: none;
}

.profile-highlights li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-highlights i {
    color: #ff8c42;
}

/* Responsive Design */
@media (max-width: 992px) {
    .intro-section {
        flex-direction: column-reverse;
    }
    
    .profile-section {
        flex-direction: row;
        justify-content: space-around;
        margin-top: 30px;
        width: 100%;
    }
    
    .profile-image, .profile-highlights {
        flex: 1;
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    .top-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .home-btn {
        align-self: flex-start;
    }
    
    .platform-icons {
        justify-content: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .profile-section {
        flex-direction: column;
        align-items: center;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .intro-text, .profile-section {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .profile-image img {
        max-width: 220px;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .platform-icons a {
        width: 35px;
        height: 35px;
    }
    
    .contact-info p {
        font-size: 0.9rem;
    }
    
    .about-content p {
        font-size: 1rem;
    }
}

/* Optimized Shooting Stars and Lines Background Animation */
.optimized-bg-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #e80215, #ffffff, #101cf2);
    border-radius: 50%;
    box-shadow:
        0 0 15px rgba(255, 255, 255, 0.9),
        0 0 30px rgba(255, 140, 66, 0.7),
        0 0 45px rgba(74, 111, 199, 0.5),
        0 0 60px rgba(255, 138, 66, 0.836);
    animation: shootingStar 5s ease-out infinite;
    will-change: transform, opacity;
    transform-origin: center center;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 140, 66, 0.4) 20%,
        rgba(255, 140, 66, 0.6) 50%,
        rgba(255, 140, 66, 0.4) 80%,
        transparent 100%);
    transform: translate(-50%, -50%);
    animation: trail 5s ease-out infinite;
    border-radius: 1px;
    will-change: transform, opacity;
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: sparkle 5s ease-out infinite;
    border-radius: 50%;
    will-change: transform, opacity;
}

.shooting-star.star-1 { top: 5%; left: 2%; animation-delay: 0s; }
.shooting-star.star-2 { top: 25%; left: 15%; animation-delay: 1.6s; }
.shooting-star.star-3 { top: 45%; left: 35%; animation-delay: 3.2s; }
.shooting-star.star-4 { top: 65%; left: 55%; animation-delay: 4.8s; }

@keyframes shootingStar {
    0% {
        transform: translateX(-60px) translateY(-60px) scale(0) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.3;
        transform: translateX(-30px) translateY(-30px) scale(0.3) rotate(15deg);
    }
    15% {
        opacity: 1;
        transform: translateX(0) translateY(0) scale(1) rotate(45deg);
    }
    30% {
        opacity: 1;
        transform: translateX(calc(30vw - 30px)) translateY(calc(30vh - 30px)) scale(1.3) rotate(135deg);
    }
    60% {
        opacity: 0.9;
        transform: translateX(calc(70vw - 30px)) translateY(calc(70vh - 30px)) scale(1.1) rotate(225deg);
    }
    85% {
        opacity: 0.6;
        transform: translateX(calc(100vw - 30px)) translateY(calc(100vh - 30px)) scale(0.7) rotate(315deg);
    }
    100% {
        transform: translateX(calc(100vw + 30px)) translateY(calc(100vh + 30px)) scale(0) rotate(360deg);
        opacity: 0;
    }
}

@keyframes trail {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0) scaleY(0.5);
        filter: blur(2px);
    }
    15% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scaleX(0.6) scaleY(1);
        filter: blur(0px);
    }
    30% {
        opacity: 0.9;
        transform: translate(-50%, -50%) scaleX(1) scaleY(1.2);
        filter: blur(0px);
    }
    70% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scaleX(1.2) scaleY(0.8);
        filter: blur(0px);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scaleX(0) scaleY(0.3);
        filter: blur(2px);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0);
    }
    20%, 80% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.5);
    }
}



/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .container {
        box-shadow: none;
        background: white;
    }

    .top-buttons, .home-btn {
        display: none;
    }

    .optimized-bg-effects {
        display: none;
    }
}





/* Advanced Effects: Glowing Borders and Text Shadows */
.glow-border {
    border: 2px solid #ff8c42;
    box-shadow: 0 0 10px #ff8c42, 0 0 20px #ff8c42;
    transition: box-shadow 0.3s ease;
}

.glow-border:hover {
    box-shadow: 0 0 20px #ff8c42, 0 0 40px #ff8c42;
}

.glow-text {
    color: #ff8c42;
    text-shadow:
        0 0 5px #ff8c42,
        0 0 10px #ff8c42,
        0 0 20px #ff8c42;
    transition: text-shadow 0.3s ease;
}

.glow-text:hover {
    text-shadow:
        0 0 10px #ff8c42,
        0 0 20px #ff8c42,
        0 0 30px #ff8c42;
}

/* Mouse-following Glow Effect (CSS only) */
.mouse-glow {
    position: relative;
    cursor: pointer;
}

.mouse-glow::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 140, 66, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.mouse-glow:hover::before {
    transform: translate(-50%, -50%) scale(1);
}









/* Enhanced Interactive Effects */
.skill-category {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-category:hover {
    transform: translateY(-8px) rotateX(5deg) rotateY(5deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2), 0 0 20px rgba(255, 140, 66, 0.3);
    border-color: rgba(255, 140, 66, 0.8);
}

.profile-image img {
    transition: all 0.5s ease;
}

.profile-image img:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 0 40px rgba(255, 140, 66, 0.6), 0 0 80px rgba(255, 140, 66, 0.4);
    filter: brightness(1.1) contrast(1.1);
}

.profile-highlights li {
    transition: all 0.3s ease;
    position: relative;
}

.profile-highlights li:hover {
    color: #00ffff;
    transform: translateX(15px) scale(1.05);
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.profile-highlights li:hover::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 10px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff;
}

/* Advanced Style Enhancements */
.container {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(243, 231, 231, 0.817));
    backdrop-filter: blur(10px);
    border: 2px solid rgba(14, 13, 13, 0.3);
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 140, 66, 0.05), rgba(74, 111, 199, 0.05), rgba(106, 17, 203, 0.05));
    border-radius: 20px;
    z-index: -1;
    animation: gradientShift 8s ease-in-out infinite;
}

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

h1 {
    background: linear-gradient(45deg, #ff6606, #5705fa, #f7022f);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGradient 4s ease-in-out infinite;
    text-shadow: none;
}

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

.tagline {
    background: linear-gradient(90deg, #e46f25, #e0d6d6, #5c53d4);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: taglineGlow 3s ease-in-out infinite;
}

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

/* Pulsing Border Effect */
.pulse-border {
    border: 2px solid #ff8c42;
    animation: pulseBorder 2s ease-in-out infinite;
}

@keyframes pulseBorder {
    0%, 100% {
        box-shadow: 0 0 5px #ff8c42, 0 0 10px #ff8c42, 0 0 15px #ff8c42;
    }
    50% {
        box-shadow: 0 0 10px #ff8c42, 0 0 20px #ff8c42, 0 0 30px #ff8c42, 0 0 40px #ff8c42;
    }
}

/* Floating Text Effect */
.floating-text {
    animation: floatText 6s ease-in-out infinite;
}

@keyframes floatText {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-5px) rotate(1deg);
    }
    50% {
        transform: translateY(-10px) rotate(0deg);
    }
    75% {
        transform: translateY(-5px) rotate(-1deg);
    }
}

/* 3D Transform Effects */
.three-d {
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.three-d:hover {
    transform: rotateX(10deg) rotateY(10deg) translateZ(20px);
}

/* Advanced Typography Shadows */
.advanced-shadow {
    text-shadow:
        0 1px 0 #ccc,
        0 2px 0 #c9c9c9,
        0 3px 0 #bbb,
        0 4px 0 #b9b9b9,
        0 5px 0 #aaa,
        0 6px 1px rgba(0,0,0,.1),
        0 0 5px rgba(0,0,0,.1),
        0 1px 3px rgba(0,0,0,.3),
        0 3px 5px rgba(0,0,0,.2),
        0 5px 10px rgba(0,0,0,.25),
        0 10px 10px rgba(0,0,0,.2),
        0 20px 20px rgba(0,0,0,.15);
}
