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

:root {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-glass: rgba(22, 27, 34, 0.8);
    --text-primary: #c9d1d9;
    --text-secondary: #8b949e;
    --text-accent: #58a6ff;
    --brand-primary: #58a6ff;
    --brand-secondary: #7c3aed;
    --brand-gradient: linear-gradient(135deg, #58a6ff 0%, #7c3aed 100%);
    --border-color: rgba(240, 246, 252, 0.1);
    --border-hover: rgba(88, 166, 255, 0.4);
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    position: relative;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 20%, rgba(88, 166, 255, 0.05) 0%, transparent 50%);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(88, 166, 255, 0.05) 0%, transparent 50%),
        linear-gradient(225deg, rgba(124, 58, 237, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

/* Glass Effect */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transition: left 0.5s;
}

.glass:hover::before {
    left: 100%;
}

.glass:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 48px rgba(88, 166, 255, 0.2);
    transform: translateY(-2px);
}

/* Gradient Text */
.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
}

.sidebar-header {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.brand-logo {
    margin-bottom: 16px;
}

.logo-icon {
    width: 56px;
    height: 56px;
    background: var(--brand-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 20px rgba(88, 166, 255, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.logo-icon:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(88, 166, 255, 0.6);
}

.sidebar-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.sidebar-tagline {
    font-size: 14px;
    color: var(--text-secondary);
}

.nav-menu {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    min-height: 0;
    /* Important for flex child scrolling */
    margin-bottom: 16px;
    /* Add some space before footer */
}

.nav-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: var(--brand-gradient);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    background: rgba(88, 166, 255, 0.1);
    color: var(--text-accent);
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(90deg, rgba(88, 166, 255, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%);
    color: var(--text-accent);
    font-weight: 600;
}

.nav-link.active::before {
    transform: scaleY(1);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    /* Stack vertically for clear reading */
    gap: 8px;
    padding: 0 12px;
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
}

.social-link i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    color: var(--text-accent);
}

.social-link:hover {
    color: var(--text-primary);
    transform: translateX(4px);
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.3);
    box-shadow: none;
}

.separator {
    color: var(--text-secondary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.menu-toggle:hover {
    border-color: var(--border-hover);
    box-shadow: 0 6px 20px rgba(88, 166, 255, 0.3);
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}

.overlay.overlay-active {
    display: block;
    opacity: 1;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 32px;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

.page-container {
    max-width: 1012px;
    margin: 0 auto;
}

/* Profile Header */
.profile-header {
    margin-bottom: 24px;
    padding: 40px;
    animation: fadeInUp 0.6s ease-out;
}

.profile-name {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.profile-bio {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.profile-description {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.floating-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-accent);
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.badge:nth-child(1) {
    animation-delay: 0s;
}

.badge:nth-child(2) {
    animation-delay: 1s;
}

.badge:nth-child(3) {
    animation-delay: 2s;
}

.badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
    border-color: rgba(88, 166, 255, 0.5);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-8px);
    }
}

/* Sections */
.section {
    padding: 32px;
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--brand-gradient);
    border-radius: 2px;
}

.section-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.section-content p {
    margin-bottom: 16px;
}

.section-content p:last-child {
    margin-bottom: 0;
}

.highlight {
    color: var(--text-accent);
    font-weight: 600;
    background: rgba(88, 166, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-box {
    padding: 24px;
    background: rgba(88, 166, 255, 0.05);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    opacity: 0.1;
    transition: left 0.5s ease;
}

.stat-box:hover::before {
    left: 0;
}

.stat-box:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 166, 255, 0.4);
    box-shadow: 0 8px 24px rgba(88, 166, 255, 0.2);
}

.glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(88, 166, 255, 0.2);
    }

    50% {
        box-shadow: 0 0 30px rgba(88, 166, 255, 0.4);
    }
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Links Grid */
.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.link-card {
    display: block;
    padding: 24px;
    background: rgba(22, 27, 34, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    opacity: 0.1;
    transition: left 0.4s ease;
}

.link-card:hover::before {
    left: 0;
}

.link-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 32px rgba(88, 166, 255, 0.25);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(88, 166, 255, 0.3);
}

.link-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

.link-card:nth-child(1) .link-icon {
    animation-delay: 0s;
}

.link-card:nth-child(2) .link-icon {
    animation-delay: 0.3s;
}

.link-card:nth-child(3) .link-icon {
    animation-delay: 0.6s;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.link-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-accent);
    margin-bottom: 8px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.link-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
}

.link-arrow {
    display: inline-block;
    font-size: 20px;
    color: var(--text-accent);
    transition: transform 0.3s ease;
}

.link-card:hover .link-arrow {
    transform: translateX(6px);
}

/* Experience */
.experience-item {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.experience-item:hover {
    padding-left: 8px;
}

.experience-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.experience-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.job-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.company {
    font-size: 18px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.location {
    font-size: 14px;
    color: var(--text-secondary);
}

.duration {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.experience-list {
    list-style: none;
    padding-left: 0;
}

.experience-list li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    transition: color 0.2s;
}

.experience-list li:hover {
    color: var(--text-primary);
}

.experience-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--text-accent);
    font-weight: bold;
}

/* Projects */
.project-item {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.project-item:hover {
    padding-left: 8px;
}

.project-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.project-title {
    font-size: 22px;
    font-weight: 600;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

.project-tech {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-style: italic;
}

.project-list {
    list-style: none;
    padding-left: 0;
}

.project-list li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
    transition: color 0.2s;
}

.project-list li:hover {
    color: var(--text-primary);
}

.project-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--text-accent);
    font-size: 20px;
}

/* Skills */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.skill-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skill-heading {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-accent);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--brand-gradient);
    opacity: 0.2;
    transition: left 0.3s ease;
}

.skill-tag:hover::before {
    left: 0;
}

.skill-tag:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 166, 255, 0.5);
    box-shadow: 0 4px 12px rgba(88, 166, 255, 0.3);
}

/* Achievements */
.achievements-list {
    list-style: none;
    padding-left: 0;
}

.achievements-list li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 14px;
    padding-left: 24px;
    position: relative;
    transition: color 0.2s, transform 0.2s;
}

.achievements-list li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
}

.achievements-list li::before {
    content: "★";
    position: absolute;
    left: 0;
    color: var(--text-accent);
    font-size: 16px;
    animation: twinkle 2s ease-in-out infinite;
}

.achievements-list li:nth-child(1)::before {
    animation-delay: 0s;
}

.achievements-list li:nth-child(2)::before {
    animation-delay: 0.5s;
}

.achievements-list li:nth-child(3)::before {
    animation-delay: 1s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

/* Education */
.education-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.education-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.education-details {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.institution {
    font-size: 18px;
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.cgpa {
    font-size: 14px;
    color: var(--text-secondary);
}

.education-location {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
        min-width: 240px;
    }

    .main-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .menu-toggle {
        display: flex;
    }

    .sidebar {
        width: 280px;
        min-width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 80px 16px 16px 16px;
    }

    .profile-header {
        padding: 24px;
    }

    .profile-name {
        font-size: 28px;
    }

    .profile-bio {
        font-size: 18px;
    }

    .section {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .links-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 70px 12px 12px 12px;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
    }

    .profile-header {
        padding: 20px;
    }

    .profile-name {
        font-size: 24px;
    }

    .section {
        padding: 16px;
    }
}

/* Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* Selection */
::selection {
    background: rgba(88, 166, 255, 0.3);
    color: var(--text-primary);
}