/* ============================================================
   MrGeekChris layout — design tokens
   Palette: near-black slate bg, warm terminal-amber accent,
   muted cyan secondary, off-white text.
   Type: IBM Plex Mono (display/labels) + Inter (body).
   Signature: sidebar widgets styled as terminal panels with
   "$ command" headers and a blinking cursor.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600;700&display=swap');

:root{
  --bg:        #14171a;
  --surface:   #1c2024;
  --surface-2: #22272c;
  --border:    #2c3237;
  --text:      #e8e6e1;
  --muted:     #8b939b;
  --amber:     #ffb454;
  --cyan:      #5fd0c0;

  --font-display: 'IBM Plex Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 6px;
  --wrap: 1180px;
}

*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }

.wrap{ max-width:var(--wrap); margin:0 auto; padding:0 24px; }

/* ---------- Topbar ---------- */
.topbar{ background:#0e1012; border-bottom:1px solid var(--border); font-family:var(--font-display); font-size:13px; }
.topbar-inner{ display:flex; align-items:center; justify-content:space-between; height:38px; }
.topbar .prompt{ color:var(--muted); }
.topbar .prompt::after{ content:"_"; color:var(--amber); animation:blink 1.1s steps(2) infinite; }
.social{ display:flex; align-items:center; gap:14px; }
.social a{ color:var(--muted); letter-spacing:.04em; }
.social a:hover{ color:var(--cyan); }
.search-toggle{ background:none; border:1px solid var(--border); color:var(--muted); border-radius:4px; width:26px; height:26px; cursor:pointer; }
.search-drop{ max-height:0; overflow:hidden; background:#0e1012; transition:max-height .2s ease; }
.search-drop.open{ max-height:60px; border-bottom:1px solid var(--border); }
.search-drop input{ width:100%; max-width:var(--wrap); margin:0 auto; display:block; background:transparent; border:0; color:var(--text); padding:14px 24px; font-family:var(--font-display); font-size:14px; }
.search-drop input:focus{ outline:none; }

@keyframes blink{ 50%{ opacity:0; } }

/* ---------- Header ---------- */
.site-header{ padding:22px 0; border-bottom:1px solid var(--border); }
.header-inner{ display:flex; align-items:center; justify-content:space-between; gap:24px; }
.logo{ display:flex; align-items:center; gap:10px; font-family:var(--font-display); font-weight:600; font-size:19px; }
.logo-mark{ color:var(--amber); }
.nav-toggle{ display:none; background:none; border:1px solid var(--border); color:var(--text); border-radius:4px; padding:6px 10px; cursor:pointer; }
.main-nav ul{ display:flex; gap:28px; }
.main-nav a{ font-size:14.5px; font-weight:500; color:var(--muted); transition:color .15s; }
.main-nav a:hover, .main-nav a.active{ color:var(--cyan); }

/* ---------- Layout grid ---------- */
.layout{ display:grid; grid-template-columns:1fr 320px; gap:44px; padding-top:40px; padding-bottom:60px; align-items:start; }
.page-title{ font-family:var(--font-display); font-size:15px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin:0 0 24px; }
.page-title::before{ content:"// "; color:var(--amber); }

/* ---------- Featured post ---------- */
.featured-post{ display:grid; grid-template-columns:1.1fr 1fr; gap:0; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; margin-bottom:40px; }
.featured-img img{ height:100%; width:100%; object-fit:cover; min-height:260px; }
.featured-body{ padding:28px 30px; display:flex; flex-direction:column; gap:10px; }
.eyebrow{ font-family:var(--font-display); font-size:12px; letter-spacing:.1em; text-transform:uppercase; color:var(--amber); }
.tag{ display:inline-block; font-family:var(--font-display); font-size:11.5px; color:var(--cyan); border:1px solid var(--cyan); border-radius:3px; padding:2px 8px; width:fit-content; }
.featured-body h2{ font-size:26px; line-height:1.25; margin:4px 0 0; }
.featured-body h2 a:hover{ color:var(--amber); }
.featured-body p{ color:var(--muted); margin:0; }
.meta{ font-family:var(--font-display); font-size:12px; color:var(--muted); display:flex; gap:14px; }
.read-more{ font-family:var(--font-display); font-size:13px; color:var(--amber); margin-top:6px; }
.read-more:hover{ text-decoration:underline; }

/* ---------- Post grid ---------- */
.post-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:22px; }
.post-card{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; display:flex; flex-direction:column; transition:border-color .15s, transform .15s; }
.post-card:hover{ border-color:var(--amber); transform:translateY(-2px); }
.post-card-img img{ aspect-ratio:16/10; object-fit:cover; }
.post-card-body{ padding:18px 20px 20px; display:flex; flex-direction:column; gap:8px; }
.post-card-body h3{ font-size:17px; margin:2px 0 0; line-height:1.35; }
.post-card-body h3 a:hover{ color:var(--amber); }
.post-card-body p{ color:var(--muted); font-size:14px; margin:0; }

/* ---------- Sidebar / widgets ---------- */
.sidebar{ display:flex; flex-direction:column; gap:22px; }
.widget{ background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px 20px 20px; }
.widget h3{ font-family:var(--font-display); font-size:13px; color:var(--text); margin:0 0 14px; display:flex; gap:6px; }
.widget h3 .cursor{ color:var(--amber); }
.widget-about p{ color:var(--muted); font-size:14px; margin:0; }

.category-list li{ display:flex; justify-content:space-between; padding:6px 0; border-bottom:1px dashed var(--border); font-size:14px; }
.category-list li:last-child{ border-bottom:0; }
.category-list a:hover{ color:var(--cyan); }
.category-list .count{ color:var(--muted); font-family:var(--font-display); font-size:12px; }

.feed-list li{ padding:8px 0; border-bottom:1px dashed var(--border); font-size:13.5px; }
.feed-list li:last-child{ border-bottom:0; }
.feed-list a:hover{ color:var(--cyan); }
.feed-date{ display:block; color:var(--muted); font-family:var(--font-display); font-size:11px; margin-top:2px; }
.widget-source{ display:block; margin-top:12px; font-family:var(--font-display); font-size:12px; color:var(--muted); }
.widget-source:hover{ color:var(--amber); }

.video-frame{ position:relative; aspect-ratio:16/9; border-radius:4px; overflow:hidden; }
.video-frame iframe{ width:100%; height:100%; border:0; }

/* ---------- Footer ---------- */
.site-footer{ border-top:1px solid var(--border); background:#0e1012; padding:26px 0; }
.footer-inner{ display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; font-family:var(--font-display); font-size:13px; color:var(--muted); }
.footer-brand{ color:var(--text); font-weight:500; }
.footer-brand .logo-mark{ color:var(--amber); }
.footer-social{ display:flex; gap:14px; }
.footer-social a:hover{ color:var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .layout{ grid-template-columns:1fr; }
  .featured-post{ grid-template-columns:1fr; }
  .nav-toggle{ display:inline-block; }
  .main-nav ul{ display:none; position:absolute; right:24px; top:70px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); flex-direction:column; padding:10px; gap:0; z-index:10; }
  .main-nav ul.open{ display:flex; }
  .main-nav ul li{ padding:8px 14px; }
}
@media (max-width: 600px){
  .post-grid{ grid-template-columns:1fr; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .topbar .prompt::after{ animation:none; }
}
