:root{
  --bar-h: 28px;
  --text: #f5f5f7;
  --panel: rgba(245,245,247,.72);
  --panel-solid: #f2f2f4;
  --stroke: rgba(0,0,0,.10);
  --win-shadow: 0 30px 80px rgba(0,0,0,.35), 0 8px 24px rgba(0,0,0,.22);
  --accent: #0a84ff;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  font-family:var(--font);
  color:#1d1d1f;
  overflow:hidden;
  background:#0b0b0d;
  -webkit-font-smoothing:antialiased;
  user-select:none;
}

/* ---------------- Menu bar ---------------- */
.menubar{
  position:fixed; inset:0 0 auto 0; height:var(--bar-h);
  display:flex; align-items:center; justify-content:space-between;
  padding:0 14px;
  background:rgba(22,22,24,.52);
  backdrop-filter:saturate(180%) blur(22px);
  -webkit-backdrop-filter:saturate(180%) blur(22px);
  color:var(--text);
  font-size:13px; font-weight:500;
  z-index:1000;
  border-bottom:.5px solid rgba(255,255,255,.10);
}
.menu-left,.menu-right{ display:flex; align-items:center; gap:18px; }
.menu-right{ gap:12px; }
.apple{ width:15px; height:17px; display:inline-block;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268c-.5-58 47.4-85.9 49.6-87.2-27-39.5-69-45-84-45.5-35.6-3.7-69.6 21-87.7 21-18.1 0-46-20.5-75.6-20-38.9.6-74.8 22.6-94.8 57.5-40.4 70.1-10.3 173.8 29 230.7 19.2 27.9 42.1 59.2 72.1 58.1 28.9-1.1 39.8-18.7 74.8-18.7 34.9 0 44.8 18.7 75.4 18.1 31.2-.5 50.9-28.4 70-56.4 22.1-32.3 31.2-63.6 31.7-65.2-.7-.3-60.8-23.3-61.3-92.4zM259.9 96.5c15.9-19.3 26.7-46.1 23.7-72.8-22.9 1-50.7 15.3-67.2 34.5-14.8 17-27.8 44.3-24.3 70.5 25.6 2 51.8-13 67.8-32.2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath d='M318.7 268c-.5-58 47.4-85.9 49.6-87.2-27-39.5-69-45-84-45.5-35.6-3.7-69.6 21-87.7 21-18.1 0-46-20.5-75.6-20-38.9.6-74.8 22.6-94.8 57.5-40.4 70.1-10.3 173.8 29 230.7 19.2 27.9 42.1 59.2 72.1 58.1 28.9-1.1 39.8-18.7 74.8-18.7 34.9 0 44.8 18.7 75.4 18.1 31.2-.5 50.9-28.4 70-56.4 22.1-32.3 31.2-63.6 31.7-65.2-.7-.3-60.8-23.3-61.3-92.4zM259.9 96.5c15.9-19.3 26.7-46.1 23.7-72.8-22.9 1-50.7 15.3-67.2 34.5-14.8 17-27.8 44.3-24.3 70.5 25.6 2 51.8-13 67.8-32.2z'/%3E%3C/svg%3E") center/contain no-repeat;
  background:var(--text); }
.menu-item{ color:var(--text); text-decoration:none; cursor:pointer; opacity:.92; padding:2px 4px; border-radius:5px; }
.menu-item:hover{ background:rgba(255,255,255,.16); }
.menu-item.brand{ font-weight:700; }
.menu-right .stat{ display:inline-flex; align-items:center; opacity:.9; }
.clock{ font-variant-numeric:tabular-nums; letter-spacing:.2px; opacity:.96; }

/* ---------------- Desktop ---------------- */
.desktop{
  position:fixed; inset:0;
  background:#e9eaec url("assets/wallpaper.jpg") center/cover no-repeat;
}
.desktop::after{ /* subtle vignette for icon legibility */
  content:""; position:absolute; inset:0;
  background:radial-gradient(120% 100% at 50% 40%, transparent 60%, rgba(0,0,0,.10));
  pointer-events:none;
}

/* Desktop icons */
.d-icon{
  position:absolute; width:96px;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  cursor:pointer; text-align:center;
  padding:6px 4px; border-radius:10px;
  transition:background .12s;
}
.d-icon:hover{ background:rgba(0,0,0,.06); }
.d-icon.selected{ background:rgba(0,0,0,.10); }
.d-icon .thumb{
  width:64px; height:52px; border-radius:9px; object-fit:cover;
  box-shadow:0 4px 14px rgba(0,0,0,.22);
  border:.5px solid rgba(0,0,0,.10);
}
.d-icon .label{
  font-size:12px; color:#17171a; font-weight:600;
  text-shadow:0 1px 2px rgba(255,255,255,.9);
  max-width:94px; line-height:1.25;
}

/* ---------------- Windows ---------------- */
.window-layer{ position:fixed; inset:0; pointer-events:none; z-index:500; }
.window{
  position:absolute; pointer-events:auto;
  background:#fff; border-radius:12px;
  box-shadow:var(--win-shadow);
  display:flex; flex-direction:column; overflow:hidden;
  border:.5px solid rgba(0,0,0,.14);
  animation:winIn .22s cubic-bezier(.2,.8,.3,1);
}
@keyframes winIn{ from{ opacity:0; transform:scale(.96) translateY(8px);} to{ opacity:1; transform:none;} }
.titlebar{
  height:44px; flex:0 0 44px;
  display:flex; align-items:center; gap:10px;
  padding:0 14px;
  background:rgba(246,246,248,.85);
  backdrop-filter:blur(20px); -webkit-backdrop-filter:blur(20px);
  border-bottom:.5px solid rgba(0,0,0,.08);
  cursor:grab;
}
.titlebar.dragging{ cursor:grabbing; }
.lights{ display:flex; gap:8px; }
.light{ width:12px; height:12px; border-radius:50%; border:.5px solid rgba(0,0,0,.12); }
.light.red{ background:#ff5f57; } .light.yellow{ background:#febc2e; } .light.green{ background:#28c840; }
.light{ cursor:pointer; }
.lights:hover .light.red::after{ content:"×"; }
.lights:hover .light.yellow::after{ content:"–"; }
.lights:hover .light.green::after{ content:"+"; }
.light::after{ font-size:9px; line-height:11px; display:block; text-align:center; color:rgba(0,0,0,.5); }

/* Resize grip */
.win-resize{
  position:absolute; right:0; bottom:0; width:18px; height:18px;
  cursor:nwse-resize; z-index:5;
}
.win-resize::after{
  content:""; position:absolute; right:3px; bottom:3px; width:9px; height:9px;
  border-right:2px solid rgba(0,0,0,.22); border-bottom:2px solid rgba(0,0,0,.22);
  border-bottom-right-radius:3px;
}
.win-title{ font-size:13px; font-weight:600; color:#3a3a3c; margin:0 auto; padding-right:52px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

.win-body{ flex:1; display:flex; min-height:0; }

/* Project window */
.proj-sidebar{
  width:200px; flex:0 0 200px; padding:12px 10px;
  background:rgba(248,248,250,.9);
  border-right:.5px solid rgba(0,0,0,.08);
  overflow-y:auto;
}
.side-head{ font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:#8a8a8e; padding:4px 8px 8px; font-weight:600; }
.side-item{ display:flex; align-items:center; gap:9px; padding:6px 8px; border-radius:7px; font-size:13px; color:#2a2a2c; cursor:pointer; }
.side-item:hover{ background:rgba(0,0,0,.05); }
.side-item.active{ background:var(--accent); color:#fff; }
.side-item img{ width:22px; height:18px; border-radius:4px; object-fit:cover; }

.proj-content{ flex:1; overflow-y:auto; padding:34px 40px 48px; background:#fff; }
.proj-content h1{ font-size:40px; line-height:1.05; letter-spacing:-.02em; margin:0 0 6px; font-weight:700; color:#111; }
.proj-tag{ font-family:var(--mono); font-size:12px; color:#86868b; margin:0 0 20px; }
.proj-desc{ font-size:16px; line-height:1.6; color:#3a3a3c; max-width:620px; margin:0 0 28px; }
.proj-lead{ width:100%; height:auto; max-height:460px; object-fit:cover; display:block;
  border-radius:12px; background:#eee; margin:0 0 14px; }
.gallery{ columns:2; column-gap:14px; }
.gallery img{ width:100%; height:auto; border-radius:12px; display:block; background:#eee;
  margin:0 0 14px; break-inside:avoid; -webkit-column-break-inside:avoid; }

/* About window */
.about-body{ flex-direction:column; overflow-y:auto; }
.about-hero{ display:flex; gap:26px; align-items:center; padding:40px 44px 28px; }
.about-hero img{ width:132px; height:132px; border-radius:28px; background:#f2f2f4; box-shadow:0 8px 24px rgba(0,0,0,.12); }
.about-hero h1{ margin:0 0 4px; font-size:34px; letter-spacing:-.02em; }
.about-hero .role{ margin:0; color:#86868b; font-size:15px; font-family:var(--mono); }
.about-text{ padding:0 44px 44px; max-width:640px; }
.about-text p{ font-size:16px; line-height:1.65; color:#3a3a3c; }
.about-text h2{ font-size:13px; text-transform:uppercase; letter-spacing:.08em; color:#8a8a8e; margin:26px 0 8px; }
.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{ font-size:13px; background:#f0f0f2; color:#333; padding:5px 12px; border-radius:20px; }

/* Welcome window */
.welcome-body{ flex-direction:column; overflow-y:auto; }
.welcome-head{ display:flex; gap:18px; align-items:center; padding:34px 38px 20px; }
.welcome-head img{ width:76px; height:76px; border-radius:18px; box-shadow:0 8px 24px rgba(0,0,0,.12); }
.welcome-head h1{ margin:0 0 4px; font-size:28px; letter-spacing:-.02em; }
.welcome-head .role{ margin:0; color:#86868b; font-size:14px; font-family:var(--mono); }
.welcome-text{ padding:0 38px 38px; }
.welcome-text p{ font-size:15px; line-height:1.65; color:#3a3a3c; }
.welcome-text h2{ font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:#8a8a8e; margin:26px 0 8px; }
.welcome-text ol.how{ margin:18px 0 0; padding-left:20px; }
.welcome-text ol.how li{ font-size:15px; line-height:1.6; color:#3a3a3c; margin-bottom:10px; }
.welcome-text ol.how b{ font-weight:600; color:#1d1d1f; }
.welcome-text .credit{ font-size:14px; color:#6b6b70; }
.welcome-text a{ color:#0071e3; text-decoration:none; }
.welcome-text a:hover{ text-decoration:underline; }

/* Notes window */
.notes-body{ background:#fbfbf3; }
.notes-list{ width:230px; flex:0 0 230px; background:#f4f4ec; border-right:.5px solid rgba(0,0,0,.08); overflow-y:auto; padding:8px; }
.note-row{ padding:10px 12px; border-radius:8px; cursor:pointer; }
.note-row:hover{ background:rgba(0,0,0,.04); }
.note-row.active{ background:#ffd75e; }
.note-row .nt{ font-size:14px; font-weight:600; color:#2a2a2c; margin:0 0 2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.note-row .np{ font-size:12px; color:#8a8a8e; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.notes-content{ flex:1; overflow-y:auto; padding:30px 46px; }
.notes-content .date{ text-align:center; font-size:12px; color:#a0a0a0; margin-bottom:14px; }
.notes-content h1{ font-size:24px; margin:0 0 14px; }
.notes-content p{ font-size:15px; line-height:1.6; color:#333; }
.notes-content ul{ font-size:15px; line-height:1.7; color:#333; padding-left:20px; }

/* ---------------- Dock ---------------- */
.dock{
  position:fixed; left:50%; bottom:8px; transform:translateX(-50%);
  display:flex; align-items:flex-end; gap:10px;
  padding:8px 12px;
  background:rgba(255,255,255,.22);
  border:.5px solid rgba(255,255,255,.35);
  backdrop-filter:blur(28px) saturate(180%); -webkit-backdrop-filter:blur(28px) saturate(180%);
  border-radius:22px;
  box-shadow:0 16px 40px rgba(0,0,0,.35);
  z-index:900;
}
.dock-item{
  position:relative; width:54px; height:54px; padding:0; border:0; background:none;
  cursor:pointer; border-radius:14px; display:flex; align-items:center; justify-content:center;
  transition:transform .18s cubic-bezier(.2,.9,.3,1);
}
.dock-item img{ width:100%; height:100%; border-radius:14px; object-fit:cover; display:block; box-shadow:0 5px 12px rgba(0,0,0,.25); }
.dock-item:hover{ transform:translateY(-10px) scale(1.12); }
.dock-item .tip{
  position:absolute; bottom:118%; left:50%; transform:translateX(-50%);
  background:rgba(40,40,42,.92); color:#fff; font-size:12px; padding:4px 9px; border-radius:7px;
  white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .12s;
}
.dock-item:hover .tip{ opacity:1; }
.min-ico{
  width:100%; height:100%; border-radius:14px; background:rgba(255,255,255,.75);
  color:#3a3a3c; display:flex; align-items:center; justify-content:center;
  font-size:22px; font-weight:600; box-shadow:0 5px 12px rgba(0,0,0,.25);
}
.dock-min{ opacity:.95; }
.notes-ico{ width:100%; height:100%; border-radius:14px; background:linear-gradient(#fff 0 34%, #ffe45c 34% 100%); box-shadow:0 5px 12px rgba(0,0,0,.25); position:relative; }
.notes-ico::after{ content:""; position:absolute; left:16%; right:16%; top:52%; height:2px; border-radius:2px; background:rgba(0,0,0,.22); box-shadow:0 6px 0 rgba(0,0,0,.16), 0 12px 0 rgba(0,0,0,.12); }

/* ---------------- Responsive ---------------- */
@media (max-width:820px){
  .d-icon{ width:76px; }
  .d-icon .thumb{ width:54px; height:44px; }
  .window{ inset:auto; left:3vw !important; right:3vw; top:44px !important;
    width:94vw !important; height:calc(100dvh - 120px) !important; }
  .proj-sidebar,.notes-list{ display:none; }
  .proj-content{ padding:22px 20px 40px; }
  .proj-content h1{ font-size:30px; }
  .gallery{ columns:1; }
  .about-hero{ flex-direction:column; text-align:center; padding:28px 22px; }
  .about-text{ padding:0 22px 34px; }
  .menu-item.brand{ display:inline; }
  .menu-left .menu-item:not(.brand){ display:none; }
}
