:root {
  --background: #f7f7f4;
  --text: #20211f;
  --muted: #676863;
  --line: #d7d8d3;
  --link: #2d4e82;
  --content-width: 888px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  border-top: 4px solid var(--text);
  background: var(--background);
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco,
    Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  color: var(--link);
}

.site-header,
main,
footer {
  width: min(calc(100% - 48px), var(--content-width));
  margin-inline: auto;
}

.site-header {
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--line);
}

.site-name {
  font-weight: 700;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 30px;
}

.site-header nav a {
  color: var(--muted);
}

.intro {
  min-height: 348px;
  padding-top: 108px;
  border-bottom: 1px solid var(--line);
}

.intro h1 {
  max-width: 760px;
  margin: 0 0 13px;
  font-size: clamp(2rem, 4vw, 2.3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.04em;
}

.intro p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.page-section {
  padding: 88px 0 86px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 24px;
}

.page-section h2 {
  margin: 0 0 48px;
  font-size: 1.05rem;
  line-height: 1.4;
}

.page-section h2::before {
  content: "# ";
  color: var(--muted);
  font-weight: 400;
}

.project-list {
  border-top: 1px solid var(--line);
}

.experiences-list {
  border-top: 1px solid var(--line);
}

.project {
  padding: 34px 0 35px;
  border-bottom: 1px solid var(--line);
}

.experience {
  padding: 34px 0 35px;
  border-bottom: 1px solid var(--line);
}

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

.experience:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.project-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.experience-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
}

.project h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.experience h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.project-heading span,
.project small {
  color: var(--muted);
}

.experience-heading span,
.experience small {
  color: var(--muted);
}

.project-heading span {
  flex: 0 0 auto;
  font-size: 0.82rem;
  text-align: right;
}

.experience-heading span {
  flex: 0 0 auto;
  font-size: 0.82rem;
  text-align: right;
}

.project p {
  margin: 14px 0 13px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.experience p {
  margin: 14px 0 13px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.72;
}

.project small {
  font-size: 0.82rem;
}

.experience small {
  font-size: 0.82rem;
}

.section-copy {
  max-width: 790px;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.78;
}

.section-copy p {
  margin: 0 0 20px;
}

.section-copy p:last-child {
  margin-bottom: 0;
}

.section-copy strong {
  color: var(--text);
}

.contact-links {
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.contact-links li + li {
  margin-top: 8px;
}

.contact-links a {
  color: var(--link);
}

footer {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 680px) {
  body {
    font-size: 15px;
  }

  .site-header,
  main,
  footer {
    width: min(calc(100% - 32px), var(--content-width));
  }

  .site-header {
    min-height: auto;
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .site-header nav {
    width: 100%;
    justify-content: space-between;
    gap: 16px;
  }

  .intro {
    min-height: 310px;
    padding-top: 70px;
  }

  .intro h1 {
    font-size: clamp(1.85rem, 9vw, 2.25rem);
  }

  .page-section {
    padding: 64px 0;
  }

  .page-section h2 {
    margin-bottom: 30px;
  }

  .project {
    padding: 30px 0;
  }

  .project-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .project-heading span {
    text-align: left;
  }

  footer {
    min-height: 80px;
  }

  .skills-list {
  border-top: 1px solid var(--line);
}

.skill-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.skill-row strong {
  font-size: 0.9rem;
}

.skill-row span {
  color: var(--muted);
}

@media (max-width: 680px) {
  .skill-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
}
