@font-face {
    font-family: 'Dirtyline 36daysoftype 2022';
    src: url("assets/Dirtyline36Daysoftype2022/woff/Dirtyline%2036daysoftype%202022.woff2") format("woff2"),
        url("assets/Dirtyline36Daysoftype2022/woff/Dirtyline%2036daysoftype%202022.woff") format("woff"),
        url("assets/Dirtyline36Daysoftype2022/Dirtyline%2036daysoftype%202022.otf") format("opentype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg: #0a0a0a;
    --text: #f4f0e8;
    --muted: #b1aaa1;
    --border: rgba(244, 240, 232, 0.12);
    --accent: #ff5f4a;
    --surface: rgba(255, 255, 255, 0.05);
    --ink: rgba(255, 255, 255, 0.1);
    --font-display: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Geist', 'Plus Jakarta Sans', sans-serif;
    --font-ui: 'Fira Code', monospace;
    --font-project: 'Space Grotesk', 'Geist', sans-serif;
    --font-editorial: 'Fraunces', 'Georgia', serif;
}

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

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.1'/%3E%3C/svg%3E");
    opacity: 1;
}

html,
body {
    width: 100%;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    overflow-y: auto;
    overflow-x: hidden;
    cursor: none !important;
    transition: background 0.4s, color 0.4s;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.75rem 3rem;
    pointer-events: none;
    background: linear-gradient(to bottom, var(--bg) 40%, transparent);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    pointer-events: all;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.3rem;
    text-decoration: none;
    cursor: none;
    background: linear-gradient(to right, var(--accent) var(--scroll-percent, 0%), var(--text) var(--scroll-percent, 0%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    /* fallback */
    transition: background 0.05s linear;
}

.nav-logo:hover {
    background: var(--accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-back-arrow {
    font-family: var(--font-ui);
    font-size: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    cursor: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-back-arrow:hover {
    transform: translateX(-4px);
    opacity: 0.8;
}

/* ─── BLOGS CONTAINER ─── */
.blogs-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.blogs-section {
    width: 100%;
}

.blogs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.blogs-header h2 {
    font-family: var(--font-project);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

/* ─── BLOG LIST ─── */
.blog-list {
    list-style: none;
    border-top: 1px solid var(--border);
}

.blog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
    cursor: none;
    transition: padding 0.3s;
    position: relative;
    z-index: 80;
}

.blog-item:hover {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.blog-item h3 {
    font-family: var(--font-project);
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    transition: color 0.3s;
}

.blog-item:hover h3 {
    color: var(--accent);
}

.blog-date {
    font-size: 0.85rem;
    color: var(--muted);
    font-family: monospace;
}

/* ─── BLOG READING VIEW ─── */
.blog-read-content {
    width: 100%;
}

.blog-read-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-family: monospace;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--muted);
}

.blog-read-date {
    display: inline;
    margin-bottom: 0;
}

.blog-read-reads {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
}

.read-icon {
    font-size: 0.95rem;
}

.blog-read-title {
    font-family: var(--font-project);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 700;
    line-height: 0.95;
    color: var(--text);
    margin-bottom: 3.5rem;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: -0.04em;
    border-top: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    padding: 2rem 0;
}

.blog-read-img {
    display: block;
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    margin: 0 auto 4rem auto;
}

.blog-image-container {
    margin: 3rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
}

.blog-center-img {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    border-radius: 4px;
    object-fit: contain;
    filter: brightness(0.95) contrast(1.05);
}

.blog-image-caption {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 1rem;
    text-align: center;
    font-style: italic;
    max-width: 60ch;
}

.blog-read-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    font-family: var(--font-body);
    opacity: 0.85;
    margin-bottom: 2rem;
}

.blog-read-text a,
.roadmap-desc a {
    color: var(--accent);
    text-decoration: underline;
    transition: opacity 0.25s;
    cursor: none;
    pointer-events: all;
}

.blog-read-text a:hover,
.roadmap-desc a:hover {
    opacity: 0.75;
}

.blog-read-text p {
    margin-bottom: 1.5rem;
}

.blog-read-text h4 {
    font-family: var(--font-project);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.blog-read-text h5 {
    font-family: var(--font-project);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.blog-read-text .blog-lead {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text);
    opacity: 0.95;
    font-weight: 500;
    margin-bottom: 2rem;
}

.blog-read-text .blog-callout {
    background: rgba(255, 95, 74, 0.05);
    border-left: 3px solid var(--accent);
    padding: 1.25rem 1.5rem;
    border-radius: 4px;
    margin: 2rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

.blog-read-text .blog-bullets {
    margin: 1.5rem 0 1.5rem 1.5rem;
    padding: 0;
    list-style-type: square;
}

.blog-read-text .blog-bullets li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

.blog-read-text .blog-bullets li strong {
    color: var(--accent);
}

.blog-read-text .blog-disclaimer {
    font-size: 0.95rem;
    color: var(--muted);
    margin: 2rem 0;
}

.blog-read-text .blog-quote {
    font-family: var(--font-editorial);
    font-size: 1.8rem;
    font-style: italic;
    line-height: 1.4;
    color: var(--accent);
    margin: 2.5rem 0;
    padding-left: 1.5rem;
    border-left: 4px solid var(--text);
}

.encoding-table-container {
    margin: 2rem 0;
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.01);
}

.encoding-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.encoding-table th,
.encoding-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.encoding-table th {
    font-family: var(--font-project);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    width: 25%;
}

.encoding-table td {
    font-family: var(--font-ui);
    color: #64c8ff;
}

.encoding-table tr:last-child th,
.encoding-table tr:last-child td {
    border-bottom: none;
}

.pipeline-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 2.5rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.pipeline-step {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text);
}

.pipeline-step.accented {
    background: rgba(255, 95, 74, 0.1);
    border-color: rgba(255, 95, 74, 0.3);
    color: var(--accent);
}

.pipeline-arrow {
    color: var(--muted);
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .pipeline-diagram {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
    }
}

.execution-diagram {
    display: flex;
    flex-direction: column;
    margin: 2.5rem 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.01);
}

.execution-header {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    font-family: var(--font-ui);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.execution-row {
    display: grid;
    grid-template-columns: 1.2fr 2fr 1fr;
    padding: 0.85rem 1.25rem;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s, border-color 0.2s;
}

.execution-row:last-child {
    border-bottom: none;
}

.execution-row:hover {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.06);
}

.row-num {
    font-family: var(--font-ui);
    color: var(--muted);
    font-size: 0.9rem;
}

.token {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    margin-right: 0.35rem;
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.token.highlight {
    background: rgba(100, 200, 255, 0.08);
    border-color: rgba(100, 200, 255, 0.2);
    color: #64c8ff;
}

.token.target {
    background: rgba(255, 95, 74, 0.08);
    border-color: rgba(255, 95, 74, 0.3);
    color: var(--accent);
}

.blog-read-text .tensor-formula {
    font-family: var(--font-project);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin: 2.5rem 0;
    letter-spacing: 0.05em;
    background: rgba(255, 95, 74, 0.02);
    border-top: 1px solid rgba(255, 95, 74, 0.1);
    border-bottom: 1px solid rgba(255, 95, 74, 0.1);
    padding: 1rem 0;
}

.blog-read-text .dimension-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.blog-read-text .dimension-list li {
    margin-bottom: 1.25rem;
    line-height: 1.6;
    padding-left: 1.5rem;
    position: relative;
}

.blog-read-text .dimension-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.blog-read-text .dim-label {
    color: #64c8ff;
    font-family: var(--font-ui);
    font-size: 1rem;
    margin-right: 0.5rem;
}

.blog-read-text .generation-steps {
    margin: 2rem 0 2rem 1.5rem;
    padding: 0;
}

.blog-read-text .generation-steps li {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text);
    opacity: 0.85;
}

.terminal-container {
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.terminal-header {
    background: #151515;
    padding: 0.6rem 1.2rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.terminal-buttons {
    display: flex;
    gap: 6px;
    margin-right: 1.5rem;
}

.terminal-btn {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.terminal-btn.close {
    background: #ff5f56;
}

.terminal-btn.minimize {
    background: #ffbd2e;
}

.terminal-btn.expand {
    background: #27c93f;
}

.terminal-title {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    font-family: var(--font-ui);
}

.terminal-body {
    padding: 1.25rem;
    margin: 0;
    overflow-x: auto;
}

.terminal-body code {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #a9b1d6;
    background: transparent;
    padding: 0;
}

.roadmap-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2.5rem 0;
}

.roadmap-item {
    position: relative;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.roadmap-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

.roadmap-item.completed {
    border-color: rgba(255, 95, 74, 0.25);
    background: rgba(255, 95, 74, 0.02);
}

.roadmap-item.completed:hover {
    background: rgba(255, 95, 74, 0.04);
    border-color: rgba(255, 95, 74, 0.4);
}

.roadmap-num {
    font-family: var(--font-ui);
    font-weight: 500;
    color: var(--muted);
    font-size: 0.85rem;
}

.roadmap-item.completed .roadmap-num {
    color: var(--accent);
}

.roadmap-title {
    font-family: var(--font-project);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}

.roadmap-desc {
    font-size: 0.9rem;
    color: var(--muted);
    display: block;
}

.roadmap-badge {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
}

.roadmap-item.completed .roadmap-badge {
    background: rgba(255, 95, 74, 0.15);
    color: var(--accent);
}

@media (max-width: 600px) {
    .roadmap-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding-top: 2rem;
    }

    .roadmap-badge {
        top: 0.75rem;
        right: 1rem;
    }
}

.blog-read-text :not(pre) > code {
    font-family: var(--font-ui);
    font-size: 0.9em;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
}

/* ─── CURSOR (Premium Blend) ─── */
#cursor-wrap {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

#cursor-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

#cursor-ring {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px solid #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s ease, height 0.3s ease;
    pointer-events: none;
}

#cursor-label {
    position: absolute;
    left: 24px;
    top: -20px;
    font-family: 'Dirtyline 36daysoftype 2022', 'Plus Jakarta Sans', sans-serif;
    font-style: italic;
    font-size: 1.4rem;
    color: #fff;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#cursor-wrap.hovering #cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
}

#cursor-wrap.hovering #cursor-ring {
    width: 70px;
    height: 70px;
}

#cursor-wrap.hovering-card #cursor-label {
    opacity: 1;
    transform: translateX(0);
}

@media (hover: none),
(pointer: coarse) {
    #cursor-wrap {
        display: none;
    }

    html,
    body {
        cursor: auto !important;
    }
}

/* Follower Images */
.follower-img {
    position: fixed;
    width: auto;
    height: auto;
    max-width: 350px;
    max-height: 350px;
    object-fit: cover;
    border-radius: 4px;
    pointer-events: none;
    z-index: 150;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    filter: grayscale(20%);
}

.follower-img.visible {
    opacity: 1;
    transform: scale(1);
}

@media (max-width: 1024px) {

    /* On touch devices, show the follower image as a centered overlay */
    #img-follower {
        display: block;
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) scale(0.88);
        width: min(75vw, 320px);
        height: auto;
        max-width: min(75vw, 320px);
        max-height: 55vh;
        object-fit: contain;
        border-radius: 12px;
        opacity: 0;
        pointer-events: none;
        z-index: 500;
        transition: opacity 0.25s ease, transform 0.25s ease;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
        filter: none;
        background: rgba(10, 10, 10, 0.6);
    }

    #img-follower.visible {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* ─── INTERACTIVE MATRIX ─── */
.matrix-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin: 3.5rem 0;
    flex-wrap: wrap;
}

.matrix-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.matrix-title {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.matrix-brackets {
    display: flex;
    position: relative;
    padding: 0.5rem 0.75rem;
}

.matrix-brackets::before,
.matrix-brackets::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 6px;
    border: 2px solid var(--muted);
}

.matrix-brackets::before {
    left: 0;
    border-right: none;
    border-radius: 4px 0 0 4px;
}

.matrix-brackets::after {
    right: 0;
    border-left: none;
    border-radius: 0 4px 4px 0;
}

.matrix-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.matrix-cell {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    width: 2.8rem;
    height: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
}

.matrix-cell.masked {
    background: rgba(255, 95, 74, 0.15);
    color: var(--accent);
    font-weight: 600;
}

.matrix-cell.zero {
    color: rgba(255, 255, 255, 0.15);
}

.matrix-cell.one {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-weight: 600;
}

.matrix-arrow {
    font-size: 1.5rem;
    color: var(--accent);
    font-family: var(--font-ui);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.matrix-arrow span {
    font-size: 0.6rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ─── 3D TENSOR VISUALIZATION ─── */
.tensor-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 4rem 0;
    flex-wrap: wrap;
}

.tensor-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.tensor-label {
    font-family: var(--font-project);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

.tensor-3d-scene {
    width: 220px;
    height: 200px;
    perspective: 800px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tensor-3d {
    position: relative;
    width: 140px;
    height: 140px;
    transform-style: preserve-3d;
    transform: rotateX(60deg) rotateY(0deg) rotateZ(-45deg);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.tensor-3d-scene:hover .tensor-3d {
    transform: rotateX(50deg) rotateY(0deg) rotateZ(-30deg) scale(1.05);
}

.tensor-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    background: rgba(12, 12, 12, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    padding: 6px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    transition: border-color 0.5s, box-shadow 0.5s, background 0.5s;
}

.tensor-layer-1 {
    transform: translateZ(0px);
}

.tensor-layer-2 {
    transform: translateZ(35px);
}

.tensor-layer-3 {
    transform: translateZ(70px);
}

.tensor-cell {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.5s, border-color 0.5s;
}

/* Static specifics */
.tensor-static .tensor-layer {
    border-color: rgba(255, 255, 255, 0.12);
}

.tensor-static .tensor-cell {
    background: rgba(255, 255, 255, 0.04);
}

/* Contextual specifics */
.tensor-contextual .tensor-layer {
    border-color: rgba(255, 95, 74, 0.4);
    box-shadow: 0 0 15px rgba(255, 95, 74, 0.1), 0 4px 20px rgba(0, 0, 0, 0.5);
    background: rgba(255, 95, 74, 0.02);
}

.tensor-contextual .tensor-cell {
    background: linear-gradient(135deg, rgba(255, 95, 74, 0.3) 0%, rgba(255, 95, 74, 0.05) 100%);
    border-color: rgba(255, 95, 74, 0.25);
}

.tensor-flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    color: var(--accent);
}

.tensor-flow-arrow span {
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    max-width: 15ch;
    text-align: center;
}

.tensor-axis-label {
    position: absolute;
    font-family: var(--font-ui);
    font-size: 0.55rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

.axis-b {
    transform: translate3d(-35px, 35px, 35px) rotateX(-60deg) rotateZ(45deg);
}

.axis-t {
    transform: translate3d(35px, 145px, 0px) rotateX(-60deg) rotateZ(45deg);
}

.axis-c {
    transform: translate3d(145px, 35px, 0px) rotateX(-60deg) rotateZ(45deg);
}

/* ─── ROADMAP INTERACTIVITY ─── */
.roadmap-item.completed.clickable {
    cursor: none;
}

.roadmap-item.completed.clickable:hover {
    border-color: var(--accent);
    background: rgba(255, 95, 74, 0.03);
    transform: translateX(8px);
}

/* ─── TENSOR PIPELINE PIPES ─── */
.tensor-pipeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pipeline-box {
    font-family: var(--font-ui);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    color: var(--muted);
    text-align: center;
    min-width: 140px;
    transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.pipeline-box:hover {
    border-color: var(--accent);
    background: rgba(255, 95, 74, 0.05);
    color: var(--text);
}

.pipeline-arrow {
    color: var(--accent);
    font-size: 0.8rem;
    line-height: 1;
}

/* ─── 2-TOKEN MATRIX MULTIPLICATION DIAGRAM ─── */
.math-diagram-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 3.5rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.math-diagram-title {
    font-family: var(--font-project);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    border-left: 3px solid var(--accent);
    padding-left: 0.75rem;
    margin-bottom: 0.5rem;
}

.math-diagram-step {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.math-diagram-label {
    font-family: var(--font-ui);
    font-size: 0.75rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 180px;
}

.math-diagram-eqn {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: var(--text);
    flex-wrap: wrap;
}

.matrix-bracket-wrap {
    position: relative;
    padding: 0.5rem 0.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.matrix-bracket-wrap::before,
.matrix-bracket-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    border: 1.5px solid var(--muted);
}

.matrix-bracket-wrap::before {
    left: 0;
    border-right: none;
}

.matrix-bracket-wrap::after {
    right: 0;
    border-left: none;
}

.matrix-grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    text-align: center;
}

.matrix-grid-2x1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    text-align: center;
}

.matrix-grid-1x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    text-align: center;
}

.matrix-element {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.85rem;
}

.matrix-element.highlight-q {
    color: #00f3ff;
    background: rgba(0, 243, 255, 0.05);
}

.matrix-element.highlight-k {
    color: #ff5f4a;
    background: rgba(255, 95, 74, 0.05);
}

.matrix-element.highlight-v {
    color: #ffc83b;
    background: rgba(255, 200, 59, 0.05);
}

/* ─── VECTOR SPACE DIAGRAM ─── */
.vector-space-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 3.5rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    max-width: 500px;
}

.vector-space-title {
    font-family: var(--font-project);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.25rem;
}

.vector-space-desc {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
    margin-bottom: 1rem;
    max-width: 40ch;
}

.vector-space-chart {
    position: relative;
    width: 320px;
    height: 320px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    overflow: hidden;
}

/* Grid background */
.vector-space-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

/* Axes */
.axis-x,
.axis-y {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
}

.axis-x {
    bottom: 40px;
    left: 20px;
    right: 20px;
    height: 1px;
}

.axis-y {
    left: 40px;
    top: 20px;
    bottom: 20px;
    width: 1px;
}

.axis-label {
    position: absolute;
    font-family: var(--font-ui);
    font-size: 0.55rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.label-x {
    bottom: 22px;
    right: 20px;
}

.label-y {
    left: 15px;
    top: 25px;
    transform: rotate(-90deg);
    transform-origin: left top;
}

/* Clusters */
.vector-cluster {
    position: absolute;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.015);
    transition: border-color 0.3s, background 0.3s;
}

.vector-space-chart:hover .vector-cluster {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.025);
}

.cluster-fruits {
    width: 100px;
    height: 100px;
    left: 55px;
    bottom: 55px;
}

.cluster-tech {
    width: 100px;
    height: 100px;
    right: 35px;
    top: 35px;
}

.cluster-title {
    position: absolute;
    font-family: var(--font-ui);
    font-size: 0.6rem;
    color: var(--muted);
    background: #0d0d0d;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.cluster-fruits .cluster-title {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.cluster-tech .cluster-title {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Points */
.vector-point {
    position: absolute;
    font-family: var(--font-ui);
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    pointer-events: none;
}

.vector-point::before {
    content: '';
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
}

.point-orange {
    left: 15px;
    top: 20px;
}

.point-mango {
    left: 50px;
    top: 40px;
}

.point-banana {
    left: 20px;
    top: 65px;
}

.point-samsung {
    left: 15px;
    top: 25px;
}

.point-oneplus {
    left: 45px;
    top: 50px;
}

.point-google {
    left: 20px;
    top: 70px;
}

.point-apple-static {
    left: 65px;
    top: 55px;
    color: var(--text);
    font-weight: 500;
}

.point-apple-static::before {
    background: var(--muted);
}

.point-apple-context {
    left: 35px;
    top: 30px;
    color: var(--accent);
    font-weight: 600;
}

.point-apple-context::before {
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

/* SVG vectors */
.vector-line-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
}

.vector-arrow {
    stroke-width: 2;
    fill: none;
}

.vector-arrow.static-apple {
    stroke: rgba(255, 255, 255, 0.3);
    stroke-dasharray: 4;
}

.vector-arrow.context-apple {
    stroke: var(--accent);
    stroke-width: 2.5;
    filter: drop-shadow(0 0 3px rgba(255, 95, 74, 0.5));
    stroke-dasharray: 300;
    stroke-dashoffset: 300;
    animation: drawVector 1.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 0.6s;
}

.vector-shift-path {
    stroke: rgba(255, 95, 74, 0.25);
    stroke-width: 1.5;
    stroke-dasharray: 3;
    stroke-dashoffset: 100;
    animation: slidePath 2s linear infinite;
}

@keyframes drawVector {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes slidePath {
    to {
        stroke-dashoffset: 0;
    }
}

/* Legend */
.vector-space-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    font-family: var(--font-ui);
    font-size: 0.7rem;
    color: var(--muted);
    width: 100%;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-line {
    width: 20px;
    height: 2px;
}

.legend-line.static {
    border-top: 2px dashed rgba(255, 255, 255, 0.4);
}

.legend-line.contextual {
    background: var(--accent);
    box-shadow: 0 0 4px var(--accent);
}

.legend-line.shift {
    border-top: 2px dotted rgba(255, 95, 74, 0.4);
}

/* ─── GPT-2 BLOCK ARCHITECTURE FLOWCHART ─── */
.arch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 3.5rem auto;
    max-width: 480px;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.arch-title {
    font-family: var(--font-project);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.arch-node {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    text-align: center;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.arch-node.tensor {
    background: rgba(0, 243, 255, 0.05);
    border-color: rgba(0, 243, 255, 0.2);
    color: #00f3ff;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.arch-node.layernorm {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
}

.arch-node.attn {
    background: rgba(255, 95, 74, 0.05);
    border-color: rgba(255, 95, 74, 0.2);
    color: var(--accent);
    font-weight: 600;
}

.arch-node.ffn {
    background: rgba(255, 200, 59, 0.05);
    border-color: rgba(255, 200, 59, 0.2);
    color: #ffc83b;
    font-weight: 600;
}

.arch-node.dropout {
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.8rem;
}

.arch-arrow-down {
    width: 2px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    position: relative;
    margin: 0.25rem 0;
}

.arch-arrow-down::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: -4px;
    /* centered relative to the 2px line (since triangle width is 10px, left offset is (2 - 10)/2 = -4px) */
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.3);
    /* arrow head color */
}

.arch-sublayer-block {
    position: relative;
    width: 100%;
    margin: 0.5rem 0;
    display: flex;
    justify-content: center;
}

.arch-sublayer-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px;
}

/* Residual shortcut loops on the left */
.arch-residual-shortcut {
    position: absolute;
    top: -15px;
    bottom: 16px;
    left: -70px;
    right: 110px;
    /* ends exactly in the center of sublayer-main */
    border-left: 2px solid rgba(255, 95, 74, 0.25);
    border-top: 2px solid rgba(255, 95, 74, 0.25);
    border-bottom: 2px solid rgba(255, 95, 74, 0.25);
    border-radius: 8px 0 0 8px;
    pointer-events: none;
    transition: border-color 0.3s;
    z-index: 1;
}

.arch-sublayer-block:hover .arch-residual-shortcut {
    border-color: var(--accent);
}

.arch-residual-shortcut::after {
    content: '▶';
    position: absolute;
    bottom: -10px;
    right: 13px;
    /* positions the arrow head touching the left edge of the addition node */
    color: var(--accent);
    font-size: 0.65rem;
}

.arch-residual-label {
    position: absolute;
    left: -48px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    font-family: var(--font-ui);
    font-size: 0.55rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    background: var(--bg, #0c0c0c);
    padding: 0 6px;
}

/* Add node */
.arch-add-node {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 95, 74, 0.4);
    background: var(--bg, #0c0c0c);
    /* masks the residual line passing underneath */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent);
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(255, 95, 74, 0.1);
    z-index: 2;
    cursor: default;
}

.arch-sublayer-block:hover .arch-add-node {
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(255, 95, 74, 0.3);
    transform: scale(1.05);
}

/* ─── RESPONSIVE MOBILE REFINEMENTS (PORTRAIT OVERRIDES) ─── */
@media (max-width: 600px) {
    /* 1. Reduce font sizes by ~0.15rem to fit mobile viewports nicely */
    .blog-read-text {
        font-size: 0.95rem !important;
    }
    .blog-read-text h4 {
        font-size: 1.2rem !important;
    }
    .blog-read-text h5 {
        font-size: 1.05rem !important;
    }
    .blog-read-text .blog-lead {
        font-size: 1.1rem !important;
    }

    /* 2. Scrollable KaTeX Block Equations */
    .katex-display {
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        -webkit-overflow-scrolling: touch;
        padding: 0.5rem 0 !important;
    }

    /* 3. Article 2 Causal Masking Matrices */
    .matrix-container {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        width: 100% !important;
        padding-bottom: 1rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .matrix-wrapper, .matrix-arrow {
        flex-shrink: 0 !important;
    }

    /* 4. Article 2 Self Attention Step-by-Step Multiplication */
    .math-diagram-step {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .math-diagram-eqn {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        overflow-x: auto !important;
        width: 100% !important;
        padding-bottom: 0.5rem !important;
        -webkit-overflow-scrolling: touch;
    }
    .math-diagram-eqn > * {
        flex-shrink: 0 !important;
    }

    /* 5. Transpose Interactive Callout Cards */
    .blog-callout-interactive {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    .blog-callout-interactive a,
    .blog-callout-interactive button {
        display: flex !important;
        justify-content: center;
        width: 100% !important;
        box-sizing: border-box;
        text-align: center;
    }
}

/* Callout Cards base styles */
.blog-callout-interactive {
    border-left: 3px solid var(--accent) !important;
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    margin: 2rem 0;
    background: rgba(255, 95, 74, 0.03) !important;
    gap: 1.5rem;
}

.blog-callout-interactive .callout-info {
    flex: 1;
}

.blog-callout-interactive a,
.blog-callout-interactive button {
    background: var(--accent);
    color: #000;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-family: var(--font-ui);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.blog-callout-interactive a:hover,
.blog-callout-interactive button:hover {
    background: #ff7d6b;
    opacity: 1 !important;
}

/* Landscape warning for mobile devices */
.landscape-notice {
    display: none;
    text-align: center;
    font-style: italic;
    color: var(--muted);
    font-size: 0.8rem;
    font-family: var(--font-ui);
    margin-top: -1.25rem;
    margin-bottom: 2rem;
    opacity: 0.75;
}

@media (max-width: 600px) {
    .landscape-notice {
        display: block;
    }
}

/* Topic parent-child list styles */
.blog-topic-container {
    width: 100%;
    margin-top: 1rem;
}

.blog-topic-parent {
    font-family: var(--font-project);
    font-size: clamp(2rem, 5vw, 3.8rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    padding: 1.5rem 0 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.06);
    margin-bottom: 1rem;
}

.blog-topic-children {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-child-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border);
    cursor: none;
    transition: all 0.2s ease-in-out;
}

.blog-child-item:hover {
    padding-left: 2rem;
    padding-right: 2rem;
    background: rgba(255,255,255,0.01);
}

.blog-child-item h4 {
    font-family: var(--font-project);
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    margin: 0;
    transition: color 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-child-item:hover h4 {
    color: var(--accent);
}

.blog-child-date {
    font-size: 0.8rem;
    color: var(--muted);
    font-family: var(--font-ui);
    margin-left: 1rem;
    white-space: nowrap;
}

/* ─── ESP32 IMAGE COLLAGE ─── */
.esp32-collage-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 3rem 0;
    width: 100%;
}

.esp32-collage-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    aspect-ratio: 4 / 3; /* Crops out top and bottom of vertical photos, zooming on center screen */
}

.esp32-collage-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease, filter 0.4s ease;
    filter: brightness(0.9);
    cursor: none !important;
}

.esp32-collage-item img:hover {
    transform: scale(1.05);
    filter: brightness(1);
}

/* Force disable default cursors for interactive items to avoid overlaps with custom cursor */
a, button, input[type="range"], .esp32-collage-item img, #blueprint-modal img, #carousel-preview-modal img {
    cursor: none !important;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .esp32-collage-container {
        grid-template-columns: 1fr; /* Stack vertically on mobile */
        gap: 15px;
    }
    .esp32-collage-item {
        aspect-ratio: 16 / 9; /* Wider banner-style crop on mobile */
    }
}