:root {
  --page-margin: 24px;
  --grid-gap: 20px;
  --text: #000;
  --muted: rgba(0, 0, 0, 0.5);
  --subtle: rgba(0, 0, 0, 0.5);
  --thumbnail-border: rgb(0 0 0 / 10%);
  --media: #d9d9d9;
  --radius: 8px;
  --reveal-ease: cubic-bezier(0.45, 0, 0.55, 1);
}

* {
  box-sizing: border-box;
}

html {
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  letter-spacing: 0;
  background: #fff;
}

body {
  min-width: 320px;
  margin: 0;
  background: #fff;
}

body.is-locked {
  overflow: hidden;
}

.password-gate {
  display: none;
  min-height: 100svh;
  padding: 24px;
  place-items: center;
}

.is-locked .password-gate {
  display: grid;
}

.is-locked .page-shell {
  display: none;
}

.password-form {
  width: min(100%, 420px);
}

.password-form h1 {
  margin: 0 0 32px;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
}

.greeting-line {
  position: relative;
  display: block;
  --line-delay: 0ms;
}

.greeting-line:nth-child(2) {
  --line-delay: 1100ms;
}

.greeting-line:nth-child(3) {
  --line-delay: 2600ms;
}

.greeting-word {
  display: inline-block;
  white-space: nowrap;
}

.greeting-character {
  display: inline-block;
  opacity: 0;
  animation: character-reveal 1600ms var(--reveal-ease) both;
  animation-delay: calc(var(--line-delay) + var(--character-delay));
}

.greeting-line::after,
.password-field::after {
  position: absolute;
  inset: -3px;
  background-image:
    repeating-radial-gradient(circle at 20% 30%, rgb(0 0 0 / 35%) 0 0.45px, transparent 0.7px 3px),
    repeating-radial-gradient(circle at 75% 65%, rgb(255 255 255 / 45%) 0 0.4px, transparent 0.65px 2.5px);
  background-size: 4px 4px, 3px 3px;
  content: "";
  mix-blend-mode: soft-light;
  pointer-events: none;
  animation: password-grain 1600ms var(--reveal-ease) both;
  animation-delay: var(--line-delay);
}

@keyframes character-reveal {
  0% {
    filter: blur(4.5px);
    opacity: 0;
    text-shadow: -1.25px 0 rgb(255 100 20 / 22%), 1.25px 0 rgb(40 80 255 / 20%);
  }

  55% {
    filter: blur(1.5px);
    opacity: 0.9;
    text-shadow: -0.45px 0 rgb(255 100 20 / 10%), 0.45px 0 rgb(40 80 255 / 9%);
  }

  100% {
    filter: blur(0);
    opacity: 1;
    text-shadow: 0 0 transparent;
  }
}

@keyframes password-reveal {
  from {
    filter: blur(6px);
    opacity: 0;
    text-shadow: -2px 0 rgb(255 40 80 / 26%), 2px 0 rgb(0 170 255 / 24%);
  }

  60% {
    filter: blur(1.5px);
    opacity: 0.9;
    text-shadow: -0.75px 0 rgb(255 40 80 / 14%), 0.75px 0 rgb(0 170 255 / 13%);
  }

  to {
    filter: blur(0);
    opacity: 1;
    text-shadow: 0 0 transparent;
  }
}

@keyframes password-grain {
  0% {
    opacity: 0.12;
    transform: translate(0, 0);
  }

  35% {
    opacity: 0.1;
    transform: translate(1px, -1px);
  }

  70% {
    opacity: 0.04;
    transform: translate(-1px, 0.5px);
  }

  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

.password-field {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  animation: password-reveal 1600ms var(--reveal-ease) 4400ms both;
}

.password-field::after {
  border-radius: var(--radius);
  animation-delay: 4400ms;
}

.password-field input,
.password-field button {
  min-height: 48px;
  border: 1px solid rgb(0 0 0 / 20%);
  border-radius: var(--radius);
  font: inherit;
}

.password-field input {
  min-width: 0;
  padding: 0 12px;
  color: var(--text);
  background: #fff;
}

.password-field input::placeholder {
  color: rgb(0 0 0 / 50%);
  opacity: 1;
}

.password-field button {
  min-width: 48px;
  padding: 0 20px;
  color: #fff;
  background: #000;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.password-field input:focus-visible,
.password-field button:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
}

.password-form .password-error {
  min-height: 20px;
  margin: 8px 0 0;
  color: #b42318;
  font-size: 14px;
  line-height: 20px;
}

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

.page-shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  width: 100%;
  max-width: 1440px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px var(--page-margin) 64px;
}

.site-header,
.intro,
.work-grid {
  grid-column: 1 / -1;
}

.site-header {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  align-items: center;
  min-height: 60px;
  padding: 0 12px;
}

.brand,
.contact-link {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
}

.brand {
  grid-column: 1 / span 3;
}

.contact-link {
  grid-column: 10 / span 3;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-self: end;
  text-align: right;
}

.contact-icon,
.contact-text {
  display: inline-block;
  transform-origin: center;
}

.contact-icon {
  font-size: 16px;
  line-height: 20px;
}

.contact-link.is-hovering .contact-icon {
  animation: talk-hover-icon 200ms cubic-bezier(0.5, 0, 0.5, 1) both;
}

.contact-link.is-hovering .contact-text {
  animation: talk-hover-text 200ms cubic-bezier(0, 0.52, 0.5, 1) both;
}

.contact-link.is-clicking .contact-icon {
  animation: talk-click-icon 200ms linear both;
}

.contact-link.is-clicking .contact-text {
  animation: talk-click-text 200ms linear both;
}

@keyframes talk-hover-icon {
  from {
    rotate: 0rad;
    scale: 1;
  }

  to {
    rotate: -0.175rad;
    scale: 1.2;
  }
}

@keyframes talk-hover-text {
  from {
    scale: 1;
  }

  to {
    scale: 1.1;
  }
}

@keyframes talk-click-icon {
  0% {
    animation-timing-function: cubic-bezier(0.639, 0, 0.403, 1);
    rotate: -0.175rad;
    scale: 1.2;
  }

  50% {
    animation-timing-function: cubic-bezier(0.64, 0, 0.4, 1);
    rotate: 0.087rad;
    scale: 0.9;
  }

  75% {
    animation-timing-function: cubic-bezier(0.64, 0, 0.4, 1);
    rotate: -0.035rad;
    scale: 1.05;
  }

  100% {
    rotate: 0rad;
    scale: 1;
  }
}

@keyframes talk-click-text {
  0% {
    animation-timing-function: cubic-bezier(0.64, 0, 0.4, 1);
    scale: 1.1;
  }

  50% {
    animation-timing-function: cubic-bezier(0.64, 0, 0.4, 1);
    scale: 0.9;
  }

  75% {
    animation-timing-function: cubic-bezier(0.64, 0, 0.4, 1);
    scale: 1.05;
  }

  100% {
    scale: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .greeting-character,
  .greeting-line::after,
  .password-field,
  .password-field::after,
  .contact-link.is-hovering .contact-icon,
  .contact-link.is-hovering .contact-text,
  .contact-link.is-clicking .contact-icon,
  .contact-link.is-clicking .contact-text {
    animation-duration: 1ms;
    animation-delay: 0ms;
  }
}

.intro {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--grid-gap);
  padding: 96px 0;
}

.intro-copy {
  grid-column: 1 / span 6;
  min-height: 168px;
  padding: 0 12px;
}

h1 {
  max-width: 440px;
  margin: 0;
  font-size: 36px;
  font-weight: 700;
  line-height: 40px;
  letter-spacing: 0;
}

.profile-list {
  font-size: 18px;
  font-weight: 500;
  line-height: 24px;
  padding: 0 12px;
}

.profile-list:nth-of-type(2) {
  grid-column: 7 / span 3;
}

.profile-list:nth-of-type(3) {
  grid-column: 10 / span 3;
}

.profile-list p,
.profile-list ul {
  margin: 0;
  padding: 0;
}

.profile-list p {
  color: var(--muted);
}

.profile-list ul {
  list-style: none;
}

.profile-list ul + ul {
  margin-top: 24px;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 40px var(--grid-gap);
  padding-top: 32px;
}

.project-card {
  grid-column: span 6;
  min-width: 0;
}

.project-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--media);
  transition: background-color 160ms ease, transform 160ms ease;
}

.project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid var(--thumbnail-border);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.project-media:focus-visible {
  outline: 2px solid #000;
  outline-offset: 4px;
}

.project-media:hover {
  background: #cecece;
  transform: translateY(-1px);
}

.project-meta {
  padding: 20px 12px 0;
}

.project-meta h2,
.project-meta p {
  margin: 0;
  font-weight: 500;
}

.project-meta h2 {
  font-size: 18px;
  line-height: 24px;
}

.project-meta p {
  font-weight: 400;
  margin-top: 4px;
  color: var(--subtle);
  font-size: 14px;
  line-height: 16px;
}

@media (max-width: 1180px) {
  .page-shell {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .site-header,
  .intro,
  .work-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .brand {
    grid-column: 1 / span 3;
  }

  .contact-link {
    grid-column: 7 / span 2;
  }

  .intro-copy {
    grid-column: 1 / span 4;
  }

  .profile-list:nth-of-type(2) {
    grid-column: 5 / span 2;
  }

  .profile-list:nth-of-type(3) {
    grid-column: 7 / span 2;
  }

  .project-card {
    grid-column: span 4;
  }
}

@media (max-width: 860px) {
  :root {
    --page-margin: 20px;
    --grid-gap: 16px;
  }

  .desktop-headline-break {
    display: none;
  }

  .intro {
    row-gap: 48px;
    padding: 72px 0 64px;
  }

  .intro-copy {
    grid-column: 1 / -1;
    min-height: 88px;
  }

  h1 {
    max-width: 650px;
    font-size: 34px;
    line-height: 40px;
  }

  .profile-list:nth-of-type(2) {
    grid-column: 1 / span 4;
  }

  .profile-list:nth-of-type(3) {
    grid-column: 5 / span 4;
  }
}

@media (max-width: 560px) {
  :root {
    --page-margin: 16px;
  }

  .page-shell {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-top: 20px;
    padding-bottom: 48px;
  }

  .password-gate {
    padding: 20px;
  }

  .password-form h1 {
    font-size: 30px;
    line-height: 34px;
  }

  .site-header,
  .intro,
  .work-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .site-header {
    min-height: 44px;
  }

  .brand,
  .contact-link {
    font-size: 12px;
    line-height: 16px;
  }

  .brand {
    grid-column: 1 / span 2;
  }

  .contact-link {
    grid-column: 3 / span 2;
  }

  .intro {
    row-gap: 28px;
    padding: 56px 0 28px;
  }

  .intro-copy {
    min-height: 160px;
    padding: 0;
  }

  h1 {
    max-width: 320px;
    font-size: 30px;
    line-height: 34px;
  }

  .profile-list,
  .profile-list:nth-of-type(2),
  .profile-list:nth-of-type(3) {
    grid-column: 1 / -1;
    padding: 0;
  }

  .profile-list {
    font-size: 14px;
    line-height: 18px;
  }

  .profile-list ul + ul {
    margin-top: 18px;
  }

  .work-grid {
    gap: 24px;
    padding-top: 0;
  }

  .project-card {
    grid-column: 1 / -1;
  }

  .project-meta {
    padding: 12px 8px 0;
  }

  .project-meta h2 {
    font-size: 14px;
    line-height: 18px;
  }

  .project-meta p {
    font-size: 12px;
    line-height: 16px;
  }
}
