@font-face {
  font-family: "Gabarito";
  src: url("assets/fonts/gabarito-regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Gabarito";
  src: url("assets/fonts/gabarito-semibold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Gabarito";
  src: url("assets/fonts/gabarito-extrabold.ttf") format("truetype");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ground: oklch(0.955 0.008 103);
  --surface: oklch(0.91 0.012 103);
  --ink: oklch(0.235 0.012 120);
  --muted: oklch(0.44 0.016 114);
  --clay: oklch(0.61 0.12 38);
  --clay-dark: oklch(0.31 0.055 36);
  --white: oklch(0.985 0.004 103);
  --line: color-mix(in oklch, var(--ink) 22%, transparent);
  --page-pad: clamp(1.1rem, 3vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--clay) var(--ground);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Gabarito", sans-serif;
  font-size: clamp(1rem, 0.4vw + 0.9rem, 1.22rem);
  line-height: 1.45;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--clay);
  color: var(--white);
}

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

a:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-150%);
}

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

.masthead {
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  padding-inline: var(--page-pad);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-grid;
  place-items: center;
  width: 2.65rem;
  aspect-ratio: 1;
  background: var(--ink);
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.masthead nav,
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  font-size: 0.86rem;
}

.masthead nav a,
footer nav a {
  text-decoration: none;
}

.masthead nav a:hover,
footer nav a:hover {
  text-decoration: underline;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 5rem auto auto;
  row-gap: 1.5rem;
  min-height: auto;
  align-content: start;
  padding-bottom: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  padding: var(--page-pad);
  isolation: isolate;
}

.hero__ground {
  position: absolute;
  z-index: -2;
  top: 6.5rem;
  left: var(--page-pad);
  width: clamp(10rem, 20vw, 17rem);
  aspect-ratio: 1395 / 1724;
  transform: translate(0.65rem, 0.65rem);
  background: var(--clay);
  transform-origin: top;
  animation: settle-plane 1.2s var(--ease-out) both;
}

.hero__portrait {
  grid-column: 1 / 7;
  grid-row: 2;
  width: clamp(10rem, 24vw, 20rem);
  aspect-ratio: 1395 / 1724;
  margin: 0;
  overflow: hidden;
  animation: settle-portrait 1.35s 90ms var(--ease-out) both;
}

.hero__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 38%;
}

.hero h1 {
  grid-column: 1 / 9;
  grid-row: 3;
  align-self: center;
  margin: 0;
  font-size: clamp(4.25rem, 12.5vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.79;
  text-wrap: balance;
  animation: settle-type 1.1s 80ms var(--ease-out) both;
}

.hero h1 span {
  display: block;
}

.hero__statement {
  grid-column: 8 / 13;
  grid-row: 2 / 4;
  align-self: center;
  max-width: 37ch;
  margin: 0 0 0.1rem;
  font-size: clamp(1.25rem, 1.8vw, 2rem);
  line-height: 1.3;
  text-wrap: pretty;
}

.hero__roles {
  grid-column: 8 / 11;
  grid-row: 4;
  align-self: end;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.hero__roles p {
  margin: 0 0 0.35rem;
}

.hero__email {
  grid-column: 8 / 13;
  grid-row: 3;
  align-self: end;
  justify-self: start;
  font-size: 0.82rem;
  writing-mode: initial;
  text-decoration: none;
}

.practice {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  min-height: 74svh;
}

.practice article {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(2rem, 4vw, 4.5rem) var(--page-pad);
}

.practice h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 5.5rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  text-wrap: balance;
}

.practice p {
  max-width: 36ch;
  margin: auto 0 0;
  text-wrap: pretty;
}

.practice__software {
  background: var(--surface);
}

.practice__software > p:first-of-type {
  margin-top: clamp(4rem, 14vw, 12rem);
  font-size: clamp(1.3rem, 2vw, 2.25rem);
  line-height: 1.3;
}

.practice__landear {
  background: var(--clay);
  color: var(--ink);
}

.practice__music {
  background: var(--ink);
  color: var(--white);
}

.practice__landear h2,
.practice__music h2 {
  writing-mode: vertical-rl;
}

.practice .practice__role {
  margin-top: 3rem;
  font-size: 0.9rem;
}

.practice__role a {
  text-decoration-thickness: 1px;
}

.contact {
  position: relative;
  display: grid;
  align-content: center;
  min-height: 66svh;
  padding: clamp(5rem, 10vw, 9rem) var(--page-pad);
}

.contact h2 {
  max-width: none;
  margin: 0 0 clamp(2rem, 5vw, 4rem);
  font-size: clamp(3.8rem, 10vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.85;
}

.contact__email {
  width: fit-content;
  max-width: 100%;
  font-size: clamp(1.35rem, 4vw, 4.5rem);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.contact p {
  margin: 1.5rem 0 0;
  color: var(--muted);
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 7rem;
  padding: 2rem var(--page-pad);
  background: var(--ink);
  color: var(--white);
  font-size: 0.82rem;
}

footer p {
  margin: 0;
}

footer nav a {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}

footer nav img {
  display: block;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.practice article::after,
.contact::before {
  content: "";
  position: absolute;
  left: var(--page-pad);
  right: var(--page-pad);
  height: 1px;
  background: currentColor;
  transform-origin: left;
}

.practice article::after {
  top: 1.4rem;
}

.contact::before {
  top: 2rem;
}

@media (prefers-reduced-motion: no-preference) {
  .scroll-entered::before,
  .scroll-entered::after {
    animation: draw-line 1.2s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}

@keyframes draw-line {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes settle-plane {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0);
  }
}

@keyframes settle-type {
  from {
    transform: translateY(0.3em);
    filter: blur(7px);
    opacity: 0.55;
  }
  to {
    transform: translateY(0);
    filter: blur(0);
    opacity: 1;
  }
}

@keyframes settle-portrait {
  from {
    clip-path: inset(0 0 100% 0);
    filter: contrast(1.35) blur(5px);
  }
  to {
    clip-path: inset(0);
    filter: contrast(1) blur(0);
  }
}

@media (max-width: 780px) {
  .masthead {
    min-height: 4.5rem;
  }

  .hero {
    grid-template-rows: 4.5rem auto auto auto auto;
    min-height: auto;
  }

  .hero__ground {
    top: 6rem;
    width: min(44vw, 13rem);
  }

  .hero__portrait {
    width: min(44vw, 13rem);
  }

  .hero h1 {
    grid-column: 1 / 10;
    font-size: clamp(3.75rem, 15vw, 5.35rem);
  }

  .hero__statement {
    grid-column: 1 / 11;
    grid-row: 4;
    margin-bottom: 0.5rem;
  }

  .hero__roles {
    grid-column: 1 / 10;
    grid-row: 5;
  }

  .hero__email {
    grid-column: 1 / 13;
    grid-row: 5;
    justify-self: start;
  }

  .practice {
    grid-template-columns: 1fr;
  }

  .practice article {
    min-height: 52svh;
  }

  .practice__software {
    min-height: 72svh;
  }

  .practice__software > p:first-of-type {
    margin-top: 6rem;
  }

  .practice__landear h2,
  .practice__music h2 {
    writing-mode: initial;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
