:root {
  color-scheme: dark;
  --bg: #0d0e10;
  --text: #d4d6da;
  --heading: #f2f3f5;
  --muted: #868c97;
  --line: #2a2d33;
  --blue: #6ea8fe;
  --orange: #f59e0b;
  --soft: #16181c;
}

::selection {
  background: #2b4a7a;
  color: #ffffff;
}

.entry .links {
  margin-top: 8px;
}

/* Project cards: a light frame so each project reads as its own block. */
.project {
  padding: 12px 14px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.15s ease;
}

.project:hover {
  border-color: #3a3e46;
}

.project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  flex-wrap: wrap;
}

.project-head .time {
  font-size: 12px;
  white-space: nowrap;
}

.project-head .time::after {
  content: none;
}

.stack {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.project ul,
.project .stack + p {
  margin-top: 8px;
}

/* The project title links to its page; the link stretches over the whole card. */
.project {
  position: relative;
}

.project-head h3 a {
  color: inherit;
}

.project-head h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.project-head h3 a::before {
  content: none;
}

.project-head h3 a:hover,
.project-head h3 a:focus-visible {
  color: var(--blue);
}

.project:hover h3 a {
  color: var(--blue);
}

.project .links a {
  position: relative;
  z-index: 2;
}

/* Project pages */
.back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
}

.back:hover,
.back:focus-visible {
  color: var(--blue);
}

.project-page .intro {
  padding-bottom: 16px;
}

.actions {
  margin-top: 12px;
}

.media {
  margin: 4px 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.media iframe,
.media video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.media-note {
  margin: -8px 0 16px;
  font-size: 12px;
}

.desc {
  color: var(--text);
}

.desc p + p,
.desc pre + p,
.desc p + pre {
  margin-top: 12px;
}

.desc b {
  color: var(--heading);
}

.desc pre {
  margin: 12px 0 0;
  padding: 12px 14px;
  overflow-x: auto;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.55;
}

.desc code {
  font-family: inherit;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.shot {
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: zoom-in;
}

.shot:hover,
.shot:focus-visible {
  border-color: #3a3e46;
  outline: none;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}

.tag {
  padding: 1px 8px;
  color: var(--muted);
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: 85vw;
  max-height: 85vh;
  object-fit: contain;
  border: 1px solid var(--line);
}

.lb-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
}

.lb-btn:hover {
  color: #fff;
  border-color: var(--muted);
}

.lb-close {
  top: 18px;
  right: 18px;
}

.lb-prev {
  left: 14px;
}

.lb-next {
  right: 14px;
}

.lb-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
  outline: none;
}

.page {
  width: 100%;
  min-height: 100vh;
  padding: 32px 18px 64px;
}

.sheet {
  width: min(100%, 650px);
  margin: 0 auto;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 2px solid var(--line);
  margin-bottom: 24px;
}

.topnav a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  border-bottom: 2px solid transparent;
  transform: translateY(2px);
}

.topnav a:first-child {
  padding-left: 14px;
}

.topnav a.active {
  color: var(--blue);
  border-bottom-color: var(--orange);
}

.intro {
  padding-bottom: 22px;
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.2;
}

.subname {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.summary {
  max-width: 590px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: 14px;
}

.quicklinks {
  margin: 14px 0 0;
}

.quicklinks a::before,
.quicklinks a::after {
  color: var(--muted);
}

.quicklinks a::before {
  content: "[";
}

.quicklinks a::after {
  content: "]";
}

.portrait {
  display: block;
  width: 154px;
  height: 154px;
  object-fit: cover;
  border-radius: 4px;
  margin-top: 18px;
}

section {
  padding: 18px 0 0;
}

h2 {
  margin: 0 0 10px;
  color: var(--heading);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  display: inline;
  margin: 0;
  color: var(--heading);
  font-size: 14px;
  font-weight: 700;
}

p {
  margin: 0;
}

.copy p + p {
  margin-top: 12px;
}

.entries {
  display: grid;
  gap: 12px;
}

.entry {
  display: block;
}

.time {
  display: inline;
  color: var(--muted);
}

.time::after {
  content: " - ";
}

.muted {
  color: var(--muted);
}

ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
}

li {
  position: relative;
  padding-left: 14px;
}

li + li {
  margin-top: 5px;
}

li::before {
  content: "-";
  position: absolute;
  left: 0;
  color: var(--muted);
}

.skills {
  color: var(--text);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.links a::before {
  content: "[";
  color: var(--muted);
}

.links a::after {
  content: "]";
  color: var(--muted);
}

@media (max-width: 700px) {
  .page {
    padding: 18px 14px 48px;
  }

  .sheet {
    width: 100%;
  }

  .topnav {
    overflow-x: auto;
  }

  .topnav a {
    flex: 0 0 auto;
    padding: 0 12px;
  }

  .portrait {
    width: 132px;
    height: 132px;
  }

  h2 {
    font-size: 19px;
  }
}
