:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #5f6d65;
  --line: #d9ded8;
  --paper: #fbfaf4;
  --panel: #ffffff;
  --tool: #ff7a2b;
  --learning: #65b83f;
  --game: #3368dd;
  --accent: #18a9a6;
  --glow: #d9ff3d;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Yu Gothic", "Meiryo", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  width: min(1348px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 18px;
  border-bottom: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--glow);
  border: 3px solid var(--ink);
  box-shadow: 5px 5px 0 var(--glow);
  font-weight: 900;
}

.brand-name {
  display: block;
  font-family: "Arial Black", "Yu Gothic", sans-serif;
  font-size: 56px;
  line-height: .9;
  font-weight: 900;
}

.brand-sub {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.site-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  min-width: 74px;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 11px 14px;
  text-align: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
}

.site-nav a:focus-visible,
.button:focus-visible,
.thumb:focus-visible {
  outline: 4px solid var(--accent);
  outline-offset: 3px;
}

main {
  width: min(1348px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: end;
  padding: 34px 0 24px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.16;
}

.lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
  font-weight: 700;
}

.update-box {
  background: #eef8f7;
  border: 2px solid var(--ink);
  padding: 16px 18px;
  box-shadow: 5px 5px 0 var(--accent);
}

.update-box h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.update-box p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.8;
  font-weight: 700;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding-bottom: 36px;
}

.project-card {
  min-width: 0;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
  border: 2px solid var(--line);
  border-radius: 8px;
}

.thumb {
  position: relative;
  height: 244px;
  display: block;
  overflow: hidden;
  background: #e9ede8;
  border-bottom: 2px solid var(--line);
  text-decoration: none;
}

.thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb-math img {
  object-position: 50% 50%;
}

.category {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
  padding: 8px 12px;
  border-radius: 5px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .25);
}

.category-learning {
  background: var(--learning);
}

.category-tool {
  background: var(--tool);
}

.category-game {
  background: var(--game);
}

.project-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.project-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
}

.project-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
}

.project-icon rect,
.project-icon path,
.project-icon circle {
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-icon circle,
.game-icon path:first-child {
  stroke: none;
}

.learning-icon rect,
.learning-icon path {
  stroke: var(--learning);
}

.tool-icon path {
  stroke: var(--tool);
}

.tool-icon circle {
  fill: var(--tool);
}

.game-icon path:first-child {
  fill: var(--game);
}

.game-icon path:last-child {
  stroke: #fff;
  stroke-width: 5;
}

.project-title h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.28;
}

.project-body p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  font-weight: 700;
}

.meta {
  display: grid;
  gap: 8px;
  margin: auto 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.meta div {
  min-width: 0;
}

.meta dt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 5px;
  padding: 9px 12px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.secondary {
  background: #fff;
  color: var(--ink);
}

.site-footer {
  width: min(1348px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 34px;
  border-top: 2px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site-header,
  main,
  .site-footer {
    width: min(100% - 28px, 1348px);
  }

  .site-header,
  .hero,
  .site-footer {
    display: block;
  }

  .brand-name {
    font-size: 42px;
  }

  .site-nav {
    justify-content: flex-start;
    margin-top: 22px;
  }

  .site-nav a {
    min-width: 0;
    flex: 1 1 calc(50% - 10px);
  }

  .hero {
    padding-top: 26px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

  .update-box {
    margin-top: 22px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 0;
  }

  .thumb {
    height: 220px;
  }

  .site-footer span + span {
    display: block;
    margin-top: 8px;
  }
}
