@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/vendor/titillium-web/titillium-web-300.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/vendor/titillium-web/titillium-web-400.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/vendor/titillium-web/titillium-web-600.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/vendor/titillium-web/titillium-web-400-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Titillium Web";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/vendor/titillium-web/titillium-web-600-italic.woff2") format("woff2");
}

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

body {
  margin: 8px;
  background: #fff;
  color: #222;
  font-family: "Titillium Web", Verdana, Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

a {
  color: #1772d0;
  text-decoration: none;
}

a:hover {
  color: #a35a00;
}

a:focus-visible {
  outline: 2px solid #1772d0;
  outline-offset: 4px;
  border-radius: 2px;
}

strong,
dt {
  font-weight: 600;
}

hr {
  height: 1px;
  margin: 0;
  border: 0;
  background-image: linear-gradient(
    to right,
    rgb(0 0 0 / 0%),
    rgb(0 0 0 / 55%),
    rgb(0 0 0 / 0%)
  );
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 6px 10px;
  background: #111;
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.page-shell {
  width: 900px;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

.page-shell:focus {
  outline: none;
}

.page-heading {
  margin: 16px 0;
  font-size: 38px;
  font-weight: 400;
  line-height: normal;
  text-align: center;
}

.page-heading span {
  white-space: nowrap;
}

.profile-table {
  width: 100%;
  border: 0;
  border-spacing: 0;
  table-layout: fixed;
}

.profile-table td {
  padding: 20px;
}

.profile-media {
  width: 30%;
}

.profile-copy {
  width: 70%;
  text-align: left;
}

/* Preserve the original avatar and its existing crop. */
.profile-photo {
  display: block;
  width: 100%;
  aspect-ratio: 2042 / 2189;
  border-radius: 15px;
  object-fit: cover;
  object-position: center 28%;
}

.profile-links {
  margin: 16px 0 0;
  text-align: center;
}

.profile-links a {
  display: inline-block;
  padding: 3px 0;
}

.profile-copy p {
  margin: 0 0 16px;
}

.profile-copy .contact {
  margin-bottom: 0;
}

.section-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 24px;
  margin: 4px 0 20px;
}

.section-nav a {
  padding: 7px 0;
}

.content-section {
  padding: 26px 10px 28px;
  scroll-margin-top: 20px;
}

.content-section h2 {
  margin: 0 0 24px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.35;
}

.timeline-entry + .timeline-entry {
  margin-top: 24px;
}

.entry-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px 16px;
}

.entry-heading h3,
.repo-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
}

.entry-heading h3 {
  flex: 1 1 300px;
}

.timeline-entry p {
  margin: 4px 0 0;
}

.entry-heading .entry-date {
  margin: 0;
}

.entry-date,
.entry-detail,
.entry-role,
.repo-meta,
.repo-tech {
  color: #555;
}

.entry-date {
  font-size: 14px;
}

.detail-list {
  margin: 12px 0 0;
  padding-left: 22px;
}

.detail-list li + li {
  margin-top: 9px;
}

.project-entry {
  display: grid;
  grid-template-columns: 40% 60%;
  padding: 10px 0 22px;
}

.project-entry + .project-entry {
  padding-top: 26px;
  border-top: 1px solid #ededed;
}

.project-entry:last-child {
  padding-bottom: 0;
}

.project-media,
.project-copy {
  min-width: 0;
  padding: 0 15px;
}

.project-media {
  padding-top: 12px;
}

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

.repo-image {
  display: block;
  width: 90%;
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  border-radius: 15px;
  height: auto;
  object-fit: contain;
}

.project-copy p {
  margin: 10px 0 0;
}

.project-copy .repo-meta,
.project-copy .repo-tech {
  margin-top: 4px;
  font-size: 14px;
}

.project-status {
  color: #555;
  font-style: italic;
}

.project-copy .repo-links {
  margin-top: 12px;
}

.repo-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  vertical-align: middle;
}

.repo-links a::before {
  content: "";
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  background: url("../assets/vendor/github/favicon.svg") center / contain no-repeat;
}

.skills-list {
  margin: 0;
}

.skills-list > div {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 8px 16px;
}

.skills-list > div + div {
  margin-top: 10px;
}

.skills-list dd {
  margin: 0;
}

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

.honors-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 24px;
}

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

.honors-list .entry-date {
  flex-shrink: 0;
}

.page-footer {
  margin-top: 12px;
  padding: 16px 10px;
  border-top: 1px solid #ededed;
  color: #666;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 700px) {
  .page-shell {
    padding: 12px;
  }

  .page-heading {
    font-size: 32px;
  }

  .profile-table,
  .profile-table tbody,
  .profile-table tr,
  .profile-table td {
    display: block;
    width: 100%;
  }

  .profile-media {
    max-width: 280px;
    margin: 0 auto;
  }

  .profile-table .profile-copy {
    padding: 12px 10px 20px;
  }

  .section-nav {
    gap: 0 20px;
  }

  .entry-heading {
    display: block;
  }

  .entry-heading .entry-date {
    margin-top: 4px;
  }

  .project-entry {
    display: block;
  }

  .project-media {
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 0 10px;
  }

  .repo-image {
    width: 100%;
  }

  .project-copy {
    padding: 0;
  }

  .skills-list > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 400px) {
  .honors-list li {
    flex-direction: column;
    gap: 2px;
  }
}
