/* Styles for kwametaylor.github.io.
   Order: color and type tokens, shared parts (menu bar, windows), then one block per page. */

:root {
  --bg: #ffffff;        /* desktop */
  --dot: #cfcfcf;       /* dot grid on the desktop */
  --ink: #111111;       /* text */
  --mute: #6a6a6a;      /* secondary text */
  --win: #ffffff;       /* window fill */
  --win-ink: #111111;   /* text inside windows */
  --win-mute: #6a6a6a;
  --win-rule: #d9d6cf;
  --line: #111111;      /* window borders */
  --chrome: #111111;    /* title bar box and stripes */
  --shadow: #111111;    /* hard window shadow */
  --rule: #d9d6cf;      /* hairlines inside windows */
  --sel: #ffe24a;       /* the one highlight color */
  --on-sel: #111111;    /* text on the highlight */
  --photo: #111111;     /* portrait placeholder fill */
  --photo-line: #ffffff;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --gut: max(16px, 3vw);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151515; --dot: #2b2b2b; --ink: #efede7; --mute: #9b9890; --win: #f3efe2; --win-ink: #111111; --win-mute: #5f5c56; --win-rule: #d6d1c3; --line: #111111;
    --chrome: #111111; --shadow: #000000; --rule: #3b3a37; --photo: #0f0f0f; --photo-line: #efede7;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #151515; --dot: #2b2b2b; --ink: #efede7; --mute: #9b9890; --win: #f3efe2; --win-ink: #111111; --win-mute: #5f5c56; --win-rule: #d6d1c3; --line: #111111;
    --chrome: #111111; --shadow: #000000; --rule: #3b3a37; --photo: #0f0f0f; --photo-line: #efede7;
  color-scheme: dark;
}

@view-transition { navigation: auto; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg) radial-gradient(var(--dot) 1px, transparent 1.2px) 0 0 / 14px 14px;
  color: var(--ink); font: 400 17px/1.4 var(--serif);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--sel); color: var(--on-sel); padding: 6px 10px; z-index: 100; }
.skip:focus { left: 8px; }
.mute { color: var(--mute); }
mark { background: var(--sel); color: var(--on-sel); padding: 0 .12em; }
kbd { font: inherit; border: 1px solid; padding: 0 4px; margin-right: 3px; }

/* Menu bar */
.bar {
  position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1.5px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 7px var(--gut);
}
.bar nav { display: flex; gap: 2px clamp(6px, 1.6vw, 22px); flex-wrap: wrap; align-items: baseline; margin-left: -6px; }
.bar nav a { padding: 0 6px; }
.bar .me { font-weight: 600; }
.bar nav a:hover, .bar nav a[aria-current="page"] { background: var(--sel); color: var(--on-sel); }
.bar .r { display: flex; gap: 14px; align-items: baseline; color: var(--mute); white-space: nowrap; }
.bar button { border: 1px solid var(--mute); background: none; padding: 6px 10px 2px 8px; line-height: 1; cursor: pointer; color: var(--mute); font-size: 14px; align-self: center; }
.bar button:hover { background: var(--sel); color: var(--on-sel); border-color: var(--on-sel); }

/* Windows */
.win, dialog, .dock button { background: var(--win); color: var(--win-ink); --ink: var(--win-ink); --mute: var(--win-mute); --rule: var(--win-rule); --bg: var(--win); }
.win { border: 1.5px solid var(--line); box-shadow: 5px 5px 0 var(--shadow); }
.tb { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-bottom: 1.5px solid var(--line); font-size: 15px; user-select: none; }
.tb::before { content: ""; width: 11px; height: 11px; border: 1.5px solid var(--chrome); flex: none; }
.tb::after { content: ""; flex: 1; height: 9px; background: repeating-linear-gradient(var(--chrome) 0 1.5px, transparent 1.5px 3.5px); order: 1; }
.tb .x { order: 2; border: 1.5px solid var(--chrome); background: none; width: 18px; height: 18px; line-height: 1; padding: 0; cursor: pointer; font-size: 15px; display: grid; place-items: center; flex: none; }
.tb .x:hover, .tb .x:focus-visible { background: var(--sel); color: var(--on-sel); }
.win.min { display: none; }
/* Windows that start in the taskbar stay hidden even if a script fails; restoring one removes data-start */
.desk .win[data-start="min"] { display: none; }
/* Taskbar on the home page: start menu, minimized windows, clock */
body[data-page="home"] .foot { display: none; }
body[data-page="home"] .desk { min-height: calc(100vh - 42px - 44px); margin-bottom: 44px; overflow: clip; }
.taskbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: 44px; display: flex; align-items: center; gap: 10px; padding: 0 var(--gut); border-top: 1.5px solid var(--line); background: var(--win); color: var(--win-ink); --ink: var(--win-ink); --mute: var(--win-mute); }
.start { position: relative; flex: none; }
#startbtn { border: 0; background: var(--ink); color: var(--win); font: 600 16px/1 var(--serif); padding: 8px 14px; cursor: pointer; }
#startbtn:hover, #startbtn[aria-expanded="true"] { background: var(--sel); color: var(--on-sel); }
.startmenu { position: absolute; left: 0; bottom: calc(100% + 8px); min-width: 210px; background: var(--win); border: 1.5px solid var(--line); box-shadow: 5px 5px 0 var(--shadow); padding: 6px 0; display: flex; flex-direction: column; }
.startmenu[hidden] { display: none; }
.startmenu a { padding: 6px 16px; font-size: 18px; }
.startmenu a:hover, .startmenu a:focus-visible { background: var(--sel); color: var(--on-sel); outline: 0; }
.startmenu hr { border: 0; border-top: 1px solid var(--win-rule); margin: 6px 0; }
.dock { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dock button { flex: none; border: 1.5px solid var(--line); background: var(--win); color: var(--ink); padding: 4px 12px; font-size: 15px; cursor: pointer; display: flex; align-items: center; gap: 8px; animation: pop .25s both; }
.dock button i { display: none; }
.dock button::before { content: ""; width: 9px; height: 9px; border: 1.5px solid currentColor; flex: none; }
.dock button:hover, .dock button:focus-visible { background: var(--sel); color: var(--on-sel); outline: 0; }
.tclock { flex: none; color: var(--mute); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.st a:hover { background: var(--sel); color: var(--on-sel); }
.st { border-top: 1.5px solid var(--line); padding: 5px 12px; font-size: 14px; color: var(--mute); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.photo { aspect-ratio: 4 / 5; background: var(--photo); position: relative; overflow: hidden; }
.photo::before { content: ""; position: absolute; left: 28%; right: 28%; top: 18%; height: 40%; border: 1px solid var(--photo-line); border-radius: 50%; }
.photo::after { content: ""; position: absolute; left: 10%; right: 10%; bottom: -1px; height: 32%; border: 1px solid var(--photo-line); border-radius: 50% 50% 0 0; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo.has::before, .photo.has::after { display: none; }
.cta {
  display: inline-block; font: italic 400 clamp(24px, 2.4vw, 38px)/1 var(--serif); letter-spacing: -.02em;
  background: var(--sel); color: var(--on-sel); padding: .25em .5em; border: 1.5px solid var(--on-sel); cursor: pointer;
}
.cta b { display: inline-block; font-weight: 400; transition: transform .25s; }
.cta:hover b, .cta:focus-visible b { transform: translateX(.25em); }
.link { border-bottom: 2px solid var(--sel); }
.link:hover { background: var(--sel); color: var(--on-sel); }

/* Rotating phrase */
.swap { display: inline-grid; overflow: clip; vertical-align: bottom; background: var(--sel); color: var(--on-sel); font-style: italic; padding: 0 .15em; }
.swap span { grid-area: 1 / 1; white-space: nowrap; }
.swap .sz { visibility: hidden; }
.swap .on { transition: transform .38s cubic-bezier(.7, 0, .2, 1); }
.swap .on.out { transform: translateY(-115%); }
.swap .on.in { transform: translateY(115%); transition: none; }

/* Footer */
.foot { border-top: 1.5px solid var(--line); background: var(--bg); padding: 9px var(--gut); font-size: 14px; color: var(--mute); display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.foot a:hover { background: var(--sel); color: var(--on-sel); }
.foot span + span { display: flex; gap: 16px; }

/* Home: the desktop */
.desk { position: relative; flex: 1; min-height: max(calc(100vh - 84px), 620px); }
.hero { position: absolute; left: var(--gut); top: 4%; z-index: 1; }
.hero h1 { font-weight: 400; font-size: clamp(52px, 8.6vw, 150px); line-height: .84; letter-spacing: -.045em; max-width: 4.6em; }
.hero h1 em { font-weight: 300; }
.hero h1 small { font-size: .15em; letter-spacing: .14em; font-weight: 600; vertical-align: .45em; white-space: nowrap; }
.lead { font-size: clamp(20px, 2.1vw, 32px); line-height: 1.15; margin-top: .7em; max-width: 22ch; }
.desk .win { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); animation: pop .35s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(var(--k) * 90ms); }
.desk .win.drag { box-shadow: 10px 10px 0 var(--shadow); z-index: 40; }
.desk .tb { cursor: grab; touch-action: none; }
.files a { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; gap: 8px; padding: 4px 12px; font-size: clamp(18px, 1.6vw, 24px); align-items: baseline; }
.files a small { font-size: 14px; color: var(--mute); }
.files a::before { content: ""; width: .62em; height: .74em; border: 1.5px solid currentColor; align-self: center; background: linear-gradient(225deg, currentColor 0 22%, transparent 22%); }
.files a.cur { background: var(--sel); color: var(--on-sel); }
.files a.cur small { color: var(--on-sel); }
.svc a { display: block; padding: 7px 12px; border-bottom: 1px solid var(--rule); font-size: clamp(16px, 1.35vw, 20px); }
.svc a:hover { background: var(--sel); color: var(--on-sel); }
.more { display: block; padding: 7px 12px; border-top: 1.5px solid var(--line); margin-top: -1px; font-size: 14px; color: var(--mute); }
.more:hover { background: var(--sel); color: var(--on-sel); }
.fig { padding: 14px 14px 10px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding-left: 4px; }
.bars i { flex: 1; background: var(--ink); height: calc(var(--h) * 1%); transform-origin: bottom; animation: grow .6s both; animation-delay: calc(var(--i) * 25ms + .5s); }
.bars i:last-child { background: var(--sel); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.fig p { margin-top: 8px; font-size: 14px; line-height: 1.25; color: var(--mute); }
.fig p b { display: block; color: var(--ink); font-weight: 600; font-size: 16px; }
.k { font-size: 14px; color: var(--mute); margin-top: 8px; }
.body > .k { margin-top: 10px; }
/* Sticky note */
.note { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: calc(var(--w) * 1%); min-width: 170px; aspect-ratio: 1; background: var(--sel); color: var(--on-sel); padding: 14px 16px 18px; display: flex; flex-direction: column; justify-content: space-between; transform: rotate(-3deg); box-shadow: 0 14px 20px -12px rgba(0, 0, 0, .55); transition: transform .2s; cursor: grab; touch-action: none; user-select: none; animation: pop .35s both cubic-bezier(.2, .8, .2, 1); animation-delay: calc(var(--k) * 90ms); }
.note small { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .7; }
.note span { font: italic 400 clamp(28px, 2.6vw, 42px)/1 var(--serif); letter-spacing: -.02em; }
.note b { display: inline-block; font-weight: 400; transition: transform .25s; }
.note:hover { transform: rotate(-1deg) scale(1.03); }
.note:hover b, .note:focus-visible b { transform: translateX(.25em); }
.note.drag { transition: none; cursor: grabbing; z-index: 40; }
/* Card preview */
.cardwrap { padding: 14px; }
.face.b .cap { position: absolute; left: 10px; top: 8px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute); }
.face.b { position: absolute; }
.flip { perspective: 900px; border: 0; background: none; padding: 0; width: 100%; display: block; cursor: pointer; }
.card { display: block; position: relative; aspect-ratio: 7 / 4; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, .7, .2, 1); }
.flip[aria-pressed="true"] .card { transform: rotateY(180deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; border: 1.5px solid var(--line); background: var(--win); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; }
.face.b { transform: rotateY(180deg); flex-direction: row; align-items: flex-end; gap: 10px; padding: 16px; }
.face b { font-weight: 400; font-size: clamp(20px, 1.8vw, 26px); letter-spacing: -.02em; }
.face small { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.mini { flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 44px; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); padding-left: 3px; }
.mini i { flex: 1; background: var(--ink); height: calc(var(--h) * 1%); }
.mini i:last-child { background: var(--sel); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
/* Specimen */
.aa { font-size: clamp(64px, 6.4vw, 104px); line-height: .9; letter-spacing: -.04em; font-weight: var(--w, 400); margin-bottom: 8px; }
input[type="range"] { width: 100%; accent-color: var(--ink); margin: 0; }
/* Design folder */
.folder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.folder a { display: block; text-align: center; font-size: 13px; color: var(--mute); }
.folder a i { display: grid; place-items: center; aspect-ratio: 1; border: 1.5px solid var(--line); font-style: normal; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.04em; color: var(--ink); margin-bottom: 4px; transition: background .15s; }
.folder a i.k { background: var(--photo); color: var(--photo-line); }
.folder a:hover i, .folder a:focus-visible i { background: var(--sel); color: var(--on-sel); }
/* Swatches */
.sw { display: flex; gap: 6px; flex-wrap: wrap; }
.sw button { width: 34px; height: 34px; border: 1.5px solid var(--line); background: var(--c); cursor: pointer; }
.sw button[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 2px; }
/* Save file */
.slot { border: 1.5px solid var(--line); padding: 9px 12px; display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin-bottom: 8px; font-size: 16px; }
.slot b { grid-column: 1 / 3; font-weight: 600; }
.slot .k { margin: 0; }
.slot.e { color: var(--mute); border-style: dashed; }
.slot.on { background: var(--sel); color: var(--on-sel); }
.slot.on .k { color: var(--on-sel); }
/* Before and after */
.ba { position: relative; font: 13px/1.9 ui-monospace, "SF Mono", Menlo, Consolas, monospace; border-bottom: 1.5px solid var(--line); overflow: hidden; }
.ba pre { margin: 0; padding: 10px 14px; white-space: pre; overflow: hidden; }
.ba .after { position: absolute; inset: 0; background: var(--sel); color: var(--on-sel); clip-path: inset(0 calc(100% - var(--p, 50) * 1%) 0 0); }
.ba::after { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--p, 50) * 1%); width: 2px; margin-left: -1px; background: var(--ink); }
/* Terminal */
.termwin { resize: both; overflow: hidden; min-width: 240px; min-height: 160px; height: 232px; display: flex; flex-direction: column; }
.term { background: #111111; color: #efede7; font: 13px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 12px 14px; flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
#tout { flex: 1; overflow-y: auto; min-height: 0; }
.term p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.term p b { color: var(--sel); font-weight: 400; }
.term form { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.term input { flex: 1; background: none; border: 0; color: var(--sel); min-width: 0; padding: 0; outline: 0; }
.term label { color: #9b9890; }
.hello { display: block; padding: 14px 20px; background: var(--sel); color: var(--on-sel); font: italic 400 clamp(30px, 3.4vw, 56px)/1 var(--serif); letter-spacing: -.02em; }
.hello b { display: inline-block; font-weight: 400; transition: transform .25s; }
.hello:hover b, .hello:focus-visible b { transform: translateX(.3em); }

/* Inner pages: one window with room around it */
.page { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: clamp(18px, 3.5vh, 36px) var(--gut) 40px; }
.page.wide { max-width: 1160px; }
.page.svcpage { max-width: 1320px; }
.page.svcpage .cols { grid-template-columns: minmax(0, 7fr) minmax(0, 3.4fr); }
.page.svcpage .split { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 3vw; }
.page > .win { animation: pop .35s both cubic-bezier(.2, .8, .2, 1); }
.body { padding: clamp(18px, 3vw, 40px); }
.h { font-weight: 400; font-size: clamp(40px, 4.8vw, 74px); line-height: .9; letter-spacing: -.04em; }
.intro { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.25; max-width: 26ch; margin-top: .8em; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4vw; }
.split .l { display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }

/* Services */
.rows > li { border-top: 1.5px solid var(--line); }
.rows > li:last-child { border-bottom: 1.5px solid var(--line); }
.rows button { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto; gap: 12px; align-items: baseline; width: 100%; text-align: left; border: 0; background: none; padding: clamp(8px, 1.2vh, 14px) 10px; cursor: pointer; }
.rows b { font-weight: 400; font-size: clamp(22px, 2.1vw, 30px); line-height: 1.05; letter-spacing: -.02em; display: block; }
.rows button small, .rows button span span { color: var(--mute); font-size: 15px; }
.rows button:hover, .rows li.cur > button { background: var(--sel); color: var(--on-sel); }
.rows button:hover small, .rows button:hover span span, .rows li.cur > button small, .rows li.cur > button span span { color: var(--on-sel); }
.rows i { font-style: normal; font-size: 22px; transition: transform .2s; }
.rows li.open i { transform: rotate(90deg); }
.rows .inc { display: none; padding: 6px 10px 18px calc(2.2em + 22px); }
.rows li.open .inc { display: block; }
.rows .inc li { padding: 5px 0; border-bottom: 1px solid var(--rule); }
.rows .inc a { display: inline-block; margin-top: 12px; }

/* Projects: list on the left, the chosen project on the right */
.panes { display: grid; grid-template-columns: minmax(210px, 3fr) minmax(0, 8fr); min-height: min(54vh, 520px); }
.side { border-right: 1.5px solid var(--line); padding: 10px 0; }
.side h2 { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); padding: 4px 14px 8px; }
.side button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.15; cursor: pointer; }
.side button::before { content: ""; width: .62em; height: .74em; border: 1.5px solid currentColor; background: linear-gradient(225deg, currentColor 0 22%, transparent 22%); flex: none; }
.side button:hover, .side button.cur { background: var(--sel); color: var(--on-sel); }
.view { padding: clamp(18px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 4fr); gap: 3vw; align-content: start; }
.view .h { font-size: clamp(34px, 4.6vw, 72px); }
.meta { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin-bottom: 12px; }
.view .t { font-size: 20px; line-height: 1.3; margin-top: 16px; max-width: 34ch; }
body[data-page="projects"] .page > .h { font-size: clamp(36px, 4.2vw, 64px); }
body[data-page="projects"] .view .h { font-size: clamp(30px, 4vw, 60px); }
body[data-page="projects"] .view .t { font-size: 18px; }
body[data-page="projects"] .side button { font-size: clamp(15px, 1.3vw, 19px); }
body[data-page="projects"] .meta { font-size: 12px; }
body[data-page="projects"] .cta { font-size: clamp(20px, 2vw, 32px); }
.view .go { grid-column: 1 / 3; margin-top: 6px; }
.shot { border: 1.5px solid var(--line); aspect-ratio: 4 / 3; position: relative; overflow: hidden; align-self: start; display: flex; align-items: flex-end; gap: 4px; padding: 14px 14px 30px; }
.shot i { flex: 1; background: var(--ink); height: calc(var(--h) * 1%); transition: height .4s cubic-bezier(.2, .8, .2, 1); }
.shot i:last-of-type { background: var(--sel); outline: 1.5px solid var(--ink); outline-offset: -1.5px; }
.shot span { position: absolute; left: 14px; bottom: 7px; font-size: 13px; color: var(--mute); }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Design work */
.ghead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 1.5px solid var(--line); background: none; padding: 2px 12px; cursor: pointer; }
.chips button:hover, .chips button[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--on-sel); }
.gal { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(110px, 13vw, 180px); gap: 14px; grid-auto-flow: dense; }
.tile { border: 1.5px solid var(--line); background: var(--win); color: var(--ink); cursor: pointer; position: relative; display: grid; place-items: center; font-size: clamp(40px, 6vw, 88px); letter-spacing: -.04em; padding: 0; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.k { background: var(--photo); color: var(--photo-line); }
.tile.y { background: var(--sel); color: var(--on-sel); }
.tile:hover, .tile:focus-visible { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--shadow); }
.tile .cap { position: absolute; left: 8px; bottom: 6px; font-size: 13px; letter-spacing: 0; opacity: .8; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile[hidden] { display: none; }
dialog { border: 1.5px solid var(--line); background: var(--win); color: var(--ink); padding: 0; box-shadow: 8px 8px 0 var(--shadow); width: min(92vw, 780px); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
dialog .tb button { border: 0; background: none; cursor: pointer; padding: 0 4px; order: 3; }
dialog .tb button:hover { background: var(--sel); color: var(--on-sel); }
dialog .big { aspect-ratio: 4 / 3; display: grid; place-items: center; font-size: clamp(90px, 18vw, 220px); letter-spacing: -.04em; position: relative; }
dialog .big img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--win); }

/* About */
.cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: start; }
.sidecol { display: grid; gap: 30px; }
.doc p { font-size: 20px; line-height: 1.4; max-width: 34em; margin-top: .8em; }
.doc h2 { font-weight: 400; font-style: italic; font-size: clamp(22px, 2vw, 30px); margin: 1.8em 0 .5em; }
.xp li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; padding: 12px 0; border-top: 1px solid var(--rule); align-items: baseline; }
.xp li:last-child { border-bottom: 1px solid var(--rule); }
.xp b { font-weight: 400; font-size: clamp(20px, 1.9vw, 28px); letter-spacing: -.01em; line-height: 1.1; }
.xp .when { color: var(--mute); font-size: 15px; white-space: nowrap; }
.xp span:not(.when) { grid-column: 1 / 3; }
.xp p { grid-column: 1 / 3; font-size: 17px; color: var(--mute); margin: 2px 0 0; }
.plain li { padding: 8px 0; border-top: 1px solid var(--rule); font-size: 19px; }
.plain li:last-child { border-bottom: 1px solid var(--rule); }
.bm a { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.bm a:hover { background: var(--sel); color: var(--on-sel); }
.bm li.mute { padding: 8px 12px; font-size: 15px; }

/* Contact */
.compose .f { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); border-bottom: 1px solid var(--rule); align-items: center; }
.compose label { padding: 10px 10px 10px 14px; color: var(--mute); font-size: 15px; }
.compose input { border: 0; padding: 10px 8px; background: none; min-width: 0; width: 100%; }
.compose textarea { display: block; width: 100%; border: 0; padding: 14px; min-height: 200px; resize: vertical; background: none; }
.compose input:focus-visible, .compose textarea:focus-visible { outline: 2px solid var(--sel); outline-offset: -2px; }
.compose .st { align-items: center; }
.compose .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn { border: 1.5px solid var(--on-sel); background: var(--sel); color: var(--on-sel); padding: 4px 16px; cursor: pointer; font-size: 18px; }
.btn:hover b { transform: translateX(.25em); }
.btn b { display: inline-block; font-weight: 400; transition: transform .25s; }
.btn[disabled] { opacity: .5; cursor: default; }

/* Not found: the pages orbit the message; a body stops when the pointer is on it */
.orbit { position: relative; flex: 1; min-height: max(calc(100vh - 84px), 520px); overflow: hidden; }
.orbit .ctr { position: absolute; left: 50%; top: 48%; transform: translate(-50%, -50%); text-align: center; z-index: 10; width: min(90%, 620px); }
.orbit .ctr .h { font-size: clamp(44px, 7.4vw, 124px); }
.orbit .ctr p { margin-top: 12px; color: var(--mute); font-size: 13px; letter-spacing: .3em; text-transform: uppercase; }
.orbit .ctr .cta { margin-top: 22px; }
.ring { position: absolute; left: 50%; top: 48%; border: 1px solid var(--ink); border-radius: 50%; transform: translate(-50%, -50%); opacity: .3; transition: opacity .2s; }
.ring.on { opacity: 1; }
.planet { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 12px; will-change: transform; }
.planet u { display: block; width: calc(var(--d) * 1px); height: calc(var(--d) * 1px); border-radius: 50%; background: var(--ink); border: 1.5px solid var(--ink); transition: transform .25s cubic-bezier(.2, .8, .2, 1), background .2s; flex: none; }
.planet span { font-size: clamp(20px, 2.2vw, 32px); font-style: italic; white-space: nowrap; background: var(--bg); padding: 0 .15em; }
.planet:hover u, .planet:focus-visible u { transform: scale(1.2); background: var(--sel); border-color: var(--on-sel); }
.planet:hover span, .planet:focus-visible span { background: var(--sel); color: var(--on-sel); }

@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(10px); } }
@keyframes grow { from { transform: scaleY(0); } }

/* Tablet and phone: windows stack in reading order */
@media (max-width: 900px) {
  .bar .r #clock { display: none; }
  .tclock { display: none; }
  body[data-page="home"] .desk { overflow: visible; }
  .desk { display: flex; flex-direction: column; gap: 20px; padding: 20px var(--gut) 28px; min-height: 0; }
  .hero { position: static; margin-bottom: 4px; }
  .hero h1 { font-size: clamp(52px, 17vw, 120px); }
  .desk .win { position: relative; left: auto; top: auto; width: auto; }
  .desk .win.p { width: min(72%, 320px); }
  .desk .tb { cursor: default; }
  .note { position: relative; left: auto; top: auto; width: 56%; transform: rotate(-2deg); margin: 6px 0 10px; cursor: default; }
  .termwin { resize: none; height: 260px; }
  .folder a i { font-size: 28px; }
  .split, .panes, .view, .cols { grid-template-columns: 1fr; }
  .page.svcpage .cols, .page.svcpage .split { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1.5px solid var(--line); }
  .view .go { grid-column: 1; }
  .gal { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 36vw; }
  .st .keys { display: none; }
  .ring, .planet { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  @view-transition { navigation: none; }
}

/* Hidden terminal commands */
.term.kern p, .term.kern input { letter-spacing: -.09em; transition: letter-spacing .4s; }
.term p, .term input { transition: letter-spacing .4s; }
html.comic, html.comic * { font-family: "Comic Sans MS", "Comic Sans", "Chalkboard SE", "Comic Neue", cursive !important; }
body.konami { animation: konami .9s steps(2) 2; }
@keyframes konami { 50% { filter: invert(1) hue-rotate(180deg); } }
.vid { aspect-ratio: 16 / 9; background: #000; }
.vid iframe { width: 100%; height: 100%; border: 0; display: block; }
.slot.you { background: var(--win); border-style: solid; }
@media (prefers-reduced-motion: reduce) { body.konami { animation: none; } }

/* Trogdor burninates the windows; the V in the name gets consummated */
body.burninate .desk .win:not(.min) { animation: burn 1s ease-out 3; }
.flames { position: absolute; height: 0; pointer-events: none; z-index: 59; }
.flame { position: absolute; bottom: 0; overflow: visible; transform-origin: 50% 100%; animation: fin .35s cubic-bezier(.2, .8, .2, 1) both; }
.flame.out { animation: fout .5s ease-in forwards; }
.flame g { transform-box: fill-box; transform-origin: 50% 100%; animation: flick var(--fd) ease-in-out infinite alternate; }
@keyframes fin { from { transform: scale(0); } }
@keyframes fout { to { transform: scale(0) translateY(-6px); opacity: 0; } }
@keyframes flick { from { transform: scaleY(.9) scaleX(1.05) skewX(-2deg); } to { transform: scaleY(1.1) scaleX(.94) skewX(3deg); } }
canvas.sparks { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 58; }
.term .again { margin-top: 4px; border: 1px solid var(--sel); background: none; color: var(--sel); font: inherit; padding: 1px 8px; cursor: pointer; }
.term .again:hover, .term .again:focus-visible { background: var(--sel); color: #111; outline: 0; }
@keyframes burn { 0%, 100% { box-shadow: 5px 5px 0 var(--shadow); } 20%, 60% { box-shadow: 0 0 0 3px #ff6a00, 0 -10px 28px 6px #ff3d00; transform: translateY(-2px); } 40%, 80% { box-shadow: 0 0 0 3px #ffb300, 0 -16px 36px 10px #ff6a00; transform: translateY(1px); } }
.hero h1 em { display: inline-block; transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), color .3s; }
body.consummate .hero h1 em { transform: scale(1.35) rotate(-8deg); color: var(--sel); -webkit-text-stroke: 2px var(--ink); }
@media (prefers-reduced-motion: reduce) { body.burninate .desk .win { animation: none; } }

/* rm -rf / : a fake wipe */
.wipe { position: fixed; inset: 0; z-index: 200; background: #000; color: #efede7; display: grid; place-items: center; font: 15px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }

.slot .hint { grid-column: 1 / 3; font-size: 14px; color: var(--mute); }
.term .tip { color: #9b9890; }
.termwin.anim { transition: width .22s cubic-bezier(.2, .8, .2, 1), height .22s cubic-bezier(.2, .8, .2, 1), left .22s cubic-bezier(.2, .8, .2, 1), top .22s cubic-bezier(.2, .8, .2, 1); }
.termwin .tb { cursor: grab; }

/* Homestar Runner: a shout that runs across the desktop */
.runner { position: absolute; left: 0; top: 46%; z-index: 90; pointer-events: none; white-space: nowrap; font: italic 400 clamp(48px, 7vw, 110px)/1 var(--serif); letter-spacing: -.03em; color: var(--ink); background: var(--sel); padding: .05em .3em; border: 1.5px solid var(--line); box-shadow: 5px 5px 0 var(--shadow); animation: run 2.6s cubic-bezier(.5, 0, .5, 1) forwards; }
@keyframes run { from { transform: translateX(-110%); } to { transform: translateX(110vw); } }

/* Full screen: taskbar button and the one-time suggestion */
.fsbtn { flex: none; border: 1.5px solid var(--line); background: var(--win); color: var(--ink); width: 32px; height: 30px; display: grid; place-items: center; cursor: pointer; padding: 0; }
.fsbtn[hidden] { display: none; }
.fsbtn:hover, .fsbtn:focus-visible, .fsbtn[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); outline: 0; }
.nudge .body p { margin: 0 0 12px; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.2; }
.nudge .body small { display: block; margin-top: 12px; font-size: 14px; color: var(--mute); line-height: 1.35; }
.nudge .row { display: flex; gap: 10px; flex-wrap: wrap; }
.nudge .ghost { border: 1.5px solid var(--line); background: var(--win); color: var(--ink); padding: 4px 14px; font-size: 18px; cursor: pointer; }
.nudge .ghost:hover, .nudge .ghost:focus-visible { background: var(--sel); color: var(--on-sel); outline: 0; }
.bar .fsbtn { width: 24px; height: 24px; padding: 0; border: 1px solid var(--mute); color: var(--mute); background: none; align-self: center; }
.bar .fsbtn svg { width: 14px; height: 14px; }
.bar .fsbtn:hover, .bar .fsbtn:focus-visible, .bar .fsbtn[aria-pressed="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--on-sel); }

/* Business card: real front and seven figure backs */
.card { aspect-ratio: 852 / 480; }
.body.cardwrap { padding: 12px; }
.face.f, .face.b { padding: 0; display: block; overflow: hidden; background: #fff; }
.face img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Design page: Kern it and Sketchpad */
.sbtn { border: 1.5px solid var(--line); background: var(--sel); color: var(--on-sel); font: italic 16px/1 var(--serif); padding: 4px 12px; cursor: pointer; }
.sbtn.ghost { background: var(--win); color: var(--ink); }
.sbtn:hover, .sbtn:focus-visible { background: var(--ink); color: var(--win); outline: 0; }
/* Tracking */
.tstage { position: relative; height: 104px; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--rule); }
.tword, .tghost { grid-area: 1 / 1; font: 400 52px/1 var(--serif); white-space: nowrap; text-transform: uppercase; }
.tword { transition: letter-spacing .05s; position: relative; }
.tghost { color: transparent; -webkit-text-stroke: 1px var(--mute); opacity: 0; transition: opacity .3s; }
.tghost.on { opacity: 1; }
.tghost.hit { -webkit-text-stroke-color: var(--sel); }
.tctl { padding: 14px; display: grid; gap: 8px; }
.tmood { margin: 0; font-style: italic; font-size: 19px; }
.trow { display: flex; gap: 10px; align-items: center; }
.trow input, .f8form input { flex: 1; min-width: 0; border: 1.5px solid var(--line); background: var(--win); color: var(--ink); padding: 4px 8px; font: 16px/1.2 var(--serif); }
.trow input:focus-visible, .f8form input:focus-visible { outline: 2px solid var(--sel); outline-offset: 0; }

/* Business card: the redacted email */
.redact { position: absolute; left: 30.1%; top: 74.2%; width: 22.6%; height: 7.6%; z-index: 2; }
.redact em { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); white-space: nowrap; font: italic 13px/1 var(--serif); background: var(--ink); color: var(--win); padding: 5px 8px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.flip:hover .redact:hover em { opacity: 1; }
.face.f { position: absolute; }
.cardnote { margin: 8px 0 0; font-size: 14px; color: var(--mute); }
.cardnote a { color: var(--ink); border-bottom: 1.5px solid var(--sel); }
.cardnote[hidden] { display: none; }

/* Thank-you page */
.thanks { max-width: 1100px; }
.thanks h1 { font-weight: 400; font-size: clamp(72px, 15vw, 230px); line-height: .8; letter-spacing: -.055em; margin: .18em 0 0; overflow-wrap: anywhere; }
.thanks h1 em { font-weight: 300; }
.thanks .lead { font-size: clamp(20px, 2vw, 30px); line-height: 1.15; max-width: 26ch; margin: .6em 0 1.2em; }
.thanks .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.thanks .ghost { display: inline-block; font: italic 400 clamp(20px, 1.9vw, 26px)/1 var(--serif); padding: .3em .5em; border: 1.5px solid var(--line); background: var(--win); color: var(--ink); }
.thanks .ghost:hover, .thanks .ghost:focus-visible { background: var(--sel); color: var(--on-sel); }

/* ===================== Phones ===================== */
/* Parts that only exist on phones. Hidden everywhere else. */
.menubtn, .msheet, .phome, .phdock, .phdim, .lockscr, .lockbtn, .tb .back { display: none; }

@media (max-width: 700px) {
  /* Menu bar: your name and a Menu button */
  .bar { align-items: center; padding-block: 8px; }
  .bar nav a:not(.me) { display: none; }
  .bar .r { display: none; }
  .menubtn { display: flex; align-items: center; gap: 7px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: italic 16px/1 var(--serif); padding: 6px 10px; cursor: pointer; }
  .menubtn i { width: 14px; height: 10px; background: linear-gradient(currentColor, currentColor) 0 0 / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat, linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; }
  .menubtn[aria-expanded="true"] { background: var(--sel); color: var(--on-sel); border-color: var(--on-sel); }
  .msheet { display: block; position: fixed; inset: 0; z-index: 80; background: rgba(17, 17, 17, .35); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .msheet.on { opacity: 1; pointer-events: auto; }
  .msheet .win { position: absolute; left: 12px; right: 12px; top: calc(56px + env(safe-area-inset-top, 0px)); transform: translateY(-12px); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
  .msheet.on .win { transform: none; }
  .msheet nav a { display: flex; justify-content: space-between; align-items: baseline; padding: 11px 14px; border-bottom: 1px solid var(--rule); font-size: 24px; }
  .msheet nav a small { font-size: 13px; color: var(--mute); }
  .msheet nav a[aria-current="page"] { background: var(--sel); color: var(--on-sel); }
  .msheet nav a[aria-current="page"] small { color: var(--on-sel); }
  .msheet .mfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 14px; border-top: 1.5px solid var(--line); margin-top: -1px; font-size: 15px; }
  .msheet .mfoot button { border: 1px solid var(--mute); background: none; color: var(--ink); font: 15px/1 var(--serif); padding: 5px 10px; cursor: pointer; }
  .msheet .mfoot span { display: flex; gap: 14px; }
  .msheet .mfoot a { border-bottom: 1.5px solid var(--sel); }

  /* Inner pages */
  .page { padding: 18px var(--gut) 32px; }
  .h { font-size: clamp(38px, 11vw, 52px); }
  .body { padding: 16px 14px; }
  .rows .inc { padding-left: 14px; }

  /* ---------- Home: a lock screen, then a widget home screen ---------- */
  body[data-page="home"] .desk { display: block; padding: 12px var(--gut) 124px; margin-bottom: 0; min-height: 0; }
  body[data-page="home"] .taskbar { display: none; }
  .desk .win { display: none; }

  /* Name widget (the hero, restyled) */
  .hero { position: static; border: 1.5px solid var(--line); border-radius: 22px; box-shadow: 4px 4px 0 var(--shadow); background: var(--win); color: var(--win-ink); padding: 12px 14px 14px; }
  .hero h1 { font-size: clamp(36px, 10.8vw, 46px); }
  .hero .lead { font-size: 17px; margin-top: .5em; max-width: 22ch; }

  /* Widgets and toys */
  .phome { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 12px; margin-top: 12px; }
  .wdg { display: block; border: 1.5px solid var(--line); border-radius: 22px; box-shadow: 4px 4px 0 var(--shadow); background: var(--win); color: var(--win-ink); overflow: hidden; position: relative; }
  .wdg:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
  .wdg h3 { margin: 0 0 6px; font: 600 11px/1 var(--serif); letter-spacing: .14em; text-transform: uppercase; color: var(--win-mute); }
  .w-photo { grid-column: span 2; aspect-ratio: 1 / .8; }
  .w-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; display: block; }
  .w-photo span { position: absolute; left: 10px; bottom: 10px; background: var(--win); color: var(--win-ink); border: 1.5px solid var(--line); border-radius: 99px; font: 600 13px/1 var(--serif); padding: 5px 10px; }
  .w-svc { grid-column: span 2; aspect-ratio: 1 / .8; padding: 10px 12px 4px; display: flex; flex-direction: column; }
  .w-svc a { display: block; border-top: 1px solid var(--win-rule); padding: 4px 0; font-size: 13px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .w-proj { grid-column: span 4; padding: 10px 14px; }
  .w-proj p { margin: 0; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .plabel { grid-column: span 4; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin: 4px 0 -8px; }
  .ic { border: 0; background: none; padding: 0; cursor: pointer; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 6px; font: 13px/1.15 var(--serif); text-align: center; }
  .ic > i { width: 56px; height: 56px; border: 1.5px solid var(--line); border-radius: 16px; box-shadow: 3px 3px 0 var(--shadow); background: var(--win); color: var(--win-ink); display: grid; place-items: center; font: italic 26px/1 var(--serif); overflow: hidden; transition: transform .12s; }
  .ic:active > i { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow); }
  .ic:focus-visible { outline: 0; } .ic:focus-visible > i { outline: 2px solid var(--sel); outline-offset: 3px; }
  .ic > i img { width: 100%; height: 100%; object-fit: contain; padding: 3px; background: #fff; }
  .ic.i-term > i { background: #111111; color: var(--sel); font: 16px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
  .ic.i-sw > i { background: linear-gradient(90deg, #ffe24a 0 25%, #c9b3ec 25% 50%, #a9c8ee 50% 75%, #d99a6c 75%); }
  .ic.i-save > i { font: 600 17px/1 var(--serif); letter-spacing: .06em; }
  .ic.i-msg > i { background: var(--sel); color: var(--on-sel); }
  .ic.i-file > i::before { content: ""; width: 21px; height: 27px; border: 1.5px solid var(--win-ink); background: linear-gradient(225deg, var(--win-ink) 0 24%, transparent 24%); }

  /* Dock: the pages */
  .phdock { display: flex; justify-content: space-around; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30; padding: 10px 6px 8px; background: var(--win); border: 1.5px solid var(--line); border-radius: 28px; box-shadow: 4px 4px 0 var(--shadow); }
  .phdock .ic { color: var(--win-ink); font-size: 12px; }
  .phdock .ic > i { width: 52px; height: 52px; border-radius: 14px; box-shadow: 2px 2px 0 var(--shadow); font-size: 22px; }

  .hero { position: relative; left: auto; top: auto; }
  .hero::before { content: ""; position: absolute; z-index: 1; left: calc(var(--sx, 83%) - 14px); top: 0; bottom: 0; width: 28px; pointer-events: none; background: no-repeat 50% 50% / 28px 28px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.5 -.5 17 17'%3E%3Cpath fill='none' stroke='%23111' stroke-width='.7' stroke-linejoin='round' d='M8 0c.6 4.6 3.4 7.4 8 8-4.6.6-7.4 3.4-8 8-.6-4.6-3.4-7.4-8-8 4.6-.6 7.4-3.4 8-8z'/%3E%3C/svg%3E"); }
  .hero::after { content: ""; position: absolute; left: calc(var(--sx, 83%) - 14px); top: 0; bottom: 0; width: 28px; background: var(--sel); -webkit-mask: no-repeat 50% 50% / 28px 28px var(--star); mask: no-repeat 50% 50% / 28px 28px var(--star); --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-.5 -.5 17 17'%3E%3Cpath d='M8 0c.6 4.6 3.4 7.4 8 8-4.6.6-7.4 3.4-8 8-.6-4.6-3.4-7.4-8-8 4.6-.6 7.4-3.4 8-8z'/%3E%3C/svg%3E"); }
  .lockscr.dk { background-color: #151515; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.2px); color: #ffe24a; }
  .lockscr.dk .lk-unlock { color: #efede7; } .lockscr.dk .lk-unlock::after { background: #efede7; }
  html { overflow-x: clip; }
  html:has(body.sheetopen) { overflow: hidden; }
  .bar .lockbtn { display: grid; place-items: center; width: 36px; height: 31px; margin-left: auto; margin-right: 8px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); cursor: pointer; padding: 0; }
  body:not([data-page="home"]) .lockbtn { display: none; }
  .ic > i { transform: translate(-1.5px, -1.5px); }
  .ic:active > i { transform: translate(.5px, .5px); }
  .ic.i-svg > i svg { display: block; }
  .ic.i-msg.i-svg > i { color: var(--on-sel); }
  .cardwin.sheet .cardwrap, .cardwin.sheet .body.cardwrap { display: flex; flex-direction: column; }
  .cardwin.sheet .cardnote { order: -1; margin: 0 0 10px; }
  body.peek .desk .win.sheet { transform: translateY(105%); transition: transform .3s; }
  body.peek .phdim { opacity: 0; }
  body.peek .phdock, body.peek .phome, body.peek .hero { visibility: visible; }
  .desk #rick.sheet { top: 16%; bottom: auto; left: 18px; right: 18px; border-bottom: 1.5px solid var(--line); border-radius: 16px; box-shadow: 5px 5px 0 var(--shadow); animation: none; }
  .desk #rick.sheet::before { display: none; }
  .desk #rick.sheet > .tb { border-top: 0; }
  .w-svc .wmore { color: var(--win-mute); font-style: italic; }
  /* while a sheet is open, nothing behind it can take taps */
  body.sheetopen .phdock, body.sheetopen .phome, body.sheetopen .hero { visibility: hidden; }
  /* Toys open as a bottom sheet, keeping the window's title bar */
  .phdim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(17, 17, 17, .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
  .phdim.on { opacity: 1; pointer-events: auto; }
  body.sheetopen { overflow: hidden; }
  body .desk .win.sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 86dvh; z-index: 70; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: none; overflow: hidden; padding-bottom: env(safe-area-inset-bottom, 0px); animation: sheetin .28s cubic-bezier(.2, .8, .2, 1) both; touch-action: pan-y; }
  .desk .win.sheet::before { content: ""; display: block; flex: none; width: 40px; height: 5px; border-radius: 3px; background: var(--win-mute); opacity: .5; margin: 8px auto 6px; }
  .desk .win.sheet > .tb { border-top: 1.5px solid var(--line); font-size: 16px; padding: 8px 10px; touch-action: none; }
  .desk .win.sheet > .tb .x { width: 28px; height: 28px; font-size: 18px; }
  .desk .win.sheet > :not(.tb) { overflow-y: auto; }
  .desk .termwin.sheet { height: 74dvh; resize: none; }
  .desk .termwin.sheet .term { flex: 1; height: auto; font-size: 15px; }
  .desk .termwin.sheet .term input { font-size: 16px; }
  body .desk .win.sheet { bottom: var(--kb, 0px); max-height: min(86dvh, calc(var(--vvh, 100dvh) - 8px)); }
  .desk .termwin.sheet { height: min(74dvh, calc(var(--vvh, 100dvh) - 8px)); }
  .desk .termwin.sheet #tout { overflow-y: auto; min-height: 0; }
  .lk-notes .nt header i.svg { display: grid; place-items: center; }
  .lk-notes .nt header i.svg svg { width: 70%; height: 70%; }
  .desk .win.sheet.dragging { animation: none; transition: none; }
  .desk .win.sheet.closing { transition: transform .2s ease-in; transform: translateY(100%); }
  @keyframes sheetin { from { transform: translateY(100%); } }

  /* Lock screen */
  body.locked { overflow: hidden; }
  .lockscr { display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 95; background: #ffe24a radial-gradient(rgba(17, 17, 17, .14) 1px, transparent 1.2px) 0 0 / 14px 14px; color: #111111; padding: calc(34px + env(safe-area-inset-top, 0px)) 14px 0; transition: transform .45s cubic-bezier(.6, 0, .2, 1); }
  body:not(.locked) .lockscr { transform: translateY(-101%); pointer-events: none; }
  .lockscr.dragging { transition: none; }
  .lk-time { text-align: center; flex: none; }
  .lk-time small { display: block; font: 600 15px/1 var(--serif); }
  .lk-time b { display: block; font: 300 clamp(78px, 24vw, 96px)/1 var(--serif); letter-spacing: -.045em; margin-top: 6px; }
  .lk-notes { flex: 1; overflow-y: auto; padding: 8px 0 12px; display: flex; flex-direction: column; gap: 10px; }
  .nt { display: block; width: 100%; text-align: left; background: rgba(255, 255, 255, .96); color: #111111; border: 1.5px solid #111111; border-radius: 18px; box-shadow: 3px 3px 0 #111111; padding: 10px 12px; font: inherit; cursor: pointer; }
  .nt header { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: #6a6a6a; letter-spacing: .08em; text-transform: uppercase; }
  .nt header i { width: 18px; height: 18px; border-radius: 5px; border: 1px solid #111111; display: inline-grid; place-items: center; font: italic 11px/1 var(--serif); color: #111111; background: #fff; overflow: hidden; text-transform: none; letter-spacing: 0; }
  .nt header i img { width: 100%; height: 100%; object-fit: cover; }
  .nt header em { margin-left: auto; font-style: normal; text-transform: none; letter-spacing: 0; }
  .nt b { display: block; font-weight: 600; font-size: 16px; margin-top: 4px; }
  .nt > p { margin: 2px 0 0; font-size: 14.5px; line-height: 1.3; }
  .nt .more { display: none; margin: 8px -12px -10px; border-top: 1.5px solid #111111; }
  .nt.open .more { display: block; }
  .nt.open > p { display: none; }
  .nt .more .tb { color: #111111; border-color: #111111; background: #fff; }
  .nt .more .tb::before, .nt .more .tb::after { border-color: #111111; }
  .nt .more .tb::after { background: repeating-linear-gradient(#111111 0 1.5px, transparent 1.5px 3.5px); }
  .nt .more a.row { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-top: 1px solid #d9d6cf; font-size: 15px; }
  .nt .more .bio { display: flex; gap: 10px; padding: 10px 12px; font-size: 15px; line-height: 1.3; }
  .nt .more .bio img { width: 64px; height: 80px; object-fit: cover; border: 1px solid #111111; flex: none; }
  .nt .more a.go { display: block; background: #111111; color: #fff; text-align: center; font: italic 16px/1 var(--serif); padding: 12px; border-radius: 0 0 16px 16px; }
  .lk-foot { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 10px 10px calc(16px + env(safe-area-inset-bottom, 0px)); touch-action: none; }
  .lk-circ { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, .92); border: 1.5px solid #111111; display: grid; place-items: center; color: #111111; font: 14px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; cursor: pointer; padding: 0; }
  .lk-circ.dk::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #111111; background: linear-gradient(90deg, #111111 50%, transparent 50%); }
  .lk-unlock { border: 0; background: none; color: #111111; font: 14px/1.25 var(--serif); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 10px; }
  .lk-unlock::after { content: ""; width: 120px; height: 5px; border-radius: 3px; background: #111111; }
  .lk-unlock span { animation: nudge 2.4s ease-in-out infinite; }
  @keyframes nudge { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-5px); } }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  body .desk .win.sheet, .msheet, .msheet .win, .lockscr, .lk-unlock span { animation: none; transition: none; }
}

