* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000000;
  color: #eeeeea;
  font-family: Inter, system-ui, sans-serif;
}

main {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  padding: 76px 0 80px;
}

.intro {
  position: relative;
  padding-right: 184px;
}

.portrait {
  position: absolute;
  top: 4px;
  right: 0;
  width: 120px;
  height: 120px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
}

p {
  margin: 0 0 12px;
  color: #eeeeea;
  font-size: 15px;
  line-height: 1.6;
}

.intro p:first-of-type {
  color: #a5a5a5;
}

a {
  color: #eeeeea;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover {
  color: white;
}

a:focus-visible {
  outline: 2px solid white;
  outline-offset: 5px;
}

.heading-emoji {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
  margin-bottom: 72px;
  font-size: 14px;
}

.site-nav a {
  color: #8f8f92;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #eeeeea;
}

.project-topbar {
  position: relative;
  width: min(100%, 672px);
  min-height: 40px;
  margin: 0 auto 72px;
}

.project-topbar .site-nav {
  min-height: 40px;
  align-items: center;
  margin-bottom: 0;
}

.project-back {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: rgba(40, 40, 40, 0.62);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  color: #eeeeea;
  text-decoration: none;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.project-back:hover {
  background: rgba(70, 70, 70, 0.82);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16);
}

.project-back svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-animate] {
  animation: enter 600ms both;
  animation-delay: calc(var(--stagger, 0) * 120ms);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    animation: none;
  }
}

.projects {
  margin-top: 88px;
}

.projects h2 {
  margin: 0 0 20px;
  color: #a5a5a5;
  font-size: 15px;
  font-weight: 400;
}

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

.project-list li + li {
  margin-top: 12px;
}

.project-list a,
.project-list .project-static {
  display: block;
  width: fit-content;
  max-width: 100%;
  font-size: 17px;
  line-height: 1.5;
  text-decoration: none;
}

.project-list strong {
  font-weight: 500;
}

.project-list span {
  margin-left: 6px;
  color: #8f8f92;
}

.project-list a:hover strong,
.project-list a:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.education {
  display: flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
  max-width: 100%;
  margin-top: 72px;
}

.education__mark {
  display: block;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 12px;
}

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

.education__school,
.education__detail {
  display: block;
}

.education__school {
  font-size: 16px;
  font-weight: 600;
}

.education__detail {
  margin-top: 4px;
  color: #a5a5a5;
  font-size: 16px;
}

.availability {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 24px 0 0;
  color: #b9b9b9;
}

.availability__dot {
  position: relative;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.availability__dot::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #4ade80;
  content: "";
  animation: availability-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes availability-ping {
  0% { transform: scale(1); opacity: 0.75; }
  75%, 100% { transform: scale(2); opacity: 0; }
}

.now {
  margin-top: 72px;
}

.now h2 {
  margin: 0 0 20px;
  color: #a5a5a5;
  font-size: 17px;
  font-weight: 500;
}

.now > p {
  margin: 0;
  color: #d7d7d7;
  font-size: 16px;
}

.now-map {
  height: 280px;
  margin: 30px 0 27px;
  overflow: hidden;
  border-radius: 8px;
  background: #1c1d1f;
}

.now-map__fallback {
  display: grid;
  height: 100%;
  place-items: center;
  color: #a5a5a5;
  font-size: 14px;
}

.now-facts {
  margin: 0;
}

.now-facts__row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  min-height: 44px;
  padding: 11px 0;
  font-size: 15px;
}

.now-facts__row::before {
  order: 1;
  flex: 1;
  border-bottom: 2px dotted #47474b;
  content: "";
  transform: translateY(-3px);
}

.now-facts dt {
  color: #929195;
}

.now-facts dd {
  order: 2;
  margin: 0;
  color: #d7d6d8;
  text-align: right;
}

.now-facts dd a {
  color: inherit;
  text-decoration: none;
}

.now-facts dd a:hover,
.now-facts dd a:focus-visible {
  text-decoration: underline;
}

.now-facts__rotating.enter {
  animation: now-row-enter 300ms ease-out;
}

@keyframes now-row-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.now-choices {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 2px;
}

.now-choices button {
  display: grid;
  width: 36px;
  height: 30px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.now-choices__track {
  position: relative;
  width: 5px;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #4b4b50;
  transition: width 300ms ease, background-color 200ms ease;
}

.now-choices button:hover .now-choices__track,
.now-choices button:focus-visible .now-choices__track {
  background: #85858a;
}

.now-choices button[aria-current="true"] .now-choices__track {
  width: 23px;
}

.now-choices__fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background: #d5d5d8;
}

.now-choices button[aria-current="true"] .now-choices__fill {
  animation: now-choice-progress 4s linear forwards;
}

.dyson-sphere {
  display: grid;
  place-items: center;
  width: min(650px, 100%);
  aspect-ratio: 650 / 430;
  margin: 96px auto 0;
}

.dyson-sphere canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.dyson-sphere canvas:active {
  cursor: grabbing;
}

.dyson-sphere canvas:focus-visible {
  outline: 1px solid #a5a5a5;
  outline-offset: 4px;
}

.home-footer {
  border-top: 1px solid #29292b;
  padding: 18px 20px 24px;
}

.home-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 650px);
  margin: 0 auto;
}

.home-footer p {
  margin: 0;
  color: #929295;
  font-size: 14px;
}

.home-footer__links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-footer__links a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #929295;
  transition: color 180ms ease;
}

.home-footer__links a:hover {
  color: #eeeeea;
}

.home-footer__links svg {
  display: block;
  width: 22px;
  height: 22px;
}

@keyframes now-choice-progress {
  to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .availability__dot::after,
  .now-facts__rotating.enter,
  .now-choices button[aria-current="true"] .now-choices__fill {
    animation: none;
  }

  .now-choices button[aria-current="true"] .now-choices__fill {
    width: 100%;
  }
}

.page-content {
  width: 100%;
}

.running-intro {
  margin-bottom: 32px;
  color: #a5a5a5;
  font-size: 18px;
}

.strava-badge {
  display: inline-flex;
  width: 32px;
  height: 32px;
  color: #eeeeea;
}

.strava-badge svg {
  display: block;
  width: 100%;
  height: 100%;
}

.run-history {
  margin-top: 40px;
}

.run-history h1 {
  margin: 0 0 20px;
  color: #8f8f92;
  font-size: 15px;
  font-weight: 400;
}

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

.run-list li {
  padding: 20px 0;
  border-top: 1px solid #29292b;
}

.run-status {
  margin-top: 20px;
  color: #8f8f92;
}

.run-list time,
.run-stats dt {
  color: #8f8f92;
}

.run-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  margin: 20px 0 0;
}

.run-stats dt {
  margin-bottom: 3px;
  font-size: 12px;
}

.run-stats dd {
  margin: 0;
  font-size: 16px;
}

.run-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid #29292b;
  color: #8f8f92;
  font-size: 14px;
}

.run-pagination[hidden] {
  display: none;
}

.run-pagination button {
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #eeeeea;
  font: inherit;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.run-pagination button:hover:not(:disabled) {
  background: rgb(255 255 255 / 15%);
}

.run-pagination button:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

.run-pagination button:disabled {
  color: #555558;
  cursor: default;
}

.recruiter-hero {
  margin-bottom: 64px;
}

.recruiter-lead {
  margin: 0;
  max-width: 32ch;
  color: #b9b9b9;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.45;
}

.recruiter-section + .recruiter-section {
  margin-top: 64px;
}

.recruiter-section h2 {
  margin: 0 0 20px;
  color: #8f8f92;
  font-size: 15px;
  font-weight: 400;
}

.recruiter-copy {
  max-width: 62ch;
  color: #b9b9b9;
  font-size: 18px;
}

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

.recruiter-project-list li + li {
  margin-top: 8px;
}

.recruiter-project-list a,
.recruiter-project-list .project-static {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  width: fit-content;
  font-size: 18px;
  line-height: 1.6;
  text-decoration: none;
}

.recruiter-project-list strong {
  font-weight: 500;
}

.recruiter-project-list span {
  color: #8f8f92;
}

.recruiter-project-list a:hover strong,
.recruiter-project-list a:focus-visible strong {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.project-page .page-content {
  max-width: 672px;
  margin-inline: auto;
}

.project-hero {
  overflow: hidden;
  width: 100%;
  margin: 0 0 48px;
  border-radius: 16px;
  background: #111;
}

.project-hero-image {
  position: relative;
  aspect-ratio: 1.76;
}

.project-hero-image img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 114%;
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.project-hero video,
.project-story-demo video {
  display: block;
  width: 100%;
  height: auto;
}

.project-demo {
  margin: 64px 0 0;
}

.project-demo + .project-story {
  margin-top: 32px;
}

.project-story-demo {
  margin: 24px 0;
}

.project-story-demo video {
  border-radius: 16px;
}

.project-story-demo figcaption {
  margin-top: 12px;
  color: #8f8f92;
  font-size: 13px;
  line-height: 1.5;
}

.project-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 12px 0 16px;
}

.project-title h1 {
  margin: 0;
  font-size: clamp(32px, 5vw, 42px);
  font-weight: 500;
}

.project-title a {
  display: inline-flex;
  flex: none;
  width: 32px;
  height: 32px;
  color: #a5a5a5;
}

.project-title a:hover {
  color: #eeeeea;
}

.project-title svg {
  width: 100%;
  height: 100%;
}

.project-title--with-live .project-live-link {
  width: auto;
  height: auto;
  margin-left: auto;
  padding: 8px 11px;
  border-radius: 8px;
  background: #1c1c1f;
  color: #eeeeea;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 180ms ease;
}

.project-title--with-live .project-live-link:hover {
  background: #303034;
}

.project-label,
.project-facts dt {
  color: #8f8f92;
  font-size: 14px;
}

.project-lead {
  max-width: 62ch;
  color: #b9b9b9;
  font-size: 19px;
  line-height: 1.65;
}

.project-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 32px;
  margin: 56px 0 0;
  padding: 22px 0;
  border-top: 1px solid #29292b;
  border-bottom: 1px solid #29292b;
}

.project-facts dd {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.6;
}

.project-story {
  margin-top: 64px;
}

.project-story h2 {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 500;
}

.project-story p {
  max-width: 65ch;
  margin-bottom: 16px;
  color: #b9b9b9;
  font-size: 16px;
  line-height: 1.75;
}

.project-story p:last-child {
  margin-bottom: 0;
}

.project-story p code {
  padding: 2px 5px;
  border-radius: 4px;
  background: #1c1d1f;
  color: #dededc;
  font: 0.85em ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.project-code-comparison,
.project-code-group {
  margin: 28px 0 32px;
}

.project-code-example {
  margin: 0 0 20px;
}

.project-code-example figcaption {
  margin-bottom: 10px;
  color: #a5a5a5;
  font-size: 13px;
  font-weight: 500;
}

.project-code-lines {
  overflow-x: auto;
  padding: 16px 0;
  border: 1px solid #29292b;
  border-radius: 8px;
  background: #0a0a0b;
  counter-reset: code-line;
}

.project-code-line {
  display: flex;
  min-width: max-content;
  padding: 0 18px;
  color: #dededc;
  font: 13px/1.7 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre;
  counter-increment: code-line;
}

.project-code-line::before {
  flex: none;
  width: 3ch;
  margin-right: 18px;
  color: #65656a;
  content: counter(code-line);
  text-align: right;
  user-select: none;
}

.project-code-line code {
  font: inherit;
}

.code-type,
.code-number { color: #e4c081; }
.code-keyword,
.code-value { color: #df909d; }
.code-function { color: #c7a9d6; }
.code-comment { color: #878792; font-style: italic; }

@media (max-width: 650px) {
  main {
    padding-top: 48px;
  }

  .intro {
    padding-right: 0;
  }

  .portrait {
    position: static;
    width: 88px;
    height: 88px;
    margin-bottom: 32px;
  }

  .site-nav {
    margin-bottom: 56px;
  }

  .project-topbar {
    padding-top: 56px;
    margin-bottom: 56px;
  }

  .recruiter-lead {
    font-size: 21px;
  }

  .recruiter-project-list span {
    display: block;
  }

  .project-facts {
    grid-template-columns: 1fr;
  }

  .project-lead {
    font-size: 17px;
  }

  .project-title--with-live {
    flex-wrap: wrap;
  }
}

.skill-groups {
  margin: 0;
}

.skill-group {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.skill-group:last-child {
  margin-bottom: 0;
}

.skill-group dt {
  padding-top: 8px;
  color: #8f8f92;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.skill-group dd {
  margin: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-tags li {
  padding: 7px 11px;
  background: #202022;
  color: #b9b9b9;
  font-size: 14px;
  line-height: 1.4;
}

.social-links {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 64px;
}

.recruiter-contact .social-links {
  margin-top: 0;
}

.social-links a {
  display: inline-flex;
  width: 32px;
  height: 32px;
}

.social-links svg {
  display: block;
  width: 100%;
  height: 100%;
}

.recruiter-faq {
  margin-top: 64px;
}

.faq-item + .faq-item {
  border-top: 1px solid #29292b;
}

.faq-item h3 {
  margin: 0;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 17px 0;
  border: 0;
  background: transparent;
  color: #eeeeea;
  font: inherit;
  font-size: 18px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
}

.faq-question:hover {
  color: #ffffff;
}

.faq-question:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 4px;
}

.faq-indicator {
  flex: none;
  color: #8f8f92;
  font-size: 21px;
  line-height: 1;
}

.faq-indicator::before {
  content: "+";
}

.faq-item.is-open .faq-indicator::before {
  content: "−";
}

.faq-answer {
  display: grid;
  grid-template-rows: 1fr;
  opacity: 1;
  transition: grid-template-rows 180ms ease, opacity 180ms ease;
}

.faq-item:not(.is-open) .faq-answer {
  grid-template-rows: 0fr;
  opacity: 0;
}

.faq-answer-inner {
  min-height: 0;
  overflow: hidden;
}

.faq-answer p {
  margin: 0;
  padding: 0 36px 17px 0;
  color: #a5a5a5;
}

@media (prefers-reduced-motion: reduce) {
  .faq-answer {
    transition: none;
  }
}

.bookshelf-page h1 {
  margin-bottom: 15px;
  font-size: clamp(32px, 5vw, 40px);
  font-weight: 500;
}

.bookshelf-intro {
  max-width: 610px;
  margin-bottom: 48px;
  color: #a5a5a5;
  font-size: 16px;
}

.book-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 25px;
}

.book-filters button {
  padding: 7px 14px;
  border: 1px solid #28282b;
  border-radius: 999px;
  background: #121214;
  color: #aaa9ad;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.book-filters button:hover:not([aria-pressed="true"]) {
  background: #202024;
  color: #e4e4e2;
}

.book-filters button[aria-pressed="true"] {
  border-color: #e7e7e6;
  background: #e7e7e6;
  color: #151516;
}

.book-filters button:focus-visible,
.now-choices button:focus-visible {
  outline: 2px solid white;
  outline-offset: 3px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 20px;
}

.book[hidden] {
  display: none;
}

.book__status {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 9px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #1b1b1bc9;
  border-radius: 50%;
  background: #f3f2eddb;
  color: #171717;
  backdrop-filter: blur(4px);
}

.book__status svg {
  width: 18px;
  height: 18px;
}

.book__cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 6px;
  background: #121214;
  box-shadow: 5px 7px 18px #0008;
}

.book__cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.book__cover--trim-sides img {
  position: relative;
  left: 50%;
  width: 118%;
  max-width: none;
  transform: translateX(-50%);
}

.book h2 {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 650px) {
  .now-map {
    height: 220px;
  }

  .dyson-sphere {
    margin-top: 64px;
  }

  .home-footer__inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 16px;
  }

  .bookshelf-intro {
    margin-bottom: 40px;
  }
}

@media (max-width: 650px) {
  .skill-group {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}
