:root {
    --primary: #6a00f4;
    --secondary: #00b4d8;
    --dark: #03051a;
    --darker: #01010a;
    --light: #e2fdfe;
    --card-bg: rgba(5, 5, 20, 0.9);
    --card-border: rgba(106, 0, 244, 0.3);
    --mobile-padding: 16px;
    --star-count: 150;
}

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

body {
    background: var(--dark);
    color: var(--light);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--mobile-padding);
}

/* Cosmic Background */
.cosmic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.stars {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.star {
    position: absolute;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    animation: twinkle var(--duration) ease-in-out var(--delay) infinite alternate;
    width: var(--size);
    height: var(--size);
    left: var(--left);
    top: var(--top);
    opacity: var(--opacity);
    will-change: transform, opacity;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
}

.twinkling {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    animation: twinkle-bg 5s infinite alternate;
}

@keyframes twinkle-bg {
    0% { box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.1); }
    100% { box-shadow: inset 0 0 60px rgba(255, 255, 255, 0.2); }
}

.planet {
    position: absolute;
    border-radius: 50%;
    z-index: -1;
    will-change: transform;
}

.planet-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    left: 8%;
    background: radial-gradient(circle at 30% 30%, #3a0ca3, #1a1a2e);
    box-shadow: 0 0 40px #3a0ca3;
    animation: float 15s infinite ease-in-out;
}

.planet-2 {
    width: 80px;
    height: 80px;
    bottom: 15%;
    right: 8%;
    background: radial-gradient(circle at 30% 30%, #4361ee, #1a1a2e);
    box-shadow: 0 0 25px #4361ee;
    animation: float 12s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

/* Main Container */
.main-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.bio-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 0 30px rgba(106, 0, 244, 0.2),
                0 0 60px rgba(0, 180, 216, 0.1);
    width: 100%;
    padding: 1.5rem;
    position: relative;

    will-change: transform;
    contain: content;
    height: fit-content;
    max-height: calc(100vh - var(--mobile-padding) * 2 - 40px);
    box-sizing: border-box;
}

/* Profile Section */
.profile-container {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.profile-p {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.2rem;
    position: relative;
    will-change: transform;
}

.profile-image {
    width: 100%;
    height: 100%;
    background-image: url('profile.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 50%;
    position: relative;
    z-index: 2;
    border: 3px solid var(--primary);
    box-shadow: 0 0 25px var(--primary);
    will-change: transform;
}

.profile-image img{
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.orbit {
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    border: 2px dashed rgba(0, 180, 216, 0.5);
    border-radius: 50%;
    animation: rotate 20s linear infinite;
    will-change: transform;
}

.satellite {
    position: absolute;
    top: -8px;
    left: 50%;
    width: 16px;
    height: 16px;
    background: var(--secondary);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: rotate 15s linear infinite;
    box-shadow: 0 0 8px var(--secondary);
    will-change: transform;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.title h3 {
    font-size: 1.6rem;
    margin-top: 1rem;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: 1px;
}

.title p {
    font-size: 0.9rem;
    color: rgba(226, 253, 254, 0.7);
    margin-top: 0.4rem;
    font-weight: 300;
}

/* Social Icons */
.icon-social {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin: 1.2rem 0;
    flex-wrap: wrap;
}

.icon-social a {
    color: var(--light);
    font-size: 1.3rem;
    transition: all 0.3s ease;
    position: relative;
}

.icon-social a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.icon-social a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.icon-social a:hover::after {
    width: 100%;
}

/* Social Links */
.social-links {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 1.5rem 0;
    height: 40vmin;
}

.social-link {
    background: rgba(10, 10, 30, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(106, 0, 244, 0.2);
    border-radius: 10px;
    padding: 0.9rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--light);
    will-change: transform;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(106, 0, 244, 0.1), transparent);
    transition: all 0.5s ease;
}

.social-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(106, 0, 244, 0.3);
    border-color: var(--primary);
}

.social-link:hover::before {
    left: 100%;
}

.social-link-content {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.linkedin .social-icon { background: #0077b5; }
.twitter .social-icon { background: #1da1f2; }
.github .social-icon { background: #333; }
.instagram .social-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.facebook .social-icon { background: #1877f2; }
.email .social-icon { background: #d44638; }

.social-link h4 {
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.social-link .arrow {
    color: rgba(226, 253, 254, 0.5);
    transition: all 0.3s ease;
}

.social-link:hover .arrow {
    color: var(--secondary);
    transform: translateX(4px);
}

.social-link:hover h4 {
    color: var(--secondary);
}

/* Footer */
footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(226, 253, 254, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

footer i {
    color: var(--secondary);
}

/* Developer Credit */
.developer-credit {
    margin-top: 15px;
    color: rgba(226, 253, 254, 0.7);
    font-size: 0.8rem;
    text-align: center;
    padding: 8px 0;
}

.developer-credit span {
    color: var(--secondary);
    font-weight: bold;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    :root {
        --star-count: 100;
    }
    
    /* .planet-1, .planet-2,
    .orbit, .satellite {
        display: none;
    } */
    
    .twinkling {
        animation: none;
    }
    
    .bio-card {
        padding: 1.2rem;
        max-height: calc(100vh - var(--mobile-padding) * 2 - 35px);
    }
    
    .profile-p {
        width: 100px;
        height: 100px;
    }
    
    .title h3 {
        font-size: 1.4rem;
    }
    
    .social-link {
        padding: 0.8rem 1rem;
    }
    .social-links{
        height: 93vmin;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --mobile-padding: 12px;
    }
    
    .bio-card {
        padding: 1rem;
    }
    
    .profile-p {
        width: 90px;
        height: 90px;
    }
    
    .title h3 {
        font-size: 1.3rem;
    }
    
    .social-link h4 {
        font-size: 0.9rem;
    }
}

/* Tall mobile devices */
@media (min-height: 700px) and (max-width: 768px) {
    .bio-card {
        padding: 1.5rem;
    }
    
    .profile-p {
        width: 110px;
        height: 110px;
    }
}

/* Desktop adjustments */
@media (min-width: 769px) {
    .planet-1 {
        width: 150px;
        height: 150px;
    }
    
    .planet-2 {
        width: 100px;
        height: 100px;
    }
    
    .bio-card {
        padding: 2rem;
    }
}