/* Global Styles */
:root {
    --primary-color: #4d8aff;
    --secondary-color: #121212;
    --accent-color: #fb5858;
    --text-color: #e0e0e0;
    --light-text: #f8f9fa;
    --dark-bg: #121212;
    --darker-bg: #0a0a0a;
    --medium-bg: #1e1e1e;
    --light-bg: #252525;
    --card-bg: #1a1a1a;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--dark-bg);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 50px;
    text-align: center;
    position: relative;
    color: var(--light-text);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.primary-btn:hover {
    background-color: #5a52e0;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

.secondary-btn {
    background-color: transparent;
    color: var(--light-text);
    border: 2px solid var(--accent-color);
}

.secondary-btn:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(10, 10, 10, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 70px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--dark-bg) 100%);
    color: var(--light-text);
}

.hero-content {
    flex: 1;
    padding: 0 50px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--light-text);
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero h2 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.hero-text {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--light-text);
    max-width: 600px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.code-animation {
    width: 400px;
    height: 400px;
    position: relative;
    background: rgba(30, 30, 30, 0.4);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 40px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(77, 138, 255, 0.1), 
                inset 0 0 20px rgba(251, 88, 88, 0.2);
    animation: pulse 6s infinite;
}

.code-line {
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    margin: 10px 0;
    opacity: 0.7;
    animation: fadeInLeft 1.5s forwards, glow 3s infinite;
}

@keyframes fadeInLeft {
    from {
        transform: translateX(-50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 0.7;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(251, 88, 88, 0.3);
    }
    50% {
        box-shadow: 0 0 15px rgba(77, 138, 255, 0.5);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(77, 138, 255, 0.1), 
                    inset 0 0 20px rgba(251, 88, 88, 0.2);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(77, 138, 255, 0.2), 
                    inset 0 0 30px rgba(251, 88, 88, 0.3);
    }
}

/* About Section */
.about {
    background-color: var(--medium-bg);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.skills {
    margin-top: 30px;
}

.skills h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--light-text);
}

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

.skill-tag {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(10, 132, 255, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.skill-tag:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

/* Projects Section */
.projects {
    background-color: var(--darker-bg);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Certifications Section */
.certifications {
    background-color: var(--medium-bg);
}

.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    padding: 10px;
}

.certification-badge {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 160px;
    display: flex; /* Ensure content fills the badge */
}

.certification-badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.certification-link {
    display: flex;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, var(--card-bg), var(--dark-bg));
    padding: 25px;
    border-radius: 10px;
    transition: all 0.3s ease;
    align-items: flex-start; /* Align items at the top */
}

.certification-link:hover {
    background: linear-gradient(145deg, var(--primary-color) 0%, var(--card-bg) 100%);
}

.badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgba(77, 138, 255, 0.1);
    border-radius: 50%;
    margin-right: 15px;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.certification-badge:hover .badge-icon {
    background-color: var(--accent-color);
    transform: scale(1.1);
}

.badge-icon i {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.certification-badge:hover .badge-icon i {
    color: white;
}

.badge-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.badge-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--light-text);
    transition: all 0.3s ease;
    line-height: 1.3;
    /* Allow titles to wrap naturally */
    white-space: normal;
}

.certification-badge:hover .badge-title {
    color: var(--accent-color);
}

.badge-description {
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    line-height: 1.4;
    /* Allow text to flow naturally */
    overflow: visible;
}

.certification-badge:hover .badge-description {
    color: var(--light-text);
}

.project-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 200px;
    background-color: var(--accent-color);
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.project-category {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: var(--transition);
}

.project-info {
    padding: 20px;
}

.project-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--light-text);
}

.project-description {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.project-links {
    display: flex;
    gap: 15px;
}

.project-link {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.project-link i {
    margin-right: 5px;
}

.project-link:hover {
    color: #5a52e0;
}

/* Contact Section */
.contact {
    background-color: var(--medium-bg);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 500px;
    width: 100%;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--dark-bg);
    border-radius: 10px;
    transition: var(--transition);
}

.contact-item:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 15px;
    color: var(--primary-color);
}

.contact-item:hover i {
    color: white;
}

.contact-item a {
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--light-text);
    font-size: 1.5rem;
    transition: var(--transition);
}

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

/* Responsive Design */
@media (max-width: 991px) {
    .hero {
        flex-direction: column;
        text-align: center;
        height: auto;
        padding: 150px 0 100px;
    }

    .hero-content {
        padding: 0 20px;
        margin-bottom: 50px;
    }

    .cta-buttons {
        justify-content: center;
    }

    .about-content {
        flex-direction: column;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }

    .nav-links {
        position: absolute;
        right: 0;
        top: 70px;
        background-color: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        height: 0;
        overflow: hidden;
        transition: var(--transition);
        z-index: 999;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.show {
        height: auto;
        padding: 20px 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .burger {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* Animation for NavBar */
.navbar.scrolled {
    background-color: var(--darker-bg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    padding: 10px 0;
}

/* Burger animation */
.burger.active .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.burger.active .line2 {
    opacity: 0;
}

.burger.active .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}