/* =============================================
   Ed Truderung - Personal Blog
   Clean dark theme, identity-security focused
   ============================================= */

:root {
  --bg:             #0c0f18;
  --bg-card:        #131720;
  --bg-nav:         #0c0f18f0;
  --border:         #1e2a3d;
  --text:           #dde4f0;
  --text-2:         #8496b0;
  --text-3:         #4a5a72;
  --accent:         #4f8ef7;
  --accent-dim:     #2d5ecc;
  --accent-glow:    rgba(79,142,247,0.12);
  --green:          #34d399;
  --yellow:         #fbbf24;
  --red:            #f87171;
  --font:           'Inter', system-ui, sans-serif;
  --mono:           'JetBrains Mono', 'Fira Code', monospace;
  --radius:         8px;
  --radius-lg:      14px;
  --max-w:          1100px;
  --max-prose:      720px;
  --t:              0.18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: #7aaeff; }
img { max-width: 100%; height: auto; display: block; }
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; color: var(--text); }
p { color: var(--text-2); }
ul { list-style: none; }

/* ── Layout ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.prose     { max-width: var(--max-prose); margin: 0 auto; padding: 0 24px; }
.section   { padding: 80px 0; }

/* ── Nav ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-nav);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  height: 64px; gap: 24px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1rem;
  color: var(--text); letter-spacing: -0.02em;
}
.nav-logo .logo-box {
  width: 32px; height: 32px;
  background: var(--accent); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 900; color: #fff;
  font-family: var(--mono);
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 7px 13px; border-radius: var(--radius);
  color: var(--text-2); font-size: 0.9rem; font-weight: 500;
  transition: all var(--t);
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text); background: rgba(255,255,255,0.06);
}
.nav-links .nav-li { color: var(--text) !important; background: var(--accent) !important; font-weight: 600 !important; }
.nav-links .nav-li:hover { background: #6ba4ff !important; color: #fff !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── Hero ── */
.hero {
  padding: 96px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 55% 0%, rgba(79,142,247,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 5% 90%, rgba(52,211,153,0.04) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner { display: grid; grid-template-columns: 1fr 420px; gap: 64px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 22px;
  font-size: 0.78rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--green);
}
.hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.5; transform:scale(1.35); }
}
.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  letter-spacing: -0.02em; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub {
  font-size: 1.05rem; color: var(--text-2);
  max-width: 520px; margin-bottom: 36px; line-height: 1.75;
}
.hero-links { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: none; transition: all var(--t);
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #6ba4ff; color: #fff; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79,142,247,0.3); }
.btn-ghost { background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }

/* ── Terminal ── */
.terminal {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(79,142,247,0.06);
}
.term-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 16px; background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; }
.td-r { background: #ff5f57; }
.td-y { background: #febc2e; }
.td-g { background: #28c840; }
.term-title {
  margin-left: 6px; font-size: 0.75rem;
  color: var(--text-3); font-family: var(--mono);
}
.term-body {
  padding: 18px 20px 22px; font-family: var(--mono);
  font-size: 0.8rem; line-height: 1.9;
}
.t-c { color: var(--text-3); }
.t-p { color: var(--accent); }
.t-ok { color: var(--green); }
.t-w  { color: var(--yellow); }
.t-e  { color: var(--red); }
.t-d  { color: var(--text-3); }
.t-cursor {
  display: inline-block; width: 7px; height: 13px;
  background: var(--accent); vertical-align: middle;
  margin-left: 2px; animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ── Topic pills ── */
.topics { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 60px; }
.topic-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 100px;
  background: var(--bg-card); border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 500; color: var(--text-2);
  transition: all var(--t);
}
.topic-pill:hover { border-color: rgba(79,142,247,0.4); color: var(--accent); background: var(--accent-glow); }
.topic-pill span { font-size: 1rem; }

/* ── Section labels ── */
.label {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 10px;
}

/* ── Blog cards ── */
.posts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-bottom: 8px; }
.container > .post-card.featured { margin-bottom: 32px; }
.posts-grid { margin-top: 0; }
.post-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
  transition: all var(--t); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.post-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: 0; transition: opacity var(--t);
}
.post-card:hover { border-color: rgba(79,142,247,0.3); transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); }
.post-card:hover::before { opacity: 1; }

.post-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; gap: 12px; }
.post-emoji { font-size: 1.8rem; line-height: 1; }
.post-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.tag {
  display: inline-block; padding: 3px 9px; border-radius: 100px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--accent-glow); color: var(--accent);
  border: 1px solid rgba(79,142,247,0.22);
}
.tag-green { background: rgba(52,211,153,0.1); color: var(--green); border-color: rgba(52,211,153,0.25); }
.tag-yellow { background: rgba(251,191,36,0.1); color: var(--yellow); border-color: rgba(251,191,36,0.25); }

.post-card h3 { font-size: 1rem; line-height: 1.4; margin-bottom: 10px; }
.post-card h3 a { color: var(--text); }
.post-card h3 a:hover { color: var(--accent); }
.post-card p { font-size: 0.87rem; color: var(--text-2); line-height: 1.65; flex: 1; margin-bottom: 18px; }
.post-meta { font-size: 0.78rem; color: var(--text-3); display: flex; align-items: center; gap: 12px; }
.post-meta-dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); }

/* Featured card - full width */
.post-card.featured {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 1.5fr; gap: 36px;
  padding: 36px;
  margin-bottom: 32px;
}

/* Ensure gap between container-level cards */
.container > .post-card + .posts-grid,
.container > .post-card.featured + .posts-grid {
  margin-top: 8px;
}
.featured-left {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0d1624, #0a1220);
  border-radius: var(--radius); border: 1px solid var(--border);
  min-height: 200px; font-size: 3.5rem;
}
.featured-right { display: flex; flex-direction: column; }
.featured-right h2 { font-size: 1.35rem; line-height: 1.35; margin-bottom: 12px; }
.featured-right h2 a { color: var(--text); }
.featured-right h2 a:hover { color: var(--accent); }
.featured-right p { font-size: 0.93rem; color: var(--text-2); line-height: 1.7; flex: 1; margin-bottom: 20px; }

.read-more {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.85rem; font-weight: 600; color: var(--accent);
  transition: gap var(--t);
}
.read-more:hover { gap: 9px; color: #7aaeff; }

/* ── About strip ── */
.about-strip {
  background: var(--bg-card); border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 0;
}
.about-inner { display: grid; grid-template-columns: auto 1fr; gap: 40px; align-items: start; }
.about-avatar {
  width: 88px; height: 88px; min-width: 88px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem; font-weight: 800;
  color: #fff; font-family: var(--mono);
}
.about-text h2 { font-size: 1.35rem; margin-bottom: 6px; }
.about-role { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.about-bio { font-size: 0.95rem; color: var(--text-2); line-height: 1.75; max-width: 600px; margin-bottom: 20px; }
.about-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  font-size: 0.78rem; color: var(--text-2); font-weight: 500;
}
.badge svg { width: 13px; height: 13px; color: var(--accent); }

/* ── Article / prose ── */
.article-header {
  padding: 72px 0 52px;
  background: linear-gradient(180deg, rgba(79,142,247,0.07) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; color: var(--text-2); margin-bottom: 24px;
  transition: color var(--t);
}
.back-link:hover { color: var(--accent); }
.article-header h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); max-width: 680px; margin-bottom: 22px; }
.article-meta-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.author-chip {
  display: flex; align-items: center; gap: 10px;
}
.author-chip-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.78rem; color: #fff;
  font-family: var(--mono);
}
.author-chip-name { font-size: 0.88rem; font-weight: 600; }
.author-chip-role { font-size: 0.75rem; color: var(--text-3); }
.meta-div { width: 1px; height: 28px; background: var(--border); }
.meta-item { font-size: 0.8rem; color: var(--text-3); }

.article-body { padding: 56px 0 80px; }
.article-body h2 { font-size: 1.45rem; margin: 44px 0 14px; }
.article-body h3 { font-size: 1.15rem; margin: 32px 0 10px; }
.article-body p { margin-bottom: 20px; font-size: 1rem; line-height: 1.82; color: var(--text-2); }
.article-body ul, .article-body ol { margin: 0 0 20px; padding-left: 0; }
.article-body li {
  padding: 4px 0 4px 26px; position: relative;
  color: var(--text-2); font-size: 0.97rem; line-height: 1.75;
}
.article-body ul li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-size: 0.82rem; }
.article-body ol { counter-reset: item; list-style: none; }
.article-body ol li { counter-increment: item; }
.article-body ol li::before { content: counter(item) '.'; position: absolute; left: 0; color: var(--accent); font-weight: 700; font-size: 0.82rem; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.callout {
  background: rgba(79,142,247,0.07); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin: 26px 0;
}
.callout p { margin: 0; }
.callout-warn { background: rgba(251,191,36,0.06); border-color: var(--yellow); }
.callout-danger { background: rgba(248,113,113,0.06); border-color: var(--red); }

.code-block {
  background: #060a12; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  font-family: var(--mono); font-size: 0.82rem; color: #a8c4e0;
  overflow-x: auto; margin: 22px 0; line-height: 1.75;
}

/* ── Author bio box ── */
.author-bio {
  max-width: var(--max-prose); margin: 0 auto 60px;
  padding: 24px 28px; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; gap: 18px; align-items: flex-start;
}
.author-bio-av {
  width: 52px; height: 52px; min-width: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.95rem; color: #fff; font-family: var(--mono);
}
.author-bio h4 { font-size: 0.95rem; margin-bottom: 3px; }
.author-bio .role { font-size: 0.78rem; color: var(--accent); margin-bottom: 8px; }
.author-bio p { font-size: 0.84rem; margin: 0; }

/* ── Related posts ── */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ── Footer ── */
.footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 40px; flex-wrap: wrap; margin-bottom: 36px;
}
.footer-brand p { font-size: 0.87rem; color: var(--text-2); margin: 10px 0 18px; max-width: 260px; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-links a { font-size: 0.87rem; color: var(--text-2); transition: color var(--t); }
.footer-links a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 8px; }
.soc-btn {
  width: 34px; height: 34px; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 0.82rem; font-weight: 700;
  transition: all var(--t);
}
.soc-btn:hover { background: var(--accent-glow); border-color: rgba(79,142,247,0.35); color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--text-3); flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: var(--text-3); }
.footer-bottom a:hover { color: var(--accent); }

/* ── Visitor Counter ── */
.vc-icon {
  font-size: 0.85rem;
  vertical-align: -2px;
}

/* ── Blog page hero ── */
.page-hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(79,142,247,0.06) 0%, transparent 100%);
}
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 12px; }
.page-hero p { font-size: 1.02rem; max-width: 540px; color: var(--text-2); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .terminal { display: none; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-card.featured { grid-template-columns: 1fr; }
  .featured-left { min-height: 100px; }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .section { padding: 56px 0; }
  .hero { padding: 64px 0 56px; }
  .nav-links { display: none; flex-direction: column; }
  .nav-links.open {
    display: flex; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-nav); border-bottom: 1px solid var(--border); padding: 12px;
  }
  .nav-toggle { display: flex; }
  .related-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .hero-links { flex-direction: column; }
  .hero-links .btn { width: 100%; justify-content: center; }
}

/* =============================================
   TRG Systems - Services & Contact Pages
   ============================================= */

/* ── Logo variant for TRG brand ── */
.logo-icon {
  width: 36px; height: 36px;
  background: var(--accent); border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 900; color: #fff;
  font-family: var(--mono); letter-spacing: 0.04em;
}

/* ── Section labels ── */
.section-label {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 10px;
}
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 16px;
}

/* ── Nav CTA ── */
.nav-cta {
  background: var(--accent) !important; color: #fff !important;
  font-weight: 600 !important; border-radius: var(--radius) !important;
  padding: 9px 18px !important;
}
.nav-cta:hover { background: #6ba4ff !important; transform: translateY(-1px); }

/* ── Contact page ── */
.contact-hero {
  padding: 72px 0 52px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(79,142,247,0.06) 0%, transparent 100%);
}

.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}

.contact-info-item {
  display: flex; gap: 16px; margin-bottom: 28px;
}
.contact-info-icon {
  width: 44px; height: 44px; min-width: 44px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); display: flex;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.contact-info-item h4 { font-size: 0.92rem; margin-bottom: 4px; }
.contact-info-item p { font-size: 0.82rem; color: var(--text-3); margin: 0; }
.contact-info-item a { font-size: 0.9rem; }

/* ── Forms ── */
.contact-form {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px;
}
.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block; font-size: 0.82rem; font-weight: 600;
  color: var(--text-2); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-family: var(--font); font-size: 0.9rem;
  transition: border-color var(--t);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group select { cursor: pointer; }
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-3);
}

/* ── Services page ── */
.services-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
.service-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px;
  transition: all var(--t);
}
.service-card:hover {
  border-color: rgba(79,142,247,0.3);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  transform: translateY(-2px);
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.service-card p { font-size: 0.9rem; }

/* ── Footer grid (services/contact pages) ── */
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 36px;
}
.footer-col h4 {
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 16px; color: var(--text);
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 0.85rem; color: var(--text-2); }
.footer-col a:hover { color: var(--accent); }
.footer-copy { font-size: 0.8rem; color: var(--text-3); }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 0.8rem; color: var(--text-3); }
.footer-legal a:hover { color: var(--accent); }

/* ── Social links ── */
.social-link {
  width: 34px; height: 34px; border-radius: var(--radius);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 0.82rem; font-weight: 700;
  transition: all var(--t); text-decoration: none;
}
.social-link:hover {
  background: var(--accent-glow); border-color: rgba(79,142,247,0.35);
  color: var(--accent);
}

/* ── Tags (blog) ── */
.tag {
  display: inline-block; padding: 4px 12px; border-radius: 100px;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.03em;
  background: rgba(79,142,247,0.1); color: var(--accent);
  border: 1px solid rgba(79,142,247,0.2);
}
.tag-green {
  background: rgba(52,211,153,0.1); color: var(--green);
  border-color: rgba(52,211,153,0.25);
}
.tag-yellow {
  background: rgba(251,191,36,0.1); color: var(--yellow);
  border-color: rgba(251,191,36,0.25);
}
.tag-red {
  background: rgba(248,113,113,0.1); color: var(--red);
  border-color: rgba(248,113,113,0.25);
}

/* ── Article list (blog index) ── */
.article-list { max-width: var(--max-w); }

/* ── Pulse animation for "accepting clients" ── */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.35); }
}

/* ── Responsive additions ── */
@media (max-width: 960px) {
  .contact-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}


/* ── Nav dropdown (Tools) ── */
.nav-dd { position: relative; }
.nav-dd-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--radius);
  color: var(--text-2); font-size: 0.9rem; font-weight: 500; cursor: pointer;
  transition: all var(--t);
}
.nav-dd:hover .nav-dd-toggle, .nav-dd:focus-within .nav-dd-toggle { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-menu {
  position: absolute; top: 100%; right: 0; min-width: 190px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px; margin-top: 6px; box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  display: none; z-index: 200;
}
.nav-dd:hover .nav-menu, .nav-dd:focus-within .nav-menu { display: block; }
.nav-menu a { display: block; padding: 9px 12px; border-radius: 6px; color: var(--text-2); font-size: 0.88rem; white-space: nowrap; }
.nav-menu a:hover { background: rgba(255,255,255,0.06); color: var(--text); }
@media (max-width: 680px) {
  .nav-dd { width: 100%; }
  .nav-dd-toggle { padding: 7px 13px; }
  .nav-menu { position: static; display: block; border: none; box-shadow: none; background: transparent; padding: 2px 0 2px 24px; margin: 0; min-width: 0; }
}

/* Buttons inside article prose keep button colours */
.article-body a.btn { text-decoration: none; }
.article-body a.btn-primary, .article-body a.btn-primary:hover { color: #fff; }

/* ── Project spotlight (homepage) ── */
.spotlight {
  position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
  padding: 40px; margin-bottom: 56px; border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 0% 0%, rgba(52,211,153,0.10), transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(79,142,247,0.12), transparent 55%),
    var(--bg-card);
  border: 1px solid rgba(52,211,153,0.28);
  overflow: hidden;
}
.spotlight::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--accent), transparent);
}
.spot-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--green);
}
.spot-eyebrow .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: spotPulse 2s infinite;
}
@keyframes spotPulse { 70% { box-shadow: 0 0 0 8px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
.spot-repo {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-family: var(--mono); font-size: 0.85rem; color: var(--text-2);
}
.spot-repo svg { width: 16px; height: 16px; fill: var(--text-2); }
.spot-repo b { color: var(--text); font-weight: 700; }
.spotlight h2 { font-size: 1.6rem; line-height: 1.25; margin-bottom: 14px; }
.spotlight h2 em { font-style: normal; color: var(--green); }
.spotlight p { font-size: 0.95rem; color: var(--text-2); line-height: 1.7; margin-bottom: 18px; }
.spot-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.spot-chips span {
  font-family: var(--mono); font-size: 0.72rem; padding: 4px 10px; border-radius: 6px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-2);
}
.spot-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.spot-actions .btn-primary { color: #fff; }
.spot-shot {
  border-radius: 10px; border: 1px solid var(--border); overflow: hidden;
  background: #0a0e16; box-shadow: 0 20px 50px rgba(0,0,0,0.45);
  transform: rotate(1deg); transition: transform var(--t);
}
.spotlight:hover .spot-shot { transform: rotate(0deg) translateY(-3px); }
.spot-shot-bar { display: flex; gap: 6px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #0f141f; }
.spot-shot-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); opacity: 0.6; }
.spot-shot-bar span { margin-left: 8px; font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.spot-shot img { width: 100%; height: auto; }
@media (max-width: 860px) {
  .spotlight { grid-template-columns: 1fr; padding: 28px 22px; gap: 28px; }
  .spotlight h2 { font-size: 1.35rem; }
  .spot-shot { transform: none; }
  .spot-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .spot-eyebrow .pulse { animation: none; }
  .spot-shot, .spotlight:hover .spot-shot { transform: none; }
}

/* ── Homepage refresh (Sep 2026) ── */
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap; margin-top: 36px; padding-top: 24px;
  border-top: 1px solid var(--border); max-width: 520px;
}
.hero-stats div { display: flex; flex-direction: column; gap: 2px; }
.hero-stats b { font-size: 1.25rem; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.hero-stats span { font-size: 0.74rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }

.spotlight { margin-bottom: 14px; }
.spot-more {
  display: flex; align-items: center; gap: 16px; margin-bottom: 72px;
  padding: 14px 20px; border-radius: var(--radius); border: 1px dashed var(--border);
  color: var(--text-2); font-size: 0.87rem; transition: all var(--t);
}
.spot-more:hover { border-color: rgba(79,142,247,0.4); color: var(--text); background: rgba(255,255,255,0.02); }
.spot-more-k { font-family: var(--mono); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); white-space: nowrap; }
.spot-more-v { flex: 1; }
.spot-more-v b { color: var(--text); font-family: var(--mono); font-weight: 700; font-size: 0.82rem; }
.spot-more-arrow { color: var(--accent); transition: transform var(--t); }
.spot-more:hover .spot-more-arrow { transform: translateX(3px); }

.home-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.home-head-link { font-size: 0.87rem; font-weight: 600; }
.home-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.start-wrap {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px;
  padding-top: 56px; border-top: 1px solid var(--border);
}
.start-list { list-style: none; margin-top: 10px; }
.start-list li + li { border-top: 1px solid var(--border); }
.start-list a {
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center;
  padding: 16px 4px; color: var(--text); transition: all var(--t);
}
.start-list a:hover { padding-left: 10px; }
.start-list a:hover b { color: var(--accent); }
.start-num { font-family: var(--mono); font-size: 0.8rem; font-weight: 700; color: var(--accent); opacity: 0.8; }
.start-body { display: flex; flex-direction: column; gap: 2px; }
.start-body b { font-size: 0.97rem; font-weight: 600; transition: color var(--t); }
.start-body span { font-size: 0.84rem; color: var(--text-2); }
.start-time { font-family: var(--mono); font-size: 0.74rem; color: var(--text-3); white-space: nowrap; }
.start-wrap .topics { margin: 14px 0 0; }
.topic-pill i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr 1fr; }
  .start-wrap { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 680px) {
  .home-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .spot-more { flex-wrap: wrap; gap: 6px 12px; }
  .spot-more-k { width: 100%; }
  .start-time { display: none; }
}

/* ── Blog index refresh (Sep 2026) ── */
.blog-count { margin-top: 18px; font-family: var(--mono); font-size: 0.78rem; color: var(--text-3); }
.blog-latest {
  display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: stretch;
  padding: 28px; border-radius: var(--radius-lg); color: var(--text);
  background: linear-gradient(135deg, rgba(79,142,247,0.07), transparent 60%), var(--bg-card);
  border: 1px solid rgba(79,142,247,0.3); position: relative; overflow: hidden; transition: all var(--t);
}
.blog-latest::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); }
.blog-latest:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.4); color: var(--text); }
.blog-latest:hover h2 { color: var(--accent); }
.blog-latest-art {
  display: flex; align-items: center; justify-content: center; border-radius: var(--radius);
  background: linear-gradient(135deg, #0d1624, #0a1220); border: 1px solid var(--border); min-height: 160px;
}
.blog-latest-art span { font-size: 4rem; line-height: 1; }
.blog-latest-body h2 { font-size: 1.4rem; line-height: 1.3; margin-bottom: 10px; transition: color var(--t); }
.blog-latest-body p { font-size: 0.94rem; color: var(--text-2); line-height: 1.7; margin-bottom: 16px; }
.blog-latest-cta { color: var(--accent); font-weight: 600; }

.blog-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.blog-search {
  width: 260px; max-width: 100%; padding: 9px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: 0.87rem; transition: border-color var(--t);
}
.blog-search::placeholder { color: var(--text-3); }
.blog-search:focus { outline: none; border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 100px;
  background: transparent; border: 1px solid var(--border); color: var(--text-2);
  font: inherit; font-size: 0.8rem; font-weight: 500; cursor: pointer; transition: all var(--t);
}
.chip span { font-family: var(--mono); font-size: 0.7rem; color: var(--text-3); }
.chip:hover { border-color: rgba(79,142,247,0.4); color: var(--text); }
.chip.active { background: var(--accent-glow); border-color: rgba(79,142,247,0.5); color: var(--accent); }
.chip.active span { color: var(--accent); }
.post-card[hidden] { display: none; }
.blog-empty { color: var(--text-3); font-size: 0.9rem; padding: 24px 0; }

/* Previous / next on posts */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; margin: 0 auto 48px; }
.post-nav a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; border-radius: var(--radius-lg);
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text); transition: all var(--t);
}
.post-nav a:hover { border-color: rgba(79,142,247,0.4); transform: translateY(-2px); }
.post-nav-next { text-align: right; }
.post-nav-label { font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.post-nav-title { font-size: 0.93rem; font-weight: 600; line-height: 1.4; }

@media (max-width: 760px) {
  .blog-latest { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
  .blog-latest-art { min-height: 110px; }
  .blog-search { width: 100%; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }
}

/* ── Post layout: wide code/figures/tables, TOC, progress (Sep 2026) ── */
.article-body h2, .article-body h3 { scroll-margin-top: 88px; }

.article-body table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: 0.88rem; }
.article-body th, .article-body td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.article-body th { color: var(--text); font-weight: 600; background: var(--bg-card); }
.article-body td { color: var(--text-2); }
.article-body .callout table { margin: 12px 0 0; }
.article-body figure { margin: 28px 0; }
.article-body figure img { border-radius: 10px; border: 1px solid var(--border); }
.article-body figcaption { font-size: 0.85rem; color: var(--text-3); margin-top: 8px; }

@media (min-width: 1000px) {
  .article-body .prose > .code-block,
  .article-body .prose > figure,
  .article-body .prose > table {
    width: 880px; max-width: none;
    margin-left: calc((100% - 880px) / 2); margin-right: calc((100% - 880px) / 2);
  }
}
@media (max-width: 999px) {
  .article-body .prose > table { display: block; overflow-x: auto; }
}

.toc {
  position: fixed; top: 110px; left: calc(50% + 460px); width: 210px;
  max-height: calc(100vh - 150px); overflow-y: auto; z-index: 5;
  transition: opacity var(--t), visibility var(--t);
}
.toc.toc-hidden { opacity: 0; visibility: hidden; }
.toc-title { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); margin-bottom: 12px; }
.toc ol { list-style: none; border-left: 1px solid var(--border); }
.toc a {
  display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent;
  font-size: 0.8rem; line-height: 1.45; color: var(--text-3); transition: all var(--t);
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--accent); border-left-color: var(--accent); }
@media (max-width: 1379px) { .toc { display: none; } }

.read-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transform-origin: 0 50%; transform: scaleX(0); pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ── Projects page ── */
.project-name { font-family: var(--mono); font-size: 1rem; word-break: break-word; }
.project-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.project-links .btn { font-size: 0.84rem; padding: 8px 14px; }
.project-links .btn-primary, .project-links .btn-primary:hover { color: #fff; }
.projects-more { margin-top: 28px; font-size: 0.9rem; font-weight: 600; }
.spotlight:last-child { margin-bottom: 72px; }

/* Small screenshots stay in the text column at natural size */
.article-body .prose > figure.figure-inline { width: auto; margin-left: 0; margin-right: 0; text-align: center; }
.article-body figure.figure-inline img { display: inline-block; max-width: 100%; height: auto; }

/* Draft-only screenshot placeholders (replaced before a post is listed) */
.shot-placeholder { margin: 26px 0; padding: 30px 20px; border: 2px dashed var(--yellow); border-radius: var(--radius); background: rgba(251,191,36,0.06); color: var(--yellow); font-family: var(--mono); font-size: 0.85rem; text-align: center; }
