@font-face { font-family: "Shantell Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/shantell-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/shantell-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Shantell Sans"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/shantell-sans-latin-800-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: italic; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2"); }

:root {
  --bg: #0e1630;
  --surface: #16224a;
  --surface-2: #1b2958;
  --line: #8fa8f0;
  --shadow: #2f6fd6;
  --text: #dfe6ff;
  --muted: #a9b8e8;
  --pink: #f4a6c8;
  --pink-shadow: #b06a8c;
  --rule: #2a3a70;
  --white: #ffffff;

  --hand: "Shantell Sans", "Comic Sans MS", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  --wobble: 18px 6px 16px 8px / 8px 16px 6px 18px;
  --wobble-sm: 10px 4px 12px 5px / 5px 11px 4px 10px;
  --blob: 46% 54% 50% 50% / 52% 46% 54% 48%;
  --outline: 3px solid var(--line);
  --drop: 5px 6px 0 var(--shadow);
  --drop-big: 7px 9px 0 var(--shadow);

  --wrap: 960px;
  --gutter: 24px;
  --ease: cubic-bezier(0.3, 1.4, 0.5, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg) url("../img/background.jpg") center / cover no-repeat;
}
.backdrop__video { width: 100%; height: 100%; object-fit: cover; }
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(14, 22, 48, 0.78);
}

img, iframe { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--line); text-decoration: none; }
a:hover { color: var(--white); }

:focus-visible {
  outline: 3px dashed var(--pink);
  outline-offset: 4px;
  border-radius: 6px;
}

::selection { background: var(--pink); color: var(--bg); }

h1, h2, h3 { color: var(--white); margin: 0; font-family: var(--hand); font-weight: 800; line-height: 1.1; }
p { margin: 0; }
ul { margin: 0; padding: 0; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main { flex: 1; padding-bottom: 96px; }
@media (max-width: 720px) { main { padding-bottom: 64px; } }

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 20;
  padding: 6px 14px;
  background: var(--pink);
  color: var(--bg);
  font: 700 15px var(--hand);
  border-radius: var(--wobble-sm);
}
.skip:focus { top: 12px; color: var(--bg); }

.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  font-family: var(--hand);
}

.brand {
  color: var(--white);
  font-weight: 800;
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.brand:hover { color: var(--pink); }

.nav { display: flex; gap: 4px; flex: none; }
.nav a {
  padding: 6px 10px;
  font-weight: 700;
  color: var(--line);
}
.nav a:hover { color: var(--white); }
.nav a[aria-current="page"], .nav a.is-active {
  color: var(--white);
  text-decoration: underline wavy var(--pink) 2px;
  text-underline-offset: 6px;
}

.squiggle {
  display: inline-block;
  font-size: 24px;
  padding-bottom: 10px;
  margin-bottom: 22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q 6 0 12 4 T 24 4' fill='none' stroke='%23f4a6c8' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") left bottom / 24px 8px repeat-x;
}

.block { margin-top: 64px; }

.sticker {
  display: inline-block;
  padding: 1px 9px 2px;
  font: 800 13px/1.5 var(--hand);
  color: var(--bg);
  background: var(--pink);
  border-radius: 9px 3px 10px 4px;
  transform: rotate(-6deg);
  vertical-align: 0.3em;
  white-space: nowrap;
}

.bullets { list-style: none; }
.bullets li { position: relative; padding-left: 24px; }
.bullets li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.55em;
  width: 9px;
  height: 9px;
  background: var(--line);
  border-radius: 60% 40% 55% 45% / 45% 60% 40% 55%;
}
.bullets li:nth-child(even)::before { background: var(--pink); transform: rotate(40deg); }
.bullets--compact { font-size: 15px; color: var(--muted); }
.bullets--compact li + li { margin-top: 2px; }
.bullets--large { max-width: 70ch; }
.bullets--large li + li { margin-top: 10px; }

.arrow { display: inline-block; transition: transform 0.2s var(--ease); }

.buttons { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; }
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 7px 16px;
  font: 700 16px/1.2 var(--hand);
  color: var(--white);
  background: var(--surface);
  border: var(--outline);
  border-radius: var(--wobble);
  box-shadow: 4px 5px 0 var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.button:hover { color: var(--white); transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 6px 7px 0 var(--shadow); }
.button:active { transform: translate(3px, 4px); box-shadow: 1px 1px 0 var(--shadow); }
.button:hover .arrow { transform: translate(2px, -2px); }
.button--primary { color: var(--bg); background: var(--pink); border-color: var(--pink); box-shadow: 4px 5px 0 var(--pink-shadow); }
.button--primary:hover { color: var(--bg); box-shadow: 6px 7px 0 var(--pink-shadow); }
.button--primary:active { box-shadow: 1px 1px 0 var(--pink-shadow); }

.back { font: 700 15px/1.5 var(--hand); margin: 20px 0 22px; }
.back a { color: var(--line); }
.back a:hover { color: var(--white); }
.back--end { margin: 72px 0 0; }

.hello {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 48px 0 64px;
}
.hello--no-avatar { grid-template-columns: minmax(0, 1fr); }
.hello__avatar {
  aspect-ratio: 1;
  border: var(--outline);
  border-radius: var(--blob);
  overflow: hidden;
  background: var(--surface);
  transform: rotate(-4deg);
}
.hello__avatar img { width: 100%; height: 100%; object-fit: cover; }
.hello__headline {
  font-size: clamp(34px, 5.6vw, 54px);
  line-height: 1.05;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hello__tagline { margin-top: 10px; font-size: 19px; color: var(--muted); max-width: 46ch; }

.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 28px;
  align-items: start;
}
.cards > li { min-width: 0; }

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 12px;
  color: inherit;
  background: var(--surface);
  border: var(--outline);
  border-radius: var(--wobble);
  box-shadow: var(--drop);
  transform: rotate(var(--tilt, -0.8deg));
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}
.cards > li:nth-child(4n + 2) .card { --tilt: 1.1deg; border-radius: 8px 16px 6px 18px / 18px 6px 16px 8px; }
.cards > li:nth-child(4n + 3) .card { --tilt: 0.6deg; border-radius: 14px 8px 18px 6px / 6px 18px 8px 14px; }
.cards > li:nth-child(4n + 4) .card { --tilt: -1.2deg; }
.card:hover {
  color: inherit;
  transform: rotate(0deg);
  box-shadow: var(--drop-big);
}
.card:focus-visible { outline-offset: 6px; }
.card--no-image { padding: 18px 18px 16px; }

.card__thumb {
  aspect-ratio: 16 / 9;
  border-radius: var(--wobble-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.card__thumb img, .card__thumb video { display: block; width: 100%; height: 100%; object-fit: cover; }
.card:has(video), .hero-media:has(video) { will-change: transform; }

.card__body { display: flex; flex-direction: column; gap: 6px; padding: 12px 4px 2px; min-width: 0; }
.card--no-image .card__body { padding: 0; }
.card__title { font-size: 22px; overflow-wrap: anywhere; }
.card:hover .card__title { color: var(--pink); }
.card__pitch { color: var(--muted); font-size: 16px; }
.card__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 2px 0 0;
  padding-top: 8px;
  border-top: 2px dotted var(--rule);
  font-size: 15px;
  line-height: 1.5;
}
.card__facts > div { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.card__facts dt { font: 700 13px/1.5 var(--hand); color: var(--pink); }
.card__facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

.empty { font: 700 18px var(--hand); color: var(--muted); padding: 24px 0; }

.hero-media {
  aspect-ratio: 16 / 9;
  border: var(--outline);
  border-radius: var(--wobble);
  box-shadow: var(--drop);
  overflow: hidden;
  background: var(--surface);
  transform: rotate(-0.4deg);
}
.hero-media img, .hero-media video, .hero-media iframe { display: block; width: 100%; height: 100%; border: 0; }
.hero-media img, .hero-media video { object-fit: cover; }

.project__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 40px;
  align-items: start;
  margin-top: 40px;
}
.project__head:not(:has(.facts)) { grid-template-columns: minmax(0, 1fr); }

.project__title {
  font-size: clamp(32px, 4.8vw, 46px);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.project__pitch { margin-top: 12px; font-size: 19px; color: var(--muted); max-width: 60ch; }
.project__intro .buttons { margin-top: 24px; }

.facts {
  background: var(--surface);
  border: var(--outline);
  border-radius: 8px 16px 6px 18px / 18px 6px 16px 8px;
  box-shadow: var(--drop);
  padding: 8px 18px;
  transform: rotate(0.7deg);
}
.facts dl { margin: 0; }
.facts dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  font-size: 15px;
}
.facts dl > div + div { border-top: 2px dotted var(--rule); }
.facts dt { font: 700 15px/1.6 var(--hand); color: var(--pink); }
.facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

.prose { max-width: 68ch; line-height: 1.75; }
.prose > * + * { margin-top: 1.1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.25; margin-top: 1.9em; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 24px; }
.prose h3 { font-size: 20px; }
.prose h4 { font-size: 18px; color: var(--pink); }
.prose a { text-decoration: underline wavy var(--shadow) 1.5px; text-underline-offset: 4px; }
.prose a:hover { text-decoration-color: var(--pink); }
.prose strong { color: var(--white); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.35em; }
.prose ul li::marker { color: var(--pink); }
.prose ol li::marker { color: var(--line); font-family: var(--hand); font-weight: 700; }
.prose img { border: var(--outline); border-radius: var(--wobble); }
.prose .md-video { display: block; width: 100%; height: auto; background: var(--surface); border: var(--outline); border-radius: var(--wobble); }
.prose .md-embed { aspect-ratio: 16 / 9; border: var(--outline); border-radius: var(--wobble); overflow: hidden; background: var(--surface); }
.prose .md-embed iframe { display: block; width: 100%; height: 100%; border: 0; }
.prose blockquote {
  margin-left: 0;
  margin-right: 0;
  padding: 10px 16px;
  background: var(--surface);
  border-left: 4px solid var(--pink);
  border-radius: 2px 14px 10px 2px;
  color: var(--muted);
}
.prose hr {
  border: 0;
  height: 8px;
  margin: 2.4em 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4 Q 6 0 12 4 T 24 4' fill='none' stroke='%232a3a70' stroke-width='2.5' stroke-linecap='round'/%3E%3C/svg%3E") left center / 24px 8px repeat-x;
}
.prose code {
  font: 0.86em/1.5 var(--mono);
  background: var(--surface);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--pink);
}
.prose pre {
  margin-left: 0;
  margin-right: 0;
  overflow-x: auto;
  background: #0a1126;
  border: var(--outline);
  border-radius: var(--wobble-sm);
  padding: 16px 18px;
  line-height: 1.6;
}
.prose pre code, .prose pre code.hljs {
  display: block;
  padding: 0;
  background: transparent;
  font-size: 14px;
  color: var(--text);
}
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 2px solid var(--rule); padding: 8px 12px; text-align: left; }
.prose th { font-family: var(--hand); color: var(--white); background: var(--surface); }

.gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}
.gallery figure { margin: 0; }
.gallery li:nth-child(odd) figure { transform: rotate(-0.8deg); }
.gallery li:nth-child(even) figure { transform: rotate(0.9deg); }
.gallery__link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: var(--outline);
  border-radius: var(--wobble);
  box-shadow: var(--drop);
  background: var(--surface);
  cursor: zoom-in;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.gallery__link img { width: 100%; height: 100%; object-fit: cover; }
.gallery__link:hover { border-color: var(--pink); box-shadow: var(--drop-big); }
.gallery figcaption { margin-top: 10px; font: 700 14px/1.5 var(--hand); color: var(--muted); }

.about {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 48px 0 8px;
}
.about--no-avatar { grid-template-columns: minmax(0, 1fr); }
.about__avatar {
  aspect-ratio: 1;
  border: var(--outline);
  border-radius: var(--blob);
  overflow: hidden;
  background: var(--surface);
  transform: rotate(-4deg);
}
.about__avatar img { width: 100%; height: 100%; object-fit: cover; }
.about__name { font-size: clamp(34px, 5vw, 48px); overflow-wrap: anywhere; }
.about__headline { margin-top: 8px; font-size: 19px; color: var(--muted); max-width: 46ch; }
.about__intro .buttons { margin-top: 22px; }

.skills { margin: 0; max-width: 720px; }
.skills__row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 12px 0;
  align-items: baseline;
}
.skills__row + .skills__row { border-top: 2px dotted var(--rule); }
.skills dt { font: 700 17px/1.5 var(--hand); color: var(--pink); }
.skills dd { margin: 0; }

.link-list { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 20px; }
.link-list li { min-width: 0; max-width: 100%; }
.link-list__label { overflow-wrap: anywhere; }
.link-list a {
  display: inline-flex;
  flex-direction: column;
  padding: 10px 16px;
  background: var(--surface);
  border: var(--outline);
  border-radius: var(--wobble);
  box-shadow: 4px 5px 0 var(--shadow);
  transition: transform 0.15s var(--ease), box-shadow 0.15s;
  max-width: 100%;
}
.link-list li:nth-child(odd) a { transform: rotate(-1deg); }
.link-list li:nth-child(even) a { transform: rotate(1deg); }
.link-list a:hover { transform: rotate(0deg); box-shadow: 6px 7px 0 var(--shadow); }
.link-list__label { font: 800 18px/1.3 var(--hand); color: var(--white); }
.link-list__url { font-size: 14px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-list a:hover .link-list__label { color: var(--pink); }

.lost { padding: 72px 0 24px; max-width: 560px; margin: 0 auto; text-align: center; }
.lost__avatar {
  width: 132px;
  aspect-ratio: 1;
  margin: 0 auto 24px;
  border: var(--outline);
  border-radius: 50%;
  overflow: hidden;
  transform: rotate(14deg);
}
.lost__avatar img { width: 100%; height: 100%; object-fit: cover; }
.lost__title { font-size: clamp(32px, 5vw, 46px); }
.lost__text { margin-top: 12px; color: var(--muted); font-size: 18px; }
.lost .buttons { margin-top: 30px; justify-content: center; }

.site-footer { border-top: 2px dotted var(--rule); }
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-top: 26px;
  padding-bottom: 30px;
  font: 700 15px/1.5 var(--hand);
  color: var(--muted);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 4px 18px; list-style: none; }
.site-footer__links a { color: var(--line); }
.site-footer__links a:hover { color: var(--pink); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 64px 20px 24px;
  background: rgba(9, 14, 31, 0.95);
  cursor: zoom-out;
  animation: fade-in 0.16s ease-out;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: min(1400px, 100%);
  max-height: calc(100vh - 150px);
  width: auto;
  object-fit: contain;
  border: var(--outline);
  border-radius: var(--wobble-sm);
}
.lightbox__caption { font: 700 15px/1.5 var(--hand); color: var(--muted); text-align: center; max-width: 70ch; }
.lightbox__caption:empty { display: none; }
.lightbox__close {
  position: absolute;
  top: 14px;
  right: 16px;
  padding: 5px 14px;
  font: 700 15px var(--hand);
  color: var(--bg);
  background: var(--pink);
  border: 0;
  border-radius: var(--wobble-sm);
  cursor: pointer;
}
.lightbox__close:hover { background: var(--white); }
.lightbox__count { position: absolute; top: 18px; left: 20px; font: 700 15px var(--hand); color: var(--muted); }
body.has-lightbox { overflow: hidden; }
@keyframes fade-in { from { opacity: 0; } }

@media (max-width: 880px) {
  .project__head { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .facts { max-width: 420px; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .hello { grid-template-columns: 1fr; gap: 20px; padding: 28px 0 44px; }
  .hello__avatar { width: 104px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .about { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }
  .about__avatar { width: 112px; }
  .skills__row { grid-template-columns: 1fr; gap: 2px; }
  .block { margin-top: 48px; }
  .project__head { margin-top: 28px; }
  .lost { padding-top: 44px; }
}

@media (max-width: 420px) {
  .site-header__inner { min-height: 64px; }
  .brand { font-size: 17px; }
  .nav { gap: 0; }
  .nav a { padding: 6px 7px; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .backdrop__video { display: none; }
  .card:hover { transform: rotate(var(--tilt, -0.8deg)); }
  .link-list li:nth-child(odd) a:hover { transform: rotate(-1deg); }
  .link-list li:nth-child(even) a:hover { transform: rotate(1deg); }
  .button:hover { transform: none; }
}
