:root {
    /* Light Mode (Default) */
    --bg: #f8f9fa;
    --surface: #ffffff;
    --text: #212529;
    --text-muted: #6c757d;
    --border: #dee2e6;
    --accent: #2c3e50; /* Deep Charcoal for a corporate feel */
    --accent-hover: #1a252f;
    --hero-overlay: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.68) 0%,
        rgba(255, 255, 255, 0.54) 45%,
        rgba(255, 255, 255, 0.72) 100%
    );
    --hero-heading-color: #101820;
    --hero-text-color: #25303b;
    --hero-content-scrim: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.44) 0%,
        rgba(255, 255, 255, 0.3) 100%
    );
    --hero-height: 60vh;
    --hero-height-mobile: clamp(480px, 68vh, 640px);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Mono', monospace;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Dark Mode */
    --bg: #0d1117;
    --surface: #161b22;
    --text: #c9d1d9;
    --text-muted: #8b949e;
    --border: #30363d;
    --accent: #ffffff; /* Pure white accent for minimalist look */
    --accent-hover: #f0f0f0;
    --hero-overlay: linear-gradient(
        180deg,
        rgba(13, 17, 23, 0.74) 0%,
        rgba(13, 17, 23, 0.64) 45%,
        rgba(13, 17, 23, 0.82) 100%
    );
    --hero-heading-color: #f6f9fc;
    --hero-text-color: #e2e8f0;
    --hero-content-scrim: none;
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    transition: var(--transition);
    overflow-x: hidden; /* Prevent horizontal scroll */
    width: 100%;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    word-wrap: break-word; /* Ensure long words don't break layout */
}

h1 {
    letter-spacing: 0px;
}

p {
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--accent-hover);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header & Navigation */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 64px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger {
    display: none;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    header {
        padding: 1rem 0;
        z-index: 3000;
    }

    .nav-actions {
        z-index: 3002; /* Ensure toggle/hamburger are top level */
        position: relative;
    }

    .hamburger {
        display: flex;
        z-index: 3003;
        position: relative;
        padding: 5px;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        background: transparent;
        border: none;
        cursor: pointer;
    }

    .hamburger span {
        display: block;
        width: 30px;
        height: 2px;
        background-color: var(--text);
        transition: var(--transition);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 2rem;
        width: 200px;
        height: auto;
        background-color: var(--surface);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 1rem 0;
        transition: all 0.3s ease;
        z-index: 2500;
        display: flex;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        border: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transform: translateY(10px);
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
        display: block;
        width: 100%;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    section {
        padding: 4rem 0; /* Standardize section spacing */
    }

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

    .hero p {
        font-size: 1rem;
    }
}

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

/* Hero Section */
.hero {
    min-height: var(--hero-height);
    height: var(--hero-height);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--surface);
    background-image: var(--page-hero-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding: 4rem 0;
    isolation: isolate;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--hero-overlay);
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 2rem 2.5rem;
}

.hero .container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--hero-content-scrim);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(2px);
    z-index: -1;
}

@media (max-width: 768px) {
    .hero {
        min-height: var(--hero-height-mobile);
        height: var(--hero-height-mobile);
        padding: 4rem 0;
    }

    .hero .container {
        padding-left: 2rem;
        padding-right: 2rem;
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

.hero h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    margin-bottom: 1.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1;
    letter-spacing: 0px;
    color: var(--hero-heading-color);
    text-shadow: 0 2px 14px rgba(255, 255, 255, 0.28);
}

.hero p {
    font-size: 1.2rem;
    color: var(--hero-text-color);
    max-width: 700px;
    margin: 0 auto 1rem; /* Tighter spacing for paragraphs */
    text-shadow: 0 2px 12px rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero p {
    text-shadow: none;
}

[data-theme="dark"] .hero .container::before {
    display: none;
}

.hero p + p {
    margin-top: 1rem;
}

.hero .cta-button {
    margin-top: 2rem;
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Expertise Cards */
.card {
    background: var(--surface);
    padding: 2.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 1.25rem 2.5rem;
    background-color: var(--accent);
    color: #fff !important;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

[data-theme="dark"] .cta-button {
    color: #000 !important; /* Black text on white accent in dark mode */
}

.cta-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: translateY(0);
}

.full-width {
    width: 100%;
    display: block;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
