:root {
    --primary: #3a86ff;
    --primary-dark: #2667cc;
    --dark: #2b2d42;
    --light: #f8f9fa;
    --gray: #6c757d;
    --border-radius: 12px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 100px 0;
}

h1, h2, h3 {
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: rgba(248, 249, 250, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    list-style: none;
}

.nav-links li.resume-btn {
    order: 2;
    margin-left: 1.5rem; /* Added space between resume and other nav links */
}

.nav-links li:not(.resume-btn) {
    order: 1;
}

.resume-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: 150px;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 1.5rem;
        align-items:flex-start;
        width: 50%;
        max-width: 300px;
        position: fixed;
        top: 70px;
        right: 0;
        height: 100vh;
        background-color: rgb(115, 112, 112);
        padding: 2rem 1.5rem;
        box-shadow: 10px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 9999;
        overflow-y: auto;
        border-radius: var(--border-radius);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li.resume-btn {
        order: 0;
        margin-left: 0;
        width: 100%;
    }

    .resume-btn {
        display: block;
        padding: 0.9rem 1.3rem !important;
        font-weight: 600;
        font-size: 1.6rem;
        border-radius: 0.5rem;
        box-shadow: 0 2px 5px rgba(38, 103, 204, 0.2);
        margin-bottom: 1rem;
        margin-top: 1rem; /* Added space above resume button on mobile */
        background-color: var(--primary);
        color: white;
        text-align: center;
        width: 100%;
        
    }

    .resume-btn:hover {
        background-color: var(--primary-dark);
        box-shadow: 0 4px 8px rgba(38, 103, 204, 0.3);
        text-decoration: none;
    }


    .logo{
        height: 70px;
        
    }


}

@media (max-width: 480px) {
    .resume-btn {
        font-size: 1.4rem;
        padding: 0.5rem 0.8rem;
    }
}

.nav-links a {
    font-weight: bold;
    font-size: 18px;
    position: relative;
    padding: 5px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

/* Resume Button */
.resume-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(38, 103, 204, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.resume-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(38, 103, 204, 0.3);
    text-decoration: none;
}

.resume-btn i {
    font-size: 1rem;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 80px;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
        url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-4.0.3&auto=format&fit=crop&w=2072&q=80');
    background-size: cover;
    background-position: center;
    color: white;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero h2 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: initial;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 20px;
}

@media (max-width: 768px) {

    .hero {
        height: auto;
        padding: 80px 0;
    }
    .hero-buttons {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 60%;
        max-width: 300px;
        margin: 0 auto;
        gap: 0.75rem;
    }

    .hero h2 {
        white-space: nowrap;
    }
}

.hero-buttons a.btn {
    background-color: var(--primary);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(58, 134, 255, 0.4);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-buttons a.btn:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 6px 12px rgba(38, 103, 204, 0.6);
    text-decoration: none;
}

.profile-picture {
    width: 230px;
    height: 230px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary);
    margin-bottom: 2rem;
    margin-top: 80px; /* Added space below navbar */
}

/* About Section */
.about {
    background-color: white;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary);
    border-radius: 2px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--gray);
    text-align: justify;
}

.about-image {
    position: relative;
    height: 600px;
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image {
    height: 280px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}



.btn-project-card {
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

.view-btn {
    padding: 10px 20px;
    background-color: #3a86ff;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.view-btn:hover {
    background-color: #2375fa;
}

@media (max-width: 768px) {
    .project-image {
        height: 180px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .project-card {
        margin-right: 0.7rem;
    }
}

.project-details {
    padding: 1.5rem;
}

.project-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.project-tech {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tech-tag {
    background-color: #e9f2ff;
    color: var(--primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Skills Section */
.skills {
    padding: 60px 0;
    background-color: #f8f9fa;
}

.skills-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .skills-grid {
        flex-direction: column;
        gap: 20px;
        max-width: 100%;
    }
}

.skills-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.skill-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.skill-item:hover {
    transform: translateY(-5px);
}

.skill-icon {
    font-size: 2rem;
    color: var(--icon-color);
}

.skill-name {
    font-size: 1.3rem;
    font-weight: 500;
    color: #333;
}

/* Specific icon colors */
.fa-java { color: #f89820; }
.fa-js { color: #f0db4f; }
.fa-html5 { color: #e34c26; }
.fa-css3-alt { color: #2965f1; }
.fa-leaf { color: #6db33f; }
.fa-database { color: #00758f; }
.fa-table { color: #4479a1; }
.fa-microchip { color: #00979d; }
.fa-sensor { color: #5e35b1; }
.fa-git-alt { color: #f14e32; }

/* Education Section */
.education-timeline {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    position: static;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.education-timeline::before {
    display: none;
}

.timeline-item {
    width: 100%;
    margin-bottom: 0;
    padding: 1.5rem 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
    text-align: left;
    border-left: none;
    border: 1px solid #ddd;
    transition: box-shadow 0.3s ease;
}

.timeline-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.timeline-item:nth-child(odd),
.timeline-item:nth-child(even) {
    left: 0;
    padding: 1.5rem 2rem;
    text-align: left;
}

.timeline-content {
    padding: 0;
    background: none;
    box-shadow: none;
    border-radius: 0;
    position: static;
}

.timeline-content::before {
    display: none;
}

.timeline-date {
    position: relative;
    top: auto;
    left: 0;
    right: auto;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

/* Contact Section */
.contact {
    background-color: white;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    justify-content: center;
}

.contact-container > h2 {
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info {
    flex: 1 1 300px;
    max-width: 400px;
    order: 1;
}

.contact-form {
    flex: 1 1 300px;
    max-width: 500px;
    order: 2;
}

@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        align-items: center;
    }

    .contact-info,
    .contact-form {
        max-width: 100%;
        order: initial;
    }
}

.contact-info h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.contact-details {
    margin-bottom: 2rem;
}

.contact-details p {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9f2ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 1.5rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(58, 134, 255, 0.2);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: var(--primary-dark);
}

/* Footer */
footer {
    background-color: var(--dark);
    color: white;
    text-align: center;
    padding: 1rem 0;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.footer-links a {
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.copyright {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .about-image {
        order: -1;
        height: 300px;
    }

    .timeline-item {
        width: 100%;
        padding: 0;
        text-align: left !important;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 0;
    }

    .timeline-item:nth-child(even) {
        left: 0;
        padding-left: 0;
    }

    .education-timeline::before {
        left: 20px;
    }

    .timeline-content::before {
        left: 10px !important;
        right: auto !important;
    }

    .timeline-date {
        position: static !important;
        margin-bottom: 0.5rem;
        color: var(--primary) !important;
    }
}

@media (max-width: 768px) {
    section {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: 0;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        gap: 1.5rem;
        box-shadow: -10px 0 15px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: var(--transition);
        z-index: 9999;
        overflow-y: auto;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .menu-toggle {
        display: block;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    /* Removed display:none to show resume button on mobile */
    /* .resume-btn {
        display: none;
    } */

    /* Fix timeline item alignment for mobile */
    .timeline-item {
        padding: 1.5rem 1rem !important;
        text-align: left !important;
        left: 0 !important;
        margin-left: 0 !important;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        left: 0 !important;
        margin-left: 0 !important;
        text-align: left !important;
    }
}