/*
Theme Name: GMRRmulator
Theme URI: http://gmrrmulators.blog/
Author: GMRRmulator Team
Author URI: http://gmrrmulators.blog/
Description: A fast, clean, professional blogging theme built for GMRRmulator — a technology blog covering emulators, retro gaming, gaming hardware, software, and how-to guides. Fully responsive, SEO-friendly, widget-ready, and built with modern semantic HTML5 and accessible markup.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: gmrrmulator
Tags: blog, news, one-column, two-columns, right-sidebar, custom-menu, custom-logo, featured-images, threaded-comments, translation-ready, technology
*/

/* =========================================================
   0. CSS VARIABLES / THEME TOKENS
========================================================= */
:root{
  --gm-bg: #0b0e14;
  --gm-bg-alt: #10141d;
  --gm-surface: #161b26;
  --gm-surface-2: #1d2432;
  --gm-border: #262e3d;
  --gm-text: #e7ebf3;
  --gm-text-muted: #9aa5b8;
  --gm-accent: #4fe0c5;
  --gm-accent-2: #7c8cff;
  --gm-accent-warm: #ff8a5b;
  --gm-white: #ffffff;
  --gm-max-width: 1160px;
  --gm-radius: 10px;
  --gm-font-heading: 'Space Grotesk', 'Poppins', Arial, sans-serif;
  --gm-font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
  --gm-shadow: 0 8px 24px rgba(0,0,0,.35);
}

/* =========================================================
   1. RESET & BASE
========================================================= */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--gm-bg);
  color: var(--gm-text);
  font-family: var(--gm-font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; height:auto; display:block; border-radius: var(--gm-radius); }
a{ color: var(--gm-accent); text-decoration:none; transition: color .15s ease; }
a:hover{ color: var(--gm-accent-2); }
h1,h2,h3,h4,h5,h6{
  font-family: var(--gm-font-heading);
  color: var(--gm-white);
  line-height:1.25;
  margin: 0 0 .6em;
  font-weight: 700;
}
h1{ font-size: 2.4rem; }
h2{ font-size: 1.9rem; }
h3{ font-size: 1.4rem; }
p{ margin: 0 0 1.2em; }
ul,ol{ padding-left: 1.4em; margin: 0 0 1.2em; }
blockquote{
  margin: 1.6em 0;
  padding: 1em 1.4em;
  border-left: 4px solid var(--gm-accent);
  background: var(--gm-surface);
  border-radius: 0 var(--gm-radius) var(--gm-radius) 0;
  color: var(--gm-text-muted);
  font-style: italic;
}
code, pre{
  font-family: 'JetBrains Mono', Consolas, monospace;
  background: var(--gm-surface-2);
  border-radius: 6px;
}
code{ padding: .15em .4em; }
pre{ padding: 1em; overflow-x:auto; border:1px solid var(--gm-border); }
hr{ border:none; border-top:1px solid var(--gm-border); margin:2.5em 0; }
table{ width:100%; border-collapse: collapse; margin: 1.5em 0; }
th,td{ padding:.6em .8em; border:1px solid var(--gm-border); text-align:left; }
.screen-reader-text{
  position:absolute !important; width:1px; height:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); white-space:nowrap; border:0; padding:0; margin:-1px;
}
.skip-link{
  position:absolute; left:-9999px; top:0; background:var(--gm-accent);
  color:#03110e; padding:.7em 1.2em; z-index:10000; border-radius:0 0 8px 0;
}
.skip-link:focus{ left:0; }

/* =========================================================
   2. LAYOUT
========================================================= */
.gm-container{
  max-width: var(--gm-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.gm-site-wrap{ min-height: 70vh; }
.gm-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding: 48px 0 72px;
}
.gm-layout.has-sidebar{ grid-template-columns: minmax(0,1fr) 320px; }
@media (max-width: 880px){
  .gm-layout.has-sidebar{ grid-template-columns: 1fr; }
}

/* =========================================================
   3. HEADER
========================================================= */
.gm-header{
  position: sticky; top:0; z-index: 999;
  background: rgba(11,14,20,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gm-border);
}
.gm-header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding: 16px 24px;
  gap: 24px;
}
.gm-logo{
  font-family: var(--gm-font-heading);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--gm-white) !important;
  display:flex; align-items:center; gap:.5em;
  letter-spacing: -.02em;
}
.gm-logo span{ color: var(--gm-accent); }
.gm-logo img{ max-height: 42px; border-radius:6px; }
.gm-primary-nav ul{
  list-style:none; display:flex; gap: 28px; margin:0; padding:0;
}
.gm-primary-nav a{
  color: var(--gm-text); font-weight:600; font-size:.95rem;
  padding: 8px 2px; border-bottom: 2px solid transparent;
}
.gm-primary-nav a:hover, .gm-primary-nav .current-menu-item > a{
  color: var(--gm-accent); border-bottom-color: var(--gm-accent);
}
.gm-primary-nav ul ul{
  position:absolute; background:var(--gm-surface); border:1px solid var(--gm-border);
  flex-direction:column; padding: 8px; border-radius: var(--gm-radius);
  display:none; min-width:200px; box-shadow: var(--gm-shadow);
}
.gm-primary-nav li{ position:relative; }
.gm-primary-nav li:hover > ul{ display:flex; }
.gm-header-actions{ display:flex; align-items:center; gap:16px; }
.gm-search-toggle, .gm-menu-toggle{
  background:none; border:1px solid var(--gm-border); color:var(--gm-text);
  width:40px; height:40px; border-radius:8px; cursor:pointer; display:none;
}
.gm-header-search{ display:none; padding: 0 24px 16px; }
.gm-header-search.is-open{ display:block; }
@media (max-width: 880px){
  .gm-primary-nav{
    display:none; position:absolute; left:0; right:0; top:100%;
    background: var(--gm-bg-alt); border-bottom:1px solid var(--gm-border);
    padding: 16px 24px;
  }
  .gm-primary-nav.is-open{ display:block; }
  .gm-primary-nav ul{ flex-direction:column; gap:4px; }
  .gm-primary-nav ul ul{ position:static; border:none; display:block; padding-left:1em; }
  .gm-menu-toggle{ display:block; }
}

/* =========================================================
   4. HERO (front page)
========================================================= */
.gm-hero{
  padding: 72px 0 56px;
  background:
    radial-gradient(circle at 15% 20%, rgba(79,224,197,.14), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(124,140,255,.14), transparent 40%);
  border-bottom: 1px solid var(--gm-border);
  text-align:center;
}
.gm-hero-eyebrow{
  display:inline-block; color: var(--gm-accent); font-weight:700;
  letter-spacing:.14em; text-transform:uppercase; font-size:.8rem; margin-bottom:14px;
}
.gm-hero h1{ font-size: 2.8rem; max-width: 780px; margin: 0 auto .5em; }
.gm-hero p{ max-width:620px; margin:0 auto; color: var(--gm-text-muted); font-size:1.1rem; }
.gm-hero-cats{ display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top: 26px; }
.gm-hero-cats a{
  border:1px solid var(--gm-border); padding:8px 16px; border-radius:999px;
  color: var(--gm-text); font-size:.9rem; font-weight:600;
}
.gm-hero-cats a:hover{ border-color: var(--gm-accent); color: var(--gm-accent); }

/* =========================================================
   5. CARDS / POST LOOP
========================================================= */
.gm-post-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap: 32px; }
@media (max-width: 700px){ .gm-post-grid{ grid-template-columns:1fr; } }
.gm-card{
  background: var(--gm-surface);
  border:1px solid var(--gm-border);
  border-radius: var(--gm-radius);
  overflow:hidden;
  transition: transform .18s ease, border-color .18s ease;
  display:flex; flex-direction:column;
}
.gm-card:hover{ transform: translateY(-4px); border-color: var(--gm-accent); }
.gm-card-thumb{ aspect-ratio: 16/9; overflow:hidden; background:var(--gm-surface-2); }
.gm-card-thumb img{ width:100%; height:100%; object-fit:cover; border-radius:0; }
.gm-card-body{ padding: 20px 22px 24px; display:flex; flex-direction:column; flex:1; }
.gm-cat-pill{
  display:inline-block; background: rgba(79,224,197,.12); color: var(--gm-accent);
  font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em;
  padding: 4px 10px; border-radius:999px; margin-bottom:10px; align-self:flex-start;
}
.gm-card h2, .gm-card h3{ font-size:1.2rem; margin-bottom:.4em; }
.gm-card h2 a, .gm-card h3 a{ color:var(--gm-white); }
.gm-card h2 a:hover, .gm-card h3 a:hover{ color:var(--gm-accent); }
.gm-excerpt{ color: var(--gm-text-muted); font-size:.95rem; flex:1; }
.gm-meta{
  color: var(--gm-text-muted); font-size:.8rem; margin: 0 0 10px;
  display:flex; gap:10px; flex-wrap:wrap; align-items:center;
}
.gm-meta a{ color: var(--gm-text-muted); }
.gm-readmore{ font-weight:700; font-size:.85rem; }

/* Featured / first post on home */
.gm-featured{
  display:grid; grid-template-columns: 1.1fr .9fr; gap:32px;
  background:var(--gm-surface); border:1px solid var(--gm-border);
  border-radius: var(--gm-radius); overflow:hidden; margin-bottom:40px;
}
.gm-featured-thumb{ aspect-ratio: 4/3; }
.gm-featured-thumb img{ width:100%;height:100%;object-fit:cover;border-radius:0; }
.gm-featured-body{ padding: 32px 32px 32px 0; display:flex; flex-direction:column; justify-content:center; }
.gm-featured-body h2{ font-size:1.8rem; }
@media (max-width:780px){
  .gm-featured{ grid-template-columns:1fr; }
  .gm-featured-body{ padding: 0 24px 28px; }
}

/* =========================================================
   6. SINGLE POST / PAGE
========================================================= */
.gm-single-header{ margin-bottom: 28px; }
.gm-single-header h1{ font-size:2.3rem; }
.gm-single-thumb{ margin-bottom: 32px; aspect-ratio: 21/9; overflow:hidden; }
.gm-single-thumb img{ width:100%; height:100%; object-fit:cover; }
.gm-content{ font-size:1.08rem; }
.gm-content h2{ margin-top:1.6em; }
.gm-content h3{ margin-top:1.4em; }
.gm-tags{ margin: 36px 0; display:flex; flex-wrap:wrap; gap:8px; }
.gm-tags a{
  border:1px solid var(--gm-border); padding:5px 12px; border-radius:999px;
  font-size:.82rem; color: var(--gm-text-muted);
}
.gm-author-box{
  display:flex; gap:18px; background:var(--gm-surface); border:1px solid var(--gm-border);
  border-radius: var(--gm-radius); padding:22px; margin:40px 0;
}
.gm-author-box img{ border-radius:50%; width:64px; height:64px; }
.gm-post-nav{
  display:flex; justify-content:space-between; gap:20px; margin: 40px 0;
  border-top:1px solid var(--gm-border); border-bottom:1px solid var(--gm-border); padding:20px 0;
}
.gm-post-nav > div{ max-width:48%; }
.gm-post-nav .label{ display:block; color:var(--gm-text-muted); font-size:.75rem; text-transform:uppercase; letter-spacing:.06em; margin-bottom:4px;}
.gm-post-nav .next{ text-align:right; margin-left:auto; }

/* =========================================================
   7. SIDEBAR / WIDGETS
========================================================= */
.gm-sidebar .widget{
  background: var(--gm-surface); border:1px solid var(--gm-border);
  border-radius: var(--gm-radius); padding: 22px; margin-bottom: 28px;
}
.gm-sidebar .widget-title{
  font-family: var(--gm-font-heading); font-size:1rem; text-transform:uppercase;
  letter-spacing:.06em; color:var(--gm-accent); margin-bottom:16px;
}
.gm-sidebar ul{ list-style:none; padding:0; margin:0; }
.gm-sidebar li{ padding: 8px 0; border-bottom:1px dashed var(--gm-border); font-size:.92rem; }
.gm-sidebar li:last-child{ border-bottom:none; }
.gm-sidebar a{ color: var(--gm-text); }
.gm-sidebar a:hover{ color: var(--gm-accent); }

/* =========================================================
   8. FORMS / SEARCH / COMMENTS
========================================================= */
.gm-search-form{ display:flex; gap:8px; }
.gm-search-form input[type=search]{
  flex:1; background: var(--gm-surface-2); border:1px solid var(--gm-border);
  color: var(--gm-text); padding: 10px 14px; border-radius:8px;
}
.gm-search-form button, .gm-btn, input[type=submit], button[type=submit]{
  background: var(--gm-accent); color:#04231d; border:none; font-weight:700;
  padding: 10px 20px; border-radius:8px; cursor:pointer; transition: background .15s ease;
}
.gm-search-form button:hover, .gm-btn:hover, input[type=submit]:hover{ background: var(--gm-accent-2); color:#fff; }
.gm-contact-form label{ display:block; font-weight:600; margin-bottom:6px; font-size:.9rem; }
.gm-contact-form input, .gm-contact-form textarea{
  width:100%; background:var(--gm-surface-2); border:1px solid var(--gm-border);
  color:var(--gm-text); padding: 12px 14px; border-radius:8px; margin-bottom:18px; font-family:inherit;
}
.gm-form-notice{ padding:14px 18px; border-radius:8px; margin-bottom:20px; }
.gm-form-notice.success{ background:rgba(79,224,197,.12); color:var(--gm-accent); border:1px solid var(--gm-accent); }
.gm-form-notice.error{ background:rgba(255,110,110,.12); color:#ff8a8a; border:1px solid #ff8a8a; }

#comments{ margin-top: 50px; }
.comment-list{ list-style:none; padding:0; margin:0; }
.comment-list .children{ list-style:none; margin-left: 40px; }
.comment-body{
  background: var(--gm-surface); border:1px solid var(--gm-border);
  border-radius: var(--gm-radius); padding: 18px 20px; margin-bottom: 18px;
}
.comment-author img{ border-radius:50%; }
.comment-meta{ font-size:.8rem; color:var(--gm-text-muted); margin-bottom:8px; }
.comment-reply-link{ font-size:.8rem; font-weight:700; }

/* =========================================================
   9. FOOTER
========================================================= */
.gm-footer{ background: var(--gm-bg-alt); border-top:1px solid var(--gm-border); margin-top:60px; }
.gm-footer-grid{
  display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap:32px;
  padding: 56px 24px 32px; max-width: var(--gm-max-width); margin:0 auto;
}
@media (max-width:780px){ .gm-footer-grid{ grid-template-columns: 1fr 1fr; } }
.gm-footer h4{ color:var(--gm-white); font-size:.95rem; text-transform:uppercase; letter-spacing:.06em; margin-bottom:16px; }
.gm-footer ul{ list-style:none; padding:0; margin:0; }
.gm-footer li{ margin-bottom:10px; }
.gm-footer a{ color: var(--gm-text-muted); font-size:.92rem; }
.gm-footer a:hover{ color: var(--gm-accent); }
.gm-footer-bottom{
  border-top:1px solid var(--gm-border); padding: 20px 24px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  max-width: var(--gm-max-width); margin:0 auto; color:var(--gm-text-muted); font-size:.85rem;
}
.gm-social{ display:flex; gap:12px; }
.gm-social a{
  width:36px; height:36px; border:1px solid var(--gm-border); border-radius:50%;
  display:flex; align-items:center; justify-content:center; color:var(--gm-text);
}
.gm-social a:hover{ border-color:var(--gm-accent); color:var(--gm-accent); }

/* =========================================================
   10. UTILITIES
========================================================= */
.gm-page-header{ padding: 44px 0 20px; border-bottom:1px solid var(--gm-border); margin-bottom:40px; }
.gm-page-header h1{ margin-bottom:.2em; }
.gm-pagination{ display:flex; gap:8px; justify-content:center; margin-top: 40px; flex-wrap:wrap; }
.gm-pagination a, .gm-pagination span{
  padding:8px 14px; border:1px solid var(--gm-border); border-radius:8px; color:var(--gm-text); font-size:.9rem;
}
.gm-pagination .current{ background:var(--gm-accent); color:#04231d; border-color:var(--gm-accent); font-weight:700; }
.alignwide{ margin-left:-40px; margin-right:-40px; max-width:none; }
.alignfull{ margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw); max-width:100vw; }
.wp-caption-text{ color: var(--gm-text-muted); font-size:.85rem; text-align:center; margin-top:6px; }
