:root {
    --deep-blue: #1a1a2e;
    --blue-accent: #16213e;
    --purple-main: #301b3f;
    --purple-light: #4d2d60;
    --deep-brown: #3c2a21;
    --white-text: #f0f0f0;
    --accent: #7b68ee;
}

/* Universal box-sizing for consistent layout */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, var(--deep-blue), var(--purple-main));
    color: var(--white-text);
    line-height: 1.6;
    min-height: 100vh; /* Ensure body takes full viewport height */
    display: flex;
    flex-direction: column;
}

/* Header Styling */
header {
    background-color: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    padding: 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
}

.header-scrolled {
    padding: 0.8rem 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

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

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem; /* Added gap for better spacing */
}

.logo {
    font-size: 1.5rem; /* Adjusted for better fit */
    font-weight: 700;
    color: var(--white-text);
    white-space: nowrap; /* Prevent logo from wrapping */
}

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

.nav-links a {
    color: var(--white-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

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

.nav-links a:hover {
    color: var(--accent);
}

.mobile-menu {
    display: none;
    cursor: pointer;
    z-index: 1001; /* Ensure hamburger is on top */
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white-text);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 6rem; /* Account for fixed header */
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 800;
}

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

.hero-actions {
    display: flex;
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
    gap: 1rem; /* Space between buttons */
    margin-bottom: 1rem;
}

.hero-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}


/* General Button Styling */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(90deg, var(--accent), #a78bfa);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center; /* Ensures text is centered for buttons spanning full width */
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Section Common Styles */
.section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 2.5rem;
    font-weight: 700;
}

.section-title span {
    color: var(--accent);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-img {
    width: 75%;
    max-width: 75%; /* Ensure responsiveness */
    height: 75%; /* Maintain aspect ratio */
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Resume Section */
.resume-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.resume-card {
    background-color: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.resume-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

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

.resume-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.resume-card p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

.tag {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: var(--purple-light);
    border-radius: 50px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    white-space: nowrap; /* Prevent tags from breaking words */
}

/* App Section */
.app-preview {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.app-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.app-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.app-content p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.app-features {
    margin-top: 2rem;
}

.feature {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.feature-icon {
    background-color: var(--purple-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

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

.project-card {
    background-color: rgba(26, 26, 46, 0.8);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.project-content p {
    margin-bottom: 1rem;
    opacity: 0.8;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info p {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.contact-icon {
    margin-right: 1rem;
    background-color: var(--purple-light);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-form {
    background-color: rgba(26, 26, 46, 0.8);
    padding: 2rem;
    border-radius: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    color: var(--white-text);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* Social Links */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--purple-light);
    border-radius: 50%;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--accent);
    transform: translateY(-3px);
}

/* Footer Styling */
footer {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 3rem 0;
    text-align: center;
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    list-style: none;
    margin-bottom: 2rem;
}

.footer-links a {
    color: var(--white-text);
    text-decoration: none;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero-grid, .about-grid, .app-preview, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .hero-image-container {
        order: -1;
        margin-bottom: 2rem;
    }
    .about-img {
        order: -1;
    }
    .app-preview .fade-in:last-child {
        order: -1;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .resume-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--deep-blue);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        padding-top: 5rem;
        gap: 1.5rem;
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .mobile-menu.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-menu.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .section {
        padding: 4rem 0;
    }
}

/* Animations and Effects */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}