/* ===== Color Palette =====
   Dark Brown:    #4B352A
   Rust Orange:   #CA7842
   Sage Green:    #B2CD9C
   Pale Yellow:   #faedcd
*/

/* ===== Reset and Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
    scroll-behavior: smooth;
}

body {
    font-family: "Roboto", sans-serif;
    line-height: 1.6;
    background-color: #faedcd;
    color: #4b352a;
    padding: 0 1rem;
    text-wrap: balance;
}

h1,
h2,
h5,
h6 {
    font-family: "Titan One";
    color: #ca7842;
}

/* ===== Section Layouts ===== */
section {
    padding: 3rem 0;
    max-width: 960px;
    margin: 0 auto;
    border-bottom: 1px solid #b2cd9c;
}

/* ===== Hero Section ===== */
header.hero {
    background-color: #4b352a;
    color: #faedcd;
    text-align: center;
    padding: 4rem 1rem 3rem;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.cta-buttons .btn {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #ca7842;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-buttons .btn:hover {
    background-color: #b2cd9c;
    color: #4b352a;
}

/* ===== About Me Section ===== */
.about-me {
    text-align: center;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.about-content p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* ===== Features Grid ===== */
.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 6px solid #ca7842;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.feature h3 {
    margin-bottom: 0.5rem;
}

/* ===== Connect Section ===== */
.connect {
    text-align: center;
    background-color: #b2cd9c;
    color: #4b352a;
    padding: 3rem 1rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links .btn {
    margin: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: #4b352a;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.social-links .btn:hover {
    background-color: #ca7842;
}

/* ===== Tech Stack Section ===== */
.tech-stack h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-item {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    border-bottom: 3px solid #ca7842;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    color: #4b352a;
}

/* ===== Projects Section ===== */
.projects h2 {
    text-align: center;
    margin-bottom: 2rem;
}

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

.project-card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.project-card h3 {
    padding: 1.25rem 1.25rem 0.5rem;
}

.project-card p {
    padding: 0 1.25rem 1rem;
    flex-grow: 1;
}

.project-links {
    display: flex;
    padding: 1rem 1.25rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eaeaea;
}

.project-links a {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
    margin-right: 0.75rem;
}

.project-links .github {
    background-color: #4b352a;
    color: white;
}

.project-links .github:hover {
    background-color: #3a2921;
}

.project-links .live {
    background-color: #ca7842;
    color: white;
}

.project-links .live:hover {
    background-color: #b5683a;
}

/* ===== FAQ Section ===== */
.faq-item {
    margin-bottom: 1rem;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease-in-out;
    position: relative;
}

.faq-question {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.faq-item h4 {
    margin: 0;
    font-size: 1.1rem;
}

.faq-toggle {
    color: #ca7842;
    font-size: 1.5rem;
    font-weight: bold;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(180deg);
}

/* Smooth answer panel and border bar */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 1.25rem;
    background-color: #f9f9f9;
    position: relative;
}

/* Animated orange bar on the left */
.faq-answer::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 0%;
    background-color: #ca7842;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

/* When expanded, orange bar grows */
.faq-item.active .faq-answer::before {
    height: 100%;
}

/* Text fade */
.faq-answer p {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 0.5rem;
    margin-bottom: 0;
}
/* Text fades in with answer */
.faq-item.active .faq-answer p {
    opacity: 1;
}

/* Title styling */
.faq h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ===== Footer ===== */
footer {
    background-color: #4b352a;
    color: #faedcd;
    padding: 3rem 1rem 1rem;
    margin-top: 2rem;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.footer-content {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2rem;
}

.footer-info,
.footer-links {
    flex: 1;
    min-width: 250px;
}

.footer-info h3,
.footer-links h3 {
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-info a {
    color: #faedcd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-info a:hover {
    color: #ca7842;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(178, 205, 156, 0.2);
    font-size: 0.9rem;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .about-content {
        padding: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .cta-buttons .btn,
    .social-links .btn {
        width: 90%;
        display: block;
        margin: 0.5rem auto;
    }

    .feature-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .tech-grid {
        justify-content: center;
    }

    .project-links {
        flex-direction: column;
    }

    .project-links a {
        margin-right: 0;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .faq-question h4 {
        font-size: 1rem;
    }
}
