@import url("https://fonts.googleapis.com/css2?family=Instrument+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --bg: #fcfbf4;
  --text: #1f1f1a;
  --muted: #5f5e56;
  --line: #e4e2d6;
  --accent: #196b24;
  --sans: "Galvji", "Instrument Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1a1a18;
  --text: #f2f1e8;
  --muted: #a3a296;
  --line: #34342e;
  --accent: #8fcf95;
  color-scheme: dark;
}

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

body {
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.mono,
.nav,
.meta,
.label {
  font-family: var(--mono);
  font-size: 13px;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 72px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--accent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.character {
  width: 56px;
  height: auto;
}

:root[data-theme="dark"] .light-only,
:root:not([data-theme="dark"]) .dark-only {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  font: inherit;
  padding: 2px 8px;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}

h1 {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

h2 {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 20px;
}

section {
  margin-top: 64px;
}

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

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

.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 20px;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--accent);
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
}

.icons {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon {
  display: inline-flex;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.icon:hover {
  color: var(--accent);
}

.list {
  list-style: none;
}

.list li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.list li:last-child {
  border-bottom: 1px solid var(--line);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.row .meta {
  flex-shrink: 0;
}

.list p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 2px;
}

.now {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 6px 16px;
}

.now dt {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  padding-top: 3px;
}

.egg {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.egg:hover {
  color: var(--accent);
}

dialog {
  margin: auto;
  max-width: min(440px, calc(100% - 32px));
  padding: 0;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.egg-content {
  padding: 28px;
}

.egg-content form {
  margin-top: 24px;
}

header .links {
  margin-top: 28px;
}

footer {
  margin-top: 96px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* blog post */
.post-header {
  margin-bottom: 40px;
}

.post-header .meta {
  display: flex;
  gap: 16px;
}

.post h2 {
  font-family: var(--sans);
  font-size: 20px;
  color: var(--text);
  margin: 40px 0 12px;
}

.post p + p {
  margin-top: 20px;
}

.callout {
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 32px 0;
  color: var(--muted);
  font-style: italic;
}

.references {
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.post .references h2 {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin: 0 0 16px;
}

.references ol {
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.references li + li {
  margin-top: 8px;
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .nav {
    margin-bottom: 48px;
  }

  .nav-links {
    gap: 14px;
  }

  h1 {
    font-size: 28px;
  }

  .row {
    flex-direction: column;
    gap: 0;
  }

  .now {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .now dd {
    margin-bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body {
    transition: none;
  }
}

.more {
  display: inline-block;
  margin-top: 10px;
}

/* animated character */
.ch {
  overflow: visible;
  cursor: pointer;
}

.ch-squish,
.ch-breathe {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.ch-body {
  fill: var(--accent);
  transition: fill 0.2s ease;
}

/* face parts are painted in the background color to match the cut-out line art */
.ch-eye,
.ch-mouth,
.ch-alt-fill {
  fill: var(--bg);
  transition: fill 0.2s ease;
}

.ch-eye {
  transform-box: fill-box;
  transform-origin: center;
}

.ch-alt,
.ch-alt-fill {
  stroke: var(--bg);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ch-alt {
  fill: none;
  stroke-width: 3.2;
}

.ch-alt-fill {
  stroke-width: 2.5;
}

.ch-zzz text {
  fill: var(--muted);
  font-family: var(--mono);
  font-size: 30px;
  opacity: 0;
  transform-box: fill-box;
}

/* experience timeline */
.timeline {
  list-style: none;
  position: relative;
}

.timeline-line {
  position: absolute;
  left: 80.5px;
  top: 10px;
  width: 10px;
  height: calc(100% - 20px);
  overflow: visible;
}

.timeline-line path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.timeline li {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 32px;
  padding: 10px 0;
}

.when {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-top: 4px;
}

.what {
  position: relative;
}

/* slightly uneven radii so the dots look hand-drawn */
.what::before {
  content: "";
  position: absolute;
  left: -27px;
  top: 8px;
  width: 9px;
  height: 9px;
  border: 1.5px solid var(--accent);
  border-radius: 52% 46% 55% 47% / 48% 54% 46% 52%;
  background: var(--bg);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease;
}

.ongoing .what::before {
  background: var(--accent);
}

.timeline li:hover .what::before {
  transform: scale(1.35);
}

.what p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 2px;
}

@media (max-width: 480px) {
  .timeline-line {
    left: 56.5px;
  }

  .timeline li {
    grid-template-columns: 52px 1fr;
    gap: 32px;
  }

  .when {
    font-size: 11px;
  }
}

