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

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Ensure footer stays at the bottom */
    min-height: 100vh; /* Ensure body takes full height */
}

header {
    text-align: center;
    margin-top: 20px;
    animation: fadeIn 2s ease-in-out;
}

h1 {
    font-size: 2.5em;
    color: #2c3e50;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
    animation: fadeIn 2s ease-in-out;
}

nav ul li a {
    color: #2980b9;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

section {
    width: 90%;
    max-width: 1200px;
    margin: 20px 0;
    animation: fadeInUp 1s ease-in-out;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.footer {
    text-align: center;
    padding: 20px;
    background-color: #2c3e50;
    color: white;
    width: 100%;
}

#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 20px;
    background-color: #2980b9;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: none; /* Hidden by default */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}