/* =============================================================
   Ryan Borths — portfolio design system
   Shared by the homepage and every /case-studies/* page.
   Tokens first, then layout primitives, then components.
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
    --ink: #0a1628;
    /* deep navy — primary dark */
    --ink-2: #0f1e33;
    /* slightly lighter navy */
    --ink-soft: #1b2b44;
    /* card on dark */
    --paper: #f7f5f0;
    /* warm off-white */
    --paper-2: #ffffff;
    /* pure white surface */
    --line: #e5e1d7;
    /* subtle warm border */
    --line-dark: rgba(255, 255, 255, 0.1);
    --muted: #5b6473;
    /* secondary text on light */
    --muted-dark: rgba(255, 255, 255, 0.62);
    --accent: #06b6d4;
    /* cyan — confident, technical */
    --accent-2: #0891b2;
    /* deeper cyan for hover */
    --highlight: #fde68a;
    /* warm marker for emphasis */
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Manrope", -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: "JetBrains Mono", ui-monospace, monospace;
    --max: 1240px;
    --pad: clamp(20px, 4vw, 56px);
    --radius: 14px;
    --radius-sm: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

::selection {
    background: var(--ink);
    color: var(--accent);
}

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

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

/* ---------- Layout helpers ---------- */
.wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding-left: var(--pad);
    padding-right: var(--pad);
}

section {
    padding: clamp(56px, 7vw, 104px) 0;
    position: relative;
}

.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-2);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.eyebrow::before {
    content: "";
    width: 24px;
    height: 1px;
    background: var(--accent-2);
    display: inline-block;
}

.section-title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(36px, 5.5vw, 68px);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin-top: 18px;
    color: var(--ink);
}

.section-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--accent-2);
}

.section-lede {
    font-size: clamp(16px, 1.3vw, 18px);
    color: var(--muted);
    max-width: 56ch;
    margin-top: 22px;
    line-height: 1.65;
}

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-bottom: 1px solid var(--line-dark);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    padding-bottom: 18px;
    color: #fff;
}

.brand span {
    white-space: nowrap;
}

/* The logo must never be compressed by flex pressure from the nav row. */
.brand,
.brand-mark {
    flex: none;
}

/* Below ~1280px the wordmark, seven nav links and the CTA no longer fit on one
   line — some of those seven labels are two words ("Case Studies",
   "Practical AI", "Operating System"). Drop the wordmark and keep the logo,
   which still links home; the nav links are the load-bearing part. */
@media (max-width: 1280px) {
    .brand span {
        display: none;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: #fff;
}

.brand-mark {
    height: 44px;
    width: auto;
    border-radius: 8px;
    display: block;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.15);
}

.nav-links {
    display: flex;
    /* 36px at desktop; tightens below ~1286px so the 7th item never overflows
       into the CTA, including with Manrope's wider metrics. */
    gap: clamp(14px, 2.4vw, 36px);
    list-style: none;
}

.nav-links a {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 500;
    /* Labels are phrases — never let them break mid-label. */
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.78);
    transition: color 180ms ease;
    position: relative;
}

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

.nav-cta {
    background: var(--accent);
    color: var(--ink);
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    /* Keep the pill on one line — it was wrapping to two under nav pressure. */
    white-space: nowrap;
    flex: none;
    transition:
        transform 200ms ease,
        background 200ms ease;
}

.nav-cta:hover {
    background: #fff;
    transform: translateY(-1px);
}

.nav-burger {
    display: none;
    background: none;
    border: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Seven nav links + logo + CTA only sit cleanly on one line at >=1000px.
   Below that the row is hidden, as it already was below 880px. */
@media (max-width: 1000px) {
    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }
}

/* ---------- Hero ---------- */
.hero {
    background: var(--ink);
    color: #fff;
    padding-top: clamp(80px, 10vw, 130px);
    padding-bottom: clamp(80px, 10vw, 130px);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 18%,
            rgba(6, 182, 212, 0.18),
            transparent 45%),
        radial-gradient(circle at 12% 90%,
            rgba(6, 182, 212, 0.08),
            transparent 50%);
    pointer-events: none;
}

/* faint dot grid overlay */
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px,
            transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom,
            black 0%,
            black 60%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,
            black 0%,
            black 60%,
            transparent 100%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: clamp(40px, 6vw, 88px);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-eyebrow {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.hero-eyebrow .dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.18);
    animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.18);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.04);
    }
}

.hero h1 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(44px, 7vw, 96px);
    line-height: 0.98;
    letter-spacing: -0.025em;
    margin-bottom: 28px;
}

.hero h1 em {
    font-style: italic;
    font-weight: 300;
    color: var(--accent);
}

.hero-sub {
    font-size: clamp(17px, 1.4vw, 19px);
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.78);
    max-width: 56ch;
    margin-bottom: 38px;
}

.hero-sub strong {
    color: #fff;
    font-weight: 600;
}

.hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 26px;
    border-radius: 999px;
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 600;
    transition: all 220ms ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent);
    color: var(--ink);
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px -10px rgba(6, 182, 212, 0.5);
}

.btn-ghost {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.22);
}

.btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn .arrow {
    transition: transform 220ms ease;
}

.btn:hover .arrow {
    transform: translateX(4px);
}

/* Hero portrait card */
.hero-card {
    background: linear-gradient(160deg, var(--ink-soft), var(--ink-2));
    border: 1px solid var(--line-dark);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.hero-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle at top right,
            rgba(6, 182, 212, 0.25),
            transparent 70%);
}

.portrait {
    aspect-ratio: 1 / 1;
    background: var(--ink);
    border: 1px solid var(--line-dark);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    /* Subtle tonal harmony: cool the greens, retain skin warmth */
    filter: saturate(0.78) contrast(1.04) brightness(0.96);
    transition:
        filter 600ms ease,
        transform 800ms ease;
}

.hero-card:hover .portrait img {
    filter: saturate(1) contrast(1.06) brightness(1);
    transform: scale(1.02);
}

/* Subtle cyan-tinted vignette to lock the photo into the palette */
.portrait::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 0%,
            rgba(6, 182, 212, 0.06),
            transparent 55%),
        linear-gradient(180deg, transparent 60%, rgba(10, 22, 40, 0.18) 100%);
    pointer-events: none;
}

.hero-card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 22px;
}

.meta-cell {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--line-dark);
    border-radius: 10px;
    padding: 14px 16px;
}

.meta-cell .k {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted-dark);
    margin-bottom: 6px;
}

.meta-cell .v {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

.meta-cell .v .accent {
    color: var(--accent);
}

/* Hero stats strip */
.hero-stats {
    margin-top: clamp(60px, 8vw, 90px);
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    padding: 28px 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    position: relative;
    z-index: 1;
}

.stat-mini {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-mini .num {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1;
    color: #fff;
    letter-spacing: -0.02em;
}

.stat-mini .num em {
    font-style: italic;
    color: var(--accent);
}

.stat-mini .lbl {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

@media (max-width: 880px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- About ---------- */
.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
}

.about-text p {
    font-size: 18px;
    line-height: 1.7;
    color: var(--ink);
    margin-bottom: 20px;
}

.about-text p:first-of-type {
    font-family: var(--serif);
    font-size: clamp(22px, 2vw, 26px);
    font-weight: 400;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.about-text p:first-of-type em {
    font-style: italic;
    color: var(--accent-2);
}

.pillars {
    display: grid;
    gap: 16px;
}

.pillar {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px;
    transition:
        transform 240ms ease,
        border-color 240ms ease,
        box-shadow 240ms ease;
}

.pillar:hover {
    transform: translateY(-2px);
    border-color: var(--ink);
    box-shadow: 0 10px 30px -16px rgba(10, 22, 40, 0.18);
}

.pillar h4 {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.005em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pillar-num {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.pillar p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
}

@media (max-width: 880px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Impact / Big metrics ---------- */
.impact {
    background: var(--paper);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
    margin-top: 56px;
}

.metric {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px;
    grid-column: span 4;
    position: relative;
    overflow: hidden;
    transition:
        border-color 220ms ease,
        transform 220ms ease;
}

.metric:hover {
    border-color: var(--ink);
    transform: translateY(-2px);
}

.metric.span-6 {
    grid-column: span 6;
}

.metric.dark {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.metric.dark .metric-label {
    color: var(--muted-dark);
}

.metric.dark .metric-context {
    color: rgba(255, 255, 255, 0.72);
}

.metric-num {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(56px, 6vw, 88px);
    line-height: 0.95;
    letter-spacing: -0.03em;
    color: var(--ink);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.metric.dark .metric-num {
    color: #fff;
}

.metric-num em {
    font-style: italic;
    color: var(--accent-2);
}

.metric.dark .metric-num em {
    color: var(--accent);
}

.metric-num .unit {
    font-family: var(--sans);
    font-size: 0.32em;
    font-weight: 600;
    letter-spacing: 0;
    color: var(--muted);
    margin-left: 4px;
    align-self: center;
}

.metric.dark .metric-num .unit {
    color: var(--muted-dark);
}

.metric-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 14px;
}

.metric-context {
    margin-top: 18px;
    font-size: 14.5px;
    color: var(--muted);
    line-height: 1.55;
}

.metric-context strong {
    color: var(--ink);
    font-weight: 600;
}

.metric.dark .metric-context strong {
    color: #fff;
}

@media (max-width: 980px) {

    .metric,
    .metric.span-6 {
        grid-column: span 6;
    }
}

@media (max-width: 600px) {

    .metric,
    .metric.span-6 {
        grid-column: span 12;
    }
}

/* ---------- Experience timeline ---------- */
.experience {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.timeline {
    margin-top: 60px;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--line);
}

.job {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 28px;
    padding: 28px 0;
    border-bottom: 1px dashed var(--line);
}

.job:last-child {
    border-bottom: 0;
}

.job-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--paper-2);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    margin-top: 4px;
    z-index: 1;
    position: relative;
}

.job-dot::after {
    content: "";
    width: 8px;
    height: 8px;
    background: var(--ink);
    border-radius: 50%;
}

.job.current .job-dot {
    border-color: var(--accent);
}

.job.current .job-dot::after {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2);
}

.job-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 18px;
    margin-bottom: 8px;
}

.job-role {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(22px, 2vw, 28px);
    letter-spacing: -0.01em;
    color: var(--ink);
    line-height: 1.2;
}

.job-co {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.job-meta {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.job-meta span+span::before {
    content: "·";
    margin: 0 10px;
    color: var(--line);
}

.job-bullets {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    max-width: 78ch;
}

.job-bullets li {
    font-size: 15.5px;
    color: var(--ink);
    line-height: 1.65;
    padding-left: 22px;
    position: relative;
}

.job-bullets li::before {
    content: "→";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-2);
    font-weight: 600;
}

.job-bullets li strong {
    font-weight: 700;
}

/* ---------- Case Studies ---------- */
.cases {
    background: var(--paper);
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-top: 56px;
}

.case {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 38px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition:
        transform 240ms ease,
        border-color 240ms ease,
        box-shadow 240ms ease;
    position: relative;
    overflow: hidden;
}

.case::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 320ms ease;
}

.case:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
    box-shadow: 0 24px 40px -28px rgba(10, 22, 40, 0.25);
}

.case:hover::before {
    width: 100%;
}

.case.feature {
    grid-column: span 2;
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
    flex-direction: row;
    align-items: stretch;
    padding: 0;
}

.case.feature::before {
    background: var(--accent);
}

.case-feature-text {
    padding: 48px;
    flex: 1.2;
}

.case-feature-art {
    flex: 1;
    background:
        radial-gradient(circle at 70% 30%,
            rgba(6, 182, 212, 0.2),
            transparent 60%),
        var(--ink-soft);
    border-left: 1px solid var(--line-dark);
    display: grid;
    place-items: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.case-tag {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(6, 182, 212, 0.1);
    padding: 6px 12px;
    border-radius: 999px;
    align-self: flex-start;
    font-weight: 500;
}

.case.feature .case-tag {
    color: var(--accent);
    background: rgba(6, 182, 212, 0.16);
}

.case h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(24px, 2.4vw, 32px);
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: inherit;
}

.case h3 em {
    font-style: italic;
    color: var(--accent-2);
}

.case.feature h3 em {
    color: var(--accent);
}

.case-body {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--muted);
}

.case.feature .case-body {
    color: rgba(255, 255, 255, 0.78);
}

.case-result {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-2);
    font-weight: 500;
}

.case.feature .case-result {
    border-color: var(--line-dark);
    color: var(--accent);
}

.featured-build-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.featured-build-image-wrap {
    padding: 28px;
}

.featured-build-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

/* big stat in feature art */
.feature-stat {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
}

.feature-stat .num {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(80px, 11vw, 168px);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #fff;
}

.feature-stat .num em {
    font-style: italic;
    color: var(--accent);
    font-weight: 300;
}

.feature-stat .lbl {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.64);
    margin-top: 14px;
}

.case-feature-art::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    mask-image: radial-gradient(circle at center,
            black 30%,
            transparent 75%);
    -webkit-mask-image: radial-gradient(circle at center,
            black 30%,
            transparent 75%);
}

@media (max-width: 880px) {
    .case-grid {
        grid-template-columns: 1fr;
    }

    .case.feature {
        grid-column: span 1;
        flex-direction: column;
    }

    .case-feature-art {
        border-left: 0;
        border-top: 1px solid var(--line-dark);
        padding: 32px;
    }

    .case-feature-text {
        padding: 32px;
    }

    .featured-build-image-wrap {
        padding: 20px;
    }
}

/* ---------- AI Portfolio ---------- */
.portfolio {
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.portfolio::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px,
            transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(to bottom,
            transparent 0%,
            black 30%,
            black 70%,
            transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom,
            transparent 0%,
            black 30%,
            black 70%,
            transparent 100%);
    pointer-events: none;
}

.portfolio .eyebrow {
    color: var(--accent);
}

.portfolio .eyebrow::before {
    background: var(--accent);
}

.portfolio .section-title {
    color: #fff;
}

.portfolio .section-title em {
    color: var(--accent);
}

.portfolio .section-lede {
    color: rgba(255, 255, 255, 0.72);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.tool {
    background: var(--ink-soft);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 32px 30px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition:
        border-color 240ms ease,
        transform 240ms ease,
        background 240ms ease;
    position: relative;
    overflow: hidden;
    color: inherit;
}

a.tool {
    cursor: pointer;
}

.tool:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    background: rgba(6, 182, 212, 0.04);
}

.tool-external {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-dark);
    display: grid;
    place-items: center;
    color: var(--muted-dark);
    transition: all 240ms ease;
}

.tool:hover .tool-external {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--ink);
    transform: translate(2px, -2px);
}

.tool-external svg {
    width: 12px;
    height: 12px;
}

.tool-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.12);
    border: 1px solid rgba(6, 182, 212, 0.3);
    display: grid;
    place-items: center;
    color: var(--accent);
}

.tool-icon svg {
    width: 22px;
    height: 22px;
}

.tool-type {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

.tool h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: 22px;
    color: #fff;
    letter-spacing: -0.01em;
}

.tool p {
    font-size: 14.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

.tool-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--line-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

.tool-foot .live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
}

.tool-foot .live::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

@media (max-width: 980px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Skills / Tech Stack ---------- */
.skills {
    background: var(--paper);
}

.stack-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 56px;
}

.stack {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 30px;
}

.stack h4 {
    font-family: var(--sans);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.chip {
    font-family: var(--sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 180ms ease;
}

.chip:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: #fff;
}

.chip.implemented {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.chip.implemented::after {
    content: " ✓";
    color: var(--accent);
    font-weight: 700;
}

.competencies {
    margin-top: 56px;
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(36px, 5vw, 60px);
    position: relative;
    overflow: hidden;
}

.competencies::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 280px;
    background: radial-gradient(circle,
            rgba(6, 182, 212, 0.18),
            transparent 60%);
    pointer-events: none;
}

.competencies h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(24px, 2.4vw, 32px);
    margin-bottom: 30px;
    letter-spacing: -0.01em;
}

.competencies h3 em {
    font-style: italic;
    color: var(--accent);
}

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

.comp-cat {
    border-left: 2px solid var(--accent);
    padding-left: 18px;
}

.comp-cat h5 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    font-weight: 500;
}

.comp-cat ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
}

.comp-cat li {
    font-size: 14.5px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.5;
}

@media (max-width: 880px) {

    .stack-grid,
    .comp-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- Insights / Newsletter ---------- */
.insights {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
}

.insights-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(36px, 6vw, 88px);
    align-items: start;
}

.topics {
    display: grid;
    gap: 14px;
}

.topic {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 18px 22px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: all 220ms ease;
}

.topic:hover {
    border-color: var(--ink);
}

.topic-num {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    width: 28px;
}

.topic-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topic-text .t {
    font-family: var(--sans);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
    line-height: 1.35;
}

.topic-text .s {
    font-size: 13px;
    color: var(--muted);
}

.topic-tag {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-2);
    padding: 4px 8px;
    background: rgba(6, 182, 212, 0.08);
    border-radius: 4px;
}

/* Featured article card (Substack) */
.article-feature {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 36px 36px 32px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 240ms ease, transform 240ms ease, box-shadow 240ms ease;
    position: relative;
    overflow: hidden;
    color: inherit;
}

a.article-feature { cursor: pointer; }

.article-feature::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 320ms ease;
}

.article-feature:hover {
    border-color: var(--ink);
    transform: translateY(-3px);
    box-shadow: 0 24px 40px -28px rgba(10, 22, 40, 0.25);
}

.article-feature:hover::before { width: 100%; }

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.article-meta .pub {
    color: var(--accent-2);
    font-weight: 500;
}

.article-feature h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(24px, 2.6vw, 34px);
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: var(--ink);
}

.article-feature h3 em {
    font-style: italic;
    color: var(--accent-2);
}

.article-subtitle {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: 17px;
    color: var(--muted);
    line-height: 1.5;
    margin-top: -6px;
}

.article-excerpt {
    font-size: 15.5px;
    line-height: 1.65;
    color: var(--ink);
    border-left: 2px solid var(--accent);
    padding-left: 18px;
    margin-top: 4px;
}

.article-cta {
    margin-top: 8px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 220ms ease;
}

.article-feature:hover .article-cta {
    gap: 14px;
}

.newsletter-card {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(32px, 4vw, 48px);
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle,
            rgba(6, 182, 212, 0.3),
            transparent 60%);
}

.newsletter-soon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
    padding: 6px 12px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    border-radius: 999px;
    background: rgba(6, 182, 212, 0.08);
    position: relative;
    z-index: 1;
}

.newsletter-soon::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
    animation: pulse 2.4s ease-in-out infinite;
}

.newsletter-card h3 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(28px, 3.4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 18px 0 14px;
    position: relative;
    z-index: 1;
}

.newsletter-card h3 em {
    font-style: italic;
    color: var(--accent);
}

.newsletter-card p {
    font-size: 15.5px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 28px;
    max-width: 46ch;
    position: relative;
    z-index: 1;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-dark);
    border-radius: 999px;
    padding: 6px;
    position: relative;
    z-index: 1;
}

.newsletter-form input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: #fff;
    font-family: var(--sans);
    font-size: 14px;
    padding: 10px 16px;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.newsletter-form button {
    border: 0;
    background: var(--accent);
    color: var(--ink);
    font-family: var(--sans);
    font-weight: 600;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 200ms ease;
}

.newsletter-form button:hover {
    background: #fff;
}

.newsletter-note {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--muted-dark);
    margin-top: 14px;
    position: relative;
    z-index: 1;
}

@media (max-width: 880px) {
    .insights-wrap {
        grid-template-columns: 1fr;
    }
}

/* ---------- Contact / Footer ---------- */
.contact {
    background: var(--ink);
    color: #fff;
    padding: clamp(80px, 10vw, 130px) 0 0;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 80%;
    background: radial-gradient(ellipse at center,
            rgba(6, 182, 212, 0.1),
            transparent 60%);
    pointer-events: none;
}

.contact-inner {
    position: relative;
    z-index: 1;
}

.contact-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 70px;
}

.contact-head .eyebrow {
    color: var(--accent);
}

.contact-head .eyebrow::before {
    background: var(--accent);
}

.contact-head h2 {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(40px, 6vw, 80px);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin-top: 18px;
    color: #fff;
}

.contact-head h2 em {
    font-style: italic;
    color: var(--accent);
}

.contact-head p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 22px;
    line-height: 1.6;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    background: var(--ink-soft);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius);
    padding: 26px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 240ms ease;
}

.contact-card:hover {
    border-color: var(--accent);
    background: rgba(6, 182, 212, 0.04);
    transform: translateY(-3px);
}

.contact-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    display: grid;
    place-items: center;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-card .k {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
}

.contact-card .v {
    font-size: 15px;
    color: #fff;
    word-break: break-word;
    line-height: 1.4;
    font-weight: 500;
}

@media (max-width: 880px) {
    .contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.foot {
    margin-top: clamp(80px, 10vw, 130px);
    border-top: 1px solid var(--line-dark);
    padding: 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.foot-brand {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.84);
}

.foot-meta {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted-dark);
    letter-spacing: 0.08em;
}

.foot-links {
    display: flex;
    gap: 18px;
}

.foot-links a {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-dark);
    transition: color 180ms ease;
}

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

/* ---------- Reveal animation on scroll ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 700ms ease,
        transform 700ms ease;
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* respect reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* =============================================================
   CASE STUDY PAGES  (/case-studies/*)
   ============================================================= */

.cs-hero {
    background: var(--ink);
    color: #fff;
    padding: 132px 0 72px;
    position: relative;
    overflow: hidden;
}

.cs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(900px 420px at 78% -8%, rgba(6, 182, 212, 0.14), transparent 60%),
        radial-gradient(700px 380px at 6% 104%, rgba(6, 182, 212, 0.07), transparent 62%);
    pointer-events: none;
}

.cs-hero .wrap {
    position: relative;
    z-index: 1;
}

.crumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted-dark);
    margin-bottom: 26px;
}

.crumb a {
    color: var(--muted-dark);
    border-bottom: 1px solid transparent;
}

.crumb a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.crumb .sep {
    opacity: 0.45;
}

.cs-hero h1 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(34px, 5.4vw, 60px);
    line-height: 1.04;
    letter-spacing: -0.022em;
    max-width: 16ch;
}

.cs-hero h1 em {
    font-style: italic;
    color: var(--accent);
}

.cs-hero .cs-sub {
    margin-top: 22px;
    font-size: clamp(16px, 1.9vw, 19px);
    line-height: 1.62;
    color: var(--muted-dark);
    max-width: 62ch;
}

.cs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.cs-hero .btn-ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
}

.cs-hero .btn-ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(6, 182, 212, 0.08);
}

.repo-note {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    color: var(--muted-dark);
    padding: 12px 16px;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
}

.repo-note svg {
    width: 15px;
    height: 15px;
    flex: none;
    opacity: 0.7;
}

.spec-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    margin-top: 52px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    overflow: hidden;
}

.spec-cell {
    background: var(--ink);
    padding: 22px 20px;
}

.spec-cell .k {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 9px;
}

.spec-cell .v {
    font-size: 14.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 880px) {
    .spec-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .spec-strip {
        grid-template-columns: 1fr;
    }
}

/* ---------- Case study prose ---------- */

.prose {
    max-width: 68ch;
}

.prose p {
    font-size: 16.5px;
    line-height: 1.78;
    color: var(--muted);
    margin-top: 18px;
}

.prose p:first-child {
    margin-top: 0;
}

.prose p strong {
    color: var(--ink);
    font-weight: 600;
}

.prose ul {
    list-style: none;
    margin-top: 20px;
}

.prose ul li {
    position: relative;
    padding-left: 24px;
    font-size: 16px;
    line-height: 1.72;
    color: var(--muted);
    margin-bottom: 12px;
}

.prose ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 11px;
    width: 7px;
    height: 1px;
    background: var(--accent);
}

.prose ul li strong {
    color: var(--ink);
    font-weight: 600;
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

@media (max-width: 880px) {
    .split {
        grid-template-columns: 1fr;
    }
}

.h3-rule {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(21px, 2.6vw, 27px);
    line-height: 1.24;
    letter-spacing: -0.015em;
    color: var(--ink);
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
}

.h3-rule em {
    font-style: italic;
    color: var(--accent-2);
}

/* ---------- Numbered decision list ---------- */

.decisions {
    display: grid;
    gap: 2px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 34px;
}

.decision {
    background: var(--paper-2);
    padding: 26px clamp(20px, 3vw, 32px);
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 18px;
    align-items: start;
}

.decision .n {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--accent-2);
    letter-spacing: 0.08em;
    padding-top: 4px;
}

.decision h4 {
    font-size: 16.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin-bottom: 8px;
}

.decision p {
    font-size: 15px;
    line-height: 1.7;
    color: var(--muted);
}

@media (max-width: 600px) {
    .decision {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* ---------- Boundaries / honest-claims panel ---------- */

.boundaries {
    background: var(--ink);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(30px, 5vw, 52px);
    position: relative;
    overflow: hidden;
}

.boundaries::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(600px 300px at 88% 0%, rgba(6, 182, 212, 0.12), transparent 60%);
    pointer-events: none;
}

.boundaries > * {
    position: relative;
    z-index: 1;
}

.boundaries h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(22px, 3vw, 30px);
    line-height: 1.2;
    margin-bottom: 10px;
}

.boundaries h3 em {
    font-style: italic;
    color: var(--accent);
}

.boundaries .lede {
    color: var(--muted-dark);
    font-size: 16px;
    line-height: 1.7;
    max-width: 64ch;
}

.claims-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 34px;
}

@media (max-width: 880px) {
    .claims-grid {
        grid-template-columns: 1fr;
    }
}

.claims-col h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}

.claims-col.limits h4 {
    color: rgba(255, 255, 255, 0.55);
}

.claims-col ul {
    list-style: none;
}

.claims-col li {
    position: relative;
    padding-left: 26px;
    font-size: 15px;
    line-height: 1.68;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 14px;
}

.claims-col li::before {
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--mono);
    font-size: 14px;
    color: var(--accent);
}

.claims-col.demonstrates li::before {
    content: "+";
}

.claims-col.limits li::before {
    content: "—";
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- Stack table ---------- */

.stack-rows {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--paper-2);
}

.stack-row {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 20px;
    padding: 20px clamp(18px, 3vw, 28px);
    border-bottom: 1px solid var(--line);
}

.stack-row:last-child {
    border-bottom: 0;
}

.stack-row .layer {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    padding-top: 3px;
}

.stack-row .detail {
    font-size: 15px;
    line-height: 1.66;
    color: var(--ink);
}

.stack-row .detail span {
    color: var(--muted);
}

@media (max-width: 720px) {
    .stack-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* ---------- Featured tool card on homepage ---------- */

.tool.featured {
    grid-column: span 2;
    background: linear-gradient(180deg, rgba(6, 182, 212, 0.07), rgba(6, 182, 212, 0.02));
    border-color: rgba(6, 182, 212, 0.34);
}

.tool.featured h3 {
    font-size: 22px;
}

.tool.featured .tool-flag {
    position: absolute;
    top: 0;
    left: 0;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
    background: var(--accent);
    padding: 5px 12px;
    border-radius: 0 0 var(--radius-sm) 0;
}

.tool.featured .tool-head {
    margin-top: 18px;
}

@media (max-width: 980px) {
    .tool.featured {
        grid-column: span 1;
    }
}

/* ---------- Case-study CTA band ---------- */

.cs-cta {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(28px, 4vw, 44px);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.cs-cta h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(20px, 2.6vw, 26px);
    line-height: 1.24;
    color: var(--ink);
    max-width: 26ch;
}

.cs-cta h3 em {
    font-style: italic;
    color: var(--accent-2);
}

/* ---------- Cross-section bridge (e.g. #cases → a Practical AI build) ---------- */

.bridge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 3vw, 40px);
    margin-top: 22px;
    padding: clamp(22px, 3vw, 30px) clamp(22px, 3vw, 34px);
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius);
    transition: border-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.bridge:hover {
    border-color: rgba(6, 182, 212, 0.45);
    border-left-color: var(--accent-2);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(10, 22, 40, 0.07);
}

.bridge-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.bridge h3 {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(18px, 2.2vw, 23px);
    line-height: 1.28;
    letter-spacing: -0.012em;
    color: var(--ink);
    text-wrap: balance;
}

.bridge h3 em {
    font-style: italic;
    color: var(--accent-2);
}

.bridge p {
    font-size: 14.5px;
    line-height: 1.66;
    color: var(--muted);
    max-width: 62ch;
}

.bridge-cta {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    white-space: nowrap;
}

.bridge-cta .arrow {
    transition: transform 220ms ease;
}

.bridge:hover .bridge-cta .arrow {
    transform: translateX(4px);
}

@media (max-width: 760px) {
    .bridge {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
}

/* ---------- Compact Insights post links ---------- */

.post-link {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px 22px;
    background: var(--ink-soft);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, 0.85);
    transition: border-color 200ms ease;
}

.post-link:hover {
    border-color: var(--accent);
}

.post-link-label {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--muted-dark);
    text-transform: uppercase;
}

.post-link-title {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 500;
}

.post-link-title .arrow {
    color: var(--accent);
}

.post-link-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: 4px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-2);
    transition: gap 220ms ease;
}

.post-link-all:hover {
    gap: 14px;
}

/* ---------- Tertiary hero CTA (lower-page / advisory) ---------- */

.cta-tertiary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    transition: gap 220ms ease;
}

.cta-tertiary:hover {
    gap: 14px;
}

/* ---------- Recruiting Capacity Decision Workflow case study ---------- */

.rcdw-hero::before {
    background:
        radial-gradient(circle at 12% 20%, rgba(6, 182, 212, 0.14), transparent 32%),
        radial-gradient(circle at 86% 72%, rgba(244, 114, 182, 0.10), transparent 28%);
}

.rcdw-disclosure {
    max-width: 900px;
    margin-top: 24px;
    padding: 15px 18px;
    border: 1px solid rgba(6, 182, 212, 0.34);
    border-left: 3px solid var(--accent);
    border-radius: var(--radius-sm);
    background: rgba(6, 182, 212, 0.08);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13.5px;
    line-height: 1.62;
}

.rcdw-disclosure strong {
    color: #fff;
}

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

.rcdw-stages .decision:last-child {
    grid-column: span 2;
}

.rcdw-gallery {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-top: 34px;
}

.rcdw-shot {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
}

.rcdw-shot-wide {
    grid-column: span 2;
}

.rcdw-shot a {
    display: block;
    overflow: hidden;
    background: #f6f7f9;
}

.rcdw-shot img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 280ms ease;
}

.rcdw-shot a:hover img {
    transform: scale(1.012);
}

.rcdw-shot figcaption {
    padding: 18px 20px 20px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.62;
}

.rcdw-shot figcaption span {
    display: block;
    margin-bottom: 6px;
    color: var(--accent-2);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.rcdw-brief {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
}

.rcdw-brief > div {
    min-width: 0;
    padding: 22px;
    border-right: 1px solid var(--line);
}

.rcdw-brief > div:last-child {
    border-right: 0;
}

.rcdw-brief span,
.rcdw-brief small {
    display: block;
}

.rcdw-brief span {
    min-height: 32px;
    color: var(--muted);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rcdw-brief strong {
    display: block;
    margin: 7px 0 4px;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 500;
}

.rcdw-brief small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.rcdw-table-wrap {
    margin-top: 34px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper-2);
}

.rcdw-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    text-align: left;
}

.rcdw-table th,
.rcdw-table td {
    padding: 17px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    font-size: 13.5px;
    line-height: 1.55;
}

.rcdw-table thead th {
    color: var(--muted);
    background: rgba(10, 22, 40, 0.035);
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rcdw-table tbody th {
    width: 18%;
    color: var(--ink);
    font-weight: 700;
}

.rcdw-table tbody td {
    color: var(--muted);
}

.rcdw-table tr:last-child th,
.rcdw-table tr:last-child td {
    border-bottom: 0;
}

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

    .rcdw-brief > div:nth-child(2) {
        border-right: 0;
    }

    .rcdw-brief > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 640px) {
    .rcdw-stages,
    .rcdw-gallery {
        grid-template-columns: 1fr;
    }

    .rcdw-stages .decision:last-child,
    .rcdw-shot-wide {
        grid-column: span 1;
    }

    .rcdw-gallery {
        gap: 16px;
    }

    .rcdw-brief {
        grid-template-columns: 1fr;
    }

    .rcdw-brief > div,
    .rcdw-brief > div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .rcdw-brief > div:last-child {
        border-bottom: 0;
    }
}
