:root {
  color-scheme: light;
  --background: #f7f8fa;
  --surface: #ffffff;
  --ink: #141922;
  --muted: #667085;
  --line: #e2e6ec;
  --line-strong: #c8d0da;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
}

.page {
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(1040px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
}

.header,
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.brand {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.contact,
.footer a {
  text-decoration-color: rgba(20, 25, 34, 0.28);
  text-underline-offset: 4px;
}

.intro {
  align-self: end;
  max-width: 760px;
  padding: 10vh 0 40px;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4.2rem);
  font-weight: 720;
  line-height: 1;
  letter-spacing: 0;
}

.lead {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.portfolio {
  display: grid;
  margin-bottom: 72px;
  border-top: 1px solid var(--line-strong);
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.45fr);
  gap: 24px;
  padding: 22px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.project:hover .project-name,
.project:focus-visible .project-name {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.project:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.project-name {
  font-size: 1.15rem;
  font-weight: 680;
}

.project-category {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

.footer {
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

@media (max-width: 700px) {
  .page {
    width: min(100% - 32px, 1040px);
    padding: 24px 0;
  }

  .header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .intro {
    padding: 56px 0 36px;
  }

  .project {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .project-category {
    text-align: left;
  }
}
