/* Motion tokens - one easing/duration vocabulary for the whole site.
   ease-out: fast start, soft landing (for anything entering or reacting
   to the user). spring: slight overshoot, for things snapping back into
   place. Durations stay short: UI should answer, not perform. */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 450ms;
  --press-scale: 0.97;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "MabryPro-Regular";
  font-size: 16px;
  scroll-behavior: smooth;
}

/* The native cursor is hidden only while cursor.js draws the custom one
   (it sets html.has-custom-cursor on devices with a mouse or trackpad),
   so it can never disappear with nothing in its place. :where() keeps
   this as weak as the old "* { cursor: none }", so the pointer / move /
   text cursors declared further down still win. */
:where(.has-custom-cursor),
:where(.has-custom-cursor) * {
  cursor: none;
}

body {
  /* The site never declared its own line-height anywhere - this was
     actually coming from the (unused, since-removed) Bootstrap stylesheet's
     Reboot defaults. Restoring the same value directly here keeps the
     text's visual rhythm as it was, without pulling the framework back in. */
  line-height: 1.5;
}

p {
  /* Same story as line-height above: plain <p> tags (e.g. the project
     description paragraphs) had no spacing of their own between them and
     were relying on Bootstrap's default p margin. Sections that already
     declare their own explicit p margin (.cont-education p, .hobbies p,
     etc.) are more specific and still win over this. */
  margin-bottom: 1rem;
}

.cursor-dot {
  /* Sized at the badge's full 40px diameter and held at that box size
     always - only `transform: scale()` animates between the resting dot
     and the expanded badge, so growing into the badge never touches
     width/height (layout properties) and stays compositor-only. 40px
     gives the 16px arrow icon comfortable padding on all sides. */
  width: 40px;
  height: 40px;
  background-color: #f0d42d;
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 20;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%) scale(0.4);
  opacity: 0;
  /* Slow, smooth grow/shrink between the resting dot and the "View"
     badge, so the change of size is clearly visible both ways. */
  transition: transform 600ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity var(--dur-fast) ease;
}

.cursor-dot.cursor-view {
  transform: translate(-50%, -50%) scale(1);
}

/* The eye inside the "View" badge: hidden on the small resting dot,
   it opens (fades in, lids scaling up from a slit) as the badge grows. */
.cursor-eye {
  width: 32px;
  height: 32px;
  display: block;
  opacity: 0;
  transform: scaleY(0.2);
  transition: opacity 300ms ease,
    transform 500ms var(--ease-out);
}

.cursor-dot.cursor-view .cursor-eye {
  opacity: 1;
  transform: scaleY(1);
}

.cursor-eye-iris {
  will-change: transform;
}

.cursor-outline {
  /* Same fixed-box/transform-scale technique as .cursor-dot: held at its
     full 64px ring size always, scaled down to the resting 40px outline
     so growing on hover only touches transform. Stays 12px bigger in
     radius than the badge at every scale so the ring still encircles the
     yellow badge instead of being covered by it. */
  width: 64px;
  height: 64px;
  border: 2px solid #31a0cd;
  background-color: rgba(49, 160, 205, 0.3);
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  z-index: 18;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.625);
  opacity: 0;
  transition: transform 750ms cubic-bezier(0.45, 0, 0.2, 1),
    opacity var(--dur-fast) ease;
}

/* Hidden until the pointer actually moves (cursor.js), so the custom
   cursor never sits parked in the top-left corner on load, and hidden
   again whenever the pointer leaves the window. */
.cursor-dot.is-visible,
.cursor-outline.is-visible {
  opacity: 1;
}

/* Pressing anywhere gives the cursor a small squeeze - tactile feedback
   that the click registered. */
.cursor-dot.is-pressed {
  transform: translate(-50%, -50%) scale(0.3);
}
.cursor-dot.cursor-view.is-pressed {
  transform: translate(-50%, -50%) scale(0.9);
}

.cursor-outline.cursor-view-active {
  transform: translate(-50%, -50%) scale(1);
}

@font-face {
  font-family: "tan-pearl";
  src: url("./fonts/tan-pearl.woff2") format("woff2"),
    url("./fonts/tan-pearl.otf") format("opentype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "MabryPro-Light";
  src: url("./fonts/MabryPro-Light.woff2") format("woff2"),
    url("./fonts/MabryPro-Light.ttf") format("truetype");
  font-display: swap;
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "MabryPro-Regular";
  src: url("./fonts/MabryPro-Regular.woff2") format("woff2"),
    url("./fonts/MabryPro-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "MabryPro-Medium";
  src: url("./fonts/MabryPro-Medium.woff2") format("woff2"),
    url("./fonts/MabryPro-Medium.ttf") format("truetype");
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "MabryPro-Bold";
  src: url("./fonts/MabryPro-Bold.woff2") format("woff2"),
    url("./fonts/MabryPro-Bold.ttf") format("truetype");
  font-display: swap;
  font-weight: 700;
  font-style: normal;
}

h1 {
  font-family: "tan-pearl";
  font-weight: 400;
  font-style: normal;
  color: #1f1f1f;
  margin: 0;
}

.hero-screen {
  position: relative;
  background: #1f1f1f;
  margin: 0;
  height: 100vh;
  z-index: 0;
  --progress: 0;
  --fly-factor: 1.4;
}

/* Floating background particle layer (bg-shards.js). Sits below the
   portrait svg (z-index 1) and the nav (z-index 10) so it never blocks
   either; overflow is clipped here rather than on .hero-screen so the
   portrait's own fly-out disassembly can still travel past the edges. */
.bg-shards {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  perspective: 900px; /* gives the shards' rotateX/rotateY tilt real depth */
}

.bg-shard {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

.hero-screen svg {
  display: block;
  position: relative;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  perspective: 900px; /* same tilt depth for the falling portrait fragments */
}

.container svg {
  grid-column: 1 / 3;
  width: 100%;
  height: auto;
  display: flex;
  justify-content: center;
  margin-top: -18rem;
  /* SVGs clip to their viewBox by default; the floaty paths inside animate
     past that boundary (translateY/rotate), so without this their lowest
     point of travel gets cut off at the bottom edge. */
  overflow: visible;
}

.container svg:nth-of-type(2) {
  grid-column: 12/13;
  margin-top: 5rem;
}

/* "Who am I" decorative shapes: gentle up/down bob plus a slight rocking
   rotation, like small boats drifting on the sea. Each path carries its
   own --float-amp/--rock-amp/--float-dur/--float-delay inline so the four
   shapes drift out of sync with each other rather than moving as one. */
.floaty {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: floatBob var(--float-dur, 4.5s) ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
  will-change: transform;
}

@keyframes floatBob {
  0% {
    transform: translateY(calc(var(--float-amp, 8px) * -1)) rotate(calc(var(--rock-amp, 3deg) * -1));
  }
  50% {
    transform: translateY(var(--float-amp, 8px)) rotate(var(--rock-amp, 3deg));
  }
  100% {
    transform: translateY(calc(var(--float-amp, 8px) * -1)) rotate(calc(var(--rock-amp, 3deg) * -1));
  }
}

[id^="part"],
[id^="shard"] {
  opacity: 0;
  transform: translate(var(--x), var(--y)) scale(0.5) rotate(var(--r));
  animation: moveToCenter 1.45s ease-out forwards;
}

@keyframes moveToCenter {
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

/* Scroll-driven disassembly: takes over only after the load-time entrance
   animation has finished (class added by hero-scroll.js). Reuses each
   part's own --x/--y/--r so disassembly is an exact reverse of assembly. */
/* Explosion burst: --bx/--by/--br (set by hero-scroll.js from each part's
   own distance/direction from the portrait's center) replace --x/--y/--r
   here so scrolling scatters every piece radially outward from the middle
   of the image, like a burst, rather than reversing its original
   arbitrary load-in flight path. */
.hero-screen.scroll-active [id^="part"],
.hero-screen.scroll-active [id^="shard"] {
  animation: none;
  opacity: calc(1 - var(--progress));
  transform: translate(
      calc(var(--bx) * var(--progress) * var(--fly-factor)),
      calc(var(--by) * var(--progress) * var(--fly-factor))
    )
    scale(calc(1 - 0.7 * var(--progress))) rotate(calc(var(--br) * var(--progress)));
}

/* Gentle wind sway for hair strands, added by hair-wind.js only after the
   load-time entrance animation finishes. Uses the standalone `rotate`
   property (not the `transform` shorthand) so it composes on top of the
   existing translate/scale/rotate transform instead of overriding it. */
@keyframes windSway {
  0% { rotate: calc(var(--sway-amp, 1.2deg) * -1); }
  22% { rotate: calc(var(--sway-amp, 1.2deg) * 0.45); }
  50% { rotate: var(--sway-amp, 1.2deg); }
  74% { rotate: calc(var(--sway-amp, 1.2deg) * -0.3); }
  100% { rotate: calc(var(--sway-amp, 1.2deg) * -1); }
}

/* .hero-screen.wind-active .hair-sway (below) sets `animation: windSway`,
   which - being the same `animation` shorthand [id^="part"] uses for
   moveToCenter, and more specific - fully replaces that entrance animation
   rather than layering on top of it. That drops the "forwards" fill and
   would leave opacity/transform to fall back to their un-animated base
   values (opacity: 0, off-screen position) the instant wind-active is
   added. Declaring the assembled resting state here (same specificity as
   [id^="part"], but later in the cascade so it wins) keeps every hair
   strand visible once that swap happens - matching, not fighting, the
   entrance animation's own end state, so nothing visibly changes. This
   still loses to .hero-screen.scroll-active [id^="part"] below (higher
   specificity), so scroll can still take hair over for the burst. */
.hair-sway {
  opacity: 1;
  transform: none;
  transform-box: fill-box;
  will-change: rotate;
}

.hero-screen.wind-active .hair-sway {
  animation: windSway var(--sway-dur, 4s) ease-in-out infinite;
  animation-delay: var(--sway-delay, 0s);
}

.container,
.approach,
.projects,
footer {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  max-width: 100vw;
  padding: 5rem;
  background-color: #fffaed;
  z-index: 2;
  align-items: start;
}

.my-way {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  width: 100%;
  padding: 5rem;
  background-color: #fffaed;
  z-index: 2;
  align-items: start;
}

.my-way-tablet {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
  width: 100%;
  padding: 5rem;
  background-color: #fffaed;
  z-index: 2;
  align-items: start;
}

.column-1-tablet {
  grid-column: 1 / 8;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.column-2-tablet {
  grid-column: 8 / 13;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.name {
  grid-column: 1 / 13;
  font-size: 7.5rem;
  margin: 2.5rem 0 2rem 0;
  width: 100%;
}

.description {
  grid-column: 5 / 13;
  font-size: 2rem;
  font-family: "MabryPro-Light", sans-serif;
  font-weight: 300;
  padding-bottom: 4rem;
  margin: 0;
}

.button {
  grid-column: 5 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffae00;
  font-family: "MabryPro-Bold", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f1f1f;
  width: 200px;
  height: 50px;
  padding: 0;
  border: 0;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-out);
}

/* The global `* { font-size: 16px }` reset would otherwise shrink the
   label back down. */
.button span,
.send-button span,
.navigation a span,
.top-message a span {
  font: inherit;
}

.button-label {
  position: relative;
  display: inline-block;
}

/* Slot-machine roll on hover - the one hover language for every text
   link and button on the site (nav, footer links, Meet me, Send): each letter is a one-line window
   (overflow: hidden) holding the letter plus an identical copy placed
   one line below it (::after). On hover the letter slides up a
   line, so the copy rolls into place; letters start ~35ms apart
   (--i), which gives the drum-like ripple. Only transform animates. */
.roll {
  display: inline-flex;
}

.roll-char {
  display: inline-block;
  overflow: hidden;
  height: 1.5em;
  line-height: 1.5;
  vertical-align: top;
}

.roll-char > span {
  display: inline-block;
  position: relative;
  transition: transform 600ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 35ms);
}

/* The copy that rolls in: a real glyph (not a text-shadow), so it keeps
   every text style of the original - color, weight, text-stroke. */
.roll-char > span::after {
  content: attr(data-c);
  position: absolute;
  left: 0;
  top: 1.5em;
}

a:focus-visible .roll-char > span,
.send-button:focus-visible:not(:disabled) .roll-char > span {
  transform: translateY(-1.5em);
}

/* Hover effects only where a real pointer can hover - on touch screens a
   tap would otherwise leave the effect "stuck" until the next tap. */
@media (hover: hover) and (pointer: fine) {
  a:hover .roll-char > span,
  .send-button:hover:not(:disabled) .roll-char > span {
    transform: translateY(-1.5em);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  a:hover .roll-char > span,
  a:focus-visible .roll-char > span,
  .send-button:hover .roll-char > span,
  .send-button:focus-visible .roll-char > span {
    transform: none;
  }
}

.button:active,
.send-button:active:not(:disabled) {
  transform: scale(var(--press-scale));
}

@media (hover: hover) and (pointer: fine) {
  .button:hover {
    text-decoration: none;
    color: rgb(31, 31, 31);
  }
}

.navigation {
  display: flex;
  flex-direction: row;
  position: absolute;
  z-index: 10;
  width: 100%;
  margin: 0;
}

.navigation ul {
  display: flex;
  justify-content: space-between;
  width: 100%;
  list-style-type: none;
  margin: 1rem 5rem 0 5rem;
}

.navigation ul li a {
  display: flex;
  padding: 0.5rem 1rem;
  font-family: "tan-pearl";
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
}

.navigation ul li:nth-child(3) {
  margin-right: 400px;
}

.navigation ul li {
  position: relative;
  overflow: hidden;
}

.navigation ul li a {
  display: flex;
  padding: 0.5rem 1rem;
  font-family: "tan-pearl";
  font-weight: 400;
  font-size: 1rem;
  color: #ffffff;
  text-decoration: none;
  position: relative;
}

/* Hover = the letter roll only; the color stays put (no yellow). */
.navigation ul li a:hover {
  text-decoration: none;
}

.navigation ul li a:focus-visible {
  /* -webkit-focus-ring-color is the actual native blue (rgb(0,95,204)) -
     plain `outline: auto` alone resolves its color to currentColor (white
     here), not that blue, so it has to be named explicitly to truly match
     the browser's own default ring (the same one seen, unstyled, on the
     video controls and the name/email inputs). Inset (negative) offset
     keeps it fully inside the link's own box regardless of the parent
     <li>'s overflow: hidden, so it can never get clipped - a positive
     offset would draw part of it outside that box and risk disappearing. */
  outline: -webkit-focus-ring-color auto 1px;
  outline-offset: -3px;
}

/* Section/block headings share the display serif with the page titles
   and project names. Tan Pearl has a single 400 cut (no faux bold), and
   kept at body size here. */
h3 {
  font-family: "tan-pearl";
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  background-color: #ebc93d;
  padding: 2rem 0;
}

.education h3,
.cont-education h3,
.work h3,
.hobbies h3,
.languages h3 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.education h3,
.cont-education h3 {
  background-color: #edebdb;
}

.work h3 {
  background-color: #bcd4e1;
}

.hobbies h3 {
  background-color: #ebbf6a;
}

.education,
.cont-education,
.work,
.hobbies,
.languages {
  display: flex;
  flex-direction: column;
  padding: 16px;
  padding-top: 0;
}

.education,
.cont-education {
  background-color: #edebdb;
}

.work {
  background-color: #bcd4e1;
}

.hobbies {
  background-color: #ebbf6a;
}

.column-1,
.column-2,
.column-3 {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.subcolumn {
  display: flex;
  gap: 1.5rem;
}

.column-1 {
  grid-column: 1 / 5;
  gap: 1.5rem;
}

.column-2 {
  grid-column: 5 / 9;
  gap: 1.5rem;
}

.column-3 {
  grid-column: 9 / 13;
  gap: 1.5rem;
}

.autolayout {
  display: grid;
  grid-template-columns: 4fr 2fr;
  gap: 1.5rem;
}

.event {
  grid-column: 1 / 4;
}

.date {
  grid-column: 5 / 7;
  text-align: right;
  align-self: center;
}

.hobbies p:last-child,
.cont-education .autolayout:last-of-type p,
.education .autolayout:last-of-type p,
.education h3,
.languages h3,
.languages p:last-child,
.cont-education h3,
.work h3,
.hobbies h3 {
  margin-bottom: 0;
}

.iframe {
  background-color: #1F1F1F;
}

.iframe iframe {
  display: block;
}

/* Inside the gilded frame the player sits square, like the video and
   the artwork (overrides Spotify's inline 12px radius). */
.my-way .iframe iframe,
.my-way-tablet .iframe iframe {
  border-radius: 0 !important;
}

.gif img {
  width: 100%;
  /* width/height attributes in the markup reserve the space before the
     image loads (no layout jump); height:auto keeps the real ratio. */
  height: auto;
}

.languages {
  background-color: #d7b79b;
  flex: 1;
}

/* CV block - its own section after Work experience, in the same blue
   so the two read as one pair. */
.cv {
  display: flex;
  flex-direction: column;
  padding: 16px;
  padding-top: 0;
  background-color: #bcd4e1;
}

.cv h3 {
  background-color: #bcd4e1;
  padding-top: 16px;
  padding-bottom: 16px;
  margin-bottom: 0;
}

.cv p {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* "Download CV" link - the full history lives in the
   PDF. Same roll-on-hover language as every other text link; the bold
   weight and the arrow say "this is a file" without a button. */
.cv-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #1f1f1f;
  font-family: "MabryPro-Bold", sans-serif;
  text-decoration: none;
}

.cv-link span {
  font: inherit;
}

.cv-link-arrow {
  display: inline-block;
  transition: transform var(--dur-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .cv-link:hover .cv-link-arrow {
    transform: translateY(2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cv-link:hover .cv-link-arrow {
    transform: none;
  }
}

/* "Writing movie reviews" in Hobbies links out to Yuliia's reviews on
   Threads with the same .cv-link look (bold, no underline - the rows
   already sit on dividers); its arrow points out of the page (new tab)
   instead of down (download). */

@media (hover: hover) and (pointer: fine) {
  .hobby-link:hover .cv-link-arrow {
    transform: translate(2px, -2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hobby-link:hover .cv-link-arrow {
    transform: none;
  }
}

.hobbies {
  flex: 1;
}

.languages h3 {
  background-color: #d7b79b;
}

video {
  width: 100%;
  height: auto;
}

/* Gilded picture frame around the My way video and artwork gif.
   9-slice border-image: the corners keep their exact ornament, while
   the edges repeat ("round") the carved pattern to whatever length each
   media box needs - so the same frame wraps the wider video and the
   shorter gif without stretching the ornament. Slice values are the
   frame's measured thickness in the source image (top right bottom
   left, in px); border-width sets how thick it renders on screen. */
.my-way video,
.my-way-tablet video,
.my-way .gif img,
.my-way-tablet .gif img,
.my-way .iframe,
.my-way-tablet .iframe {
  display: block;
  box-sizing: border-box;
  border-style: solid;
  border-width: clamp(14px, 1.6vw, 24px);
  border-image: url("./media/picture-frame.webp") 104 103 105 105 round;
}

.cont-education p,
.education p,
.work p,
.hobbies p,
.languages p {
  margin-top: 8px;
  margin-bottom: 8px;
}

.hobbies p,
.languages p {
  padding-bottom: 8px;
}

.cont-education .autolayout,
.education .autolayout,
.work .autolayout,
.hobbies p,
.languages p {
  border-bottom: 1px solid #ffffff;
}

.cont-education .autolayout:last-child,
.education .autolayout:last-child,
.work .autolayout:last-child,
.hobbies p:last-child,
.languages p:last-child {
  border: 0;
  padding-bottom: 0;
}

.name-2 {
  grid-column: 1 / 13;
  font-family: "tan-pearl";
  /* Tan Pearl ships a single (400) weight; h2's default bold made the
     browser fake a heavier cut, smearing its hairline contrast. */
  font-weight: 400;
  font-size: 3.8rem;
  padding-bottom: 4rem;
  margin: 0;
}

.wrapper-1,
.wrapper-2,
.wrapper-3,
.wrapper-4 {
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  padding: 1rem;
  border-right: 1px solid #1f1f1f;
}

.wrapper-1 {
  border-left: 1px solid #1f1f1f;
}

/* The Approach drawings load lazily. Their width/height attributes let the
   browser reserve their space before they arrive; without it the section
   grew as they loaded and a menu jump to Projects (below) stopped short. */
.approach img {
  width: 100%;
  height: auto;
}

.project-card {
  /* Breathing room above a card opened by link (#amygdala). */
  scroll-margin-top: 2rem;
  grid-column: 1 / 13;
  display: flex;
  gap: 1.5rem;
  margin-bottom: 5rem;
  padding: 1.5rem;
  border: 1px solid #1f1f1f;
}

.image {
  flex: 1 1 50%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.text {
  flex: 1 1 50%;
}

/* A cover shown as a dark stage behind a bead curtain (curtain.js). */
.image--stage {
  background-color: #1f1f1f;
}

/* Show the whole stage picture; the leftover space is the same dark. */
.image.image--contain img {
  object-fit: contain;
}


.image .bead-curtain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  z-index: 2;
  pointer-events: none;
}

.image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cover shatter: the cover image is sliced into a grid of cells (built
   by project-cover-shatter.js), each split into two irregular polygon
   shards along a randomly placed crack (not a clean corner-to-corner
   diagonal) - both showing the same background slice, so the jagged
   crack between them reads as broken glass rather than a clean square
   grid, echoing the shard fragments on the hero portrait. At rest the
   shards sit at zero offset and reassemble into the normal cover
   image; on mousemove, each shard reacts independently to its own
   centroid distance from the cursor and is pushed radially away from
   it (see applyPush in the JS), as if the pointer is shoving the
   fragments aside, and eases back to rest on mouseleave via the
   transition below. */
.shatter-tiles,
.shatter-base {
  position: absolute;
  inset: 0;
}

/* The intact cover, painted under the shards. Sub-pixel tile edges and
   clip-path anti-aliasing leave hairline seams between shards at rest;
   with the whole image underneath, those seams show the same pixels and
   disappear. It fades out while the cover is being shattered (so real
   cracks open onto the card) and back in once the shards have settled. */
.shatter-base {
  background-repeat: no-repeat;
  transition: opacity 0.2s ease 0.5s;
}

.image.is-shattering .shatter-base {
  opacity: 0;
  transition-delay: 0s;
  transition-duration: 0.1s;
}

.shatter-shard {
  position: absolute;
  background-repeat: no-repeat;
  transform: translate(0px, 0px) rotate(0deg);
  will-change: transform;
  /* Release: shards spring back into place with a little overshoot. */
  transition: transform 600ms var(--ease-spring);
}

/* While the pointer is pushing them, shards track it quickly instead. */
.image.is-shattering .shatter-shard {
  transition: transform 180ms var(--ease-out);
}

.numbers {
  display: flex;
  justify-content: space-between;
  /* Same soft grey as the My way dividers. */
  border-bottom: 1px solid rgba(31, 31, 31, 0.25);
  margin-bottom: 1.5rem;
}

.numbers p {
  font-family: "tan-pearl";
  font-size: 2rem;
}

/* Heavier serif headings. Tan Pearl has only one (400) weight, and
   letting the browser synthesize bold smears its hairlines unevenly, so
   the strokes are thickened with a thin outline in the text's own color
   instead: an even, controllable weight gain on every letter. */
h3,
.subheader,
.navigation ul li a {
  -webkit-text-stroke: 1px currentColor;
}

.subheader {
  font-family: "tan-pearl";
  font-weight: 400;
  /* Same size as the My way subheadings (Education, Hobbies…): one
     heading level for every subsection on the site. */
  font-size: 1.5rem;
  line-height: 1.2;
  /* Matches the gap the Education section gets between its own header and
     content, via .cont-education/.education h3's padding-bottom: 16px. */
  margin-bottom: 16px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.tags p {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border: 1px solid #1f1f1f;
  border-radius: 2rem;
}

footer {
  background-color: #1f1f1f;
}

footer .name,
footer p {
  color: #ffffff;
}

.canvas {
  grid-column: 5 / 13;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1.5rem;
}

.controls {
  grid-column: 1 / 2;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  padding: 0.5rem 0.5rem;
  background-color: #ffffff;
  /* Was space-between (spreading every child across the full column
     height); now the toolbar + color picker sit packed together at a
     fixed 16px gap starting from the top, and #delete-button's own
     margin-top: auto is what pushes it down to the bottom instead. */
  justify-content: flex-start;
}

.icon-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 5px;
  width: 40px;
  height: 40px;
  justify-content: center;
  transition: background-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out);
}

.icon-control:active {
  transform: scale(0.92);
}

/* Hover no longer paints a grey plate behind the tool - the icon itself
   reacts instead, each with a gesture that mimics what the tool does.
   (The grey .active state below still marks the selected tool.) Only
   transform animates; pointer devices only; off with reduced motion. */
.icon-control img {
  transform-origin: 50% 50%;
  /* Stateful gestures (fill tilt, colour turn) ease in and spring back
     out when the pointer leaves, instead of snapping. */
  transition: transform 450ms var(--ease-spring);
}

@media (hover: hover) {
  /* Fill: the bucket tips over as if pouring. */
  #fill-button:hover img {
    transform: rotate(-22deg);
  }
  /* Pencil: a quick scribble. */
  .linewidth-control .icon-control:hover img {
    transform-origin: 20% 80%;
    animation: toolScribble 550ms var(--ease-out);
  }
  /* Text: the T hops up and lands. */
  #text-button:hover img {
    animation: toolHop 500ms var(--ease-out);
  }
  /* Eraser: rubs side to side. */
  #eraser-button:hover img {
    animation: toolRub 550ms var(--ease-in-out);
  }
  /* Color: the swatch turns a quarter and pops. */
  #color-picker-button:hover img {
    transform: rotate(90deg) scale(1.1);
  }
  /* Delete: the bin gives a little shake. */
  #delete-button:hover img {
    transform-origin: 50% 90%;
    animation: toolShake 500ms var(--ease-out);
  }
}

/* Touch screens have no hover, so a tap plays the same gesture once
   (canvas.js adds .tool-tap on press). Fill and Color, which tilt/turn
   and hold on desktop hover, get a there-and-back version here. */
@media (hover: none) {
  #fill-button.tool-tap img {
    animation: toolPourTap 550ms var(--ease-out);
  }
  .linewidth-control .icon-control.tool-tap img {
    transform-origin: 20% 80%;
    animation: toolScribble 550ms var(--ease-out);
  }
  #text-button.tool-tap img {
    animation: toolHop 500ms var(--ease-out);
  }
  #eraser-button.tool-tap img {
    animation: toolRub 550ms var(--ease-in-out);
  }
  #color-picker-button.tool-tap img {
    animation: toolSpinTap 550ms var(--ease-spring);
  }
  #delete-button.tool-tap img {
    transform-origin: 50% 90%;
    animation: toolShake 500ms var(--ease-out);
  }
}

@keyframes toolPourTap {
  0%, 100% { transform: rotate(0deg); }
  45% { transform: rotate(-24deg); }
}

@keyframes toolSpinTap {
  0% { transform: rotate(0deg) scale(1); }
  60% { transform: rotate(90deg) scale(1.1); }
  100% { transform: rotate(90deg) scale(1); }
}

@keyframes toolScribble {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2px, -2px) rotate(-10deg); }
  50% { transform: translate(-1px, 1px) rotate(6deg); }
  75% { transform: translate(1px, -1px) rotate(-4deg); }
}

@keyframes toolHop {
  0%, 100% { transform: translateY(0) scale(1, 1); }
  35% { transform: translateY(-6px) scale(0.95, 1.05); }
  70% { transform: translateY(0) scale(1.06, 0.94); }
}

@keyframes toolRub {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  25% { transform: translateX(-3px) rotate(-6deg); }
  50% { transform: translateX(3px) rotate(6deg); }
  75% { transform: translateX(-2px) rotate(-3deg); }
}

@keyframes toolShake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-10deg); }
  45% { transform: rotate(8deg); }
  70% { transform: rotate(-4deg); }
}

/* Selected tool (or open Color popover): a small yellow dot under the
   icon instead of a grey plate - the same marker on desktop and touch,
   and in the site's own accent colour. It pops in with a spring. */
.icon-control::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background-color: #ffae00;
  transform: scale(0);
  transition: transform var(--dur-base) var(--ease-spring);
  pointer-events: none;
}

.icon-control.active::after {
  transform: scale(1);
}

.icon-control img {
  /* Fixed size (rather than width/height: 100%) so the icon's own size
     stays consistent regardless of any future button resize -
     .icon-control's flex centering keeps it centered in the box either
     way. Exactly fills the available space once the button's own 5px
     padding is subtracted (40px button - 5px*2 padding = 30px). */
  display: inline-block;
  object-fit: cover;
  width: 30px;
  height: 30px;
}

canvas {
  grid-column: 2 / 9;
  display: flex;
  width: 100%;
  background-color: #fff;
  cursor: crosshair;
  height: 100%;
}

button {
  padding: 5px 10px;
  font-size: 14px;
  cursor: pointer;
  border: 0;
}

.linewidth-control,
.eraser-control,
.color-control {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.linewidth-palette,
.eraser-palette,
.color-palette {
  position: absolute;
  top: 0;
  left: 100%;
  transform: translateX(16px);
  background-color: #ffffff;
  border: 1px solid #1f1f1f;
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 0;
  z-index: 10;
}

.linewidth-palette.active,
.eraser-palette.active,
.color-palette.active {
  display: flex;
  transform-origin: top left;
  animation: popoverIn var(--dur-base) var(--ease-out);
}

/* Uses the standalone opacity/scale properties so it layers over each
   popover's own positioning transform instead of replacing it. */
@keyframes popoverIn {
  from {
    opacity: 0;
    scale: 0.96;
  }
}

.color-palette {
  /* Unlike the slider popovers (one wide row), this is a row of swatch
     buttons - each already 40x40 via .color-option, so the popover just
     needs to lay them out and give them a little breathing room. */
  flex-direction: row;
  gap: 8px;
  padding: 8px;
}

.thickness-slider-row {
  display: flex;
  align-items: center;
  /* Fill/Line/Text now share one global color picker below the main
     toolbar instead of each tool having its own - so this popover only
     ever holds the thickness slider. 200px is just a comfortable width
     for it. */
  width: 200px;
  padding: 12px 16px;
}

.thickness-slider {
  width: 100%;
  /* Recolors the native track fill/thumb to the site's ink black instead
     of the browser's default blue, without hand-rolling per-vendor
     ::-webkit-slider-thumb/::-moz-range-thumb rules. */
  accent-color: #1f1f1f;
  cursor: pointer;
}

.text-frame {
  /* Fixed (not absolute) so it can float directly over the click point
     using viewport coordinates, with no positioned ancestor required.
     Everywhere inside this border but outside .text-frame-content is the
     drag handle (cursor: move), overriding the site-wide cursor: none.
     Styled after Figma's own selection outline: a solid blue border plus
     small corner handles, reading as "this is a movable container"
     rather than a plain text box. */
  position: fixed;
  z-index: 20;
  border: 1px solid #0d99ff;
  background-color: transparent;
  padding: 12px;
  cursor: move;
}

.text-frame-content {
  min-width: 24px;
  min-height: 1.2em;
  font-family: "MabryPro-Regular", sans-serif;
  line-height: 1.2;
  white-space: pre;
  outline: none;
  cursor: text;
}

.text-frame-handle {
  /* Purely decorative (Figma-style corner dots signaling "container"),
     not functional resize handles - pointer-events: none lets clicks pass
     straight through to .text-frame underneath, so the existing "mousedown
     lands on the frame itself" drag-detection doesn't need to know these
     exist. */
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #ffffff;
  border: 1.5px solid #0d99ff;
  border-radius: 50%;
  pointer-events: none;
}

.text-frame-handle.top-left {
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
}

.text-frame-handle.top-right {
  top: 0;
  right: 0;
  transform: translate(50%, -50%);
}

.text-frame-handle.bottom-left {
  bottom: 0;
  left: 0;
  transform: translate(-50%, 50%);
}

.text-frame-handle.bottom-right {
  bottom: 0;
  right: 0;
  transform: translate(50%, 50%);
}

.color-option {
  /* Now a real <button> (for native Tab focus + Enter/Space activation)
     instead of a plain div - appearance/padding/background reset here so
     it still renders as a flat, borderless swatch rather than picking up
     the browser's default button chrome. */
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  background: transparent;
  width: 40px;
  height: 40px;
  cursor: pointer;
  text-align: center;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Mirrors the trigger icon's own look (media/Color dot.svg): a rounded
     black frame + white ring around the color, rather than a flat square -
     border-box keeps both bands inset within the existing 40x40 box (the
     swatch's own background-color, set inline per button, still shows
     through the untouched center) instead of growing the footprint. */
  box-sizing: border-box;
  border-radius: 6px;
  border: 3px solid #1f1f1f;
  box-shadow: inset 0 0 0 3px #ffffff;
}

.color-option.active {
  /* The swatch's own background already fills the button, so "selected"
     needs a ring outside it rather than any fill/border change. */
  outline: 2px solid #1f1f1f;
  outline-offset: 2px;
}

/* Site-wide focus indicator: the browser's own native focus ring (the
   same one already visible, unstyled, on the video controls and the
   name/email inputs) for every link/button, rather than a custom
   color/style - shown only for keyboard use (:focus-visible), not mouse
   clicks. -webkit-focus-ring-color is that true native blue
   (rgb(0,95,204)); plain `outline: auto` alone would resolve its color to
   currentColor instead (e.g. white on the nav), not this blue. More
   specific rules below override the offset only where the element's own
   context needs it (e.g. an ancestor that clips an outset ring, or busy
   imagery needing extra contrast), never the ring's own color/style. */
a:focus-visible,
button:focus-visible {
  outline: -webkit-focus-ring-color auto 1px;
}

/* The project cover <a> itself renders at 0x0 (project-cover-shatter.js
   replaces its <img> with an absolutely-positioned .shatter-tiles layer,
   so the anchor has no in-flow content to size around) - the generic
   rule above would otherwise draw a tiny, confusing ring around that
   zero-size point. The real, visible ring is added on .image below via
   :has(), which targets the actual sized/clipped box instead. */
.project-card .image a:focus-visible {
  outline: none;
}

/* A dedicated overlay layer, not a plain outline/box-shadow on .image
   itself: .shatter-tiles (the shard grid built by project-cover-shatter.js)
   is an opaque absolutely-positioned child that fully covers .image, and
   an auto-stacked child like that paints over its parent's own
   background/box-shadow/outline - so a ring drawn on .image directly gets
   silently hidden underneath it. Giving this its own explicit z-index
   above .shatter-tiles' (auto) guarantees it stays visible. */
.project-card .image::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  display: none;
}

.project-card .image:has(a:focus-visible)::after {
  display: block;
  /* Inset so it can't be clipped by .image's own overflow: hidden - no
     extra box-shadow/halo here, just the plain native ring, so it never
     doubles up as two concentric rings. */
  outline: -webkit-focus-ring-color auto 1px;
  outline-offset: -6px;
}

#delete-button {
  margin-top: auto;
}

.top-message {
  grid-column: 5 / 13;
  font-size: 1rem;
  color: #ffffff;
  font-family: "MabryPro-Light", sans-serif;
  font-weight: 300;
  margin: 0;
}

.top-message a {
  display: inline-flex;
  color: #ffffff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}



.form-container {
  grid-column: 6 / 13;
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
  /* Top-aligned: each input carries a reserved error line underneath,
     so the inputs and the Send button line up along their top edges. */
  align-items: flex-start;
  justify-content: center;
}

.send-button {
  display: flex;
  flex: 0 0 200px;
  align-items: center;
  justify-content: center;
  background-color: #ffae00;
  font-family: "MabryPro-Bold", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f1f1f;
  height: 50px;
  border: 0;
  transition: background-color var(--dur-fast) ease,
    transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) ease;
}

.send-button:disabled {
  opacity: 0.7;
  cursor: progress;
}

/* While the drawing is uploading: a thin bar sweeps under the label. */
.send-button.is-loading {
  position: relative;
  overflow: hidden;
}

.send-button.is-loading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #1f1f1f;
  transform-origin: left center;
  animation: sendProgress 1.1s var(--ease-in-out) infinite;
}

@keyframes sendProgress {
  0% { transform: scaleX(0); transform-origin: left center; }
  50% { transform: scaleX(1); transform-origin: left center; }
  50.1% { transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}

.send-button.is-success {
  background-color: #b7d9a8;
  opacity: 1;
}

@media (hover: hover) and (pointer: fine) {
  .send-button:hover {
    text-decoration: none;
    color: #1f1f1f;
  }
}

.form-status {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  text-align: right;
}

.form-status.success {
  color: #4eae67;
}

.input-group {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Validation message directly under its own field. The line is always
   reserved (min-height), so an error appearing never pushes the layout
   around. */
.field-error {
  min-height: 1.5em;
  margin: 6px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #ff8a65;
}

.input-group input[aria-invalid="true"] {
  border-color: #ff8a65;
  box-shadow: inset 0 0 0 1px #ff8a65;
}

.input-group input {
  /* Explicit height rather than relying on padding + line-height: <input>
     doesn't inherit line-height from body the way regular text does, so
     its padding-based natural height doesn't reliably match .send-button's
     own explicit 50px - pinning it directly keeps them aligned regardless. */
  height: 50px;
  padding: 12px 16px;
  border: 1px solid #1f1f1f;
  font-size: 1rem;
  /* .input-group is a column (input + reserved error line), so the input
     must not flex along that axis - otherwise flex overrides the explicit
     height and the field shrinks below the Send button. Width comes from
     width: 100%. */
  flex: none;
  width: 100%;
}

@media (min-width: 1400px) {
  .my-way {
    display: grid;
  }

  .my-way-tablet {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1399px) {
  .my-way {
    display: none;
  }

  .my-way-tablet {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
  }
}

@media (max-width: 1200px) {
  .top-message,
  footer .description,
  .form-container,
  .canvas {
    grid-column: 1 / -1;
  }

  .wrapper-1,
  .wrapper-2,
  .wrapper-3,
  .wrapper-4 {
    grid-column: span 6;
  }

  .wrapper-3 {
    border-left: 1px solid #1f1f1f;
  }

  .approach,
  .projects,
  .my-way-tablet,
  .container,
  footer {
    padding: 3rem 2rem;
  }

  .name-2 {
    font-size: 3rem;
    padding-bottom: 3rem;
  }

  .project-card {
    flex-direction: column;
    align-items: center;
  }

  /* Stacked layout: every card leads with its cover, whatever side the
     cover sits on in the desktop zig-zag. */
  .project-card .image {
    order: -1;
  }

  .image {
    flex: none;
    width: 100%;
  }

  video,
  .gif {
    flex: none;
    width: 100%;
    max-width: 500px;
  }
}

@media (max-width: 1023px) {
  .my-way {
    display: none;
  }

  .my-way-tablet {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
  }

  .column-1-tablet,
  .column-2-tablet {
    grid-column: 1 / -1;
  }

  video,
  .gif {
    align-self: center;
  }

  .container {
    grid-template-columns: repeat(8, 1fr);
    max-width: 100%;
  }

  .name {
    grid-column: 1 / -1;
    font-size: 5rem;
    text-align: left;
  }

  .description {
    grid-column: 1 / 8;
    font-size: 1.5rem;
    padding-bottom: 2rem;
  }

  .button {
    grid-column: 4 / 6;
    width: 100%;
  }

  .container svg {
    grid-column: 1 / 3;
    display: none;
    margin-top: -12rem;
  }
}

@media (max-width: 768px) {
  .container {
    grid-template-columns: repeat(4, 1fr);
  }

  .form-container {
    grid-column: 1 / -1;
    flex-direction: column;
    /* Base rule's align-items: center sizes flex children to their own
       content width along the cross axis - fine when the axis was
       horizontal, but once flex-direction flips to column here the cross
       axis becomes horizontal width, so .input-group (unlike .send-button,
       which has its own explicit width: 100% below) was shrinking to fit
       its placeholder text instead of spanning full width like the button. */
    align-items: stretch;
    /* Each input already carries its reserved error line, so the stack
       needs less extra gap than the side-by-side desktop row. */
    gap: 0.5rem;
  }

  .canvas {
    display: flex;
    flex-direction: column;
  }

  .name {
    grid-column: 1 / -1;
    font-size: 3rem;
  }

  .controls {
    flex-direction: row;
  }

  .linewidth-control button,
  .eraser-control button,
  .color-control button {
    margin: 0;
  }

  /* #delete-button's own margin-top: auto (base rule) is what separates it
     from the other tools in the desktop column layout - it has no effect
     once .controls switches to a row here, so Delete was landing right
     next to Color with the same 16px gap as every other tool. Swapping to
     margin-left: auto keeps it pinned to the row's far end instead. */
  #delete-button {
    margin-top: 0;
    margin-left: auto;
  }

  /* On the mobile row toolbar, popovers opening to the side (left: 100%)
     push far enough right that they run off screen - the color palette's
     own row of 5 swatches makes that worse. Opening downward and centered
     on the trigger instead keeps the whole popover within the viewport
     regardless of where its button sits in the row, and stacking the
     swatches in a column keeps the popover no wider than a single swatch. */
  .linewidth-palette,
  .eraser-palette,
  .color-palette {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
  }

  .color-palette {
    flex-direction: column;
  }

  /* The thickness sliders were a 200px-wide horizontal row - on the mobile
     row toolbar that's the same "wide popover" overflow risk the palette
     had. Rotating to a vertical track (bottom = min, top = max, the
     standard vertical-slider convention) keeps the popover's footprint
     narrow instead of wide. */
  .thickness-slider-row {
    width: auto;
    height: 150px;
    padding: 16px 12px;
  }

  .thickness-slider {
    writing-mode: vertical-lr;
    direction: rtl;
    width: 8px;
    height: 100%;
  }

  .description {
    grid-column: 1 / 5;
    font-size: 1.2rem;
  }

  .button,
  .send-button {
    grid-column: 1 / -1;
    flex: none;
    width: 100%;
    height: 48px;
  }

  .input-group input {
    height: 48px;
  }

  .container svg {
    grid-column: 1 / 3;
    margin-top: -8rem;
  }

  .container svg:nth-of-type(2) {
    grid-column: 4 / 5;
    margin-top: 2rem;
  }
  .column-1-tablet,
  .column-2-tablet,
  .wrapper-1,
  .wrapper-2,
  .wrapper-3,
  .wrapper-4 {
    grid-column: 1 / -1;
  }

  .wrapper-1,
  .wrapper-2,
  .wrapper-3,
  .wrapper-4 {
    border-bottom: 1px solid #1f1f1f;
    border-left: 0;
    border-right: 0;
  }
}

@media (pointer: coarse), (max-width: 768px) {
  * {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-outline {
    display: none;
  }
}


.burger-icon {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 20px;
  margin: 2rem;
  /* Now a real <button> (for keyboard focus + Enter/Space activation and
     screen-reader semantics) instead of a plain div - appearance/padding/
     background reset here so it still renders as bare spans rather than
     picking up the browser's default button chrome and the site-wide
     button rule's own padding. */
  padding: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
}

.burger-icon span {
  background: #ffffff;
  height: 1px;
  width: 100%;
  transition: transform var(--dur-base) var(--ease-out),
    opacity var(--dur-fast) ease;
  will-change: transform, opacity;
}

.burger-icon.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}
.burger-icon.active span:nth-child(2) {
  opacity: 0;
}
.burger-icon.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media screen and (max-width: 1200px) {
  .burger-icon {
    display: flex;
    position: relative;
    z-index: 11;
  }

  .burger-icon.active {
    position: fixed;
  }

  .navigation ul {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1f1f1f;
    margin: 0;
    padding: 5rem 0;
    align-items: center;
    justify-content: center;
    z-index: 9;
  }

  .navigation ul.active {
    display: flex;
  }

  .navigation ul li {
    margin: 1rem 0;
  }

  .navigation ul li:nth-child(3) {
    margin-right: 0;
  }

  .navigation ul li a {
    font-size: 1rem;
  }
}

@media (max-width: 500px) {

  .tags {
    flex-direction: column;
    gap: 0;
  }

  .project-card {
    padding: 1rem;
  }

  .autolayout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .cont-education .autolayout{
    margin-bottom: 8px;
  }

  .cont-education .autolayout:last-of-type {
    margin-bottom: 0;
  }

  .cont-education .autolayout .date p {
    margin: 0 0 8px 0;
  }

  .cont-education .autolayout:last-of-type .date p:last-child {
    margin-bottom: 0;
  }

  .cont-education .autolayout .event p:first-of-type {
    margin: 0 0 8px 0;
  }

  .education .autolayout:last-of-type .event p:first-child {
    margin-bottom: 8px;
  }

  .work .autolayout .date p {
    margin: 0 0 8px 0;
  }

  .cv .autolayout .date p {
    margin: 0 0 8px 0;
  }

  /* My way lists on phones, built on proximity: an entry and its date are
     one group (tight 8px between them, date left-aligned under the text
     it belongs to), and groups are kept apart by a clearly bigger 32px
     with the divider in the middle. One rhythm for Education, Continuous
     education, Work experience and CV - the per-section rules above had
     drifted apart. */
  #my-way-mobile :is(.education, .cont-education, .work, .cv) .autolayout {
    gap: 0;
    margin: 0;
    padding: 12px 0;
  }

  #my-way-mobile :is(.education, .cont-education, .work, .cv) .autolayout:first-of-type {
    padding-top: 0;
  }

  #my-way-mobile :is(.education, .cont-education, .work, .cv) .autolayout:last-child {
    padding-bottom: 0;
  }

  #my-way-mobile :is(.education, .cont-education, .work, .cv) .autolayout :is(.event, .date) p {
    margin: 0;
  }

  #my-way-mobile :is(.education, .cont-education, .work, .cv) .date {
    align-self: stretch;
    text-align: left;
  }

  
  }

/* My way on tablets and phones: one spacing scale for the whole section,
   built on proximity - 8px inside an entry (text + date), 16px from a
   heading to its list, 32px between entries, 64px between sections and
   between the framed media.
   Hobbies and Languages follow the same row rhythm as the other lists. */
#my-way-mobile .column-1-tablet {
  /* 61px of gap reads as 64px between the last line of one section and
     the next heading once the type's own line spacing is added. */
  gap: 61px;
}

/* The media (Spotify, video, painting) are framed exhibits: 64px between
   frames, which have no line spacing to add. */
#my-way-mobile .column-2-tablet {
  gap: 64px;
}

/* Once the columns stack, the media start a new section under the text:
   64px from the last Languages line to the first frame (24px grid gap +
   36px + the text's 4px line spacing). */
@media (max-width: 1023px) {
  #my-way-mobile .column-2-tablet {
    margin-top: 36px;
  }
}

#my-way-mobile :is(.education, .cont-education, .work, .cv, .hobbies, .languages) {
  margin: 0;
}

:is(#my-way, #my-way-mobile) :is(.hobbies, .languages) p {
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid var(--divider);
}

:is(#my-way, #my-way-mobile) :is(.hobbies, .languages) h3 + p {
  padding-top: 0;
}

:is(#my-way, #my-way-mobile) :is(.hobbies, .languages) p:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* My way lists on tablets and desktop (desktop used to put 24px under
   each heading and centre the dates; now one rhythm everywhere):
   each entry and its date share one row, so the row is the group; rows
   are kept apart by the same 32px as on phones, with the divider in the
   middle. The date lines up with the entry's first line instead of
   floating in the middle of a two-line entry. */
@media (min-width: 501px) {
  :is(#my-way, #my-way-mobile) :is(.education, .cont-education, .work, .cv) .autolayout {
    margin: 0;
    padding: 12px 0;
    align-items: start;
  }

  :is(#my-way, #my-way-mobile) :is(.education, .cont-education, .work, .cv) .autolayout:first-of-type {
    padding-top: 0;
  }

  :is(#my-way, #my-way-mobile) :is(.education, .cont-education, .work, .cv) .autolayout:last-child {
    padding-bottom: 0;
  }

  :is(#my-way, #my-way-mobile) :is(.education, .cont-education, .work, .cv) .autolayout :is(.event, .date) p {
    margin: 0;
  }

  :is(#my-way, #my-way-mobile) :is(.education, .cont-education, .work, .cv) .date {
    align-self: start;
  }
}

/* ---------- Scroll reveal ----------
   Sections ease up into place as they enter the viewport (motion.js adds
   .reveal-ready to <html> and .is-revealed to each item). Without JS -
   or with reduced motion - nothing is ever hidden. Children reveal one
   after another via --reveal-index, set by motion.js. */
/* Hiding is instant (no transition on the base state), so items never
   visibly fade OUT when the page loads; only the reveal animates. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
}

.reveal-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 80ms);
}

/* Approach columns rise from further below and roll in one after
   another, like a drum turning: each column starts a clear beat (250ms)
   after the previous one. Project cards use the same slow rise; they're
   stacked, so each simply enters as it's scrolled to (no stagger). */
.reveal-ready #approach [data-reveal],
.reveal-ready #projects [data-reveal] {
  transform: translateY(64px);
}

.reveal-ready #approach [data-reveal].is-revealed,
.reveal-ready #projects [data-reveal].is-revealed {
  transform: none;
  transition: opacity 1100ms var(--ease-out), transform 1500ms var(--ease-out);
  transition-delay: calc(var(--reveal-index, 0) * 250ms);
}

/* Infinite decorative loops pause while scrolled out of view. */
.is-offscreen,
.is-offscreen * {
  animation-play-state: paused !important;
}

/* ---------- Reduced motion ----------
   Visitors who ask their OS for less motion get the finished state of
   every animation immediately and no looping movement. The JS effects
   (falling shards, wind, scroll burst, video autoplay) check the same
   media query and stay off. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }

  .floaty,
  .hair-sway {
    animation: none !important;
  }
}

/* ---------- Page transitions: the curtain ----------
   Moving between the home page and a project (and from one project to
   the next), a dark curtain with rounded edges sweeps in from the right
   and covers the page; the next page opens with the same curtain carrying
   on out to the left. The curtain is wider than the screen with fully
   rounded ends, so its leading edge reads as a soft curve. Driven by
   transition.js; the arriving page sets html.curtain-in in <head> so it
   is already covered on its first paint. */
.page-curtain,
html.curtain-in::after {
  --curtain-r: 70vh;
  content: "";
  position: fixed;
  top: -25vh;
  left: 0;
  z-index: 2147483000;
  width: calc(100vw + 2 * var(--curtain-r));
  height: 150vh;
  border-radius: var(--curtain-r) / 50%;
  background-color: #1f1f1f;
  pointer-events: none;
  will-change: transform;
}

/* Going back to the home page the curtain takes the home page's own
   cream and runs the other way - in from the left, out to the right - so
   it reads as stepping back. */
.page-curtain--light,
html.curtain-in.curtain-light::after {
  background-color: #fffaed;
}

.page-curtain.page-curtain--light {
  transform: translateX(calc(-100vw - 2 * var(--curtain-r)));
}

html.curtain-in.curtain-light::after {
  animation-name: curtain-uncover-back;
}

@keyframes curtain-uncover-back {
  to {
    transform: translateX(100vw);
  }
}

/* In: from just off the right edge to fully covering. */
.page-curtain {
  transform: translateX(100vw);
  animation: curtain-cover 700ms cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes curtain-cover {
  to {
    transform: translateX(calc(-1 * var(--curtain-r)));
  }
}

/* Out (on the new page): carries on off the left edge. */
html.curtain-in::after {
  transform: translateX(calc(-1 * var(--curtain-r)));
  animation: curtain-uncover 800ms cubic-bezier(0.76, 0, 0.24, 1) 80ms forwards;
}

/* Arriving at #projects etc.: jump straight there under the curtain
   instead of visibly gliding down from the top of the page. */
html.curtain-in {
  scroll-behavior: auto;
}

/* Held shut while the arriving page is still loading (its <head> adds
   curtain-hold and drops it once fonts and scripts are in). */
html.curtain-in.curtain-hold::after {
  animation-play-state: paused;
}

@keyframes curtain-uncover {
  to {
    transform: translateX(calc(-100vw - 2 * var(--curtain-r)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-curtain,
  html.curtain-in::after {
    display: none;
  }
}

/* ---------- My way: text straight on the wall ----------
   The info blocks lose their coloured cards and sit directly on the
   cream wall in the site's usual text colour; rows are split by thin
   1px dividers. */
.my-way,
.my-way-tablet {
  --divider: rgba(31, 31, 31, 0.25);
  /* Same flat cream as the Approach section, no texture. */
  background-color: #fffaed;
}

:is(.my-way, .my-way-tablet) :is(.education, .cont-education, .work, .cv, .hobbies, .languages) {
  background: none;
  padding: 0;
}

:is(.my-way, .my-way-tablet) :is(.education, .cont-education, .work, .cv, .hobbies, .languages) h3 {
  background: none;
  padding: 0 0 12px;
  margin-bottom: 0;
  font-size: 1.5rem;
}

:is(.my-way, .my-way-tablet) :is(.cont-education, .education, .work, .cv) .autolayout,
:is(.my-way, .my-way-tablet) :is(.hobbies, .languages) p {
  border-bottom: 1px solid var(--divider);
}

:is(.my-way, .my-way-tablet) :is(.cont-education, .education, .work, .cv) .autolayout:last-child,
:is(.my-way, .my-way-tablet) :is(.hobbies, .languages) p:last-child {
  border-bottom: 0;
}

/* Without cards, blocks need more air between them to read as
   separate blocks. */
:is(.my-way, .my-way-tablet) :is(.column-1, .column-2, .column-3, .column-1-tablet, .column-2-tablet) {
  gap: 2.5rem;
}

/* ---------- My way: tile mosaic ----------
   Line-drawn tiles in the wall's cream with a 1px ink outline (the same
   weight as the My way dividers, in the hero's #1f1f1f), a few shapes
   tinted in pastel. Two groups of 6 rows x 4 columns placed exactly as
   in Yuliia's sketch: one under Hobbies + Languages, one under the CV.
   The side columns stretch to the height of the video column and each
   group sits at its foot, so the bottoms line up with the artwork frame.
   mosaic.js sizes the tiles (a quarter of the column, smaller only if
   six rows wouldn't fit); without it they still fill the column. */
.my-way .column-1,
.my-way .column-3 {
  align-self: stretch;
}

.my-way .mosaic {
  --tile-line: #1f1f1f;
  position: relative;
  margin-top: auto;
  display: grid;
  grid-template-columns: repeat(4, var(--tile, 1fr));
  grid-template-rows: repeat(6, var(--tile, auto));
  width: max-content;
  min-width: 0;
}

.my-way .mosaic-left {
  align-self: flex-start;
}

.my-way .mosaic-right {
  align-self: flex-end;
}

/* Every tile draws its square edge as an outline centred on the edge,
   so where two tiles meet their lines coincide into one 1px line. */
.my-way .mosaic img {
  display: block;
  width: var(--tile, 100%);
  height: auto;
  aspect-ratio: 1;
  outline: 1px solid var(--tile-line);
  outline-offset: -0.5px;
}

/* The stray tile in front of the right group, one column to the left,
   half hidden under the Spotify and artwork frames. */
.my-way .mosaic-stray {
  position: absolute;
  z-index: 0;
  top: calc(100% / 6);
  right: 100%;
  width: 25%;
}

.my-way .column-2 .iframe,
.my-way .column-2 .gif {
  position: relative;
  z-index: 1;
}

/* Tiles are laid row by row from the bottom up as the mosaic scrolls
   into view: each settles in with a short fade and a slight scale. */
.reveal-ready .my-way .mosaic[data-reveal] img,
.reveal-ready .my-way-tablet .mosaic-band[data-reveal] img {
  opacity: 0;
  transform: scale(0.9);
}

.reveal-ready .my-way .mosaic[data-reveal].is-revealed img,
.reveal-ready .my-way-tablet .mosaic-band[data-reveal].is-revealed img {
  opacity: 1;
  transform: none;
  transition: opacity 400ms var(--ease-out), transform 500ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}

/* ---------- My way (tablet + phone): Spotify placement ----------
   With two columns (wide tablets) the player sits under the artwork in
   the media column. Once the columns stack, it moves to the top of the
   media column so it follows the CV: text, then music, then video and
   painting. */
@media (max-width: 1023px) {
  .my-way-tablet .column-2-tablet .iframe {
    order: -1;
    /* Same width as the video and painting below it, centred. */
    align-self: center;
    width: 100%;
    max-width: 500px;
  }
}

/* ---------- My way (tablet + phone): tile frieze ----------
   On narrower layouts the CV is the last block, so instead of the two
   tall desktop groups the section ends with a low frieze of the same
   line tiles, laid in a two-row checkerboard. Wide tablets show all 12
   columns of the pattern, small tablets the middle 8, phones 6 (about
   55px tiles), so it stays two rows high everywhere. */
.my-way-tablet .mosaic-band {
  --cols: 12;
  --off: 0;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  margin-top: 1rem;
}

.my-way-tablet .mosaic-band img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  grid-column: calc(var(--c) + 1 - var(--off));
  grid-row: calc(var(--r) + 1);
  outline: 1px solid #1f1f1f;
  outline-offset: -0.5px;
}

@media (max-width: 1023px) {
  .my-way-tablet .mosaic-band {
    --cols: 8;
    --off: 2;
  }

  .my-way-tablet .mosaic-band img:not(.in-8) {
    display: none;
  }
}

@media (max-width: 599px) {
  .my-way-tablet .mosaic-band {
    --cols: 6;
    --off: 4;
  }

  .my-way-tablet .mosaic-band img:not(.in-6) {
    display: none;
  }
}

/* ---------- Spacing scale (home page) ----------
   The same proximity scale as My way: 8px inside a pair (title +
   description), 16px between an element and the thing it belongs to
   (image + its text, paragraphs), 32px between a big heading and its
   text and between groups, 64px from a section heading to its content
   and between cards, 128px between projects. Distances are measured
   between what you see (letters, image edges, lines), so each margin
   subtracts the font's own line spacing: 0.5 * (1lh - k * 1em), where k
   is the height of the font's letters per em (tan-pearl 1.27, Mabry 1). */

/* Who am I + Let's talk: big name → description 32px. */
:is(#who-am-i, #lets-talk) .name {
  margin-bottom: calc(-0.5 * (1lh - 1.27em));
}

:is(#who-am-i, #lets-talk) .description {
  /* 24px is the section grid's own gap. */
  margin-top: calc(32px - 24px - 0.5 * (1lh - 1em));
}

/* Approach: heading → cards 64px; illustration → its text 16px; cards
   64px apart, the divider in the middle. */
#approach .name-2 {
  padding-bottom: 0;
  /* 64 - 24px grid gap - 8px card top padding. */
  margin-bottom: calc(32px - 0.5 * (1lh - 1.27em));
}

#approach :is(.wrapper-1, .wrapper-2, .wrapper-3, .wrapper-4) {
  padding-top: 8px;
  gap: 0;
}

/* The four illustrations share an 766x888 canvas with empty bands above
   and below the art; showing only the band the art actually uses
   (y 54-757, the same crop for all four so they stay aligned) lets the
   16px / 64px distances read as real gaps instead of hidden whitespace. */
#approach :is(.wrapper-1, .wrapper-2, .wrapper-3, .wrapper-4) img {
  aspect-ratio: 766 / 703;
  object-fit: cover;
  object-position: 50% 29.2%;
}

/* Stacked one per row, the cards don't need to line up, so each
   illustration is cropped to its own art. */
@media (max-width: 768px) {
  #approach .wrapper-1 img { aspect-ratio: 766 / 398; object-position: 50% 50%; }
  #approach .wrapper-2 img { aspect-ratio: 766 / 504; object-position: 50% 50%; }
  #approach .wrapper-3 img { aspect-ratio: 766 / 628; object-position: 50% 50%; }
  #approach .wrapper-4 img { aspect-ratio: 766 / 698; object-position: 50% 28.4%; }
}

#approach :is(.wrapper-1, .wrapper-2, .wrapper-3, .wrapper-4) p {
  margin-top: calc(16px - 0.5 * (1lh - 1em));
  /* + 16px card bottom padding = 32px to the divider. */
  margin-bottom: calc(16px - 0.5 * (1lh - 1em));
}

/* Projects: heading → first project 64px; cover → numbers 16px; numbers
   → divider → title 16px + 16px (8px each side crowded the big
   numerals); title → description 16px;
   paragraphs 16px; description → tags 32px; projects 128px apart. */
#projects {
  --card-pad: 24px;
}

@media (max-width: 1200px) {
  #projects {
    --card-pad: 16px;
  }
}

#projects .name-2 {
  padding-bottom: 0;
  /* 64 - 24px grid gap - the card's top line and padding. */
  margin-bottom: calc(64px - 24px - 1px - var(--card-pad) - 0.5 * (1lh - 1.27em));
}

#projects .project-card {
  padding-top: var(--card-pad);
  padding-bottom: var(--card-pad);
  /* 128 - 24px grid gap - both cards' lines and paddings. */
  margin-bottom: calc(102px - 2 * var(--card-pad));
}

@media (max-width: 1200px) {
  #projects .project-card {
    gap: 0;
    /* Stacked cards end on the tags row, which adds 16px of its own. */
    margin-bottom: calc(86px - 2 * var(--card-pad));
  }

  #projects .numbers p {
    margin-top: calc(17px - 0.5 * (1lh - 1.28em));
  }
}

#projects .numbers {
  padding-bottom: 0;
  margin-bottom: 0;
}

#projects .numbers p {
  /* Numbers → divider 32px between the letters, the same as divider →
     title, so the line sits in the middle. */
  margin-bottom: calc(25px - 0.5 * (1lh - 1.28em));
}

#projects .subheader {
  /* Measured on screen, between the letters: line → title 32px (a new
     group), lowest letter (the g/p/y tails tails.js makes room for) →
     description 16px (the title's own content), so the title clearly
     belongs to its text. */
  margin-top: calc(33px - 0.5 * (1lh - 1.25em));
  margin-bottom: calc(6px - 0.5 * (1lh - 1.25em));
}

#projects .text > p:not(.subheader) {
  margin-top: 0;
  margin-bottom: 8px;
}

#projects .tags {
  /* Collapses with the last paragraph's 8px; + 4px line spacing = 32px. */
  margin-top: 28px;
}

/* ---------- Hero: description → button, shards ----------
   The button is the description's call to action, so it sits 32px under
   the last line (the same step as name → description), not 96px away. */
#who-am-i .description {
  padding-bottom: calc(8px - 0.5 * (1lh - 1em));
}

/* The left shards share the description's row and start 32px below its
   top (≈64px under the name), so they never crowd the name at any width.
   Blue shard tip = 14 of the 340 viewBox units → translateY(-4.12%). The
   big negative bottom margin (340/180 of the width) keeps the tall drawing
   from stretching the row and pushing the button down. */
@media (min-width: 1024px) {
  #who-am-i svg:first-of-type {
    grid-row: 2;
    margin-top: 32px;
    margin-bottom: -189%;
    transform: translateY(-4.12%);
    /* Past ~1700px two columns get so wide the drawing would run into
       My way; keep it the size it has on a laptop. */
    max-width: 220px;
  }
}

/* Short description on wide screens → leave the shards room to drift
   without touching My way. */
@media (min-width: 1600px) {
  #who-am-i {
    padding-bottom: calc(5rem + 32px);
  }
}

/* ---------- Let's talk: proximity spacing ----------
   description → "Draw me a picture…" 64px (new block), that line → the
   drawing widget 16px (caption → its content), toolbar ↔ canvas 16px and
   between the form fields 16px (parts of one control), canvas → form 32px. */
#lets-talk .description {
  padding-bottom: 0;
  margin-bottom: calc(-0.5 * (1lh - 1em));
}

#lets-talk .top-message {
  /* Mabry's glyphs sit ~4px inside a 1em box at this size, hence +4. */
  margin-top: calc(68px - 24px - 0.5 * (1lh - 1em));
  margin-bottom: calc(20px - 24px - 0.5 * (1lh - 1em));
}

#lets-talk .form-container {
  gap: 16px;
}

/* The error line only takes space when there is an error, so the fields
   sit 16px apart; it appears on Send, under the field it belongs to. */
#lets-talk .field-error:empty {
  display: none;
}

@media (min-width: 1201px) {
  /* Toolbar and canvas keep their grid columns; the canvas (and the form,
     which lines up under it) reach 8px further left → 16px gap. */
  #lets-talk #drawingCanvas,
  #lets-talk .form-container {
    margin-left: -8px;
  }
  #lets-talk #drawingCanvas {
    width: calc(100% + 8px);
  }
}

@media (max-width: 1200px) {
  #lets-talk .canvas {
    gap: 16px;
  }
  /* Six 40px tools did not fit the row on narrow phones, so the last one
     ran into the edge; spread them evenly with the same 8px padding on
     both ends. */
  #lets-talk .controls {
    gap: 0;
    justify-content: space-between;
  }
  #lets-talk #delete-button {
    margin-left: 0;
  }
}
@media (max-width: 1023px) {
  #lets-talk .top-message {
    margin-top: calc(67px - 24px - 0.5 * (1lh - 1em));
  }
}

/* ---------- Main titles: one fluid size ----------
   The name, "Let's talk" (and the project page titles, case.css) grow
   smoothly from 64px on a small phone to 120px from 1024px up - always
   clearly above the 48px section headings, never jumping at breakpoints. */
.name,
.name.name {
  /* --fit = the longest word's width in em (set on the title): on narrow
     phones a long word shrinks just enough to fit the column instead of
     running off the screen. */
  font-size: min(
    clamp(4rem, 8.43vw + 2.1rem, 7.5rem),
    calc((100vw - 4rem) / var(--fit, 0.01))
  );
}

/* Desktop My way: same section rhythm as tablets - 64px from the last
   line of one block to the next heading, 64px between framed media. */
#my-way :is(.column-1, .column-3) {
  gap: 61px;
}

#my-way .column-2 {
  gap: 64px;
}

/* Project tags: chips hug their text and sit in a row, wrapping onto the
   next line when they run out of room - the same 8px between chips in
   both directions on every screen (they used to stretch full width,
   stacked, on phones). The 16px the chips' own margin gave under the
   last row now comes from the group itself. */
#projects .tags {
  flex-direction: row;
  gap: 8px;
  margin-bottom: 16px;
}

#projects .tags p {
  margin: 0;
}

/* Card numbers the same size and weight as the project title under them
   (24px with the 1px outline), no longer outweighing it. */
#projects .numbers p {
  font-size: 1.5rem;
  -webkit-text-stroke: 1px currentColor;
  /* 32px from the digits to the divider at this size. */
  margin-bottom: calc(27px - 0.5 * (1lh - 1.28em));
}

/* Mobile/tablet menu button in the top-right corner (where people look
   for it on the web, and easier to reach with the right thumb). One fixed
   44x44 tap target (Apple / WCAG AAA size) that never moves or resizes;
   inside it the three lines morph between a 28x24 burger and a 24x24
   cross - the same height and visual weight, so the icon doesn't shrink
   on open.
   The icon still sits 32px from the top and right edges. The full-screen
   menu items stay centred. */
.burger-icon {
  position: relative;
  width: 44px;
  height: 44px;
  margin: 22px 24px 0 auto;
}

.burger-icon span {
  position: absolute;
  left: 8px;
  top: 21.5px;
  width: 28px;
}

.burger-icon span:nth-child(1) {
  transform: translateY(-11.5px);
}

.burger-icon span:nth-child(3) {
  transform: translateY(11.5px);
}

/* 23px diagonals + the 1px line = 24px, like the burger: 23 x 1.414 =
   32.5px lines (scaleX 32.5/28). */
.burger-icon.active span:nth-child(1) {
  transform: rotate(45deg) scaleX(1.161);
}

.burger-icon.active span:nth-child(3) {
  transform: rotate(-45deg) scaleX(1.161);
}

@media screen and (max-width: 1200px) {
  .burger-icon.active {
    top: 0;
    right: 0;
  }
}
