﻿/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #1e1e1e;
    color: #e0e0e0;
    overflow-x: hidden;
}

/* HEADER */
header {
    background: #111;
    color: #fff;
    padding: 1rem;
    text-align: center;
    position: relative;
}

.logo {
    max-width: 20%;
    height: auto;
}

.logo-container {
    text-align: center;
    margin-bottom: 0.5rem;
}

.header-icons {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    display: flex;
    gap: 0.8rem;
}

    .header-icons a {
        color: #fff;
        font-size: 1.2rem;
        transition: color 0.3s, transform 0.2s;
    }

        .header-icons a:hover {
            color: #1da1f2;
            transform: scale(1.1);
        }

header nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.8rem;
    gap: 0.8rem;
}

    header nav a {
        color: #fff;
        text-decoration: none;
        font-weight: bold;
        transition: color 0.3s;
    }

        header nav a:hover {
            color: #1da1f2;
        }

/* MAIN CONTENT */
main {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

section {
    margin-bottom: 3rem;
}

h2 {
    border-bottom: 2px solid #444;
    padding-bottom: 0.3rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: #fff;
}
#about p,
.project-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #ddd; /* soft white text */
    font-size: 1rem;
}

#about em,
.project-content em {
    color: #aaa; /* muted italic text */
    font-style: italic;
}

#about strong,
.project-content strong {
    color: #fff; /* keep bold text bright */
}
/* PROJECT CONTAINERS */
.project {
    background: #2a2a2a;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* DROPDOWN HEADER (clickable bar) */
.project-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    padding: 0.8rem 1rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.3s;
}

    .project-bar:hover {
        background: #3d3d3d;
    }

    .project-bar .left {
        display: flex;
        align-items: center;
        gap: 0.6rem;
    }

    .project-bar .title {
        font-weight: bold;
        color: #fff;
        font-size: 1.1rem;
    }

/* GITHUB LINK (in bar) */
.github-link {
    color: #fff;
    font-size: 1.2rem;
    transition: color 0.3s, transform 0.2s;
}

    .github-link:hover {
        color: #1da1f2;
        transform: scale(1.1);
    }

/* DROPDOWN ICON (arrow) */
.dropdown-icon {
    color: #ccc;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

    .dropdown-icon.rotated {
        transform: rotate(180deg);
    }

    /* Ensure all dropdown arrows rotate smoothly */
    .dropdown-icon.rotated,
    .dropdown-arrow.rotated {
        transform: rotate(180deg);
        transition: transform 0.3s ease;
    }

/* Keep project title links always white, even after visiting */
.project-bar .title a,
.project-bar .title a:visited,
.project-bar .title a:active {
    color: #fff;
    text-decoration: none;
}

    /* hover color for project titles */
    .project-bar .title a:hover {
        color: #1da1f2;
    }

/* HIDDEN PROJECT CONTENT */
.project-content {
    max-height: 0;
    overflow: hidden;
    padding: 0 1rem;
    background: #2a2a2a;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

    .project-content.open {
        max-height: 1500px; /* allow large sections */
        padding: 1rem;
    }

    /* PROJECT CONTENT TEXT FORMATTING */
    .project-content p {
        margin-bottom: 1rem;
        line-height: 1.6;
        color: #ddd;
    }

    .project-content em {
        color: #ddd;
    }

    .project-content ul {
        margin: 0.5rem 0 1rem 1.5rem;
        padding-left: 1rem;
        list-style-type: disc;
    }

    .project-content li {
        margin-bottom: 0.4rem;
        line-height: 1.5;
    }

    .project-content strong {
        color: #fff;
    }

    .project-content code {
        background: #1a1a1a;
        padding: 0.2rem 0.4rem;
        border-radius: 4px;
        font-family: monospace;
        color: #1da1f2;
    }

/* CONTACT */
#contact {
    text-align: center;
    margin-top: 2rem;
}

.contact-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1rem;
}

    .contact-icons a {
        font-size: 2rem;
        color: #e0e0e0;
        transition: color 0.3s, transform 0.2s;
    }

        .contact-icons a:hover {
            color: #1da1f2;
            transform: scale(1.2);
        }

.back-to-top {
    text-align: center;
    margin: 2rem 0;
}

    .back-to-top a {
        background: #333;
        color: #fff;
        padding: 0.6rem 1.2rem;
        border-radius: 8px;
        text-decoration: none;
        font-weight: bold;
        transition: background 0.3s, transform 0.2s;
    }

        .back-to-top a:hover {
            background: #1da1f2;
            transform: scale(1.1);
        }

/* FOOTER */
footer {
    background: #111;
    color: #888;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    body {
        background: #1e1e1e; /* ensure body background stays consistent */
        color: #e0e0e0; /* reaffirm text color */
    }

    main {
        padding: 0 0.75rem;
        background: inherit; /* ensures main uses body background */
    }

    section {
        background: inherit; /* ensures sections maintain proper background */
    }

    .project {
        background: #2a2a2a; /* reinforce project container background */
    }

    .project-content {
        background: #2a2a2a; /* reinforce dropdown content background */
    }

    .header-icons {
        position: static;
        justify-content: center;
        margin-top: 0.5rem;
    }

    header nav {
        flex-direction: column;
        align-items: center;
    }

    .logo {
        max-width: 70%;
    }

    .project-bar {
        flex-direction: row;
        gap: 0.5rem;
    }
}
