:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #6b6b6b;
  --line: #111111;
  --paper: #fafafa;
  --fill: #e8e8e8;
  --font: "IBM Plex Mono", "Courier New", Courier, monospace;
  --avatar-size: 168px;
  --avatar-top: calc(50vh - 120px);
}

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

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

button,
a {
  font-family: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

#app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

.back {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 5;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.back:hover {
  color: var(--fg);
}

.stage {
  position: relative;
  z-index: 2;
}

.avatar-btn {
  position: absolute;
  top: var(--avatar-top);
  left: 50%;
  width: var(--avatar-size);
  height: var(--avatar-size);
  transform: translateX(-50%);
  transition:
    top 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    width 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.35s ease;
}

.avatar-crop {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: #f2f2f2;
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 32%;
}

.avatar-ring {
  position: absolute;
  inset: -10px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.view-landing .avatar-ring {
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.92);
    opacity: 0.35;
  }
  70% {
    transform: scale(1.08);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.identity {
  position: absolute;
  top: calc(var(--avatar-top) + var(--avatar-size) + 22px);
  left: 50%;
  width: min(90vw, 420px);
  transform: translateX(-50%);
  text-align: center;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.name {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.name .caret {
  display: inline-block;
  width: 0.55ch;
  height: 1em;
  margin-left: 4px;
  background: var(--fg);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.role {
  margin: 8px 0 0;
  font-family: "IBM Plex Sans Ethiopic", "Noto Sans Ethiopic", sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.click-hint {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

.tree {
  position: absolute;
  top: calc(var(--avatar-top) + var(--avatar-size) - 2px);
  left: 50%;
  width: min(92vw, 800px);
  transform: translateX(-50%);
}

.tree-svg {
  display: block;
  width: 100%;
  height: 120px;
}

.tree-path {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.tree-nav {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: -6px;
}

.tree-nav button {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
}

.tree-nav button:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.page {
  position: relative;
  z-index: 1;
  width: min(920px, calc(100% - 48px));
  margin: 0 auto;
  padding: 88px 0 120px;
}

/* Sits below the absolutely positioned avatar and tree on the menu view. */
.now {
  position: relative;
  z-index: 1;
  width: min(1040px, calc(100% - 48px));
  margin: 0 auto;
  padding: 340px 0 140px;
}

.now-heading {
  position: relative;
  margin: 0;
  font-size: clamp(22px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.now-heading-ghost {
  visibility: hidden;
  display: block;
}

.now-heading-ghost::after {
  content: "";
  display: inline-block;
  width: 0.45ch;
  margin-left: 4px;
}

.now-heading-typed {
  position: absolute;
  inset: 0;
}

.now-heading-caret {
  display: inline-block;
  width: 0.45ch;
  height: 0.85em;
  margin-left: 4px;
  background: var(--fg);
  vertical-align: -0.05em;
  animation: blink 1.1s step-end infinite;
}

@media (prefers-reduced-motion: reduce) {
  .now-heading-caret {
    animation: none;
  }
}

.now-title {
  margin: 52px 0 36px;
  text-align: center;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.now-title a {
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
  padding-bottom: 3px;
}

.now-title a:hover {
  border-bottom-style: solid;
  border-bottom-color: var(--fg);
}

.bracket {
  position: relative;
  padding: 18px 26px;
}

.bracket::before,
.bracket::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 12px;
  border: 1px solid var(--fg);
  pointer-events: none;
}

.bracket::before {
  left: 0;
  border-right: 0;
}

.bracket::after {
  right: 0;
  border-left: 0;
}

.now-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 36px;
  align-items: start;
}

.now-left,
.now-right {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}

.now-right {
  align-items: center;
}

.now-overview > p {
  font-size: 14px;
}

.now-overview .section-label:not(:first-child) {
  margin-top: 22px;
}

.now-features {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.now-features li {
  margin-bottom: 4px;
}

/* Scoped to beat the .card-stack margin reset defined further down. */
.now-overview .now-stack {
  margin-top: 20px;
}

.now-sketches {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
}

.now-sketch {
  margin: 0;
  width: 100%;
  max-width: 230px;
}

/* Slimmer than the overview bracket so both sketches fit beside it. */
.now-sketch.bracket {
  padding: 10px 14px;
}

.sketch-open {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

/* Capped so both sketches fit beside the overview. Click to see them full size. */
.now-sketch img {
  width: 100%;
  height: 100px;
  object-fit: contain;
  background: var(--fill);
  border: 1px solid var(--fg);
  transition: opacity 0.2s ease;
}

.sketch-open:hover img {
  opacity: 0.82;
}

.now-sketch figcaption {
  margin-top: 6px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.progress-heading {
  margin: 8px 0 0;
  text-align: center;
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.18em;
}

.feed {
  border: 1px solid var(--fg);
  padding: 18px 20px 20px;
  min-height: 420px;
}

.feed-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.feed-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-top: 1px solid #e4e4e4;
}

.feed-item:first-child {
  border-top: 0;
}

.feed-sha {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
}

a.feed-sha:hover {
  color: var(--fg);
  text-decoration: underline;
}

.feed-item.is-note .feed-sha {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.feed-text {
  margin: 0;
  font-size: 13px;
}

.feed-item.is-note .feed-text {
  color: var(--fg);
}

.feed-when {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}

.feed-status {
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.feed-status:empty {
  display: none;
}

.lock-wrap {
  width: 100%;
  text-align: center;
}

.lock {
  width: 108px;
  height: auto;
}

.lock-shackle,
.lock-body {
  fill: none;
  stroke: var(--fg);
  stroke-width: 4;
}

.lock-shackle {
  transition: transform 0.5s ease;
  transform-origin: 42px 60px;
}

.lock.is-unlocked .lock-shackle {
  transform: rotate(-22deg) translateY(-2px);
}

.lock-fill {
  fill: var(--fg);
  opacity: 0.14;
  transition: y 0.6s ease, height 0.6s ease;
}

.lock.is-unlocked .lock-fill {
  opacity: 0.28;
}

.lock-keyhole {
  fill: none;
  stroke: var(--fg);
  stroke-width: 3;
}

.lock-count {
  margin: 10px 0 0;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.lock-list {
  display: inline-block;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.lock-list li {
  position: relative;
  padding-left: 20px;
  font-size: 12px;
  color: var(--muted);
}

.lock-list li::before {
  content: "○";
  position: absolute;
  left: 0;
}

.lock-list li.is-done {
  color: var(--fg);
}

.lock-list li.is-done::before {
  content: "●";
}

.tiktok {
  width: 100%;
  text-align: center;
}

.tiktok-day {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.tiktok-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.tiktok-row button {
  width: 32px;
  height: 32px;
  flex: none;
  border: 1px solid var(--fg);
  border-radius: 50%;
  font-size: 10px;
  line-height: 1;
}

.tiktok-row button:disabled {
  opacity: 0.3;
  cursor: default;
}

.tiktok-count {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.tiktok-frame {
  width: 100%;
  height: 620px;
  border: 1px solid var(--fg);
  background: var(--fill);
  overflow: hidden;
}

.tiktok-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.tiktok-frame.is-empty {
  display: grid;
  place-items: center;
  padding: 16px;
}

.tiktok-frame.is-empty p,
.tiktok-bad {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}

.tiktok-caption {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

a.tiktok-caption {
  text-decoration: none;
  border-bottom: 1px dotted var(--muted);
}

a.tiktok-caption:hover {
  color: var(--fg);
  border-bottom-color: var(--fg);
}

.journal .progress-heading {
  margin: 0 0 16px;
}

.journal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.journal-entry {
  border: 1px solid var(--fg);
  padding: 18px 20px 20px;
}

.journal-date {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.journal-entry h4 {
  margin: 10px 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.journal-text {
  margin: 0;
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 32px;
  background: rgba(255, 255, 255, 0.97);
  cursor: zoom-out;
}

.lightbox img {
  max-width: min(1100px, 100%);
  max-height: 100%;
  border: 1px solid var(--fg);
  background: var(--bg);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  background: var(--bg);
  font-size: 20px;
  line-height: 1;
}

.page-title {
  margin: 0 0 40px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.22em;
}

.section-label {
  margin: 0 0 12px;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.overview,
.hobbies-copy {
  max-width: 62ch;
  margin: 0;
  color: var(--fg);
}

.hobbies {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin-top: 48px;
}

.hobby-photos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 28px;
  row-gap: 40px;
}

.hobby-photos img,
.hobby-photos video {
  width: min(260px, 30vw);
  aspect-ratio: 4 / 5;
  height: auto;
  object-fit: cover;
  border: 1px solid var(--fg);
  background: var(--fill);
}

.hobby-photos video {
  display: block;
}

.hobby-photos > :nth-child(1) {
  transform: rotate(-6deg);
}

.hobby-photos > :nth-child(2) {
  transform: rotate(4deg) translateY(-12px);
}

.hobby-photos > :nth-child(3) {
  transform: rotate(-3deg) translateY(8px);
}

.hobby-photos > :nth-child(4) {
  transform: rotate(5deg);
}

.hobby-photos > :nth-child(5) {
  transform: rotate(-4deg) translateY(-10px);
}

.resume-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.download {
  margin-bottom: 14px;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid var(--fg);
  padding-bottom: 2px;
}

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

.resume-pdf {
  width: min(100%, 560px);
  height: min(78vh, 780px);
  border: 1px solid var(--fg);
  background: var(--paper);
}

.resume-preview {
  display: none;
  width: min(100%, 560px);
  text-decoration: none;
}

.resume-preview img {
  width: 100%;
  border: 1px solid var(--fg);
  background: var(--paper);
}

.resume-preview span {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.card {
  border: 1px solid var(--fg);
  display: flex;
  flex-direction: column;
}

.card img,
.card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--fill);
  border-bottom: 1px solid var(--fg);
}

.card-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.card p {
  margin: 0;
  font-size: 13px;
  min-height: 3.1em;
}

.card-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card-stack li {
  padding: 3px 8px;
  border: 1px solid var(--fg);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-actions a {
  width: 28px;
  height: 28px;
  border: 1px solid var(--fg);
  display: grid;
  place-items: center;
  text-decoration: none;
}

.card-actions a:hover {
  background: var(--fg);
  color: var(--bg);
}

.card-actions svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.socials {
  position: fixed;
  left: 50%;
  bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 22px;
}

.socials a {
  width: 48px;
  height: 48px;
  border: 1px solid var(--fg);
  border-radius: 50%;
  display: grid;
  place-items: center;
  /* Opaque so scrolling content doesn't show through the icons. */
  background: var(--bg);
}

.socials a:hover {
  background: var(--fg);
}

.socials a:hover svg {
  fill: var(--bg);
}

.socials svg {
  width: 22px;
  height: 22px;
  fill: var(--fg);
}

.view-landing {
  --avatar-size: 168px;
  --avatar-top: calc(50vh - 120px);
}

.view-menu {
  --avatar-size: 92px;
  --avatar-top: 36px;
}

.view-about,
.view-resume,
.view-projects {
  --avatar-size: 0px;
  --avatar-top: 36px;
}

.view-landing .tree,
.view-landing .socials,
.view-landing .page,
.view-landing .back {
  display: none;
}

.view-menu .identity,
.view-about .identity,
.view-resume .identity,
.view-projects .identity,
.view-about .tree,
.view-resume .tree,
.view-projects .tree,
.view-about .avatar-btn,
.view-resume .avatar-btn,
.view-projects .avatar-btn {
  opacity: 0;
  pointer-events: none;
}

.view-menu .identity {
  display: none;
}

.view-landing #tree[hidden],
.view-landing #socials[hidden],
.view-landing #page[hidden] {
  display: none;
}

@media (hover: none) {
  .socials a:hover {
    background: var(--bg);
  }

  .socials a:hover svg {
    fill: var(--fg);
  }

  .card-actions a:hover {
    background: none;
    color: inherit;
  }

  .tree-nav button:hover {
    text-decoration: none;
  }
}

@media (max-width: 720px) {
  .now {
    width: min(1040px, calc(100% - 40px));
    padding: 260px 0 150px;
  }

  .now-title {
    margin-top: 36px;
  }

  .now-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .now-left,
  .now-right {
    display: contents;
  }

  .now-overview {
    order: 1;
  }

  .now-sketches {
    order: 2;
  }

  .progress-heading {
    order: 3;
    margin: 12px 0 0;
  }

  .feed {
    order: 4;
    min-height: 0;
  }

  .journal {
    order: 5;
  }

  .lock-wrap {
    order: 6;
  }

  .tiktok {
    order: 7;
    max-width: 340px;
    margin: 0 auto;
  }

  .now-sketch {
    max-width: 320px;
    margin: 0 auto;
  }

  .now-sketch img {
    height: 150px;
  }

  .feed-item {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .feed-when {
    grid-column: 2;
  }

  .tiktok-frame {
    height: 560px;
  }

  .lightbox {
    padding: 16px;
  }

  .lightbox-close {
    top: 10px;
    right: 12px;
  }

  .view-landing {
    --avatar-size: 140px;
    --avatar-top: calc(50dvh - 135px);
  }

  .view-menu {
    --avatar-size: 78px;
    --avatar-top: 28px;
  }

  .page {
    width: min(920px, calc(100% - 40px));
    padding: 64px 0 150px;
  }

  .page-title {
    margin-bottom: 32px;
  }

  .tree {
    width: min(94vw, 800px);
  }

  .tree-svg {
    height: auto;
    aspect-ratio: 5 / 1;
  }

  .tree-nav {
    margin-top: 0;
  }

  .tree-nav button {
    font-size: 11px;
    letter-spacing: 0.06em;
    padding: 12px 2px;
  }

  .hobbies {
    gap: 28px;
    margin-top: 40px;
  }

  .hobby-photos {
    row-gap: 28px;
  }

  .hobby-photos img,
  .hobby-photos video {
    width: min(280px, 76vw);
  }

  .hobby-photos > :nth-child(1) {
    transform: rotate(-3deg);
  }

  .hobby-photos > :nth-child(2) {
    transform: rotate(2deg);
  }

  .hobby-photos > :nth-child(3) {
    transform: rotate(-2deg);
  }

  .hobby-photos > :nth-child(4) {
    transform: rotate(3deg);
  }

  .hobby-photos > :nth-child(5) {
    transform: rotate(-2deg);
  }

  .resume-pdf {
    display: none;
  }

  .resume-preview {
    display: block;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .card-actions a {
    width: 40px;
    height: 40px;
  }

  .card-actions svg {
    width: 16px;
    height: 16px;
  }

  .socials {
    bottom: calc(18px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .socials a {
    width: 44px;
    height: 44px;
  }

  .back {
    top: 14px;
    left: 10px;
    padding: 8px;
  }
}

@media print {
  .back,
  .socials,
  .avatar-btn,
  .tree,
  .identity,
  .resume-preview,
  .download {
    display: none !important;
  }

  .page {
    padding: 0;
    width: 100%;
  }

  .resume-pdf {
    border: 0;
    width: 100%;
    height: auto;
    min-height: 80vh;
  }
}
