/* Smolalab custom styles — layered on top of the risotto theme + base16 palette.
   Brand echoes the old VitePress look: warm orange accent with a teal counterpoint. */

:root {
  --sl-accent: var(--accent-primary, #b063e0);
  --sl-accent-strong: var(--accent-hover, #c485f6);
  --sl-accent-2: var(--accent-secondary, #00ffff);
  --sl-card-bg: var(--bg-secondary, rgba(255, 255, 255, 0.05));
  --sl-card-border: var(--border-color, rgba(255, 255, 255, 0.1));
  --sl-text: var(--text-primary, #f1f5f9);
  --sl-text-muted: var(--text-secondary, #cbd5e1);
  --sl-radius: 14px;
}

/* ---------- Showcase pages: go full width and hide the sidebar ---------- */
.page:has(.showcase) {
  grid-template-columns: minmax(0, 1fr) !important;
}
.page:has(.showcase) .page__aside {
  display: none;
}
.showcase {
  max-width: 1180px;
}
@media (min-width: 960px) {
  .page:has(.home) {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .page:has(.home) .page__aside {
    display: none;
  }
  .home {
    max-width: 1100px;
  }
}

/* ---------- Reusable bits ---------- */
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
  font-size: 0.85rem;
  color: var(--sl-text-muted);
}
.card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--sl-text);
}
.card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin: auto 0 0;
  font-size: 0.86rem;
}
.card-links a {
  color: var(--sl-accent);
  text-decoration: none;
}
.card-links a:hover {
  text-decoration: underline;
}
.muted {
  color: var(--sl-text-muted);
}
.plain-list {
  list-style: none;
  padding: 0;
}
.plain-list li {
  padding: 0.25rem 0;
}

/* Pills / tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.2rem 0 0;
}
.tags span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sl-card-border);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.74rem;
  color: var(--sl-text);
  background: var(--base02, #2a2a2a);
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.92rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  cursor: pointer;
}
.btn--solid {
  background: var(--sl-accent);
  color: #1a1a1a;
  font-weight: 600;
}
.btn--solid:hover {
  background: var(--sl-accent-2);
  color: #11181a;
}
.btn--ghost {
  background: transparent;
  color: var(--sl-accent);
  border-color: var(--sl-accent);
}
.btn--ghost:hover {
  background: rgba(220, 150, 86, 0.12);
}

/* ---------- Home ---------- */
.home__hero {
  padding: 1.5rem 0 1rem;
}
.home__eyebrow {
  margin: 0 0 0.4rem;
  color: var(--sl-accent-2);
  font-size: 1rem;
}
.home__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
  margin: 0 0 0.8rem;
  background: linear-gradient(120deg, var(--sl-accent) 30%, var(--sl-accent-2) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.home__tagline {
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 60ch;
  color: var(--sl-text);
}
.home__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.home-feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 2rem 0;
  border: 1px solid var(--sl-card-border);
  border-radius: var(--sl-radius);
  overflow: hidden;
  background: var(--sl-card-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.home-feature:hover {
  transform: translateY(-2px);
  border-color: var(--sl-accent);
}
@media (min-width: 720px) {
  .home-feature {
    grid-template-columns: 320px 1fr;
  }
}
.home-feature__media {
  background: #000;
}
.home-feature__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}
.home-feature__body {
  padding: 1.2rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.home-feature__badge {
  align-self: flex-start;
  background: rgba(220, 150, 86, 0.16);
  border: 1px solid var(--sl-accent);
  color: var(--sl-accent);
  border-radius: 999px;
  padding: 0.1rem 0.6rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.home-feature__body h2 {
  margin: 0;
}
.home-feature__body p {
  margin: 0;
  color: var(--sl-text);
}
.home-feature__cta {
  margin-top: 0.3rem;
  color: var(--sl-accent);
  font-weight: 600;
}

.home__grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 2rem 0;
}
.home-card {
  display: block;
  border: 1px solid var(--sl-card-border);
  border-radius: var(--sl-radius);
  background: var(--sl-card-bg);
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.home-card:hover {
  transform: translateY(-2px);
  border-color: var(--sl-accent);
}
.home-card h3 {
  margin: 0 0 0.4rem;
  color: var(--sl-accent-2);
}
.home-card p {
  margin: 0;
  color: var(--sl-text);
  font-size: 0.95rem;
}

/* ---------- Games: featured hero tile ---------- */
.games-featured {
  margin: 1.2rem 0 2rem;
}
.featured-tile {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--sl-accent);
  border-radius: var(--sl-radius);
  overflow: hidden;
  background: var(--sl-card-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease;
}
.featured-tile:hover {
  transform: translateY(-2px);
}
@media (min-width: 760px) {
  .featured-tile {
    grid-template-columns: 420px 1fr;
  }
}
.featured-tile__media {
  background: #000;
}
.featured-tile__media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: cover;
}
.featured-tile__body {
  padding: 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.featured-tile__badge {
  align-self: flex-start;
  background: var(--sl-accent);
  color: #1a1a1a;
  border-radius: 999px;
  padding: 0.12rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.featured-tile__body h2 {
  margin: 0;
  font-size: 1.7rem;
}
.featured-tile__cta {
  margin-top: 0.3rem;
  color: var(--sl-accent);
  font-weight: 600;
}

/* ---------- Games grid ---------- */
.games-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sl-card-border);
  border-radius: var(--sl-radius);
  overflow: hidden;
  background: var(--sl-card-bg);
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.game-card:hover {
  transform: translateY(-2px);
  border-color: var(--sl-accent);
}
.game-card__thumb {
  display: block;
  background: #000;
}
.game-card__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 315 / 250;
  object-fit: cover;
}
.game-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem;
  flex: 1;
}
.game-card__body h3 {
  margin: 0;
  font-size: 1.05rem;
}
.game-card__body h3 a {
  color: var(--sl-text);
  text-decoration: none;
}
.game-card__body h3 a:hover {
  color: var(--sl-accent);
}

/* ---------- Game detail ---------- */
.game-detail__thumb {
  margin: 0.4rem 0 1.2rem;
  border-radius: var(--sl-radius);
  overflow: hidden;
  border: 1px solid var(--sl-card-border);
  max-width: 720px;
}
.game-detail__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 460 / 215;
  object-fit: cover;
}
.game-detail__genre {
  font-size: 1rem;
  color: var(--sl-accent-2);
}
.game-detail__facts ul {
  margin: 0.4rem 0 1.4rem;
}
.game-detail__facts li {
  margin: 0.2rem 0;
}
.game-detail__tags h2,
.game-detail__facts h2 {
  font-size: 1.2rem;
}
.game-detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem 0 0.5rem;
}
.game-detail__actions .btn {
  border-color: var(--sl-card-border);
  color: var(--sl-text);
  background: var(--sl-card-bg);
}
.btn--steam,
.btn--steam-demo {
  background: #1b2838;
  border-color: #1b2838;
  color: #fff;
}
.btn--steam:hover,
.btn--steam-demo:hover {
  background: #2a475e;
  border-color: #2a475e;
}
.btn--discord {
  background: #5865f2;
  border-color: #5865f2;
  color: #fff;
}
.btn--discord:hover {
  background: #4752c4;
  border-color: #4752c4;
}
.btn--itch-io {
  background: #fa5c5c;
  border-color: #fa5c5c;
  color: #fff;
}
.btn--itch-io:hover {
  background: #e04b4b;
  border-color: #e04b4b;
}
.btn--ps5:hover,
.btn--switch:hover,
.btn--xbox:hover {
  border-color: var(--sl-accent);
  color: var(--sl-accent);
}

/* ---------- Projects: language color coding ---------- */
.lang-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 0.5rem 0 1.3rem;
  font-size: 0.85rem;
  color: var(--sl-text-muted);
}
.lang-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.lang-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--sl-text-muted);
}
.lang-cs    { background: #9b4dff; }   /* C#      */
.lang-cpp   { background: #0d9488; }   /* C++     */
.lang-zig   { background: #f7a41d; }   /* Zig     */
.lang-odin  { background: #2563eb; }   /* Odin    */
.lang-gdscript { background: #4b8bcc; } /* GDScript */
.lang-other { background: #6b7280; }

.projects-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.project-card {
  border: 1px solid var(--sl-card-border);
  border-left-width: 4px;
  border-radius: var(--sl-radius);
  background: var(--sl-card-bg);
}
.project-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  flex: 1;
}
.project-card__body h3 {
  margin: 0;
}
.project-card__body h3 a {
  color: var(--sl-text);
  text-decoration: none;
}
.project-card__body h3 a:hover {
  color: var(--sl-accent);
}
.project-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
/* left accent border per language */
.lang-side.lang-cs       { border-left-color: #9b4dff; }
.lang-side.lang-cpp      { border-left-color: #0d9488; }
.lang-side.lang-zig      { border-left-color: #f7a41d; }
.lang-side.lang-odin     { border-left-color: #2563eb; }
.lang-side.lang-gdscript { border-left-color: #4b8bcc; }
.lang-side.lang-         { border-left-color: var(--sl-text-muted); }

/* ---------- Assets ---------- */
.assets-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.asset-card {
  border: 1px solid var(--sl-card-border);
  border-radius: var(--sl-radius);
  background: var(--sl-card-bg);
}
.asset-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  flex: 1;
}
.asset-status span {
  border: 1px dashed var(--sl-accent);
  color: var(--sl-accent);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.75rem;
}

/* ---------- Posts ---------- */
.posts-feed {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sl-card-border);
  border-radius: var(--sl-radius);
  overflow: hidden;
  background: var(--sl-card-bg);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-2px);
  border-color: var(--sl-accent);
}
.post-card__media {
  background: #000;
}
.post-card__media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem;
  flex: 1;
}
.post-card__body h3 {
  margin: 0;
  font-size: 1.05rem;
}

/* ---------- Misc content polish ---------- */
.showcase h1,
.home__hero + .home__grid {
  scroll-margin-top: 1rem;
}
.content__header h1 {
  margin-bottom: 0.4rem;
}
