/* ==========================================================================
   Design tokens — change these to re-theme the whole site
   ========================================================================== */
:root {
  --bg: #282c33;
  --gray: #abb2bf;
  --white: #ffffff;
  --primary: #c778dd;
  --container: 1024px;
  --font: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--gray);
  font-family: var(--font);
  font-size: 16px;
  line-height: normal;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.page { position: relative; overflow: hidden; min-height: 100vh; }

.container {
  width: 100%;
  max-width: calc(var(--container) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

.accent { color: var(--primary); }
.white { color: var(--white); }

/* ==========================================================================
   Decorations (dots + outlined squares)
   ========================================================================== */
.decor { position: absolute; pointer-events: none; z-index: 0; }
.square { border: 1px solid var(--gray); }

.dots {
  --cols: 5; --rows: 5; --gx: 20px; --gy: 20px;
  width: calc((var(--cols) - 1) * var(--gx) + 4px);
  height: calc((var(--rows) - 1) * var(--gy) + 4px);
  background-image: radial-gradient(circle at 2px 2px, var(--gray) 2px, transparent 2.01px);
  background-size: var(--gx) var(--gy);
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--primary);
  color: var(--white);
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .2s ease;
}
.btn:hover { background: rgba(199, 120, 221, .2); }

.btn-secondary { border-color: var(--gray); color: var(--gray); }
.btn-secondary:hover { background: rgba(171, 178, 191, .2); }

/* ==========================================================================
   Header + navigation
   ========================================================================== */
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 32px;
  padding-bottom: 8px;
}

.brand { display: flex; align-items: center; gap: 8px; color: var(--white); font-weight: 700; }
.brand img { width: 16px; height: 16px; }

.nav { display: flex; align-items: center; gap: 32px; }
.nav a { transition: color .2s ease; }
.nav a::before { content: '#'; color: var(--primary); }
.nav a:hover,
.nav a[aria-current="page"] { color: var(--white); }
.nav a[aria-current="page"] { font-weight: 500; }


.burger { display: none; width: 24px; height: 24px; position: relative; }
.burger span {
  position: absolute; right: 0; height: 2px; background: var(--gray);
}
.burger span:nth-child(1) { top: 7px; width: 24px; }
.burger span:nth-child(2) { top: 15px; width: 16px; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu .header-inner { align-items: center; padding-top: 16px; }
.menu-close { width: 24px; height: 24px; position: relative; }
.menu-close::before,
.menu-close::after {
  content: ''; position: absolute; left: 1px; top: 11px;
  width: 22px; height: 2px; background: var(--gray);
}
.menu-close::before { transform: rotate(45deg); }
.menu-close::after { transform: rotate(-45deg); }

.mobile-nav { display: flex; flex-direction: column; gap: 32px; padding: 47px 16px 0; font-size: 32px; }
.mobile-nav a::before { content: '#'; color: var(--primary); }
.mobile-nav a[aria-current="page"] { color: var(--white); font-weight: 500; }

.mobile-social { display: flex; justify-content: center; gap: 8px; margin: auto 0 36px; padding-top: 48px; }
.mobile-social img { width: 64px; height: 64px; }

/* Fixed-left media strip */
.side-media {
  position: absolute; left: 17px; top: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.side-media::before { content: ''; width: 1px; height: 191px; background: var(--gray); }
.side-media img { width: 32px; height: 32px; transition: opacity .2s ease; }
.side-media a:hover img { opacity: .7; }

/* ==========================================================================
   Section headings
   ========================================================================== */
.section { margin-top: 112px; }

.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; }

.section-title {
  display: flex; align-items: center; gap: 16px;
  width: 100%; max-width: var(--w, 100%);
  color: var(--white); font-size: 32px; font-weight: 500;
}
.section-title h2 { font: inherit; white-space: nowrap; }
.section-title h2::before { content: '#'; color: var(--primary); }
.section-title .line { flex: 1; height: 1px; background: var(--primary); }

.view-all { color: var(--white); font-weight: 500; white-space: nowrap; }
.view-all:hover { color: var(--primary); }

.page-title { margin-top: 53px; }
.page-title h1 { color: var(--white); font-size: 32px; font-weight: 600; }
.page-title h1::before { content: '/'; color: var(--primary); }
.page-title p { margin-top: 14px; color: var(--white); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 537px) minmax(0, 469px);
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  margin-top: 62px;
}
.hero h1 { color: var(--white); font-size: 32px; font-weight: 600; }
.hero-text p { margin-top: 32px; max-width: 463px; line-height: 25px; }
.hero-text .btn { margin-top: 24px; }

.hero-visual { width: 100%; max-width: 469px; }
.hero-art { position: relative; aspect-ratio: 469 / 386; }
.hero-art .logo-outline { position: absolute; left: 0; top: 21.76%; width: 33.05%; }
.hero-art .photo {
  position: absolute; left: 2.56%; top: 0; width: 97.44%; height: 100%;
  /* let the glow spill past the top and sides, but keep the cropped bottom edge sharp */
  clip-path: inset(-60px -60px 0 -60px);
}
.hero-art .float { position: absolute; inset: 0; }
.hero-art .float img {
  position: absolute; bottom: 0; left: 50%;
  width: auto; height: 100%; max-width: none;
  transform: translateX(-50%);
}
/* crisp white rim on the cut-out */
.hero-art .portrait { filter: drop-shadow(0 0 2px rgba(255, 255, 255, .55)); }
/* soft glow: a blurred white silhouette of the same image, faded in and out (opacity only) */
.hero-art .glow { filter: brightness(0) invert(1) blur(14px); opacity: .35; }
.hero-art .dots { position: absolute; left: 78.68%; top: 63.73%; }

.status {
  display: flex; align-items: center; gap: 10px;
  width: 402px; max-width: calc(100% - 31px);
  margin-left: 31px; padding: 8px;
  border: 1px solid var(--gray);
  background: var(--bg);
  font-weight: 500;
}
.status::before {
  content: ''; flex: none; width: 16px; height: 16px;
  background: var(--primary); border: 1px solid var(--primary);
}
.status strong { color: var(--white); font-weight: 600; }

/* ==========================================================================
   Quote
   ========================================================================== */
.quote { margin: 112px auto 0; width: fit-content; max-width: 100%; }
.quote figure { position: relative; }
.quote blockquote {
  position: relative;
  padding: 32px;
  border: 1px solid var(--gray);
  background: var(--bg);
  color: var(--white); font-size: 24px; font-weight: 500;
}
.quote .mark { position: absolute; width: 41.472px; height: 28.704px; }
.quote .mark-open { left: 10px; top: -15px; }
.quote figcaption {
  position: absolute; right: 0; top: calc(100% - 1px);
  padding: 16px; border: 1px solid var(--gray);
  color: var(--white); font-size: 24px;
}
.quote .mark-close { right: 15.53px; top: calc(100% - 16px); z-index: 1; }

/* ==========================================================================
   Project cards
   ========================================================================== */
.projects { margin-top: 137px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
  margin-top: 48px;
}
.card { border: 1px solid var(--gray); }
.card-img { width: 100%; height: 201px; object-fit: cover; border-bottom: 1px solid var(--gray); }
.card-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; }
.card-body {
  display: flex; flex-direction: column; gap: 16px;
  padding: 16px; border-top: 1px solid var(--gray);
}
.card-body h3 { color: var(--white); font-size: 24px; font-weight: 500; }
.card-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ==========================================================================
   Skills
   ========================================================================== */
.skills-body { display: flex; justify-content: space-between; gap: 32px; margin-top: 43px; }

.skills-art { position: relative; flex: none; width: 349px; height: 282px; margin: -31px 0 0 32px; }
.skills-art > * { position: absolute; }
.skills-art .d1 { left: 0; top: 38px; }
.skills-art .d2 { left: 177px; top: 143px; }
.skills-art .s1 { left: 297px; top: 193px; width: 52px; height: 52px; }
.skills-art .s2 { left: 227px; top: 0; width: 86px; height: 86px; }
.skills-art .logo { left: 15px; top: 169px; width: 113px; }

.skill-cols { display: flex; align-items: flex-start; gap: 16px; }
.skill-col { display: flex; flex-direction: column; gap: 16px; width: 178px; }
.skill-col.wide { width: 196px; }

.skill-block { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; border: 1px solid var(--gray); }
.skill-block h3 {
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--gray);
  color: var(--white); font-size: 16px; font-weight: 600;
}
.skill-block ul { display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.skill-block li { display: flex; flex-wrap: wrap; gap: 8px; }

.skills-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; margin-top: 48px; }
.skills-row .skill-block { width: 192px; }

/* ==========================================================================
   About
   ========================================================================== */
.about-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.about-text { max-width: 516px; }
.about-copy { margin-top: 23px; max-width: 515px; line-height: 26px; }
.about-copy p + p { margin-top: 26px; }
.about-text .btn { margin-top: 27px; }

.about-art { position: relative; flex: none; width: 343px; height: 508px; }
.about-art > * { position: absolute; }
.about-art .photo { left: 4px; top: 0; width: 339px; height: 507px; object-fit: cover; }
.about-art .d1 { left: 0; top: 59px; }
.about-art .d2 { left: 223px; top: 279px; }
.about-art .underline { left: 48px; top: 507px; width: 271px; height: 1px; background: var(--primary); }

.about-page .about-grid { margin-top: 8px; }
.about-page .about-copy { margin-top: 104px; }

/* Fun facts */
.facts-body { display: flex; justify-content: space-between; gap: 32px; margin-top: 26px; }
.facts { display: flex; flex-wrap: wrap; gap: 16px; max-width: 620px; }
.facts li { padding: 8px; border: 1px solid var(--gray); }
.facts em { font-style: normal; color: var(--white); }
.facts-art { position: relative; flex: none; width: 178px; height: 169px; margin-right: 85px; }
.facts-art > * { position: absolute; }
.facts-art .logo { left: 65px; top: 56px; width: 113px; }

/* ==========================================================================
   Competitive programming
   ========================================================================== */
.cp-intro { margin-top: 24px; max-width: 620px; line-height: 26px; }
.cp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; margin-top: 48px; }
.cp-card .card-body { border-top: 1px solid var(--gray); }

.cp-rating { display: flex; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.cp-number { color: var(--white); font-size: 48px; font-weight: 600; line-height: 1; }
.cp-rank { color: var(--primary); font-weight: 500; text-transform: capitalize; }

.cp-graph { display: block; width: 100%; height: 80px; border-bottom: 1px solid var(--gray); }
.cp-graph .area { fill: rgba(199, 120, 221, .12); }
.cp-graph .trend { fill: none; stroke: var(--primary); stroke-width: 2; vector-effect: non-scaling-stroke; }

.cp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cp-stats div { display: flex; flex-direction: column; gap: 4px; padding-left: 8px; border-left: 1px solid var(--primary); }
.cp-stats dt { font-size: 14px; }
.cp-stats dd { color: var(--white); font-weight: 500; }
.cp-muted { color: var(--gray); font-weight: 400; }

/* ==========================================================================
   Contacts
   ========================================================================== */
.contact-body { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; margin-top: 45px; }
.contact-body > p { max-width: 505px; font-weight: 500; }
.contact-cards { display: flex; flex: none; align-items: flex-start; gap: 11px; }

.contact-card { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--gray); }
.contact-card h3 { color: var(--white); font-size: 16px; font-weight: 600; }
.contact-card.support { gap: 8px; }
.contact-card.support h3 { font-weight: 500; }

.contact-list { display: flex; flex-direction: column; gap: 8px; }
.contact-item { display: flex; align-items: center; gap: 5px; transition: color .2s ease; }
a.contact-item:hover { color: var(--white); }
.contact-item img { width: 32px; height: 32px; }

.contacts-page .contact-body { margin-top: 46px; }
.contacts-page .contact-body > p { line-height: 26px; }
.all-media { margin-top: 25px; }
.media-list { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 22px; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 145px; padding-top: 32px; padding-bottom: 32px; border-top: 1px solid var(--gray); }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.footer-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.footer-brand .brand { gap: 9px; font-weight: 500; }
.footer-brand a[href^="mailto"]:hover { color: var(--white); }
.footer-tagline { margin-top: 16px; color: var(--white); }
.footer-media h2 { color: var(--white); font-size: 24px; font-weight: 500; }
.footer-media ul { display: flex; gap: 8px; margin-top: 12px; }
.footer-media img { width: 32px; height: 32px; transition: opacity .2s ease; }
.footer-media a:hover img { opacity: .7; }
.copyright { margin-top: 48px; text-align: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1260px) {
  .side-media { display: none; }
}

@media (max-width: 1100px) {
  .decor { display: none; }
  .skills-art { display: none; }
  .skills-body { justify-content: flex-start; }
  .skill-cols { flex-wrap: wrap; }
  .facts-art { display: none; }
}

@media (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid { flex-direction: column; }
  .about-art { align-self: center; }
  .about-page .about-copy { margin-top: 32px; }
  .contact-body { flex-direction: column; }
  .contact-cards { flex-wrap: wrap; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .burger { display: block; }
  .header-inner { align-items: center; padding-top: 16px; }

  .hero { grid-template-columns: minmax(0, 1fr); margin-top: 34px; gap: 24px; }
  .hero-visual { justify-self: center; }
  .hero-art .dots { --gx: 13.5px; --gy: 13.5px; }
  .status { width: 100%; max-width: 100%; margin-left: 0; }

  .quote { margin-top: 96px; }
  .quote blockquote { font-size: 20px; padding: 24px; }
  .quote figcaption { font-size: 20px; }

  .section { margin-top: 96px; }
  .projects { margin-top: 128px; }
  .cards, .cp-grid { grid-template-columns: 1fr; }
  .section-title h2 { white-space: normal; overflow-wrap: anywhere; }
  .section-head { flex-wrap: wrap; }

  .skill-cols { flex-direction: column; width: 100%; }
  .skill-col, .skill-col.wide, .skills-row .skill-block { width: 100%; }

  .about-art { display: none; } /* no portrait in the about section on phones */
}

@media (max-width: 380px) {
  .section-title, .page-title h1 { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-property: color, background-color, border-color, opacity !important; }
}

/* Per-page footer spacing (from the Figma layouts) */
.page-projects .site-footer { margin-top: 187px; }
.page-about .site-footer { margin-top: 162px; }
.page-contacts .site-footer { margin-top: 83px; }

/* Text badge for profiles without an icon (Codeforces, CodeChef) */
.cp-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; font-size: 13px; font-weight: 600;
  color: var(--gray); border: 1px solid var(--gray);
  transform: scale(.75);
}

/* "Coming soon" box shown while projects are hidden */
.placeholder {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 48px; padding: 32px;
  border: 1px dashed var(--gray);
  line-height: 26px;
}
.placeholder .white { font-size: 24px; font-weight: 500; }

/* ==========================================================================
   Experiences
   ========================================================================== */
.page-experiences .site-footer { margin-top: 162px; }

.exp-card .card-img { transition: opacity .2s ease; }
.exp-card a:hover .card-img { opacity: .85; }

.back-link { display: inline-block; margin-top: 32px; font-weight: 500; }
.back-link:hover { color: var(--white); }
#experience-detail .page-title { margin-top: 24px; }
#experience-detail .page-title h1 { overflow-wrap: anywhere; }

.event-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.event-meta li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 8px 16px; border: 1px solid var(--gray);
  color: var(--white); font-weight: 500;
}
.event-meta li span { color: var(--gray); font-size: 14px; font-weight: 400; }

.event-story { margin-top: 24px; max-width: 720px; line-height: 26px; }
.event-story p + p { margin-top: 16px; }

.event-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.gallery-item { display: block; border: 1px solid var(--gray); transition: border-color .2s ease; }
.gallery-item:hover { border-color: var(--primary); }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.event-nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 64px; }
.event-nav .btn { white-space: normal; }

.lightbox {
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 16px; border: 0;
  background: rgba(40, 44, 51, .96); color: var(--gray);
}
.lightbox[open] { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; }
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 140px); object-fit: contain; border: 1px solid var(--gray); }
.lightbox figcaption { text-align: center; }
.lightbox-controls { display: flex; gap: 16px; }

@media (max-width: 768px) {
  .lightbox-controls { gap: 8px; }
  .lightbox-controls .btn { padding: 8px 12px; }
}

/* ==========================================================================
   Motion — floating hero + ambient drift
   Layers use three independent properties so they never fight:
     transform  → looping float        translate → mouse parallax (js/main.js)
     opacity/filter → one-time entrance
   ========================================================================== */
:root {
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-float: cubic-bezier(0.45, 0, 0.55, 1);
  --px: 0; --py: 0;           /* pointer position in the hero, -1 … 1 */
}

@keyframes float-y   { from { transform: translateY(0); }            to { transform: translateY(var(--float, 8px)); } }
@keyframes float-xy  { from { transform: translate(0, 0) rotate(0); } to { transform: translate(var(--fx, 4px), var(--fy, -8px)) rotate(var(--fr, 0deg)); } }
@keyframes breathe   { from { opacity: .22; }                        to { opacity: .5; } }
@keyframes arrive    { from { opacity: 0; filter: blur(8px); } }
@keyframes rise-in   { from { opacity: 0; transform: translateY(20px); } }

/* Hero: one-time arrival, staggered */
.hero-art .photo        { animation: rise-in .9s var(--ease-out) both; }
.hero-visual .status    { animation: rise-in .7s .45s var(--ease-out) both; }

/* Hero: continuous float. The portrait sinks into its cropped bottom edge,
   so no gap ever opens under the photo. */
.hero-art .float {
  --float: 10px;
  animation: float-y 6s var(--ease-float) infinite alternate;
  translate: calc(var(--px) * 6px) calc(var(--py) * 4px);
}
.hero-art .glow { animation: breathe 3s var(--ease-float) infinite alternate; }

.hero-art .logo-outline {
  --fx: -6px; --fy: -10px; --fr: -2deg;
  animation: arrive .8s .15s var(--ease-out) both, float-xy 8s 1s var(--ease-float) infinite alternate;
  translate: calc(var(--px) * -12px) calc(var(--py) * -8px);
}
.hero-art > .dots {
  --fx: 6px; --fy: 8px;
  animation: arrive .8s .3s var(--ease-out) both, float-xy 7s 1.2s var(--ease-float) infinite alternate;
  translate: calc(var(--px) * 16px) calc(var(--py) * 12px);
}
.hero-art .logo-outline, .hero-art .float, .hero-art > .dots { transition: translate .6s var(--ease-out); }

/* Ambient drift for the page decorations and section art */
.decor, .skills-art > *, .about-art .dots, .facts-art > * {
  animation: float-xy 11s var(--ease-float) infinite alternate;
}
.decor:nth-child(2n)            { --fx: -6px; --fy: 10px; animation-duration: 14s; }
.decor:nth-child(3n)            { --fx: 8px;  --fy: -6px; --fr: 3deg; animation-duration: 17s; }
.skills-art > :nth-child(2n)    { --fx: -5px; --fy: 7px;  animation-duration: 9s; }
.skills-art .logo, .facts-art .logo { --fx: 3px; --fy: -9px; --fr: 2deg; animation-duration: 7s; }
.about-art .d2                  { --fx: -6px; --fy: 6px; animation-duration: 8s; }

/* Pause every loop while it is off screen (class set by js/main.js) */
.is-offscreen, .is-offscreen * { animation-play-state: paused !important; }

/* Cards: lift under the pointer */
.card { transition: transform .35s var(--ease-out), border-color .2s ease, box-shadow .35s var(--ease-out); }
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    border-color: var(--primary);
    box-shadow: 0 18px 32px -18px rgba(0, 0, 0, .7);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art .float, .hero-art .glow, .hero-art .logo-outline, .hero-art > .dots,
  .decor, .skills-art > *, .about-art .dots, .facts-art > * { animation: none; translate: none; }
  .hero-art .photo, .hero-visual .status { animation: arrive .4s ease both; }
  .card:hover { transform: none; }
}

/* ==========================================================================
   Floating + draggable pieces
   Float uses `transform` (keyframes); drag uses `translate` + `scale` (js/main.js),
   so both run at once without overriding each other.
   ========================================================================== */
.skill-block, .facts li, .contact-card, .media-list .contact-item, .about-art {
  --fx: 3px; --fy: -6px;
  animation: float-xy 6s var(--ease-float) infinite alternate;
}
/* Offset every sibling so nothing bobs in unison */
.skill-block:nth-of-type(2n), .skill-col:nth-child(2) .skill-block, .facts li:nth-child(2n),
.contact-card:nth-child(2n), .media-list .contact-item:nth-child(2n) {
  --fx: -4px; --fy: 5px; animation-duration: 7.5s; animation-delay: -2s;
}
.skill-col:nth-child(3) .skill-block, .skills-row .skill-block:nth-child(3n),
.facts li:nth-child(3n), .media-list .contact-item:nth-child(3n) {
  --fx: 2px; --fy: -8px; animation-duration: 8.5s; animation-delay: -4s;
}
.about-art { --fx: 0px; --fy: -10px; animation-duration: 9s; }

[data-drag] { cursor: grab; touch-action: pan-y; }
[data-drag].is-dragging {
  cursor: grabbing;
  position: relative; z-index: 20;
  scale: 1.04;
  animation-play-state: paused;
  user-select: none;
}
.skills-art > [data-drag].is-dragging, .facts-art > [data-drag].is-dragging { position: absolute; }
[data-drag].is-returning { transition: translate .7s cubic-bezier(0.34, 1.4, 0.64, 1), scale .3s var(--ease-out); }

/* "Currently working on" — blinking status light */
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
.status::before { animation: blink 1.1s infinite; }

@media (prefers-reduced-motion: reduce) {
  .skill-block, .facts li, .contact-card, .media-list .contact-item, .about-art { animation: none; }
  [data-drag].is-returning { transition: translate .2s ease; }
  @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
  .status::before { animation: blink 2.4s ease-in-out infinite; }
}
