@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,700;12..96,800&family=DM+Sans:ital,wght@0,300;0,400;0,500;1,300&family=Geist+Mono:wght@400;500;600&display=swap');

/* ─── Design Tokens ───────────────────────────────────────── */
:root {
    --bg:        #07080b;
    --surface:   #0b0d11;
    --raised:    #111318;
    --rim:       #181b22;
    --rim-up:    #232736;

    --ink:       #eef0ff;
    --ink-2:     #7e86a3;
    --ink-3:     #3d4259;

    --lime:      #c8f400;
    --lime-glow: rgba(200, 244, 0, 0.15);
    --lime-edge: rgba(200, 244, 0, 0.2);

    --fuchsia:   #f06af9;
    --fuch-glow: rgba(240, 106, 249, 0.12);
    --fuch-edge: rgba(240, 106, 249, 0.2);

    --orange:    #ff7b4e;
    --orng-glow: rgba(255, 123, 78, 0.12);
    --orng-edge: rgba(255, 123, 78, 0.2);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --t:    200ms;
}

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ─── Base ────────────────────────────────────────────────── */
body {
    background: var(--bg);
    color: var(--ink);
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Noise grain overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    opacity: 0.022;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 160px 160px;
    pointer-events: none;
    z-index: 0;
}

/* Accent top bar */
body::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--lime) 30%,
        var(--lime) 70%,
        transparent 100%);
    opacity: 0.7;
    z-index: 999;
}

/* ─── Layout ──────────────────────────────────────────────── */
.container {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
    padding: 72px 32px 140px;
}

/* ─── Header ──────────────────────────────────────────────── */
.site-header {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--rim);
    animation: drop 0.55s var(--ease) both;
}

.site-title {
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--lime);
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-title::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 2px;
    background: var(--lime);
    box-shadow: 0 0 6px var(--lime);
}

.site-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--lime-edge), transparent);
}

.site-tagline {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--ink);
    margin-top: 20px;
    animation: drop 0.55s var(--ease) 0.1s both;
}

.site-tagline em {
    font-style: normal;
    color: var(--ink-3);
    font-weight: 500;
}

/* ─── Feed ────────────────────────────────────────────────── */
.feed { position: relative; }

/* ─── Post ────────────────────────────────────────────────── */
.post {
    position: relative;
    padding: 56px 0 56px 0;
    border-bottom: 1px solid var(--rim);
    opacity: 0;
    animation: rise 0.5s var(--ease) forwards;
}

.post:last-child { border-bottom: none; }

/* Hover left accent */
.post::before {
    content: '';
    position: absolute;
    left: -32px;
    top: 56px;
    bottom: 56px;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--lime), transparent);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.35s var(--ease);
}

.post:hover::before { transform: scaleY(1); }

/* Big faded index number watermark */
.post-index {
    position: absolute;
    top: 40px;
    right: -4px;
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 96px;
    font-weight: 800;
    line-height: 1;
    color: var(--ink);
    opacity: 0.028;
    pointer-events: none;
    user-select: none;
    letter-spacing: -0.05em;
    transition: opacity var(--t) var(--ease);
}

.post:hover .post-index { opacity: 0.05; }

/* ─── Post Header ─────────────────────────────────────────── */
.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

/* Category chip */
.post-category {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 11px;
    border-radius: 3px;
    color: var(--chip-color);
    background: var(--chip-bg);
    border: 1px solid var(--chip-border);
    transition: background var(--t) var(--ease);
    user-select: none;
}

.post-category:hover { background: var(--chip-border); }

.category-ai {
    --chip-color:  var(--lime);
    --chip-bg:     var(--lime-glow);
    --chip-border: var(--lime-edge);
}

.category-mobile {
    --chip-color:  var(--fuchsia);
    --chip-bg:     var(--fuch-glow);
    --chip-border: var(--fuch-edge);
}

.category-news {
    --chip-color:  var(--orange);
    --chip-bg:     var(--orng-glow);
    --chip-border: var(--orng-edge);
}

/* Date */
.post-date {
    font-family: 'Geist Mono', monospace;
    font-size: 10.5px;
    color: var(--ink-3);
    letter-spacing: 0.04em;
}

/* ─── Post Title ──────────────────────────────────────────── */
.post-title {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: var(--ink);
    margin-bottom: 26px;
    transition: color var(--t) var(--ease);
    max-width: 560px;
}

.post:hover .post-title { color: #fff; }

/* ─── Hero Image ──────────────────────────────────────────── */
.post-image {
    margin-bottom: 28px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--rim-up);
}

.post-image img {
    width: 100%;
    height: 234px;
    object-fit: cover;
    display: block;
    filter: brightness(0.78) saturate(0.9);
    transition: filter 0.4s var(--ease);
}

.post:hover .post-image img { filter: brightness(0.92) saturate(1); }

/* ─── Post Content ────────────────────────────────────────── */
.post-content {
    font-size: 15.5px;
    line-height: 1.82;
    color: var(--ink-2);
    font-weight: 300;
}

.post-content p            { margin-bottom: 18px; }
.post-content p:last-child { margin-bottom: 0; }

.post-content h2 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--ink);
    margin: 38px 0 12px;
    letter-spacing: -0.02em;
}

.post-content h3 {
    font-family: 'Bricolage Grotesque', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    margin: 26px 0 8px;
}

.post-content a {
    color: var(--lime);
    text-decoration: none;
    border-bottom: 1px solid var(--lime-edge);
    transition: border-color var(--t) var(--ease), opacity var(--t) var(--ease);
}

.post-content a:hover { opacity: 0.75; border-bottom-color: var(--lime); }

.post-content strong {
    color: var(--ink);
    font-weight: 600;
}

.post-content em {
    font-style: italic;
    color: var(--ink-3);
}

.post-content ul,
.post-content ol {
    padding-left: 20px;
    margin-bottom: 18px;
}

.post-content li            { margin-bottom: 7px; }
.post-content li strong     { color: var(--lime); font-weight: 600; }

.post-content code {
    font-family: 'Geist Mono', monospace;
    font-size: 12.5px;
    background: var(--raised);
    color: var(--lime);
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid var(--rim-up);
}

.post-content pre {
    background: var(--surface);
    border: 1px solid var(--rim-up);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin-bottom: 18px;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: var(--ink-2);
    font-size: 13px;
}

.post-content hr {
    border: none;
    border-top: 1px solid var(--rim);
    margin: 32px 0;
}

.post-content blockquote {
    border-left: 2px solid var(--lime);
    padding: 4px 0 4px 20px;
    color: var(--ink-3);
    font-style: italic;
    margin: 24px 0;
}

.post-content img {
    max-width: 100%;
    border-radius: 6px;
    border: 1px solid var(--rim);
}


/* ─── Share Bar ───────────────────────────────────────────── */
.post-share {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 38px;
    padding-top: 26px;
    border-top: 1px solid var(--rim);
}

.share-label {
    font-family: 'Geist Mono', monospace;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-right: 6px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    color: var(--ink-3);
    border: 1px solid var(--rim);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--t) var(--ease);
    flex-shrink: 0;
}

.share-btn svg { width: 14px; height: 14px; }

.share-btn:hover { border-color: var(--rim-up); color: var(--ink-2); background: var(--raised); }

.share-twitter:hover  { color: #1d9bf0; border-color: rgba(29,155,240,0.35);  background: rgba(29,155,240,0.06);  }
.share-linkedin:hover { color: #0a66c2; border-color: rgba(10,102,194,0.35);  background: rgba(10,102,194,0.06);  }
.share-facebook:hover { color: #1877f2; border-color: rgba(24,119,242,0.35);  background: rgba(24,119,242,0.06);  }

.share-copy:hover,
.share-copy.copied { color: var(--lime); border-color: var(--lime-edge); background: var(--lime-glow); }

/* ─── Loader ──────────────────────────────────────────────── */
.loading-indicator {
    display: none;
    justify-content: center;
    padding: 72px 0;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--rim-up);
    border-top-color: var(--lime);
    border-radius: 50%;
    animation: spin 0.65s linear infinite;
}

/* ─── Empty State ─────────────────────────────────────────── */
.no-posts {
    text-align: center;
    padding: 80px 0;
    color: var(--ink-3);
    font-family: 'Geist Mono', monospace;
    font-size: 13px;
}

/* ─── Keyframes ───────────────────────────────────────────── */
@keyframes drop {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Post Modal ──────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 8, 11, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 20px 80px;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s var(--ease);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-box {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--rim-up);
    border-radius: 14px;
    max-width: 700px;
    width: 100%;
    padding: 52px 48px 48px;
    transform: translateY(24px);
    transition: transform 0.3s var(--ease);
    box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}

.modal-overlay.open .modal-box {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: 1px solid var(--rim);
    color: var(--ink-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t) var(--ease);
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--raised);
    border-color: var(--rim-up);
    color: var(--ink);
}

.modal-close svg { width: 14px; height: 14px; }

.modal-content .post {
    border-bottom: none;
    padding-top: 0;
    animation: none;
    opacity: 1;
}

.modal-content .post::before { display: none; }

@media (max-width: 640px) {
    .modal-overlay { padding: 20px 12px 60px; }
    .modal-box { padding: 40px 24px 36px; }
}

/* ─── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar       { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--rim-up);
    border-radius: 3px;
    border: 2px solid var(--bg);
}

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .container  { padding: 52px 20px 100px; }

    .site-header { margin-bottom: 56px; padding-bottom: 36px; }
    .site-tagline { font-size: 30px; }

    .post        { padding: 44px 0; }
    .post::before { left: -20px; top: 44px; bottom: 44px; }

    .post-index  { font-size: 72px; top: 28px; }

    .post-title  { font-size: 23px; }

    .post-content { font-size: 14.5px; }

    .post-image img { height: 180px; }

    .share-btn { width: 30px; height: 30px; }
    .share-btn svg { width: 13px; height: 13px; }
}
