/* Tokens -------------------------------------------------------------- */
:root {
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --text: #1f2328;
  --muted: #5d6370;
  --line: #e2ddd2;
  --accent: #2f6f62;
  --accent-soft: #e3efe9;
  --warn-soft: #f6ecd6;
  --warn: #8a5a12;
  --radius: 10px;
  --max: 760px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15181c;
    --surface: #1d2126;
    --text: #e6e8eb;
    --muted: #9aa1ab;
    --line: #2d333b;
    --accent: #7cc4b2;
    --accent-soft: #20332e;
    --warn-soft: #3a2f1a;
    --warn: #e2b768;
  }
}

/* Base ---------------------------------------------------------------- */
* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 2rem; overflow-wrap: anywhere; }
h2 { font-size: 1.25rem; margin-top: 2.5rem; }
h3 { font-size: 1.05rem; }
p, ul { margin: 0 0 1rem; }
code { font-family: var(--mono); font-size: .9em; }

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

/* Header / footer ----------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}
.site-header .name { font-weight: 600; color: var(--text); text-decoration: none; }
.site-header nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 4rem;
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: .9rem;
}

main { padding: 2.5rem 0 0; }

/* Intro --------------------------------------------------------------- */
.intro .lede { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; padding: 0; list-style: none; }

/* Project cards ------------------------------------------------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr));
  gap: 1rem;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
}
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--muted); font-size: .95rem; }
.card .more { margin-top: auto; font-size: .95rem; }
.card .thumb { display: block; margin: .25rem 0 .75rem; }
.card .thumb img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
}

.tags { display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0 0 .75rem; list-style: none; }
.tags li {
  font-family: var(--mono);
  font-size: .75rem;
  padding: .1rem .5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

.status {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: .1rem .5rem;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: .5rem;
}
.card .status { align-self: flex-start; }
.status.wip { background: var(--warn-soft); color: var(--warn); }

/* Skills -------------------------------------------------------------- */
.skills { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.skills dt { font-weight: 600; }
.skills dd { margin: 0; color: var(--muted); }
@media (max-width: 560px) {
  .skills { grid-template-columns: 1fr; }
  .skills dd { margin-bottom: .6rem; }
}

/* Project pages ------------------------------------------------------- */
.back { font-size: .95rem; }
.meta { color: var(--muted); margin-bottom: 1.25rem; }
.facts {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem 1.25rem;
  margin: 0 0 1.5rem;
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }

figure { margin: 1.5rem 0; }
figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
figcaption { color: var(--muted); font-size: .9rem; margin-top: .4rem; }

.todo {
  border: 1px dashed var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .95rem;
}

/* Desktop and phone screenshots side by side */
.shots { display: grid; grid-template-columns: 3fr 1fr; gap: .75rem; align-items: start; }
.shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.shots figcaption { grid-column: 1 / -1; }
@media (max-width: 560px) { .shots { grid-template-columns: 1fr; } }
