/* ═══════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --sidebar-width: 400px;
  --bg: #ffffff;
  --bg-main: #ffffff;
  --white: #ffffff;
  --accent: #363636;
  --accent-hover: #363636;
  --text-dark: #1a1a1a;
  --text-mid: #444;
  --text-light: #888;
  --nav-link: #2563a8;
  --nav-link-active: #417af4;
  --border: #d0ceca;
  --card-border: #c8c4c0;
  --font: 'Montserrat', sans-serif;
  --transition: 0.2s ease;

  --grid-color-one: rgb(255, 255, 255);
  --grid-color-two: rgb(244, 244, 244);
  --grid-size: 100px 100px;
  --grid-speed: 500s;
}

html {
  scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text-dark);
    font-size: 14px;
    line-height: 1.6;
    overflow-x: hidden;

    background-size: var(--grid-size);
    animation: scroll var(--grid-speed) linear infinite;
    background-image: repeating-conic-gradient(
      var(--grid-color-two) 0% 25%, 
      var(--grid-color-one) 0% 50%
    );
    overflow-y: visible; /* disable vertical scrolling */
    overflow-x: hidden; /* disable horizontal scroll */
}

@keyframes scroll {
    100%{
        background-position: 500% -1000%;
    }
}

a {
  color: var(--nav-link);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════ */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ═══════════════════════════════════════════════
   SIDEBAR
═══════════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 100;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: transform 0.3s ease;

  filter:drop-shadow(0px 0px 10px #00000042);
}

.sidebar__inner {
  padding: 32px 20px 40px;
}

/* ── Brand ── */
.brand__name {
  font-size: 37px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.brand__role {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.brand__location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.brand__location img {
  width: 13px;
  height: 13px;
  opacity: 0.65;
  flex-shrink: 0;
}

.brand__bio {
  font-size: 11.5px;
  color: var(--text-mid);
  margin-bottom: 14px;
  line-height: 1.55;
}

.brand__icons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.brand__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.75;
  transition: opacity var(--transition), transform var(--transition);
  filter: grayscale(20%);
}
.brand__icon:hover { opacity: 1; transform: scale(1.15); }

.brand__contact {
  font-size: 11px;
  color: var(--text-mid);
  line-height: 1.8;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.brand__contact a {
  color: var(--nav-link);
  font-weight: 600;
}
.brand__contact a:hover { color: var(--accent); }

/* ── Sidebar Nav ── */
.sidebar__nav {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.sidebar__nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar__nav li {
  counter-increment: nav-counter;
}

.nav-link {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  padding: 4px 6px;
  border-radius: 3px;
  transition: color var(--transition), background var(--transition);
  cursor: pointer;
  user-select: none;
}

.nav-link:hover {
  color: var(--nav-link);
  background: rgba(37, 99, 168, 0.06);
}

.nav-link.active {
  color: var(--nav-link-active);
}

.nav-link .nav-num {
  font-weight: 700;
  margin-right: 4px;
  color: inherit;
}

/* ═══════════════════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════════════════ */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  padding: 48px 48px 80px;
  max-width: 100%;
}

/* ═══════════════════════════════════════════════
   SECTION
═══════════════════════════════════════════════ */
.section {
  margin-bottom: 64px;
}

.section__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.section__rule {
  flex: 1;
  height: 1px;
  background: var(--card-border);
}

.section__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  letter-spacing: -0.3px;
}

.section__subtitle {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
  text-align: center;
  line-height: 1.65;
  margin-bottom: 28px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ═══════════════════════════════════════════════
   GAMES GRID
═══════════════════════════════════════════════ */
.games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* ── Game Card ── */
.game-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.game-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.game-card__video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--accent);
  overflow: hidden;
}

.game-card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback placeholder when video isn't loaded */
.game-card__video-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  z-index: 0;
  pointer-events: none;
}

.game-card__video {
  position: relative;
  z-index: 1;
}

.game-card__body {
  padding: 14px 16px 16px;
}

.game-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
  text-align: center;
}

.game-card__systems {
  font-size: 11.5px;
  color: var(--text-mid);
  line-height: 1.65;
  text-align: center;
}

/* ═══════════════════════════════════════════════
   POSTS LIST (Systems)
═══════════════════════════════════════════════ */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ── Post Card ── */
.post-card {
  display: flex;
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.08);
  transform: translateX(3px);
}

.post-card__cover {
  width: 140px;
  min-width: 140px;
  background: #b0b0b0;
  overflow: hidden;
  position: relative;
}

.post-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder shimmer for empty covers */
.post-card__cover.placeholder {
  background: linear-gradient(135deg, #c8c4c0 0%, #b8b4b0 50%, #c8c4c0 100%);
  background-size: 200% 200%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.post-card__body {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.post-card__excerpt {
  font-size: 12px;
  color: var(--text-mid);
  line-height: 1.65;
}

/* Empty / coming-soon card */
.post-card.post-card--placeholder .post-card__title {
  color: var(--nav-link);
  font-weight: 600;
  font-size: 13px;
}

/* ═══════════════════════════════════════════════
   MOBILE HEADER
═══════════════════════════════════════════════ */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 52px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 200;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.mobile-header__name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.mobile-header__toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.mobile-header__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  transition: transform 0.25s ease, opacity 0.25s ease;
  border-radius: 2px;
}

/* Hamburger → X when open */
.mobile-header__toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-header__toggle.open span:nth-child(2) { opacity: 0; }
.mobile-header__toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 99;
}
.sidebar-overlay.active { display: block; }

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */
@media (max-width: 860px) {
  .games-grid {
    grid-template-columns: 1fr;
  }

  .main {
    padding: 32px 24px 60px;
  }
}

@media (max-width: 700px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    top: 0;
    width: 260px;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  }

  .main {
    margin-left: 0;
    padding: 72px 16px 60px;
    max-width: 100%;
  }

  .section__subtitle br {
    display: none;
  }

  .post-card__cover {
    width: 100px;
    min-width: 100px;
  }

  .section__title {
    font-size: 18px;
  }
}

@media (max-width: 420px) {
  .post-card {
    flex-direction: column;
  }

  .post-card__cover {
    width: 100%;
    min-width: 100%;
    height: 120px;
  }
}

/* ═══════════════════════════════════════════════
   SCROLLBAR (desktop)
═══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }