/* Classic, low-glare dark theme */
:root {
  --bg: #18181a;
  --surface: #222226;
  --border: #38383f;
  --text: #e4e4e7;
  --text-muted: #a1a1aa;
  --link: #7aa2f7;
  --link-hover: #a5c0ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
}

.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

/* Header & Navigation */
.site-header {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.nav-list a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  text-decoration: underline;
}

.nav-kofi-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.nav-kofi-btn:hover {
  border-color: var(--link);
  color: var(--link-hover);
  text-decoration: none;
}

/* Main Content */
main {
  min-height: 65vh;
}

h1, h2, h3 {
  line-height: 1.25;
  margin-top: 0;
}

.feed-entry,
.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 1.25rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Embedded Chartizard */
.chartizard-frame {
  width: 100%;
  height: 78vh;
  min-height: 600px;
  border: 1px solid var(--border);
  background-color: #1e1e1e;
}

.container-wide {
  max-width: 1400px;
  width: 96vw;
}

/* Full-viewport App Shell Mode (e.g. /chartizard/) */
body.app-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

body.app-shell .site-header {
  margin-bottom: 0;
  flex: 0 0 auto;
}

.app-main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  width: 100%;
}

body.app-shell .chartizard-frame {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  display: block;
}

/* Launch Button (e.g. Chartizard landing page) */
.launch-btn {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--link);
  margin-bottom: 1.5rem;
}

.launch-btn:hover {
  border-color: var(--link);
  text-decoration: none;
}

/* About Page Layout */
.about-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.about-portrait {
  width: 220px;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
}

.about-bio {
  flex: 1;
}

@media (max-width: 600px) {
  .about-layout {
    flex-direction: column;
  }
}

.site-logo {
  height: 40px;
  width: auto;
  display: block;
}

.steam-widget {
  max-width: 100%;
  border: 0;
  display: block;
  margin-top: 0.75rem;
}
