:root {
    --bg: #f3f4ef;
    --surface: #ffffff;
    --surface-alt: #f7f8f2;
    --ink: #111827;
    --ink-soft: #424b5a;
    --line: #d7dcd2;
    --brand: #0f766e;
    --brand-strong: #0b5d57;
    --accent: #f97316;
    --accent-soft: #ffedd5;
    --blue: #2563eb;
    --radius: 18px;
    --radius-sm: 12px;
    --container: 1160px;
    --shadow-card: 0 18px 40px rgba(17, 24, 39, 0.08);
    --shadow-soft: 0 10px 24px rgba(17, 24, 39, 0.06);
    --font-ui: 'Sora', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    position: relative;
    font-family: var(--font-ui);
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 14%, #d1fae5 0%, rgba(209, 250, 229, 0) 30%),
        radial-gradient(circle at 90% 8%, #ffedd5 0%, rgba(255, 237, 213, 0) 32%),
        var(--bg);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.bg-orb {
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 999px;
    filter: blur(60px);
    opacity: 0.36;
    pointer-events: none;
    z-index: -1;
}

.bg-orb-a {
    top: -130px;
    left: -150px;
    background: #99f6e4;
}

.bg-orb-b {
    bottom: -170px;
    right: -100px;
    background: #fed7aa;
}

.container {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

.section {
    padding: 88px 0;
}

.section-head {
    margin-bottom: 30px;
    max-width: 760px;
}

.kicker,
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.76rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 14px;
}

.section-head h2 {
    font-size: clamp(1.65rem, 2.5vw, 2.35rem);
    line-height: 1.28;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid transparent;
    background: rgba(243, 244, 239, 0.78);
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.scrolled {
    border-color: var(--line);
    box-shadow: 0 8px 22px rgba(17, 24, 39, 0.05);
}

.header-inner {
    height: 78px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    font-weight: 700;
    font-size: 1.03rem;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.site-nav a {
    color: var(--ink-soft);
    font-size: 0.86rem;
    padding: 8px 12px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.site-nav a:hover {
    background: #e8ece1;
    color: var(--ink);
}

.site-nav a.active {
    background: #dde7dc;
    color: var(--ink);
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 999px;
    padding: 4px;
}

.lang-btn {
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    padding: 5px 8px;
    border-radius: 999px;
    cursor: pointer;
}

.lang-btn.active {
    background: #e5faf5;
    color: #095b56;
}

.header-cta {
    border: 1px solid var(--ink);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 0.79rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.header-cta:hover {
    background: var(--ink);
    color: #ffffff;
    transform: translateY(-1px);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    margin-left: auto;
}

.menu-toggle span {
    width: 16px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.hero {
    padding-top: 92px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 28px;
    align-items: stretch;
}

.hero-copy {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: calc(var(--radius) + 6px);
    padding: 42px;
    box-shadow: var(--shadow-card);
}

.hero-person {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 8px 10px;
    border: 1px solid #dce4de;
    border-radius: 999px;
    background: #fbfcf8;
}

.hero-avatar-wrap {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #cfdbd3;
    background: #e6eeeb;
}

.hero-avatar {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.hero-person-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    gap: 2px;
}

.hero-person-meta strong {
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-person-meta span {
    font-size: 0.72rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
}

.hero-copy h1 {
    font-size: clamp(2rem, 4.8vw, 3.35rem);
    line-height: 1.12;
    max-width: 20ch;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero-lead {
    color: var(--ink-soft);
    font-size: 1rem;
    max-width: 58ch;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 11px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.28);
}

.btn-primary:hover {
    background: var(--brand-strong);
    transform: translateY(-1px);
}

.btn-ghost {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    background: var(--surface-alt);
    transform: translateY(-1px);
}

.hero-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-trust li {
    border: 1px solid #d8e5df;
    color: #24413f;
    background: #eef7f4;
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.73rem;
    font-family: var(--font-mono);
}

.hero-panel {
    border-radius: calc(var(--radius) + 6px);
    border: 1px solid #d5e5de;
    background:
        radial-gradient(circle at 100% 0%, #dbeafe 0%, rgba(219, 234, 254, 0) 38%),
        linear-gradient(155deg, #f8fffc 0%, #eef4ff 55%, #ffffff 100%);
    padding: 34px;
    box-shadow: var(--shadow-soft);
}

.panel-title {
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.73rem;
    color: var(--blue);
    margin-bottom: 14px;
}

.hero-panel h2 {
    font-size: 1.34rem;
    line-height: 1.35;
    margin-bottom: 18px;
}

.focus-list {
    list-style: none;
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.focus-list li {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid #d6e1e8;
    color: #30475c;
    font-size: 0.88rem;
}

.panel-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3b4f60;
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.panel-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 999px;
    background: #64748b;
}

.metrics {
    padding-top: 72px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.metric-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.metric-card h3 {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    margin-bottom: 4px;
    line-height: 1.1;
}

.metric-card p {
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.analytics {
    padding-top: 28px;
}

.analytics-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid #d6ddd7;
    background: #f9faf7;
    font-size: 0.74rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
}

.analytics-meta strong {
    color: #1f2937;
    font-weight: 600;
}

.analytics-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.kpi-card {
    background: #ffffff;
    border: 1px solid #d8dfd9;
    border-radius: 14px;
    padding: 13px 14px;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.05);
}

.kpi-card p {
    font-size: 0.7rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 5px;
}

.kpi-card h4 {
    font-size: 1.42rem;
    line-height: 1;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.analytics-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.analytics-card h3 {
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.analytics-card-wide {
    grid-column: span 2;
}

.donut-layout {
    display: grid;
    grid-template-columns: 184px 1fr;
    gap: 12px;
    align-items: center;
}

.donut-chart {
    min-height: 176px;
    display: grid;
    place-items: center;
}

.donut-ring {
    width: 156px;
    height: 156px;
    border-radius: 999px;
    background: conic-gradient(var(--donut-gradient));
    display: grid;
    place-items: center;
    position: relative;
}

.donut-ring::after {
    content: '';
    width: 108px;
    height: 108px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #d9dfda;
    position: absolute;
}

.donut-center {
    position: relative;
    z-index: 1;
    text-align: center;
    display: grid;
    gap: 2px;
}

.donut-center strong {
    font-size: 1.35rem;
    line-height: 1;
}

.donut-center span {
    font-size: 0.68rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
}

.chart-area {
    min-height: 176px;
}

.chart-empty {
    height: 168px;
    display: grid;
    place-items: center;
    border: 1px dashed #d4dbd5;
    border-radius: 12px;
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.chart-list {
    display: grid;
    gap: 9px;
}

.chart-row {
    display: grid;
    grid-template-columns: 90px 1fr auto;
    align-items: center;
    gap: 8px;
}

.chart-row-label {
    font-size: 0.74rem;
    color: var(--ink-soft);
    font-family: var(--font-mono);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lang-swatch {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.chart-track {
    height: 8px;
    border-radius: 999px;
    background: #edf0ea;
    overflow: hidden;
}

.chart-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0f766e, #14b8a6);
}

.chart-row-value {
    font-size: 0.74rem;
    font-family: var(--font-mono);
    color: #1f2937;
}

.year-bars {
    height: 166px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
    align-items: end;
    gap: 8px;
}

.year-col {
    display: grid;
    gap: 6px;
    justify-items: center;
}

.year-col-bar-wrap {
    width: 100%;
    height: 108px;
    background: #edf0ea;
    border-radius: 8px;
    display: flex;
    align-items: end;
    overflow: hidden;
}

.year-col-bar {
    width: 100%;
    border-radius: 8px;
    background: linear-gradient(180deg, #3b82f6, #2563eb);
}

.year-col-count {
    font-size: 0.68rem;
    color: #1f2937;
    font-family: var(--font-mono);
}

.year-col-label {
    font-size: 0.66rem;
    color: #556073;
    font-family: var(--font-mono);
}

.freshness-stack {
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    margin-bottom: 12px;
    border: 1px solid #d8dfd9;
}

.fresh-seg {
    height: 100%;
}

.fresh-30 {
    background: #16a34a;
}

.fresh-90 {
    background: #65a30d;
}

.fresh-180 {
    background: #f59e0b;
}

.fresh-old {
    background: #9ca3af;
}

.freshness-legend {
    list-style: none;
    display: grid;
    gap: 8px;
}

.freshness-legend li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.fresh-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fresh-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.fresh-val {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: #24303f;
}

.repo-table {
    border: 1px solid #dde4de;
    border-radius: 12px;
    overflow: hidden;
}

.repo-table-head,
.repo-table-row {
    display: grid;
    grid-template-columns: 1.6fr 0.8fr 0.9fr 0.4fr;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.75rem;
}

.repo-table-head {
    background: #f4f8f5;
    font-family: var(--font-mono);
    color: #4b596d;
}

.repo-table-row {
    border-top: 1px solid #e6ece7;
    color: #1f2937;
}

.repo-table-row:hover {
    background: #fafcf9;
}

.repo-table-name {
    font-weight: 600;
    color: #1d4ed8;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.expertise-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.expertise-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-weight: 700;
    margin-bottom: 16px;
}

.expertise-card h3 {
    font-size: 1.02rem;
    margin-bottom: 10px;
}

.expertise-card p {
    color: var(--ink-soft);
    font-size: 0.89rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.project-head h3 {
    font-size: 1.06rem;
}

.project-period {
    font-family: var(--font-mono);
    font-size: 0.71rem;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    padding: 4px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.project-summary {
    color: var(--ink-soft);
    font-size: 0.89rem;
}

.project-impact {
    font-size: 0.83rem;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ecfdf5;
    color: #0f5132;
    border: 1px solid #bbf7d0;
}

.project-repo-meta {
    font-size: 0.75rem;
    color: #516072;
    font-family: var(--font-mono);
}

.project-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
}

.project-stack li {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: #38465f;
    background: #eef2ff;
    border: 1px solid #dbe3ff;
    padding: 5px 8px;
    border-radius: 999px;
}

.project-links {
    margin-top: 4px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-links a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--blue);
}

.project-links a:hover {
    text-decoration: underline;
}

.case-study {
    padding-top: 72px;
}

.case-card {
    background: linear-gradient(145deg, #ffffff 0%, #f6faf8 100%);
    border: 1px solid #cfe2da;
    border-radius: calc(var(--radius) + 4px);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.case-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    margin-bottom: 14px;
}

.case-label {
    font-size: 0.73rem;
    font-family: var(--font-mono);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #146c65;
    margin-bottom: 6px;
}

.case-header h3 {
    font-size: 1.26rem;
    line-height: 1.35;
    max-width: 34ch;
}

.case-highlights {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 18px;
}

.case-highlights li {
    border-radius: 12px;
    padding: 10px 11px;
    background: #eef6ff;
    border: 1px solid #dae8ff;
    color: #23436b;
    font-size: 0.82rem;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.case-block {
    border: 1px solid #d9e2dc;
    border-radius: 12px;
    background: #ffffff;
    padding: 14px;
}

.case-block h4 {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.case-block p {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.playbook {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(223, 244, 237, 0.4) 100%);
}

.playbook-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 22px;
    align-items: start;
}

.playbook-list {
    list-style: none;
    counter-reset: flow;
    display: grid;
    gap: 14px;
}

.playbook-list li {
    counter-increment: flow;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 16px 16px 16px 52px;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.playbook-list li::before {
    content: counter(flow);
    position: absolute;
    left: 16px;
    top: 16px;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: #e0f2fe;
    color: #1d4ed8;
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
}

.playbook-list h3 {
    font-size: 0.93rem;
    margin-bottom: 4px;
}

.playbook-list p {
    font-size: 0.84rem;
    color: var(--ink-soft);
}

.writing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.article-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.article-meta {
    font-family: var(--font-mono);
    font-size: 0.69rem;
    color: var(--ink-soft);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.article-card h3 {
    font-size: 0.95rem;
    line-height: 1.35;
}

.article-card p {
    color: var(--ink-soft);
    font-size: 0.84rem;
}

.article-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: auto;
}

.article-tags li {
    font-size: 0.68rem;
    font-family: var(--font-mono);
    border-radius: 999px;
    padding: 4px 7px;
    border: 1px solid #d8e2ff;
    background: #f2f6ff;
    color: #3f4e75;
}

.contact {
    padding-top: 80px;
}

.contact-card {
    border: 1px solid #c8e2d8;
    background:
        radial-gradient(circle at 8% 12%, rgba(153, 246, 228, 0.4) 0%, rgba(153, 246, 228, 0) 36%),
        var(--surface);
    border-radius: calc(var(--radius) + 6px);
    padding: 40px;
    box-shadow: var(--shadow-card);
}

.contact-card h2 {
    font-size: clamp(1.55rem, 2.8vw, 2.35rem);
    margin-bottom: 12px;
}

.contact-text {
    color: var(--ink-soft);
    margin-bottom: 20px;
    max-width: 60ch;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-actions a {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 14px;
    background: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-actions a:hover {
    background: var(--surface-alt);
    transform: translateY(-1px);
}

.site-footer {
    padding: 28px 0 36px;
}

.footer-inner {
    border-top: 1px solid var(--line);
    padding-top: 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-inner p {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-links a {
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.footer-links a:hover {
    color: var(--ink);
}

.reveal {
    opacity: 1;
    transform: none;
}

.js-animate .reveal {
    opacity: 0;
    transform: translate3d(0, 28px, 0) scale(0.985);
    filter: blur(3px);
    transition:
        opacity 0.62s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.62s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.42s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: transform, opacity;
}

.js-animate .reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
    .js-animate .reveal {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }
}

@media (max-width: 1180px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .analytics-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .writing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .case-highlights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .header-inner {
        height: 70px;
        gap: 10px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-cta {
        display: none;
    }

    .lang-switch {
        order: 3;
        margin-left: auto;
    }

    .site-nav {
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        margin: 0;
        border-bottom: 1px solid var(--line);
        background: rgba(243, 244, 239, 0.97);
        backdrop-filter: blur(10px);
        display: grid;
        grid-template-columns: 1fr;
        padding: 8px 24px 14px;
        gap: 5px;
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease;
    }

    .site-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .site-nav a {
        border-radius: 10px;
        padding: 10px 12px;
    }

    .hero {
        padding-top: 70px;
    }

    .hero-grid,
    .playbook-grid,
    .projects-grid,
    .expertise-grid,
    .case-grid,
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .analytics-card-wide {
        grid-column: span 1;
    }

    .donut-layout {
        grid-template-columns: 1fr;
    }

    .hero-copy,
    .hero-panel,
    .contact-card,
    .case-card {
        padding: 24px;
    }

    .case-header {
        flex-direction: column;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(var(--container), calc(100% - 28px));
    }

    .section {
        padding: 64px 0;
    }

    .hero-copy,
    .hero-panel,
    .metric-card,
    .expertise-card,
    .project-card,
    .contact-card,
    .case-card {
        padding: 18px;
    }

    .hero-person {
        width: 100%;
        border-radius: 14px;
    }

    .hero-copy h1 {
        font-size: clamp(1.75rem, 11vw, 2.35rem);
    }

    .metrics-grid,
    .writing-grid {
        grid-template-columns: 1fr;
    }

    .analytics-kpis {
        grid-template-columns: 1fr;
    }

    .chart-row {
        grid-template-columns: 76px 1fr auto;
    }

    .repo-table-head,
    .repo-table-row {
        grid-template-columns: 1.3fr 0.8fr 0.9fr 0.4fr;
        font-size: 0.68rem;
        padding: 9px 8px;
        gap: 6px;
    }

    .panel-meta {
        flex-wrap: wrap;
    }

    .brand {
        font-size: 0.95rem;
    }
}
