@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;
}
::-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-date {
    font-family: monospace;
    color: var(--muted);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
    display: block;
    text-align: center;
}

.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 {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 4rem;
}

.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 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);
    }
}
