@font-face {
  font-family: "Gloock";
  src: url("assets/fonts/gloock-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #e9eae4;
  --ink: #10110d;
  --blue: #1f35e0;
  --lime: #dfff3f;
  --moss: #5b5e53;
  --paper-dim: #b9bcb0;
  --rule: rgba(16, 17, 13, 0.18);
  --rule-dark: rgba(233, 234, 228, 0.24);
  --font-display: "Gloock", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --wrap: 1600px;
  --gutter: clamp(20px, 4vw, 64px);
  --section-y: clamp(96px, 14vh, 168px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.7;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

figure {
  margin: 0;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.about :focus-visible,
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--lime);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.8125rem;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

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

/* Header */

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px var(--gutter);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.wordmark {
  color: var(--ink);
  text-decoration: none;
}

.wordmark:hover {
  text-decoration: underline;
  text-decoration-color: var(--blue);
}

.site-nav {
  display: flex;
  gap: clamp(20px, 3vw, 48px);
  color: var(--paper);
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 2px;
}

.site-nav a:focus-visible {
  outline-color: var(--lime);
}

/* Hero */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 60fr 40fr;
  min-height: 100svh;
  overflow: clip;
  background: var(--paper);
}

.hero-design {
  container-type: inline-size;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 120px var(--gutter) clamp(36px, 6vh, 64px);
  overflow: hidden;
  border-right: 2px solid var(--lime);
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, rgba(16, 17, 13, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(16, 17, 13, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-name {
  font-size: clamp(4rem, 27cqi, 15rem);
  line-height: 0.82;
  letter-spacing: -0.045em;
  color: var(--ink);
}

.hero-name span {
  display: block;
}

.hero-bottom {
  display: grid;
  gap: 16px;
  max-width: 46rem;
  margin-top: clamp(24px, 4vh, 48px);
}

.hero-role {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--moss);
}

.hero-type {
  display: grid;
  gap: 2px;
  margin-block: 2px;
}

.type-lead {
  color: var(--moss);
  font-size: 0.8125rem;
  font-weight: 500;
}

.type-line {
  display: block;
  min-height: 1.1em;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.8rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.type-cursor {
  display: inline-block;
  width: 0.12em;
  height: 0.8em;
  margin-left: 0.06em;
  background: var(--lime);
  box-shadow: inset 0 0 0 1px var(--ink);
  vertical-align: -0.02em;
  animation: cursor-pulse 1.2s ease-in-out infinite;
}

@keyframes cursor-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}

.hero-intro {
  max-width: 40ch;
  font-size: clamp(1rem, 1.35vw, 1.25rem);
  line-height: 1.6;
}

.hero-note {
  max-width: 30ch;
  margin-top: 4px;
  justify-self: end;
  color: var(--moss);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: right;
}

.hero-code {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 112px clamp(24px, 3.2vw, 48px) clamp(32px, 5vh, 48px);
  overflow: hidden;
  background: var(--blue);
  color: var(--paper);
}

.code-head {
  display: flex;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(233, 234, 228, 0.22);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.code {
  margin: auto 0 0;
  padding: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: clamp(0.78rem, 1vw, 0.9rem);
  line-height: 1.8;
  white-space: pre;
  scrollbar-width: thin;
  counter-reset: line;
}

.line {
  position: relative;
  display: block;
  padding-left: 3.2em;
}

.line::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 2.2em;
  color: rgba(233, 234, 228, 0.42);
  text-align: right;
  counter-increment: line;
  content: counter(line, decimal-leading-zero);
}

.tok-keyword {
  color: #c9d2ff;
}

.tok-prop {
  color: var(--paper);
}

.tok-string {
  color: var(--lime);
}

.tok-comment {
  color: rgba(233, 234, 228, 0.55);
}

.line.is-active {
  background: var(--lime);
  color: var(--ink);
}

.line.is-active .tok-keyword,
.line.is-active .tok-prop,
.line.is-active .tok-string,
.line.is-active .tok-comment {
  color: var(--ink);
}

.line.is-active::before {
  color: rgba(16, 17, 13, 0.65);
}

/* Statement */

.statement {
  padding-block: var(--section-y);
}

.statement-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(220px, 4fr);
  align-items: end;
  gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(32px, 5vh, 56px);
  border-top: 1px solid var(--rule);
}

.statement-text {
  max-width: 19ch;
  font-size: clamp(2.6rem, 5.3vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.statement-aside {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding-bottom: 0.5rem;
}

.statement-aside p {
  max-width: 22ch;
  color: var(--moss);
  font-size: 0.8125rem;
}

.statement-aside a {
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration-color: var(--blue);
  text-underline-offset: 0.22em;
}

/* Work */

.work {
  padding-bottom: var(--section-y);
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  align-items: start;
  gap: clamp(40px, 7vw, 112px);
  padding-top: clamp(28px, 4vh, 48px);
  border-top: 1px solid var(--rule);
}

.work-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(24px, 4vh, 40px);
  border-bottom: 1px solid var(--ink);
}

.work-head h2 {
  font-size: clamp(2.25rem, 3.6vw, 3.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.work-head p {
  max-width: 30ch;
  color: var(--moss);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: right;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 11rem;
  grid-template-areas:
    "title meta"
    "desc meta";
  align-items: start;
  column-gap: clamp(20px, 3vw, 40px);
  row-gap: 10px;
  padding-block: clamp(22px, 3.2vh, 32px);
  border-bottom: 1px solid var(--ink);
  color: inherit;
  text-decoration: none;
}

.project-title {
  grid-area: title;
  color: var(--ink);
  font-size: clamp(2rem, 3.1vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  transition: color 0.18s ease;
}

.project-desc {
  grid-area: desc;
  max-width: 48ch;
  color: var(--moss);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.project-meta {
  grid-area: meta;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  color: var(--moss);
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: right;
}

.project-visit {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--blue);
  text-underline-offset: 0.2em;
}

.project:hover .project-title,
.project:focus-visible .project-title {
  color: var(--blue);
}

@media (min-width: 961px) {
  .project.is-active .project-title {
    color: var(--blue);
  }
}

.project:hover .project-visit,
.project:focus-visible .project-visit {
  text-decoration-thickness: 2px;
}

.project-mark {
  display: none;
}

.mark-alpha {
  background: var(--blue);
  color: var(--paper);
}

.mark-tulista {
  background: var(--lime);
  color: var(--ink);
}

.mark-tissores {
  background: var(--ink);
  color: var(--lime);
}

.work-preview {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
}

.cover {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.25s ease,
    visibility 0.25s;
}

.cover.is-active {
  visibility: visible;
  opacity: 1;
}

.cover-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover figcaption {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(24px, 2.8vw, 40px);
}

.cover-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 3.6vw, 4.2rem);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.cover-caption {
  font-size: 0.75rem;
  line-height: 1.5;
}

.cover-alpha {
  background: var(--blue);
}

.cover-alpha .cover-title,
.cover-alpha .cover-caption {
  color: var(--paper);
}

.alpha-phone {
  fill: none;
  stroke: var(--paper);
  stroke-width: 2;
}

.alpha-screen {
  fill: none;
  stroke: var(--paper);
  stroke-width: 1;
  opacity: 0.4;
}

.alpha-bar {
  fill: var(--lime);
}

.alpha-dot {
  fill: var(--paper);
}

.alpha-check {
  fill: none;
  stroke: var(--lime);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-tulista {
  background: var(--lime);
}

.cover-tulista::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  height: 22%;
  background: var(--ink);
}

.cover-tulista .cover-art {
  color: var(--ink);
}

.cover-tulista .cover-title {
  color: var(--ink);
}

.cover-tulista .cover-caption {
  color: var(--lime);
}

.tulista-check {
  fill: none;
  stroke: var(--lime);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cover-tissores {
  background: var(--ink);
}

.cover-tissores .cover-art {
  color: var(--paper);
}

.cover-tissores .cover-title {
  color: var(--lime);
}

.cover-tissores .cover-caption {
  color: var(--paper);
}

.tissores-grid {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  opacity: 0.5;
}

.tissores-slot {
  fill: var(--lime);
}

.tissores-clock {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

/* About */

.about {
  padding-block: var(--section-y);
  background: var(--ink);
  color: var(--paper);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(160px, 3fr) minmax(0, 9fr);
  align-items: start;
  gap: clamp(32px, 6vw, 96px);
}

.about-title {
  color: var(--paper);
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.about-body {
  display: grid;
  gap: 22px;
  max-width: 62ch;
}

.about-lead {
  max-width: 18ch;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.about-body p:not(.about-lead) {
  color: var(--paper-dim);
  font-size: 0.9375rem;
  line-height: 1.8;
}

.principles {
  margin-top: clamp(64px, 10vh, 120px);
}

.principles ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 clamp(24px, 4vw, 56px);
}

.principles li {
  padding-top: 20px;
  border-top: 1px solid var(--rule-dark);
}

.principles h3 {
  color: var(--paper);
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.principles p {
  margin-top: 12px;
  color: var(--paper-dim);
  font-size: 0.875rem;
  line-height: 1.75;
}

/* Contact */

.contact {
  padding-block: var(--section-y) clamp(64px, 10vh, 112px);
  background: var(--blue);
  color: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr);
  align-items: end;
  gap: clamp(40px, 7vw, 112px);
}

.contact-main h2 {
  max-width: 11ch;
  color: var(--paper);
  font-size: clamp(3rem, 6.4vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.contact-note {
  max-width: 46ch;
  margin-top: clamp(24px, 4vh, 40px);
  color: var(--paper);
  font-size: 0.9375rem;
  line-height: 1.75;
}

.contact-action {
  display: grid;
  justify-items: start;
  gap: 24px;
  padding-bottom: 0.5rem;
}

.email {
  padding-bottom: 0.12em;
  border-bottom: 2px solid var(--lime);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.email:hover {
  border-bottom-width: 4px;
}

.contact-elsewhere {
  color: var(--paper);
  font-size: 0.75rem;
  line-height: 1.6;
}

.contact-elsewhere a {
  text-decoration-color: var(--lime);
  text-underline-offset: 0.2em;
}

/* Footer */

.site-footer {
  padding-block: 24px 40px;
  background: var(--blue);
  color: var(--paper);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(233, 234, 228, 0.3);
  font-size: 0.75rem;
  line-height: 1.6;
}

.footer-grid span:nth-child(2) {
  justify-self: center;
  text-align: center;
}

.footer-grid a {
  justify-self: end;
  text-decoration-color: var(--lime);
  text-underline-offset: 0.2em;
}

/* Compact desktop work layout */

@media (min-width: 961px) and (max-width: 1120px) {
  .work-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
    gap: 48px;
  }

  .project {
    grid-template-columns: minmax(0, 1fr) 8rem;
    column-gap: 24px;
  }

  .project-desc {
    font-size: 0.875rem;
  }

  .work-head p {
    max-width: 24ch;
  }
}

/* Tablet and below */

@media (max-width: 960px) {
  .site-header,
  .site-nav {
    color: var(--ink);
  }

  .site-nav a:focus-visible {
    outline-color: var(--blue);
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-design {
    min-height: 64svh;
    padding-top: 112px;
    border-right: 0;
    border-bottom: 2px solid var(--lime);
  }

  .hero-code {
    min-height: 42svh;
    padding-top: 48px;
  }

  .code {
    margin-top: 48px;
    font-size: clamp(0.72rem, 1.7vw, 0.85rem);
  }

  .hero-note {
    justify-self: start;
    text-align: left;
  }

  .statement-grid,
  .work-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .statement-grid {
    align-items: start;
    gap: 40px;
  }

  .statement-text {
    max-width: 20ch;
  }

  .work-grid {
    gap: 0;
  }

  .work-preview {
    display: none;
  }

  .project {
    grid-template-columns: 36px minmax(0, 1fr);
    grid-template-areas:
      "mark title"
      "desc desc"
      "meta meta";
    column-gap: 16px;
    row-gap: 12px;
  }

  .project-mark {
    display: grid;
    place-items: center;
    grid-area: mark;
    width: 36px;
    height: 36px;
    font-family: var(--font-display);
    font-size: 1rem;
    line-height: 1;
    letter-spacing: -0.02em;
  }

  .project-title {
    grid-area: title;
  }

  .project-desc {
    grid-area: desc;
    max-width: 58ch;
  }

  .project-meta {
    grid-area: meta;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 20px;
    text-align: left;
  }

  .about-grid {
    gap: 28px;
  }

  .about-body {
    max-width: 66ch;
  }

  .about-lead {
    max-width: 20ch;
  }

  .principles ul {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 32px;
  }

  .principles li:last-child {
    grid-column: 1 / -1;
  }

  .principles li:last-child p {
    max-width: 62ch;
  }

  .contact-grid {
    align-items: start;
    gap: 48px;
  }

  .contact-main h2 {
    max-width: 13ch;
  }
}

/* Phone */

@media (max-width: 640px) {
  .site-header {
    gap: 16px;
    padding: 20px var(--gutter);
    font-size: 0.6875rem;
  }

  .site-nav {
    gap: 14px;
  }

  .hero-design {
    padding-top: 100px;
    padding-bottom: 36px;
  }

  .hero-bottom {
    gap: 12px;
  }

  .type-line {
    font-size: clamp(1.35rem, 6.8vw, 1.8rem);
  }

  .hero-intro {
    max-width: 34ch;
    font-size: 0.9375rem;
  }

  .hero-note {
    margin-top: 2px;
    font-size: 0.6875rem;
  }

  .hero-code {
    padding: 40px 20px 32px;
  }

  .code {
    margin-top: 36px;
    font-size: 0.7rem;
    line-height: 1.75;
  }

  .line {
    padding-left: 2.8em;
  }

  .statement {
    padding-block: clamp(80px, 12vh, 112px);
  }

  .statement-text {
    max-width: none;
    font-size: clamp(2.25rem, 9vw, 3.25rem);
  }

  .statement-aside {
    padding-bottom: 0;
  }

  .work {
    padding-bottom: clamp(80px, 12vh, 112px);
  }

  .work-head {
    display: grid;
    gap: 12px;
    align-items: start;
  }

  .work-head p {
    max-width: none;
    text-align: left;
  }

  .project {
    padding-block: 22px;
  }

  .project-title {
    font-size: 2rem;
  }

  .project-meta {
    font-size: 0.6875rem;
  }

  .about {
    padding-block: clamp(80px, 12vh, 112px);
  }

  .about-title {
    font-size: 2.5rem;
  }

  .about-lead {
    max-width: none;
    font-size: clamp(1.8rem, 7vw, 2.5rem);
  }

  .principles {
    margin-top: 56px;
  }

  .principles ul {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact {
    padding-block: clamp(80px, 12vh, 112px) 72px;
  }

  .contact-main h2 {
    max-width: none;
    font-size: clamp(2.8rem, 10vw, 4rem);
  }

  .contact-note {
    font-size: 0.875rem;
  }

  .email {
    font-size: clamp(1.35rem, 6vw, 1.8rem);
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: start;
  }

  .footer-grid span:nth-child(2) {
    justify-self: start;
    text-align: left;
  }

  .footer-grid a {
    justify-self: start;
  }
}

@media (max-width: 380px) {
  .site-header {
    gap: 12px;
    font-size: 0.65rem;
  }

  .site-nav {
    gap: 10px;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
