/* PT Serif — header font */
@font-face {
  font-family: "PT Serif";
  src: url("./fonts/ptserif/PTSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PT Serif";
  src: url("./fonts/ptserif/PTSerif-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* Lato — body font */
@font-face {
  font-family: "Lato";
  src: url("./fonts/lato/Lato-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #17201f;
  --muted: rgba(0, 0, 0, 0.55);
  --subtle: rgba(0, 0, 0, 0.4);
  --faint: rgba(0, 0, 0, 0.3);
  --line: #ebe7df;
  --tint: #ece8e3;
  --tint-soft: #f4f1eb;
  --tint-deep: #e0ddd5;
  --tint-hover: #e0ddd5;
  --bg: #ffffff;
  --positive: #16cb69;
  --font-heading: "PT Serif", Georgia, serif;
  --font-body: "Lato", -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==== Top bar ==== */
.topbar {
  padding: 1.25rem 2rem;
}
.logo {
  height: 22px;
  width: auto;
  display: block;
}

/* ==== Layout ==== */
main {
  max-width: 64rem;
  margin: 0 auto;
  padding: 4.5rem 2rem 8rem;
}

/* ==== Hero cell ==== */
.hero {
  background: var(--tint);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 1.25rem;
  padding: 3rem 2.75rem 2.25rem;
  margin-bottom: 4.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.hero-caption {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--ink);
  max-width: 42rem;
}
.hero-foot {
  padding-top: 1.25rem;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--subtle);
  letter-spacing: 0;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}
.hero-meta-item {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
}
.hero-meta-num {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}
.hero-meta-num--positive { color: var(--positive); }
.hero-empty {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--muted);
  letter-spacing: -0.005em;
}

@media (max-width: 640px) {
  .hero { padding: 2.25rem 1.5rem 1.75rem; border-radius: 1rem; }
  .hero-meta { gap: 1.25rem; }
}

/* ==== Sections ==== */
section + section { margin-top: 4rem; }

.section-heading {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin-bottom: 1.5rem;
}

/* ==== Project card grid ==== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
}

.project-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 12rem;
  padding: 1.25rem;
  background: var(--tint);
  border-radius: 0.875rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.project-card:hover {
  background: var(--tint-deep);
  transform: translateY(-1px);
}
.project-card[data-disabled="true"] {
  pointer-events: none;
  opacity: 0.7;
}

/* version pills inside the card */
.version-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.version-pill {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--faint);
}
.version-pill[data-deployed="true"] {
  background: var(--positive);
}

.project-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.project-card-group {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--subtle);
}
.project-card-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.15;
}
.project-card-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* ==== Latest versions list ==== */
.version-list {
  display: flex;
  flex-direction: column;
}
.version-row {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.875rem;
  padding: 0.875rem 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s ease;
}
.version-row:hover {
  background: var(--tint);
}
.version-mono {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--ink);
  color: white;
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.version-row-text {
  min-width: 0;
}
.version-row-title {
  font-weight: 700;
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.version-row-id {
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
.version-row-excerpt {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.version-row-shape {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--subtle);
}
.version-row-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--subtle);
  white-space: nowrap;
}

/* ==== Empty state ==== */
.empty {
  margin-top: 0;
  color: var(--muted);
  font-size: 1rem;
}

@media (max-width: 640px) {
  .topbar { padding: 1.25rem 1.25rem; }
  main { padding: 3rem 1.25rem 6rem; }
  .version-row {
    grid-template-columns: 2rem 1fr auto;
    gap: 0.5rem;
  }
  .version-row-shape { display: none; }
}
