/* ziqiaodai.dev, a cosy little desktop. No build step, no dependencies. */

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Charter", "Bitstream Charter", "Source Serif Pro", Georgia, Cambria, serif;
  --display: "Fraunces", var(--serif);
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, "Cascadia Mono", "Roboto Mono", Consolas, monospace;

  --mb-h: 30px;
  --dock-h: 78px;
  --radius: 12px;
  --spring: cubic-bezier(.2, 1.28, .38, 1);
  --ease-out: cubic-bezier(.22, .8, .3, 1);

  /* light (warm cream) */
  --text: #2b211c;
  --text-2: #64544a;
  --text-3: #79685e;
  --accent: #b14f20;
  --accent-ink: #fff;
  --accent-soft: rgba(196, 98, 45, .14);
  --link: #a8461a;

  --win-bg: #fbf5ee;              /* opaque: text in windows behind must not show through */
  --win-solid: #fffaf5;
  --win-side: rgba(246, 236, 227, .82);
  --win-border: rgba(80, 45, 25, .12);
  --win-line: rgba(80, 45, 25, .10);
  --win-title: #4a3a31;
  --win-shadow: 0 24px 70px rgba(70, 35, 20, .28), 0 4px 14px rgba(70, 35, 20, .12);
  --win-shadow-inactive: 0 14px 40px rgba(70, 35, 20, .18), 0 2px 8px rgba(70, 35, 20, .08);
  --win-hi: inset 0 1px 0 rgba(255, 255, 255, .7);
  --hover: rgba(90, 50, 25, .07);
  --select: rgba(177, 79, 32, .14);

  --mb-bg: rgba(255, 246, 238, .58);
  --mb-text: #2b211c;
  --mb-hover: rgba(255, 255, 255, .32);
  --logo-ink: #f6dcc8;
  --dd-bg: rgba(255, 249, 243, .9);
  --dock-bg: rgba(255, 245, 236, .42);
  --dock-border: rgba(255, 255, 255, .55);
  --dock-sep: rgba(80, 45, 25, .2);

  --icon-label: #2b211c;
  --icon-label-shadow: none;
  --label-pill: rgba(255, 250, 245, .8);

  /* wallpaper */
  --wall-img: url("/assets/img/wallpaper-desktop.webp");
  --wall-tint: #ffffff;          /* multiplied over the photo; white = untouched */
  --wall-pos: 50% 60%;           /* wall.js reads this too, to line the light up with the photo */
  --wall-fallback: #695943;
  --wall-shade: radial-gradient(130% 105% at 64% 26%, transparent 42%, rgba(30, 14, 4, .55) 100%);
  --wall-scrim: radial-gradient(70% 75% at 0% 100%, rgba(26, 12, 4, .55), transparent 72%); /* under the hero */

  --hero-ink: #fff8f0;
  --hero-shadow: 0 1px 2px rgba(25, 12, 4, .5), 0 2px 18px rgba(25, 12, 4, .45);

  --note-bg: #fff3c2;
  --note-bg-2: #fbe7a0;
  --note-text: #4a3b1a;
  --note-text-2: #6b5a2f;

  color-scheme: light;
}

html[data-theme="dark"] {
  --text: #f3eae2;
  --text-2: #c2b3a8;
  --text-3: #9d8f86;
  --accent: #f09a5f;
  --accent-ink: #26160c;
  --accent-soft: rgba(240, 154, 95, .16);
  --link: #f4a872;

  --win-bg: #29212f;
  --win-solid: #2a2230;
  --win-side: rgba(52, 42, 58, .8);
  --win-border: rgba(255, 230, 210, .12);
  --win-line: rgba(255, 230, 210, .09);
  --win-title: #e6dad0;
  --win-shadow: 0 24px 70px rgba(5, 2, 10, .6), 0 4px 14px rgba(5, 2, 10, .35);
  --win-shadow-inactive: 0 14px 40px rgba(5, 2, 10, .45), 0 2px 8px rgba(5, 2, 10, .25);
  --win-hi: inset 0 1px 0 rgba(255, 240, 225, .08);
  --hover: rgba(255, 235, 220, .07);
  --select: rgba(240, 154, 95, .18);

  --mb-bg: rgba(32, 23, 40, .55);
  --mb-text: #f3eae2;
  --mb-hover: rgba(255, 255, 255, .12);
  --logo-ink: #2b2040;
  --dd-bg: rgba(44, 35, 52, .92);
  --dock-bg: rgba(48, 36, 56, .45);
  --dock-border: rgba(255, 230, 210, .14);
  --dock-sep: rgba(255, 255, 255, .18);

  --icon-label: #fff8f1;
  --icon-label-shadow: 0 1px 3px rgba(0, 0, 0, .7);
  --label-pill: rgba(28, 20, 34, .45);

  --wall-tint: #80624a;
  --wall-fallback: #352213;

  --note-bg: #e8d48e;
  --note-bg-2: #dcc477;
  --note-text: #3a2e12;
  --note-text-2: #54461f;

  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--wall-fallback);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: var(--link); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
[hidden] { display: none !important; }

/* gradient stops */
.s-amber-1 { stop-color: #f7c27a; } .s-amber-2 { stop-color: #e79a4a; }
.s-plum-1  { stop-color: #d9a3c4; } .s-plum-2  { stop-color: #b0739d; }
.s-sage-1  { stop-color: #b9cfa2; } .s-sage-2  { stop-color: #87a675; }
.s-paper-1 { stop-color: #fffdf9; } .s-paper-2 { stop-color: #f1e7dc; }
.s-finder-1{ stop-color: #7cc0f5; } .s-finder-2{ stop-color: #2f86e0; }
.s-notes-1 { stop-color: #ffd65c; } .s-notes-2 { stop-color: #f6b928; }
.s-book-1  { stop-color: #b46e4f; } .s-book-2  { stop-color: #7f4330; }
.s-term-1  { stop-color: #3b3540; } .s-term-2  { stop-color: #1b171f; }
.s-mail-1  { stop-color: #6fb6ff; } .s-mail-2  { stop-color: #2c7be5; }
.s-cv-1    { stop-color: #f4ece4; } .s-cv-2    { stop-color: #d9cabd; }

/* ---------- Wallpaper ----------
   One layer that drifts like a slow camera move. ::before is the photo, ::after is the sunlight
   (an image wall.js makes from the photo's bright areas) breathing like clouds passing, and the
   canvas is the dust drifting through that light. */
.wall {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  animation: wall-drift 38s ease-in-out infinite alternate;
  will-change: transform;
}
.wall::before, .wall::after, .wall-dust { content: ""; position: absolute; inset: 0; width: 100%; height: 100%; }
.wall::before {
  background-color: var(--wall-fallback);
  background-image: var(--wall-shade), var(--wall-scrim), linear-gradient(var(--wall-tint), var(--wall-tint)), var(--wall-img);
  background-position: 0 0, 0 0, 0 0, var(--wall-pos);
  background-size: 100% 100%, 100% 100%, 100% 100%, cover;
  background-repeat: no-repeat;
  background-blend-mode: normal, normal, multiply, normal;
}
@supports (background-image: image-set(url("x.webp") 1x)) {
  :root { --wall-img: image-set(url("/assets/img/wallpaper-desktop.webp") 1x, url("/assets/img/wallpaper-desktop-2x.webp") 2x); }
}
.wall::after {
  background: var(--wall-glow, none) 0 0 / 100% 100% no-repeat; /* strength is baked into the image */
  opacity: .55;
  animation: wall-sun 27s ease-in-out infinite alternate;
}
@keyframes wall-drift {
  0%   { transform: scale(1.07) translate(-1.6%, .9%); }
  45%  { transform: scale(1.12) translate(.6%, -1%); }
  100% { transform: scale(1.09) translate(1.8%, .7%); }
}
@keyframes wall-sun { /* uneven on purpose, so it never feels like a loop; plain numbers so it runs on the compositor */
  0%   { opacity: .2; }
  17%  { opacity: .85; }
  31%  { opacity: .5; }
  52%  { opacity: 1; }
  71%  { opacity: .3; }
  86%  { opacity: .75; }
  100% { opacity: .4; }
}
.adm .wall, .adm .wall::after { animation: none; }
.is-genie .wall, .is-genie .wall::after { animation-play-state: paused; } /* while a window minimises (app.js) */

/* ---------- Menu bar ---------- */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--mb-h); z-index: 5000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px 0 12px;
  background: var(--mb-bg);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  color: var(--mb-text); font-size: 13px; user-select: none;
}
.mb-left, .mb-right, .mb-menus { display: flex; align-items: center; gap: 2px; height: 100%; }
.mb-logo { width: 28px; height: 22px; display: grid; place-items: center; border-radius: 5px; }
.mb-logo svg { width: 17px; height: 17px; }
.logo-bg { fill: currentColor; }
.logo-z { fill: none; stroke: var(--logo-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mb-name { font-weight: 700; padding: 0 8px 0 4px; letter-spacing: -.01em; white-space: nowrap; }
.mb-item, .mb-icon, .mb-clock { height: 22px; padding: 0 9px; border-radius: 5px; display: inline-flex; align-items: center; white-space: nowrap; }
.mb-item:hover, .mb-item[aria-expanded="true"], .mb-logo:hover, .mb-icon:hover { background: var(--mb-hover); }
.mb-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.mb-icon .ic-moon { fill: currentColor; stroke: none; }
.ic-sun { display: none; }
html[data-theme="dark"] .ic-sun { display: block; }
html[data-theme="dark"] .ic-moon { display: none; }
.mb-clock { font-variant-numeric: tabular-nums; font-weight: 500; }
.mb-menu { position: relative; height: 100%; display: flex; align-items: center; }
.dropdown {
  position: absolute; top: calc(var(--mb-h) - 3px); left: 0; min-width: 180px; padding: 5px;
  background: var(--dd-bg); color: var(--text);
  -webkit-backdrop-filter: blur(30px) saturate(1.6); backdrop-filter: blur(30px) saturate(1.6);
  border: 1px solid var(--win-border); border-radius: 9px;
  box-shadow: 0 12px 34px rgba(40, 20, 10, .22);
  animation: dd-in .14s var(--ease-out);
}
.dropdown > button, .dropdown > a {
  display: block; width: 100%; text-align: left; padding: 4px 10px; border-radius: 5px;
  color: inherit; text-decoration: none; font-size: 13px; line-height: 1.5;
}
.dropdown > button:hover, .dropdown > a:hover, .dropdown > button:focus-visible, .dropdown > a:focus-visible { background: var(--accent); color: var(--accent-ink); outline: none; }
.dd-sep { height: 1px; margin: 4px 8px; background: var(--win-line); }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Desktop ---------- */
.desktop { position: fixed; inset: var(--mb-h) 0 0 0; }

/* hero: who this is, set on the dark wood at the bottom left */
.hero {
  position: absolute; left: clamp(28px, 4.2vw, 64px); bottom: calc(var(--dock-h) + 30px);
  max-width: max(330px, 29vw - 50px); /* keeps it on the dark wood, clear of the saucer */
  color: var(--hero-ink); text-shadow: var(--hero-shadow);
}
.hero-kicker { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .9; }
.hero-name { margin: 0; font: 600 clamp(42px, 4.6vw, 68px)/1 var(--display); letter-spacing: -.02em; }
.hero-role { margin: 12px 0 0; font-size: 16px; line-height: 1.5; opacity: .94; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 17px; border-radius: 999px;
  font-size: 14px; font-weight: 600; text-shadow: none; text-decoration: none; white-space: nowrap;
  color: #fff8f0; background: rgba(255, 244, 232, .14); border: 1px solid rgba(255, 244, 232, .34);
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 6px 20px rgba(25, 12, 4, .18);
  transition: background .2s, transform .25s var(--spring), box-shadow .2s;
}
.pill:hover { background: rgba(255, 244, 232, .26); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(25, 12, 4, .26); }
.pill:active { transform: translateY(0) scale(.97); }
.pill-primary { background: #fff6ec; color: #3b2417; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.pill-primary:hover { background: #fff; }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* icons */
.icons {
  list-style: none; margin: 0; padding: 0;
  position: absolute; top: 16px; right: 18px; bottom: calc(var(--dock-h) + 16px);
  display: flex; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; gap: 6px 4px;
}
.icon {
  width: 104px; padding: 6px 4px 5px; border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  touch-action: manipulation;
}
.icon-img { width: 60px; height: 60px; filter: drop-shadow(0 3px 5px rgba(60, 25, 10, .22)); transition: transform .3s var(--spring), filter .3s; }
.icon:hover .icon-img { transform: translateY(-3px) scale(1.06); filter: drop-shadow(0 9px 12px rgba(60, 25, 10, .3)); }
.icon:active .icon-img { transform: scale(.94); transition-duration: .08s; }
.icon-label {
  font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--icon-label); text-shadow: var(--icon-label-shadow);
  background: var(--label-pill);
  padding: 2px 7px; border-radius: 6px; text-align: center; max-width: 100%; overflow-wrap: anywhere;
  transition: background .2s, color .2s;
}
.icon:hover .icon-label, .icon:focus-visible .icon-label { background: var(--accent); color: var(--accent-ink); text-shadow: none; }
.icon:focus-visible { outline: none; }
.icon:focus-visible .icon-label { outline: 2px solid var(--accent); outline-offset: 2px; }

/* folder / doc artwork */
.f-back { fill: #d98a3f; }
.f-back.f-amber { fill: #d4863b; } .f-back.f-plum { fill: #9a6189; } .f-back.f-sage { fill: #75935f; }
.f-hi { stroke: rgba(255, 255, 255, .55); stroke-width: 1.2; fill: none; }
.f-em { fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.f-em-amber { stroke: #9a5520; } .f-em-plum { stroke: #6e3e60; } .f-em-sage { stroke: #4b6a3a; }
.doc { fill: url(#g-paper); stroke: rgba(90, 55, 30, .18); }
.doc-fold { fill: #e7d9cb; }
.doc-lines { stroke: #c9b6a6; stroke-width: 2; stroke-linecap: round; fill: none; }
.doc-tag { font: 700 7px var(--font); fill: #8f7766; text-anchor: middle; letter-spacing: .5px; }
.doc-avatar { fill: #e8b48f; }
.pdf-badge { fill: #d4573a; }
.pdf-tag { font: 800 7.5px var(--font); fill: #fff; text-anchor: middle; letter-spacing: .6px; }
.card { fill: url(#g-paper); stroke: rgba(90, 55, 30, .2); }
.card-flap { fill: none; stroke: #d39a73; stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.card-stamp { fill: #e9806b; }

/* sticky note */
.widget {
  position: absolute; top: 22px; left: 24px; width: 240px; padding: 16px 18px 14px;
  background: linear-gradient(170deg, var(--note-bg) 0%, var(--note-bg) 55%, var(--note-bg-2) 100%);
  color: var(--note-text);
  border-radius: 3px 3px 16px 3px; transform: rotate(-1.6deg);
  box-shadow: 0 1px 1px rgba(70, 40, 10, .08), 0 14px 30px rgba(70, 40, 10, .22);
  font-size: 13px;
}
.widget::before { /* tape */
  content: ""; position: absolute; top: -10px; left: 50%; width: 76px; height: 20px; margin-left: -38px;
  background: rgba(255, 255, 255, .5); box-shadow: 0 1px 2px rgba(70, 40, 10, .08); transform: rotate(2deg); border-radius: 2px;
}
:where(.widget p) { margin: 0; }
.widget-kicker { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--note-text-2); margin-bottom: 6px; }
.widget-line { font-family: var(--serif); font-size: 15px; line-height: 1.38; }
.widget-line + .widget-line { margin-top: 4px; }
.widget-latest { margin-top: 10px; font-size: 12.5px; }
.widget-latest button { text-decoration: underline; text-underline-offset: 2px; text-align: left; font-weight: 600; }
.widget-tip { margin-top: 12px; font-size: 11.5px; color: var(--note-text-2); }
.tip-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .tip-touch { display: inline; } .tip-mouse { display: none; } }

/* ---------- Windows ---------- */
.windows { position: absolute; inset: 0; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto;
  display: flex; flex-direction: column;
  min-width: 300px; min-height: 200px;
  background: var(--win-bg); /* opaque, no backdrop blur: re-blurring the moving wallpaper every frame is expensive */
  border: 1px solid var(--win-border); border-radius: var(--radius);
  box-shadow: var(--win-hi), var(--win-shadow-inactive);
  overflow: hidden;
  transform-origin: 50% 50%;
  transition: transform .42s var(--spring), opacity .22s ease, box-shadow .2s ease;
  outline: none;
}
.win.is-active { box-shadow: var(--win-hi), var(--win-shadow); }
.win.is-entering { opacity: 0; transform: scale(.9) translateY(12px); }
.win.is-closing { opacity: 0; transform: scale(.94); transition: transform .2s ease-in, opacity .18s ease-in; }
.win.is-geom { transition: transform .42s var(--spring), opacity .22s ease, left .34s var(--ease-out), top .34s var(--ease-out), width .34s var(--ease-out), height .34s var(--ease-out); }
.win.is-dragging { transition: none; user-select: none; }

.titlebar {
  position: relative; flex: none; height: 38px; display: flex; align-items: center;
  padding: 0 12px; gap: 8px; border-bottom: 1px solid var(--win-line);
  user-select: none; touch-action: none; cursor: default;
}
.win-title { position: absolute; left: 80px; right: 80px; margin: 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--win-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.win:not(.is-active) .win-title { opacity: .55; }
.lights { display: flex; gap: 8px; position: relative; z-index: 1; }
.light { width: 12px; height: 12px; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
.light svg { width: 8px; height: 8px; stroke: rgba(60, 10, 0, .7); stroke-width: 1.4; fill: none; stroke-linecap: round; opacity: 0; transition: opacity .12s; }
.l-close { background: #ff5f57; } .l-min { background: #febc2e; } .l-max { background: #28c840; }
.l-min svg { stroke: rgba(90, 50, 0, .75); } .l-max svg { stroke: rgba(0, 70, 10, .7); }
.lights:hover .light svg, .light:focus-visible svg { opacity: 1; }
.win:not(.is-active) .light { background: #d7cdc6; }
html[data-theme="dark"] .win:not(.is-active) .light { background: #5d5263; }
.win:not(.is-active) .lights:hover .l-close { background: #ff5f57; }
.win:not(.is-active) .lights:hover .l-min { background: #febc2e; }
.win:not(.is-active) .lights:hover .l-max { background: #28c840; }
.light:focus-visible { outline-offset: 2px; border-radius: 50%; }
.sheet-done { display: none; }

.win-body { flex: 1; min-height: 0; overflow: auto; container-type: inline-size; overscroll-behavior: contain; }
.resize-handle { position: absolute; right: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; z-index: 2; }
.win.is-max { border-radius: 10px; }
.win.is-max .resize-handle { display: none; }

/* ---------- Prose, chips, buttons ---------- */
.prose { font-family: var(--serif); font-size: 17px; line-height: 1.7; color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font); line-height: 1.25; letter-spacing: -.01em; margin: 1.6em 0 .55em; }
.prose h2 { font-size: 1.3em; } .prose h3 { font-size: 1.1em; } .prose h4 { font-size: 1em; }
.prose a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--accent); color: var(--text-2); font-style: italic; }
.prose code { font-family: var(--mono); font-size: .82em; background: var(--hover); padding: .12em .35em; border-radius: 4px; }
.prose pre { font-family: var(--mono); font-size: 13.5px; line-height: 1.55; background: #2a2230; color: #f3e6da; padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 1.2em 0; }
html[data-theme="dark"] .prose pre { background: #1d1722; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose hr { border: 0; height: 1px; background: var(--win-line); margin: 2em 0; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose strong { font-weight: 700; }

.chips, .prose .chips { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px; font-family: var(--font); }
.chips li, .prose .chips li { margin: 0; font-size: 12.5px; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--text); }

.btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px; font: 600 13px var(--font); text-decoration: none; white-space: nowrap; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }

/* ---------- About (TextEdit) ---------- */
.textedit { min-height: 100%; display: flex; flex-direction: column; }
.te-ruler { display: flex; gap: 14px; padding: 6px 16px; font-size: 11.5px; color: var(--text-3); border-bottom: 1px solid var(--win-line); font-family: var(--font); }
.te-page { padding: 26px 32px 32px; max-width: 640px; }
.te-hello { font: 600 28px/1.2 var(--display); letter-spacing: -.015em; }
.te-hello strong { font-weight: 600; color: var(--accent); }
.lede { color: var(--text-2); font-style: italic; }
.te-links { font-family: var(--font); font-size: 14px; }

/* ---------- Finder (writing) ---------- */
.finder { display: grid; grid-template-columns: 170px minmax(220px, 280px) 1fr; height: 100%; }
.f-side { background: var(--win-side); border-right: 1px solid var(--win-line); padding: 12px 8px; overflow: auto; }
.f-group { font-size: 11px; font-weight: 600; color: var(--text-3); padding: 10px 8px 4px; }
.f-group:first-child { padding-top: 0; }
.f-link { display: flex; align-items: center; gap: 8px; width: 100%; padding: 5px 8px; border-radius: 6px; font-size: 13px; text-align: left; }
.f-link:hover { background: var(--hover); }
.f-link[aria-current="true"], .f-link[aria-pressed="true"] { background: var(--select); font-weight: 600; }
.f-link svg { width: 15px; height: 15px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.f-link .tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); opacity: .65; flex: none; margin: 0 3px; }
.f-tabs { display: none; }

.f-list { border-right: 1px solid var(--win-line); display: flex; flex-direction: column; min-height: 0; }
.f-list-head { padding: 10px 14px; font-size: 12px; color: var(--text-3); border-bottom: 1px solid var(--win-line); display: flex; justify-content: space-between; gap: 8px; }
.f-list-head strong { color: var(--text); font-size: 13px; }
.f-entries { list-style: none; margin: 0; padding: 6px; overflow: auto; flex: 1; }
.f-entry { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; }
.f-entry:hover { background: var(--hover); }
.f-entry[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.f-entry[aria-current="true"] .f-date, .f-entry[aria-current="true"] .f-ex { color: inherit; opacity: .85; }
.f-title { display: block; font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.f-date { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; }
.f-ex { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.4; }
.f-empty { padding: 20px 14px; color: var(--text-3); font-size: 13px; }

.f-reader { overflow: auto; min-width: 0; background: var(--win-solid); }
.f-reader-inner { max-width: 660px; margin: 0 auto; padding: 30px 36px 48px; }
.f-backbtn { display: none; }
.post-meta { font: 12.5px var(--font); color: var(--text-3); margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.post-title { font: 600 32px/1.15 var(--display); letter-spacing: -.015em; margin: 0 0 22px; }
.post-tags { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0; }
.post-tags li { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--text-2); }
.post-actions { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--win-line); display: flex; gap: 8px; align-items: center; font-family: var(--font); }
.post-actions .copied { font-size: 12.5px; color: var(--text-3); }
.reader-empty { height: 100%; display: grid; place-items: center; color: var(--text-3); font-size: 13px; text-align: center; padding: 30px; }
.reader-empty svg { width: 44px; height: 44px; display: block; margin: 0 auto 10px; fill: none; stroke: currentColor; stroke-width: 1.4; opacity: .6; }
.reader-empty p { max-width: 30em; margin: 6px auto 0; line-height: 1.55; }
.reader-soon { display: block; font: 600 20px/1.3 var(--display); color: var(--text); }
.f-empty .reader-soon { font-size: 16px; margin-bottom: 4px; }
.soon-full { display: none; line-height: 1.5; }

@container (max-width: 700px) {
  .finder { display: flex; flex-direction: column; }
  .f-side { display: none; }
  .f-tabs { display: flex; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--win-line); background: var(--win-side); overflow-x: auto; }
  .f-tabs .f-link { width: auto; flex: none; padding: 5px 12px; border-radius: 999px; }
  .f-list, .f-reader { flex: 1; min-height: 0; }
  .f-list { border-right: 0; }
  .finder.show-reader .f-list, .finder.show-reader .f-tabs { display: none; }
  .finder:not(.show-reader) .f-reader { display: none; }
  .f-backbtn { display: inline-flex; margin-bottom: 14px; margin-left: -10px; }
  .f-reader-inner { padding: 20px 22px 40px; }
  .soon-short { display: none; }
  .soon-full { display: block; }
  .post-title { font-size: 27px; }
}

/* ---------- Projects ---------- */
.projects { padding: 18px 20px 24px; }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.pcard { display: flex; gap: 12px; width: 100%; padding: 14px; border-radius: 12px; background: var(--win-solid); border: 1px solid var(--win-line); color: inherit; text-align: left; text-decoration: none; height: 100%; transition: transform .2s var(--spring), box-shadow .2s, border-color .2s; }
a.pcard:hover, button.pcard:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(70, 35, 20, .12); border-color: var(--accent-soft); }
.pcard-go { color: var(--link); font-weight: 600; }
.pcard svg { width: 40px; height: 40px; flex: none; }
.pcard-body { min-width: 0; }
.pcard-name { font-weight: 650; font-size: 14px; display: block; overflow-wrap: anywhere; }
.pcard-desc { font-size: 12.5px; color: var(--text-2); margin: 3px 0 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard-meta { font-size: 11.5px; color: var(--text-3); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--text-2); }

/* project write-up */
.study { padding: 18px 30px 36px; max-width: 720px; margin: 0 auto; outline: none; }
.study-back { margin: 0 0 14px -10px; }
.study-kicker { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.study-title { font: 600 30px/1.15 var(--display); letter-spacing: -.015em; margin: 10px 0 8px; }
.study-lede { margin: 0 0 20px; font-size: 16px; line-height: 1.55; color: var(--text-2); }
.metrics { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.metrics li { padding: 12px 14px; border-radius: 12px; background: var(--win-solid); border: 1px solid var(--win-line); }
.metrics b { display: block; font: 600 26px/1.1 var(--display); color: var(--accent); letter-spacing: -.01em; }
.metrics span { display: block; margin-top: 4px; font-size: 12px; line-height: 1.4; color: var(--text-2); }
.study h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 24px 0 8px; }
.study p, .study li { font-size: 14.5px; line-height: 1.65; }
.study p { margin: 0 0 10px; }
.study ul:not(.chips):not(.metrics) { margin: 0 0 10px; padding-left: 1.2em; }
.study .chips { margin-top: 4px; }
@container (max-width: 520px) {
  .study { padding: 14px 18px 32px; }
  .study-title { font-size: 26px; }
  .metrics { grid-template-columns: 1fr; gap: 8px; }
  .metrics li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; }
  .metrics b { font-size: 22px; white-space: nowrap; }
  .metrics span { margin: 0; }
}

/* ---------- Resume ---------- */
.resume { padding: 28px 34px 36px; max-width: 760px; margin: 0 auto; }
.rs-head { display: flex; justify-content: space-between; gap: 16px 24px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--win-line); flex-wrap: wrap; }
.rs-name { font: 600 30px/1.15 var(--display); letter-spacing: -.02em; margin: 0; }
.rs-role { margin: 4px 0 2px; color: var(--text-2); }
.rs-links { margin: 0; font-size: 13px; }
.rs-ask { display: grid; justify-items: end; gap: 6px; }
.rs-ask-addr { font-size: 12.5px; color: var(--text-3); text-decoration: none; }
.rs-ask-addr:hover { color: var(--link); text-decoration: underline; }
.rs-summary { margin: 16px 0 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.rs-sec { margin-top: 22px; }
.rs-sec h3 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 10px; }
.rs-item + .rs-item { margin-top: 14px; }
.rs-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.rs-when { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-org { color: var(--text-2); font-size: 13.5px; }
.rs-item ul { margin: 6px 0 0; padding-left: 1.2em; }
.rs-item li { margin: 2px 0; }
.rs-item b { font-weight: 650; }
.rs-skills { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 0; }
.rs-skills dt { font-size: 12.5px; font-weight: 600; color: var(--text-2); padding-top: 5px; }
.rs-skills dd { margin: 0; }
.rs-skills .chips { margin: 0; }
@container (max-width: 520px) { .rs-skills { grid-template-columns: 1fr; gap: 4px; } .rs-skills dd { margin-bottom: 8px; } }

/* ---------- Contact ---------- */
.contact { padding: 22px 22px 18px; }
.ct-card { text-align: center; margin-bottom: 16px; }
.ct-avatar { width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; font: 600 22px var(--display); color: #fff; background: linear-gradient(145deg, #f0a35e, #c0607a); box-shadow: 0 6px 16px rgba(150, 60, 40, .3); }
.ct-name { margin: 0; font: 600 21px var(--display); }
.ct-sub { margin: 2px 0 0; color: var(--text-3); font-size: 13px; }
.ct-list { list-style: none; margin: 0; padding: 0; border-radius: 10px; background: var(--win-solid); border: 1px solid var(--win-line); overflow: hidden; }
.ct-list li + li { border-top: 1px solid var(--win-line); }
.ct-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; text-decoration: none; color: var(--text); }
.ct-row:hover { background: var(--hover); }
.ct-k { color: var(--text-2); font-size: 13px; }
.ct-v { font-weight: 600; font-size: 13px; color: var(--link); overflow-wrap: anywhere; text-align: right; }
.ct-note { text-align: center; font-size: 12px; color: var(--text-3); margin: 14px 0 0; }

/* ---------- Terminal ---------- */
.win.is-terminal { background: #1c1720; border-color: rgba(255, 255, 255, .1); }
.win.is-terminal .titlebar { border-bottom-color: rgba(255, 255, 255, .07); }
.win.is-terminal .win-title { color: #d9cfc6; }
.term { min-height: 100%; padding: 10px 12px 14px; font: 13px/1.5 var(--mono); color: #eadfd5; cursor: text; }
.term-out { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-out .t-dim { color: #a3968c; }
.term-out .t-acc { color: #f5ad73; }
.term-out .t-ok { color: #9fd89a; }
.term-out .t-err { color: #ff8f80; }
.term-out .t-dir { color: #8fc3ff; font-weight: 700; }
.term-line { display: flex; gap: 8px; }
.term-ps { color: #9fd89a; white-space: nowrap; }
.term-ps b { color: #8fc3ff; font-weight: 400; }
.term-in { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit; font: inherit; caret-color: #f5ad73; padding: 0; }

/* ---------- Dock ---------- */
.dock { position: fixed; left: 50%; bottom: 8px; transform: translateX(-50%); z-index: 4000; }
.dock-list {
  list-style: none; margin: 0; padding: 6px 8px; display: flex; align-items: flex-end; gap: 4px; height: 66px;
  background: var(--dock-bg); border: 1px solid var(--dock-border); border-radius: 20px;
  -webkit-backdrop-filter: blur(26px) saturate(1.6); backdrop-filter: blur(26px) saturate(1.6);
  box-shadow: 0 10px 30px rgba(60, 25, 15, .18);
}
.dock-list > li { display: flex; align-items: flex-end; }
.dock-item {
  --s: 1; position: relative; width: calc(52px * var(--s)); height: calc(52px * var(--s));
  display: block; transition: width .18s var(--ease-out), height .18s var(--ease-out); touch-action: manipulation;
}
.dock-list.is-magnifying .dock-item { transition: width .06s linear, height .06s linear; }
.dock-item > svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 5px rgba(30, 10, 0, .25)); }
.dock-item:active > svg { filter: drop-shadow(0 3px 5px rgba(30, 10, 0, .25)) brightness(.85); }
.dock-item:focus-visible { outline-offset: 3px; border-radius: 14px; }
.dock-tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(4px);
  padding: 3px 10px; border-radius: 6px; font-size: 12.5px; white-space: nowrap; pointer-events: none;
  background: var(--dd-bg); color: var(--text); border: 1px solid var(--win-border); box-shadow: 0 6px 16px rgba(0, 0, 0, .15);
  opacity: 0; transition: opacity .12s, transform .12s;
}
.dock-item:hover .dock-tip, .dock-item:focus-visible .dock-tip { opacity: 1; transform: translateX(-50%); }
.dock-dot { position: absolute; bottom: -5px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity .2s; }
.dock-item.is-running .dock-dot { opacity: .7; }
.dock-sep { width: 1px; align-self: stretch; margin: 4px; background: var(--dock-sep); }
/* minimised windows: a tiny copy of the window with the app's icon as a badge */
.dock-min .mini { position: relative; display: block; width: 100%; height: 100%; transition: opacity .18s; }
.mini-thumb { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(calc(var(--k) * var(--s, 1))); pointer-events: none; }
.mini-thumb > .win { box-shadow: 0 30px 60px rgba(40, 15, 5, .35); }
.mini-badge { position: absolute; right: -4%; bottom: -4%; width: 44%; height: 44%; }
.mini-badge svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(30, 10, 0, .3)); }
.dock-min.is-arriving .mini, .dock-min.is-leaving .mini { opacity: 0; }
.dock-min.is-new > .dock-item { animation: slot-open .3s var(--ease-out); }
.dock-min.is-leaving > .dock-item { animation: slot-close .28s var(--ease-out) forwards; }
@keyframes slot-open { from { width: 0; } }
@keyframes slot-close { to { width: 0; } }
/* the genie: strips of a window pouring into the dock (see genie() in app.js) */
.genie { position: fixed; inset: 0; z-index: 4500; pointer-events: none; }
.genie-strip { position: absolute; overflow: hidden; transform-origin: 0 0; will-change: transform; }
.genie .win, .mini-thumb > .win { pointer-events: none; }
.dock-item.bounce > svg { animation: bounce .6s var(--ease-out); }
@keyframes bounce { 30% { transform: translateY(-14px); } 60% { transform: translateY(0); } 80% { transform: translateY(-4px); } }

/* dock artwork */
.finder-r { fill: #e9f1fb; opacity: .95; }
.finder-eye { stroke: #1d2b3a; stroke-width: 3.2; stroke-linecap: round; }
.finder-smile { fill: none; stroke: #1d2b3a; stroke-width: 2.6; stroke-linecap: round; }
.notes-bg { fill: #fffaf0; }
.notes-lines { stroke: #e6dccb; stroke-width: 1.6; }
.notes-dots { stroke: rgba(120, 70, 0, .35); stroke-width: 3; stroke-linecap: round; }
.book-cover { fill: #f2e2c8; }
.book-spine { stroke: #c9a982; stroke-width: 2; }
.book-mark { fill: #d4573a; }
.cv-page { fill: #fff; }
.cv-avatar { fill: #e8b48f; }
.cv-lines { stroke: #cdbcad; stroke-width: 2; stroke-linecap: round; }
.term-edge { fill: none; stroke: rgba(255, 255, 255, .12); }
.term-prompt { fill: none; stroke: #f0f0f0; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.mail-env { fill: #fff; }
.mail-flap { fill: none; stroke: #9ec5f0; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }

/* ---------- noscript & 404 ---------- */
.noscript-card, .nf-card {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 32px));
  background: var(--win-bg); border: 1px solid var(--win-border); border-radius: var(--radius); box-shadow: var(--win-hi), var(--win-shadow);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px); z-index: 6000; overflow: hidden;
}
.noscript-card { padding: 22px 24px; }
.noscript-card h2 { margin: 0 0 8px; font: 600 24px var(--display); }
.nf-body { padding: 26px 26px 24px; text-align: center; }
.nf-body svg { width: 72px; height: 72px; }
.nf-body h1 { font: 600 24px/1.2 var(--display); margin: 10px 0 6px; }
.nf-body p { color: var(--text-2); margin: 0 0 18px; }

/* ---------- Mobile: home screen + sheets ---------- */
@media (max-width: 767px) {
  :root {
    --mb-h: 34px;
    --wall-img: url("/assets/img/wallpaper-mobile.webp");
    --wall-pos: 50% 50%;
    --wall-fallback: #5a4933;
    /* darker at the top so the status bar and the name read on the bright window */
    --wall-shade: linear-gradient(to bottom, rgba(32, 16, 6, .62) 0, rgba(32, 16, 6, .38) 34%, rgba(32, 16, 6, 0) 58%, rgba(32, 16, 6, .3) 100%);
    --wall-scrim: none;
  }
  .menubar { padding: 0 16px; padding-top: env(safe-area-inset-top); height: calc(var(--mb-h) + env(safe-area-inset-top)); border-bottom: 0; background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; justify-content: flex-start; gap: 8px; color: #fff8f0; }
  .mb-menus, .mb-logo, .mb-name { display: none; }
  .mb-right { flex: 1; justify-content: space-between; flex-direction: row-reverse; }
  .mb-clock { padding: 0; font-weight: 600; font-size: 14px; }
  .mb-clock .clock-date { display: none; }
  .mb-icon:hover { background: none; }

  .desktop { top: calc(var(--mb-h) + env(safe-area-inset-top)); overflow-y: auto; overflow-x: hidden; padding: 6px 20px calc(var(--dock-h) + 40px + env(safe-area-inset-bottom)); }
  body.has-sheet .desktop { z-index: 6000; overflow: hidden; }
  body.has-sheet .wall, body.has-sheet .wall::after { animation-play-state: paused; }

  .hero { position: static; max-width: none; margin: 4px 2px 22px; }
  .hero-kicker { font-size: 11.5px; }
  .hero-name { font-size: 46px; }
  .hero-role { font-size: 16px; margin-top: 8px; }
  .hero-cta { display: none; } /* the icons below are the buttons on a phone */

  .widget { position: relative; top: auto; left: auto; width: auto; transform: none; border-radius: 20px; padding: 16px 18px; margin: 0 0 24px; box-shadow: 0 10px 24px rgba(40, 20, 6, .25); }
  .widget::before, .widget-tip { display: none; }
  .icons { position: static; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 8px; }
  .icon { width: 100%; padding: 0; }
  .icon-img { width: 62px; height: 62px; }
  .icon-label { font-size: 11.5px; padding: 1px 4px; color: #fff8f0; background: none; text-shadow: 0 1px 3px rgba(20, 8, 2, .85); }
  .icon:hover .icon-img { transform: none; }
  .icon:hover .icon-label { background: none; color: #fff8f0; text-shadow: 0 1px 3px rgba(20, 8, 2, .85); }

  .dock { bottom: calc(10px + env(safe-area-inset-bottom)); width: calc(100% - 24px); max-width: 400px; }
  .dock-list { justify-content: space-around; height: 80px; padding: 12px 14px; border-radius: 28px; gap: 0; }
  .dock-desk-only, .dock-sep, .dock-min { display: none !important; }
  .dock-item { width: 56px !important; height: 56px !important; }
  .dock-tip, .dock-dot { display: none; }

  .windows { position: fixed; inset: 0; z-index: 7000; }
  .win {
    left: 0 !important; right: 0; bottom: 0; top: calc(env(safe-area-inset-top) + 10px) !important;
    width: 100% !important; height: auto !important; min-width: 0; min-height: 0;
    border-radius: 16px 16px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    background: var(--win-solid);
    box-shadow: 0 -10px 40px rgba(40, 15, 5, .25);
    transition: transform .42s cubic-bezier(.2, .9, .25, 1), opacity .2s;
  }
  .win.is-entering { opacity: 1; transform: translateY(100%); }
  .win.is-closing { opacity: 1; transform: translateY(100%); transition: transform .3s cubic-bezier(.5, 0, .8, .4); }
  .win.is-max { border-radius: 16px 16px 0 0; }
  .titlebar { height: 50px; padding: 0 8px 0 16px; touch-action: auto; }
  .titlebar::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: rgba(127, 110, 100, .35); }
  .lights, .resize-handle { display: none; }
  .win-title { left: 70px; right: 70px; font-size: 15px; top: 16px; }
  .sheet-done { display: inline-flex; margin-left: auto; height: 36px; align-items: center; padding: 0 10px; font-weight: 600; font-size: 15px; color: var(--link); border-radius: 8px; }
  .win.is-terminal .sheet-done { color: #f5ad73; }
  .win.is-terminal { background: #1c1720; }
  .te-page { padding: 20px 20px 40px; }
  .resume { padding: 20px 20px 40px; }
  .rs-name { font-size: 26px; }
  .rs-ask { justify-items: stretch; width: 100%; }
  .rs-ask .btn { justify-content: center; height: 42px; font-size: 14px; }
  .rs-ask-addr { text-align: center; }
  .projects { padding: 16px; }
  .cards { grid-template-columns: 1fr; }
  .term-in { font-size: 16px; } /* prevents iOS zoom on focus */
}

/* ---------- Entrance ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.92); } }
@keyframes note-in { from { opacity: 0; transform: translateY(-18px) rotate(-6deg); } }
@keyframes dock-in { from { opacity: 0; transform: translate(-50%, 18px); } }
.hero > * { animation: rise .9s var(--ease-out) both; }
.hero > :nth-child(1) { animation-delay: .15s; }
.hero > :nth-child(2) { animation-delay: .25s; }
.hero > :nth-child(3) { animation-delay: .4s; }
.hero > :nth-child(4) { animation-delay: .55s; }
.icons > li { animation: pop .6s var(--spring) both; }
.icons > li:nth-child(1) { animation-delay: .35s; }
.icons > li:nth-child(2) { animation-delay: .41s; }
.icons > li:nth-child(3) { animation-delay: .47s; }
.icons > li:nth-child(4) { animation-delay: .53s; }
.icons > li:nth-child(5) { animation-delay: .59s; }
.icons > li:nth-child(6) { animation-delay: .65s; }
.widget { animation: note-in .8s var(--spring) .2s both; }
.dock { animation: dock-in .7s var(--ease-out) .3s both; }
@media (max-width: 767px) { .widget { animation-name: rise; } }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .wall { animation: none; }
  .win.is-entering { transform: none; }
}
