/* ============================================
   DATA MINERS — STYLE SYSTEM v6.0
   Theme: Deep seam. Ore gold meets signal blue.
   Built on the Two Stack AI structural system,
   re-grounded in the Data Miners lattice identity.
   ============================================ */

:root {
    /* Ground — the seam */
    --bg-deep: #070b16;
    --bg-dark: #0a1020;
    --bg-card: #101731;
    --bg-card-hover: #16203f;
    --bg-surface: #0d1428;

    /* Ore stack (gold — from the Data Miners lattice mark) */
    --ore-500: #d19020;
    --ore-400: #e9a838;
    --ore-300: #f6c76e;
    --ore-glow: rgba(209, 144, 32, 0.25);

    /* Signal stack (blue — analytics, telemetry) */
    --signal-500: #1f95e0;
    --signal-400: #4fbcf5;
    --signal-300: #8ad6ff;
    --signal-glow: rgba(31, 149, 224, 0.25);

    /* Fusion */
    --fusion-white: #fff8e8;
    --fusion-glow: rgba(255, 248, 232, 0.6);

    /* Status */
    --pos: #3fbf7f;
    --neg: #e0603f;

    /* Neutrals */
    --text-primary: #e7ecf6;
    --text-secondary: #8d97b2;
    --text-muted: #5b6584;
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.14);

    /* Typography */
    --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

    /* Layout */
    --section-pad: 100px;
    --container-max: 1200px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background: var(--bg-deep);
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
}

/* Hex lattice canvas — the Data Miners signature */
#lattice-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.5;
}

a { color: var(--signal-400); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--signal-300); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid var(--ore-400);
    outline-offset: 3px;
    border-radius: 4px;
}

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.accent { color: var(--signal-400); }
.accent-ore { color: var(--ore-400); }

.accent-glow {
    background: linear-gradient(120deg, var(--ore-400), var(--fusion-white), var(--signal-400));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Navigation --- */
.main-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.4s var(--ease-out);
    background: transparent;
}

.main-nav.scrolled {
    background: rgba(7, 11, 22, 0.93);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo { display: flex; align-items: center; gap: 11px; margin-right: 30px; flex-shrink: 0; }
.main-nav.scrolled .brand-tag { opacity: 0.75; }

.brand-mark { width: 34px; height: 34px; flex-shrink: 0; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1; }

.brand-name {
    font-family: var(--font-display);
    font-size: 1.06rem;
    font-weight: 700;
    letter-spacing: 0.11em;
    color: var(--text-primary);
    white-space: nowrap;
}

.brand-tag {
    font-family: var(--font-mono);
    font-size: 0.485rem;
    font-weight: 500;
    letter-spacing: 0.235em;
    color: var(--ore-400);
    margin-top: 5px;
    white-space: nowrap;
}

.footer-brandmark { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.footer-brandmark .brand-mark { width: 40px; height: 40px; }
.footer-brandmark .brand-name { font-size: 1.16rem; }
.footer-brandmark .brand-tag { font-size: 0.52rem; }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-links a {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 11px;
    border-radius: 8px;
    transition: all 0.3s;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-cta {
    background: linear-gradient(120deg, var(--ore-500), var(--signal-500)) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    margin-left: 8px;
    border-radius: 8px !important;
}

.nav-cta:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--ore-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-primary);
    transition: 0.3s;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 30px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s var(--ease-out);
    letter-spacing: 0.2px;
}

.btn-primary {
    background: linear-gradient(120deg, var(--ore-500), var(--signal-500));
    color: #fff;
}
.btn-primary:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 34px rgba(209, 144, 32, 0.28);
}

.btn-ghost {
    background: rgba(255,255,255,0.03);
    border-color: var(--border-hover);
    color: var(--text-primary);
}
.btn-ghost:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--signal-400);
    color: var(--text-primary);
}

.btn-lg { padding: 16px 40px; font-size: 1.05rem; }
.btn-full { width: 100%; justify-content: center; }

/* --- Sections --- */
.section { padding: var(--section-pad) 0; position: relative; z-index: 1; }

.section-header {
    max-width: 760px;
    margin: 0 auto 56px;
    text-align: center;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 1.6px;
    color: var(--ore-400);
    margin-bottom: 16px;
    padding: 5px 12px;
    border: 1px solid rgba(209, 144, 32, 0.3);
    border-radius: 4px;
    background: rgba(209, 144, 32, 0.06);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4.4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 18px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -10%; left: 50%;
    transform: translateX(-50%);
    width: 1100px; height: 700px;
    background: radial-gradient(ellipse at center,
        rgba(31, 149, 224, 0.14) 0%,
        rgba(209, 144, 32, 0.10) 38%,
        transparent 68%);
    pointer-events: none;
    z-index: 0;
}

.hero-content { position: relative; z-index: 2; width: 100%; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 1.2px;
    color: var(--text-secondary);
    border: 1px solid var(--border-hover);
    background: rgba(255,255,255,0.03);
    padding: 7px 16px;
    border-radius: 40px;
    margin-bottom: 28px;
}
.hero-eyebrow .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--ore-400);
    box-shadow: 0 0 10px var(--ore-400);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 6.2vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 26px;
    max-width: 15ch;
}
.hero-title .title-line { display: block; }

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 62ch;
    line-height: 1.75;
    margin-bottom: 40px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 72px; }

.hero-stats {
    display: flex;
    align-items: center;
    gap: 36px;
    flex-wrap: wrap;
    padding-top: 36px;
    border-top: 1px solid var(--border);
}

.stat { display: flex; flex-direction: column; }
.stat-value {
    font-family: var(--font-mono);
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.stat-label {
    font-size: 0.83rem;
    color: var(--text-muted);
    letter-spacing: 0.2px;
    margin-top: 6px;
}
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* --- Page hero (inner pages) --- */
.page-hero {
    padding: 170px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 900px; height: 420px;
    background: radial-gradient(ellipse at center, rgba(31,149,224,0.12), transparent 70%);
    pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }

.page-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin: 14px 0 18px;
}

.page-hero-desc {
    font-size: 1.08rem;
    color: var(--text-secondary);
    max-width: 68ch;
    margin: 0 auto;
    line-height: 1.75;
}

/* --- Capability grid (the two stacks) --- */
.fusion-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 28px;
    align-items: center;
}

.fusion-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 34px;
    transition: all 0.4s var(--ease-out);
}
.fusion-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.fusion-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: -0.01em;
}
.fusion-card > p { color: var(--text-secondary); margin-bottom: 22px; font-size: 0.97rem; }

.fusion-icon { margin-bottom: 22px; }
.stack-data .fusion-icon { color: var(--ore-400); }
.stack-ai .fusion-icon { color: var(--signal-400); }
.stack-data { border-top: 2px solid var(--ore-500); }
.stack-ai { border-top: 2px solid var(--signal-500); }

.fusion-list { list-style: none; }
.fusion-list li {
    padding: 9px 0 9px 22px;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.93rem;
    border-top: 1px solid var(--border);
}
.fusion-list li::before {
    content: '';
    position: absolute;
    left: 0; top: 17px;
    width: 8px; height: 8px;
    background: currentColor;
    opacity: 0.5;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.stack-data .fusion-list li::before { color: var(--ore-400); opacity: 1; }
.stack-ai .fusion-list li::before { color: var(--signal-400); opacity: 1; }

.fusion-spark { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.spark-orb {
    width: 74px; height: 74px;
    display: grid;
    place-items: center;
    color: var(--fusion-white);
    background: radial-gradient(circle at 50% 40%, rgba(255,248,232,0.16), rgba(209,144,32,0.10) 55%, transparent 75%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    border: 0;
    animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}
.spark-label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 2px;
    color: var(--text-muted);
}

/* --- Services / solutions grid --- */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 24px;
}

.solution-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px 30px;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
}
.solution-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.solution-mark {
    width: 40px; height: 44px;
    margin-bottom: 20px;
    color: var(--ore-400);
}

.solution-card h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.solution-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-link {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--signal-400);
    display: inline-block;
}
.solution-card:hover .card-link,
.showcase-card:hover .card-link { color: var(--signal-300); }

/* --- Work cards: image panel + text panel, side by side --- */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.work-card {
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
}
.work-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(0,0,0,0.4);
}

.work-card.lead {
    grid-column: span 2;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
}

.work-img {
    position: relative;
    background: var(--bg-surface);
    overflow: hidden;
    min-height: 240px;
    border-right: 1px solid var(--border);
}
/* Absolutely positioned so a tall source image can't stretch the card */
.work-img img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.6s var(--ease-out);
}
.work-card:hover .work-img img { transform: scale(1.035); }

/* Wide dashboard graphics get contained rather than cropped */
.work-img.fit img {
    top: 18px; left: 18px;
    width: calc(100% - 36px);
    height: calc(100% - 36px);
    object-fit: contain;
    border-radius: 5px;
}
.work-card:hover .work-img.fit img { transform: none; }

.work-info { padding: 32px 32px 30px; display: flex; flex-direction: column; justify-content: center; }

.work-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 1.4px;
    color: var(--ore-400);
    margin-bottom: 11px;
}

.work-info h3 {
    font-family: var(--font-display);
    font-size: 1.42rem;
    font-weight: 600;
    letter-spacing: -0.018em;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.work-card.lead .work-info h3 { font-size: 1.62rem; }

.work-info p { color: var(--text-secondary); font-size: 0.96rem; margin-bottom: 18px; }

.work-metric {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--signal-300);
    padding-top: 15px;
    border-top: 1px solid var(--border);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
}

/* --- Showcase grid (homepage projects) --- */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

.showcase-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: all 0.4s var(--ease-out);
}
.showcase-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.45);
}

.showcase-card.is-lead { grid-column: span 2; min-height: 380px; }

.showcase-img-wrap { position: absolute; inset: 0; }
.showcase-img { width: 100%; height: 100%; object-fit: cover; object-position: top left; opacity: 0.42; transition: all 0.6s var(--ease-out); }
.showcase-card:hover .showcase-img { opacity: 0.6; transform: scale(1.03); }

.showcase-overlay {
    position: relative;
    z-index: 2;
    padding: 30px 28px 28px;
    background: linear-gradient(to top, rgba(7,11,22,0.99) 20%, rgba(7,11,22,0.94) 60%, rgba(7,11,22,0.25) 100%);
}

.showcase-cat {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 1.3px;
    color: var(--ore-300);
    margin-bottom: 10px;
}

.showcase-overlay h3 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 600;
    margin-bottom: 9px;
    color: #fff;
    letter-spacing: -0.015em;
}
.showcase-overlay p { font-size: 0.92rem; color: var(--text-secondary); line-height: 1.6; }

.showcase-metric {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--signal-300);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-variant-numeric: tabular-nums;
}

/* --- Featured projects (projects page) --- */
.featured-projects { display: grid; gap: 24px; }

.featured-card {
    display: grid;
    grid-template-columns: 380px 1fr;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
}
.featured-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.featured-img { min-height: 260px; background: var(--bg-surface); overflow: hidden; }
.featured-img img { width: 100%; height: 100%; object-fit: cover; }
.featured-img.fit { display: grid; place-items: center; padding: 18px; background: var(--bg-surface); }
.featured-img.fit img { object-fit: contain; border-radius: 6px; }

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

.featured-cat {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 1.4px;
    color: var(--ore-400);
    margin-bottom: 12px;
}

.featured-info h3 {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.featured-info p { color: var(--text-secondary); margin-bottom: 20px; font-size: 0.98rem; }

.featured-facts {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-bottom: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.featured-fact { display: flex; flex-direction: column; }
.featured-fact b {
    font-family: var(--font-mono);
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--signal-300);
    font-variant-numeric: tabular-nums;
}
.featured-fact span { font-size: 0.76rem; color: var(--text-muted); margin-top: 2px; }

/* --- Portfolio grid --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    display: flex;
    flex-direction: column;
}
.project-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.project-img-wrap { position: relative; height: 170px; overflow: hidden; background: var(--bg-surface); }
.project-img { width: 100%; height: 100%; object-fit: cover; opacity: 0.82; transition: all 0.5s var(--ease-out); }
.project-card:hover .project-img { opacity: 1; transform: scale(1.05); }

.project-img-wrap.fit { padding: 12px; background: var(--bg-surface); }
.project-img-wrap.fit .project-img { object-fit: contain; opacity: 1; }
.project-card:hover .project-img-wrap.fit .project-img { transform: none; }

.project-flag {
    position: absolute;
    top: 12px; right: 12px;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    letter-spacing: 1px;
    color: var(--ore-300);
    background: rgba(7,11,22,0.88);
    backdrop-filter: blur(8px);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(209,144,32,0.4);
}

.filter-empty {
    display: none;
    text-align: center;
    color: var(--text-muted);
    padding: 50px 20px;
}

.project-cat {
    position: absolute;
    top: 12px; left: 12px;
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.9px;
    color: var(--text-primary);
    background: rgba(7,11,22,0.85);
    backdrop-filter: blur(8px);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.project-info { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.project-info h3 {
    font-family: var(--font-display);
    font-size: 1.03rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.project-info .card-link { font-size: 0.83rem; margin-top: auto; }

/* --- Blog / article index --- */
.blog-list { display: grid; gap: 0; border-top: 1px solid var(--border); }

.blog-row {
    display: grid;
    grid-template-columns: 128px 1fr auto;
    gap: 26px;
    align-items: center;
    padding: 22px 16px;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s var(--ease-out);
}
.blog-row:hover { background: rgba(255,255,255,0.026); padding-left: 24px; }

.blog-thumb { width: 128px; height: 78px; border-radius: 8px; overflow: hidden; background: var(--bg-surface); }
.blog-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.blog-row:hover .blog-thumb img { opacity: 1; }

.blog-main h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
    letter-spacing: -0.01em;
}
.blog-main p { font-size: 0.9rem; color: var(--text-secondary); max-width: 76ch; }

.blog-meta {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.blog-meta .blog-cat { color: var(--ore-400); }

.blog-flag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: var(--ore-300);
    border: 1px solid rgba(209,144,32,0.35);
    background: rgba(209,144,32,0.08);
    padding: 2px 8px;
    border-radius: 3px;
    margin-left: 10px;
    vertical-align: 3px;
}

/* --- Article --- */
.breadcrumb {
    padding: 18px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    font-size: 0.86rem;
    position: relative;
    z-index: 1;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--signal-400); }
.bc-sep { color: var(--text-muted); margin: 0 10px; }
.bc-current { color: var(--text-primary); }

.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 56px;
    align-items: start;
}

.article-body { min-width: 0; }

.article-body h2 {
    font-family: var(--font-display);
    font-size: 1.72rem;
    font-weight: 700;
    margin: 52px 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.02em;
}
.article-body h2:first-child { margin-top: 0; }

.article-body h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 32px 0 12px;
}

.article-body p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 1.01rem;
    line-height: 1.8;
    max-width: 74ch;
}
.article-body p strong { color: var(--text-primary); font-weight: 600; }

.article-hero-img, .article-img {
    margin: 0 0 34px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}
.article-img { margin: 34px 0; }
.article-inline-img { width: 100%; display: block; }

.article-caption {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}

.feature-grid { display: grid; gap: 2px; margin-bottom: 20px; }
.feature-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.feature-bullet {
    width: 10px; height: 11px;
    flex-shrink: 0;
    margin-top: 9px;
    background: var(--ore-400);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.feature-item p { margin: 0; font-size: 0.96rem; }

.tech-stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.tech-stack-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 22px;
}
.tech-stack-card h4 {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--signal-400);
}
.tech-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.tech-pills span {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 5px;
}

/* Metric strip inside articles */
.metric-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin: 30px 0 34px;
}
.metric-cell { background: var(--bg-card); padding: 22px 20px; }
.metric-cell b {
    display: block;
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--ore-300);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
.metric-cell span { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 7px; }

.article-sidebar { position: sticky; top: 100px; display: grid; gap: 20px; }

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 26px;
}
.sidebar-card h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
}
.sidebar-card > p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 18px; }

.sidebar-detail {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-top: 1px solid var(--border);
    font-size: 0.87rem;
}
.detail-label { color: var(--text-muted); flex-shrink: 0; }
.detail-value { color: var(--text-primary); text-align: right; }

.sidebar-links { display: grid; gap: 2px; }
.sidebar-links a {
    display: block;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-secondary);
}
.sidebar-links a:hover { color: var(--signal-400); }

/* --- Industries --- */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}
.industry-cell {
    background: var(--bg-card);
    padding: 26px 22px;
    transition: background 0.3s;
}
.industry-cell:hover { background: var(--bg-card-hover); }
.industry-cell h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 7px;
}
.industry-cell p { font-size: 0.86rem; color: var(--text-secondary); }

/* --- CTA --- */
.cta-section { padding-bottom: 120px; }
.cta-box {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
    border: 1px solid var(--border-hover);
    border-radius: 22px;
    padding: 68px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-box::before {
    content: '';
    position: absolute;
    top: -60%; left: 50%;
    transform: translateX(-50%);
    width: 760px; height: 480px;
    background: radial-gradient(ellipse at center, var(--ore-glow), transparent 68%);
    pointer-events: none;
}
.cta-box > * { position: relative; z-index: 1; }
.cta-box h2 {
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.6vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.cta-box p { color: var(--text-secondary); margin-bottom: 32px; font-size: 1.04rem; }

/* --- Contact --- */
.contact-layout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }

.contact-form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: grid; gap: 8px; }
.form-field label { font-size: 0.86rem; color: var(--text-secondary); font-family: var(--font-display); font-weight: 500; }
.form-field input, .form-field textarea, .form-field select {
    background: var(--bg-card);
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    padding: 13px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    width: 100%;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus, .form-field select:focus {
    border-color: var(--signal-400);
    outline: none;
    box-shadow: 0 0 0 3px rgba(31,149,224,0.14);
}

.contact-aside { display: grid; gap: 20px; }

/* --- Form feedback & validation --- */
.form-status {
    display: none;
    padding: 15px 18px;
    border-radius: 10px;
    font-size: 0.94rem;
    margin-bottom: 22px;
    border: 1px solid transparent;
}
.form-status.is-pending {
    display: block;
    background: rgba(79, 188, 245, 0.08);
    border-color: rgba(79, 188, 245, 0.3);
    color: var(--signal-300);
}
.form-status.is-success {
    display: block;
    background: rgba(63, 191, 127, 0.09);
    border-color: rgba(63, 191, 127, 0.34);
    color: #7fd9aa;
}
.form-status.is-error {
    display: block;
    background: rgba(224, 96, 63, 0.09);
    border-color: rgba(224, 96, 63, 0.34);
    color: #f0947a;
}

.form-field .req { color: var(--ore-400); }

.form-field input.has-error,
.form-field textarea.has-error {
    border-color: rgba(224, 96, 63, 0.7);
    box-shadow: 0 0 0 3px rgba(224, 96, 63, 0.12);
}

.field-error {
    font-size: 0.82rem;
    color: #f0947a;
    margin-top: -2px;
}

.form-note { font-size: 0.87rem; color: var(--text-muted); margin-top: 4px; }

.contact-form > .btn { justify-self: start; }

.form-success {
    background: var(--bg-card);
    border: 1px solid rgba(63, 191, 127, 0.32);
    border-radius: 16px;
    padding: 42px 38px;
    color: var(--text-secondary);
}
.form-success[hidden] { display: none; }
.form-success svg { color: var(--pos); margin-bottom: 18px; }
.form-success h2 {
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 14px;
}
.form-success p { font-size: 0.98rem; margin-bottom: 14px; max-width: 60ch; }
.form-success-alt { font-size: 0.9rem; color: var(--text-muted); }
.form-success-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Honeypot — off-screen rather than display:none, which some bots detect */
.form-trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Team --- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}
.team-photo {
    width: 96px; height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 18px;
    display: block;
    border: 2px solid var(--border-hover);
}
.team-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 600; margin-bottom: 5px; }
.team-role { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ore-400); margin-bottom: 12px; }
.team-card p { font-size: 0.9rem; color: var(--text-secondary); }

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
    padding: 64px 24px 30px;
    position: relative;
    z-index: 1;
}
.footer-grid {
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 44px;
}
.footer-logo { height: 38px; width: auto; margin-bottom: 18px; }
.footer-tagline { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.7; margin-bottom: 20px; max-width: 34ch; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text-secondary);
    transition: all 0.3s;
}
.footer-socials a:hover { color: var(--signal-400); border-color: var(--border-hover); background: rgba(255,255,255,0.04); }

.footer-col h4 {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}
.footer-col a { display: block; padding: 6px 0; color: var(--text-secondary); font-size: 0.9rem; }
.footer-col a:hover { color: var(--signal-400); }

.footer-bottom { max-width: var(--container-max); margin: 44px auto 0; }
.footer-line { height: 1px; background: var(--border); margin-bottom: 22px; }
.footer-bottom p { color: var(--text-muted); font-size: 0.83rem; text-align: center; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .article-sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); }
    .featured-card { grid-template-columns: 300px 1fr; }
    .work-grid { grid-template-columns: minmax(0, 1fr); }
    .work-card, .work-card.lead { grid-column: span 1; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .showcase-card.is-lead { grid-column: span 1; min-height: 320px; }
}

@media (max-width: 1180px) and (min-width: 861px) {
    .brand-tag { display: none; }
    .nav-logo { margin-right: 18px; }
    .nav-links a { padding: 8px 9px; font-size: 0.84rem; }
}

@media (max-width: 860px) {
    :root { --section-pad: 70px; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed;
        top: 68px; left: 16px; right: 16px;
        flex-direction: column;
        align-items: stretch;
        background: rgba(10, 16, 32, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid var(--border-hover);
        border-radius: 14px;
        padding: 14px;
        gap: 2px;
        display: none;
        max-height: 78vh;
        overflow-y: auto;
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 16px; }
    .nav-cta { text-align: center; margin-top: 8px; }

    .fusion-grid { grid-template-columns: 1fr; }
    .fusion-spark { flex-direction: row; padding: 6px 0; }

    .featured-card { grid-template-columns: 1fr; }
    .featured-img { min-height: 210px; }
    .work-card, .work-card.lead { grid-template-columns: minmax(0, 1fr); }
    .work-img { min-height: 190px; border-right: 0; border-bottom: 1px solid var(--border); }
    .work-info { padding: 26px 24px; }
    .brand-name { font-size: 0.95rem; }
    .brand-tag { font-size: 0.44rem; }
    .featured-info { padding: 28px 24px; }

    .blog-row { grid-template-columns: 92px 1fr; gap: 16px; padding: 18px 8px; }
    .blog-thumb { width: 92px; height: 62px; }
    .blog-meta { grid-column: 2; text-align: left; flex-direction: row; gap: 12px; }

    .hero { min-height: auto; padding: 120px 0 60px; }
    .hero-actions { margin-bottom: 48px; }
    .hero-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 18px; }
    .stat-divider { display: none; }
    .stat-value { font-size: 1.6rem; }

    .form-row { grid-template-columns: 1fr; }
    .cta-box { padding: 48px 26px; }
    .footer-grid { grid-template-columns: 1fr; }
    .page-hero { padding: 130px 0 44px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
    #lattice-bg { display: none; }
}
