/* =========================================================
   Tokens. Light is "butter", dark is "midnight".
   ========================================================= */
:root,
:root[data-theme="light"] {
  --wall-1: #fff3a6;
  --wall-2: #ffe066;
  --wall-3: #ffcf3a;
  --blob: rgba(255, 255, 255, 0.55);
  --bg: #ffe066;
  --win: #fffdf3;
  --win-2: #fff8dc;
  --bar: rgba(255, 250, 228, 0.86);
  --media: #fff4c4;
  --fg: #221e12;
  --fg-rgb: 34, 30, 18;
  --muted: #6e6446;
  --line: rgba(34, 30, 18, 0.12);
  --accent: #e0a500;
  --em: #221e12;
  --glass: rgba(255, 251, 232, 0.6);
  --glass-line: rgba(255, 255, 255, 0.7);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 24px 60px -18px rgba(120, 88, 0, 0.35), 0 2px 8px rgba(120, 88, 0, 0.12);
  --heat-0: rgba(34, 30, 18, 0.07);
  --heat-1: #f7e38c;
  --heat-2: #f2cf3e;
  --heat-3: #e0a800;
  --heat-4: #a87700;
  --boot-bg: #ffe066;
  --boot-fg: #221e12;
  --grain: 0.05;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --wall-1: #1d1a10;
  --wall-2: #15130c;
  --wall-3: #0f0e09;
  --blob: rgba(255, 214, 64, 0.1);
  --bg: #15130c;
  --win: #201d14;
  --win-2: #2a261a;
  --bar: rgba(38, 34, 24, 0.9);
  --media: #17150e;
  --fg: #f8f1d8;
  --fg-rgb: 248, 241, 216;
  --muted: #a89f80;
  --line: rgba(248, 241, 216, 0.1);
  --accent: #ffd84d;
  --em: #ffd84d;
  --glass: rgba(36, 32, 22, 0.55);
  --glass-line: rgba(255, 255, 255, 0.08);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 70px -20px rgba(0, 0, 0, 0.7), 0 2px 8px rgba(0, 0, 0, 0.3);
  --heat-0: rgba(248, 241, 216, 0.06);
  --heat-1: rgba(255, 216, 77, 0.3);
  --heat-2: rgba(255, 216, 77, 0.55);
  --heat-3: rgba(255, 216, 77, 0.8);
  --heat-4: #ffe27a;
  --boot-bg: #0d0c08;
  --boot-fg: #ffd84d;
  --grain: 0.06;
  color-scheme: dark;
}

/* Wallpapers. Butter is the default defined above. */
:root[data-wall="honey"] { --wall-1: #ffe9a3; --wall-2: #ffcb45; --wall-3: #f5a524; --blob: rgba(255, 244, 200, 0.55); }
:root[data-wall="lemon"] { --wall-1: #fbffc4; --wall-2: #f7f06a; --wall-3: #e8da2e; --blob: rgba(255, 255, 255, 0.6); }
:root[data-wall="sunset"] { --wall-1: #fff1b0; --wall-2: #ffc970; --wall-3: #ff9a8b; --blob: rgba(255, 238, 190, 0.6); }
:root[data-wall="paper"] { --wall-1: #fffcf0; --wall-2: #fff3cc; --wall-3: #ffe8a0; --blob: rgba(255, 255, 255, 0.7); }
:root[data-theme="dark"][data-wall="honey"] { --blob: rgba(255, 170, 40, 0.13); }
:root[data-theme="dark"][data-wall="lemon"] { --blob: rgba(240, 230, 60, 0.1); }
:root[data-theme="dark"][data-wall="sunset"] { --blob: rgba(255, 120, 110, 0.12); --wall-1: #211712; }
:root[data-theme="dark"][data-wall="paper"] { --blob: rgba(255, 245, 210, 0.07); }
:root[data-grain="off"] .grain { display: none; }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --wall-1: #1d1a10; --wall-2: #15130c; --wall-3: #0f0e09; --blob: rgba(255, 214, 64, 0.1);
    --bg: #15130c; --win: #201d14; --win-2: #2a261a; --bar: rgba(38, 34, 24, 0.9); --media: #17150e;
    --fg: #f8f1d8; --fg-rgb: 248, 241, 216; --muted: #a89f80; --line: rgba(248, 241, 216, 0.1);
    --accent: #ffd84d; --em: #ffd84d; --glass: rgba(36, 32, 22, 0.55); --glass-line: rgba(255, 255, 255, 0.08);
    color-scheme: dark;
  }
}

:root {
  --red: #ff5f57;
  --yellow: #febc2e;
  --green: #28c840;
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --pad: clamp(16px, 4vw, 56px);
  --menubar: 30px;
  --dock-space: 104px;
  --dock-size: 50px;
  --radius: 14px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================
   Base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
body.is-loading { overflow: hidden; }
::selection { background: var(--accent); color: #221e12; }

a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--em); }
h1, h2, h3, p { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.muted { color: var(--muted); }
.label { color: var(--muted); }

.skip {
  position: fixed; top: 40px; left: 12px; z-index: 300;
  padding: 10px 14px; background: var(--fg); color: var(--bg); border-radius: 8px;
  transform: translateY(-300%);
}
.skip:focus { transform: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* Wallpaper: soft gradient with two drifting light blobs. */
.wallpaper {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(160deg, var(--wall-1) 0%, var(--wall-2) 48%, var(--wall-3) 100%);
  transition: background 0.6s var(--ease);
}
.wallpaper::before, .wallpaper::after {
  content: ""; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(closest-side, var(--blob), transparent);
}
.wallpaper::before { left: -20vmax; top: -25vmax; animation: drift 26s ease-in-out infinite alternate; }
.wallpaper::after { right: -25vmax; bottom: -30vmax; animation: drift 32s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(12vmax, 8vmax) scale(1.1); } }

.grain {
  position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* =========================================================
   Boot screen
   ========================================================= */
.loader {
  position: fixed; inset: 0; z-index: 400;
  display: grid; place-items: center; align-content: center; gap: 44px;
  background: var(--boot-bg); color: var(--boot-fg);
  transition: opacity 0.9s var(--ease) 0.1s, visibility 0s linear 1s;
}
.js .is-loaded .loader { opacity: 0; visibility: hidden; }
html:not(.js) .loader, .loader.is-done { display: none; }
.loader__logo { width: 88px; height: 88px; }
.loader__bar { width: 180px; height: 5px; border-radius: 99px; background: rgba(var(--fg-rgb), 0.18); overflow: hidden; }
:root[data-theme="dark"] .loader__bar { background: rgba(255, 216, 77, 0.2); }
.loader__bar span { display: block; height: 100%; background: currentColor; border-radius: inherit; transform: scaleX(var(--p, 0)); transform-origin: left; }

/* =========================================================
   Menu bar
   ========================================================= */
.menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200; height: var(--menubar);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 14px; font-size: 13.5px;
  background: var(--glass); border-bottom: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
}
.menubar__left, .menubar__right { display: flex; align-items: center; gap: 2px; min-width: 0; }
.menubar a, .menubar button {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border: 0; border-radius: 5px; background: none; cursor: pointer; white-space: nowrap;
}
.menubar a:hover, .menubar button:hover { background: rgba(var(--fg-rgb), 0.1); }
.menubar__logo svg { width: 16px; height: 16px; }
.menubar__icon svg { width: 15px; height: 15px; }
.menubar button[aria-expanded="true"] { background: rgba(var(--fg-rgb), 0.14); }
.sparks { font-variant-numeric: tabular-nums; }
.sparks__icon { color: var(--accent); display: inline-block; transition: transform 0.5s var(--spring); }
:root[data-theme="light"] .sparks__icon { color: #c98a00; }
.sparks.pop .sparks__icon { transform: scale(1.5) rotate(72deg); }
@supports (animation-timeline: scroll()) {
  [data-page="home"] .menubar::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
    transform-origin: left; animation: progress linear both; animation-timeline: scroll(root);
  }
  @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}
.menubar__name { font-weight: 700; }
.menubar__item[aria-current="page"] { font-weight: 600; }
.menubar__clock { font-variant-numeric: tabular-nums; padding: 0 9px; }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* =========================================================
   Dock
   ========================================================= */
.dock {
  position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 200;
  translate: -50% 0;
  display: flex; align-items: flex-end; gap: 6px; padding: 7px 8px;
  border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.35);
}
.dock__item { position: relative; display: block; --s: 1; }
.dock__icon {
  display: block; width: calc(var(--dock-size) * var(--s)); height: calc(var(--dock-size) * var(--s));
  transition: width 0.18s ease-out, height 0.18s ease-out;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.18));
}
.dock:not(.is-magnifying) .dock__icon { transition-duration: 0.45s; transition-timing-function: var(--ease); }
.dock__icon svg { width: 100%; height: 100%; display: block; }
.dock__item::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; translate: -50% 0;
  width: 4px; height: 4px; border-radius: 50%; background: var(--fg); opacity: 0;
}
.dock__item[aria-current="page"]::after { opacity: 0.7; }
.dock__tip {
  position: absolute; left: 50%; bottom: calc(100% + 12px); translate: -50% 4px;
  padding: 4px 10px; border-radius: 7px; font-size: 12.5px; white-space: nowrap;
  background: var(--bar); color: var(--fg); border: 1px solid var(--line);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, translate 0.3s var(--ease);
}
.dock__item:hover .dock__tip, .dock__item:focus-visible .dock__tip { opacity: 1; translate: -50% 0; }
.dock__sep { width: 1px; align-self: stretch; margin: 6px 3px; background: var(--line); }
.dock__item.bounce .dock__icon { animation: bounce 0.6s var(--ease); }
@keyframes bounce { 30% { transform: translateY(-22px); } 55% { transform: translateY(0); } 72% { transform: translateY(-7px); } 100% { transform: none; } }

/* =========================================================
   Windows
   ========================================================= */
.win {
  position: relative; display: flex; flex-direction: column;
  background: var(--win); color: var(--fg);
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
  transition: background-color 0.5s var(--ease), transform 0.6s var(--ease), opacity 0.4s var(--ease), max-width 0.7s var(--ease);
}
.win__bar {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; flex: none;
  background: var(--win-2); border-bottom: 1px solid var(--line);
  user-select: none; -webkit-user-select: none;
}
.win__title {
  position: absolute; left: 50%; translate: -50% 0; max-width: calc(100% - 150px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.win__body { position: relative; flex: 1; min-height: 0; }
.lights { display: flex; gap: 8px; position: relative; z-index: 1; }
.light {
  width: 12px; height: 12px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.light--r { background: var(--red); }
.light--y { background: var(--yellow); }
.light--g { background: var(--green); }
.light svg { width: 8px; height: 8px; opacity: 0; transition: opacity 0.15s; }
.lights:hover .light svg, .light:focus-visible svg { opacity: 0.6; }
.win.is-shaded .win__body { display: none; }
.win.is-shaded .win__bar { border-bottom: 0; }
.win.is-shaking { animation: shake 0.5s var(--ease); }
@keyframes shake { 15%, 55% { translate: -8px 0; } 35%, 75% { translate: 8px 0; } 100% { translate: 0 0; } }
.win[data-tilt] { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.win.is-draggable .win__bar { cursor: grab; }
.win.is-dragging { transition: none; }
.win.is-dragging .win__bar { cursor: grabbing; }

.toast {
  position: fixed; left: 50%; top: calc(var(--menubar) + 16px); z-index: 250; translate: -50% -20px;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px; max-width: calc(100vw - 32px);
  background: var(--bar); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.3s, translate 0.5s var(--spring);
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast__icon { width: 30px; height: 30px; flex: none; }

/* =========================================================
   Shared reveal
   ========================================================= */
.line { display: block; overflow: hidden; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.line__inner { display: inline-block; transform: translateY(110%); transition: transform 1.4s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 200ms); }
.is-loaded .line__inner { transform: none; }
.fade { opacity: 0; transform: translateY(24px) scale(0.98); transition: opacity 1.1s var(--ease), transform 1.2s var(--ease); transition-delay: calc(var(--i, 0) * 90ms + 200ms); }
.is-loaded .fade { opacity: 1; transform: none; }
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.reveal.in { opacity: 1; transform: none; }
html:not(.js) .line__inner, html:not(.js) .fade, html:not(.js) .reveal { transform: none; opacity: 1; }
/* The hero drifts up and fades as you scroll away. Scroll-driven, so it
   runs on the compositor with no JavaScript. */
@supports (animation-timeline: view()) {
  .hero__inner { animation: hero-out linear both; animation-timeline: view(); animation-range: exit 0% exit 90%; }
  @keyframes hero-out { to { transform: translateY(18vh); opacity: 0; } }
}

.section { padding: clamp(110px, 18vh, 200px) var(--pad); }
.section__head { display: grid; gap: 24px; margin-bottom: clamp(40px, 7vh, 72px); }
.h2 { font-size: clamp(2.6rem, 6.4vw, 6.4rem); line-height: 0.95; letter-spacing: -0.05em; font-weight: 500; max-width: 16ch; }
.lede { max-width: 52ch; font-size: clamp(15px, 1.2vw, 18px); color: var(--muted); }

/* =========================================================
   Hero (the desktop)
   ========================================================= */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: calc(var(--menubar) + 32px) var(--pad) var(--dock-space); display: flex; }
.hero__field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__inner { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 32px; }
.hero__title { font-size: clamp(3rem, 8.6vw, 9.4rem); font-weight: 500; line-height: 0.92; letter-spacing: -0.05em; }
.hero__title em { letter-spacing: -0.02em; }
.hero__meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--glass-line); font-size: 13px;
}
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(40, 200, 64, 0.2); }

.desk { position: relative; height: min(560px, 62vh); }
.desk > * { position: absolute; }
.note { width: min(360px, 100%); left: 2%; top: 30%; }
.note .win__body { padding: 20px 22px 24px; font-size: 16.5px; line-height: 1.55; }
.note .win__body p + p { margin-top: 12px; }
.clocks { right: 0; top: 0; display: flex; gap: 18px; }
.clocks > .widget-clock { position: relative; }
.hero__hint { margin-top: 30px; color: var(--muted); font-size: 11px; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin: 0 1px; border-radius: 5px; background: var(--win); border: 1px solid var(--line); font: 600 11px var(--sans); box-shadow: 0 1px 0 var(--line); }
.widget-clock {
  width: 132px; height: 132px; border-radius: 30px; padding: 12px;
  background: var(--win); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.analog { position: relative; width: 100%; height: 100%; border-radius: 50%; background: var(--win-2); }
.analog i { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 4px; background: var(--fg); }
.analog .h { width: 4px; height: 26%; margin-left: -2px; }
.analog .m { width: 3px; height: 38%; margin-left: -1.5px; }
.analog .s { width: 1.5px; height: 42%; margin-left: -0.75px; background: #f59e0b; }
.analog::after { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #f59e0b; }
.analog b { position: absolute; left: 50%; top: 50%; width: 2px; height: 6px; margin: -3px -1px; background: var(--muted); opacity: 0.6; border-radius: 1px; }
.widget-clock__label { position: absolute; left: -10px; right: -10px; bottom: -26px; text-align: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.widget-clock__label b { color: var(--fg); font-weight: 600; }
.widget-clock[data-tzclock="viewer"] .analog .s, .widget-clock[data-tzclock="viewer"] .analog::after { background: #3d97f2; }
.sticky {
  right: 4%; bottom: 2%; width: 210px; padding: 18px 18px 20px; rotate: 3deg;
  background: #fff2a0; color: #3a3316; border-radius: 4px 4px 18px 4px;
  box-shadow: 0 18px 30px -14px rgba(120, 88, 0, 0.45);
  font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.15;
  transition: rotate 0.6s var(--spring), transform 0.6s var(--spring);
}
.sticky:hover { rotate: 0deg; transform: scale(1.04); }
.sticky small { display: block; margin-top: 10px; font: 500 11px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; font-style: normal; opacity: 0.7; }
.hero__scroll { position: absolute; left: 50%; bottom: calc(var(--dock-space) - 24px); translate: -50% 0; display: none; }

/* =========================================================
   Page sections
   ========================================================= */
.section--tight { padding-top: clamp(60px, 10vh, 110px); padding-bottom: clamp(60px, 10vh, 110px); }
.section__row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.more { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 14px; font-weight: 500; transition: background-color 0.3s, gap 0.4s var(--ease); }
.more:hover { background: var(--win); gap: 12px; }
.intro { font-size: clamp(1.7rem, 3.6vw, 3.6rem); line-height: 1.1; letter-spacing: -0.035em; max-width: 24ch; }
.page-head { padding: calc(var(--menubar) + clamp(80px, 14vh, 150px)) var(--pad) clamp(40px, 6vh, 64px); display: grid; gap: 22px; }
.page-head .h1 { font-size: clamp(3.2rem, 9vw, 9rem); line-height: 0.9; letter-spacing: -0.055em; font-weight: 500; }
.page-head .lede { font-size: clamp(16px, 1.4vw, 20px); }
/* Sections far below the fold skip rendering until needed. */
.cv-auto { content-visibility: auto; contain-intrinsic-size: auto 900px; }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.project { min-width: 0; }
.project .win__body { display: grid; }
.project__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--media); isolation: isolate; border-bottom: 1px solid var(--line); }
.art { position: absolute; inset: -6% -18%; transition: scale 1.4s var(--ease); will-change: transform; }
.project:hover .art { scale: 1.05; }
.project__glyph {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  font-family: var(--serif); font-style: italic; font-size: clamp(4rem, 9vw, 9rem); line-height: 1; color: var(--fg); opacity: 0.85;
  transition: transform 1.2s var(--ease);
}
.project:hover .project__glyph { transform: scale(1.08) rotate(-4deg); }
.art--panic {
  background:
    radial-gradient(38% 58% at 58% 50%, rgba(255, 138, 61, 0.85), transparent 70%),
    radial-gradient(30% 40% at 30% 30%, rgba(255, 214, 64, 0.8), transparent 70%),
    repeating-linear-gradient(100deg, transparent 0 22px, var(--line) 22px 23px);
}
.art--heart {
  background:
    radial-gradient(40% 55% at 35% 45%, rgba(255, 120, 150, 0.75), transparent 70%),
    radial-gradient(40% 50% at 70% 65%, rgba(255, 214, 64, 0.85), transparent 70%);
}
.art--heart::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 34px 34px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 34px 34px;
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, transparent); mask-image: radial-gradient(closest-side, #000 30%, transparent);
}
.art--site {
  background:
    radial-gradient(34% 48% at 30% 40%, rgba(255, 216, 77, 0.95), transparent 70%),
    radial-gradient(30% 44% at 72% 62%, rgba(61, 151, 242, 0.55), transparent 70%),
    radial-gradient(22% 30% at 60% 25%, rgba(40, 200, 64, 0.4), transparent 70%);
}
.project__info { display: grid; grid-template-columns: 1fr auto; row-gap: 10px; column-gap: 16px; padding: 20px 22px 24px; }
.project__title { font-size: clamp(1.4rem, 2vw, 2rem); font-weight: 600; letter-spacing: -0.03em; }
.project__year { color: var(--muted); align-self: center; }
.project__desc { grid-column: 1 / -1; color: var(--muted); max-width: 52ch; }
.tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 4px 10px; border-radius: 999px; font-size: 11px; background: var(--win-2); border: 1px solid var(--line); color: var(--muted); }

/* =========================================================
   Launchpad (home)
   ========================================================= */
.launch { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: clamp(18px, 3vw, 36px) 12px; }
.launch a { display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 14px; font-weight: 500; }
.launch svg { width: clamp(64px, 7vw, 84px); height: auto; border-radius: 23%; box-shadow: 0 10px 22px -8px rgba(120, 88, 0, 0.4); transition: transform 0.5s var(--spring); }
.launch a:hover svg { transform: translateY(-6px) scale(1.06); }
.launch a:active svg { transform: scale(0.94); }
.launch small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: -6px; }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: clamp(28px, 4vw, 48px); }
.cta h2 { font-size: clamp(2rem, 4.4vw, 4rem); letter-spacing: -0.045em; line-height: 1; font-weight: 500; }
.cta__btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .mac-btn { margin: 0; padding: 10px 18px; font-size: 15px; }

/* =========================================================
   Case studies (/work)
   ========================================================= */
.case { scroll-margin-top: calc(var(--menubar) + 24px); }
.case + .case { margin-top: clamp(40px, 7vh, 80px); }
.case .win__body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.case .project__media { aspect-ratio: auto; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--line); }
.case__body { padding: clamp(22px, 3vw, 40px); display: grid; gap: 18px; align-content: start; }
.case__title { font-size: clamp(2rem, 3.6vw, 3.2rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.case__meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); }
.case h4 { font: 600 11px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin: 6px 0 -8px; }
.case ul.points { display: grid; gap: 8px; }
.case ul.points li { position: relative; padding-left: 20px; }
.case ul.points li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.case__links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.case__links .mac-btn { margin: 0; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 14px; }
.keys dt { text-align: right; }
.keys dd { margin: 0; color: var(--muted); }

/* =========================================================
   Stats (/stats)
   ========================================================= */
.stats-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(16px, 2vw, 24px); }
.stats-grid > .win { grid-column: span 6; }
.stats-grid > .win--wide { grid-column: 1 / -1; }
.stat-body { padding: clamp(18px, 2.4vw, 28px); display: grid; gap: 18px; align-content: start; }
.big-n { font-size: clamp(4rem, 8vw, 7rem); line-height: 0.85; font-weight: 300; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { padding: 16px; border-radius: 12px; background: var(--win-2); border: 1px solid var(--line); display: grid; gap: 4px; }
.tile b { font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 400; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12px; color: var(--muted); }
.gh__bar { display: flex; height: 10px; border-radius: 99px; overflow: hidden; gap: 2px; background: var(--line); }
.gh__bar i { display: block; min-width: 4px; }
.gh__langs { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.gh__langs li { display: flex; align-items: center; gap: 6px; }
.gh__langs i { width: 9px; height: 9px; border-radius: 50%; }
.gh__repos { display: grid; }
.gh__repos a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); transition: padding 0.4s var(--ease); }
.gh__repos a:hover { padding-left: 6px; }

/* =========================================================
   About (/about)
   ========================================================= */
.now { display: grid; gap: 2px; }
.now li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--line); }
.now li:first-child { border-top: 0; }
.now .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 16px; background: var(--win-2); border: 1px solid var(--line); }
.now b { display: block; font-weight: 600; }
.now span { color: var(--muted); font-size: 14.5px; }
.timeline { position: relative; display: grid; gap: 26px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); border-radius: 2px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--win); border: 3px solid var(--accent); }
.timeline .when { font: 500 11px var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.timeline b { display: block; font-size: 17px; font-weight: 600; margin: 2px 0; }
.timeline p { color: var(--muted); font-size: 14.5px; max-width: 52ch; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.pad-body { padding: clamp(20px, 2.6vw, 32px); }

/* =========================================================
   LeetCode
   ========================================================= */
.lc__win .win__body { padding: clamp(16px, 2vw, 24px); display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); }
.panel { display: flex; flex-direction: column; gap: 18px; padding: clamp(18px, 2vw, 26px); border-radius: 12px; background: var(--win-2); border: 1px solid var(--line); }
.lc__big { font-size: clamp(5rem, 10vw, 9rem); line-height: 0.8; font-weight: 300; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.lc__split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: auto; }
.lc__diff { display: grid; gap: 6px; }
.lc__diff span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.lc__diff span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.lc__diff b { font-size: 1.7rem; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lc__diff--easy { --c: var(--green); } .lc__diff--med { --c: var(--yellow); } .lc__diff--hard { --c: var(--red); }
.lc__cal { grid-column: 1 / -1; }
.lc__cal-head { display: flex; justify-content: space-between; gap: 12px; }
.lc__cal-head b { color: var(--fg); font-weight: 600; }
.lc__months { display: grid; gap: 3px; font-size: 10px; color: var(--muted); }
.lc__months span { white-space: nowrap; }
.lc__heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: minmax(0, 1fr); gap: 3px; width: 100%; }
.lc__heat i {
  display: block; aspect-ratio: 1; border-radius: 3px; background: var(--heat-0);
  opacity: 0; transform: scale(0.4); transition: opacity 0.5s var(--ease), transform 0.6s var(--spring);
  transition-delay: calc(var(--d, 0) * 6ms);
}
.lc__heat i[data-l="1"] { background: var(--heat-1); }
.lc__heat i[data-l="2"] { background: var(--heat-2); }
.lc__heat i[data-l="3"] { background: var(--heat-3); }
.lc__heat i[data-l="4"] { background: var(--heat-4); }
.lc__win.in .lc__heat i { opacity: 1; transform: none; }
.lc__legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 11px; }
.lc__legend i { width: 10px; height: 10px; border-radius: 2px; }
.lc__legend i:nth-child(1) { background: var(--heat-0); } .lc__legend i:nth-child(2) { background: var(--heat-1); }
.lc__legend i:nth-child(3) { background: var(--heat-2); } .lc__legend i:nth-child(4) { background: var(--heat-3); }
.lc__legend i:nth-child(5) { background: var(--heat-4); }
.lc__list { display: grid; }
.lc__list li + li { border-top: 1px solid var(--line); }
.lc__list a { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; transition: padding 0.5s var(--ease); }
.lc__list a:hover { padding-left: 6px; }
.lc__list .mono { color: var(--muted); font-size: 11px; white-space: nowrap; }
.lc__profile { margin-top: auto; color: var(--muted); }
.lc__profile:hover { color: var(--fg); }

/* =========================================================
   Toolkit
   ========================================================= */
.toolkit { padding: clamp(80px, 14vh, 160px) 0; overflow: hidden; }
.toolkit__label { display: block; padding: 0 var(--pad) 36px; }
.marquee { overflow: hidden; white-space: nowrap; }
.marquee__inner { display: inline-flex; align-items: center; animation: marquee 48s linear infinite; }
.marquee[data-dir="1"] .marquee__inner { animation-direction: reverse; animation-duration: 56s; }
.marquee:hover .marquee__inner { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee span, .marquee i { font-size: clamp(3rem, 9vw, 9rem); line-height: 1.05; letter-spacing: -0.045em; font-weight: 500; padding: 0 0.22em; font-style: normal; }
.marquee i { font-size: clamp(1.4rem, 3vw, 3rem); color: var(--accent); }
:root[data-theme="light"] .marquee i { color: #fffdf3; text-shadow: 0 2px 10px rgba(120, 88, 0, 0.25); }
.marquee--outline span { color: transparent; -webkit-text-stroke: 1.2px rgba(var(--fg-rgb), 0.45); }

/* =========================================================
   Playground
   ========================================================= */
.play__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.toy .win__body { display: grid; }
.toy__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; display: grid; place-items: center; border-bottom: 1px solid var(--line); }
.toy__media--stack { background: radial-gradient(80% 70% at 50% 100%, rgba(255, 214, 64, 0.35), transparent 70%), var(--media); }
.toy__media--draw { background: radial-gradient(60% 60% at 50% 50%, rgba(255, 190, 60, 0.25), transparent 70%), #16140e; }
.toy__media--term { background: #14120c; place-items: start; padding: 22px; }
.mini-term { margin: 0; font: 13px/1.6 var(--mono); color: #f8f1d8; white-space: pre-wrap; }
.mini-term .y { color: #ffd84d; }
.mini-term i { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: #f8f1d8; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.toy code { font: 0.9em var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--win-2); }
.toy__info { display: grid; gap: 6px; padding: 20px 22px 24px; }
.toy__title { font-size: clamp(1.5rem, 2.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.03em; }
.toy .toy__media > * { transition: transform 1.2s var(--ease); }
.toy:hover .toy__media > * { transform: scale(1.06); }
.mini-stack { position: relative; width: 44%; height: 70%; }
.mini-stack i {
  position: absolute; left: 50%; bottom: calc(var(--n) * 11%); width: calc(100% - var(--n) * 4%); height: 11%;
  translate: -50% 0; border-radius: 3px;
  background: hsl(calc(48 + var(--n) * 9) 90% calc(66% + var(--n) * 1.5%));
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
  animation: mini-drop 6s var(--ease) infinite; animation-delay: calc(var(--n) * 0.35s);
}
.mini-stack i:nth-child(1) { --n: 0; } .mini-stack i:nth-child(2) { --n: 1; } .mini-stack i:nth-child(3) { --n: 2; }
.mini-stack i:nth-child(4) { --n: 3; } .mini-stack i:nth-child(5) { --n: 4; } .mini-stack i:nth-child(6) { --n: 5; }
.mini-stack i:nth-child(7) { --n: 6; }
@keyframes mini-drop { 0% { transform: translateX(-120%); opacity: 0; } 12%, 88% { transform: none; opacity: 1; } 100% { transform: none; opacity: 0; } }
.mini-kaleido { position: relative; width: 58%; aspect-ratio: 1; animation: spin 40s linear infinite; }
.mini-kaleido i {
  position: absolute; left: 50%; top: 50%; width: 46%; height: 18%;
  border-radius: 50% 50% 50% 0 / 60% 60% 40% 40%; transform-origin: 0 0; rotate: calc(var(--n) * 45deg);
  background: linear-gradient(90deg, rgba(255, 224, 102, 0.95), rgba(255, 140, 90, 0.7), transparent); mix-blend-mode: screen;
}
.mini-kaleido i:nth-child(1) { --n: 0; } .mini-kaleido i:nth-child(2) { --n: 1; } .mini-kaleido i:nth-child(3) { --n: 2; }
.mini-kaleido i:nth-child(4) { --n: 3; } .mini-kaleido i:nth-child(5) { --n: 4; } .mini-kaleido i:nth-child(6) { --n: 5; }
.mini-kaleido i:nth-child(7) { --n: 6; } .mini-kaleido i:nth-child(8) { --n: 7; }
@keyframes spin { to { rotate: 360deg; } }

/* =========================================================
   About This Hamza
   ========================================================= */
.about { display: grid; place-items: center; }
.about__win { width: min(760px, 100%); }
.about__win .win__body { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; padding: clamp(24px, 4vw, 48px); }
.orb {
  width: clamp(110px, 16vw, 170px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fffbe0 0%, #ffe066 32%, #f5b800 70%, #c98600 100%);
  box-shadow: inset -10px -14px 30px rgba(150, 90, 0, 0.35), 0 20px 40px -18px rgba(150, 100, 0, 0.6);
  display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: clamp(3.6rem, 6vw, 5.4rem); color: #3a2c00;
}
.about__name { font-size: clamp(2rem, 4vw, 3rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.about__sub { color: var(--muted); margin: 6px 0 22px; }
.specs { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; row-gap: 7px; font-size: 14.5px; }
.specs dt { font-weight: 600; text-align: right; }
.specs dd { margin: 0; color: var(--muted); }
.mac-btn {
  display: inline-flex; align-items: center; justify-content: center; margin-top: 24px; padding: 6px 16px;
  border-radius: 7px; font-size: 13.5px; font-weight: 500; cursor: pointer;
  background: var(--win); border: 1px solid var(--line); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: background-color 0.2s;
}
.mac-btn:hover { background: var(--win-2); }
.about__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.about__btns .mac-btn { margin: 0; }
.footer__spark { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.footer__spark:hover { color: var(--fg); }
.footer__spark span:first-child { color: var(--accent); }
.mac-btn--primary { background: #1f6fff; border-color: #1f6fff; color: #fff; }
.mac-btn--primary:hover { background: #3d82ff; }

/* =========================================================
   Contact (Mail)
   ========================================================= */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.contact__title { font-size: clamp(3rem, 7.4vw, 7.8rem); line-height: 0.94; letter-spacing: -0.05em; font-weight: 500; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.socials button { font: inherit; cursor: pointer; color: inherit; }
.socials a, .socials button { display: inline-flex; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); font-size: 14px; transition: background-color 0.3s; }
.socials a:hover, .socials button:hover { background: var(--win); }
.footer--slim { padding-top: 40px; }
.footer--slim .footer__bar { border-top: 0; }
.mail .win__bar { justify-content: space-between; }
.mail__send { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 26px; border: 0; border-radius: 6px; background: transparent; cursor: pointer; color: var(--muted); }
.mail__send:hover { background: rgba(var(--fg-rgb), 0.08); color: #1f6fff; }
.mail__send svg { width: 17px; height: 17px; }
.mail__row { display: flex; gap: 8px; align-items: baseline; padding: 11px 20px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.mail__row span { color: var(--muted); min-width: 60px; }
.mail__row input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; color: var(--fg); outline: none; padding: 0; }
.mail textarea {
  display: block; width: 100%; min-height: 200px; resize: vertical; border: 0; outline: none;
  padding: 16px 20px; background: none; color: var(--fg); font: 15.5px/1.55 var(--sans);
}
.mail textarea::placeholder, .mail__row input::placeholder { color: var(--muted); opacity: 0.7; }
.mail__foot { display: flex; justify-content: flex-end; padding: 0 16px 16px; }
.mail__foot .mac-btn { margin: 0; }

/* =========================================================
   Footer
   ========================================================= */
.footer { padding: 0 var(--pad) var(--dock-space); overflow: hidden; }
.footer__mark { font-size: 25.6vw; font-weight: 600; line-height: 0.76; letter-spacing: -0.035em; text-align: center; margin: 0 -0.02em; padding-top: 0.04em; overflow: hidden; }
.footer__mark .ch { display: inline-block; transform: translateY(100%); transition: transform 1.4s var(--ease); transition-delay: calc(var(--i) * 70ms); }
.footer__mark.in .ch { transform: none; }
.footer__mark.reveal { opacity: 1; transform: none; }
.footer__bar { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); }
.footer__bar a:hover { color: var(--fg); }

/* =========================================================
   OS layer: menus, Spotlight, context menu, sleep, confetti
   ========================================================= */
.menu {
  position: fixed; z-index: 260; min-width: 230px; padding: 5px; margin: 0; inset: auto;
  border-radius: 11px; border: 1px solid var(--line); background: var(--bar); color: var(--fg);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.35);
  font-size: 13.5px; opacity: 1; transform: none;
  transition: opacity 0.18s, transform 0.25s var(--ease), display 0.25s allow-discrete, overlay 0.25s allow-discrete;
}
.menu:not(:popover-open) { opacity: 0; transform: translateY(-4px) scale(0.98); }
@starting-style { .menu:popover-open { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.menu button, .menu a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%;
  padding: 5px 10px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.menu button:hover, .menu a:hover, .menu button:focus-visible, .menu a:focus-visible { background: #2f7bff; color: #fff; outline: 0; }
.menu kbd { background: none; border: 0; box-shadow: none; color: var(--muted); font-weight: 500; }
.menu button:hover kbd, .menu a:hover kbd { color: rgba(255, 255, 255, 0.8); }
.menu hr { border: 0; height: 1px; margin: 5px 8px; background: var(--line); }

.spot {
  position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; height: 100%; max-width: none; max-height: none; border: 0; background: transparent; z-index: 300;
  display: grid; place-items: start center; padding-top: 14vh;
}
.spot:not([open]) { display: none; }
.spot::backdrop { background: rgba(20, 16, 4, 0.18); backdrop-filter: blur(2px); }
.spot__box {
  width: min(640px, calc(100vw - 32px)); border-radius: 18px; overflow: hidden;
  background: var(--bar); border: 1px solid var(--line); color: var(--fg);
  backdrop-filter: blur(34px) saturate(180%); -webkit-backdrop-filter: blur(34px) saturate(180%);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.5);
  animation: spot-in 0.35s var(--spring);
}
@keyframes spot-in { from { opacity: 0; transform: translateY(-10px) scale(0.97); } }
.spot__field { display: flex; align-items: center; gap: 12px; padding: 16px 18px; }
.spot__field svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.spot__field input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font: 400 22px var(--sans); letter-spacing: -0.02em; }
.spot__list { max-height: min(50vh, 420px); overflow: auto; padding: 6px; border-top: 1px solid var(--line); }
.spot__list:empty { display: none; }
.spot__group { padding: 8px 12px 4px; font: 600 11px var(--sans); color: var(--muted); }
.spot__item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; border: 0; border-radius: 9px; background: none; color: inherit; font: inherit; font-size: 15px; text-align: left; cursor: pointer; }
.spot__item[aria-selected="true"] { background: #2f7bff; color: #fff; }
.spot__item .spot__ico { width: 28px; height: 28px; flex: none; border-radius: 7px; display: grid; place-items: center; font-size: 14px; background: var(--win-2); color: var(--fg); }
.spot__item .spot__ico svg { width: 100%; height: 100%; }
.spot__item small { margin-left: auto; color: var(--muted); font-size: 12px; }
.spot__item[aria-selected="true"] small { color: rgba(255, 255, 255, 0.8); }

.overlay { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; text-align: center; color: #fff; background: #000; opacity: 0; transition: opacity 0.8s var(--ease); cursor: pointer; }
.overlay.show { opacity: 1; }
.overlay--lock { background: linear-gradient(160deg, var(--wall-1), var(--wall-2) 50%, var(--wall-3)); color: var(--fg); }
.lock__time { font-size: clamp(5rem, 16vw, 11rem); font-weight: 600; letter-spacing: -0.05em; line-height: 1; }
.lock__date { font-size: 20px; font-weight: 500; margin-top: 8px; }
.lock__hint { margin-top: 40px; font-size: 13px; opacity: 0.7; }
.overlay--off p { font-size: 15px; opacity: 0.6; }
.power { width: 64px; height: 64px; margin: 24px auto 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.25); display: grid; place-items: center; color: #fff; background: none; cursor: pointer; }
.power svg { width: 26px; height: 26px; }
.confetti { position: fixed; inset: 0; z-index: 450; pointer-events: none; }
.sticky.sticky-new { position: absolute; z-index: 20; right: auto; bottom: auto; width: 200px; min-height: 150px; padding: 26px 16px 16px; rotate: -1.5deg; font-size: 20px; }
.sticky__grip { position: absolute; left: 0; right: 0; top: 0; height: 20px; cursor: grab; background: rgba(0, 0, 0, 0.05); border-radius: 4px 4px 0 0; }
.sticky__x { position: absolute; top: 1px; right: 4px; border: 0; background: none; color: #3a3316; font-size: 16px; line-height: 1; cursor: pointer; opacity: 0.4; }
.sticky__x:hover { opacity: 1; }
.sticky__text { outline: none; min-height: 100px; cursor: text; }
.sticky__text:empty::before { content: "Write something…"; opacity: 0.45; }

/* =========================================================
   Cursor bubble (only over projects and toys)
   ========================================================= */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 180; pointer-events: none; display: none;
  width: 96px; height: 96px; border-radius: 50%; place-items: center;
  background: var(--fg); color: var(--bg);
  scale: 0; transition: scale 0.45s var(--spring);
}
.has-cursor .cursor { display: grid; }
.cursor.is-view { scale: 1; }
.cursor__label { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }

/* =========================================================
   Page transitions
   ========================================================= */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out 0.4s var(--ease) both; }
::view-transition-new(root) { animation: vt-in 0.6s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: scale(0.98); filter: blur(6px); } }
@keyframes vt-in { from { opacity: 0; transform: scale(1.02); filter: blur(6px); } }

/* =========================================================
   App pages (play, draw) and 404
   ========================================================= */
.app { height: 100vh; height: 100dvh; overflow: hidden; overscroll-behavior: none; }
.app-win {
  position: fixed; left: var(--pad); right: var(--pad);
  top: calc(var(--menubar) + 18px); bottom: calc(var(--dock-space) - 4px);
  transition: inset 0.7s var(--ease), border-radius 0.7s var(--ease);
}
.app-win.is-zoomed { left: 0; right: 0; top: var(--menubar); bottom: 0; border-radius: 0; }
.app-win .win__body { overflow: hidden; touch-action: none; }
.app-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hud { position: absolute; left: 50%; translate: -50% 0; z-index: 2; pointer-events: none; display: grid; justify-items: center; gap: 8px; text-align: center; }
.glass { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(16px) saturate(160%); -webkit-backdrop-filter: blur(16px) saturate(160%); border-radius: 999px; }
.icon-btn {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  font: 500 11px var(--mono); letter-spacing: 0.04em; text-transform: uppercase; cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}
.icon-btn:hover { background: rgba(var(--fg-rgb), 0.1); }
.icon-btn[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.alert-wrap { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: calc(var(--menubar) + 24px) var(--pad) var(--dock-space); }
.alert { width: min(380px, 100%); padding: 28px 26px 22px; text-align: center; border-radius: 18px; }
.alert__icon { width: 64px; height: 64px; margin: 0 auto 16px; }
.alert h1 { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.alert p { color: var(--muted); font-size: 14px; margin: 8px 0 20px; }
.alert .mac-btn { width: 100%; margin: 0; padding: 8px 16px; }
.alert .mac-btn + .mac-btn { margin-top: 8px; }
.big-404 { position: fixed; inset: 0; z-index: -1; display: grid; place-items: center; font-size: 42vw; font-weight: 700; letter-spacing: -0.08em; color: rgba(var(--fg-rgb), 0.06); pointer-events: none; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 900px) {
  :root { --dock-space: 88px; }
  .menubar .menubar__item { display: none; }
  .menubar__date { display: none; }
  .dock { gap: 4px; padding: 6px; border-radius: 18px; }
  .dock__icon { width: 40px; height: 40px; }
  .dock__extra { display: none; }

  .hero__inner { grid-template-columns: 1fr; align-content: center; gap: 40px; }
  .desk { height: auto; display: grid; gap: 18px; }
  .desk > * { position: relative; left: auto; right: auto; top: auto; bottom: auto; }
  .clocks { display: none; }
  .hero__hint { display: none; }
  .sparks__n { display: none; }
  .note { width: 100%; }
  .sticky { justify-self: end; margin-top: -30px; margin-right: 8px; }

  .feature-grid, .two-col { grid-template-columns: 1fr; }
  .case .win__body { grid-template-columns: 1fr; }
  .case .project__media { min-height: 220px; border-right: 0; border-bottom: 1px solid var(--line); }
  .stats-grid > .win { grid-column: 1 / -1; }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .launch { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px 6px; }
  .launch a { font-size: 12.5px; }
  .launch small { display: none; }

  .lc__win .win__body { grid-template-columns: minmax(0, 1fr); }
  .play__grid { grid-template-columns: 1fr; }
  .menubar__icon[data-spotlight] { display: none; }
  .about__win .win__body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .specs { text-align: left; }
  .contact__grid { grid-template-columns: 1fr; }
  .app-win { left: 8px; right: 8px; top: calc(var(--menubar) + 8px); }
}

:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
:root[data-motion="reduce"] .loader { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .loader { display: none; }
  .reveal { opacity: 1; transform: none; }
}
