:root {
    --primary-color: #1c7600; /* Updated dark green color */
    --secondary-color: #3a6ea5; /* Blue accent */
    --dark-bg: #1a1a1a;
    --darker-bg: #121212;
    --card-bg: #222222;
    --text-color: #e0e0e0;
    --muted-text: #aaaaaa;
    --highlight: #4CAF50; /* Lighter green for highlights */
}

/* --- Base layout --- */
html, body {
    height: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.page-header {
    flex-shrink: 0;
}

.page-content {
    flex: 1 0 auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--highlight);
}

/* --- Flyout menu --- */
.navbar {
    background-color: transparent;
    padding: 0;
    flex-shrink: 0;
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.navbar-brand {
    position: relative;
    z-index: 1000;
}

.navbar-brand img {
    height: 60px;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    transform: scale(1.1);
    background-color: var(--highlight);
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: white;
    position: relative;
    transition: all 0.3s ease;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

.menu-toggle span::before {
    transform: translateY(-7px);
}

.menu-toggle span::after {
    transform: translateY(7px);
}

.menu-toggle.active span {
    background-color: transparent;
}

.menu-toggle.active span::before {
    transform: rotate(45deg);
}

.menu-toggle.active span::after {
    transform: rotate(-45deg);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: var(--darker-bg);
    z-index: 999;
    transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow-y: auto;
    padding: 2rem;
    padding-top: 5rem;
}

.nav-menu.active {
    right: 0;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.nav-menu-item {
    margin: 1rem 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.5s ease;
    transition-delay: calc(0.1s * var(--i));
}

.nav-menu.active .nav-menu-item {
    opacity: 1;
    transform: translateX(0);
}

.nav-link {
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--highlight);
}

.nav-link:hover::after {
    width: 100%;
}

/* Nav categories (collapsible groups within the flyout menu) */
.nav-category { margin: 1rem 0; }

.nav-cat-toggle {
    all: unset;
    box-sizing: border-box;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-color);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}
.nav-cat-toggle:hover { color: var(--highlight); }
.nav-cat-toggle .chevron {
    font-size: 1rem;
    margin-left: 0.75rem;
    transition: transform 0.25s ease;
}
.nav-cat-toggle[aria-expanded="true"] .chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding-left: 1rem;
    transition: max-height 0.3s ease;
}
.nav-sublink {
    font-size: 1.05rem;
    color: var(--muted-text);
    text-decoration: none;
    padding: 0.45rem 0;
    transition: color 0.3s ease;
}
.nav-sublink:hover { color: var(--highlight); }

/* Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Hero Section --- */
.hero {
    padding: 5rem 0;
    background-color: var(--darker-bg);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--muted-text);
}

.btn-custom {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.5rem 1rem 0.5rem;
}

.btn-custom:hover {
    background-color: var(--highlight);
    transform: translateY(-3px);
    color: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--secondary-color);
}

.btn-outline:hover {
    background-color: var(--secondary-color);
}

/* --- Section Basics --- */
.section {
    padding: 5rem 0;
}

.section-block {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 3rem;
    text-align: left;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    transform: none;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* --- Project Cards --- */
.project-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.project-image {
    height: 200px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-tag {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.project-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.project-description {
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.tech-badge {
    background-color: rgba(255,255,255,0.1);
    color: var(--muted-text);
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* --- Tools Section --- */
.tools-section {
    background-color: var(--darker-bg);
    padding: 5rem 0;
}

.tool-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.tool-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.tool-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.tool-description {
    color: var(--muted-text);
    margin-bottom: 1.5rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.8rem;
}

.feature-icon {
    color: var(--highlight);
    margin-right: 0.8rem;
    font-size: 1rem;
}

/* --- About Section --- */
.about-section {
    padding: 5rem 0;
}

.about-content {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Footer --- */
footer {
    background-color: var(--darker-bg);
    padding: 3rem 0 1.5rem;
    color: var(--muted-text);
    flex-shrink: 0;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 40px;
}

.copyright {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* --- Textured background band (header / footer / CTA) --- */
.page-header,
footer,
.cta-band {
    position: relative;
    overflow: hidden;
}
.page-header::before,
footer::before,
.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1.8px);
    background-size: 5px 5px;
    pointer-events: none;
}
.page-header .container,
footer .container,
.cta-band .container {
	padding-top: 10px;
	padding-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* --- Image placeholder --- */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: rgba(255,255,255,0.03);
    border: 2px dashed rgba(255,255,255,0.15);
    color: var(--muted-text);
    font-size: 0.9rem;
}
.image-placeholder i {
    font-size: 1.8rem;
    opacity: 0.6;
}

/* Shared layered shadow for card-style components */
.project-card,
.download-item,
.faq-item {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 2px 6px rgba(0,0,0,0.25),
        0 10px 24px rgba(0,0,0,0.35);
}

/* --- Two-column feature section --- */
.feature-image {
    height: 320px;
    border-radius: 8px;
    overflow: hidden;
}
.feature-row h2 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
}
.feature-row p {
    color: var(--muted-text);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* --- Gallery --- */
.gallery-thumb {
    position: relative;
    padding-top: 100%;
    border-radius: 8px;
    overflow: hidden;
}
.gallery-thumb .image-placeholder {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
}

/* --- Video embed --- */
.video-embed {
    position: relative;
    padding-top: 56.25%;
    border-radius: 8px;
    overflow: hidden;
}
.video-embed .image-placeholder {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
}
.video-embed .image-placeholder i { font-size: 2.5rem; }

/* --- Downloads --- */
.download-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.download-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background-color: rgba(255,255,255,0.05);
    color: var(--highlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.download-body { flex: 1 1 auto; min-width: 0; }
.download-body h3 { margin: 0 0 0.25rem; font-size: 1.1rem; }
.download-body p { margin: 0; color: var(--muted-text); font-size: 0.95rem; }
.download-btn { flex-shrink: 0; white-space: nowrap; }

/* --- FAQ --- */
.faq-item {
    background-color: var(--card-bg);
    border-radius: 8px;
    margin-bottom: 1rem;
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.25rem 1.5rem;
    font-size: 1.15rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--highlight);
    margin-left: 1rem;
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after {
    transform: rotate(45deg);
}
.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--muted-text);
}
.faq-answer p { margin: 0; line-height: 1.6; }

/* --- Steps list --- */
.steps-list { position: relative; }
.step-item {
    display: flex;
    gap: 1.5rem;
    position: relative;
    padding-bottom: 2.5rem;
}
.step-item:last-child { padding-bottom: 0; }
.step-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background-color: rgba(255,255,255,0.1);
}
.step-number {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    z-index: 1;
}
.step-body h3 { margin: 0.35rem 0 0.5rem; font-size: 1.25rem; }
.step-body p { margin: 0; color: var(--muted-text); line-height: 1.6; }

/* --- Stats --- */
.stat-block {
    text-align: center;
    padding: 1.5rem 1rem;
}
.stat-number {
    font-size: 2.75rem;
    font-weight: bold;
    color: var(--highlight);
    line-height: 1;
}
.stat-label {
    margin-top: 0.5rem;
    color: var(--muted-text);
    font-size: 0.95rem;
}

/* --- CTA band --- */
.cta-band {
    background-color: var(--darker-bg);
    padding: 4rem 0;
    text-align: center;
}
.cta-band h2 {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    margin-bottom: 0.75rem;
}
.cta-band p {
    color: var(--muted-text);
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

/* --- Tool Embed --- */
.tool-embed-body {
    min-width: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        0 2px 6px rgba(0,0,0,0.25),
        0 10px 24px rgba(0,0,0,0.35);
}


/* --- Media queries --- */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .nav-menu {
        width: 250px;
    }

    .project-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .download-item {
        flex-wrap: wrap;
    }

    .download-btn {
        width: 100%;
        text-align: center;
    }
}