/* Wageningen Hackathon project index.
   Theme: auto (prefers-color-scheme), tokens as CSS variables.
   Shape rule: buttons are pills, images and skeletons 10px, nothing else rounded. */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #f5f7f5;
  --surface: #eaeeeb;
  --text: #121614;
  --muted: #5b655f;
  --line: #d6ddd8;
  --accent: #1d6b45;
  --accent-ink: #f5f7f5;
  --accent-soft: #dcebe2;
  --radius-media: 10px;
  --max: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1210;
    --surface: #171c19;
    --text: #e6ebe8;
    --muted: #96a29b;
    --line: #262d29;
    --accent: #6fcf97;
    --accent-ink: #0b1f13;
    --accent-soft: #1a2e22;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.mono { font-family: "Geist Mono", ui-monospace, monospace; font-size: 0.8125rem; letter-spacing: 0; }
.muted { color: var(--muted); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}

/* Top bar */
.bar { border-bottom: 1px solid var(--line); }
.bar-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.wordmark {
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

/* Hero */
.hero {
  padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem);
  max-width: 46rem;
}
h1 {
  margin: 0;
  font-size: clamp(2.5rem, 6.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}
.lede {
  margin: 1.25rem 0 0;
  max-width: 40ch;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  color: var(--muted);
}
.count { margin: 1.75rem 0 0; color: var(--accent); min-height: 1.3em; }

/* Project list */
.projects { padding-bottom: 5rem; }

.project {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 1.25rem clamp(2rem, 5vw, 4.5rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid var(--line);
}

.project-head h2 {
  margin: 0;
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
  overflow-wrap: break-word;
  hyphens: auto;
}
.pitch { margin: 0.6rem 0 0; color: var(--muted); max-width: 34ch; }
.meta {
  margin: 1.25rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  color: var(--muted);
}
.status-live { color: var(--accent); }

.project-body > * + * { margin-top: 1.25rem; }
.desc { margin: 0; max-width: 62ch; }
.desc + .desc { margin-top: 0.85rem; }

.links { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.5rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1), background-color 160ms, border-color 160ms;
}
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn .arrow { transition: transform 160ms cubic-bezier(0.16, 1, 0.3, 1); }
.btn:hover .arrow { transform: translate(2px, -2px); }

.shot {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: var(--radius-media);
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Empty, error, loading */
.note {
  border-top: 1px solid var(--line);
  padding: 3rem 0;
  display: grid;
  gap: 0.5rem;
}
.note > * { max-width: 40rem; }
.note h2 { margin: 0; font-size: 1.375rem; letter-spacing: -0.02em; font-weight: 600; }
.note p { margin: 0; color: var(--muted); }

.skeleton { border-top: 1px solid var(--line); padding: 3rem 0; display: grid; gap: 0.9rem; }
.sk { height: 1rem; border-radius: var(--radius-media); background: var(--surface); }
.sk-title { height: 2rem; width: min(22rem, 70%); }
.sk-line { width: min(36rem, 90%); }
.sk-line.short { width: min(20rem, 55%); }

.foot { padding-bottom: 3rem; font-size: 0.875rem; }
.foot p { margin: 0; padding-top: 1.5rem; border-top: 1px solid var(--line); }

@media (max-width: 767px) {
  .project { grid-template-columns: minmax(0, 1fr); }
  .bar-inner { height: 56px; }
}

/* Entry motion: one short rise so new entries read as arriving in order. */
@media (prefers-reduced-motion: no-preference) {
  .project, .note {
    animation: rise 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(var(--i, 0) * 70ms);
  }
  .sk { animation: pulse 1.4s ease-in-out infinite; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse { 50% { opacity: 0.55; } }
