/* --- Global Styles & Variables --- */
:root {
    --primary-color: #8B4513; /* SaddleBrown - earthy */
    --secondary-color: #A0522D; /* Sienna - slightly lighter earth tone */
    --accent-color: #2E8B57; /* SeaGreen - for contrast, nature feel */
    --text-color: #333;
    --light-text-color: #f4f4f4;
    --bg-color: #FDF5E6; /* OldLace - very light, warm background */
    --card-bg: #fff;
    --font-primary: 'Merriweather', serif;
    --font-secondary: 'Montserrat', sans-serif;
    --shadow: 0 4px 10px rgba(0,0,0,0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
    overflow: hidden;
}

h1, h2, h3 {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--primary-color);
}

h1 { font-size: 3rem; margin-bottom: 1rem; }
h2 { font-size: 2.5rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    text-decoration: none;
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text-color);
}
.btn-primary:hover {
    background-color: #65310c;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}
.btn-secondary:hover {
    background-color: #804020;
}

.section {
    padding: 60px 0;
}
.section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    color: #555;
}

/* --- Navigation Bar --- */
#navbar {
    background-color: rgba(139, 69, 19, 0.85);
    color: var(--light-text-color);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}
#navbar.scrolled {
    background-color: var(--primary-color);
    box-shadow: var(--shadow);
}
#navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#navbar .logo {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text-color);
}
#navbar .nav-links {
    list-style: none;
    display: flex;
}
#navbar .nav-links li {
    margin-left: 25px;
}
#navbar .nav-links a {
    color: var(--light-text-color);
    font-weight: 600;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease, color 0.3s ease;
}
#navbar .nav-links a:hover,
#navbar .nav-links a.active {
    border-bottom: 2px solid var(--light-text-color);
    color: #fff; /* Slightly brighter on hover/active */
}
.menu-toggle {
    display: none;
    cursor: pointer;
}
.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--light-text-color);
    transition: all 0.3s ease-in-out;
}


/* --- Hero Section --- */
#hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-background.jpg') no-repeat center center/cover;
    height: 100vh;
    color: var(--light-text-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}
#hero .hero-content {
    max-width: 800px;
}
#hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light-text-color);
}
#hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* --- Profile Section (NEW) --- */
#profile {
    background-color: #fdfaf6; /* A slightly different light, warm bg */
}
.profile-content {
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 40px;
    margin-top: 30px;
}
.profile-image {
    flex: 1;
    max-width: 300px; /* Control image size */
    margin-top: 10px; /* Align better with text if text wraps */
}
.profile-image img {
    /*border-radius: 50%; /* Circular image */
    border: 6px solid var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.profile-text {
    flex: 2;
}
.profile-text h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.8rem;
}
.profile-text h4 {
    font-family: var(--font-secondary); /* Use secondary for this sub-heading */
    color: var(--secondary-color);
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}
.profile-text ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 25px;
}
.profile-text ul li {
    margin-bottom: 12px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: #444; /* Slightly darker text for list items for contrast */
}
.profile-text ul li i {
    color: var(--accent-color);
    margin-right: 12px;
    font-size: 1.3em;
    width: 20px; /* Ensure consistent icon alignment */
    text-align: center;
}

/* --- Courses Section --- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.course-card {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}
.course-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
    margin-bottom: 15px;
}
.course-card h3 {
    margin-bottom: 10px;
}
.course-card p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 15px;
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.portfolio-item:hover img {
    transform: scale(1.1);
}
.portfolio-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    color: var(--light-text-color);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.portfolio-item:hover .portfolio-info {
    transform: translateY(0);
    opacity: 1;
}
.portfolio-info h3 {
    color: var(--light-text-color);
    margin-bottom: 5px;
}
.portfolio-info p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- Contact Section --- */
.contact-content {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}
.contact-form {
    flex: 2;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.contact-info {
    flex: 1;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-secondary);
    font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(139, 69, 19, 0.2);
}
.contact-info h3 {
    margin-bottom: 20px;
}
.contact-info p {
    margin-bottom: 15px;
    font-size: 1.05rem;
}
.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
    text-align: center;
}
.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-links a:hover {
    color: var(--accent-color);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}
footer p {
    margin: 0;
    font-size: 0.9rem;
}
footer .fa-heart {
    color: #e74c3c;
}

/* --- Responsive Design --- */
@media(max-width: 768px) {
    #navbar .container {
        flex-direction: column;
        align-items: flex-start;
    }
    #navbar .logo {
        margin-bottom: 10px;
    }
    .menu-toggle {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
    }
    #navbar .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    #navbar .nav-links.active {
        display: flex;
    }
    #navbar .nav-links li {
        margin: 10px 0;
        width: 100%;
    }
    #navbar .nav-links a {
        display: block;
        padding: 10px;
        width: 100%;
    }
    #navbar .nav-links a:hover,
    #navbar .nav-links a.active {
        border-bottom: none;
        background-color: rgba(255,255,255,0.1);
    }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    #hero {
        height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }
    #hero h1 { font-size: 2.5rem; }
    #hero p { font-size: 1.1rem; }

    /* Profile section responsive */
    .profile-content {
        flex-direction: column;
        text-align: center;
        align-items: center; /* Center items when stacked */
    }
    .profile-image {
        margin-bottom: 30px;
        max-width: 200px; /* Smaller image on mobile */
    }
    .profile-text ul {
        padding-left: 0;
        text-align: left; /* Keep list items left-aligned */
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .profile-text ul li {
        justify-content: flex-start; /* Align icon and text to start */
    }


    .courses-grid, .portfolio-grid {
        grid-template-columns: 1fr;
    }
    .contact-content {
        flex-direction: column;
    }
    .contact-form {
        margin-bottom: 30px;
    }
}

@media(max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 2rem; }
    #hero h1 { font-size: 2rem; }
    #hero p { font-size: 1rem; }
    .profile-text h3 { font-size: 1.6rem; }
    .profile-text h4 { font-size: 1.1rem; }
}