:root {
  --bg: #fafafa;
  --ink: #1f2428;
  --muted: #626b73;
  --line: #e4e4e4;
  --accent: #2f6f73;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem clamp(1rem, 5vw, 3rem);
  border-bottom: 1px solid var(--line);
}

.site-name {
  grid-column: 2;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.site-nav {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.6rem);
  color: var(--muted);
  font-size: 0.96rem;
}

.site-nav a {
  padding: 0.15rem 0;
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 650;
}

main {
  width: min(780px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 8vw, 5rem) 0;
}

.home-page {
  display: grid;
  gap: 2rem;
  min-height: calc(100vh - 5.1rem);
  align-content: center;
  padding-top: 3rem;
  padding-bottom: 6rem;
}

.home-photo {
  display: block;
  width: min(100%, 680px);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
  box-shadow: 0 12px 35px rgba(31, 36, 40, 0.12);
}

.intro {
  max-width: 680px;
}

.intro p {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  line-height: 1.55;
}

h1 {
  margin: 0 0 2rem;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
}

.content-section {
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}

.content-section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  line-height: 1.3;
}

h3 {
  margin: 0;
  font-size: 1.05rem;
}

p {
  margin: 0;
  color: var(--muted);
}

p + p {
  margin-top: 1rem;
}

.subsection {
  margin-top: 1.6rem;
}

.subsection:first-of-type {
  margin-top: 0;
}

.subsection h3 {
  margin-bottom: 0.4rem;
}

.content-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.project-entry h2 a {
  color: var(--ink);
  text-decoration: none;
}

.project-entry h2 a:hover,
.project-entry h2 a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.score-figure {
  margin: 1.4rem 0 0;
}

.score-figure img {
  display: block;
  width: min(100%, 560px);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.score-figure figcaption {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.experience-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.experience-header p,
.role {
  color: var(--ink);
  font-size: 0.95rem;
}

.role {
  margin-bottom: 1rem;
}

@media (max-width: 700px) {
  .site-header {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.8rem;
    padding-top: 1rem;
  }

  .site-name,
  .site-nav {
    grid-column: 1;
  }

  .site-name {
    grid-row: 1;
  }

  .site-nav {
    grid-row: 2;
    justify-self: center;
    flex-wrap: wrap;
    justify-content: center;
  }

  .home-page {
    min-height: auto;
    align-content: start;
    gap: 1.4rem;
  }

  .experience-header {
    display: block;
  }
}
