/* ./static/css/content.css */
/* Anonyxghost — Blog Page (Fully responsive with flex, no media queries) */

/* ─── Tokens ───────────────────────────────────────────────────────────── */
:root {
    --bg:           #0c0c0e;
    --bg-card:      #141417;
    --bg-raised:    #1a1a1f;
    --bg-hover:     #1f1f26;
    --border:       rgba(255,255,255,0.07);
    --border-light: rgba(255,255,255,0.12);
    --accent:       #c8ff3e;
    --accent-dim:   rgba(200,255,62,0.12);
    --accent-glow:  rgba(200,255,62,0.25);
    --text-1:       #f2f2f4;
    --text-2:       #9898a6;
    --text-3:       #5a5a6a;
    --radius-sm:    10px;
    --radius-md:    16px;
    --radius-lg:    24px;
    --radius-xl:    32px;
    --shadow-card:  0 2px 12px rgba(0,0,0,0.5), 0 1px 3px rgba(0,0,0,0.4);
    --shadow-lift:  0 16px 48px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
    --transition:   0.22s cubic-bezier(0.4,0,0.2,1);
    --font-serif:   ui-serif, 'Georgia', 'Times New Roman', serif;
    --font-sans:    ui-sans-serif, -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', system-ui, sans-serif;
}

/* ─── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* ─── Base ───────────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Ambient background grain + subtle gradient */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse 900px 600px at 60% -100px, rgba(200,255,62,0.05) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at -10% 60%, rgba(120,80,255,0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ─── Typography ─────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(32px, 6vw, 56px);
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(24px, 4vw, 36px);
    margin: 32px 0 16px;
}

h3 {
    font-size: clamp(20px, 3.5vw, 28px);
    margin: 24px 0 12px;
}

h4 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--text-1);
}

p {
    margin-bottom: 20px;
    color: var(--text-2);
    font-size: clamp(15px, 2.5vw, 16px);
    line-height: 1.7;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--text-1);
}

ul, ol {
    margin: 20px 0;
    padding-left: 24px;
    color: var(--text-2);
}

li {
    margin: 8px 0;
    line-height: 1.6;
}

strong {
    color: var(--text-1);
    font-weight: 600;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 40px 0;
}

nav {
    position: fixed;
    top: 0;
    z-index: 100;
    background: rgba(12,12,14,0.82);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: flex;
    justify-content: center;
    animation: slideDown 0.4s cubic-bezier(0.4,0,0.2,1) both;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 24px);
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 5vw, 32px);
}

.logo {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    cursor: pointer;
    flex: 1;
    white-space: nowrap;
}

.logo:hover {
    opacity: 0.9;
}

nav .nav_menu {
    display: flex;
    align-items: center;
    gap: clamp(20px, 5vw, 32px);
    justify-content: flex-end;
}

nav .nav_menu ul {
    display: flex;
    align-items: center;
    gap: clamp(4px, 2vw, 8px);
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

nav .nav_menu ul::-webkit-scrollbar {
    height: 3px;
}

nav .nav_menu ul::-webkit-scrollbar-track {
    background: var(--bg);
    border-radius: 3px;
}

nav  .nav_menu ul::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

nav .nav_menu ul::-webkit-scrollbar-thumb:hover {
    background: var(--accent-glow);
}

.menu-link {
    display: inline-flex;
    align-items: center;
    padding: clamp(6px, 1.5vw, 8px) clamp(12px, 3vw, 16px);
    color: var(--text-2);
    text-decoration: none;
    font-size: clamp(13px, 3vw, 14px);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.menu-link:hover {
    color: var(--text-1);
    background: var(--bg-raised);
}

.menu-link.active {
    color: var(--accent);
    background: var(--accent-dim);
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 48px;
    margin-top: 40px;
}

/* ─── Hero Section ───────────────────────────────────────────────────────── */
.section[name="post"] {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    animation: fadeUp 0.5s 0.1s cubic-bezier(0.4,0,0.2,1) both;
    position: relative;
}

.section[name="post"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px;
    right: 32px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.6;
    border-radius: 0 0 2px 2px;
}

.hero-content {
    padding: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-content h1 {
    max-width: 800px;
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 18px);
    color: var(--text-2);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ─── Blog Post Article ──────────────────────────────────────────────────── */
article.blog-post {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    overflow: hidden;
    animation: fadeUp 0.5s 0.2s cubic-bezier(0.4,0,0.2,1) both;
}

article header {
    padding: 48px 48px 0;
    border-bottom: 1px solid var(--border);
}

article header h1 {
    font-size: clamp(28px, 5vw, 48px);
    margin-bottom: 0;
}

.post-content {
    padding: 48px;
}

/* Featured card for content sections */
.feature-card {
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.feature-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

/* Blockquotes */
blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    background: var(--bg-raised);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    font-style: italic;
    color: var(--text-2);
}

/* Code blocks */
pre, code {
    font-family: 'SF Mono', 'Monaco', 'Cascadia Code', monospace;
    font-size: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

pre {
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid var(--border);
}

code {
    padding: 2px 6px;
    color: var(--accent);
}

/* Tables */
table {
    width: 100%;
    margin: 24px 0;
    border-collapse: collapse;
    background: var(--bg-raised);
    border-radius: var(--radius-md);
    overflow: hidden;
}

th, td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-hover);
    color: var(--text-1);
    font-weight: 600;
}

tr:last-child td {
    border-bottom: none;
}

/* Images within blog posts */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 24px 0;
}

/* ─── Blog Listing Page (Articles Grid) ──────────────────────────────────── */
.section.articles {
    animation: fadeUp 0.5s 0.1s cubic-bezier(0.4,0,0.2,1) both;
}

.section.articles h2 {
    text-align: center;
    margin-bottom: 16px;
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 48px;
    color: var(--text-2);
}

/* Flex row for blog cards */
.flex.row_direction {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
}

/* Blog card */
.row-card {
    flex: 1 1 320px;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
    cursor: pointer;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.row-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lift);
    border-color: var(--border-light);
}

.row-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.4,0,0.2,1);
}

.row-card:hover .row-image {
    transform: scale(1.05);
}

.row-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.row-title {
    font-family: var(--font-serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.row-excerpt {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Pagination buttons */
.primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: #0c0c0e;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
    border: none;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--accent-glow);
    color: #0c0c0e;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--border);
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--bg);
}

.footer-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 24px;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    justify-content: space-between;
    margin-bottom: 48px;
}

.footer-column {
    flex: 1 1 200px;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    margin-bottom: 20px;
}

.footer-column .loader {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.copyright_text {
    font-size: 12px;
    color: var(--text-3);
}

.footer-socials .loader {
    display: flex;
    gap: 16px;
}

/* ─── Empty State ────────────────────────────────────────────────────────── */
.flex.row_direction > p {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    width: 100%;
}

/* ─── Shared Animations ──────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* GPU hints */
.row-card,
.feature-card,
.section[name="post"],
article.blog-post {
    will-change: transform;
}

/* Touch & cursor */
button, a, .primary-btn, .row-card {
    touch-action: manipulation;
    cursor: pointer;
}