/* Basic Reset & General Styles */
:root {
    --primary-color: #1a1a1a; /* Dark charcoal */
    --secondary-color: #eeeae5; /* Antique enamel*/
    --accent-color: #0c441a; /* Earthy Green */
    --text-color: #333;
    --background-color: #eeeae5;
    --font-family: "Lexend Deca", sans-serif;
    --linen-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: var(--background-color);
    background-image: var(--linen-texture);
    background-attachment: fixed;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    color: var(--accent-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 400;
    letter-spacing: -2px;
}

ul {
    list-style: none;
}

/* Header & Navigation */
header {
    background: var(--background-color);
    background-image: var(--linen-texture);
    background-attachment: fixed;
    border-bottom: 1px solid var(--secondary-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav .logo h1 a {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 3rem;
    letter-spacing: -3px;
}

nav .logo a:hover {
    text-decoration: none;
}

nav ul {
    display: flex;
    gap: 1.5rem;
}

nav ul li a {
    color: var(--primary-color);
    font-weight: 400;
    letter-spacing: -1px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Main Content & Sections */
main {
    flex-grow: 1;
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

section {
    padding: 4rem max(5%, calc((100% - 1200px) / 2));
    border-bottom: 1px solid var(--secondary-color);
}

section#portfolio {
    padding: 2rem 5%;
    height: auto;
    border-bottom: none;
}

section:last-of-type {
    border-bottom: none;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--primary-color);
}

/* Fullscreen Portfolio Styles */
.portfolio-item {
    position: relative;
    width: 100%;
    /* Resetting old styles */
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    transition: none;
}

.portfolio-item:hover {
    transform: none;
    box-shadow: none;
}

.project-card {
    background: rgba(26, 26, 26, 0.75);
    color: #f0f0f0;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    text-align: center;
    position: relative;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card h3 {
    color: #fff;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.project-card p {
    margin-bottom: 1.5rem;
    color: #dcdcdc;
}

.learn-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    border-radius: 4px;
    font-weight: 400;
    transition: background-color 0.3s, color 0.3s;
}

.learn-more:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
    text-decoration: none;
}

.project-drawer {
    position: relative;
    background: #fff;
    color: var(--text-color);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.5s ease;
    width: 100%;
}

.drawer-content {
    padding: 2rem;
    text-align: left;
}

.drawer-content h4, .drawer-content h5 {
    color: var(--primary-color);
    letter-spacing: -1px;
    margin-bottom: 1rem;
}
.drawer-content h5 {
    margin-top: 1.5rem;
}

.drawer-content ul {
    list-style: disc;
    padding-left: 20px;
}
.drawer-content ul li {
    margin-bottom: 0.5rem;
}

.drawer-content .project-link {
    margin-top: 2rem;
    text-align: center;
    display: block;
    background: var(--accent-color);
    color: #fff;
    padding: 0.75rem;
    border-radius: 5px;
}
.drawer-content .project-link:hover {
    background: #0e5221; /* Darker green */
    text-decoration: none;
}

/* Active state for drawer */
.portfolio-item.drawer-open .project-drawer {
    max-height: 1200px;
    opacity: 1;
}

.portfolio-item p {
    margin-bottom: 1rem;
}

.project-link {
    display: inline-block;
    margin-top: 1rem;
    letter-spacing: -1px;
}

/* Contact Section */
#contact {
    text-align: center;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.4);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
    text-align: left;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s, background 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.95);
}

.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s;
    font-family: var(--font-family);
}

.submit-btn:hover {
    background-color: #0e5221;
    transform: translateY(-1px);
}

.submit-btn.sent {
    background-color: #2e7d32;
    pointer-events: none;
}

.social-links {
    margin-top: 2rem;
}

.social-links a {
    margin: 0 0.5rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #333;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    background-color: #333;
    color: #fff;
    font-weight: 400;
    letter-spacing: normal;
}

.social-links a:hover {
    background-color: #333;
    border-color: #333;
    text-decoration: none;
}

/* Footer */
footer {
    text-align: right;
    padding: 2rem 1rem;
    margin-top: auto;
    color: #888;
    font-size: 0.9rem;
}

/* Swiper Carousel */
.swiper-container {
    width: 100%;
    max-width: 1200px;
    height: auto;
    min-height: 600px;
    margin: 0 auto;
    padding: 0;
    border-radius: 12px;
    overflow: hidden; /* Ensure content stays within rounded corners */
}

.swiper-slide {
    height: auto;
    display: block;
}

.slide-image {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    min-height: 75vh;
    background-size: cover;
    background-position: center;
    position: relative;
    padding-bottom: 3rem; /* Pushes card up from the bottom */
}
/* Swiper Navigation Buttons */
.swiper-button-next,
.swiper-button-prev {
    color: var(--accent-color);
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%);
    z-index: 1000;
}

.swiper-button-next {
    right: 2rem !important;
}

.swiper-button-prev {
    left: 2rem !important;
}

/* Swiper Pagination */
.swiper-pagination {
    position: relative !important;
    margin-bottom: 1rem;
    text-align: center;
    padding: 10px 0;
}

.swiper-pagination-bullet {
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(3px);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.7), 0 2px 4px rgba(0, 0, 0, 0.05);
    opacity: 1;
    margin: 0 8px !important;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    background: rgba(12, 68, 26, 0.6);
    border-color: rgba(12, 68, 26, 0.1);
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.4), 0 4px 10px rgba(12, 68, 26, 0.2);
    transform: scale(1.1);
}

/* Responsive Video Embeds */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
    border: 1px dashed var(--secondary-color);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        justify-content: center;
        width: 100%;
    }

    section {
        padding: 3rem 0.5rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    nav .logo h1 a {
        font-size: 2.2rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.6rem;
    }

    /* Hide navigation arrows on mobile (users swipe instead) */
    .swiper-button-next, .swiper-button-prev {
        display: none !important;
    }
}
