/* ITmachr.com — shared styles for blog pages (matches the homepage bento theme). */
:root {
    --canvas: #0a0b0f;
    --surface: #14161d;
    --surface-2: #181b23;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text: #e7ecf5;
    --muted: #9aa6be;
    --accent: #38e1c4;
    --accent-2: #5b8cff;
    --accent-3: #a96bff;
    --grad: linear-gradient(125deg, #38e1c4 0%, #5b8cff 52%, #a96bff 100%);
    --radius: 22px;
    --radius-sm: 14px;
    --maxw: 1200px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; overflow-anchor: none; background: var(--canvas); overscroll-behavior-x: none; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background: var(--canvas);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .logo { font-family: 'Sora', 'Inter', sans-serif; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(91, 140, 255, 0.35); color: #fff; }
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--canvas); }
::-webkit-scrollbar-thumb { background: #232836; border-radius: 8px; border: 3px solid var(--canvas); }
::-webkit-scrollbar-thumb:hover { background: #313748; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

.bg-wrap { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--canvas); }
.orb-layer { position: absolute; inset: 0; will-change: filter; }
.orb { position: absolute; width: 58vmax; height: 58vmax; will-change: transform; pointer-events: none; }
.orb > i { display: block; width: 100%; height: 100%; border-radius: 50%; filter: blur(54px); will-change: transform; animation: drift 20s ease-in-out infinite; }
.orb-1 { top: -26vmax; left: -16vmax; }
.orb-1 > i { background: radial-gradient(circle at 50% 50%, rgba(56,225,196,0.62), rgba(56,225,196,0) 64%); }
.orb-2 { top: -8vmax; right: -22vmax; }
.orb-2 > i { background: radial-gradient(circle at 50% 50%, rgba(91,140,255,0.62), rgba(91,140,255,0) 64%); animation-duration: 25s; animation-delay: -7s; }
.orb-3 { bottom: -30vmax; left: 14vmax; }
.orb-3 > i { background: radial-gradient(circle at 50% 50%, rgba(169,107,255,0.58), rgba(169,107,255,0) 64%); animation-duration: 29s; animation-delay: -14s; }
.orb-4 { width: 46vmax; height: 46vmax; top: 30vmax; left: 36vmax; }
.orb-4 > i { background: radial-gradient(circle at 50% 50%, rgba(255,110,180,0.40), rgba(255,110,180,0) 64%); animation-duration: 23s; animation-delay: -4s; }
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(9%, -7%) scale(1.10); }
    66% { transform: translate(-8%, 7%) scale(0.94); }
}
.bg-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
    will-change: transform;
}
@media (prefers-reduced-motion: reduce) { .orb > i { animation: none !important; } }
.bg-grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Header */
header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 10000;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    background: rgba(10, 11, 15, 0.6);
    border-bottom: 1px solid transparent;
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), background 0.3s, border-color 0.3s;
    will-change: transform;
}
header.scrolled { background: rgba(10, 11, 15, 0.85); border-bottom: 1px solid var(--border); }
header.hide { transform: translateY(-100%); }
.header-hotzone { position: fixed; top: 0; left: 0; right: 0; height: 24px; z-index: 9999; }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch button { border: none; background: none; color: var(--muted); font: 600 0.8em 'Inter', sans-serif; padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; }
.lang-switch button.active { background: var(--grad); color: #04121c; }
.lang-switch button:not(.active):hover { color: var(--text); }
/* language visibility helpers for prose blocks */
[data-lang-block] { display: none; }
[data-lang-block].show { display: block; }
/* floating back-to-top */
.back-top { position: fixed; right: 22px; bottom: 22px; z-index: 9000; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #04121c; border: none; cursor: pointer; box-shadow: 0 12px 32px -8px rgba(91,140,255,0.6); opacity: 0; transform: translateY(16px) scale(0.9); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.22,1,0.36,1), filter 0.2s; }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { filter: brightness(1.08); transform: translateY(-3px); }
.back-top svg { width: 22px; height: 22px; }
@media (max-width: 620px) { .back-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 46px; height: 46px; } }
.logo { font-size: 1.3em; font-weight: 700; letter-spacing: -0.03em; display: flex; align-items: center; gap: 11px; color: var(--text); }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--grad); box-shadow: 0 6px 18px -7px rgba(91,140,255,0.75), inset 0 1px 0 rgba(255,255,255,0.4); flex-shrink: 0; transition: transform 0.25s ease, filter 0.25s ease; }
.logo-mark svg { width: 19px; height: 19px; color: #04121c; }
.logo:hover .logo-mark { transform: translateY(-1px) rotate(-3deg); filter: brightness(1.08); }
.logo .wm { font-weight: 700; }
.logo .wm b { font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
nav.menu { display: flex; align-items: center; gap: 28px; }
nav.menu a:not(.btn) { color: var(--muted); font-size: 0.97em; font-weight: 500; position: relative; transition: color 0.25s; }
nav.menu a:not(.btn):hover { color: var(--text); }
nav.menu a.current { color: var(--text); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 0.98em; cursor: pointer; border: none; font-family: 'Inter', sans-serif; transition: transform 0.2s ease, box-shadow 0.3s ease, filter 0.2s, background 0.2s; }
.btn-primary { background: var(--grad); color: #04121c; font-weight: 700; box-shadow: 0 10px 30px -10px rgba(91,140,255,0.6); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn:active { transform: scale(0.97) !important; }
nav.menu a.btn-primary { padding: 9px 18px; font-size: 0.92em; color: #03141d; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: #20242e; transform: translateY(-2px); border-color: var(--border-strong); }

.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; }
.menu-toggle span { width: 26px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section[id], article[id], [id] { scroll-margin-top: 64px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78em; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); padding: 7px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Blog listing */
.blog-head { max-width: 760px; margin: 0 auto; text-align: center; padding: 116px 0 30px; }
.blog-head h1 { font-size: clamp(2.2em, 5vw, 3.1em); line-height: 1.08; letter-spacing: -0.03em; margin: 16px 0 12px; }
.blog-head p { color: var(--muted); font-size: 1.1em; margin: 0; }
.blog-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 20px 0 90px; }
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.post-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); }
.post-card .post-cat { font-size: 0.78em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.post-card h2 { font-size: 1.4em; line-height: 1.2; margin: 12px 0 10px; letter-spacing: -0.01em; }
.post-card p { color: var(--muted); margin: 0 0 18px; font-size: 0.97em; }
.post-card .read { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 0.95em; transition: transform 0.25s ease; }
.post-card:hover .read { transform: translateX(5px); }

/* Article */
.article { max-width: 760px; margin: 0 auto; padding: 110px 24px 40px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.92em; margin-bottom: 22px; transition: color 0.2s; }
.back-link:hover { color: var(--accent); }
.article-cat { font-size: 0.8em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.article h1 { font-size: clamp(2em, 5vw, 2.9em); line-height: 1.12; letter-spacing: -0.03em; margin: 12px 0 14px; }
.article-meta { color: var(--muted); font-size: 0.9em; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 8px; }
.article-meta .author { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.article-meta .author img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 1px solid var(--accent); }

.prose { font-size: 1.08em; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; color: #d4dbe8; }
.prose h2 { font-size: 1.5em; letter-spacing: -0.01em; margin: 40px 0 14px; }
.prose h3 { font-size: 1.2em; margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 9px; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 22px 0; padding: 14px 20px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--text); }
.prose code { font-family: 'Sora', ui-monospace, monospace; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; font-size: 0.88em; color: var(--accent); }
.prose hr { border: none; border-top: 1px solid var(--border); margin: 34px 0; }

.article-cta { margin-top: 44px; padding: 32px; text-align: center; background: var(--grad); color: #04121c; border-radius: var(--radius); }
.article-cta h3 { margin: 0 0 8px; color: #04121c; font-size: 1.4em; }
.article-cta p { margin: 0 0 18px; color: #06303a; }
.article-cta .btn-dark { background: #04121c; color: #eafffb; }
.article-cta .btn-dark:hover { background: #071a26; transform: translateY(-2px); }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 46px 0 32px; background: rgba(10,11,15,0.6); margin-top: 25px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 30px; justify-content: space-between; align-items: flex-start; }
.footer-brand { max-width: 320px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 0.94em; margin: 0; }
.footer-col h4 { font-size: 0.95em; margin: 0 0 14px; }
.footer-col a, .footer-col span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.93em; margin-bottom: 10px; transition: color 0.25s; }
.footer-col a:hover { color: var(--accent); }
.footer-col svg { color: var(--accent); flex-shrink: 0; }
.footer-bottom { max-width: var(--maxw); margin: 28px auto 0; padding: 20px 24px 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; color: var(--muted); font-size: 0.87em; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

@media (max-width: 760px) {
    .blog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
    nav.menu { position: fixed; top: 0; right: 0; height: 100dvh; width: min(82vw, 340px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: 40px 34px; background: rgba(11, 13, 19, 0.96); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-left: 1px solid var(--border); box-shadow: -30px 0 70px -20px rgba(0,0,0,0.7); transform: translateX(105%); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); z-index: 10001; }
    nav.menu::before { content: ''; position: absolute; top: -20%; right: -30%; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(91,140,255,0.18), transparent 70%); filter: blur(30px); pointer-events: none; }
    nav.menu.active { transform: translateX(0); }
    nav.menu a:not(.btn) { font-size: 1.35em; font-weight: 600; padding: 12px 0; width: 100%; }
    nav.menu a.btn-primary { margin-top: 18px; padding: 14px 26px; font-size: 1em; }
    .menu-toggle { display: flex; z-index: 10002; }
    .menu-backdrop { position: fixed; inset: 0; background: rgba(4, 6, 12, 0.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity 0.35s ease; z-index: 10000; }
    body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
    body.menu-open { overflow: hidden; }
}
@media (max-width: 620px) {
    .container { padding: 0 18px; }
    .footer-bottom { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
    .lang-switch button { padding: 8px 13px; }
    .blog-head { padding: 104px 0 22px; }
    .blog-head h1 { font-size: clamp(1.9em, 8vw, 2.4em); }
    .post-card { padding: 24px 20px; }
    .article { padding: 100px 18px 30px; }
    .prose { font-size: 1.03em; }
}

/* Scroll-reactive lighting (last — wins over card shadows) */
.glow-dyn {
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.05),
        var(--sx, 0px) var(--sy, 18px) 90px -12px rgba(170,190,255, var(--si, 0.22)),
        0 0 34px -6px rgba(175,195,255, calc(var(--si, 0.22) * 0.55)) !important;
}
