body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(120deg, #f0f0f0, #ffffff);
}

header {
    background-color: #4a4a4a;
    color: #fff;
    padding: 1rem 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #fff;
    transition: width 0.3s ease;
}

nav ul li a:hover::after {
    width: 100%;
}

main {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    flex: 1;
}

section {
    margin-bottom: 40px;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text {
    order: 1;
}

.about-image {
    order: 2;
}

#profile-picture {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 40px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .about-content {
        grid-template-columns: 1fr;
    }

    .about-text, .about-image {
        order: 0;
    }

    .about-image {
        text-align: center;
        margin-bottom: 1rem;
    }
}

h1, h2 {
    color: #4a4a4a;
}

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

.project {
    position: relative;
    overflow: hidden;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(74, 74, 74, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    padding: 1rem;
}

.project:hover .project-overlay {
    opacity: 1;
}

.project img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.project:hover img {
    transform: scale(1.05);
}

.project-title {
    margin: 10px 0 0 0;
    font-size: 1.1em;
    color: #333;
}

#skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style-type: none;
    padding: 0;
}

#skill-list li {
    background-color: #4a4a4a;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 5px;
}

#skill-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

form {
    display: grid;
    gap: 10px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

button {
    background-color: #4a4a4a;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #333;
}

footer {
    background-color: #4a4a4a;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    width: 100%;
}

.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    background: rgba(74, 74, 74, 0.15);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

.dark-mode .floating-shape {
    background: rgba(255, 255, 255, 0.4);
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        transform: translate(var(--moveX), var(--moveY)) rotate(360deg);
    }
}

.slide-in {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 2s ease, transform 1s ease;
}

.slide-in.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(100px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.active,
.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loader.hidden {
    display: none;
}

.loading-animation {
    width: 200px;
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.loading-animation::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 100%;
    background: #4a4a4a;
    border-radius: 3px;
    animation: progress 1s ease-in-out infinite;
}

@keyframes progress {
    0% { left: -40%; }
    100% { left: 100%; }
}

.skill-container {
    display: grid;
    gap: 1rem;
}

.skill-item {
    display: grid;
    gap: 0.5rem;
}

.progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: #4a4a4a;
    border-radius: 5px;
    transition: width 1s ease;
}

.scroll-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: #4a4a4a;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-top.visible {
    opacity: 1;
}

.dark-mode-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: #4a4a4a;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex; 
    justify-content: center;
    align-items: center;
    color: white;
}

.dark-mode {
    background: #1a1a1a;
    color: #fff;
}

.dark-mode h1,
.dark-mode h2 {
    color: #fff;
}

.dark-mode .project {
    background-color: #2a2a2a;
}

.dark-mode .project-title {
    color: #fff;
}

