/* Poster: blue print-texture ground, chunky lowercase display type, colour blocks */
:root {
  --blue: #2740FF;
  --yellow: #FFE14D;
  --orange: #FF6A2B;
  --sky: #BFD0FF;
  --ink: #111111;
  --white: #FFFFFF;
  --display: 'Unbounded', system-ui, sans-serif;
  --mono: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: 28px;
  --radius: 28px;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--white);
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--blue);
  background-image:
    radial-gradient(rgba(255,255,255,0.14) 1px, transparent 1.5px),
    radial-gradient(rgba(0,0,0,0.12) 1px, transparent 1.5px);
  background-size: 8px 8px, 8px 8px;
  background-position: 0 0, 4px 4px;
  overflow-x: hidden;
}

/* paper grain sits over the ground, under the content */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("images/grain.png");
  opacity: 0.16;
  mix-blend-mode: overlay;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; border-radius: 6px; }

.page {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: flex;
  flex-direction: column;
  gap: 100px;
}

main { display: flex; flex-direction: column; gap: 100px; }

/* ---------- nav ---------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  padding-top: 26px;
  font-size: 14px;
  text-transform: uppercase;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a, .socials a { display: inline-block; padding: 6px 0; transition: transform .2s, color .2s; }

/* ---------- hero ---------- */
.hero { display: flex; flex-direction: column; gap: 28px; }

.name {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(56px, 12.5vw, 184px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.k {
  display: inline-block;
  animation: pop .01s both;
  transition: transform .2s, color .2s;
}
.caret {
  display: inline-block;
  width: .09em;
  height: .72em;
  margin-left: .05em;
  background: var(--yellow);
  opacity: 0;
}
.c1 { animation: car .93s steps(1); }
.c2 { animation: car .5s steps(1) .93s, blink .6s steps(1) 1.43s 5; }

.handle {
  display: inline-block;
  margin-left: .6em;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.26em;
  letter-spacing: 0;
  vertical-align: baseline;
  animation: fade .5s 1.5s both;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

.intro {
  flex: 1 1 340px;
  max-width: 440px;
  margin: 0;
  font-size: 18px;
  animation: fade .6s 1.7s both;
}

.frame {
  flex: 1 1 420px;
  max-width: 560px;
  margin-top: 4px;
  padding: 14px;
  background: var(--yellow);
  border-radius: var(--radius);
  transform: rotate(4deg);
  animation: fade .6s 1.9s both;
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.frame img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: 18px;
  background: var(--ink);
}

.badge {
  flex: 0 0 160px;
  width: 160px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--orange);
  transform: rotate(-12deg);
  animation: fade .6s 2.1s both;
  transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.badge svg { width: 100%; height: 100%; }
.badge text {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  fill: var(--ink);
  text-transform: uppercase;
}
.ring {
  transform-box: view-box;
  transform-origin: 80px 80px;
  animation: spin 16s linear infinite;
}

/* ---------- work ---------- */
.work { display: flex; flex-direction: column; gap: 32px; }

.section-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(36px, 5.5vw, 76px);
  letter-spacing: -0.03em;
  line-height: 1;
  text-transform: lowercase;
}

.cards { display: flex; flex-wrap: wrap; gap: 20px; }

.card {
  flex: 1 1 280px;
  min-height: 300px;
  padding: var(--pad);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
}
.card--big { flex: 2 1 480px; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }
.card--big img { aspect-ratio: 16 / 10; }

.card--yellow { background: var(--yellow); color: var(--ink); }
.card--ink    { background: var(--ink);    color: var(--white); }
.card--orange { background: var(--orange); color: var(--ink); }
.card--white  { background: var(--white);  color: var(--ink); }
.card--sky    { background: var(--sky);    color: var(--ink); }

.card-tag { font-size: 14px; text-transform: uppercase; }
.card-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.card-title--big { font-size: clamp(34px, 4.4vw, 60px); line-height: 1; }
.card-note { font-size: 14px; max-width: 32ch; }

/* scroll-in reveal, only when JS is running */
.js .card.reveal { opacity: 0; transform: translateY(28px); }
.js .card.reveal.in { opacity: 1; transform: none; transition: opacity .6s, transform .6s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }

/* ---------- about ---------- */
.about { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }

.about-tag {
  flex: 0 0 auto;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  text-transform: uppercase;
  transform: rotate(-4deg);
}
.about-text {
  flex: 1 1 480px;
  max-width: 900px;
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 3vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.pills { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; }
.pills-label { text-transform: uppercase; padding-right: 8px; }
.pills-label--gap { padding-left: 16px; }
.pill {
  padding: 6px 16px;
  border: 2px solid var(--white);
  border-radius: 999px;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.pill--solid { background: var(--white); color: var(--ink); }

/* ---------- contact ---------- */
.contact { display: flex; flex-direction: column; gap: 20px; padding-bottom: 56px; }
.contact-label { font-size: 14px; text-transform: uppercase; }
.email {
  align-self: flex-start;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(20px, 4.6vw, 66px);
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--yellow);
  overflow-wrap: anywhere;
  transition: color .2s;
}
.socials { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 14px; text-transform: uppercase; }
.copyright { font-size: 12px; opacity: .7; padding-top: 24px; }

/* ---------- hover (mouse only, so taps on phones don't stick) ---------- */
@media (hover: hover) and (pointer: fine) {
  .k:hover { transform: translateY(-0.08em) rotate(-6deg); color: var(--yellow); }
  .frame:hover { transform: rotate(-2deg) scale(1.04); }
  .badge:hover { transform: rotate(348deg) scale(1.08); }
  .card:hover { transform: translate(-6px, -6px) rotate(-1deg); box-shadow: 12px 12px 0 var(--ink); }
  .pill:hover { transform: translateY(-4px) rotate(-3deg); background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
  .nav-links a:hover, .socials a:hover, .nav-name:hover { color: var(--yellow); transform: translateY(-3px); }
  .email:hover { color: var(--white); }
}

/* touch feedback */
.card:active { transform: scale(.98); }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .frame { margin-top: 0; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --pad: 20px; --radius: 22px; }
  .page, main { gap: 72px; }
  .nav { padding-top: 18px; font-size: 13px; }
  .nav-name { flex: 1 1 100%; }
  .nav-links { gap: 22px; }
  .hero { gap: 22px; }
  .handle { display: block; margin: .9em 0 0; font-size: 0.3em; }
  .hero-row { gap: 24px; }
  .intro { font-size: 17px; }
  .frame { flex-basis: 100%; padding: 10px; transform: rotate(2deg); }
  .badge { flex: 0 0 112px; width: 112px; height: 112px; margin: -76px 4px 0 auto; position: relative; z-index: 2; }
  .cards { gap: 16px; }
  .card { min-height: 0; flex-basis: 100%; }
  .card-title { font-size: 28px; }
  .about { gap: 20px; }
  .pills-label--gap { padding-left: 0; flex-basis: 100%; padding-top: 6px; }
  .contact { padding-bottom: 40px; }
}

/* ---------- keyframes ---------- */
@keyframes pop   { from { opacity: 0; width: 0; } }
@keyframes fade  { from { opacity: 0; } }
@keyframes spin  { to { transform: rotate(360deg); } }
@keyframes car   { from { opacity: 1; } to { opacity: 1; } }
@keyframes blink { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .card.reveal { opacity: 1; transform: none; }
}
