:root {
  color-scheme: dark;
  --bg: #0e0f13;
  --bg-elevated: #16181f;
  --border: #2a2d37;
  --text: #eceef2;
  --text-dim: #9aa0ae;
  --accent: #6ee7b7;
  --accent-dim: #3fa980;
  --radius: 14px;
  --max-width: 980px;
}

* {
  box-sizing: border-box;
}

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

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

a:hover {
  text-decoration: underline;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

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

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

nav a {
  color: var(--text-dim);
  margin-left: 24px;
  font-size: 0.95rem;
}

nav a:hover,
nav a.active {
  color: var(--text);
  text-decoration: none;
}

main {
  padding: 56px 0 80px;
}

h1 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.subtitle {
  color: var(--text-dim);
  margin: 0 0 40px;
  max-width: 560px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.project-card {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.project-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-2px);
  text-decoration: none;
}

.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #1c2030, #12141b);
}

.project-body {
  padding: 16px 18px 20px;
}

.project-title {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 6px;
}

.project-desc {
  color: var(--text-dim);
  font-size: 0.92rem;
  margin: 0;
}

.about-content p {
  max-width: 620px;
}

body.play-page {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.play-header {
  flex: 0 0 auto;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  background: var(--bg-elevated);
}

.play-header .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  color: var(--text-dim);
  font-size: 0.9rem;
  white-space: nowrap;
}

.back-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.play-title {
  font-weight: 600;
  color: var(--text);
  margin: 0;
  font-size: 1rem;
}

.game-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  line-height: 0;
}

.game-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.unity-scale-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: #fff;
}

.unity-scale-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
}

footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
