:root {
  --ink: #171717;
  --paper: #f7f2e8;
  --white: #fffef8;
  --yellow: #ffdc58;
  --blue: #75c9ff;
  --purple: #b9a7ff;
  --pink: #ff9fbd;
  --border: 3px solid var(--ink);
  --shadow: 7px 7px 0 var(--ink);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
}

.site-header,
.section,
footer {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--border);
}

.brand {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.08em;
}

.brand span,
h1 span,
.contact h2 span {
  color: #5d43db;
}

.nav {
  display: flex;
  gap: 36px;
  font-weight: 700;
}

.nav a {
  position: relative;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 3px;
  background: var(--ink);
  transition: right .2s ease;
}

.nav a:hover::after,
.nav a:focus-visible::after {
  right: 0;
}

.menu-button {
  display: none;
  padding: 10px 14px;
  border: var(--border);
  background: var(--yellow);
  color: var(--ink);
  font: 700 .85rem "Space Grotesk", sans-serif;
  box-shadow: 4px 4px 0 var(--ink);
}

.hero {
  min-height: calc(100vh - 86px);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 72px;
  padding-block: 76px;
}

.availability {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 30px;
  padding: 9px 13px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  font-size: .82rem;
  font-weight: 700;
}

.availability span {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #50dc86;
  animation: pulse 1.8s infinite;
}

.eyebrow {
  margin: 0 0 14px;
  font-family: "Space Grotesk", sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", sans-serif;
}

h1 {
  margin: 0;
  font-size: clamp(4rem, 7.6vw, 7rem);
  line-height: .9;
  letter-spacing: -.075em;
}

.hero-text {
  max-width: 640px;
  margin: 30px 0 34px;
  font-size: clamp(1.05rem, 1.7vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 54px;
  padding: 0 22px;
  border: var(--border);
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform .16s ease, box-shadow .16s ease;
}

.button:hover,
.button:focus-visible {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 var(--ink);
}

.button-primary {
  background: var(--yellow);
}

.button-light {
  background: var(--white);
}

.button-dark {
  background: var(--ink);
  color: var(--white);
  box-shadow: 5px 5px 0 #5d43db;
}

.hero-visual {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
}

.portrait-card {
  position: relative;
  width: min(420px, 86%);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--purple);
  box-shadow: 12px 12px 0 var(--ink);
  transform: rotate(2deg);
}

.portrait-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, #fff7 0 25%, transparent 26%), repeating-linear-gradient(45deg, transparent 0 28px, #0000000b 29px 31px);
}

.portrait-card img {
  position: absolute;
  inset: 9% 9% auto;
  width: 82%;
  aspect-ratio: 1;
  object-fit: cover;
  border: var(--border);
  border-radius: 50%;
  filter: saturate(.88) contrast(1.04);
}

.portrait-label {
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 24px;
  padding: 13px 16px;
  border: var(--border);
  background: var(--white);
  font: 700 1rem "Space Grotesk", sans-serif;
  text-align: center;
}

.sticker {
  position: absolute;
  z-index: 2;
  border: var(--border);
  box-shadow: 5px 5px 0 var(--ink);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
}

.sticker-code {
  top: 9%;
  right: -2%;
  padding: 16px 20px;
  background: var(--blue);
  transform: rotate(9deg);
}

.sticker-build {
  left: -4%;
  bottom: 6%;
  padding: 14px 17px;
  background: var(--pink);
  line-height: 1.05;
  transform: rotate(-8deg);
}

.ticker {
  overflow: hidden;
  border-block: var(--border);
  background: var(--ink);
  color: var(--yellow);
  transform: rotate(-1deg) scale(1.02);
}

.ticker-track {
  width: max-content;
  display: flex;
  animation: ticker 24s linear infinite;
}

.ticker span {
  padding: 14px 20px;
  font: 700 1rem "Space Grotesk", sans-serif;
  letter-spacing: .08em;
}

.about,
.projects,
.principles,
.contact {
  padding-block: 130px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 54px;
}

.section-heading::after {
  content: "";
  flex: 1;
  height: 3px;
  background: var(--ink);
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  letter-spacing: -.06em;
}

.section-number {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  flex: 0 0 auto;
  border: var(--border);
  border-radius: 50%;
  background: var(--yellow);
  font: 700 .9rem "Space Grotesk", sans-serif;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.45fr .55fr .55fr;
  gap: 24px;
}

.about-card,
.principle-card {
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.about-main {
  grid-row: span 2;
  padding: 38px;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.55;
}

.about-main p:first-child {
  margin-top: 0;
}

.about-main p:last-child {
  margin-bottom: 0;
}

.stat-card {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
}

.stat-card strong {
  font: 700 3.5rem "Space Grotesk", sans-serif;
  letter-spacing: -.08em;
}

.stat-card span {
  font-weight: 700;
}

.yellow {
  background: var(--yellow);
}

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

.stack-card {
  grid-column: 2 / 4;
  padding: 26px;
}

.stack-card h3 {
  margin: 0 0 18px;
  font-size: 1.35rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tags span,
.project-meta span {
  padding: 8px 11px;
  border: 2px solid var(--ink);
  background: var(--paper);
  font-size: .78rem;
  font-weight: 700;
}

.project-list {
  display: grid;
  gap: 30px;
}

.project-card {
  position: relative;
  display: grid;
  grid-template-columns: 56px 1fr 320px;
  align-items: stretch;
  gap: 30px;
  padding: 28px;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.project-index {
  padding-top: 5px;
  font: 700 1.1rem "Space Grotesk", sans-serif;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-content h3 {
  margin: 22px 0 14px;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1;
  letter-spacing: -.06em;
}

.project-content p {
  max-width: 600px;
  margin-bottom: 30px;
  line-height: 1.65;
}

.project-content a,
.text-link,
footer a:last-child {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.project-art {
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: var(--border);
  background-image: repeating-linear-gradient(-45deg, transparent 0 18px, #00000010 19px 22px);
}

.project-art span {
  display: grid;
  width: 140px;
  height: 140px;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: var(--white);
  font: 700 5rem "Space Grotesk", sans-serif;
  box-shadow: 8px 8px 0 var(--ink);
  transform: rotate(-8deg);
}

.art-purple {
  background-color: var(--purple);
}

.art-yellow {
  background-color: var(--yellow);
}

.art-blue {
  background-color: var(--blue);
}

.principle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle-card {
  min-height: 260px;
  padding: 30px;
  transition: transform .18s ease;
}

.principle-card:hover {
  transform: translateY(-7px);
}

.principle-card > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 2px solid var(--ink);
  background: var(--pink);
  font-weight: 700;
}

.principle-card:nth-child(2) > span {
  background: var(--yellow);
}

.principle-card:nth-child(3) > span {
  background: var(--blue);
}

.principle-card h3 {
  margin: 40px 0 12px;
  font-size: 1.5rem;
}

.principle-card p {
  margin: 0;
  line-height: 1.6;
}

.contact-card {
  padding: clamp(36px, 7vw, 86px);
  border: var(--border);
  border-radius: var(--radius);
  background: var(--yellow);
  box-shadow: 12px 12px 0 var(--ink);
}

.contact-card h2 {
  max-width: 900px;
  margin: 12px 0 22px;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: .95;
  letter-spacing: -.07em;
}

.contact-card > p:not(.eyebrow) {
  max-width: 700px;
  margin: 0 0 34px;
  font-size: 1.1rem;
  line-height: 1.65;
}

footer {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: var(--border);
}

footer p {
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

@keyframes pulse {
  50% {
    box-shadow: 0 0 0 5px #50dc8640;
  }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-visual {
    min-height: 500px;
  }

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

  .about-main,
  .stack-card {
    grid-column: 1 / 3;
    grid-row: auto;
  }

  .project-card {
    grid-template-columns: 42px 1fr;
  }

  .project-art {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .project-index {
    grid-row: 2;
  }

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

@media (max-width: 640px) {
  .site-header,
  .section,
  footer {
    width: min(100% - 28px, 1180px);
  }

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

  .menu-button {
    display: block;
  }

  .nav {
    position: fixed;
    inset: 74px 14px auto;
    z-index: 10;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    border: var(--border);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 16px;
    border-bottom: 2px solid var(--ink);
  }

  .nav a:last-child {
    border-bottom: 0;
  }

  .hero {
    min-height: auto;
    padding-block: 62px 80px;
  }

  h1 {
    font-size: clamp(3.45rem, 17vw, 5rem);
  }

  .hero-actions .button {
    width: 100%;
  }

  .hero-visual {
    min-height: 410px;
  }

  .portrait-card {
    width: 82%;
  }

  .sticker-code {
    right: 0;
  }

  .sticker-build {
    left: 0;
  }

  .about,
  .projects,
  .principles,
  .contact {
    padding-block: 88px;
  }

  .section-heading {
    gap: 14px;
    margin-bottom: 38px;
  }

  .section-heading h2 {
    font-size: 2.45rem;
  }

  .section-number {
    width: 44px;
    height: 44px;
  }

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

  .about-main,
  .stack-card {
    grid-column: auto;
  }

  .about-main {
    padding: 26px;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 20px;
  }

  .project-art,
  .project-index {
    grid-column: auto;
    grid-row: auto;
  }

  .project-art {
    min-height: 220px;
    grid-row: 1;
  }

  .project-index {
    display: none;
  }

  .contact-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    justify-content: center;
    padding-block: 28px;
  }
}

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

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