/* Alexander Elkhatib — personal site
   One screen, one sentence, a handful of objects. Each object opens a chapter.
   Dark terminal by default; the light theme is the same page on paper. */

:root {
  --bg: #060907;
  --ink: #D6E6DA;
  --mute: #6C8273;
  --green: #3CFF78;
  --green-rgb: 60, 255, 120;
  --paper: #0A0F0C;
  --line: rgba(60, 255, 120, .2);
  --body: #A9BDAF;
  --shade: 0, 0, 0;
  --shade-a: .6;

  --t-circle: #081022;   --a-circle: #7CABFF;   --g-circle: 47, 107, 234;
  --t-abode: #1E0D09;    --a-abode: #FF9079;    --g-abode: 240, 103, 74;
  --t-openweb: #120C22;  --a-openweb: #BDA2FF;  --g-openweb: 138, 92, 240;
  --t-anomalix: #1A1505; --a-anomalix: #FFCB45; --g-anomalix: 242, 176, 30;

  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --pad: clamp(18px, 2.2vw, 32px);
  --spring: cubic-bezier(.2, 1.6, .4, 1);
  --glide: cubic-bezier(.2, .9, .3, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #ECEAE4;
  --ink: #1D1C1A;
  --mute: #7A766E;
  --green: #0A7A36;
  --green-rgb: 10, 122, 54;
  --paper: #FBFAF6;
  --line: rgba(29, 28, 26, .16);
  --body: #3B3934;
  --shade: 45, 35, 20;
  --shade-a: .3;

  --t-circle: #DBE5F9;   --a-circle: #1D1C1A;
  --t-abode: #F9E1D8;    --a-abode: #1D1C1A;
  --t-openweb: #E7DFFA;  --a-openweb: #1D1C1A;
  --t-anomalix: #F8ECC6; --a-anomalix: #1D1C1A;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-underline-offset: .25em; text-decoration-thickness: 1px; }
p, h1, h2, h3, figure { margin: 0; }
:focus-visible { outline: 1px solid var(--green); outline-offset: 4px; border-radius: 2px; }

button.plain {
  appearance: none; border: 0; background: none; padding: .35rem 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer;
}
button.plain:hover, .links a:hover { color: var(--green); }

/* a block cursor */
.cursor {
  display: inline-block;
  width: .55em; height: 1em;
  margin-left: .12em;
  vertical-align: -.14em;
  background: var(--green);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ---------- code rain and screen texture (dark only) ---------- */

#rain {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  opacity: .3;
  /* thinner behind the sentence, fuller toward the edges */
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 42% 50%, rgba(0, 0, 0, .22), #000 85%);
  mask-image: radial-gradient(ellipse 75% 70% at 42% 50%, rgba(0, 0, 0, .22), #000 85%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .16) 2px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .5));
  z-index: 3;
}
:root[data-theme="light"] #rain,
:root[data-theme="light"] body::after { display: none; }

/* ---------- the desk (home) ---------- */

.desk {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding:
    max(var(--pad), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    max(var(--pad), env(safe-area-inset-bottom))
    max(var(--pad), env(safe-area-inset-left));
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}
.bar-foot { align-items: baseline; color: var(--mute); }

.who span { display: block; color: var(--mute); }
.handle { font-weight: 400; font-size: 1.08em; }
.handle b {
  font-weight: 400;
  white-space: nowrap;
  color: var(--green);
  text-shadow: 0 0 .5em rgba(var(--green-rgb), .75), 0 0 1.4em rgba(var(--green-rgb), .35);
}
:root[data-theme="light"] .handle b { text-shadow: none; }

/* icon links: 40px targets around 18px glyphs */
.links { display: flex; align-items: center; gap: 2px; margin: -10px -10px 0 0; flex: none; }
.links a, .links button {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--mute);
  cursor: pointer;
  border-radius: 8px;
  transition: color .15s;
}
.links svg { display: block; width: 18px; height: 18px; }
.links a:hover, .links button:hover,
.links a:focus-visible, .links button:focus-visible {
  color: var(--green);
  filter: drop-shadow(0 0 6px rgba(var(--green-rgb), .6));
}
.links :focus-visible { outline-offset: -4px; }
.links .i-moon { display: none; }
:root[data-theme="light"] .links .i-sun { display: none; }
:root[data-theme="light"] .links .i-moon { display: block; }
.stamp { white-space: nowrap; }

.readout { color: var(--ink); min-height: 1.45em; }
.readout .prompt { color: var(--green); margin-right: .6em; }
.readout .cmt { color: var(--mute); }
.readout .cursor { width: .6em; }

.say {
  display: flex;
  align-items: center;
  padding: 3vh clamp(0px, 2.4vw, 44px);
}

.typed { --fs: clamp(2rem, min(5.5vw, 10.5vh), 7rem); min-width: 0; }

.sentence {
  font-weight: 400;
  font-size: var(--fs);
  line-height: 1.26;
  letter-spacing: -.05em;
  max-width: 19em;
  text-wrap: balance;
}

/* the earlier chapters: a quieter line underneath */
.earlier {
  margin-top: calc(var(--fs) * .55);
  font-size: max(15px, calc(var(--fs) * .36));
  line-height: 1.7;
  letter-spacing: -.03em;
  color: var(--body);
  max-width: 34em;
}
.earlier .ow { --s: 1.55em; --pull: .45em; --mid: .3em; margin-right: .22em; margin-left: .06em; }
.earlier .thing[data-open="anomalix"] .ow { margin-right: .1em; }

.keep { white-space: nowrap; }

/* typed on, one character at a time; each lands as a green block first */
.ch { opacity: 0; animation: type 90ms linear forwards; }
@keyframes type {
  0%, 80% { opacity: 1; background: var(--green); color: var(--green); }
  81%, 100% { opacity: 1; background: transparent; }
}
.typed .cursor { visibility: hidden; animation: show 0s linear var(--at, 0s) forwards, blink 1.1s steps(1) infinite; }
@keyframes show { to { visibility: visible; } }

.thing {
  appearance: none; border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: inherit; letter-spacing: inherit;
  cursor: pointer;
  white-space: nowrap;
  border-radius: .1em;
}
.thing .word {
  font-style: italic;
  color: var(--green);
  text-shadow: 0 0 .45em rgba(var(--green-rgb), .35);
  text-decoration: underline transparent;
  text-decoration-thickness: .04em;
  text-underline-offset: .16em;
  transition: text-decoration-color .15s;
}
:root[data-theme="light"] .thing .word { text-shadow: none; }
.thing:hover .word, .thing:focus-visible .word { text-decoration-color: currentColor; }
.thing:focus-visible { outline-offset: .1em; }

.thing[data-open="circle"] { --glow: var(--g-circle); }
.thing[data-open="abode"] { --glow: 190, 230, 205; }
.thing[data-open="openweb"] { --glow: var(--g-openweb); }
.thing[data-open="anomalix"] { --glow: var(--g-anomalix); }

/* an object sitting in the line of type */
.ow {
  --s: 1.14em;   /* size */
  --pull: .3em;  /* how far it may overhang the line without pushing lines apart */
  --mid: .33em;  /* where its centre sits above the baseline: the middle of the letters */
  display: inline-block;
  width: var(--s); height: var(--s);
  vertical-align: calc(var(--mid) - var(--s) / 2 + var(--pull));
  margin: calc(-1 * var(--pull)) .2em calc(-1 * var(--pull)) .04em;
  animation:
    pop .55s var(--spring) var(--at, 0s) both,
    bob 5.2s ease-in-out calc(var(--at, 0s) + 1.2s) infinite;
}
.obj {
  display: block;
  width: 100%; height: 100%;
  filter:
    drop-shadow(0 .06em .06em rgba(var(--shade), var(--shade-a)))
    drop-shadow(0 0 .28em rgba(var(--glow, 60, 255, 120), .5));
  transition: transform .5s var(--spring);
}
:root[data-theme="light"] .obj { filter: drop-shadow(0 .07em .055em rgba(45, 35, 20, .24)); }
/* Abode's mark is white for dark backgrounds and black for light ones */
:root[data-theme="light"] img[src$="abode-icon.png"] { filter: brightness(0); }
.thing[data-open="abode"] .obj { filter: drop-shadow(0 0 .3em rgba(var(--glow), .3)); }
:root[data-theme="light"] .thing[data-open="abode"] .obj { filter: brightness(0); }
.thing:hover .obj, .thing:focus-visible .obj { transform: translateY(-.08em) rotate(-10deg) scale(1.12); }
.thing:active .obj { transform: scale(.94); transition-duration: .1s; }

@keyframes pop { from { transform: scale(0) rotate(-40deg); } }
@keyframes bob { 50% { transform: translateY(-.04em) rotate(3deg); } }

/* the little pile of prints */
.stack {
  position: relative;
  display: inline-block;
  width: 1.5em; height: 1.36em;
  vertical-align: calc(.33em - 1.36em / 2 + .3em);
  margin: -.3em .22em -.3em .04em;
  animation: pop .55s var(--spring) var(--at, .3s) both;
}
.stack i {
  position: absolute;
  left: 50%; top: 50%;
  width: .88em; height: 1.2em;
  margin: -.6em 0 0 -.44em;
  padding: .04em;
  background: #fff;
  box-shadow: 0 .02em .08em rgba(var(--shade), .7);
  transform: translateX(var(--tx)) rotate(var(--r));
  transition: transform .5s var(--spring);
}
.stack i:nth-child(1) { --tx: -.2em; --r: -13deg; }
.stack i:nth-child(2) { --tx: .2em; --r: 10deg; }
.stack i:nth-child(3) { --tx: 0em; --r: -2deg; }
.thing:hover .stack i:nth-child(1), .thing:focus-visible .stack i:nth-child(1) { --tx: -.36em; --r: -20deg; }
.thing:hover .stack i:nth-child(2), .thing:focus-visible .stack i:nth-child(2) { --tx: .36em; --r: 17deg; }
.thing:hover .stack i:nth-child(3), .thing:focus-visible .stack i:nth-child(3) { transform: translateY(-.08em) rotate(1deg); }
.stack img { display: block; width: 100%; height: 100%; object-fit: cover; background: #26302A; }

/* ---------- dialogs, shared ---------- */

dialog {
  border: 0; padding: 0; margin: 0;
  width: 100vw; height: 100dvh;
  max-width: none; max-height: none;
  color: var(--ink);
  background: var(--bg);
}
dialog::backdrop { background: transparent; }

/* ---------- a chapter ---------- */

.sheet { background: var(--tint, var(--bg)); transition: background-color .4s; }
.sheet[data-open="circle"] { --tint: var(--t-circle); --accent: var(--a-circle); --glow: var(--g-circle); }
.sheet[data-open="abode"] { --tint: var(--t-abode); --accent: var(--a-abode); --glow: var(--g-abode); }
.sheet[data-open="openweb"] { --tint: var(--t-openweb); --accent: var(--a-openweb); --glow: var(--g-openweb); }
.sheet[data-open="anomalix"] { --tint: var(--t-anomalix); --accent: var(--a-anomalix); --glow: var(--g-anomalix); }

.sheet[open] {
  display: grid;
  grid-template-columns: minmax(0, 1fr) min(56vw, 820px);
  animation: fade .25s ease;
}

.stage {
  display: grid; place-items: center;
  cursor: zoom-out; min-height: 0;
  background: radial-gradient(circle at center, rgba(var(--glow), .22), transparent 62%);
}
:root[data-theme="light"] .stage { background: none; }
.stage .obj {
  width: min(30vw, 46vh); height: min(30vw, 46vh);
  filter:
    drop-shadow(0 22px 18px rgba(var(--shade), var(--shade-a)))
    drop-shadow(0 0 46px rgba(var(--glow), .45));
}
:root[data-theme="light"] .stage .obj { filter: drop-shadow(0 22px 18px rgba(45, 35, 20, .22)); }
:root[data-theme="light"] .stage img[src$="abode-icon.png"] { filter: brightness(0); }
/* flat marks sit a little smaller than the glossy objects */
.sheet[data-open="circle"] .stage .obj,
.sheet[data-open="abode"] .stage .obj { width: min(24vw, 38vh); height: min(24vw, 38vh); }
.sheet.go .stage .obj { animation: arrive .8s var(--spring) both, float 6s ease-in-out .8s infinite; }
.sheet.go .panel { animation: slide .55s var(--glide) both; }

@keyframes fade { from { opacity: 0; } }
@keyframes arrive { from { transform: scale(.3) rotate(-50deg); } }
@keyframes float { 50% { transform: translateY(-12px) rotate(4deg); } }
@keyframes slide { from { transform: translateX(48px); opacity: 0; } }

.panel {
  margin:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    14px;
  overscroll-behavior: contain;
  padding: clamp(22px, 3.2vw, 48px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
}
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.panel-head h2, .who { font-size: inherit; font-weight: 400; }
.panel-head h2 { text-transform: lowercase; }
.panel-head h2::before, .table .who > b::before { content: "~/"; color: var(--green); }
.who > b { font-weight: 400; }

.chapter { flex: 1; }

.brand {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  margin-top: clamp(1.25rem, 4vh, 2.5rem);
}
.brand a { color: var(--mute); text-decoration: none; white-space: nowrap; }
.brand a:hover { color: var(--green); }
.brand a::after { content: " \2197"; }
/* a logo, tinted to the text colour so it sits in either theme */
.logo {
  display: block;
  height: 30px;
  width: calc(30px * var(--ratio));
  max-width: 60%;
  background: var(--ink);
  -webkit-mask: var(--logo) left center / contain no-repeat;
  mask: var(--logo) left center / contain no-repeat;
}

.lead {
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 38em;
  margin-bottom: 1.75rem;
}
.years {
  font-weight: 300;
  font-size: clamp(3.4rem, 8.6vw, 8.5rem);
  line-height: 1;
  letter-spacing: -.07em;
  color: var(--accent);
  text-shadow: 0 0 .35em rgba(var(--glow), .45);
  margin: clamp(1rem, 3.5vh, 2.25rem) 0 clamp(1rem, 3vh, 1.75rem);
  white-space: nowrap;
}
:root[data-theme="light"] .years { text-shadow: none; }
.role {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.25rem 0 1.5rem;
  border-top: 1px solid var(--line);
}
.when { color: var(--mute); padding-top: .3rem; }
.role h3 {
  font-weight: 400;
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -.03em;
  margin-bottom: .6rem;
}
.role div p { font-size: .95rem; line-height: 1.6; max-width: 36em; color: var(--body); }
.role div p + p { margin-top: .8rem; color: var(--ink); }
.role a { color: var(--green); }
.role ul { list-style: none; margin: .9rem 0 0; padding: 0; max-width: 38em; }
.role li {
  position: relative;
  padding-left: 1.5em;
  margin-top: .5rem;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--body);
}
.role li::before { content: ">"; position: absolute; left: 0; color: var(--accent); }

.made { border-top: 1px solid var(--line); padding: 1.25rem 0 .5rem; }
.made h3 { font-size: inherit; font-weight: 400; color: var(--mute); margin-bottom: .9rem; }
.products {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.products li {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .9rem 1rem 1rem;
  background: rgba(var(--glow), .07);
}
.products b {
  display: flex; align-items: center; gap: .5em;
  min-height: 24px;
  font-weight: 500; color: var(--accent);
  margin-bottom: .45rem;
}
.products b img { width: 22px; height: 22px; }
.products .logo { height: 22px; width: calc(22px * var(--ratio)); max-width: 100%; }
.products span { display: block; font-size: .9rem; line-height: 1.5; color: var(--body); }
.shots { display: grid; gap: 1.75rem; }
.shots figure { margin: 0; }
.shots img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #F4F2EE;
}
.shots figcaption { margin-top: .8rem; max-width: 38em; }
.shots b { display: block; font-weight: 500; color: var(--accent); margin-bottom: .25rem; }
.shots span { display: block; font-size: .9rem; line-height: 1.55; color: var(--body); }

.pager {
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1.5rem;
  color: var(--mute);
  text-transform: lowercase;
}
.pager button { display: inline-flex; align-items: center; gap: .5rem; }
.pager button:hover { color: var(--ink); }
.pager img { width: 2.1rem; height: 2.1rem; transition: transform .45s var(--spring); }
.pager button:hover img { transform: rotate(-10deg) scale(1.15); }

/* ---------- the table of prints ---------- */

.table { overflow: hidden; }
.table[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); animation: fade .25s ease; }
.table-head {
  padding:
    max(var(--pad), env(safe-area-inset-top))
    max(var(--pad), env(safe-area-inset-right))
    var(--pad)
    max(var(--pad), env(safe-area-inset-left));
  position: relative; z-index: 2;
}

.spread { position: relative; }

.pr {
  position: absolute; left: 0; top: 0;
  appearance: none; border: 0; margin: 0;
  padding: var(--b, 8px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(var(--shade), .4), 0 16px 26px -10px rgba(var(--shade), var(--shade-a));
  cursor: grab;
  touch-action: none;
  transform: translate(var(--x, 0), var(--y, 0)) rotate(var(--r, 0deg));
  transition: transform .8s var(--glide), box-shadow .25s;
  border-radius: 2px;
}
.pr img {
  display: block; width: 100%; height: auto;
  pointer-events: none; user-select: none; -webkit-user-drag: none;
  background: #26302A;
}
.pr:hover { box-shadow: 0 1px 2px rgba(var(--shade), .4), 0 24px 34px -12px rgba(var(--shade), calc(var(--shade-a) + .15)); }
.pr:focus-visible { outline-width: 2px; }
.pr.is-held {
  cursor: grabbing;
  transition: box-shadow .2s;
  box-shadow: 0 2px 4px rgba(var(--shade), .4), 0 36px 46px -14px rgba(var(--shade), calc(var(--shade-a) + .2));
}

/* phones: prints fall into a loose column you scroll through */
.table.is-flow { overflow-y: auto; }
.table.is-flow[open] { display: block; }
.table.is-flow .spread {
  display: flex; flex-direction: column; align-items: center;
  gap: 30px;
  padding: 8px var(--pad) 64px;
}
.table.is-flow .pr {
  position: static;
  transform: rotate(var(--r, 0deg));
  touch-action: auto;
  cursor: zoom-in;
}

/* ---------- one print, larger ---------- */

.viewer[open] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  animation: fade .2s ease;
}
.v-figure {
  height: 100dvh;
  padding: 3.75rem 0 1.25rem;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem;
  justify-items: center;
}
.v-print {
  align-self: center;
  max-height: 100%;
  min-height: 0;
  padding: clamp(8px, 1.1vw, 16px);
  background: #fff;
  box-shadow: 0 1px 2px rgba(var(--shade), .4), 0 30px 50px -20px rgba(var(--shade), var(--shade-a));
  display: flex;
}
.v-img { display: block; max-width: 100%; max-height: calc(100dvh - 10.5rem); object-fit: contain; }
.v-figure figcaption { display: flex; gap: 1.5rem; justify-content: space-between; width: 100%; min-height: 1.4em; }
.v-place::before { content: "> "; color: var(--green); }
.v-count { color: var(--mute); white-space: nowrap; }
.v-close { position: absolute; top: calc(var(--pad) - .35rem); right: var(--pad); }
.v-nav {
  appearance: none; border: 0; background: none; color: inherit; cursor: pointer;
  width: clamp(3rem, 7vw, 6rem); height: 50dvh;
  display: grid; place-items: center;
  opacity: .55;
}
.v-nav:hover { opacity: 1; color: var(--green); }
.viewer.is-single .v-nav { visibility: hidden; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .typed { --fs: clamp(1.45rem, min(8.6vw, 11vh), 3.6rem); }
  .sentence { line-height: 1.34; }
  .say { padding: 6vh 0; }

  .sheet[open] { grid-template-columns: minmax(0, 1fr); grid-template-rows: 30dvh minmax(0, 1fr); }
  .stage .obj { width: 22dvh; height: 22dvh; }
  .panel { margin: 0 10px 10px; }
  .role { grid-template-columns: minmax(0, 1fr); }
  .when { padding: 0 0 .4rem; }
  @keyframes slide { from { transform: translateY(40px); opacity: 0; } }
}

@media (max-width: 560px) {
  .viewer[open] { grid-template-columns: minmax(0, 1fr); }
  .v-figure { grid-column: 1; grid-row: 1; padding: 3.5rem .75rem 1.25rem; }
  .v-nav { grid-row: 1; grid-column: 1; z-index: 1; width: 3rem; height: 4rem; align-self: end; margin-bottom: .25rem; opacity: 1; }
  .v-prev { justify-self: start; }
  .v-next { justify-self: end; }
  .v-figure figcaption { padding: 0 3rem; min-height: 3.2rem; align-items: center; }
  .v-img { max-height: calc(100dvh - 12.5rem); }
}

/* a very narrow outer screen */
@media (max-width: 400px) {
  .links a, .links button { width: 36px; height: 36px; }
  .links { margin-right: -8px; }
  .handle { font-size: 1em; }
}

/* a phone on its side, or any short wide screen */
@media (max-height: 540px) and (min-width: 600px) and (orientation: landscape) {
  .typed { --fs: clamp(1.4rem, min(5.2vw, 11.5vh), 3.4rem); }
  .say { padding-block: 2vh; }
  .sheet[open] { grid-template-columns: 26vw minmax(0, 1fr); grid-template-rows: none; }
  .stage .obj { width: 20vw; height: 20vw; }
  .panel { margin: 8px max(8px, env(safe-area-inset-right)) 8px 8px; }
  .years { font-size: clamp(2.6rem, 16vh, 5rem); }
}

/* touch screens have no hover: don't leave things stuck in their hover pose after a tap */
@media (hover: none) {
  .thing:hover:not(:focus-visible) .obj { transform: none; }
  .thing:hover:not(:focus-visible) .word { text-decoration-color: transparent; }
  .thing:hover:not(:focus-visible) .stack i:nth-child(1) { --tx: -.2em; --r: -13deg; }
  .thing:hover:not(:focus-visible) .stack i:nth-child(2) { --tx: .2em; --r: 10deg; }
  .thing:hover:not(:focus-visible) .stack i:nth-child(3) { transform: translateX(0) rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .typed .cursor { visibility: visible; }
}

@media print {
  dialog, #rain, body::after { display: none; }
}
