:root {
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b6b6b;
  --line: #ececec;
  --hover: #fff1f1;
  --accent: #f40009; /* Coke red */
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #f2f2f2;
    --muted: #a3a3a3;
    --line: #2a2a2a;
    --hover: #2a1214;
    --accent: #ff2a33;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}
::selection { background: var(--accent); color: #fff; }
main {
  max-width: 680px;
  margin: 0 auto;
  padding: 72px 20px 96px;
}
a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
.crumb {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 32px;
}
.crumb:hover { color: var(--accent); }
.photo {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.app-icon {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  display: block;
}
h1 {
  font-weight: 600;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 28px 0 6px;
}
.tagline {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 32px;
}
.tagline .dot { color: var(--accent); }
p { margin: 0 0 18px; }
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 36px 0 20px;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 8px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 4px;
}
ul.links {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 8px;
  margin: 0 -8px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
ul.links a:hover, ul.links a:focus-visible { background: var(--hover); }
ul.links .label { font-weight: 500; }
ul.links .url { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; text-align: right; }
ul.links a:hover .url, ul.links a:focus-visible .url { color: var(--accent); }
ul.bullets { padding-left: 20px; margin: 0 0 18px; }
.shots {
  display: flex;
  gap: 16px;
  margin: 8px 0 18px;
}
.shots img {
  width: calc(50% - 8px);
  height: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
}
.button {
  display: inline-block;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 999px;
  margin: 4px 0 8px;
}
.button:hover { background: var(--accent); color: #fff; }
.small { font-size: 15px; color: var(--muted); }
footer {
  margin-top: 56px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
}
/* Project pages */
.lede { font-size: 22px; line-height: 1.45; margin-bottom: 28px; }
.lede em { font-style: normal; color: var(--accent); }
.card { margin: 0 0 40px; }
.card h3 { font-size: 24px; margin: 16px 0 6px; }
.card video, .card img.media {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  display: block;
  background: #fff;
}
.card .meta a { margin-right: 14px; }
.embed {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  display: block;
}
.embed-title { font-size: 15px; color: var(--muted); margin: 8px 0 32px; }
/* Galleries */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
}
.tile {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: var(--line);
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); }
body.viewer {
  background: #0d0d0d;
  color: #f2f2f2;
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.viewer-figure {
  margin: 0;
  padding: 64px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}
.viewer-figure img {
  max-width: 100%;
  max-height: calc(100vh - 220px);
  object-fit: contain;
  display: block;
}
.viewer-figure figcaption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  max-width: 640px;
  text-align: center;
  font-size: 15px;
  color: #a3a3a3;
}
.viewer-title { color: #f2f2f2; font-size: 18px; font-weight: 500; }
.viewer-meta { font-size: 13px; letter-spacing: 0.08em; }
.viewer-caption { color: #d0d0d0; }
.viewer .tag { color: #a3a3a3; border-color: rgba(255,255,255,0.2); }
.viewer .tag:hover { color: #fff; border-color: var(--accent); }
.viewer-close, .viewer-prev, .viewer-next {
  position: fixed;
  color: #f2f2f2;
  text-decoration: none;
  font-size: 20px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.25);
}
@media (min-width: 700px) { .viewer-figure { padding-left: 72px; padding-right: 72px; } }
.viewer-close:hover, .viewer-prev:hover, .viewer-next:hover { background: var(--accent); color: #fff; }
.viewer-close { top: 12px; right: 12px; }
.viewer-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.viewer-next { right: 12px; top: 50%; transform: translateY(-50%); }
/* Blog posts */
.post h2 { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; text-transform: none; color: var(--text); margin: 36px 0 8px; }
.post h3 { font-size: 21px; margin: 28px 0 6px; }
.post img { max-width: 100%; height: auto; border-radius: 10px; }
.post code { font-size: 0.9em; background: var(--hover); padding: 1px 5px; border-radius: 4px; }
.post pre { background: var(--hover); padding: 14px 16px; border-radius: 8px; overflow-x: auto; }
.post pre code { background: none; padding: 0; }
.post blockquote { margin: 0 0 18px; padding-left: 16px; border-left: 3px solid var(--accent); color: var(--muted); }
/* Project icons and quieter "elsewhere" links */
ul.links.projects a { justify-content: flex-start; align-items: center; }
ul.links.projects .label { flex: 0 1 auto; }
ul.links.projects .url { margin-left: auto; }
.icon {
  width: 22px;
  height: 22px;
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.elsewhere {
  margin-top: 40px;
  font-size: 15px;
  color: var(--muted);
}
.elsewhere a { color: var(--muted); text-decoration-color: var(--line); }
.elsewhere a:hover { color: var(--accent); text-decoration-color: var(--accent); }
@media (max-width: 520px) {
  ul.links.projects a { flex-wrap: wrap; row-gap: 0; }
  ul.links.projects .url { margin-left: 38px; width: 100%; text-align: left; }
}
/* Tile cards, tags and tag filters */
.tile-card { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.tile-card[hidden] { display: none; }
.tile-title { font-weight: 500; margin-top: 8px; line-height: 1.3; }
.tile-date { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; }
.tile-card:hover .tile-title { color: var(--accent); }
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.tagbar a, .tag {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.tagbar a:hover, .tag:hover { color: var(--accent); border-color: var(--accent); }
.tagbar a[aria-current] { color: #fff; background: var(--accent); border-color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 32px; }
.post-meta .tagline { margin: 0; }
.post-meta .tags { justify-content: flex-start; margin: 0; }
ul.posts li[hidden] { display: none; }
ul.posts .post-desc { display: block; color: var(--muted); font-size: 15px; font-weight: 400; }
/* Unified cards and posts */
.tile-caption {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-hero {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  margin: 0 0 8px;
}
.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pager a { text-decoration: none; color: var(--text); font-weight: 500; display: flex; flex-direction: column; }
.pager a:last-child { text-align: right; }
.pager a:hover { color: var(--accent); }
