/* Components added for the project cards, case studies and notes. */

/* Hero stats */

.stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0 0 2.25rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.stats li { max-width: none; }

.stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.85rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--accent-ink);
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

/* Project cards */

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense;
  gap: 1.5rem;
}

.card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 6px 18px rgba(27, 36, 48, 0.08);
}

.card-media {
  display: block;
  aspect-ratio: 16 / 10;
  background: #f4f6f8;
  border-bottom: 1px solid var(--rule);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  display: block;
}

.card-media--contain img {
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 0.5rem;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem 1.2rem 1.2rem;
  flex: 1;
}

.card-kicker {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.card h3 { font-size: 1.2rem; }

.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h3 a:hover { color: var(--accent-ink); }

.card-outcome { color: var(--ink); }

.card .chips li { font-size: 0.8rem; }

.card-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  margin-top: auto;
  padding-top: 0.4rem;
  font-size: 0.95rem;
}

.card-links .primary-link { font-weight: 600; }

.section-note {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Notes list */

.notes { list-style: none; }

.notes li {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 0.25rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  max-width: none;
}

.notes li:first-child { border-top: 1px solid var(--rule); }

.notes .note-tag {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-ink);
  padding-top: 0.2rem;
}

.notes a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--ink);
  text-decoration: none;
}

.notes a:hover { color: var(--accent-ink); text-decoration: underline; }

.notes p {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Skills sheet built from rows so it can be reordered */

.skill-rows { display: grid; gap: 0.7rem; }

.skill-rows > div {
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  column-gap: 1.5rem;
}

.skill-rows dt {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
}

/* Sub-pages: case studies and notes */

.page-head { padding: 3.25rem 0 1.5rem; }

.crumb {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.page-head h1 {
  font-size: clamp(2rem, 4.2vw, 2.8rem);
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.page-lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.glance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.glance dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.glance dd { font-size: 0.98rem; }

.prose h2 {
  font-size: 1.45rem;
  margin: 2.5rem 0 0.9rem;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

.prose p + p,
.prose p + ul,
.prose ul + p { margin-top: 0.8rem; }

.prose ul { padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.prose li::marker { color: var(--accent); }

.prose code {
  background: #f4f6f8;
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
}

.figure { margin: 1.75rem 0; }

.figure a { display: block; }

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
}

.figure figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.figure--wide { width: min(1080px, calc(100vw - 2.5rem)); margin-left: 50%; transform: translateX(-50%); }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.gallery .figure { margin: 0; }

.fix-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.fix-table th,
.fix-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.75rem 0.65rem 0;
  border-bottom: 1px solid var(--rule);
}

.fix-table th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.callout {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.next-up {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats strong { font-size: 1.55rem; }

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


  .notes li { grid-template-columns: 1fr; }
  .notes p { grid-column: 1; }

  .skill-rows > div { grid-template-columns: 1fr; row-gap: 0.15rem; }

  .page-head { padding: 2rem 0 1rem; }
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery { grid-template-columns: 1fr; }
  .figure--wide { width: 100%; margin-left: 0; transform: none; }

  .fix-table thead { display: none; }
  .fix-table tr { display: block; padding: 0.6rem 0; border-bottom: 1px solid var(--rule); }
  .fix-table td { display: block; border: 0; padding: 0.15rem 0; }
  .fix-table td::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--muted);
  }
}

.about-sheet { margin-top: 2rem; }

.figure--tall { max-width: 620px; }

.prose pre {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  overflow-x: auto;
  background: #1b2430;
  color: #e9eef3;
  border-radius: 6px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.prose pre code { background: none; padding: 0; color: inherit; }

.hero .cta-row { margin-bottom: 0; }


.prose code,
.page-lead code,
.page-head h1,
.notes p code { overflow-wrap: anywhere; }

.hero { padding-bottom: 1.5rem; }
