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

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  background: #fbfaf8;
  color: #000000;
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 682px;
  height: 100%;
  margin: 0 auto;
  padding: 4vh 26px 4vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 1.3rem;
}

.site-header {
  position: relative;
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  transform: translateX(-50%);
  border-bottom: 1px solid #ededed;
}

.site-header .brand {
  font-weight: 500;
}

.site-header a.current {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.theme-toggle {
  margin-left: auto;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  color: #000000;
  cursor: pointer;
}

.theme-toggle:hover {
  opacity: 0.6;
}

html.dark,
html.dark body {
  background: #000000;
  color: #ffffff;
}

html.dark .site-header::after {
  border-bottom-color: #2a2a2a;
}

html.dark .site-header a {
  color: #ffffff;
}

html.dark .theme-toggle {
  color: #ffffff;
}

.name {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 2.65rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.portfolio {
  margin-top: 0;
}

.intro {
  margin-top: 0;
}

.photo {
  margin-top: 0;
  display: block;
  width: 155px;
  height: 155px;
  object-fit: cover;
  border-radius: 7px;
}

.social {
  margin-top: 0;
  display: flex;
  gap: 1.25rem;
}

.built {
  margin-top: 0;
}

.experience,
.opensource,
.contact {
  margin-top: 0;
}

.bye {
  margin-top: 0;
}

.footer-contact {
  margin-top: 0;
  font-size: 0.9rem;
}

a {
  color: #0645ad;
  text-decoration: none;
}

html.dark a {
  color: #6ea8ff;
}

a:hover {
  text-decoration: underline;
}

.site-header a {
  color: #000000;
}

.emphasis {
  font-family: "Manrope", sans-serif;
  font-weight: 600;
}

.works-intro {
  margin-top: 0;
  width: 100%;
}

.works-grid {
  margin-top: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.work {
  border: 1px solid #ededed;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

html.dark .work {
  border-color: #2a2a2a;
}

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

.work-title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.work-links {
  display: flex;
  gap: 0.85rem;
  font-size: 1rem;
}

.work-desc {
  margin-top: 0;
  font-size: 0.95rem;
}

.works-more,
.works-experience,
.works-personal {
  margin-top: 0;
  width: 100%;
}

.writing-intro {
  margin-top: 0;
  width: 100%;
}

.writing-heading {
  margin-top: 0;
  width: 100%;
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.writing-list {
  margin-top: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.writing-item {
  padding: 0.85rem 0;
  border-top: 1px solid #ededed;
}

html.dark .writing-item {
  border-top-color: #2a2a2a;
}

.writing-year {
  font-size: 0.9rem;
}

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

.writing-title {
  font-family: "Instrument Serif", serif;
  font-weight: 400;
  font-size: 1.35rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.writing-desc {
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

.writing-read {
  white-space: nowrap;
  font-size: 0.95rem;
}

@media (max-width: 640px) {
  html,
  body {
    overflow: auto;
  }

  .page {
    height: auto;
    min-height: 100%;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .writing-entry {
    flex-direction: column;
    gap: 0.4rem;
  }
}
