:root {
  --bg: #fcfcfc;
  --ink: #111;
  --grey-1: #555;
  --grey-2: #999;
  --line: #ebebeb;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f0f;
    --ink: #ededed;
    --grey-1: #a3a3a3;
    --grey-2: #6b6b6b;
    --line: #242424;
  }
}

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

::selection {
  background: var(--ink);
  color: var(--bg);
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.page {
  max-width: 36rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

@media (min-width: 640px) {
  .page {
    padding-top: 8rem;
  }
}

/* Header */

header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.avatar {
  position: relative;
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  user-select: none;
}

.avatar img,
.avatar .initials {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  transition: opacity 0.3s ease-out;
}

.avatar img {
  object-fit: cover;
}

.avatar .initials {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, #8d919b, #6a6e75);
  opacity: 0;
}

.avatar span {
  color: #fff;
  font-size: 27px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}

@media (hover: hover) {
  .avatar:hover img {
    opacity: 0;
  }

  .avatar:hover .initials {
    opacity: 1;
  }
}

h1 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.intro {
  margin-top: 0.125rem;
  font-size: 17px;
  line-height: 1.625;
  color: var(--grey-1);
}

.intro a {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: border-color 0.15s;
}

.intro a:hover {
  border-color: var(--ink);
}

/* Sections */

section {
  margin-top: 2.5rem;
}

.label {
  margin-bottom: 0.5rem;
  font-family: var(--mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey-2);
}

.entry {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

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

.mark {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-top: 1px;
  border-radius: 6px;
  background: var(--line);
  color: var(--grey-1);
  font-family: var(--mono);
  font-size: 12px;
  transition: background-color 0.2s, color 0.2s;
}

img.mark {
  object-fit: cover;
  opacity: 0.85;
  filter: grayscale(1);
  transition: opacity 0.2s, filter 0.2s;
}

.entry:hover img.mark {
  opacity: 1;
  filter: none;
}

a.entry:hover div.mark {
  background: var(--ink);
  color: var(--bg);
}

.body {
  flex: 1;
  min-width: 0;
}

.head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

h2 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-underline-offset: 3px;
}

h2 span {
  font-weight: 400;
  color: var(--grey-1);
}

a.entry:hover h2 {
  text-decoration: underline;
  text-decoration-color: var(--grey-2);
}

.date {
  flex-shrink: 0;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--grey-2);
}

.body p {
  max-width: 29rem;
  margin-top: 0.375rem;
  font-size: 16px;
  line-height: 1.625;
  color: var(--grey-1);
}

/* Stack */

.stack > div {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.stack > div:last-child {
  border-bottom: 1px solid var(--line);
}

.stack dt {
  flex-shrink: 0;
  width: 7rem;
  padding-top: 3px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--grey-2);
}

.stack dd {
  font-size: 16px;
  line-height: 1.625;
  color: var(--grey-1);
}

/* Links */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 0.875rem;
}

.links a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--grey-1);
  transition: color 0.15s;
}

.links a:hover {
  color: var(--ink);
}

.links span {
  font-size: 12px;
  color: var(--grey-2);
}

/* Reveal */

.reveal {
  opacity: 0;
  transform: translateY(6px);
  animation: reveal-in 0.6s cubic-bezier(0.25, 0.6, 0.2, 1) forwards;
}

@keyframes reveal-in {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    animation: none;
    transform: none;
  }
}
