:root {
  --text: rgb(55, 53, 47);
  --muted: rgba(55, 53, 47, 0.6);
  --rule: rgba(55, 53, 47, 0.09);
  --code-bg: rgba(135, 131, 120, 0.15);
  --code-fg: #eb5757;
  --max: 900px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  color: var(--text);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  margin: 0 auto;
  max-width: var(--max);
  padding: 5em 24px 3em;
}

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

h1, h2, h3 {
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-weight: 600;
  margin: 1.75em 0 0.4em;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.75em;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; margin-top: 2em; }
h3 { font-size: 1.25rem; }

p { margin: 0.65em 0; }

ul { padding-inline-start: 1.6em; margin: 0.6em 0; }
ul li { padding-left: 0.2em; margin: 0.2em 0; }

img, video { max-width: 100%; height: auto; display: block; }

figure {
  margin: 1.5em 0;
  text-align: center;
}
figure img, figure video { margin: 0 auto; border-radius: 3px; }
figcaption {
  opacity: 0.55;
  font-size: 0.85em;
  margin-top: 0.5em;
  font-style: italic;
}

code {
  background: var(--code-bg);
  color: var(--code-fg);
  border-radius: 3px;
  padding: 0.15em 0.4em;
  font-size: 85%;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

em { font-style: italic; }
strong { font-weight: 600; }

/* Two-column layout for home header + used for video grids */
.columns {
  display: flex;
  gap: 40px;
  margin: 1em 0;
}
.columns > .col { flex: 1; min-width: 0; }
.columns > .col.narrow { flex: 0 0 32%; }

/* Updates list: no bullets, date styled as a badge */
.updates, .links { margin: 0.5em 0; }
.updates li, .links li { margin: 0.2em 0; }

/* Works table */
.works-wrap { overflow-x: auto; margin: 1em 0; }
.works {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
}
.works th, .works td {
  text-align: left;
  padding: 0.45em 0.6em;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.works th {
  color: var(--muted);
  font-weight: 500;
  border-bottom: 1px solid rgba(55, 53, 47, 0.2);
  white-space: nowrap;
}
.works td time { white-space: nowrap; }

/* Back link */
.back-home {
  display: inline-block;
  margin-top: 2.5em;
  padding-top: 1em;
  border-top: 1px solid var(--rule);
  color: var(--muted);
}

/* Post header meta */
.post-meta { margin-bottom: 1.5em; }
.post-meta p { font-weight: 600; margin: 0.2em 0; }

/* Media grid used for screenshots / video pairs */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 1.5em 0;
}
.media-grid figure { margin: 0; }

/* Responsive */
@media (max-width: 720px) {
  body { margin: 0 auto; padding: 3em 16px; }
  .page-title { font-size: 2rem; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.125rem; }
  .columns { flex-direction: column; gap: 0; }
  .columns > .col.narrow { flex: 0 0 auto; align-self: center; }
}
