:root {
  --bg-primary: #111;
  --bg-secondary: #181818;
  --text-primary: #e0e0e0;
  --text-heading: #ffffff;
  --text-muted: #aaaaaa;
  --link-color: #7ec8c8;
  --nav-link-color: #f5f5f5;
  --button-bg: #111827;
  --button-text: #ffffff;
}

[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f3f3f3;
  --text-primary: #1a1a1a;
  --text-heading: #000000;
  --text-muted: #666666;
  --link-color: #0f766e;
  --nav-link-color: #1a1a1a;
  --button-bg: #e5e7eb;
  --button-text: #111827;
}

html, body {
  margin: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  line-height: 1.5;
  background: var(--bg-primary);
  color: var(--text-primary);
}

header {
  background: var(--bg-secondary);
  padding: 10px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

a:visited {
  color: var(--link-color);
}

nav a {
  color: var(--nav-link-color);
  margin-right: 15px;
}

nav a:visited {
  color: var(--nav-link-color);
}

a:hover {
  text-decoration: underline;
}

nav a:hover {
  text-decoration: underline;
}

main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 40px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

h1, h2 {
  color: var(--text-heading);
}

ul {
  list-style: none;
  padding: 0;
}

li {
  margin-bottom: 20px;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer a, footer a:visited {
  color: var(--text-muted);
  text-decoration: underline;
}

.toggle-button {
  background: var(--button-bg);
  color: var(--button-text);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  cursor: pointer;
}

/* ---- Cards, accents, labels ---- */
:root { --card-border: #262626; --accent-soft: rgba(126, 200, 200, 0.12); }
[data-theme="light"] { --card-border: #e2e2e2; --accent-soft: rgba(15, 118, 110, 0.08); }

/* Teal line under the menu bar */
header {
  border-bottom: 2px solid var(--link-color);
}

/* Current page in the menu */
nav a[aria-current="page"] {
  color: var(--link-color);
  font-weight: 600;
}

/* Short teal line under page titles */
h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 4px;
  margin-top: 10px;
  border-radius: 2px;
  background: var(--link-color);
}

/* Project cards */
main > section > ul > li {
  position: relative;
  cursor: pointer;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--link-color);
  border-radius: 10px;
  padding: 16px 20px;
  transition: transform 0.15s ease;
}

main > section > ul > li:hover {
  transform: translateY(-2px);
  background: var(--accent-soft);
  border-color: var(--link-color);
}

/* Whole card clickable: the link stretches over the card */
main > section > ul > li > a {
  display: inline-block;
  font-weight: 600;
}

main > section > ul > li > a::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

main > section > ul > li:hover > a {
  text-decoration: none;
}

/* Small labels like HTML / Python */
.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  padding: 4px 8px;
  margin: 0 6px 0 4px;
  border-radius: 999px;
  vertical-align: 2px;
  color: var(--link-color);
  background: var(--accent-soft);
  border: 1px solid var(--link-color);
}

/* Short description under the title */
.desc {
  display: block;
  color: var(--text-muted);
  margin: 4px 0 8px;
}

/* Expandable story: sits above the card link so clicking it doesn't open the game */
.more {
  position: relative;
  z-index: 1;
  margin: -4px 0 8px;
  pointer-events: none;
}

.more > * {
  pointer-events: auto;
  cursor: auto;
}

.more summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.15s ease;
}

.more[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.more summary:hover {
  color: var(--link-color);
}

.more p {
  margin: 8px 0 0;
}