/* ============================================================
   THEME
   ============================================================ */
:root {
  --bg: #F3ECE1;
  --gingham: rgba(110, 152, 214, .38);  /* wallpaper check color */
  --paper: #FFFDF8;
  --ink: #2A2320;
  --muted: #6E5F55;
  --hl: #FCE48A;
  --red: #C2412B;

  --serif: 'Newsreader', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --hand: 'Caveat', cursive;

  --bar-h: 34px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden;
  color: var(--ink); font-family: var(--sans);
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, var(--gingham) 50%, transparent 50%),
    linear-gradient(var(--gingham) 50%, transparent 50%);
  background-size: 64px 64px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; }
a { color: inherit; }
mark { background: linear-gradient(transparent 14%, var(--hl) 14%, var(--hl) 88%, transparent 88%); color: inherit; padding: 0 .12em; }
.mini { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hand { font-family: var(--hand); font-size: 24px; margin: 0 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ============================================================
   MENU BAR
   ============================================================ */
.menubar {
  position: fixed; inset: 0 0 auto 0; z-index: 9000; height: var(--bar-h);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 0 14px;
  background: rgba(255, 253, 248, .72); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid rgba(42, 35, 32, .12);
  font-size: 13px;
}
.menubar-left, .menubar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.logo { display: inline-flex; color: var(--red); }
.menubar-name { font-weight: 700; white-space: nowrap; }
.menubar-links { display: flex; gap: 2px; }
.menubar-links button {
  background: none; border: 0; padding: 4px 9px; border-radius: 6px; cursor: pointer; min-height: 28px;
}
.menubar-links button:hover, .menubar-links button:focus-visible { background: rgba(42, 35, 32, .08); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(63, 163, 77, .14); font-family: var(--mono); font-size: 11px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #3FA34D; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(63,163,77,.5); } 70%, 100% { box-shadow: 0 0 0 7px rgba(63,163,77,0); } }
#menu-clock { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ============================================================
   DESK
   ============================================================ */
.desk { position: fixed; inset: var(--bar-h) 0 0 0; }

.watermark {
  position: absolute; left: 50%; bottom: 120px; translate: -50% 0; margin: 0;
  font-family: var(--serif); font-size: clamp(56px, 9vw, 140px); line-height: 1; white-space: nowrap;
  color: rgba(42, 35, 32, .09); pointer-events: none; user-select: none;
}
.watermark em { font-style: italic; }

/* ---------- widgets ---------- */
.widgets { position: absolute; left: 22px; top: 22px; display: flex; flex-direction: column; gap: 14px; width: 250px; z-index: 2; }
.widget {
  display: block; background: rgba(255, 253, 248, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid var(--ink); border-radius: 20px; padding: 14px 16px; text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
}
.w-clock { display: flex; flex-direction: column; gap: 2px; }
.big-clock { font-family: var(--serif); font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.w-now dl { margin: 8px 0 0; display: grid; gap: 6px; }
.w-now dl div { display: grid; grid-template-columns: 76px 1fr; gap: 8px; font-size: 14px; }
.w-now dt { font-family: var(--mono); font-size: 11px; color: var(--muted); padding-top: 2px; }
.w-now dd { margin: 0; }
.w-music { display: flex; align-items: center; gap: 12px; transition: translate .2s ease, box-shadow .2s ease; }
.w-music:hover { translate: -2px -2px; box-shadow: 6px 6px 0 var(--ink); }
.album { flex: none; width: 48px; height: 48px; border-radius: 10px; border: 1.5px solid var(--ink); background: conic-gradient(from 45deg, #F3A9B8, #F6D98A, #B9D3A8, #A9C1E8, #F3A9B8); }
.music-text { display: flex; flex-direction: column; min-width: 0; font-size: 13px; line-height: 1.3; }
.music-text strong { font-size: 15px; }
.eq { margin-left: auto; display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.eq i { width: 3px; background: var(--ink); border-radius: 2px; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; } .eq i:nth-child(3) { animation-delay: -.6s; } .eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 5px; } 50% { height: 20px; } }

/* ---------- icons ---------- */
.icon {
  position: absolute; left: var(--x); top: var(--y); z-index: 3;
  width: 112px; padding: 8px 4px; background: none; border: 0; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
}
.icon:hover .ico, .icon:focus-visible .ico { translate: 0 -3px; }
.icon:focus-visible { outline: none; background: rgba(169, 193, 232, .45); }
.icon.dragging { cursor: grabbing; z-index: 50; }
.icon.dragging .ico { scale: 1.06; }
.ico { display: block; width: 76px; height: 64px; transition: translate .2s ease, scale .2s ease; filter: drop-shadow(0 4px 4px rgba(42,35,32,.18)); }
.ico svg { width: 100%; height: 100%; }
.ico-photo {
  width: 64px; height: 72px; padding: 5px 5px 14px; background: var(--paper); border: 1.5px solid var(--ink); rotate: -4deg;
}
.ico-photo span {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  background: #DCCFBE repeating-linear-gradient(135deg, rgba(42,35,32,.08) 0 2px, transparent 2px 8px);
  font-family: var(--mono); font-size: 9px; color: var(--muted);
}
.label {
  max-width: 100%; padding: 2px 8px; border-radius: 6px;
  background: rgba(255, 253, 248, .8); font-size: 13px; font-weight: 500; line-height: 1.3; text-align: center;
}
.icon:focus-visible .label { background: #3B5BA9; color: #fff; }

/* ============================================================
   WINDOWS
   ============================================================ */
.win {
  position: absolute; z-index: 100;
  width: min(var(--w, 600px), calc(100vw - 32px));
  max-height: calc(100vh - var(--bar-h) - 110px);
  display: flex; flex-direction: column;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 16px;
  box-shadow: 8px 8px 0 var(--ink), 0 24px 60px rgba(42, 35, 32, .18);
  animation: pop .22s cubic-bezier(.2, 1.2, .4, 1);
}
.win[hidden] { display: none; }
.win:not(.active) { box-shadow: 5px 5px 0 rgba(42,35,32,.55), 0 12px 30px rgba(42, 35, 32, .12); }
@keyframes pop { from { opacity: 0; scale: .94; } to { opacity: 1; scale: 1; } }

.win-bar {
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 10px 8px 16px; background: var(--tint); border-bottom: 1.5px solid var(--ink);
  border-radius: 14px 14px 0 0; cursor: grab; touch-action: none; user-select: none;
}
.win-bar:active { cursor: grabbing; }
.win-title { font-family: var(--mono); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-close {
  flex: none; min-height: 32px; padding: 0 12px; cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px;
  font-family: var(--mono); font-size: 12px;
}
.win-close:hover, .win-close:focus-visible { background: var(--ink); color: var(--paper); }
.win-body { padding: 20px 22px 22px; overflow: auto; }
.win h2 { margin: 6px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.05; }

/* about */
.about-body { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; align-items: start; }
.about-photo {
  aspect-ratio: 4 / 5; border-radius: 12px; border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  background: #DCCFBE repeating-linear-gradient(135deg, rgba(42,35,32,.07) 0 2px, transparent 2px 12px);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.about-body img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--ink); }
.about-text p { margin: 0 0 12px; font-family: var(--mono); font-size: 14px; line-height: 1.7; }
.facts { list-style: none; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--muted); display: grid; gap: 6px; font-size: 14px; }
.facts span { display: inline-block; width: 92px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-transform: uppercase; }

/* file list */
.filelist { width: 100%; border-collapse: collapse; font-size: 14px; }
.filelist th { text-align: left; font-family: var(--mono); font-size: 11px; font-weight: 400; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px; border-bottom: 1.5px solid var(--ink); }
.filelist td { padding: 4px 8px; border-bottom: 1px solid #E7DED1; }
.filelist tr:nth-child(even) td { background: #FAF5EC; }
.filelist button { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; background: none; border: 0; padding: 0; cursor: pointer; font-weight: 600; text-align: left; }
.filelist button:hover { text-decoration: underline; }
.sw { width: 16px; height: 12px; border: 1.5px solid var(--ink); border-radius: 3px; }

/* project */
.cover {
  aspect-ratio: 16 / 9; margin-bottom: 16px; border-radius: 12px; border: 1.5px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  background: var(--tint) repeating-linear-gradient(135deg, rgba(255,255,255,.35) 0 2px, transparent 2px 14px);
  font-family: var(--mono); font-size: 12px; color: var(--ink);
}
.win-body > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; border: 1.5px solid var(--ink); margin-bottom: 16px; }
.chips { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; font-family: var(--mono); font-size: 11px; }
.story { margin: 0 0 20px; display: grid; gap: 10px; }
.story div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; font-size: 15px; line-height: 1.5; }
.story dt { font-family: var(--mono); font-size: 11px; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.story dd { margin: 0; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  background: var(--ink); color: var(--paper); border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px;
}
.btn:hover { background: var(--red); }

/* résumé */
.timeline { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 10px; font-size: 15px; }
.timeline span { display: inline-block; width: 100px; font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* messages */
.chat { display: flex; flex-direction: column; gap: 8px; background: #FAF5EC; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 18px 18px 18px 6px; background: var(--paper); border: 1.5px solid var(--ink); font-size: 14px; line-height: 1.45; animation: pop .3s both; }
.bubble:nth-child(2) { animation-delay: .25s; } .bubble:nth-child(3) { animation-delay: .5s; } .bubble:nth-child(4) { animation-delay: .75s; }
.bubble.me { align-self: flex-end; border-radius: 18px 18px 6px 18px; background: #C9C3F2; }
.bubble.links { display: flex; gap: 16px; }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; font-weight: 600; }
.composer { display: flex; gap: 8px; margin-top: 10px; }
.composer input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 16px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: var(--paper); font: 14px var(--sans); color: var(--ink);
}
.composer input:focus { outline: 2px solid #3B5BA9; outline-offset: 1px; }
.composer button { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: var(--paper); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.composer button:hover { background: var(--red); }

/* trash */
.trashlist { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 14px; color: var(--muted); }

/* ============================================================
   DOCK
   ============================================================ */
.dock {
  position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 8000;
  display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px;
  background: rgba(255, 253, 248, .6); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border: 1.5px solid var(--ink); border-radius: 22px; box-shadow: 4px 4px 0 var(--ink);
}
.dock button { position: relative; background: none; border: 0; padding: 0; cursor: pointer; }
.d {
  display: block; width: 48px; height: 48px; border-radius: 13px; border: 1.5px solid var(--ink);
  transition: scale .2s cubic-bezier(.2, 1.4, .4, 1), translate .2s cubic-bezier(.2, 1.4, .4, 1);
  transform-origin: bottom center;
}
.dock button:hover .d, .dock button:focus-visible .d { scale: 1.28; translate: 0 -6px; }
.dock button:focus-visible { outline: none; }
.dock button:focus-visible .d { outline: 3px solid #3B5BA9; outline-offset: 2px; }
.d-work  { background: #A9C1E8 linear-gradient(#2A2320, #2A2320) 50% 58% / 26px 2px no-repeat; }
.d-about { background: radial-gradient(circle at 50% 40%, #2A2320 6px, transparent 6.5px), radial-gradient(ellipse at 50% 100%, #2A2320 13px, transparent 13.5px), #F3A9B8; }
.d-msg   { background: radial-gradient(circle at 34% 50%, #2A2320 3px, transparent 3.5px), radial-gradient(circle at 50% 50%, #2A2320 3px, transparent 3.5px), radial-gradient(circle at 66% 50%, #2A2320 3px, transparent 3.5px), #C9C3F2; }
.d-cv    { background: repeating-linear-gradient(#FFFDF8 0 8px, #C9BBAA 8px 10px) 50% 60% / 26px 26px no-repeat, #F6D98A; }
.d-trash { background: linear-gradient(#2A2320, #2A2320) 50% 30% / 26px 2px no-repeat, linear-gradient(#FFFDF8, #FFFDF8) 50% 64% / 20px 20px no-repeat, #E7DED1; }
.dock-sep { width: 1.5px; align-self: stretch; margin: 4px 2px; background: rgba(42, 35, 32, .3); }
.tip {
  position: absolute; left: 50%; bottom: calc(100% + 16px); translate: -50% 4px;
  padding: 3px 10px; border-radius: 8px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s ease, translate .15s ease;
}
.dock button:hover .tip, .dock button:focus-visible .tip { opacity: 1; translate: -50% 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 96px; translate: -50% 12px; z-index: 9500;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease, translate .2s ease;
}
.toast.show { opacity: 1; translate: -50% 0; }

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

/* ============================================================
   SMALL LAPTOPS — tighten widgets
   ============================================================ */
@media (max-width: 1100px) and (min-width: 761px) {
  .widgets { width: 220px; }
  .w-now { display: none; }
}

/* ============================================================
   PHONES — becomes a home screen
   ============================================================ */
@media (max-width: 760px) {
  body { overflow: auto; }
  .menubar-links, .hide-sm, .menubar-name { display: none; }
  .menubar::before { content: ''; }
  .desk { position: static; padding: calc(var(--bar-h) + 16px) 16px 120px; }
  .watermark { display: none; }

  .widgets { position: static; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
  .w-now { grid-column: 1 / -1; order: 3; }
  .w-music { grid-column: 1 / -1; order: 2; }
  .w-clock { order: 1; grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .big-clock { font-size: 40px; }

  /* icons flow into a 4-column grid */
  .desk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 6px; align-content: start; }
  .widgets { grid-column: 1 / -1; }
  .icon { position: static; width: auto; padding: 4px 0; }
  .ico { width: 60px; height: 52px; }
  .ico-photo { width: 52px; height: 58px; }
  .label { font-size: 12px; background: rgba(255, 253, 248, .85); }

  /* windows open as full-screen sheets */
  .win {
    position: fixed; left: 0 !important; top: var(--bar-h) !important; right: 0; bottom: 0;
    width: 100%; max-height: none; border-radius: 18px 18px 0 0; border-bottom: 0; box-shadow: 0 -10px 40px rgba(42,35,32,.25);
    animation: sheet .3s cubic-bezier(.2, .9, .3, 1);
  }
  .win-bar { cursor: default; }
  .win-body { padding-bottom: 110px; }
  @keyframes sheet { from { translate: 0 40%; opacity: .4; } to { translate: 0 0; opacity: 1; } }
  .about-body { grid-template-columns: 1fr; }
  .about-photo, .about-body img { max-width: 220px; }
  .story div { grid-template-columns: 1fr; gap: 2px; }

  .dock { bottom: 12px; gap: 10px; padding: 8px 12px; }
  .d { width: 50px; height: 50px; }
  .tip { display: none; }
}

/* NASA cover art */
.cover-space { padding: 0; overflow: hidden; }
.cover-space svg { display: block; }


/* ============================================================
   NIGHT DESK — black background, blooming lily, pinboard
   ============================================================ */
body { background: #050505; background-image: none; color: var(--ink); }
.menubar { background: rgba(18, 18, 18, .72); border-bottom-color: rgba(255,255,255,.08); color: #EDE6DC; }
.menubar-links button:hover, .menubar-links button:focus-visible { background: rgba(255,255,255,.1); }
.status-pill { background: rgba(63,163,77,.22); color: #D9F0DC; }
.watermark { color: rgba(255,255,255,.06); z-index: 0; }
.label { background: rgba(255,253,248,.92); }

/* lily */
.lily { position: absolute; right: 3%; bottom: -2%; height: 96%; width: auto; z-index: 0; pointer-events: none; }
.lily .stem { stroke-dasharray: 700; stroke-dashoffset: 700; animation: grow 2.2s ease-out .2s forwards; }
.lily .leaf { opacity: 0; transform-box: fill-box; transform-origin: right center; animation: leafin 1.4s ease-out forwards; }
.lily .l1 { animation-delay: 1s; } .lily .l2 { transform-origin: left center; animation-delay: 1.3s; } .lily .l3 { animation-delay: .8s; }
.lily .flower { animation: sway 7s ease-in-out 6s infinite alternate; transform-origin: 0 200px; }
.lily .bloom { transform: rotate(-14deg); }
.lily .petal { transform: rotate(calc(var(--a) * .08)) scaleY(.62); animation: open 4.2s cubic-bezier(.3,.7,.2,1) calc(2s + var(--d)) forwards; }
.lily .stamens path { fill: none; stroke: #D8E6B8; stroke-width: 2.2; stroke-linecap: round; }
.lily .stamens circle { fill: #C8562C; }
.lily .stamens { opacity: 0; animation: fadein 1.6s ease-out 4.6s forwards; }
@keyframes grow { to { stroke-dashoffset: 0; } }
@keyframes leafin { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: scale(1); } }
@keyframes open { to { transform: rotate(var(--a)) scaleY(1); } }
@keyframes fadein { to { opacity: 1; } }
@keyframes sway { from { rotate: -1.5deg; } to { rotate: 1.5deg; } }

/* push pins */
.pin {
  position: absolute; left: var(--px); top: var(--py); translate: -50% 0; z-index: 4;
  width: 26px; height: 26px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 30%, #fff 0 18%, #d9d9d9 46%, #9a9a9a 100%);
  box-shadow: 0 3px 5px rgba(0,0,0,.45), inset 0 -2px 3px rgba(0,0,0,.18);
}
.pin.loose { z-index: 1; opacity: .9; }

/* the board */
.pinboard {
  position: absolute; left: 36px; top: 40px; z-index: 2;
  width: min(560px, 44vw); aspect-ratio: 560 / 410;
  background: #0E0E0E; border: 1.5px solid #3A3A3A;
  box-shadow: 0 30px 60px rgba(0,0,0,.6);
}
.pcard, .pphoto { position: absolute; padding: 0; border: 0; cursor: pointer; font: inherit; transition: translate .25s ease, rotate .25s ease; }
.pcard:hover, .pphoto:hover, .pcard:focus-visible, .pphoto:focus-visible { translate: 0 -4px; }
.pcard:focus-visible, .pphoto:focus-visible { outline: 3px solid #F2C14E; outline-offset: 4px; }
.pcard { background: #fff; box-shadow: 0 10px 24px rgba(0,0,0,.5); }
.pc1 { left: 7%; top: 9%; width: 38%; padding: 6% 4% 10%; text-align: left; }
.pc1 img { display: block; width: 100%; height: auto; }
.pcap { position: absolute; left: 6%; bottom: 4%; font-family: var(--mono); font-size: 10px; color: #6E5F55; }
.pc2 { left: 50%; top: 52%; width: 46%; aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; }
.pph { font-family: var(--mono); font-size: 12px; color: #6E5F55; }
.pphoto {
  left: -6%; top: 46%; width: 34%; aspect-ratio: 3 / 4; rotate: -5deg; z-index: 3;
  background: #fff; padding: 3% 3% 10%; box-shadow: 0 16px 30px rgba(0,0,0,.6);
}
.pphoto:hover { rotate: -2deg; }
.photo-ph, .pphoto img {
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; object-fit: cover;
  background: #DCCFBE repeating-linear-gradient(135deg, rgba(42,35,32,.08) 0 2px, transparent 2px 10px);
  font-family: var(--mono); font-size: 11px; color: #6E5F55;
}

@media (prefers-reduced-motion: reduce) {
  .lily .stem { stroke-dashoffset: 0; }
  .lily .leaf, .lily .stamens { opacity: 1; }
  .lily .petal { transform: rotate(var(--a)); }
}

/* phones: board on top, lily as a soft backdrop */
@media (max-width: 760px) {
  .lily { position: fixed; right: -20%; bottom: 0; height: 70vh; opacity: .55; }
  .pinboard { position: relative; left: auto; top: auto; grid-column: 1 / -1; width: 100%; margin: 12px 0 36px; }
  .pin.loose { display: none; }
}
@media (max-width: 760px) { .pphoto { left: 2%; } }

/* ============================================================
   BEIGE GARDEN — beige desk, several lilies blooming in turn
   ============================================================ */
body { background: #EDE3D2; background-image: radial-gradient(rgba(120, 96, 70, .14) 1px, transparent 1.4px); background-size: 26px 26px; }
.menubar { background: rgba(255, 251, 243, .75); border-bottom-color: rgba(42,35,32,.1); color: var(--ink); }
.menubar-links button:hover, .menubar-links button:focus-visible { background: rgba(42,35,32,.08); }
.status-pill { background: rgba(63,163,77,.16); color: var(--ink); }
.watermark { color: rgba(42,35,32,.07); }
.pinboard { box-shadow: 0 24px 50px rgba(60,40,20,.28); }
.pin.loose { box-shadow: 0 3px 5px rgba(60,40,20,.3); }

/* each lily: --x position, --h height, --t start delay, --tilt lean */
.lily { right: auto; left: var(--x); height: var(--h); bottom: -2%; rotate: var(--tilt, 0deg); transform-origin: 50% 100%; filter: drop-shadow(0 10px 16px rgba(60, 40, 20, .12)); }
.lily .stem { animation-delay: calc(var(--t, 0s) + .2s); }
.lily .l1 { animation-delay: calc(var(--t, 0s) + 1s); }
.lily .l2 { animation-delay: calc(var(--t, 0s) + 1.3s); }
.lily .l3 { animation-delay: calc(var(--t, 0s) + .8s); }
.lily .petal { animation-delay: calc(var(--t, 0s) + 2s + var(--d)); }
.lily .stamens { animation-delay: calc(var(--t, 0s) + 4.6s); }
.lily .flower { animation-delay: calc(var(--t, 0s) + 6s); }
.lily:not(.main) { opacity: .92; }

/* colors */

@media (max-width: 760px) {
  .lily { position: fixed; left: var(--mx, 0); right: auto; height: var(--mh, 60vh); bottom: 0; opacity: .6; }
  .lily.extra { display: none; }
}


/* ============================================================
   REALISTIC LILIES
   ============================================================ */
.lily .petal.back { filter: brightness(.9) saturate(1.05); }
.lily .bloom { filter: drop-shadow(0 6px 8px rgba(90, 30, 45, .18)); }
.lily .stamens path { stroke: #E6EDC4; stroke-width: 2.2; }
.lily .l4 { animation-delay: calc(var(--t, 0s) + 1.1s); transform-origin: left center; }
.lily .l5 { animation-delay: calc(var(--t, 0s) + 1.5s); transform-origin: right bottom; }
.lily .stem { stroke-dasharray: 720; stroke-dashoffset: 720; }


/* ============================================================
   PHOTOS
   ============================================================ */
.ico-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.pphoto img { object-position: 50% 30%; }
.pc2 img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.about-body .about-img { aspect-ratio: 4 / 5; margin-bottom: 0; object-position: 68% 32%; }
#win-p1 .win-body > img { object-position: 50% 35%; }


/* ICCSE paper cover */
.paper-cover {
  margin-bottom: 18px; padding: 26px 26px 22px; border: 1.5px solid var(--ink); border-radius: 12px;
  background: #FFFFFF linear-gradient(90deg, transparent 0 calc(100% - 6px), #3B5BA9 calc(100% - 6px));
  box-shadow: 4px 4px 0 #B9C8EC;
}
.paper-title { margin: 10px 0 12px; font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.paper-authors { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.paper-authors strong { color: var(--ink); font-weight: 600; }
.btn[aria-disabled="true"] { background: #8A7F76; cursor: default; pointer-events: none; }

/* abstract */
.abstract { margin: 0 0 20px; padding: 14px 18px; background: #F4F6FC; border: 1.5px solid #B9C8EC; border-radius: 12px; }
.abstract summary { cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; min-height: 28px; display: flex; align-items: center; }
.abstract p { margin: 10px 0 2px; font-family: var(--serif); font-size: 16.5px; line-height: 1.6; }

/* live demo frame */
.live-demo { margin: 4px 0 18px; border: 1.5px solid var(--ink); border-radius: 12px; overflow: hidden; background: #FAF5EC; }
.live-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #F6D98A; border-bottom: 1.5px solid var(--ink); font-family: var(--mono); font-size: 12px; }
.live-dots { display: flex; gap: 5px; } .live-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.2px solid var(--ink); background: var(--paper); }
.live-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 3px 10px; background: rgba(255,253,248,.8); border-radius: 999px; }
.live-open { white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; }
.live-stage { position: relative; height: min(460px, 55vh); }
.live-stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #fff; }
.live-start {
  position: absolute; inset: 0; width: 100%; display: flex; align-items: center; justify-content: center; gap: 16px;
  border: 0; cursor: pointer; text-align: left; font: 15px var(--sans); color: var(--ink);
  background: #FAF5EC repeating-linear-gradient(135deg, rgba(246,217,138,.35) 0 2px, transparent 2px 14px);
}
.live-play { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--ink); color: var(--paper); font-size: 20px; padding-left: 4px; transition: scale .2s ease; }
.live-start:hover .live-play, .live-start:focus-visible .live-play { scale: 1.08; }
.live-start:focus-visible { outline: 3px solid #3B5BA9; outline-offset: -3px; }
.live-loading { position: absolute; left: 50%; top: 50%; translate: -50% -50%; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* awards + video */
.awards { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.award { padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 13px; background: var(--paper); }
.award.gold { background: #F6E3A6; font-weight: 600; }
.media-split { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.phone-video { margin: 0; }
.phone-video video { display: block; width: 100%; aspect-ratio: 540 / 708; object-fit: cover; border-radius: 22px; border: 4px solid var(--ink); background: #111; }
.phone-video figcaption { margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: center; }
.live-bar { background: var(--tint); }
@media (max-width: 760px) { .media-split { grid-template-columns: 1fr; } .phone-video { max-width: 240px; } }

/* expo gallery */
.win h3.sub { margin: 26px 0 10px; font-family: var(--serif); font-weight: 400; font-size: 22px; }
.gallery { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; }
.gallery:focus-visible { outline: 3px solid #3B5BA9; outline-offset: 2px; border-radius: 8px; }
.gallery figure { flex: none; margin: 0; width: 230px; scroll-snap-align: start; }
.gallery figure.cert { width: 280px; }
.gallery img { display: block; width: 100%; height: 250px; object-fit: cover; border-radius: 10px; border: 1.5px solid var(--ink); background: #eee; }
.gallery figure.cert img { object-fit: contain; background: #fff; }
.gallery figcaption { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }

/* pinboard v2: clipping + captions */
.pc1 { padding: 4% 4% 9%; }
.pc1 img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border: 1px solid #ddd; }
.pc2 { overflow: visible; }
.pc2 img { object-position: 50% 30%; }
.pcap2 { position: absolute; left: 0; right: 0; top: 100%; margin-top: 6px; font-family: var(--mono); font-size: 10px; color: #E9E2D8; text-align: left; }
.clip {
  position: absolute; left: 54%; top: 9%; width: 38%; z-index: 2; rotate: 2.5deg;
  display: flex; flex-direction: column; gap: 6px; padding: 14px 14px 12px; text-decoration: none; color: #2A2320;
  background: #F4EFE2 repeating-linear-gradient(0deg, transparent 0 17px, rgba(42,35,32,.05) 17px 18px);
  box-shadow: 0 10px 22px rgba(0,0,0,.5);
  clip-path: polygon(0 2%, 6% 0, 14% 2%, 25% 0, 38% 2%, 52% 0, 66% 2%, 80% 0, 92% 2%, 100% 0, 99% 50%, 100% 100%, 88% 98%, 72% 100%, 58% 98%, 42% 100%, 27% 98%, 12% 100%, 0 98%, 1% 50%);
  transition: rotate .25s ease, translate .25s ease;
}
.clip:hover, .clip:focus-visible { rotate: 0deg; translate: 0 -4px; color: #2A2320; }
.clip:focus-visible { outline: 3px solid #F2C14E; outline-offset: 4px; }
.clip .pin { clip-path: none; }
.clip-mast { font-family: var(--mono); font-size: 9px; letter-spacing: .08em; border-bottom: 1.5px solid #2A2320; padding-bottom: 5px; }
.clip-head { font-family: var(--serif); font-size: clamp(12px, 1.15vw, 16px); line-height: 1.2; }
.clip-more { font-family: var(--mono); font-size: 10px; color: #8A3B2A; }

/* PVT window: press + quote */
.award-link { text-decoration: none; color: var(--ink); }
.award-link:hover { background: var(--ink); color: var(--paper); }
.quote { margin: 22px 0 0; padding: 16px 20px; border-left: 4px solid #A9C1E8; background: #F4F6FC; border-radius: 0 12px 12px 0; }
.quote p { margin: 0 0 8px; font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.quote cite { font-style: normal; font-size: 12px; color: var(--muted); }
.press { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.press a { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 44px 12px 16px; border: 1.5px solid var(--ink); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--paper); transition: translate .2s ease, box-shadow .2s ease; }
.press a:hover, .press a:focus-visible { translate: -2px -2px; box-shadow: 4px 4px 0 var(--ink); }
.press strong { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.25; }
.press-go { position: absolute; right: 16px; top: 50%; translate: 0 -50%; font-size: 18px; }
.pc1 .pcap { left: auto; right: 6%; }

/* ============================================================
   LILIES KEEP BLOOMING — open, hold, gently close, repeat
   ============================================================ */
.lily .petal { animation: bloomloop 12s ease-in-out calc(var(--t, 0s) + 2s + var(--d)) infinite; }
.lily .stamens { animation: stamloop 12s ease-in-out calc(var(--t, 0s) + 2s) infinite; }
@keyframes bloomloop {
  0%        { transform: rotate(calc(var(--a) * .08)) scaleY(.62); }
  35%, 72%  { transform: rotate(var(--a)) scaleY(1); }
  100%      { transform: rotate(calc(var(--a) * .08)) scaleY(.62); }
}
@keyframes stamloop {
  0%, 22%   { opacity: 0; }
  38%, 70%  { opacity: 1; }
  86%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lily .petal { animation: none !important; transform: rotate(var(--a)); }
  .lily .stamens { animation: none !important; opacity: 1; }
}

/* swapped photos */
.pphoto img.pphoto-grad { object-position: 66% 40%; }
.about-body .about-img.about-head { object-position: 50% 25%; }

/* résumé window */
.resume-body .timeline { margin: 0 0 6px; }
.resume-body .timeline li { display: grid; grid-template-columns: 100px 1fr; gap: 10px; line-height: 1.45; }
.resume-body .timeline span { width: auto; padding-top: 2px; }
.interview { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 12px; text-decoration: none; color: var(--ink); background: #F4F6FC; transition: translate .2s ease, box-shadow .2s ease; }
.interview:hover, .interview:focus-visible { translate: -2px -2px; box-shadow: 4px 4px 0 var(--ink); }
.interview strong { font-family: var(--serif); font-weight: 400; font-size: 18px; line-height: 1.25; }
.interview-note { font-size: 13px; color: var(--muted); }
.resume-body .btn { margin-top: 18px; }

/* swapped photos */
.pphoto img { object-position: 66% 30%; }
.about-body .about-img { object-position: 50% 28%; }
.pc1 img { object-position: center; }

/* two gameplay reels side by side */
.reels { display: flex; flex-wrap: wrap; gap: 18px; margin: 4px 0 22px; }
.reels .phone-video { flex: 0 1 200px; min-width: 150px; }
.reels .phone-video video { aspect-ratio: auto; height: 300px; width: 100%; object-fit: cover; }
.facts li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: baseline; } .facts span { width: auto; }

/* pinboard: research paper card */
.paper-card { display: flex; flex-direction: column; gap: 6px; padding: 7% 6% 11%; text-align: left; color: #2A2320; aspect-ratio: auto; }
.pp-venue { font-family: var(--mono); font-size: 9px; letter-spacing: .1em; color: #3B5BA9; text-transform: uppercase; }
.pp-title { font-family: var(--serif); font-size: clamp(12px, 1.15vw, 15.5px); line-height: 1.2; }
.pp-authors { font-size: 9px; line-height: 1.35; color: #6E5F55; }
.pp-authors b { color: #2A2320; }
.pp-lines { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; margin-top: 6px; }
.pp-lines i { height: 4px; border-radius: 2px; background: #E2DCD2; }
.paper-card .pcap { right: 6%; left: auto; }

/* three reels */
.reels .phone-video { flex: 1 1 150px; max-width: 200px; }
.pp-lines { display: none; }
.pphoto { top: 64%; }
@media (max-width: 760px) { .pphoto { top: 58%; } }

/* ============================================================
   RÉSUMÉ WINDOW v2
   ============================================================ */
.cv-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 10px 16px; margin-bottom: 18px; }
.cv-head h2 { margin: 0; font-size: 36px; }
.cv-role { margin: 4px 0 0; color: var(--muted); font-size: 15px; }
.cv-open { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(63,163,77,.14); font-size: 12px; font-weight: 600; }
.cv-open i { width: 8px; height: 8px; border-radius: 50%; background: #3FA34D; animation: pulse 2s infinite; }

.cv-stats { list-style: none; margin: 0 0 6px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cv-stats li { display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; border: 1.5px solid var(--ink); border-radius: 12px; background: var(--paper); }
.cv-stats li:first-child { background: #F6E3A6; }
.cv-stats strong { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1; }
.cv-stats span { font-size: 12px; line-height: 1.35; color: var(--muted); }
.cv-stats li:first-child span { color: var(--ink); }

.cv-jobs { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.cv-jobs li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; }
.cv-when { font-family: var(--mono); font-size: 11.5px; color: var(--muted); padding-top: 3px; }
.cv-jobs strong { font-weight: 600; font-size: 15.5px; }
.cv-org { color: var(--muted); font-size: 14.5px; }
.cv-jobs p { margin: 4px 0 0; font-size: 14.5px; line-height: 1.5; }
.cv-jobs b { font-weight: 600; background: linear-gradient(transparent 55%, var(--hl) 55%); }

.cv-skills { margin: 0; display: grid; gap: 10px; }
.cv-skills div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.cv-skills dt { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; }
.cv-skills dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cv-skills dd span { padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 999px; font-size: 12.5px; background: var(--paper); }

.cv-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 18px; border-top: 1px dashed var(--muted); }
.cv-cta .btn { margin-top: 0; }
.btn-red { background: #B5462F; }
.btn-red:hover { background: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); cursor: pointer; font: 600 14px var(--sans); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 760px) {
  .cv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cv-jobs li, .cv-skills div { grid-template-columns: 1fr; gap: 2px; }
}
.cv-stats strong { white-space: nowrap; font-size: clamp(22px, 2.3vw, 30px); }

/* ============================================================
   FOLDERS — open on hover + peek card
   ============================================================ */
.ico.is-folder { position: relative; isolation: isolate; }
.ico.is-folder::before, .ico.is-folder::after {
  content: ''; position: absolute; z-index: -1; left: 22%; top: 16%; width: 56%; height: 58%;
  background: #FFFDF8; border: 1.5px solid var(--ink); border-radius: 3px;
  transition: translate .3s cubic-bezier(.2, 1.4, .4, 1), rotate .3s ease;
}
.ico.is-folder::after { left: 30%; width: 48%; background: #F3EEE4 repeating-linear-gradient(#F3EEE4 0 5px, #CFC6B8 5px 6px); }
.icon:hover .ico.is-folder::before, .icon:focus-visible .ico.is-folder::before { translate: -2px -18px; rotate: -8deg; }
.icon:hover .ico.is-folder::after,  .icon:focus-visible .ico.is-folder::after  { translate: 4px -12px; rotate: 6deg; }
.icon:hover .ico.is-folder svg, .icon:focus-visible .ico.is-folder svg { transform: perspective(200px) rotateX(10deg); transform-origin: bottom; }
.ico.is-folder svg { transition: transform .3s ease; }

.peek {
  position: absolute; left: 50%; bottom: calc(100% + 4px); z-index: 60;
  width: 210px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 3px; text-align: left;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 5px 5px 0 var(--ink);
  translate: -50% 10px; scale: .92; rotate: -2deg; opacity: 0; pointer-events: none;
  transition: opacity .2s ease, translate .25s cubic-bezier(.2, 1.3, .4, 1), scale .25s ease;
}
.peek img { width: 100%; height: 110px; object-fit: cover; object-position: top; border-radius: 7px; border: 1px solid #DDD5C8; margin-bottom: 4px; }
.peek-paper { height: 110px; margin-bottom: 4px; padding: 12px; border-radius: 7px; background: #fff; border: 1px solid #DDD5C8; font-family: var(--serif); font-size: 14px; line-height: 1.2; display: flex; align-items: flex-end; }
.peek b { font-family: var(--serif); font-weight: 400; font-size: 17px; line-height: 1.1; }
.peek small { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.icon:hover .peek, .icon:focus-visible .peek { opacity: 1; translate: -50% 0; scale: 1; transition-delay: .12s; }
.icon.dragging .peek { opacity: 0; }

/* trash */
.trashlist { list-style: none; padding: 0; gap: 12px; }
.trashlist li { display: flex; flex-direction: column; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed #D6CCBE; }
.trashlist s { color: var(--ink); font-weight: 600; text-decoration-color: #C2412B; text-decoration-thickness: 2px; }
.trashlist span { font-size: 13.5px; }
.empty-trash { margin-top: 14px; }
.trashlist.emptied li { animation: crumple .5s ease forwards; }
.trashlist.emptied li:nth-child(2) { animation-delay: .1s; } .trashlist.emptied li:nth-child(3) { animation-delay: .2s; }
@keyframes crumple { to { opacity: 0; scale: .3; rotate: 25deg; translate: 60px 40px; } }

/* ============================================================
   PINBOARD — felt texture, frame, tape, draggable items
   ============================================================ */
.pinboard {
  background-color: #121212;
  background-image:
    radial-gradient(rgba(255,255,255,.035) 1px, transparent 1.5px),
    radial-gradient(rgba(255,255,255,.025) 1px, transparent 1.5px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
  border: 0; outline: 6px solid #2A2420; outline-offset: 0;
  box-shadow: inset 0 0 40px rgba(0,0,0,.8), 0 0 0 7px #4A3F37, 0 26px 50px rgba(60,40,20,.32);
  border-radius: 4px;
}
.board-tape {
  position: absolute; left: -14px; top: -16px; z-index: 6; rotate: -6deg;
  padding: 6px 16px; background: rgba(242, 193, 78, .88); color: #2A2320;
  font-family: var(--hand); font-size: 22px; box-shadow: 0 2px 4px rgba(0,0,0,.25);
}
.board-hint { position: absolute; right: 14px; bottom: 10px; z-index: 1; font-family: var(--mono); font-size: 10.5px; color: rgba(255,255,255,.45); }
.clip-wrap { position: absolute; left: 54%; top: 9%; width: 38%; z-index: 2; rotate: 2.5deg; transition: rotate .25s ease, translate .25s ease; }
.clip-wrap .clip { position: relative; left: auto; top: auto; width: 100%; rotate: 0deg; }
.clip-wrap:hover { rotate: 0deg; translate: 0 -4px; }
.clip-wrap .clip:hover, .clip-wrap .clip:focus-visible { rotate: 0deg; translate: 0 0; }

.pinboard .pcard, .pinboard .pphoto, .pinboard .clip-wrap { cursor: grab; touch-action: none; }
.pinboard .is-dragging { cursor: grabbing; z-index: 20 !important; transition: none !important; scale: 1.04; filter: drop-shadow(0 18px 18px rgba(0,0,0,.45)); }
.pcard:hover, .pphoto:hover { filter: drop-shadow(0 12px 14px rgba(0,0,0,.35)); }
.pcard:hover > .pin, .clip-wrap:hover > .pin, .pphoto:hover > .pin { animation: wobble .5s ease; }
@keyframes wobble { 25% { rotate: -14deg; } 60% { rotate: 9deg; } 100% { rotate: 0deg; } }

@media (max-width: 760px) {
  .peek, .board-hint { display: none; }
  .board-tape { left: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  .ico.is-folder::before, .ico.is-folder::after, .peek { transition: none; }
}
.icon.peek-below .peek { bottom: auto; top: calc(100% + 4px); translate: -50% -10px; }
.icon.peek-below:hover .peek, .icon.peek-below:focus-visible .peek { translate: -50% 0; }
.pinboard img, .pinboard a { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; }
.board-hint { bottom: auto; top: 10px; }
.icon:hover, .icon:focus-visible { z-index: 70; }

/* ============================================================
   WIDGETS (replaces the black pinboard)
   ============================================================ */
.wgrid {
  position: absolute; left: 32px; top: 32px; z-index: 2;
  width: min(540px, 38vw); display: grid; gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas: "photo paper" "photo news" "pvt pvt";
}
.wd {
  position: relative; display: flex; flex-direction: column; overflow: hidden; text-align: left;
  padding: 16px; border: 1.5px solid var(--ink); border-radius: 22px; color: var(--ink); text-decoration: none; font: inherit;
  background: rgba(255, 253, 248, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 4px 4px 0 var(--ink); cursor: pointer;
  transition: translate .25s cubic-bezier(.2, 1.3, .4, 1), box-shadow .25s ease;
}
.wd:hover, .wd:focus-visible { translate: -3px -3px; box-shadow: 7px 7px 0 var(--ink); color: var(--ink); }
.wd:focus-visible { outline: 3px solid #3B5BA9; outline-offset: 3px; }
.wd-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wd-title { margin: 8px 0 auto; font-family: var(--serif); font-weight: 400; font-size: clamp(14px, 1.2vw, 17px); line-height: 1.22; }
.wd-foot { margin-top: 10px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }

.wd-photo { grid-area: photo; padding: 0; min-height: 330px; }
.wd-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 35%; transition: scale .6s cubic-bezier(.2,.8,.2,1); }
.wd-photo:hover img { scale: 1.05; }
.wd-over { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; gap: 2px; padding: 40px 16px 14px; color: #fff; background: linear-gradient(transparent, rgba(30, 20, 15, .72)); }
.wd-over small { font-family: var(--mono); font-size: 10.5px; opacity: .9; }
.wd-over b { font-family: var(--serif); font-weight: 400; font-size: 24px; }

.wd-paper { grid-area: paper; background: #EEF2FB; }
.wd-paper .wd-label { color: #3B5BA9; }
.wd-news { grid-area: news; background: #F6EEDC; }
.wd-news .wd-foot { color: #8A3B2A; }

.wd-pvt { grid-area: pvt; flex-direction: row; align-items: stretch; gap: 14px; padding: 10px; background: #F7E7B4; }
.wd-pvt img { width: 46%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; border: 1.5px solid var(--ink); }
.wd-pvt-text { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding-right: 6px; }
.wd-pvt-text b { font-family: var(--serif); font-weight: 400; font-size: 24px; line-height: 1.05; }
.wd-badge { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--ink); color: #F7E7B4; font-size: 11.5px; font-weight: 600; line-height: 1.3; }

@media (max-width: 1100px) and (min-width: 761px) { .wgrid { width: 42vw; } .wd-photo { min-height: 280px; } }
@media (max-width: 760px) {
  .wgrid { position: relative; left: auto; top: auto; grid-column: 1 / -1; width: 100%; margin: 8px 0 28px; }
  .wd-photo { min-height: 260px; }
}

/* ============================================================
   MACBOOK LOOK
   ============================================================ */
/* desktop clock */
.deskclock { position: absolute; right: 3%; top: 2.5%; z-index: 1; display: flex; flex-direction: column; align-items: flex-end; color: rgba(42, 35, 32, .82); pointer-events: none; text-shadow: 0 1px 12px rgba(255, 250, 240, .6); }
.dc-date { font-family: var(--sans); font-weight: 500; font-size: clamp(15px, 1.4vw, 20px); letter-spacing: .01em; }
.dc-time { font-family: var(--sans); font-weight: 200; font-size: clamp(72px, 8.5vw, 132px); line-height: .95; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.dc-place { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; opacity: .6; margin-top: 4px; }

/* menu bar */
.menubar { height: 30px; font-size: 13.5px; background: rgba(250, 246, 238, .55); backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6); border-bottom: 0; box-shadow: 0 .5px 0 rgba(0,0,0,.08); }
.menubar-right { gap: 16px; }
.mb-ico { display: block; opacity: .85; }
.status-pill { padding: 1px 8px; }

/* desktop icon labels: plain text like Finder */
.label { background: transparent; font-weight: 500; text-shadow: 0 1px 2px rgba(255, 250, 240, .9), 0 0 8px rgba(255, 250, 240, .8); }
.icon:focus-visible .label { background: #2F6BDB; color: #fff; text-shadow: none; }
.icon:focus-visible { background: rgba(0, 0, 0, .08); }

/* widgets: soft macOS glass */
.wd { border: 0; border-radius: 22px; background: rgba(255, 253, 248, .62); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
      box-shadow: 0 0 0 .5px rgba(0,0,0,.12), 0 10px 30px rgba(70, 50, 30, .16); }
.wd:hover, .wd:focus-visible { translate: 0 -3px; box-shadow: 0 0 0 .5px rgba(0,0,0,.14), 0 18px 40px rgba(70, 50, 30, .22); }
.wd-paper { background: rgba(236, 241, 252, .72); }
.wd-news { background: rgba(248, 238, 218, .72); }
.wd-pvt { background: rgba(247, 231, 180, .78); }
.wd-pvt img { border: 0; }

/* windows: macOS chrome with traffic lights */
.win { border: 0; border-radius: 12px; box-shadow: 0 0 0 .5px rgba(0,0,0,.35), 0 28px 70px rgba(40, 25, 15, .32); }
.win:not(.active) { box-shadow: 0 0 0 .5px rgba(0,0,0,.25), 0 14px 40px rgba(40, 25, 15, .18); }
.win-bar { position: relative; justify-content: center; min-height: 38px; padding: 8px 16px; border-bottom: .5px solid rgba(0,0,0,.18); border-radius: 12px 12px 0 0; }
.win-title { font-family: var(--sans); font-weight: 600; font-size: 13px; color: rgba(42,35,32,.85); }
.win-close {
  position: absolute; left: 14px; top: 50%; translate: 0 -50%;
  width: 13px; height: 13px; min-height: 0; padding: 0; border: 0; border-radius: 50%;
  background: #FF5F57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2), 20px 0 0 #FEBC2E, 40px 0 0 #28C840;
  font-size: 0; color: transparent;
}
.win-close::before { content: ''; position: absolute; inset: -14px; }
.win-close::after { content: '×'; position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px/1 var(--sans); color: rgba(80, 0, 0, .7); opacity: 0; }
.win-bar:hover .win-close::after, .win-close:focus-visible::after { opacity: 1; }
.win-close:hover, .win-close:focus-visible { background: #FF5F57; color: transparent; }
.win-close:focus-visible { outline: 2px solid #2F6BDB; outline-offset: 3px; }
.win:not(.active) .win-close { background: #D8D2C8; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.15), 20px 0 0 #D8D2C8, 40px 0 0 #D8D2C8; }

/* dock: frosted glass, no outlines */
.dock { gap: 10px; padding: 7px 9px; border: 0; border-radius: 24px; background: rgba(255, 252, 245, .38); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(30px) saturate(1.8);
        box-shadow: inset 0 0 0 .5px rgba(255,255,255,.7), 0 0 0 .5px rgba(0,0,0,.15), 0 12px 40px rgba(60, 40, 20, .2); }
.d { border: 0; border-radius: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 2px 6px rgba(0,0,0,.18); }
.dock-sep { background: rgba(42,35,32,.18); }
.dock button::after { content: ''; position: absolute; left: 50%; bottom: -5px; translate: -50% 0; width: 4px; height: 4px; border-radius: 50%; background: rgba(42,35,32,.55); opacity: 0; }
.dock button.running::after { opacity: 1; }
.tip { background: rgba(250, 246, 238, .9); color: var(--ink); box-shadow: 0 0 0 .5px rgba(0,0,0,.15), 0 4px 12px rgba(0,0,0,.15); backdrop-filter: blur(20px); }

@media (max-width: 760px) {
  .deskclock { position: static; grid-column: 1 / -1; align-items: center; margin: 0 0 10px; order: -1; }
  .dc-time { font-size: 68px; }
  .mb-ico { display: none; }
  .win-bar { justify-content: center; }
}

/* ============================================================
   REAL DOCK
   ============================================================ */
.dock { align-items: flex-end; gap: 6px; padding: 6px 8px 7px; border-radius: 20px;
  background: linear-gradient(rgba(255,255,255,.42), rgba(255,255,255,.28));
  backdrop-filter: blur(28px) saturate(1.8); -webkit-backdrop-filter: blur(28px) saturate(1.8);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55), 0 0 0 .5px rgba(0,0,0,.18), 0 10px 30px rgba(60,40,20,.22); }
.dock button { display: block; width: 54px; height: 54px; transition: width .18s ease, height .18s ease, margin .18s ease; }
.dock .app { display: block; width: 100%; height: 100%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.22)); transform-origin: 50% 100%; transition: translate .18s ease; }
.dock button:hover, .dock button:focus-visible { width: 76px; height: 76px; }
.dock button:hover + button, .dock button:has(+ button:hover) { width: 64px; height: 64px; }
.dock button:hover .app, .dock button:focus-visible .app { translate: 0 -8px; }
.dock button:focus-visible { outline: none; }
.dock button:focus-visible .app { filter: drop-shadow(0 0 0 #2F6BDB) drop-shadow(0 0 3px #2F6BDB); }
.dock button.bounce .app { animation: dockbounce .7s ease; }
@keyframes dockbounce { 0%,100% { translate: 0 0; } 30% { translate: 0 -22px; } 60% { translate: 0 0; } 80% { translate: 0 -8px; } }
.dock-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: rgba(42,35,32,.22); }
.dock button::after { bottom: -5px; width: 4px; height: 4px; background: rgba(30,25,22,.7); }
.tip { bottom: calc(100% + 12px); padding: 4px 10px; border-radius: 7px; font: 500 12.5px var(--sans); }
@media (max-width: 760px) { .dock button, .dock button:hover { width: 48px; height: 48px; } .dock button:hover .app { translate: none; } }
@media (prefers-reduced-motion: reduce) { .dock button { transition: none; } .dock button.bounce .app { animation: none; } }

/* ============================================================
   NYC WALLPAPER + MAC FOLDERS
   ============================================================ */
body { background: #2A2850 url("images/nyc-dusk.svg") center bottom / cover no-repeat fixed; }
.lily, .watermark { display: none; }     /* wallpaper replaces the lilies — delete this line to bring them back */

/* Finder-style labels: white on the wallpaper */
.label { color: #fff; font-weight: 500; text-shadow: 0 1px 3px rgba(0,0,0,.65), 0 0 1px rgba(0,0,0,.5); }
.icon:focus-visible .label { background: #2F6BDB; }

/* macOS folder */
.mac-folder { width: 78px; height: 64px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.35)); }
.mac-folder svg { overflow: visible; }
.mf-glyph { color: #3E8CD8; opacity: .75; filter: drop-shadow(0 .8px 0 rgba(255,255,255,.55)); }
.ico.is-folder.mac-folder::before, .ico.is-folder.mac-folder::after { display: none; }
.icon:hover .mac-folder svg, .icon:focus-visible .mac-folder svg { transform: none; }
.icon:hover .mac-folder, .icon:focus-visible .mac-folder { translate: 0 -2px; }
.icon:hover::before { content: ''; position: absolute; inset: 0; border-radius: 10px; background: rgba(255,255,255,.12); }

/* desktop clock + widgets on a darker wallpaper */
.deskclock { color: rgba(255,255,255,.92); text-shadow: 0 2px 18px rgba(20,10,40,.35); }
.dc-place { opacity: .75; }
.wd { background: rgba(255, 253, 248, .78); }
.menubar { background: rgba(30, 28, 60, .35); color: #fff; box-shadow: none; }
.menubar .status-pill { color: #fff; background: rgba(63,163,77,.35); }
.menubar-links button:hover, .menubar-links button:focus-visible { background: rgba(255,255,255,.18); }
.logo { color: #FFB38A; }
.dock { background: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.16)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.35), 0 0 0 .5px rgba(0,0,0,.25), 0 12px 40px rgba(0,0,0,.35); }
.dock-sep { background: rgba(255,255,255,.35); }
.dock button::after { background: rgba(255,255,255,.85); }

@media (max-width: 760px) { body { background-attachment: scroll; } }

/* photo wallpaper (swap back to images/nyc-dusk.svg for the drawn one) */
body { background: #1D2A44 url("images/nyc-skyline.jpg") 50% 62% / cover no-repeat fixed; }
.deskclock { text-shadow: 0 2px 20px rgba(10, 20, 40, .45); }
.label { text-shadow: 0 1px 2px rgba(0,0,0,.9), 0 0 6px rgba(0,0,0,.75), 0 0 14px rgba(0,0,0,.5); font-weight: 600; }

/* bolder folders + app icon */
.mac-folder { width: 84px; height: 69px; filter: drop-shadow(0 0 .8px rgba(0,0,0,.55)) drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.mf-glyph { color: #0F4FAE; opacity: .85; filter: drop-shadow(0 1px 0 rgba(255,255,255,.45)); }
.ico-app { width: 70px; height: 70px; filter: drop-shadow(0 0 .8px rgba(0,0,0,.4)) drop-shadow(0 4px 8px rgba(0,0,0,.45)); }
.ico-app svg { width: 100%; height: 100%; }
.icon:hover .ico-app { translate: 0 -3px; }

/* education */
.cv-school { font-family: var(--serif); font-weight: 400; font-size: 20px; background: linear-gradient(transparent 58%, var(--hl) 58%); padding: 0 2px; }
.cv-degree { margin: 6px 0 0; font-size: 14.5px; line-height: 1.5; }

/* messages window */
.chat { gap: 8px; background: #FBFAFF; }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #E6E1F5; }
.chat-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; object-position: 50% 25%; }
.chat-head div { display: flex; flex-direction: column; }
.chat-head strong { font-size: 16px; }
.chat-head span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.chat-head i { width: 7px; height: 7px; border-radius: 50%; background: #34C759; }
.chat-time { align-self: center; margin: 4px 0; font-size: 11px; color: var(--muted); }
.bubble { border: 0; background: #E9E9EB; border-radius: 18px 18px 18px 5px; }
.bubble.them strong { font-weight: 600; }
.bubble.me { background: #6A45E0; color: #fff; border-radius: 18px 18px 5px 18px; }
.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.chip-reply { min-height: 34px; padding: 0 12px; border: 1.5px solid #6A45E0; border-radius: 999px; background: #fff; color: #5131C4; font: 500 13px var(--sans); cursor: pointer; }
.chip-reply:hover, .chip-reply:focus-visible { background: #6A45E0; color: #fff; }
.composer input { border-color: #D3CCEC; }
.composer button { background: #6A45E0; }
.cv-jobs .cv-school { font-family: var(--serif); font-weight: 400; font-size: 21px; }

/* sticky note */
.sticky {
  position: absolute; right: 3%; top: 31%; z-index: 3; width: 270px; padding: 18px 20px 20px;
  background: linear-gradient(#FFF6A8, #FCEB86); border: 1px solid rgba(160, 140, 40, .45); border-radius: 6px;
  rotate: -3deg; box-shadow: 0 1px 1px rgba(0,0,0,.12), 0 14px 28px rgba(0,0,0,.35);
  font-family: var(--sans); color: #1F1B16; transition: rotate .3s ease, translate .3s ease;
}
.sticky:hover { rotate: -1deg; translate: 0 -3px; }
.sticky h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.sticky ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; }
.sticky label { display: flex; align-items: flex-start; gap: 8px; min-height: 26px; font-size: 15.5px; line-height: 1.35; cursor: pointer; }
.sticky input { appearance: none; flex: none; width: 14px; height: 14px; margin-top: 3px; border: 1.5px solid #6B5E1E; border-radius: 4px; background: rgba(255,255,255,.5); cursor: pointer; }
.sticky input:checked { background: #1F1B16 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23FFF6A8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: #1F1B16; }
.sticky input:focus-visible { outline: 2px solid #2F6BDB; outline-offset: 2px; }
.sticky input:checked + span { text-decoration: line-through; text-decoration-thickness: 2px; color: rgba(31,27,22,.6); }
@media (max-width: 1100px) and (min-width: 761px) { .sticky { top: 36%; width: 230px; } .sticky label { font-size: 14px; } }
@media (max-width: 760px) { .sticky { position: relative; right: auto; top: auto; grid-column: 1 / -1; width: auto; margin: 0 8px 26px; } }

/* macOS Notes widget */
.notes-widget {
  rotate: 0deg; width: 280px; padding: 14px 18px 16px; border: 0; border-radius: 22px;
  background: rgba(252, 251, 248, .9); backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.18), 0 12px 30px rgba(0,0,0,.3);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", var(--sans);
}
.notes-widget:hover { rotate: 0deg; translate: 0 -2px; }
.nw-head { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: #D9A400; }
.nw-app { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(#FFE27A 0 32%, #fff 32%); box-shadow: inset 0 0 0 .5px rgba(0,0,0,.2); position: relative; }
.nw-app i { position: absolute; left: 3px; right: 3px; top: 9px; height: 1px; background: #D8D2C4; box-shadow: 0 3px 0 #D8D2C4; }
.notes-widget h2 { margin: 0; font-size: 19px; font-weight: 700; color: #1C1C1E; }
.nw-meta { margin: 2px 0 10px; font-size: 12px; color: #8E8E93; }
.notes-widget ul { gap: 2px; }
.notes-widget label { gap: 10px; align-items: center; min-height: 30px; font-size: 14.5px; color: #1C1C1E; padding: 3px 0; border-bottom: .5px solid #E5E5EA; }
.notes-widget li:last-child label { border-bottom: 0; }
.notes-widget input { width: 19px; height: 19px; margin: 0; border: 1.5px solid #C7C7CC; border-radius: 50%; background: #fff; }
.notes-widget input:checked { border-color: #F2B600; background: #F2B600 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.notes-widget input:checked + span { text-decoration: line-through; text-decoration-thickness: 1px; color: #8E8E93; }

/* design process */
.process { list-style: none; counter-reset: st; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.process li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; column-gap: 10px; font-size: 14.5px; line-height: 1.5; }
.process li::before { content: counter(st); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: #2F6BDB; color: #fff; font: 600 13px var(--sans); display: grid; place-items: center; }
.process b { font-weight: 600; }
.proc-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.proc-strip figure { margin: 0; }
.proc-strip img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; background: #111; }
.proc-strip figcaption { margin-top: 6px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.figma-demo .live-bar { background: #F3F0FF; }
.hh-proto { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 8px; }
.hh-proto > img { width: 100%; border-radius: 18px; background: #000; }
.hh-proto .live-demo { margin: 0; }
@media (max-width: 760px) { .hh-proto { grid-template-columns: 1fr; } .hh-proto > img { max-width: 180px; } }

/* storyboards: scroll-only images */
.boards { display: grid; gap: 14px; margin: 0 0 20px; }
.board { margin: 0; }
.board figcaption { margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.board figcaption b { color: var(--ink); font-weight: 600; }
.board-scroll { overflow-x: auto; overflow-y: hidden; border-radius: 12px; background: #474747; padding: 8px; scroll-behavior: smooth; overscroll-behavior-x: contain; }
.board-scroll:focus-visible { outline: 3px solid #2F6BDB; outline-offset: 2px; }
.board-scroll img { display: block; height: 220px; width: auto; max-width: none; border-radius: 6px; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.board:first-child .board-scroll img { height: 260px; }
.sub .mini { margin-left: 8px; }
.boards, .board { min-width: 0; max-width: 100%; } .board-scroll { max-width: 100%; padding: 0; background: #474747; }
.hh-static { grid-template-columns: 170px minmax(0,1fr); align-items: center; } .hh-static p { margin: 0; font-size: 15px; line-height: 1.55; }
.board:first-child .board-scroll img { height: 220px; }

/* résumé icon is a real link to the PDF */
a.icon { text-decoration: none; color: inherit; }
