:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

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

html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(5deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px;
    position: relative;
    padding-top: 140px; /* Adjusted for fixed top bar */
}

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

.hero-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    background: linear-gradient(var(--dark), var(--dark)) padding-box,
        var(--gradient) border-box;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.3);
    margin-bottom: 20px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin: 20px 0;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    text-shadow: 0 0 80px rgba(99, 102, 241, 0.3);
}

.hero .tagline {
    font-size: 1.35rem;
    color: var(--gray);
    margin-bottom: 45px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

.hero .tagline span {
    color: var(--accent);
    font-weight: 500;
}

/* Contact Links */
.contact-links {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    color: var(--light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.contact-link:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(99, 102, 241, 0.35);
}

.contact-link i {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: scale(1.15);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 1.5rem;
    color: var(--gray);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

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

/* Section Styles */
section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    letter-spacing: -0.01em;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--gradient);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

.section-header p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-top: 8px;
}

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

.skill-card {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.skill-card:hover::before {
    transform: scaleX(1);
}

.skill-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.3);
}

.skill-card h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.skill-card h3 i {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 12px;
    font-size: 1.1rem;
}

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

.skill-tag {
    padding: 10px 18px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.skill-tag:hover {
    background: rgba(99, 102, 241, 0.25);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
}

/* Certifications Section */
.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.cert-card {
    background: linear-gradient(135deg, var(--dark-light) 0%, rgba(99, 102, 241, 0.05) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateX(12px);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.cert-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: 12px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.cert-info {
    flex: 1;
}

.cert-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.cert-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cert-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 20px;
    color: var(--light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cert-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cert-link .fa-external-link-alt {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.cert-link:hover .fa-external-link-alt {
    opacity: 1;
    transform: translate(2px, -2px);
}

.cert-link.credly {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.25);
}

.cert-link.credly:hover {
    background: var(--secondary);
    border-color: var(--secondary);
}

.cert-view-all {
    text-align: center;
    margin-top: 40px;
}

.view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    border: 2px solid var(--primary);
    border-radius: 50px;
    color: var(--light);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-btn:hover {
    background: var(--gradient);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

.view-all-btn .fa-external-link-alt {
    font-size: 0.8rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.view-all-btn:hover .fa-external-link-alt {
    opacity: 1;
    transform: translate(3px, -3px);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 35px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

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

.project-card:hover {
    transform: translateY(-12px) scale(1.01);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

.project-card>* {
    position: relative;
    z-index: 1;
}

.project-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient);
    border-radius: 16px;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.project-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.project-card p {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 25px;
    color: var(--light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 5px;
}

.project-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.project-link .fa-external-link-alt {
    font-size: 0.7rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.project-link:hover .fa-external-link-alt {
    opacity: 1;
    transform: translate(2px, -2px);
}

/* Education & Experience Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    padding-bottom: 40px;
}

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

.timeline-dot {
    position: absolute;
    left: 10px;
    top: 5px;
    width: 22px;
    height: 22px;
    background: var(--dark);
    border: 3px solid var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.timeline-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.timeline-content .institution {
    color: var(--accent);
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.timeline-content p {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Volunteering & Awards Grid */
.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.extras-card {
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 35px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.extras-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.2);
}

.extras-card h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.extras-card h3 i {
    color: var(--secondary);
}

.extras-list {
    list-style: none;
}

.extras-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.extras-list li:last-child {
    border-bottom: none;
}

.extras-list li i {
    color: var(--primary);
    margin-top: 4px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--gradient);
    border: none;
    border-radius: 50%;
    color: var(--white);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

/* Footer */
footer {
    background: linear-gradient(180deg, var(--dark-light) 0%, var(--dark) 100%);
    padding: 50px 0;
    text-align: center;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

footer p {
    color: var(--gray);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

footer .heart {
    color: var(--secondary);
    animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {

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

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

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: -0.01em;
    }

    .hero .tagline {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .contact-link {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

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

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

    section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .skill-card,
    .project-card,
    .extras-card {
        padding: 25px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .top-bar {
        padding: 6px 0;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }

    .top-bar-left {
        flex-direction: column;
        gap: 0;
    }

    .top-bar-text {
        font-size: 0.75rem;
    }

    .scroll-hint {
        font-size: 0.6rem;
    }

    .download-btn {
        padding: 6px 16px;
        font-size: 0.75rem;
        gap: 5px;
    }

    .top-bar.scrolled .top-bar-left {
        display: none;
    }

    .top-bar.scrolled {
        padding: 8px 0;
    }

    .top-bar-brand {
        display: none;
    }

    .top-bar.scrolled .top-bar-brand {
        display: flex;
        gap: 8px;
    }

    .top-bar.scrolled .top-bar-logo {
        width: 26px;
        height: 26px;
    }

    .top-bar.scrolled .top-bar-name {
        font-size: 0.8rem;
    }

    .top-bar.scrolled .top-bar-content {
        flex-direction: row;
        justify-content: space-between;
        gap: 8px;
    }
}

/* Top Download Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--dark) 0%, rgba(15, 23, 42, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    padding: 14px 0;
    z-index: 1000;
}

.top-bar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.top-bar-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
}

.top-bar.scrolled .top-bar-left {
    opacity: 0;
    transform: translateY(-15px) scale(0.9);
    filter: blur(4px);
    pointer-events: none;
    position: absolute;
}

.top-bar-text {
    color: var(--light);
    font-size: 0.95rem;
}

.scroll-hint {
    color: var(--gray);
    font-size: 0.75rem;
    opacity: 0.8;
}

.scroll-hint::before {
    content: '↓ ';
}

.top-bar-brand {
    display: none;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(15px) scale(0.9);
    filter: blur(4px);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    position: absolute;
    text-decoration: none;
}

.top-bar.scrolled .top-bar-brand {
    display: flex;
    position: relative;
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
}

.top-bar-logo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid transparent;
    background: linear-gradient(var(--dark), var(--dark)) padding-box,
        var(--gradient) border-box;
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3);
}

.top-bar-name {
    font-weight: 700;
    font-size: 1.1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.top-bar.scrolled .top-bar-content {
    justify-content: space-between;
}

.top-bar {
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.top-bar.scrolled {
    padding: 10px 0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--gradient);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.download-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.download-btn i {
    animation: bounce-down 2s infinite;
}

@keyframes bounce-down {

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

    40% {
        transform: translateY(3px);
    }

    60% {
        transform: translateY(2px);
    }
}
