:root {
  --ink: #141413;
  --clay: #cc785c;
  --ivory: #faf9f5;
  --muted: #6e6a5f;
  --hair: #e3ddd1;
  --card: #ffffff;
  --sans: "IBM Plex Sans", ui-sans-serif, -apple-system, sans-serif;
  --serif: "IBM Plex Serif", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 1060px;
  margin: 0 auto;
  padding: 2.6rem clamp(1.1rem, 4vw, 2.4rem) 2rem;
}

/* ---- Masthead ---- */
.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem 1.4rem;
  padding-bottom: 0.5rem;
}
.name {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---- Chips (pills, matching the resume) ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.34em;
  padding: 0.24em 0.62em;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--sans);
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  line-height: 1;
  transition: border-color 0.18s, color 0.18s;
}
.chip:hover { border-color: var(--clay); color: var(--ink); }
.chip svg { height: 0.92em; width: auto; display: block; }
.repo-name svg { height: 0.95em; width: auto; vertical-align: -0.12em; margin-right: 0.35em; }
.chip .ico-ink { fill: var(--ink); }
.chip .ico-star { fill: var(--clay); }
.chip .count { color: var(--muted); }

/* ---- Sections ---- */
.section { margin-top: 2.1rem; }
.section-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--clay);
  margin: 0 0 0.9rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--hair);
}

/* ---- 2x2 grid ---- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* ---- Cards ---- */
.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: 12px;
  padding: 1.05rem 1.1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: var(--clay);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, 0.4);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.repo-name { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; }
.repo-name .owner { color: var(--muted); font-weight: 400; }

/* Paper thumbnail */
.thumb {
  aspect-ratio: 16 / 9;
  background: #f4f2ee;
  border: 1px solid var(--hair);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.7rem;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }

.paper-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.3rem;
}
.badge {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.paper-title {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.28;
  margin: 0 0 0.55rem;
}

/* Bullets */
.bullets { margin: 0.1rem 0 0; padding: 0; list-style: none; }
.bullets li {
  position: relative;
  padding-left: 0.95em;
  font-size: 0.92rem;
  line-height: 1.42;
  color: #44423d;
  margin-bottom: 0.3rem;
}
.bullets li:last-child { margin-bottom: 0; }
.bullets li::before {
  content: "–";
  position: absolute;
  left: 0;
  color: var(--clay);
}

/* ---- Footer ---- */
.footer {
  margin-top: 2.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hair);
  font-family: var(--sans);
  font-size: 0.78rem;
  color: #b8b3a7;
}

/* ---- Responsive ---- */
@media (max-width: 720px) {
  .grid { grid-template-columns: 1fr; }
  .masthead { align-items: flex-start; }
}
