:root {
  color-scheme: light;
  --ink: #080808;
  --paper: #ffffff;
  --muted: #5d5d5d;
  --line: #d8d8d8;
  --gutter: clamp(1rem, 4vw, 3rem);
  --content: 52rem;
  font-family: Arial, Helvetica, sans-serif;
  font-synthesis: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.55;
  overflow-x: clip;
}

button,
input,
textarea,
select {
  font: inherit;
}

img,
svg,
object {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

[data-primary-action] {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

:focus-visible {
  outline: 0.1875rem solid var(--ink);
  outline-offset: 0.1875rem;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border: 0.125rem solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  font-weight: 700;
  transform: translateY(calc(-100% - 1rem));
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Home */

.home-page {
  position: relative;
  display: flex;
  min-height: 100vh;
  min-height: 100svh;
  flex-direction: column;
}

.home-header {
  position: relative;
  z-index: 3;
  padding: 1rem var(--gutter) 0;
}

.identity-block {
  width: fit-content;
  max-width: 100%;
}

.identity-block h1 {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.contact-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.contact-nav a {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.125rem;
  font-size: 0.875rem;
  text-decoration: none;
}

.contact-nav a:hover {
  text-decoration: underline;
}

.home-main {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.primary-nav {
  position: absolute;
  top: -6.9375rem;
  right: var(--gutter);
  z-index: 4;
  display: flex;
  overflow: hidden;
  border: 0.1875rem solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
}

.primary-nav a {
  position: relative;
  display: inline-flex;
  min-width: 6.75rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem 1.125rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
}

.primary-nav a + a {
  border-left: 0.125rem solid var(--ink);
}

.primary-nav a:focus-visible {
  z-index: 2;
  outline-offset: -0.375rem;
}

.action-label {
  display: block;
  transition: transform 180ms ease;
}

.action-label-clone {
  position: absolute;
  transform: translateY(180%);
}

.primary-nav a:hover .action-label:not(.action-label-clone),
.primary-nav a:focus-visible .action-label:not(.action-label-clone) {
  transform: translateY(-180%);
}

.primary-nav a:hover .action-label-clone,
.primary-nav a:focus-visible .action-label-clone {
  transform: translateY(0);
}

/* Inner routes */

.route-header,
.route-main {
  width: min(calc(100% - (2 * var(--gutter))), var(--content));
  margin-inline: auto;
}

.route-header {
  padding-top: clamp(0.75rem, 2.5vw, 1.5rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border: 0.125rem solid transparent;
  border-radius: 999px;
  font-weight: 700;
}

.back-link:hover {
  border-color: var(--ink);
  text-decoration: none;
}

.route-main {
  min-width: 0;
  padding: clamp(1.25rem, 4vw, 2.5rem) 0 6rem;
  overflow-wrap: anywhere;
}

.route-main > h1 {
  margin: 0 0 clamp(2.5rem, 7vw, 4.5rem);
  font-size: 1.125rem;
  line-height: 1.2;
}

.route-main h2,
.route-main h3,
.route-main p {
  max-width: 46rem;
}

.route-main h2,
.route-main h3 {
  text-wrap: balance;
}

.route-main p,
.route-main li,
.route-main a {
  font-size: 1rem;
}

.intro-section {
  margin-bottom: clamp(3rem, 9vw, 5rem);
}

.intro-section h2,
.project-entry > h2 {
  max-width: 44rem;
  margin: 0;
  font-size: clamp(2.25rem, 8vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.intro-section p {
  margin: 1.25rem 0 0;
  color: #2f2f2f;
  font-size: clamp(1rem, 2.5vw, 1.1875rem);
}

.offering-list {
  display: grid;
  margin: 1rem 0 0;
  padding-left: 1.25rem;
  gap: 0.625rem;
}

.contact-section {
  margin-top: clamp(3.5rem, 10vw, 6rem);
}

.contact-section h2,
.resume-section > h2,
.resume-preview > h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.625rem);
}

.action-group,
.document-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 0.75rem;
}

.action-group a {
  display: flex;
  min-width: 0;
  min-height: 4.5rem;
  flex-direction: column;
  justify-content: center;
  padding: 0.75rem 1rem;
  border: 0.125rem solid var(--ink);
  border-radius: 1rem;
  text-decoration: none;
}

.action-group a:hover,
.project-action:hover,
.document-actions a:hover {
  background: var(--ink);
  color: var(--paper);
}

.action-group strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.8125rem !important;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-entry {
  padding-top: clamp(1.5rem, 4vw, 2.5rem);
  border-top: 0.1875rem solid var(--ink);
}

.project-entry section {
  display: grid;
  grid-template-columns: minmax(7.5rem, 0.35fr) minmax(0, 1fr);
  gap: 1rem;
  padding: 1.5rem 0;
  border-bottom: 0.0625rem solid var(--line);
}

.project-entry section:first-of-type {
  margin-top: 2rem;
}

.project-entry section h3,
.project-entry section p {
  margin: 0;
}

.project-action,
.document-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1rem;
  border: 0.125rem solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

.project-action {
  margin-top: 2rem;
}

.resume-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 8vw, 5rem);
}

.resume-heading h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 0.88;
  letter-spacing: -0.06em;
}

.document-actions {
  grid-template-columns: repeat(2, minmax(0, auto));
}

.resume-section,
.resume-preview {
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  border-top: 0.125rem solid var(--ink);
}

.tag-list {
  display: flex;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag-list li {
  padding: 0.4rem 0.75rem;
  border: 0.0625rem solid var(--ink);
  border-radius: 999px;
}

.resume-entry {
  display: grid;
  grid-template-columns: minmax(12rem, 0.7fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.25rem 0;
  border-top: 0.0625rem solid var(--line);
}

.resume-entry:first-of-type {
  border-top: 0;
}

.resume-entry h3,
.resume-entry p {
  margin: 0;
}

.entry-heading p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.resume-preview {
  display: none;
}

.resume-preview object {
  width: 100%;
  height: 75vh;
  min-height: 42rem;
  border: 0.125rem solid var(--ink);
  border-radius: 0.75rem;
}

@media (max-width: 47.99rem) {
  .project-entry section,
  .resume-entry {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  .resume-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .document-actions {
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 8.5rem), 1fr));
  }
}

@media (min-width: 48rem) {
  .resume-preview {
    display: block;
  }
}

@media (max-width: 39.99rem) {
  .home-header {
    padding-top: 0.875rem;
  }

  .primary-nav {
    position: relative;
    top: auto;
    right: auto;
    display: grid;
    width: auto;
    margin: 0.5rem var(--gutter) 0;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 6.75rem), 1fr));
    gap: 0.5rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
  }

  .primary-nav a {
    min-width: 0;
    padding-inline: 0.625rem;
    border: 0.15625rem solid var(--ink);
    border-radius: 999px;
  }

  .primary-nav a + a {
    border-left-width: 0.15625rem;
  }
}

@media (max-width: 23.375rem) {
  .primary-nav a:last-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}
