/* Shared by every page. The home page adds class="home"; project pages set --c to their tile's color. */
:root {
  --ink: #1b1b1f; --soft: #66666e; --line: #e7e5df; --paper: #fbfaf7; --c: #eeeeee;
  --display: Fredoka, ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --radius: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
code { font-size: .9em; background: #0000000a; padding: .1em .35em; border-radius: 5px; }

/* ---------- Home ---------- */
.masthead { max-width: 1080px; margin: 0 auto; padding: 5rem 1.5rem 3rem; text-align: center; }
.masthead h1 { font: 600 clamp(2rem, 5.5vw, 3rem)/1.1 var(--display); letter-spacing: -.015em; margin: 0; }
.masthead p { margin: .75rem 0 0; color: var(--soft); font-size: 1.05rem; }

.grid { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; display: grid; gap: 2.5rem 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(232px, 100%), 1fr)); }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .art {
  aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg);
  display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: 8%;
  box-shadow: inset 0 0 0 1px #0000000d;
  transition: transform .25s ease, box-shadow .25s ease;
}
.card .art img { max-width: 100%; max-height: 100%; width: auto; height: auto; min-height: 0; border-radius: 8px; box-shadow: 0 1px 2px #0000001f, 0 8px 20px -8px #00000040; display: block; }
.card .art.bleed { padding: 0; }
.card .art.logo { padding: 6%; }
.card .art.logo img { border-radius: 50%; box-shadow: 0 8px 20px -10px #00000059; }
.card .art.bleed img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0; box-shadow: none; }
.card .art.type { grid-template: none; padding: 1rem; text-align: center; color: var(--fg); align-content: center; gap: .25rem; }
.card .art.type b { font: 600 clamp(2rem, 4.2vw, 2.6rem)/1 var(--display); letter-spacing: -.01em; }
.card .art.type span { font-size: .9rem; opacity: .8; }
.card:hover .art, .card:focus-visible .art { transform: translateY(-4px); box-shadow: inset 0 0 0 1px #0000000d, 0 14px 28px -14px #00000059; }
.card h2 { font: 600 1.1rem/1.3 var(--display); margin: .9rem 0 .25rem; }
.card p { margin: 0; color: var(--soft); font-size: .92rem; line-height: 1.45; }
.card:focus-visible { outline: none; }
.card:focus-visible .art { outline: 2px solid var(--ink); outline-offset: 3px; }

.links { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; padding: 4.5rem 1.5rem 5rem; }
.links a { font: 500 .95rem var(--display); text-decoration: none; padding: .5rem 1.15rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; transition: border-color .15s, transform .15s; }
.links a:hover { border-color: var(--ink); transform: translateY(-1px); }

/* Phones: two tiles per row */
@media (max-width: 560px) {
  .masthead { padding: 3.25rem 1rem 2rem; }
  .grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.75rem .9rem; padding: 0 1rem; }
  .card .art { --radius: 12px; padding: 6%; }
  .card .art.bleed { padding: 0; }
  .card .art.type b { font-size: 1.6rem; }
  .card .art.type span { font-size: .75rem; }
  .card h2 { font-size: .98rem; margin-top: .65rem; }
  .card p { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Project pages ---------- */
body:not(.home) { padding-bottom: 5rem; }
body:not(.home) > * { max-width: 40rem; margin-left: auto; margin-right: auto; padding-left: 1.5rem; padding-right: 1.5rem; }
body:not(.home) > p:first-child { max-width: none; margin: 0; padding-top: 1.25rem; background: var(--c); }
body:not(.home) > p:first-child a { font: 500 .9rem var(--display); text-decoration: none; color: var(--soft); }
body:not(.home) > p:first-child a:hover { color: var(--ink); }
body:not(.home) > h1 { max-width: none; margin: 0 0 2.5rem; padding-top: 3rem; padding-bottom: 3rem; background: var(--c); text-align: center; font: 600 clamp(2rem, 6vw, 2.8rem)/1.1 var(--display); letter-spacing: -.015em; }
h2 { font: 600 1.25rem/1.3 var(--display); margin: 2.5rem auto .6rem; }
p, ul { margin-top: 0; margin-bottom: 1.2rem; }
li { margin-bottom: .5rem; }
li::marker { color: var(--soft); }
body:not(.home) a { text-decoration-color: #0000004d; text-underline-offset: 3px; }
body:not(.home) a:hover { text-decoration-color: currentColor; }
