@font-face {
  font-family: "Fira Code";
  src: url("../assets/fonts/FiraCode-VF.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
:root {
  --paper: #fff9e9;
  --ink: #233e38;
  --muted: #55685d;
  --line: #c8cdb5;
  --sage: #afd0a9;
  --coral: #f0a096;
  --butter: #f2ce69;
  --sea: #9ccad1;
  --accent: #27675a;
  --mono: "Fira Code", ui-monospace, monospace;
  --bg: var(--paper);
  --s2: 1rem;
  --s3: 1.5rem;
  --s4: 2.5rem;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.65 var(--mono); }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid #be603f; outline-offset: 3px; }
[hidden] { display: none !important; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0 0 .7em; line-height: 1.18; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 12px; z-index: 1000; padding: 10px; background: var(--paper); }
.skip-link:focus { top: 8px; }

/* A tiled wall, illustrated shortcuts, and warm paper windows. */
.desktop-page { height: 100dvh; min-height: 320px; overflow: hidden; display: flex; flex-direction: column; }
.desktop { isolation: isolate; position: relative; flex: 1; min-height: 0; overflow: hidden; background: #dce5d4 url("../assets/img/subway-tile.svg") repeat; background-size: 200px 100px; }
.desktop:focus { outline: none; }
.desktop-icons { display: grid; grid-template-columns: repeat(3, 118px); align-content: start; gap: 24px 10px; width: max-content; max-height: 100%; overflow-y: auto; padding: 34px 20px 80px; scrollbar-width: thin; }
.desk-icon { display: flex; flex-direction: column; align-items: center; padding: 8px 2px; color: var(--ink); text-decoration: none; text-align: center; border: 1px solid transparent; border-radius: 4px; font-size: 12px; line-height: 1.45; }
.desk-icon svg { width: 72px; height: 72px; margin-bottom: 8px; filter: drop-shadow(2px 3px 0 #5a716340); transition: transform 160ms ease; }
.desk-icon > span { padding: 2px 5px; background: #fffaeade; box-decoration-break: clone; border-radius: 2px; }
.desk-icon:hover { background: #fff9ec70; border-color: #6f907d66; }
.desk-icon:hover svg { transform: translateY(-4px) rotate(-3deg); }
.desk-icon[aria-expanded="true"] > span { color: var(--paper); background: var(--accent); }
#window-layer { position: absolute; inset: 0; pointer-events: none; }

/* One frame style for documents, instruments, games, and odd birds. */
.os-window { --window-accent: var(--sage); position: absolute; display: flex; flex-direction: column; width: 710px; height: 520px; min-width: 360px; min-height: 280px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); border: 2px solid var(--ink); border-radius: 7px 7px 2px 2px; background: var(--paper); box-shadow: 5px 6px 0 #233e3840; overflow: hidden; resize: both; pointer-events: auto; animation: arrive 160ms ease-out; }
.os-window[data-accent="coral"] { --window-accent: var(--coral); }
.os-window[data-accent="butter"] { --window-accent: var(--butter); }
.os-window[data-accent="sea"] { --window-accent: var(--sea); }
.os-window.is-active { box-shadow: 6px 7px 0 #233e3860, 0 10px 25px #233e381a; }
.os-titlebar { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 4px 5px 4px 12px; background: var(--window-accent); border-bottom: 2px solid var(--ink); touch-action: none; user-select: none; cursor: grab; }
.os-titlebar:active { cursor: grabbing; }
.os-window:not(.is-active) .os-titlebar { background: #e4e7d8; }
.window-mark { flex: none; width: 13px; height: 13px; border: 1px solid currentColor; box-shadow: inset 0 0 0 3px var(--window-accent); background: var(--ink); }
.os-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-controls { margin-left: auto; display: flex; gap: 5px; flex: none; }
.os-btn, .os-pop { display: grid; place-items: center; width: 30px; height: 29px; padding: 0; border: 1px solid var(--ink); box-shadow: inset 1px 1px 0 #fffbef, 1px 1px 0 #233e3850; color: var(--ink); background: #fff9ecb8; border-radius: 2px; font: 20px/1 var(--mono); text-decoration: none; }
.os-pop { font-size: 16px; }
.os-btn:hover, .os-pop:hover { background: var(--paper); box-shadow: 1px 1px 0 var(--ink); }
.close-btn:hover { background: var(--coral); }
.os-body { position: relative; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.os-body iframe { display: block; border: 0; width: 100%; height: 100%; background: var(--paper); }
.os-window.is-expanded { left: 8px !important; top: 8px !important; width: calc(100% - 16px) !important; height: calc(100% - 16px) !important; max-width: none; max-height: none; box-shadow: none; resize: none; }
.is-dragging iframe { pointer-events: none; }
.window-loading { position: absolute; inset: 0; display: grid; place-content: center; pointer-events: none; font-size: 12px; background: var(--paper); z-index: 1; }
.window-loading span { display: block; margin: 12px auto; height: 4px; width: 60px; background: repeating-linear-gradient(90deg, var(--sage) 0 8px, transparent 8px 12px); }

.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }

.statusbar { flex: none; height: 44px; display: flex; gap: 10px; align-items: center; padding: 5px 12px; border-top: 2px solid var(--ink); background: var(--paper); z-index: 10; font-size: 11px; }
.desktop-home { display: flex; flex: none; align-items: center; gap: 8px; border: 1px solid var(--ink); box-shadow: 2px 2px 0 #233e3833; background: var(--sage); padding: 4px 10px; height: 31px; font-size: 12px; }
.desktop-home[aria-expanded="true"] { box-shadow: inset 1px 1px 3px #233e3880; }
.mini-grid { width: 12px; height: 12px; background: conic-gradient(var(--ink) 25%, transparent 0 50%, var(--ink) 0 75%, transparent 0); background-size: 8px 8px; }
.taskbar { display: flex; gap: 5px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.taskbar button { flex: 0 1 auto; min-width: 80px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 10px; height: 31px; font-size: 11px; border: 1px solid #8e9f86; background: #f2eedb; }
.taskbar button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.desktop-clock { margin-left: auto; flex: none; font-variant-numeric: tabular-nums; line-height: 1.35; text-align: right; }
.start-menu { position: fixed; inset: auto auto 44px 12px; margin: 0; padding: 0; width: 460px; max-width: calc(100% - 24px); max-height: calc(100dvh - 56px); overflow-y: auto; border: 2px solid #245a96; border-radius: 8px 8px 0 0; color: #21374a; background: #fffdf5; box-shadow: 4px 6px 18px #142a4a55; }
.start-heading { display: flex; align-items: center; gap: 12px; padding: 14px; color: white; background: linear-gradient(#5c9bd3, #2869a5); border-bottom: 2px solid #dfb75c; text-shadow: 1px 1px #23558c; }
.start-heading img { border: 2px solid #e9f1fb; border-radius: 4px; background: #fffdf5; }
.start-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.start-apps { padding: 8px; }
.start-system { padding: 8px; border-left: 1px solid #a5bfd4; background: #e0edf7; }
.start-app { display: flex; align-items: center; gap: 10px; min-height: 53px; padding: 7px; border-radius: 2px; color: #21374a; text-decoration: none; font-size: 12px; line-height: 1.35; }
.start-app svg { flex: none; width: 36px; height: 36px; }
.start-app:hover, .start-app:focus-visible { color: white; background: #316eae; }
.wallpaper-options { min-width: 0; padding: 0; margin: 24px 0 14px; border: 0; }
.wallpaper-options legend { margin-bottom: 14px; font-size: 12px; }
.wallpaper-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.wallpaper-option { position: relative; overflow: hidden; border: 2px solid var(--line); border-radius: 4px; cursor: pointer; }
.wallpaper-option:has(:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.wallpaper-option:focus-within { outline: 3px solid #be603f; outline-offset: 4px; }
.wallpaper-option input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.wallpaper-swatch { display: block; aspect-ratio: 4 / 3; background: #dce5d4 url("../assets/img/subway-tile.svg") repeat; background-size: 200px 100px; border-bottom: 1px solid var(--line); }
[data-wallpaper="floor"] { background-image: url("../assets/img/subway_floor.png"); background-size: 724px 543px; }
[data-wallpaper="frogs"] { background-image: url("../assets/img/vintage_frog.png"); background-size: 724px 543px; }
[data-wallpaper="sheep"] { background-image: url("../assets/img/bahh.jpg"); background-size: cover; background-position: center; }
.wallpaper-name { display: block; padding: 10px; font-size: 12px; line-height: 1.4; }
.wallpaper-status { color: var(--muted); font-size: 11px !important; }
.no-script { position: absolute; bottom: 0; background: var(--paper); padding: 10px; }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* Real URLs use the same paper/type system, without a second window inside one. */
.document { background: var(--paper); }
.document-nav, .document-footer { display: flex; flex-wrap: wrap; gap: 20px; max-width: 920px; margin: 0 auto; padding: 16px 32px; font-size: 11px; }
.document-nav { border-bottom: 1px solid var(--line); }
.document-nav a[aria-current] { color: var(--ink); font-weight: 600; }
.document-main { max-width: 920px; padding: 32px; margin: 0 auto; }
.document-main h1 { font: normal clamp(32px, 7vw, 54px)/1.08 Georgia, serif; letter-spacing: -.025em; }
.document-main h2 { margin-top: 1.8em; font: normal 28px/1.2 Georgia, serif; }
.document-main h3 { font-size: 16px; }
.document-main p, .document-main li { font-size: 14px; }
.lede { font-size: 16px !important; line-height: 1.75; }
.document-main > section + section { margin-top: 32px; }
.portrait { float: right; width: 35%; max-width: 210px; margin: 0 0 20px 24px; }
.portrait img { width: 100%; height: auto; display: block; border: 7px solid #fffef7; outline: 1px solid var(--line); }
.contact-list, .project-links { display: flex; flex-wrap: wrap; gap: 12px 20px; padding: 0; list-style: none; }
.project-links a { display: inline-block; padding: 8px 10px; border: 1px solid var(--line); color: var(--ink); background: #fffef7; text-decoration: none; }
.project-links a:hover { border-color: var(--ink); box-shadow: 2px 2px 0 var(--line); }
.timeline { list-style: none; margin: 28px 0; padding: 0; border-top: 1px solid var(--line); }
.entry { display: grid; grid-template-columns: 110px 1fr; gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.entry h2, .entry h3 { margin: 0 0 8px; font: normal 23px/1.25 Georgia, serif; }
.when, .role { font-size: 11px !important; color: var(--muted); }
.when { padding-top: 3px; }
.entry p:last-child { margin-bottom: 0; }
.document-footer { border-top: 1px solid var(--line); color: var(--muted); }
.embedded .document-nav, .embedded .document-footer { display: none; }
.embedded .document-main { padding: 28px; }
.study-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin: 26px 0; }
.study-link { display: flex; flex-direction: column; align-items: start; gap: 10px; min-height: 225px; padding: 18px; border: 1px solid #acb9a3; border-radius: 3px; color: var(--ink); text-decoration: none; background: #e8edd9; box-shadow: 2px 2px 0 #233e3826; }
.study-link:nth-child(3n + 2) { background: #f5e4c0; }
.study-link:nth-child(3n) { background: #f5d9ce; }
.study-link:hover { border-color: var(--ink); box-shadow: 4px 4px 0 #334e3d40; transform: translateY(-2px); }
.study-link svg { width: 64px; height: 64px; }
.study-link strong { font-size: 14px; line-height: 1.4; }
.study-link span { font-size: 12px; color: #45594c; line-height: 1.6; }
.desktop-icons.animation-files { width: 100%; max-height: none; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 20px 12px; padding: 0; overflow: visible; }

/* Bubble cursor (js/cursor.js). Class is only set when the script runs on a fine pointer. */
.has-bubble-cursor, .has-bubble-cursor * { cursor: none !important; }
.cursor-layer { position: fixed; inset: 0; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; pointer-events: none; }
.bubble-cursor { position: absolute; left: 0; top: 0; margin: -2px; width: 32px; height: 32px; transform-origin: 2px 2px; filter: drop-shadow(1px 2px 0 #233e3833); transition: scale 240ms cubic-bezier(.3, 1.4, .5, 1), rotate 240ms cubic-bezier(.3, 1.4, .5, 1), opacity 120ms; }
.bubble-cursor.is-hover { scale: 1.1; rotate: -6deg; animation: bubble-wobble 1.8s ease-in-out infinite; }
.bubble-cursor.is-down { scale: .9; rotate: 2deg; transition-duration: 90ms; }
.bubble-cursor.is-hidden { opacity: 0; }
.bubble-pop { position: absolute; width: var(--s); height: var(--s); margin: calc(var(--s) / -2); border: 1.5px solid var(--ink); border-radius: 50%; background: radial-gradient(circle at 32% 30%, #fff 0 22%, #fff9e9b0 23%, #afd0a955 70%); opacity: 0; animation: bubble-rise 720ms cubic-bezier(.2, .7, .3, 1) both; }
@keyframes bubble-wobble { 50% { transform: scale(1.03, .97); } }
@keyframes bubble-rise {
  0% { opacity: 1; scale: .2; translate: 0 0; }
  78% { opacity: 1; scale: 1; translate: var(--dx) var(--dy); }
  100% { opacity: 0; scale: 1.5; translate: var(--dx) calc(var(--dy) - 4px); border-width: .5px; }
}

@media (min-width: 1440px) {
  .desktop-icons { padding: 44px 38px; gap: 26px 20px; }
}
@media (max-width: 1050px) and (min-width: 761px) {
  .desktop-icons { grid-template-columns: repeat(2, 104px); gap: 5px 6px; padding: 20px 14px; }
  .desk-icon svg { width: 54px; height: 54px; }
}
@media (max-width: 760px) {
  .desktop { overflow-y: auto; }
  .desktop-icons { width: 100%; max-height: none; overflow: visible; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 6px; padding: 8px 12px 30px; }
  .desk-icon svg { width: 68px; height: 68px; }
  .desk-icon { min-height: 110px; font-size: 11px; }
  #window-layer { position: fixed; top: 0; bottom: 44px; z-index: 5; }
  .os-window, .os-window.is-expanded { left: 5px !important; top: 5px !important; width: calc(100% - 10px) !important; height: calc(100% - 10px) !important; min-width: 0; min-height: 0; max-width: none; max-height: none; box-shadow: 0 3px 24px #263e3960; resize: none; }
  .os-titlebar { min-height: 48px; gap: 7px; padding-left: 10px; }
  .os-title { font-size: 12px; }
  .os-btn, .os-pop { width: 36px; height: 36px; }
  .os-controls [data-window-expand], .os-controls .os-pop { display: none; }
  .statusbar { padding: 4px 7px; gap: 6px; }
  .desktop-clock { max-width: 45%; font-size: 10px; }
  .start-menu { left: 6px; max-width: calc(100% - 12px); }
  .start-columns { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
  .start-app { gap: 6px; font-size: 11px; }
  .start-app svg { width: 30px; height: 30px; }
  .portrait { margin-left: 16px; }
  .desktop-home { padding: 3px 6px; }
  .taskbar button { max-width: 110px; }
  .document-main, .embedded .document-main { padding: 24px 20px; }
  .document-nav, .document-footer { padding: 15px 20px; }
  .entry { grid-template-columns: 1fr; gap: 5px; }
  .entry .when { margin-bottom: 3px; }
  .study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .study-link { padding: 12px; }
}
@media (max-height: 680px) and (min-width: 761px) {
  .desktop-icons { gap: 8px; padding-top: 16px; }
  .desk-icon svg { width: 58px; height: 58px; }
}
@media (prefers-reduced-motion: reduce) {
  .os-window { animation: none; }
  .desk-icon svg { transition: none; }
  .desk-icon:hover svg, .study-link:hover { transform: none; }
  .bubble-cursor { transition: opacity 120ms; }
  .bubble-cursor.is-hover { animation: none; }
}
