/* Reset */
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family: 'Segoe UI', sans-serif; line-height: 1.6; color: #dcdfe4; background: #0d0f11; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
main { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid #0f8; outline-offset: 4px; }
.section-content { padding: 4rem 0; }
.section-content ul { padding-left: 1.5rem; }
.section-content li { margin-top: 1rem; }

/* Header */
.site-header {
  background: rgba(0,0,0,0.8);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.logo { display: block; flex-shrink: 0; }
.logo img { display: block; height: 64px; max-width: 100%; object-fit: contain; }
.logo .mobile { display: none; }
.menu-toggle { display: none; }
.site-header nav { display: flex; align-items: center; gap: 1.5rem; }

/* Link formating */
nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: #fff; text-decoration: none; font-weight: 600;
  transition: color 0.3s;
}

nav a:hover, nav a.active { color: #0f8; }  /* base hover */

a { color: #8ac6ff; }

a:hover, a:focus { color: #cde8ff; }

a:visited { color: #b3d4ff; }

/* Hero (for pages with background) */
.hero {
  min-height: 40vh;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
}
.hero::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
}
.hero-content {
  position: relative; z-index: 1; max-width: 800px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.15; margin-bottom: 1rem; }
.hero p { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

/* Game Cards (on /games/) */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
  padding: 3rem 0;
}
.game-card {
  min-width: 0;
  text-decoration: none;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s;
  backdrop-filter: blur(5px);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .game-card:hover { transform: translateY(-6px); }
}
.game-card img {
  display: block; width: 100%; height: 200px; object-fit: cover;
}
.game-card-body { padding: 1.5rem; }
.game-card h3 { margin: 0.75rem 0 0.25rem; font-size: 1.25rem; color: #fff; }
.game-card p { font-size: 1rem; }
.game-card .game-card-genre { margin-bottom: 0.75rem; font-size: 0.875rem; color: #b4c1cc; }
.project-status {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border: 1px solid #5f9e8e;
  border-radius: 999px;
  background: #102c25;
  color: #b8ffdf;
  font-size: 0.8125rem;
  font-weight: 600;
}
.hero .project-status { margin-bottom: 1rem; }
.hero .project-updated { margin-top: 1rem; font-size: 0.875rem; color: #dcdfe4; }
.project-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.project-button, .project-button:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.75rem 1.25rem;
  border: 1px solid #8ac6ff;
  border-radius: 6px;
  background: #132b40;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.project-button:hover { background: #204768; color: #fff; }
.projects-intro { max-width: 760px; padding-top: 2rem; }
.projects-intro h2 { margin-bottom: 0.75rem; color: #fff; }
.projects-overview { padding-bottom: 2rem; }
.projects-overview h2 { margin-bottom: 0.5rem; color: #fff; }

/* Collapse navigation before the full logo and links run out of room. */
@media (max-width: 1024px) {
  .site-header .container { flex-wrap: wrap; gap: 0 1rem; }
  .logo .desktop { display: none; }
  .logo .mobile { display: block; }
  .logo img { height: 48px; }
  .site-header nav {
    flex-basis: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem 1rem;
    padding-top: 1rem;
  }
  .site-header nav a { padding: 0.5rem 0.75rem; border-radius: 6px; }
  .site-header nav a:hover { background: rgba(255,255,255,0.08); }
  .navigation-ready .menu-toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border: 1px solid #626b73;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
  }
  .menu-toggle[aria-expanded="true"] { border-color: #0f8; }
  .navigation-ready .menu-toggle[aria-expanded="false"] + nav { display: none; }
}

@media (max-width: 600px) {
  .container { padding: 0 1rem; }
  .site-header .container { padding: 0.75rem 1rem; }
  .hero { min-height: 16rem; padding: 2.5rem 1rem; }
  .game-grid { gap: 1.5rem; padding: 2rem 0; }
  .game-card-body { padding: 1.25rem; }
  .section-content { padding: 2rem 0; }
}

footer { padding: 0 0 2rem; }
footer .copyright {
  color: #9d9fb4;        /* matches footer text tone */
  font-size: 0.85rem;
  margin: 0;
}

.social-links {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.social-links a {
  color: #8ac6ff;    /* matches your link color */
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  display: inline-flex;
  opacity: 0.85;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.social-links a:hover {
  opacity: 1;
  color: #cde8ff;     /* slight hover brighten */
}

/* Make images in markdown look nice */
article img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  display: block;
  margin: 3rem auto;
}


/* Markdown overrides */
.markdown-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem;
  
  background-color: transparent;
  color: #eee;
}

@media (max-width: 600px) {
  .markdown-body { padding: 0; }
  .markdown-body h1 { font-size: 1.75em; }
  article img { margin: 2rem auto; }
}

/* Make markdown headings match the site’s light-on-dark palette */
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: #fff;        /* brighten headings */
}

/* So the h1/h2 underline rules aren’t too bright */
.markdown-body h1,
.markdown-body h2 {
  border-color: #333;
}

/* Dark theme table override */
.markdown-body table {
  background-color: #15171a;      /* dark neutral panel */
  color: #e0e3e6;
  border-color: #2b2d31;          /* outer border */
}

.markdown-body th,
.markdown-body td {
  background-color: #1a1c1f;      /* slightly lighter than page bg */
  color: #e0e3e6;                 /* readable */
  border: 1px solid #2b2d31;
  padding: 0.5rem 0.75rem;
}

/* optional: make header row pop slightly */
.markdown-body th {
  background-color: #202326;
  color: #fff;
  font-weight: 600;
}

/* Full-size screenshots supplied through each game's page bundle. */
.project-screenshots { margin-top: 3rem; }
.project-screenshots figure { margin: 2rem 0; }
.project-screenshots figure img { margin: 0 auto 0.75rem; }
.project-screenshots figcaption { color: #b4c1cc; font-size: 0.875rem; text-align: center; }

/* Keep embedded gameplay videos within the article at every screen width. */
.video-embed { margin: 1.5rem 0; }
.video-embed iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #000;
}
