/* Inquisitive Software — the maker's page. Sparse on purpose: the
   handwriting, then the projects as tiles. Stone ground and ink, as River's
   own pages of their own are (river/common.css, body.page); the featured
   project's tile is in that app's colours, a window into it. */

:root {
  --ground: #DFDBD4;
  --ink: #2C2A27;
  --dim: #59534D;
  --rule: rgba(44, 42, 39, 0.14);
  --raised: rgba(255, 255, 255, 0.42);
  --accent: #23756D;

  /* River's Midnight, for its tile */
  --midnight-ground: #161B26;
  --midnight-fg: #E6ECF5;
  --midnight-dim: #9AA3B6;
  --midnight-highlight: #3FB8A6;

  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100svh; display: flex; flex-direction: column;
  background: var(--ground); color: var(--ink);
  font-family: var(--sans); -webkit-font-smoothing: antialiased;
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- the handwriting ----------
   The same trace as River's byline; non-scaling stroke, so it holds its
   weight at this size as it does at the bar's. */
.masthead { max-width: 1040px; width: 100%; margin: 0 auto; padding: clamp(40px, 10vh, 110px) 0 clamp(28px, 6vh, 64px); }
.masthead h1 { margin: 0; line-height: 0; }
.logo {
  height: clamp(84px, 14vw, 150px); width: auto; aspect-ratio: 2213 / 614; max-width: 100%;
  color: var(--ink); overflow: visible;
}

/* ---------- projects ----------
   Grouped under small headings, Current then Past. */
.projects { flex: 1; max-width: 1040px; width: 100%; margin: 0 auto; display: grid; gap: clamp(36px, 6vh, 56px); align-content: start; }
.projects section { display: grid; gap: 14px; }
.group {
  margin: 0; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dim);
}
.tiles { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.project {
  border-radius: 24px; overflow: hidden;
  background: var(--raised); border: 1px solid var(--rule);
  padding: 22px 24px;
}
.project h3 { margin: 0 0 6px; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.project h3 .dates { font-size: 15px; font-weight: 500; letter-spacing: 0; color: var(--dim); }
.project p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--dim); }
.project:has(.tile-link) { padding: 0; transition: background 0.2s, border-color 0.2s; }
.project:has(.tile-link):hover { background: rgba(255, 255, 255, 0.7); border-color: rgba(35, 117, 109, 0.35); }
.tile-link { display: block; padding: 22px 24px; text-decoration: none; }
/* A tile with its app's icon: the icon to the left, name and line beside it. */
.tile-link.has-icon { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.tile-link.has-icon .app-icon {
  grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 22%;
  box-shadow: 0 0 0 1px var(--rule), 0 4px 12px -6px rgba(44, 42, 39, 0.45);   /* a white icon on a pale card: its edge drawn in */
}
.tile-link.has-icon h3 { align-self: end; }
.tile-link.has-icon p { align-self: start; }
/* Off the site: an arrow after the name says so. */
.tile-link.external h3::after { content: " ↗"; font-weight: 400; color: var(--dim); }

/* River: in Midnight, its screenshot rising from the tile's foot. */
.project.featured {
  padding: 0;
  background: var(--midnight-ground); color: var(--midnight-fg); border: 0;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.55);
}
.project-link {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center;
  gap: clamp(20px, 4vw, 48px); padding: clamp(24px, 4vw, 44px) clamp(24px, 4vw, 44px) 0;
  text-decoration: none;
}
.featured .project-text { padding-bottom: clamp(24px, 4vw, 44px); }
.featured .project-text p { color: var(--midnight-dim); font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; max-width: 32em; }
.featured .project-text .status {
  display: inline-block; margin-bottom: 14px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--midnight-highlight); background: rgba(63, 184, 166, 0.14);
}
/* River's name as River's bar sets it: rounded, SF Pro Rounded where the
   system has it, Nunito everywhere else. */
.featured .river-name {
  margin: 0 0 10px; line-height: 1;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", var(--sans);
  font-weight: 500; letter-spacing: -0.012em; font-size: clamp(48px, 6vw, 72px);
  color: #fff;
}
.shot {
  display: block; width: 100%; height: auto; align-self: end;
  border-radius: 14px 14px 0 0; border: 1px solid rgba(230, 236, 245, 0.12); border-bottom: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.project-link:hover .shot { transform: translateY(-4px); }
@media (prefers-reduced-motion: reduce) { .shot { transition: none; } }

@media (max-width: 720px) {
  .project-link { grid-template-columns: 1fr; }
  .featured .project-text { padding-bottom: 0; }
}

/* ---------- footer ---------- */
.foot {
  max-width: 1040px; width: 100%; margin: 0 auto;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: clamp(48px, 10vh, 96px) 0 max(32px, env(safe-area-inset-bottom));
  font-size: 14px; color: var(--dim);
}
.foot p { margin: 0; }
.foot a { color: var(--accent); text-decoration: none; font-weight: 500; }
.foot a:hover { text-decoration: underline; }
