/* 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: hidden; }
body {
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background: var(--canvas);
    line-height: 1.6;
    overflow-x: hidden;
    -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; }
: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); }
.bg-glow {
    position: absolute; top: -10%; left: 50%; transform: translateX(-50%);
    width: 1100px; height: 700px;
    background: radial-gradient(50% 50% at 50% 50%, rgba(91,140,255,0.16), transparent 70%),
                radial-gradient(40% 50% at 25% 40%, rgba(56,225,196,0.12), transparent 70%),
                radial-gradient(45% 55% at 78% 45%, rgba(169,107,255,0.12), transparent 70%);
    filter: blur(20px);
}
.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%);
}

/* Header */
header {
    position: sticky; top: 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: background 0.3s, border-color 0.3s;
}
header.scrolled { background: rgba(10, 11, 15, 0.85); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; justify-content: space-between; }
.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); }
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; }
.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; 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; }

/* 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: 40px; }
.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: 620px) {
    nav.menu { position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px); flex-direction: column; align-items: flex-start; justify-content: center; gap: 26px; padding: 40px; background: rgba(12, 14, 20, 0.97); backdrop-filter: blur(18px); border-left: 1px solid var(--border); transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.5, 0, 0, 1); }
    nav.menu.active { transform: translateX(0); }
    nav.menu a { font-size: 1.2em; }
    .menu-toggle { display: flex; z-index: 10002; }
}
