/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4a90e2;
    --secondary-color: #2c3e50;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

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

.nav-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding-top: 80px;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.profile-image-container {
    margin-bottom: 3rem;
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.profile-image {
    width: 280px;
    height: 280px;
    border-radius: 10px;
    border: 6px solid var(--white);
    object-fit: cover;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
    display: block;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation-delay: 0.2s;
}

.highlight {
    color: #ffd700;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    min-height: 1.5rem;
}

/* Typing cursor effect (COMMENTED OUT FOR LATER USE) */
/*
#typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
    font-weight: bold;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}
*/

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-5px);
}

.leetcode-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes the logo white */
    transition: var(--transition);
}

.social-link:hover .leetcode-logo {
    filter: brightness(0) invert(0.2); /* Makes the logo dark blue on hover */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--white);
    color: var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-primary + .btn-primary {
    margin-left: 1rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--white);
}

.btn-download:hover {
    background: #3a7bc8;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* Section Styles */
section {
    padding: 80px 0;
}

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

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto;
    border-radius: 2px;
}

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

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.skills {
    margin-top: 3rem;
}

.skills h3 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

.skill-tag {
    background: var(--white);
    padding: 10px 20px;
    border-radius: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    font-weight: 500;
}

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

/* Education Section */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.education-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.education-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.education-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.education-content h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.institution {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.period {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.description {
    margin-bottom: 0.5rem;
}

.gpa {
    font-weight: 600;
    color: var(--primary-color);
}

/* Experience Section */
.experience {
    background: var(--light-bg);
}

.experience-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.experience-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.experience-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.experience-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.experience-content h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.company {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

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

/* Projects Carousel */
.projects-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.projects-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 2rem;
    flex: 1;
    padding: 1rem 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.projects-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.carousel-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicator.active {
    background: var(--primary-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.project-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    flex: 0 0 350px; /* Fixed width for horizontal scroll */
    min-width: 350px;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.project-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.project-card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.project-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
    color: #666;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tech-tag {
    background: var(--light-bg);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-color);
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    display: inline-flex !important;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    text-decoration: none !important;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: transparent;
}

.project-link:hover {
    background: var(--primary-color);
    color: var(--white);
}

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

/* Certifications Carousel */
.certifications-carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.certifications-carousel {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    gap: 2rem;
    flex: 1;
    padding: 1rem 0;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    align-items: stretch; /* Ensure all cards have same height */
}

.certifications-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.certification-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: var(--transition);
    flex: 0 0 320px; /* Increased width for longer titles */
    min-width: 320px;
}

.certification-link:hover {
    transform: translateY(-5px);
}

.certification-card {
    background: var(--white);
    padding: 1.2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    flex: 0 0 320px; /* Increased width for longer titles */
    min-width: 320px;
    height: 320px; /* Increased height for longer titles */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
}

.certification-link:hover .certification-card {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.certification-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

.certification-card h3 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.3;
    min-height: 4rem; /* More height for longer titles */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0.3rem;
    word-wrap: break-word;
    hyphens: auto;
}

.issuer {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    height: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.description {
    line-height: 1.6;
    color: #666;
}

.certification-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

.certification-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
}

.certification-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Resume Section */
.resume {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.resume .section-title {
    color: var(--white);
}

.resume .section-title::after {
    background: var(--white);
}

.resume-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.resume-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 2rem;
    line-height: 1.8;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-item i {
    color: var(--primary-color);
    font-size: 1.3rem;
}

.contact-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.social-links-contact {
    display: flex;
    gap: 1rem;
}

.social-links-contact .social-link {
    background: var(--primary-color);
    color: var(--white);
}

.social-links-contact .social-link:hover {
    background: var(--secondary-color);
}

/* Contact Form */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.contact-form .btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-color);
    color: var(--white);
}

.contact-form .btn:hover {
    background: #3a7bc8;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 2rem 0;
    text-align: center;
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer i {
    color: #e74c3c;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-hover);
}

.scroll-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
}

.scroll-to-top.show {
    display: flex;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Profile image is now static - no hover effects */

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

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

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

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

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-carousel-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .carousel-btn {
        position: static;
        margin: 0 auto;
    }
    
    .project-card {
        flex: 0 0 300px;
        min-width: 300px;
    }
    
    .certifications-carousel-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .certification-card {
        flex: 0 0 300px;
        min-width: 300px;
        height: 300px; /* Increased height for longer titles on mobile */
        padding: 1rem;
    }
    
    .certification-card h3 {
        font-size: 0.95rem;
        min-height: 3.5rem;
    }
    
    .certification-link {
        flex: 0 0 300px;
        min-width: 300px;
    }

    .education-item {
        flex-direction: column;
        text-align: center;
    }

    .education-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .profile-image {
        width: 200px;
        height: 200px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .btn-secondary {
        margin-left: 0.5rem;
    }
    
    .hero-content .btn {
        display: block;
        margin: 0.5rem auto;
        max-width: 200px;
    }
}
