/* --- CSS Variables & Reset --- */
:root {
    --bg-body: #F9FAFB; /* Neutral off-white background */
    --bg-card: #FFFFFF;
    --text-primary: #111827; /* Nearly black for strong hierarchy */
    --text-secondary: #6B7280; /* Neutral gray for body text */
    --accent-color: #4F46E5; /* Vivid Indigo */
    --accent-hover: #4338CA;
    --accent-light: #E0E7FF; /* Very pale indigo for tags/bgs */
    --border-subtle: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --section-spacing: 80px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul, ol {
    list-style: none;
}

/* --- Utility Classes --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: var(--section-spacing) 0;
}

.accent-text {
    color: var(--accent-color);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.tag {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--accent-light);
    color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-right: 8px;
    margin-bottom: 8px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

p {
    margin-bottom: 16px;
}

ul.bullet-list {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 24px;
    color: var(--text-secondary);
}

ul.bullet-list li {
    margin-bottom: 8px;
}

/* --- Navigation --- */
.navbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

/* --- Hero Section --- */
.hero {
    padding: 120px 0 80px;
    text-align: left;
    /* max-width: 800px; Removed to allow relative positioning container to span full width if needed, but inner content is constrained */
    position: relative;
    /* overflow: hidden; Removed to ensure tooltips/etc aren't clipped, but careful with reveal */
    isolation: isolate; /* Create stacking context for blend modes */
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 10; /* Ensure text is above the reveal layer */
    pointer-events: none; /* Let clicks pass through if needed, but buttons need pointer-events: auto */
}

/* Text remains normal - image layer above will blend with it */
.hero-text-blend {
    mix-blend-mode: normal;
}

.hero-text-blend h1,
.hero-text-blend h2,
.hero-text-blend p {
    color: var(--text-primary);
}

.hero-text-blend .accent-text {
    color: var(--accent-color);
}

.hero-content a, .hero-content button {
    pointer-events: auto;
}

/* Organic SVG Reveal Effect */
#hero-svg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
    mix-blend-mode: hard-light;
    opacity: 0;
    transition: opacity 0.5s ease;
}

#hero-svg-container.active {
    opacity: 0.9;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.hero-value-prop {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
}

/* --- Pillars Section --- */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 40px;
}

.pillar-card {
    background: var(--bg-card);
    padding: 32px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.pillar-icon {
    width: 48px;
    height: 48px;
    background-color: var(--accent-light);
    color: var(--accent-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.pillar-card h3 {
    font-size: 1.125rem;
    margin-bottom: 12px;
}

.pillar-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Featured Case Study --- */
.featured-cs {
    background-color: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease;
}

.featured-cs:hover {
    transform: translateY(-2px);
    border-color: var(--accent-color);
}

.featured-content {
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--accent-color);
    margin-bottom: 16px;
}

.featured-content h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.featured-content p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 32px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.stat h4 {
    font-size: 1.75rem;
    color: var(--accent-color);
    margin-bottom: 4px;
}

.stat p {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.featured-visual {
    background-color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* Abstract representation of the flow */
.flow-diagram {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 600;
    color: var(--text-primary);
}
.flow-node {
    background: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 8px;
}
.flow-arrow {
    color: var(--accent-color);
    font-size: 1.5rem;
}

/* --- Other Case Studies & Index --- */
.section-header {
    margin-bottom: 40px;
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.cs-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.cs-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.cs-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.cs-content h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.cs-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* --- Case Study Detail Pages --- */
.cs-header {
    padding: 80px 0 40px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 60px;
}

.cs-header h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.cs-meta {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.meta-item h5 {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.meta-item p {
    font-weight: 500;
    font-size: 1rem;
    margin-bottom: 0;
}

.cs-body {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 64px;
}

.cs-nav {
    position: sticky;
    top: 100px;
    align-self: start;
}

.cs-nav h4 {
    margin-bottom: 16px;
    font-size: 0.875rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.cs-nav ul li {
    margin-bottom: 12px;
}

.cs-nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

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

.cs-content-block {
    max-width: 800px;
}

.cs-section {
    margin-bottom: 80px;
}

.cs-section h2 {
    font-size: 2rem;
    margin-bottom: 24px;
}

.cs-section h3 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    margin-top: 32px;
}

.visual-block {
    background-color: var(--bg-body);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 40px;
    margin: 32px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
}

/* --- Skills Strip --- */
.skills-section {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 40px 0;
}

.skills-header {
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-secondary);
    font-weight: 500;
}

.skills-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.skill-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-body);
    border: 1px solid var(--border-subtle);
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Simple SVG placeholders for skills icons */
.skill-icon-svg { width: 20px; height: 20px; fill: var(--text-secondary); }

/* --- About Page --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* --- Contact Page --- */
.contact-form {
    max-width: 600px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input, .form-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

.form-input:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* --- Footer --- */
footer {
    padding: 64px 0;
    text-align: center;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    border-top: 1px solid var(--border-subtle);
    margin-top: auto;
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .pillars-grid { grid-template-columns: repeat(2, 1fr); }
    .cs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; } /* Simplified mobile nav for now */
    .hero { padding-top: 80px; }
    .hero h1 { font-size: 2.5rem; }
    .pillars-grid { grid-template-columns: 1fr; }
    .featured-cs { grid-template-columns: 1fr; }
    .featured-visual { padding: 64px 24px; }
    .flow-diagram { flex-direction: column; }
    .flow-arrow { transform: rotate(90deg); }
    .cs-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; gap: 32px;}
    
    .cs-body { grid-template-columns: 1fr; }
    .cs-nav { display: none; }
    .cs-meta { grid-template-columns: 1fr 1fr; }
    
    .about-grid { grid-template-columns: 1fr; }
}

/* --- Responsive Images & Figures --- */
.cs-figure {
    margin: 32px 0;
    width: 100%;
}

.cs-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: block;
}

/* Focus styles for accessibility */
a:focus, button:focus, input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
