:root {
    --navy-dark: #0a1a2d;
    --navy-med: #152342;
    --blue-dark: #325786;
    --blue-light: #5f86bf;
    --cream: #e4e8d3;
    
    /* Additional optimized variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #999;
    --border-color: #404040;
    --border-light: #333;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-blue: rgba(95, 134, 191, 0.3);
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 8px;
    --border-radius-large: 12px;
    --border-radius-pill: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Optimized floating particles with hardware acceleration */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(95, 134, 191, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(95, 134, 191, 0.2), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.05), transparent);
    background-repeat: repeat;
    background-size: 150px 150px;
    animation: float 20s infinite linear;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

@keyframes float {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-150px, -150px, 0);
    }
}

/* Navigation */
nav {
    background: rgba(42, 42, 42, 0.5);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo a {
    color: var(--blue-light);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue-light);
    background: rgba(95, 134, 191, 0.15);
}

/* Main Content */
main {
    margin-top: 72.8px;
    min-height: calc(100vh - 80px);
    padding: 4rem 2rem 0px 2rem;
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
}

.about-hero {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--blue-light), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.profile-pic {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--blue-dark), var(--blue-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    margin: 0 auto;
    border: 3px solid var(--blue-light);
}

.profile-pic img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 30%;
}

/* Skills Section */
.skills-section {
    margin: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--blue-light);
    text-align: center;
}

.section-subtext {
    font-size: 1rem;
    color: #344762;
    margin-bottom: 2rem;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.skill-category {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--border-radius-large);
    border: 1px solid var(--border-color);
}

.skill-category h3 {
    color: var(--blue-light);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-tag {
    background: var(--blue-dark);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.9rem;
}

.hobby-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

/* Optimized hobby cards with better performance */
.hobby-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.2rem 1rem;
    text-align: center;
    transition: transform var(--transition-smooth), 
                border-color var(--transition-smooth),
                box-shadow var(--transition-smooth),
                background-color var(--transition-smooth);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
    will-change: transform;
}

.hobby-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: var(--blue-light);
    box-shadow: 0 15px 35px var(--shadow-blue), 0 5px 15px var(--shadow-light);
    z-index: 10;
    background: var(--bg-secondary);
}

.hobby-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(95, 134, 191, 0.1), transparent);
    transition: left 0.6s ease;
}

.hobby-card:hover::before {
    left: 100%;
}

.hobby-icon {
    font-size: 2rem;
    transition: transform var(--transition-fast);
}

.hobby-card:hover .hobby-icon {
    transform: scale(1.1) rotateY(360deg);
}

.hobby-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.hobby-card:hover .hobby-name {
    color: var(--blue-light);
}

.hobby-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    opacity: 0;
    max-height: 0;
    transform: translateY(15px);
    transition: all var(--transition-smooth);
    overflow: hidden;
}

.hobby-card:hover .hobby-detail {
    opacity: 1;
    max-height: 100%;
    transform: translateY(0);
    margin-top: 0.5rem;
}

/* Journey Section */
.journey-section {
    margin: 4rem 0;
}

.journey-timeline {
    position: relative;
    padding-left: 2rem;
}

.journey-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--blue-light);
}

.journey-item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 2rem;
}

.journey-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0.5rem;
    width: 12px;
    height: 12px;
    background: var(--blue-light);
    border-radius: 50%;
}

.journey-year {
    color: var(--blue-light);
    font-weight: bold;
    font-size: 1.1rem;
}

.journey-title {
    font-size: 1.2rem;
    margin: 0.5rem 0;
}

.journey-description {
    color: var(--text-secondary);
}

.inlinelink {
    text-decoration: none;
    color: var(--blue-light);
    transition: color var(--transition-fast);
}

.inlinelink:hover {
    color: #ffffff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .about-hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .about-text h1 {
        font-size: 2rem;
    }

    .profile-pic {
        width: 200px;
        height: 200px;
        font-size: 3rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .live-updates {
        padding: 3rem 2rem;
    }

    .updates-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .update-card {
        padding: 1.5rem;
    }

    .update-icon-container {
        width: 70px;
        height: 70px;
    }

    .update-icon {
        font-size: 2rem;
    }
    
    /* Reduce animation intensity on mobile for better performance */
    .hobby-card:hover {
        transform: translateY(-4px) scale(1.02);
    }
    
    body::before {
        animation-duration: 30s; /* Slower animation on mobile */
    }
}
