/* ======== Global Styles ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
    transition: background 0.3s, color 0.3;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

header {
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 999;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}


nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    transition: max-height 0.3s ease;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}


nav a { 
    color: white;
    text-decoration: none;
    font-weight: 500;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}
nav a:hover{
    border-bottom: 2px solit #fff;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
}


section {
    padding: 2rem;
    text-align: center;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.profile-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 1rem;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-in, transform ease-in;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}


.project {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    flex: 1 1 300px;
    transition: transform 0.3s ease;
}
.project:hover {
    transform: translateY(-5px);
}

.skills i {
    font-size: 2rem;
    margin: 0 10px;
    color: #444;
}

form{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

input, textarea {
    padding: 0.75rem;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-family: inherit;
}

button[type="submit"] {
    background-color: #333;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

footer {
    background-color: #0c0c0c;
    color: white;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}
/* ========= Fade-In Animation ======== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform ease-out;
}
.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ======== Dark Mode styles ======== */
body.dark {
    background-color: #121212;
    color: #f0f0f0;
}

body.dark header, 
body.dark footer {
    background-color: #1e1e1e;
}

body.dark a {
    color: #90caf9;
}

body.dark .project {
    background-color: #1e1e1e;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}
/* ======== Responsive ======== */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        background-color: #333;
    }
    nav ul.show {
        max-height: 300px;
    }
    .nav-toggle { 
        display:block
    }

 .project-list {
    flex-direction: column;
    align-items: center;
 }
}

#darkModeToggle {
    background: none;
    color: white;
    border: 1px solid white;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

body.dark #darkModeToggle {
    background: white;
    color: #0c0c0c;
    border: none;
}