/* ============================================
   MidBoss - Jekyll Site Styles
   Dark cyberpunk aesthetic, ROM-universe inspired
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Work+Sans:wght@300;400;500;600&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --text-primary: #e8e6f0;
  --text-secondary: #9490a8;
  --text-muted: #5e5a72;
  --accent-cyan: #00e5cc;
  --accent-magenta: #e040a0;
  --accent-blue: #3d7aed;
  --border-subtle: rgba(148, 144, 168, 0.12);
  --border-accent: rgba(0, 229, 204, 0.25);
  --glow-cyan: 0 0 20px rgba(0, 229, 204, 0.15);
  --glow-magenta: 0 0 20px rgba(224, 64, 160, 0.15);
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Work Sans', sans-serif;
  --max-width: 1100px;
  --transition: 0.25s ease;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.7;
  font-size: 16px;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: #5fffeb; }

img { max-width: 100%; height: auto; display: block; }

/* ---- Utility ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ---- Scanline overlay (subtle) ---- */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

/* ============================================
   Header / Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 4px;
  transition: all var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--accent-cyan);
  background: rgba(0, 229, 204, 0.06);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; }
}

/* ============================================
   Hero Section (Homepage)
   ============================================ */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(0, 229, 204, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 50%, rgba(224, 64, 160, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

.hero-logo {
  width: 180px;
  margin: 0 auto 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.15s forwards;
}

.hero p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.3s forwards;
}

.hero .accent { color: var(--accent-cyan); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   Games Grid
   ============================================ */
.section-heading {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 40px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-accent);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}

.game-card:hover {
  border-color: var(--border-accent);
  background: var(--bg-card-hover);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}

.game-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.game-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-body h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.game-card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.game-card-body p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
}

.game-card-links {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.game-card-links a {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--border-accent);
  border-radius: 4px;
  color: var(--accent-cyan);
  transition: all var(--transition);
}

.game-card-links a:hover {
  background: rgba(0, 229, 204, 0.1);
  border-color: var(--accent-cyan);
}

/* ============================================
   Blog / Updates
   ============================================ */
.posts-list {
  list-style: none;
  margin-bottom: 80px;
}

.post-item {
  padding: 28px 0;
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition);
}

.post-item:first-child {
  border-top: 1px solid var(--border-subtle);
}

.post-item:hover {
  padding-left: 12px;
}

.post-date {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.post-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.post-title a {
  color: var(--text-primary);
}
.post-title a:hover {
  color: var(--accent-cyan);
}

.post-excerpt {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   Single Post
   ============================================ */
.post-content {
  max-width: 720px;
  margin: 0 auto 80px;
}

.post-header {
  margin: 60px 0 40px;
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  margin-bottom: 8px;
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--accent-cyan);
}

.post-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.post-content blockquote {
  border-left: 3px solid var(--accent-magenta);
  padding-left: 20px;
  margin: 24px 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* ============================================
   About Page
   ============================================ */
.about-section {
  padding: 80px 0;
}

.about-section .castle-logo {
  width: 120px;
  margin: 0 auto 32px;
}

.about-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.mission-points {
  list-style: none;
  max-width: 700px;
  margin: 0 auto;
}

.mission-points li {
  padding: 16px 0;
  padding-left: 24px;
  border-left: 2px solid var(--accent-cyan);
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.mission-points li strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent-cyan); }

.footer-copy {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ============================================
   Contact Page
   ============================================ */
.contact-section {
  padding: 80px 0;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.contact-section p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.contact-email {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-cyan);
  padding: 16px 32px;
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  display: inline-block;
  transition: all var(--transition);
}

.contact-email:hover {
  background: rgba(0, 229, 204, 0.08);
  box-shadow: var(--glow-cyan);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: 1fr;
  }
  .hero { padding: 60px 0 50px; }
  .hero-logo { width: 120px; }
}
