@font-face {
  font-family: "Portfolio Sans";
  src: url("assets/fonts/portfolio-sans-regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Portfolio Sans";
  src: url("assets/fonts/portfolio-sans-bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --sans: "Portfolio Sans", system-ui, sans-serif;
  /* Earlier interface labels use this token; actual code stays monospaced. */
  --mono: var(--sans);
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font-family: inherit; }
code, pre, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
}

/* A compact, complete identity. The companion stage is laid out separately. */
.profile-section {
  display: block;
  min-height: 0;
  padding-top: 54px;
  padding-bottom: 50px;
}
.profile-identity {
  display: flex;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 680px;
}
.profile-avatar {
  display: block;
  width: 152px;
  height: auto;
  flex: 0 0 152px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.profile-avatar img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.profile-avatar.has-avatar {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.profile-monogram {
  font-family: var(--sans);
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: .035em;
  color: #d5dce7;
  user-select: none;
}
.profile-identity .profile-copy { min-width: 0; flex: 1; }
body:not([data-view="landing"]) .profile-copy h1,
body:not([data-view="landing"]) .about-profile .profile-copy h2 {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.025em;
  color: #f3f6fa;
  text-shadow: none;
}
.profile-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 26px;
  max-width: 100%;
  margin-top: 14px;
}
.profile-links:empty { display: none; }
.profile-links a,
.profile-links .profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  box-shadow: none;
  color: #d8dde6;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0;
  text-decoration: none;
  text-shadow: none;
  white-space: nowrap;
  transform: none;
  transition: color .16s ease, text-shadow .16s ease;
}
.profile-links .profile-link > span {
  padding-bottom: 2px;
  border-bottom: 1px solid #cdd5df4a;
  transition: border-color .16s ease;
}
.profile-social-icon {
  display: block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  fill: currentColor;
  shape-rendering: geometricPrecision;
  opacity: .82;
  filter: none;
  transition: opacity .16s ease;
}
.profile-links .profile-link:not(:disabled):not([aria-disabled="true"]):hover {
  color: #ffffff;
  background: transparent;
  box-shadow: none;
  text-shadow: 0 0 13px #ffffff26;
}
.profile-links .profile-link:not(:disabled):not([aria-disabled="true"]):hover > span {
  border-bottom-color: #f3f7ffa8;
}
.profile-links .profile-link:not(:disabled):not([aria-disabled="true"]):hover .profile-social-icon {
  opacity: 1;
}
.profile-links a:focus-visible,
.profile-links .profile-link:focus-visible {
  outline: 2px solid #dce8f5;
  outline-offset: 5px;
}
.profile-links a:active,
.profile-links .profile-link:active { background: transparent; color: #fff; }
.profile-links .profile-link:disabled,
.profile-links .profile-link[aria-disabled="true"] {
  color: #858d9a;
  background: transparent;
  box-shadow: none;
  text-shadow: none;
  cursor: default;
}
.profile-links .profile-link:disabled > span,
.profile-links .profile-link[aria-disabled="true"] > span { border-bottom-color: transparent; }
.profile-links .profile-link:disabled .profile-social-icon,
.profile-links .profile-link[aria-disabled="true"] .profile-social-icon { opacity: .58; }
.about-profile { margin-top: 30px; }
body:not([data-view="landing"]) .hacker-handle {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  color: #bfc4d0;
  margin-top: 4px;
  text-shadow: none;
}

/* One type system across navigation, titles, prose and supporting labels. */
body:not([data-view="landing"]) .page-header nav a {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
}
body:not([data-view="landing"]) .section-header h2 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.02em;
  text-shadow: none;
}
.work-text h3 {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.65;
  letter-spacing: -.025em;
}
.work-detail h4,
.about-research h2 {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: -.015em;
}
.work-intro,
.work-detail p,
.work-detail li,
.note-content > p,
.about-preview-body > p,
.about-intro,
.about-research p,
.about-facts > div {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: -.012em;
}
.work-index > span,
.work-index > small,
.work-tags span,
.note-kind,
.blog-link,
.about-preview-link {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
}
.note-title {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.75;
  letter-spacing: -.02em;
}
body:not([data-view="landing"]) .about-content > h1 {
  font-family: var(--sans);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.025em;
  text-shadow: none;
}
.about-identity > span:first-child {
  font-family: var(--sans);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.02em;
}
body:not([data-view="landing"]) .about-identity > span:last-child {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: 0;
  text-shadow: none;
}

@media (max-width: 600px) {
  .profile-section { padding-top: 34px; padding-bottom: 38px; }
  .profile-identity { gap: 16px; }
  .profile-avatar { width: 112px; height: auto; flex-basis: 112px; }
  .profile-monogram { font-size: 25px; }
  body:not([data-view="landing"]) .profile-copy h1,
  body:not([data-view="landing"]) .about-profile .profile-copy h2 { font-size: 26px; }
  body:not([data-view="landing"]) .hacker-handle { font-size: 14px; }
  .about-profile { margin-top: 25px; }
  body:not([data-view="landing"]) .section-header h2 { font-size: 22px; }
  .work-text h3 { font-size: 22px; }
  .note-title { font-size: 17px; }
  body:not([data-view="landing"]) .about-content > h1 { font-size: 26px; }
  .work-index > small { font-size: 13px; }
}

.profile-bio {
  min-height: 48px;
  max-width: 680px;
  margin-top: 22px;
  color: #c5c9d3;
  font-size: 16px;
  line-height: 1.9;
  white-space: pre-line;
  word-break: keep-all;
}
@media (max-width: 600px) {
  .profile-identity { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 0 20px; align-items: center; }
  .profile-identity .profile-copy { display: contents; }
  .profile-avatar { grid-column: 1; grid-row: 1 / 3; }
  .profile-copy h1, .profile-copy h2 { grid-column: 2; grid-row: 1; align-self: end; }
  .profile-copy .hacker-handle { grid-column: 2; grid-row: 2; align-self: start; margin-top: 5px; }
  .profile-links {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-top: 18px;
    gap: 10px;
  }
  .profile-links .profile-link {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    padding: 8px 0;
    gap: 8px;
  }
  .profile-bio { margin-top: 18px; min-height: 44px; }
}
@media (max-width: 350px) {
  .profile-links { gap: 6px; }
  .profile-links .profile-link { gap: 6px; }
  .profile-social-icon { width: 16px; height: 16px; flex-basis: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-links .profile-link,
  .profile-links .profile-link > span,
  .profile-social-icon { transition: none; }
}
