/* --- Global Styles & Resets --- */
:root {
    /* Colors inspired by your logo and visiting card */
    --primary-purple: #7030a0;
    /* A prominent purple from your logo */
    --accent-teal: #00bcd4;
    /* A teal/blue from your logo */
    --dark-background: #212529;
    /* Dark grey from your visiting card */
    --light-grey: #f8f9fa;
    /* Light grey background */
    --white: #ffffff;
    --text-color: #e0e0e0;
    /* Lighter text for dark backgrounds */
    --light-text-color: #333;
    /* Dark text for light backgrounds */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
}

body {
    color: var(--light-text-color);
    /* Default text color for light sections */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

section:nth-child(even) {
    background-color: var(--light-grey);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 20px;
    color: var(--dark-background);
    /* H2 in light sections */
}

p.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 40px;
}

/* --- Header & Navigation --- */
header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

/* --- LOGO STYLES UPDATED HERE --- */
.logo {
    text-decoration: none;
    display: flex;
    /* Helps with vertical alignment */
    align-items: center;
}

.logo img {
    height: 70px;
    /* Adjust this height as needed */
    width: auto;
    /* Maintains the aspect ratio */
}


.logo h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: auto;
}

header nav ul {
    list-style: none;
    display: flex;
}

header nav li {
    margin-left: 25px;
}

header nav a {
    text-decoration: none;
    color: var(--dark-background);
    /* Nav link color */
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease;
}

header nav a:hover {
    color: var(--primary-purple);
    /* Hover color for nav links */
}

/* --- Hero (Home) Section --- */
.hero {
    /* Use a gradient inspired by your logo for the hero background */
    background: linear-gradient(90deg, var(--accent-teal) 0%, var(--primary-purple) 100%);
    color: var(--white);
    min-height: 70vh;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 140px;
    padding-bottom: 70px;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--white);
    /* White text for hero section h2 */
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

.cta-button {
    display: inline-block;
    background: var(--dark-background);
    /* Dark button for contrast */
    color: var(--white);
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #343a40;
    /* Slightly lighter dark for hover */
    transform: translateY(-2px);
}

/* --- Portfolio Section --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
}

.portfolio-item h3 {
    color: var(--primary-purple);
    /* Portfolio item titles */
    margin: 15px 0 10px;
}

/* --- About Section --- */
#about .container {
    max-width: 800px;
    text-align: center;
    font-size: 1.1rem;
}

/* --- Contact Section --- */
/*
#contact {
    background-color: var(--dark-background);
    color: var(--text-color); 
}

#contact h2 {
    color: var(--white);
}
#contact p {
    color: var(--text-color);
}

#contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--white); 
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #555; 
    background-color: #3a3f44; 
    color: var(--white);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
}

#contact-form button {
    width: 100%;
    background: var(--primary-purple); 
}

#contact-form button:hover {
    background-color: #5d2881; 
}
*/

/* --- New Contact Details Grid --- */
.contact-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
    text-align: center;
}

.contact-item {
    padding: 20px;
    border: 1px solid #333;
    /* Darker border for the dark background */
    border-radius: 8px;
    background-color: #2a2e34;
    /* Slightly lighter than the dark background */
}

.contact-item .icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.contact-item h3 {
    color: var(--primary-purple);
    /* Use your accent color */
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.contact-item a {
    color: var(--accent-teal);
    /* Use your teal accent color for links */
    text-decoration: none;
    font-weight: 600;
}

.contact-item p {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 5px 0;
}

.contact-cta {
    margin: 40px auto 0;
    display: block;
    max-width: 300px;
    text-align: center;
}

/* --- Mobile Responsiveness for Contact Grid --- */
@media (max-width: 768px) {
    .contact-details-grid {
        grid-template-columns: 1fr;
        /* Stack items vertically on mobile */
    }
}

/* --- Footer --- */
footer {
    background: var(--dark-background);
    /* Dark footer */
    color: #aaa;
    text-align: center;
    padding: 30px 0;
}

/* --- Portfolio Carousel Styles --- */
/* Responsive carousel styles */
.portfolio-carousel {
    display: flex;
    transition: transform 0.38s cubic-bezier(.22, .9, .32, 1);
    width: 100%;
}

.portfolio-item {
    flex: 0 0 100%;
    min-width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.portfolio-item img {
    width: 100%;
    max-width: 800px;
    /* Limit maximum width */
    height: 400px;
    /* Set fixed height */
    object-fit: contain;
    /* Maintain aspect ratio */
    margin: 0 auto;
    display: block;
}

/* Optional: Add some spacing and styling */
.portfolio-item h3 {
    margin: 16px 0 8px;
}

.portfolio-item p {
    margin: 0;
    max-width: 600px;
}

/* Carousel Control Buttons */
.carousel-wrapper {
    position: relative;
    width: 100%;
    margin: 20px 0;
    overflow: hidden;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    font-size: 20px;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* --- =================== --- */
/* --- Mobile Responsiveness --- */
/* --- =================== --- */

@media (max-width: 768px) {

    h2 {
        font-size: 2rem;
    }

    header .container {
        flex-direction: column;
        height: auto;
        padding-top: 15px;
    }

    .logo {
        margin-bottom: 10px;
    }

    header nav {
        width: 100%;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        padding-bottom: 10px;
    }

    header nav li {
        margin: 5px 0;
        text-align: center;
        width: 100%;
    }

    header nav a {
        display: block;
        padding: 8px;
    }

    .hero {
        padding-top: 150px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    /* .carousel-wrapper { padding: 6px 0; } */
    /* .carousel-control { width: 34px; height: 34px; } */
    .portfolio-item img {
        height: 220px;
        /* Smaller height for mobile */
    }
}

/* optional: visually indicate active item (if you use .active for styling) */
.portfolio-carousel .carousel-item.active {
    /* example: slightly raise or highlight */
    transform: none;
}

/* Header layout: ensure hamburger sits left of logo */
header .container {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    /* keep items in one row, left aligned */
    gap: 12px;
    flex-wrap: nowrap;
    flex-direction: row;
    padding: 12px 16px;
}

/* Hamburger button should be part of the flow, not absolute */
.mobile-menu-toggle {
    display: none;
    /* keep desktop hidden (unchanged) */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    /* prevent overlap */
    z-index: 1250;
    order: 0;
    flex: 0 0 auto;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #222;
    margin: 4px 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Logo sizing & flow */
header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    order: 1;
    flex: 0 1 auto;
    margin: 0;
}

header .logo img {
    height: 40px;
    max-height: 48px;
    display: block;
}

/* Off-canvas nav */
.nav-menu {
    order: 2;
}


@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    /* header layout: keep logo centered/visible, nav hidden off-canvas */
    header .container {
        align-items: center;
    }

    .logo {
        /* ensure logo remains visible */
        flex: 1;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 180px;
        height: 100vh;
        background-color: #fff;
        padding: 80px 20px 20px;
        transition: left 0.28s ease;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
        z-index: 1100;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        display: flex;
        flex-direction: column;
        gap: 18px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .nav-menu a {
        color: inherit;
        text-decoration: none;
        font-size: 1.05rem;
    }

    /* hamburger to X animation */
    .mobile-menu-toggle.active span:first-child {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:last-child {
        transform: translateY(-6px) rotate(-45deg);
    }

    /* hide original desktop nav if needed */
    nav {
        /* keep layout stable on mobile; actual menu is off-canvas */
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .carousel-control {
        width: 36px;
        height: 36px;
        background: rgba(0, 0, 0, 0.7);
    }

    .prev-btn {
        left: 10px;
    }

    .next-btn {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

}

/* Mobile Adjustments for Carousel */
@media (max-width: 600px) {
    .portfolio-carousel {
        height: 400px;
        /* Increase height for smaller screens if needed */
    }

    .carousel-control {
        padding: 5px 10px;
        font-size: 1.2rem;
    }
}

@media (max-width: 600px) {
    .portfolio-carousel {
        height: 380px;
        /* Adjust height for smaller screens, if images make it too tall */
    }
}