:root {
    --background: #f4f5f0;
    --surface: #ffffff;
    --ink: #111312;
    --muted: #70756f;
    --line: #d9ddd6;
    --accent: #c7f36b;
    --accent-dark: #8faf39;
    --dark: #151817;
    --max-width: 1180px;
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system,
                 BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(244, 245, 240, 0.86);
    backdrop-filter: blur(14px);
}

.nav-wrapper {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--ink);
    background: var(--accent);
    font-size: 23px;
}

/* =========================
   Main Navigation
   ========================= */

.navigation {
    display: flex;
    align-items: center;
    gap: 4px;

    padding: 5px;

    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;

    box-shadow: 0 3px 12px rgba(17, 19, 18, 0.06);
}

.navigation a {
    position: relative;

    padding: 9px 17px;

    border-radius: 999px;

    color: var(--muted);

    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.01em;

    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.navigation a:hover {
    color: var(--ink);
    background: #eef0eb;
}

.navigation a.active {
    color: var(--dark);
    background: var(--accent);
}

.navigation a.active:hover {
    background: var(--accent);
    transform: translateY(-1px);
}

.hero {
    padding: 120px 0 110px;
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 0.85fr;
    align-items: center;
    gap: 80px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.hero h1 {
    max-width: 680px;
    margin: 0;
    font-size: clamp(3.2rem, 7vw, 6.8rem);
    line-height: 0.94;
    letter-spacing: -0.085em;
    font-weight: 800;
}

.hero-description {
    max-width: 500px;
    margin: 30px 0;
    color: var(--muted);
    font-size: 1.12rem;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    padding: 13px 19px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    transition: transform 160ms ease, background 160ms ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    background: var(--ink);
    color: white;
}

.button-secondary {
    border: 1px solid var(--line);
    background: transparent;
}

/* =================================
   Interactive Fluid Simulation
   ================================= */

.hero-visual {
    position: relative;
    height: 430px;

    overflow: hidden;

    border-radius: var(--radius);
    border: 1px solid #2b302d;

    background: #111513;
}

#fluidCanvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
}

.fluid-ball {
    position: absolute;

    width: 58px;
    height: 58px;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    z-index: 10;

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 32% 28%,
            #f5ffd9 0%,
            var(--accent) 32%,
            #9bb94a 70%,
            #667c2f 100%
        );

    box-shadow:
        0 0 0 1px rgba(255,255,255,0.15),
        0 8px 20px rgba(0,0,0,0.35);

    cursor: grab;

    user-select: none;
    touch-action: none;
}

.fluid-ball:hover {
    box-shadow:
        0 0 0 4px rgba(199,243,107,0.12),
        0 8px 25px rgba(0,0,0,0.4);
}

.fluid-ball.dragging {
    cursor: grabbing;

    box-shadow:
        0 0 0 5px rgba(199,243,107,0.18),
        0 10px 30px rgba(0,0,0,0.45);
}

.hero-visual .visual-label {
    position: absolute;

    left: 20px;
    bottom: 18px;

    z-index: 20;

    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;

    border-radius: 999px;

    color: #dce4d7;

    background: rgba(17,21,19,0.78);

    border: 1px solid rgba(255,255,255,0.08);

    font-size: 0.75rem;
    font-weight: 700;

    backdrop-filter: blur(8px);
}

.visual-label {
    position: absolute;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 100px;
    color: white;
    background: rgba(0, 0, 0, 0.28);
    font-size: 0.75rem;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px var(--accent);
}

.section {
    padding: 100px 0;
}

.section-dark {
    color: white;
    background: var(--dark);
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.section h2 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 4.3rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.text-link {
    color: var(--accent-dark);
    font-size: 0.9rem;
    font-weight: 800;
}

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

.case-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.case-card-image {
    min-height: 240px;
    background: #dfe5d7;
}

.case-card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.placeholder-visual {
    display: grid;
    width: 100%;
    height: 240px;
    place-items: center;
    color: var(--accent-dark);
    background:
        linear-gradient(135deg, transparent 25%, rgba(255,255,255,.5) 26%, transparent 27%),
        #dce9bd;
    font-size: 2rem;
    font-weight: 800;
}

.case-card-body {
    padding: 26px;
}

.card-category {
    margin: 0 0 12px;
    color: var(--accent-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.case-card h3 {
    margin: 0 0 12px;
    font-size: 1.45rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.case-card p {
    color: var(--muted);
}

.case-card .text-link {
    display: inline-block;
    margin-top: 12px;
}

.split-section {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    gap: 100px;
}

.capability-list {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.capability-list div {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 20px;
    padding: 22px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.capability-list span {
    color: var(--accent);
    font-size: 0.8rem;
}

.capability-list p {
    margin: 0;
}

.article-list {
    border-top: 1px solid var(--line);
}

.article-list-item {
    display: grid;
    grid-template-columns: 0.9fr 1fr;
    gap: 40px;
    padding: 25px 0;
    border-bottom: 1px solid var(--line);
}

.article-list-item h3 {
    margin: 5px 0 0;
    font-size: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.article-list-item > p {
    margin: 0;
    color: var(--muted);
}

.article-date {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.article-page {
    padding: 100px 0;
}

.article-container {
    max-width: 880px;
}

.article-header {
    max-width: 850px;
    margin-bottom: 55px;
}

.article-header h1 {
    margin: 0 0 20px;
    font-size: clamp(2.8rem, 7vw, 6.5rem);
    line-height: 0.94;
    letter-spacing: -0.08em;
}

.article-meta {
    display: flex;
    gap: 10px;
    color: var(--muted);
    font-size: 0.9rem;
}

.article-feature-image {
    width: 100%;
    max-height: 560px;
    margin-bottom: 55px;
    border-radius: var(--radius);
    object-fit: cover;
}

.article-content {
    font-size: 1.08rem;
}

.article-content a {
    color: #2563eb;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.article-content a:hover {
    color: #1d4ed8;
}


.article-content h1,
.article-content h2 {
    position: relative;

    margin-top: 60px;
    margin-bottom: 24px;
    padding: 14px 20px;

    font-size: 2.2rem;
    line-height: 1.1;
    letter-spacing: -0.05em;

    color: var(--ink);
    background: #e8efdc;

    border-left: 5px solid var(--accent-dark);
    border-radius: 10px;
}

.article-content img {
    margin: 30px 0;
    border-radius: 12px;
}

/* =========================
   Article tables
   ========================= */

.article-content table {
    width: 100%;
    margin: 35px 0;

    border-collapse: separate;
    border-spacing: 0;

    border: 1px solid var(--line);
    border-radius: 12px;

    background: var(--surface);

    font-size: 0.94rem;
}

/* Table header */
.article-content th {
    padding: 14px 16px;

    color: #ffffff;
    background: var(--dark);

    font-weight: 700;
    text-align: left;

    border-bottom: 3px solid var(--accent);
}

/* Table body */
.article-content td {
    padding: 12px 16px;

    color: var(--ink);
    background: var(--surface);

    border-bottom: 1px solid var(--line);
}

/* Alternating rows */
.article-content tbody tr:nth-child(even) td {
    background: #f7f8f4;
}

/* Hover */
.article-content tbody tr:hover td {
    background: #eef4e5;
}

/* Remove bottom border */
.article-content tbody tr:last-child td {
    border-bottom: none;
}

/* Rounded corners */
.article-content thead tr:first-child th:first-child {
    border-top-left-radius: 12px;
}

.article-content thead tr:first-child th:last-child {
    border-top-right-radius: 12px;
}

.article-content tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.article-content tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}


/* `blockMesh` */
.article-content code {
    color: #30352f;
    background: #e6e9e2;
    padding: 2px 6px;
    border-radius: 5px;
}

/* ```python ... ``` */
.article-content pre {
    color: #e6e9e2;
    background: #172019;
    padding: 22px;
    border-radius: 12px;
}

/* Code inside a code block */
.article-content pre code {
    color: var(--accent);
    background: transparent;
    padding: 0;
}

.site-footer {
    padding: 28px 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 800px) {
    .navigation {
        gap: 2px;
        padding: 4px;
    }

    .navigation a {
        padding: 8px 12px;
        font-size: 0.82rem;
    }

    .hero {
        padding: 75px 0;
    }

    .hero-grid,
    .split-section {
        grid-template-columns: 1fr;
        gap: 45px;
    }

    .hero-visual {
        min-height: 300px;
    }

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

    .section-heading {
        display: block;
    }

    .section-heading .text-link {
        display: inline-block;
        margin-top: 18px;
    }

    .article-list-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .footer-content {
        display: block;
    }
}

/* --- Landing pages / homepage additions --- */

.landing-hero {
    padding-top: 90px;
    padding-bottom: 55px;
}

.landing-hero h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(3rem, 8vw, 7rem);
    line-height: 0.92;
    letter-spacing: -0.08em;
}

.landing-intro {
    max-width: 680px;
    margin: 30px 0 0;
    color: var(--muted);
    font-size: 1.15rem;
}

.section-tight {
    padding-top: 35px;
}

.article-tags {
    margin: 12px 0 0;
    color: var(--accent-dark);
    font-size: 0.78rem;
    font-weight: 700;
}

.section-cta {
    padding-top: 70px;
    padding-bottom: 110px;
}

.cta {
    padding: 55px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
}

.cta h2 {
    max-width: 800px;
    margin-bottom: 30px;
}

@media (max-width: 800px) {
    .landing-hero {
        padding-top: 65px;
    }

    .cta {
        padding: 30px;
    }
}

/* Article navigation */

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 70px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.article-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 20px;
    border-radius: 10px;

    font-size: 0.92rem;
    font-weight: 700;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.article-nav-button:hover {
    transform: translateY(-2px);
}

/* Return button */

.article-nav-button.primary {
    color: var(--dark);
    background: var(--accent);
}

.article-nav-button.primary:hover {
    background: #b9e85c;
}

/* Home button */

.article-nav-button.secondary {
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
}

.article-nav-button.secondary:hover {
    background: #eef0eb;
}

/* =========================
   Interactive Fluid Hero
   ========================= */

.hero-visual {
    position: relative;
    height: 430px;

    overflow: hidden;

    border-radius: var(--radius);
    background: #151817;

    border: 1px solid #2b302d;

    cursor: default;
}

#fluidCanvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    display: block;
}

.fluid-ball {
    position: absolute;

    width: 72px;
    height: 72px;

    transform: translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle at 35% 30%,
            #f5ffd9 0%,
            var(--accent) 35%,
            #8faf39 100%
        );

    box-shadow:
        0 0 0 1px rgba(255,255,255,0.12),
        0 8px 25px rgba(0,0,0,0.35);

    cursor: grab;

    z-index: 3;

    user-select: none;
    touch-action: none;

    transition: box-shadow 0.2s ease;
}

.fluid-ball:hover {
    box-shadow:
        0 0 0 3px rgba(199,243,107,0.18),
        0 8px 30px rgba(0,0,0,0.4);
}

.fluid-ball.dragging {
    cursor: grabbing;

    box-shadow:
        0 0 0 4px rgba(199,243,107,0.22),
        0 10px 35px rgba(0,0,0,0.45);
}

.hero-visual .visual-label {
    position: absolute;

    left: 20px;
    bottom: 18px;

    z-index: 4;

    padding: 8px 12px;

    border-radius: 999px;

    color: #dce4d7;
    background: rgba(21, 24, 23, 0.75);

    border: 1px solid rgba(255,255,255,0.08);

    font-size: 0.75rem;
    font-weight: 700;

    backdrop-filter: blur(8px);
}
