/* =========================================
   Reset & base
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

:root {
    --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
    --font-head: "Space Grotesk", "IBM Plex Sans", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

    --bg: #f7fafe;
    --bg-elevated: #ffffff;
    --bg-soft: #f1f6ff;
    --bg-soft-2: #fbfdff;
    --bg-footer: #eef4fd;
    --surface: #ffffff;
    --surface-soft: #f8fbff;
    --border: #dbe6f4;
    --border-strong: #c8d7ea;
    --text: #182434;
    --text-strong: #0f172a;
    --text-muted: #516173;
    --text-subtle: #7c8a9b;
    --brand: #2563eb;
    --brand-strong: #1d4ed8;
    --brand-soft: #e8f0ff;
    --success: #16a34a;
    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
    --shadow-card: 0 18px 38px rgba(15, 23, 42, 0.06);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0b1220;
        --bg-elevated: #101a2b;
        --bg-soft: #111d33;
        --bg-soft-2: #0f1728;
        --bg-footer: #0d1627;
        --surface: #121d2f;
        --surface-soft: #162338;
        --border: #24344d;
        --border-strong: #304361;
        --text: #deebff;
        --text-strong: #f5f9ff;
        --text-muted: #adc0dc;
        --text-subtle: #8093af;
        --brand: #73a5ff;
        --brand-strong: #8cb4ff;
        --brand-soft: #182845;
        --success: #39c46a;
        --shadow-soft: none;
        --shadow-card: none;
    }
}

:root[data-theme="dark"] {
    --bg: #0b1220;
    --bg-elevated: #101a2b;
    --bg-soft: #111d33;
    --bg-soft-2: #0f1728;
    --bg-footer: #0d1627;
    --surface: #121d2f;
    --surface-soft: #162338;
    --border: #24344d;
    --border-strong: #304361;
    --text: #deebff;
    --text-strong: #f5f9ff;
    --text-muted: #adc0dc;
    --text-subtle: #8093af;
    --brand: #73a5ff;
    --brand-strong: #8cb4ff;
    --brand-soft: #182845;
    --success: #39c46a;
    --shadow-soft: none;
    --shadow-card: none;
}

body {
    font-family: var(--font-body);
    color: var(--text);
    background: linear-gradient(
        180deg,
        var(--bg) 0%,
        var(--bg-elevated) 220px,
        var(--bg-elevated) 100%
    );
    line-height: 1.7;
    letter-spacing: -0.01em;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: var(--brand);
    text-decoration: none;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.16em;
}
a:hover {
    text-decoration: underline;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-head);
    color: var(--text-strong);
    letter-spacing: -0.03em;
}

/* =========================================
   Layout
   ========================================= */
.container {
    max-width: 880px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* =========================================
   Header
   ========================================= */
.site-header {
    border-bottom: 1px solid var(--border);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.logo {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.03em;
}
.logo:hover {
    text-decoration: none;
    color: var(--brand);
}

.site-header nav {
    display: flex;
    gap: 1.5rem;
    margin-left: auto;
}

.site-header nav a {
    font-size: 0.86rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}
.site-header nav a:hover {
    color: var(--brand);
    text-decoration: none;
}

.theme-toggle {
    width: 2.2rem;
    height: 2.2rem;
    margin-left: 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 88%, var(--bg-soft));
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        border-color 0.15s,
        color 0.15s,
        background-color 0.15s,
        transform 0.15s;
}

.theme-toggle:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    background: var(--brand-soft);
    transform: translateY(-1px);
}

.theme-toggle:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--brand) 45%, transparent);
    outline-offset: 2px;
}

.theme-toggle i {
    font-size: 1rem;
    line-height: 1;
}

/* =========================================
   Buttons
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.7rem 1.15rem;
    background: var(--brand);
    color: #fff;
    border: 1px solid color-mix(in srgb, var(--brand-strong) 70%, #0000);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    transition:
        background 0.15s,
        border-color 0.15s,
        transform 0.15s,
        box-shadow 0.15s;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
}
.btn:hover {
    background: var(--brand-strong);
    border-color: var(--brand-strong);
    text-decoration: none;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
    border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--brand);
    color: #fff;
}

/* =========================================
   Hero
   ========================================= */
.hero {
    padding: 5.5rem 0 4.75rem;
    background:
        radial-gradient(
            circle at 88% 14%,
            color-mix(in srgb, var(--brand) 14%, transparent) 0%,
            transparent 42%
        ),
        radial-gradient(
            circle at 12% 84%,
            color-mix(in srgb, var(--brand) 8%, transparent) 0%,
            transparent 45%
        ),
        linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    max-width: 14ch;
    font-size: clamp(2.45rem, 5.8vw, 3.35rem);
    font-weight: 700;
    line-height: 1.08;
    color: var(--text-strong);
    margin-bottom: 0.9rem;
    letter-spacing: -0.04em;
}

.hero p {
    font-size: 1.08rem;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 2.15rem;
}

/* =========================================
   Availability signal
   ========================================= */
.availability-signal {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text-muted);
}

.availability-text {
    min-width: 0;
    text-wrap: pretty;
}

.availability-label {
    color: inherit;
}

.availability-date {
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
}

.availability-signal--light {
    margin-top: 1.25rem;
    color: var(--text-muted);
}

.services-cta .availability-signal {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.availability-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
    margin-top: 0.05em;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 14%, transparent);
    animation: none;
}

@keyframes pulse-dot {
    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.1);
    }
}

/* =========================================
   Features
   ========================================= */
.features {
    padding: 4.5rem 0;
    border-bottom: 1px solid var(--border);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface) 92%, var(--bg-soft));
    box-shadow: var(--shadow-soft);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-strong);
}

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

/* =========================================
   Recent posts / Blog list
   ========================================= */
.recent-posts,
.blog-list {
    padding: 4.5rem 0;
}

.recent-posts h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-strong);
}

.post-list {
    list-style: none;
    margin-bottom: 2rem;
}

.post-item {
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border);
}
.post-item:first-child {
    border-top: 1px solid var(--border);
}

.post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.post-item > a {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-strong);
}

.post-item > a:hover {
    color: var(--brand);
    text-decoration: none;
}

.post-item p {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-item .post-meta-list {
    margin-top: 0.45rem;
    margin-bottom: 0;
}

/* =========================================
   Page header (blog index)
   ========================================= */
.page-header {
    padding: 4rem 0 2.75rem;
    background:
        radial-gradient(
            circle at 90% 12%,
            color-mix(in srgb, var(--brand) 11%, transparent),
            transparent 45%
        ),
        linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
    border-bottom: 1px solid var(--border);
    margin-bottom: 0;
}

.page-header h1 {
    font-size: clamp(2rem, 4.8vw, 2.6rem);
    font-weight: 700;
    color: var(--text-strong);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 60ch;
}

/* =========================================
   Breadcrumb
   ========================================= */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
    margin-bottom: 0.75rem;
}

.breadcrumb a {
    color: var(--text-subtle);
}

.breadcrumb a:hover {
    color: var(--brand);
    text-decoration: none;
}

.breadcrumb-sep {
    color: color-mix(in srgb, var(--border-strong) 65%, transparent);
    user-select: none;
}

/* =========================================
   Blog post
   ========================================= */
.post-header {
    padding: 4rem 0 2.25rem;
    background:
        radial-gradient(
            circle at 88% 14%,
            color-mix(in srgb, var(--brand) 10%, transparent),
            transparent 46%
        ),
        linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
    border-bottom: 1px solid var(--border);
}

.post-header h1 {
    font-size: clamp(2rem, 4.8vw, 2.7rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-strong);
    letter-spacing: -0.03em;
    margin: 0.4rem 0 0.75rem;
}

.post-description {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.post-header .post-description {
    margin-bottom: 0.75rem;
}

.post-meta-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.8rem;
    margin: 0 0 0.6rem;
    padding: 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.post-meta-list li {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
}

.post-meta-list a {
    color: inherit;
    text-decoration: none;
}

.post-meta-list a:hover {
    color: var(--brand);
}

.post-meta-label {
    color: var(--text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}

.post-header .post-tags {
    margin-top: 0.1rem;
    margin-bottom: 0.65rem;
}

.post-author {
    margin-top: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.post-author a {
    color: var(--text);
}

.post-author a:hover {
    color: var(--brand);
}

.post-body {
    padding: 3rem 1.25rem 4.5rem;
}

.post-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-strong);
    margin: 2rem 0 0.75rem;
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 1.5rem 0 0.5rem;
}

.post-body p {
    margin-bottom: 1.2rem;
}

.post-body ul,
.post-body ol {
    margin: 0 0 1.2rem 1.5rem;
}

.post-body li {
    margin-bottom: 0.4rem;
}

.post-body code {
    background: var(--surface-soft);
    padding: 0.15em 0.4em;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875em;
    font-family: var(--font-mono);
}

.post-body pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-body pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
}

.post-body blockquote {
    border-left: 4px solid #2563eb;
    padding: 0.5rem 1rem;
    margin: 1.5rem 0;
    background: #eff6ff;
    border-radius: 0 6px 6px 0;
    color: #374151;
}

/* =========================================
   Overview section (index page columns)
   ========================================= */
.overview-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.overview-col h2 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-subtle);
    margin-bottom: 1rem;
}

.overview-col h2 a {
    color: var(--text-subtle);
}
.overview-col h2 a:hover {
    color: var(--brand);
    text-decoration: none;
}

.overview-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.75rem;
}

.overview-logo-link {
    display: inline-flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.15s;
}
.overview-logo-link:hover {
    opacity: 0.9;
}

.overview-logo {
    max-height: 28px;
    width: auto;
    filter: grayscale(100%);
}

.overview-logo--dark {
    filter: grayscale(100%) invert(1);
}

.overview-logo-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* =========================================
   Entity list/detail pages
   ========================================= */
.entity-list {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.entity-list h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 1.5rem;
}

.entity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.entity-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface) 95%, var(--bg-soft));
    color: var(--text);
    box-shadow: var(--shadow-soft);
    transition:
        border-color 0.15s,
        box-shadow 0.15s,
        transform 0.15s;
}
.entity-card:hover {
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
    text-decoration: none;
    color: var(--text);
}

.entity-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.entity-card h2,
.entity-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0;
}

.entity-year {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-subtle);
    white-space: nowrap;
}

.entity-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.6rem;
}

.entity-role {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.entity-industry {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-subtle);
}

.entity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.75rem;
}

.entity-tag {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--surface-soft) 88%, var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
}

.entity-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.entity-logo {
    max-height: 32px;
    width: auto;
}

.entity-logo--detail {
    max-height: 64px;
    display: block;
    margin-bottom: 1.5rem;
}

.entity-logo--dark {
    padding: 0.25rem 0.5rem;
    background: color-mix(in srgb, var(--bg) 70%, #000);
    border: 1px solid var(--border);
    border-radius: 4px;
}

.entity-logo--detail.entity-logo--dark {
    padding: 0.5rem 0.875rem;
}

.entity-detail {
    padding: 2.5rem 0 4rem;
}

.entity-back {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

/* =========================================
   Hero actions
   ========================================= */
.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
}

/* =========================================
   Services
   ========================================= */
.services-intro {
    padding: 3rem 0 0;
}

.services-intro p {
    font-size: 1.1rem;
    color: var(--text);
    max-width: 640px;
}

.services-list {
    padding: 3.5rem 0 4rem;
    border-bottom: 1px solid var(--border);
}

.service-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.1rem;
}

.service-card {
    padding: 1.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: linear-gradient(
        180deg,
        color-mix(in srgb, var(--surface) 94%, var(--bg-soft)) 0%,
        var(--surface) 100%
    );
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.service-card-image {
    margin: -1.75rem -1.75rem 1.25rem -1.75rem;
}

.service-card-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.service-card-icon {
    font-size: 1.75rem;
    color: var(--brand);
    margin-bottom: 0.65rem;
    line-height: 1;
}

.service-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.75rem;
}

.service-card > p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.service-examples {
    margin: 0;
    padding-left: 1.1rem;
    list-style: disc;
}

.service-examples li {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.services-process {
    padding: 4.25rem 0;
    border-bottom: 1px solid var(--border);
}

.services-process h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
}

.services-process-intro {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.process-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.process-steps li {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.process-step-number {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    margin-top: 0.1rem;
}

.process-steps strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
}

.process-steps p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.services-cta {
    padding: 4.5rem 0;
    text-align: center;
    background:
        radial-gradient(
            circle at 10% 25%,
            color-mix(in srgb, var(--brand) 8%, transparent),
            transparent 45%
        ),
        linear-gradient(135deg, var(--bg-soft) 0%, var(--bg-soft-2) 100%);
    border-bottom: 1px solid var(--border);
}

.services-cta h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.5rem;
}

.services-cta p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* =========================================
   About
   ========================================= */
.about-section {
    padding: 3.5rem 0 5.5rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 4rem;
    align-items: start;
}

.about-body {
    background: color-mix(in srgb, var(--surface) 94%, var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.5rem 1.75rem;
    box-shadow: var(--shadow-soft);
}

.about-photo-slot {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.about-photo-placeholder {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-subtle);
    flex-shrink: 0;
}

.about-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.about-photo-name {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.about-photo-name strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-strong);
}

.about-photo-name span {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.about-body h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-strong);
    margin: 2rem 0 0.6rem;
}

.about-body h2:first-of-type {
    margin-top: 0;
}

.about-body p {
    font-size: 0.975rem;
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.75;
}

.about-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.about-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--surface) 92%, var(--bg-soft));
    transition:
        border-color 0.15s,
        color 0.15s,
        background-color 0.15s;
}

.about-link:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 40%, var(--border));
    background: var(--brand-soft);
    text-decoration: none;
}

.about-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    position: sticky;
    top: 5rem;
}

.about-sidebar-block {
    padding: 0;
}

.about-sidebar-block h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-bottom: 0.5rem;
}

.about-sidebar-block ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-sidebar-block li {
    font-size: 0.875rem;
    color: var(--text);
    padding: 0.2rem 0;
}

.about-sidebar-block p {
    font-size: 0.875rem;
    color: var(--text);
}

.about-sidebar-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.5rem;
}

.about-sidebar-cta .btn {
    text-align: center;
}

/* =========================================
   Contact
   ========================================= */
.contact-section {
    padding: 3.5rem 0 5.5rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 4rem;
    align-items: start;
}

.contact-main h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.75rem;
}

.contact-main > p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.contact-checklist {
    margin: 0 0 1.25rem 1.1rem;
    list-style: disc;
}

.contact-checklist li {
    color: var(--text);
    margin-bottom: 0.4rem;
    font-size: 0.975rem;
}

.contact-action {
    margin-top: 2rem;
}

.contact-action .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.contact-meta-block h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    margin-bottom: 0.4rem;
}

.contact-meta-block p {
    font-size: 0.9rem;
    color: var(--text);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background: var(--bg-footer);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-subtle);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.15rem;
    }
    .feature-grid {
        grid-template-columns: 1fr;
    }
    .post-header h1 {
        font-size: 1.75rem;
    }

    .site-header .container {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .site-header nav {
        width: 100%;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 0.25rem;
        padding-top: 0.15rem;
        -webkit-overflow-scrolling: touch;
    }

    .site-header nav a {
        white-space: nowrap;
    }

    .theme-toggle {
        margin-left: 0;
    }

    .overview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .entity-grid {
        grid-template-columns: 1fr;
    }

    .service-cards {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .about-sidebar {
        position: static;
        border-top: 1px solid var(--border);
        padding-top: 2rem;
    }

    .about-sidebar-cta {
        flex-direction: row;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .btn {
        width: min(100%, 15rem);
        text-align: center;
    }

    .availability-signal {
        display: flex;
        max-width: 100%;
        width: fit-content;
    }
}

/* =========================================
   404
   ========================================= */
.not-found-section {
    padding: 3rem 0;
}

.not-found-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.not-found-links a {
    font-size: 1.1rem;
    font-weight: 500;
}

/* =========================================
   About banner
   ========================================= */
.about-banner {
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.about-banner img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    object-position: center 60%;
    display: block;
}

.about-banner-credit {
    font-size: 0.75rem;
    color: var(--text-subtle);
    text-align: right;
    padding: 0.35rem 0.75rem;
    background: color-mix(in srgb, var(--surface) 88%, var(--bg-soft));
    border-top: 1px solid var(--border);
}

.about-banner-credit a {
    color: inherit;
}

.not-found-icon {
    font-size: 4rem;
    color: #9ca3af;
    margin-bottom: 1rem;
    line-height: 1;
}

/* =========================================
   Blog tags
   ========================================= */
.blog-topic-nav {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: color-mix(in srgb, var(--surface) 94%, var(--bg-soft));
}

.blog-topic-nav-title {
    margin: 0 0 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-strong);
}

.blog-topic-nav-link {
    margin: 0.75rem 0 0;
    font-size: 0.9rem;
}

.blog-index-layout {
    display: grid;
    gap: 1.5rem;
}

.blog-index-sidebar {
    display: grid;
    gap: 1rem;
}

.blog-index-sidebar .blog-topic-nav {
    margin-bottom: 0;
}

.post-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.65rem 0 0;
    padding: 0;
}

.post-tags--inline {
    margin-top: 0;
}

.post-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.78rem;
    line-height: 1.2;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--surface-soft) 88%, var(--bg-soft));
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    text-decoration: none;
}

.post-tag:hover {
    color: var(--brand);
    border-color: color-mix(in srgb, var(--brand) 35%, var(--border));
    text-decoration: none;
}

.post-tag-count {
    color: var(--text-subtle);
}

.tag-index-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--border);
}

.tag-index-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--border);
}

.tag-index-item a {
    font-weight: 600;
    color: var(--text-strong);
}

.tag-index-item a:hover {
    color: var(--brand);
    text-decoration: none;
}

.tag-index-item span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 640px) {
    .tag-index-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

@media (min-width: 980px) {
    .blog-index-layout {
        grid-template-columns: minmax(0, 1fr) 18rem;
        align-items: start;
        gap: 2rem;
    }

    .blog-index-sidebar {
        grid-column: 2;
        grid-row: 1;
        position: sticky;
        top: 5.25rem;
    }

    .blog-index-main {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }
}

/* View transitions — progressive enhancement, no-op in unsupported browsers */
@view-transition {
    navigation: auto;
}

/* Match the page background so no white flash on dark theme */
::view-transition {
    background-color: var(--bg);
}

::view-transition-old(root) {
    animation: 200ms ease-out both fade-out;
}

::view-transition-new(root) {
    animation: 200ms ease-in both fade-in;
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Named shared-element transitions (card → detail, title → heading) */
::view-transition-group(*) {
    animation-duration: 380ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(*),
::view-transition-new(*) {
    animation-duration: 380ms;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keep the full-page root fade snappy */
::view-transition-group(root) {
    animation-duration: 200ms;
}
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 200ms;
    animation-timing-function: ease-out;
}
