/* ===== Reset & base ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Helvetica, Arial, sans-serif;
  background: #1c2b3a;
  color: #fff;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

:root {
  --wall-1: #6f8fc4;
  --wall-2: #24406e;
  --glass: rgba(255,255,255,0.14);
  --glass-strong: rgba(255,255,255,0.22);
  --window-bg: #f5f5f7;
  --window-text: #1d1d1f;
}

/* ===== Lock screen ===== */
#lock-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  cursor: pointer;
  transition: transform 0.7s cubic-bezier(.4,0,.2,1), opacity 0.6s ease;
}
#lock-screen.unlocking {
  transform: translateY(-100%);
  opacity: 0.4;
  pointer-events: none;
}
.lock-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, var(--wall-1), var(--wall-2) 80%);
}
.lock-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.lock-content {
  position: relative; z-index: 1;
  margin-top: 8vh;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.lock-date { font-size: 20px; font-weight: 600; letter-spacing: .3px; }
.lock-time {
  font-size: 120px; font-weight: 200; line-height: 1.05;
  margin-top: 6px; margin-bottom: 40px;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
}
.lock-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(145deg, #ffffff55, #ffffff11);
  border: 1px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 600;
  backdrop-filter: blur(6px);
  margin-bottom: 14px;
}
.lock-name { font-size: 22px; font-weight: 600; }
.lock-title {
  font-size: 12px; letter-spacing: 2px; opacity: .75;
  margin-top: 4px; margin-bottom: 34px;
}
.unlock-slider {
  position: relative;
  width: 320px; height: 54px;
  background: var(--glass);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 30px;
  display: flex; align-items: center;
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.unlock-handle {
  position: absolute; left: 4px; top: 4px;
  width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: #333;
  display: flex; align-items: center; justify-content: center;
  cursor: grab;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: left 0.25s ease;
}
.unlock-handle.dragging { transition: none; cursor: grabbing; }
.unlock-label {
  flex: 1; text-align: center;
  font-size: 12px; letter-spacing: 2px; opacity: .8;
  pointer-events: none;
}
.unlock-hint {
  margin-top: 18px; font-size: 11px; letter-spacing: 1.5px;
  opacity: .55; text-transform: uppercase;
}

/* ===== Desktop ===== */
#desktop {
  position: fixed; inset: 0;
  visibility: hidden;
}
#desktop.active { visibility: visible; }
.desktop-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top, var(--wall-1), var(--wall-2) 80%);
}

/* Menu bar */
#menubar {
  position: absolute; top: 0; left: 0; right: 0; height: 26px; z-index: 50;
  background: rgba(20, 20, 25, 0.45);
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
}
.menubar-left, .menubar-right { display: flex; align-items: center; gap: 16px; }
.mb-apple {
  width: 12px; height: 12px;
  display: inline-block;
  -webkit-mask: radial-gradient(circle, #000 60%, transparent 61%);
}
.mb-apple::before {
  content: "";
}
.mb-apple {
  font-size: 15px;
}
.mb-apple::after { content: "\f8ff"; }
.mb-bold { font-weight: 700; }
.mb-icon { display: flex; align-items: center; opacity: .9; }
#mb-clock { font-variant-numeric: tabular-nums; }

/* Desktop icons */
.desktop-icons {
  position: absolute; top: 40px; right: 18px; z-index: 5;
  display: flex; flex-direction: column; gap: 18px; align-items: center;
}
.desktop-icon {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 72px; cursor: pointer;
  padding: 6px; border-radius: 6px;
}
.desktop-icon:hover { background: rgba(255,255,255,0.08); }
.desktop-icon span {
  font-size: 12px; text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.dicon-glyph {
  width: 42px; height: 42px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.dicon-pdf { background: #e6483c; color: #fff; font-size: 11px; font-weight: 700; border-radius: 4px; }
.dicon-readme { background: rgba(255,255,255,0.85); border-radius: 4px; }

/* ===== Dock ===== */
#dock {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 60;
  display: flex; align-items: flex-end; gap: 10px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  backdrop-filter: blur(20px);
}
.dock-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer;
  transition: transform 0.15s ease;
  transform-origin: bottom center;
}
.dock-item:hover { transform: translateY(-10px) scale(1.15); }
.dock-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}
.dock-finder { background: linear-gradient(160deg,#5ac8fa,#0a84ff); border-radius: 14px; position: relative; overflow: hidden; }
.dock-finder::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.9) 50%, rgba(30,90,160,0.9) 50%);
  -webkit-mask: radial-gradient(circle at 50% 40%, transparent 30%, #000 31%);
}
.dock-about { background: linear-gradient(160deg,#ffd36e,#ff9f43); color: #4a2e00; font-size: 16px; }
.dock-notes { background: linear-gradient(160deg,#fff3b0,#ffe27a); font-size: 22px; }
.dock-safari { background: radial-gradient(circle at 30% 30%, #eaf6ff, #4fa8ff 60%, #1c6fd9); border-radius: 50%; position: relative; }
.dock-safari::before {
  content: ""; position: absolute; inset: 8px;
  background: conic-gradient(from 45deg, #ff3b30 0 25%, #fff 0 50%, #ff3b30 0 75%, #fff 0);
  border-radius: 50%;
  clip-path: polygon(50% 50%, 100% 0, 100% 30%);
}
.dock-terminal { background: #1c1c1e; color: #4cd964; font-family: monospace; font-size: 16px; }
.dock-mail { background: linear-gradient(160deg,#6fc3ff,#0a84ff); font-size: 20px; }
.dock-resume { background: #fff; color: #e6483c; font-size: 11px; border: 1px solid #ddd; }
.dock-trash { background: linear-gradient(160deg,#c7c9cc,#9a9ca0); font-size: 20px; }
.dock-dot {
  width: 4px; height: 4px; border-radius: 50%; background: #fff;
  margin-top: 4px; opacity: 0; transition: opacity .2s;
}
.dock-item.running .dock-dot { opacity: 1; }
.dock-divider { width: 1px; align-self: stretch; background: rgba(255,255,255,0.3); margin: 4px 2px; }
.dock-item[data-label]::after {
  content: attr(data-label);
  position: absolute; bottom: 68px; left: 50%; transform: translateX(-50%);
  background: rgba(30,30,30,0.85); color: #fff; font-size: 12px;
  padding: 4px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.dock-item[data-label]:hover::after { opacity: 1; }

/* ===== Windows ===== */
.app-window {
  position: absolute;
  display: none;
  flex-direction: column;
  background: var(--window-bg);
  color: var(--window-text);
  border-radius: 10px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.45), 0 0 0 1px rgba(0,0,0,0.06);
  overflow: hidden;
  z-index: 10;
  min-width: 320px; min-height: 200px;
}
.app-window.open { display: flex; }
.app-window.minimized { display: none; }
.app-window.dragging { transition: none !important; }

.titlebar {
  height: 34px; flex: 0 0 auto;
  display: flex; align-items: center;
  padding: 0 12px;
  background: linear-gradient(#e8e8ea, #dcdce0);
  border-bottom: 1px solid #c9c9cd;
  cursor: default;
  user-select: none;
}
.titlebar-light { background: linear-gradient(#f7f7f9, #ececef); }
.traffic { display: flex; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; position: relative; cursor: pointer; }
.dot-close { background: #ff5f57; }
.dot-min { background: #febc2e; }
.dot-zoom { background: #28c840; }
.titlebar-label {
  flex: 1; text-align: center;
  font-size: 13px; font-weight: 600; color: #444;
  margin-left: -60px;
}
.window-body { flex: 1; overflow: auto; }

/* Finder */
.finder-body { display: flex; height: 100%; }
.finder-sidebar {
  width: 170px; background: #eef0f2; border-right: 1px solid #dcdde0;
  padding: 10px 8px; font-size: 12.5px; flex: 0 0 auto;
}
.fs-heading { font-size: 11px; color: #8a8d93; margin: 10px 6px 4px; font-weight: 600; }
.fs-item { padding: 5px 8px; border-radius: 5px; cursor: pointer; }
.fs-item.active { background: #0a84ff; color: #fff; }
.finder-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.finder-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-bottom: 1px solid #e2e3e5; font-size: 13px; color: #666;
}
.finder-path { font-weight: 600; color: #333; }
.finder-search { margin-left: auto; border: 1px solid #dcdde0; border-radius: 6px; padding: 3px 8px; font-size: 12px; width: 130px; background: #fff; }
.finder-grid {
  flex: 1; overflow: auto; padding: 16px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 18px;
  align-content: start;
}
.project-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; cursor: pointer; padding: 8px; border-radius: 8px;
}
.project-card:hover { background: rgba(10,132,255,0.08); }
.project-folder {
  width: 56px; height: 44px; border-radius: 4px 8px 8px 4px;
  background: linear-gradient(160deg,#6fc3ff,#3d94e6);
  position: relative;
}
.project-folder::before {
  content: ""; position: absolute; top: -8px; left: 0; width: 26px; height: 10px;
  background: inherit; border-radius: 4px 4px 0 0;
}
.project-card strong { font-size: 12px; font-weight: 600; }
.project-card span { font-size: 10.5px; color: #666; }
.project-detail {
  display: none; padding: 20px; overflow: auto;
}
.project-detail.open { display: block; }
.project-detail h2 { margin-bottom: 6px; }
.project-detail .tags { display: flex; gap: 6px; margin: 10px 0; flex-wrap: wrap; }
.project-detail .tag { background: #eef0f2; padding: 3px 9px; border-radius: 20px; font-size: 11px; }
.project-detail p { margin: 10px 0; line-height: 1.5; font-size: 13.5px; }
.project-detail .back-link { display: inline-block; margin-bottom: 14px; font-size: 12px; color: #0a84ff; cursor: pointer; }
.project-detail a.visit { color: #0a84ff; font-weight: 600; }

/* About */
.about-body { padding: 30px 34px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-photo {
  width: 90px; height: 90px; border-radius: 50%; margin-bottom: 14px;
  background: linear-gradient(160deg,#ffd36e,#ff9f43);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 700; color: #4a2e00;
}
.about-body h1 { font-size: 22px; margin-bottom: 4px; }
.about-role { font-size: 11px; letter-spacing: 1.5px; color: #888; margin-bottom: 16px; }
.about-bio { font-size: 13.5px; line-height: 1.6; color: #333; margin-bottom: 18px; }
.about-links { display: flex; gap: 14px; font-size: 13px; }
.about-links a { color: #0a84ff; font-weight: 600; }

/* Notes */
.notes-body { display: flex; height: 100%; }
.notes-sidebar {
  width: 220px; background: #f6f4ee; border-right: 1px solid #e5e2d8;
  flex: 0 0 auto; overflow: auto;
}
.notes-search { padding: 10px 12px; font-size: 12px; color: #999; border-bottom: 1px solid #e5e2d8; }
.note-item {
  display: flex; flex-direction: column; padding: 10px 12px; gap: 2px;
  border-bottom: 1px solid #ece9df; cursor: pointer; font-size: 12.5px;
}
.note-item.active { background: #ffe27a44; }
.note-item span { color: #888; font-size: 11.5px; }
.note-item time { color: #aaa; font-size: 10.5px; }
.notes-main { flex: 1; padding: 24px 30px; overflow: auto; background: #fffdf7; }
.notes-date { font-size: 11px; color: #999; text-align: center; margin-bottom: 6px; }
.notes-main h2 { font-size: 20px; margin-bottom: 12px; }
.notes-main p { font-size: 13.5px; line-height: 1.7; margin-bottom: 12px; color: #2a2a2a; }

/* Safari */
.safari-tabs { flex: 1; display: flex; justify-content: center; }
.safari-tab { background: #fff; padding: 4px 16px; border-radius: 6px 6px 0 0; font-size: 12px; font-weight: 600; }
.safari-toolbar {
  display: flex; align-items: center; gap: 10px; padding: 8px 14px;
  background: #ececef; border-bottom: 1px solid #dcdde0; font-size: 13px; color: #555;
}
.sb-nav { opacity: .5; }
.safari-address {
  flex: 1; background: #fff; border-radius: 6px; padding: 4px 12px; font-size: 12px;
  text-align: center; color: #555; border: 1px solid #ddd;
}
.safari-body { padding: 26px 34px; overflow: auto; }
.safari-body h1 { font-size: 22px; margin-bottom: 4px; }
.safari-link {
  display: flex; flex-direction: column; gap: 3px; padding: 14px 0;
  border-bottom: 1px solid #eee;
}
.safari-link strong { font-size: 14px; color: #1d1d1f; }
.safari-link span { font-size: 12.5px; color: #0a84ff; }

/* Terminal */
.terminal-body {
  background: #1a1a1e; color: #d8f5d8; font-family: "SF Mono", Menlo, monospace;
  font-size: 13px; padding: 12px 14px; position: relative; overflow: auto;
  height: 100%;
}
.terminal-line { display: flex; }
.terminal-prompt { color: #4cd964; white-space: nowrap; }
.terminal-out-line { margin: 2px 0; white-space: pre-wrap; color: #c9c9cf; }
.terminal-out-line.cmd { color: #fff; }
.terminal-cursor { animation: blink 1s step-start infinite; }
@keyframes blink { 50% { opacity: 0; } }
#terminal-input {
  position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px;
}

/* Mail */
.mail-body { padding: 16px 20px; display: flex; flex-direction: column; height: 100%; }
.mail-field { display: flex; gap: 8px; font-size: 13px; padding: 6px 0; align-items: center; }
.mail-field span { color: #888; width: 55px; flex: 0 0 auto; }
.mail-field input { flex: 1; border: none; outline: none; font-size: 13px; }
.mail-body hr { border: none; border-top: 1px solid #e2e3e5; margin: 4px 0 10px; }
#mail-message { flex: 1; border: none; outline: none; resize: none; font-size: 13.5px; font-family: inherit; line-height: 1.5; }
#mail-send {
  align-self: flex-end; background: #0a84ff; color: #fff; border: none;
  padding: 7px 18px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
#mail-send:hover { background: #0870d8; }
.mail-note { font-size: 10.5px; color: #999; margin-top: 8px; }

/* Resume */
.resume-body { padding: 26px 30px; }
.resume-body h2 { margin-bottom: 4px; }
.resume-line { display: flex; flex-direction: column; gap: 2px; margin: 14px 0; font-size: 13px; }
.resume-line strong { font-size: 11px; letter-spacing: 1px; color: #999; text-transform: uppercase; }
.resume-download {
  display: inline-block; margin-top: 18px; background: #1d1d1f; color: #fff;
  padding: 8px 16px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
}

/* Placeholder flags */
.edit-flag { color: #d9822b; font-style: italic; font-size: 0.92em; }

/* Scrollbars (subtle, webkit) */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.2); border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ===== Responsive / small screens ===== */
@media (max-width: 720px) {
  .lock-time { font-size: 80px; }
  .unlock-slider { width: 260px; }
  #menubar .mb-item:not(#mb-active-app):not(#mb-clock) { display: none; }
  .desktop-icons { display: none; }
  .app-window {
    left: 4vw !important; top: 60px !important;
    width: 92vw !important; height: 70vh !important;
  }
  #dock { gap: 6px; padding: 6px 8px; }
  .dock-icon { width: 42px; height: 42px; font-size: 18px; }
  .dock-item:hover { transform: none; }
}

/* ============================================================
   Right sidebar widgets + experience apps (added)
   ============================================================ */
#widgets {
  position: absolute; top: 36px; right: 14px; z-index: 6;
  width: 238px; display: flex; flex-direction: column; gap: 12px;
  max-height: calc(100vh - 110px); overflow-y: auto;
}
.widget {
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.22);
  border-radius: 16px; padding: 13px 15px; backdrop-filter: blur(22px); color: #fff;
  flex: 0 0 auto;
}
.w-head { font-size: 10px; letter-spacing: 2px; opacity: .75; }

.widget-wallpaper .swatches { display: flex; gap: 8px; margin-top: 10px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.5); cursor: pointer; padding: 0; }
.swatch.is-active { box-shadow: 0 0 0 2px rgba(255,255,255,0.2), 0 0 0 4px #fff; }

.widget-weather { display: flex; gap: 14px; }
.wx { flex: 1; }
.wx-city { font-size: 10px; letter-spacing: 1.5px; opacity: .75; }
.wx-temp { font-size: 34px; font-weight: 200; line-height: 1.1; }
.wx-cond { font-size: 11px; opacity: .8; }

#dino { display: block; width: 100%; height: 84px; margin-top: 8px; cursor: pointer; }
.game-hint { font-size: 10px; opacity: .6; text-align: center; margin-top: 4px; }

.np { display: flex; gap: 11px; align-items: center; margin-top: 10px; }
.np-art { width: 44px; height: 44px; border-radius: 8px; flex: 0 0 auto; background: linear-gradient(150deg,#5ac8fa,#0a84ff); }
.np-meta strong { font-size: 14px; display: block; }
.np-meta span { font-size: 11px; opacity: .7; }
.np-bar { height: 4px; border-radius: 3px; background: rgba(255,255,255,0.25); margin: 11px 0 9px; overflow: hidden; }
.np-fill { height: 100%; width: 34%; background: #fff; }
.np-controls { display: flex; gap: 14px; align-items: center; }
.np-btn { background: none; border: none; color: #fff; cursor: pointer; font-size: 14px; padding: 0; }
.np-play { font-size: 16px; }

#get-in-touch { background: rgba(255,255,255,0.92); color: #1a1a1a; border: none; border-radius: 14px; padding: 12px; font-weight: 600; font-size: 13px; cursor: pointer; flex: 0 0 auto; }
#get-in-touch:hover { background: #fff; }

/* Move the desktop file icons to the left so they clear the widgets */
.desktop-icons { right: auto !important; left: 18px; }

/* Tools I use (decorative tiles, not clickable) — real brand logos */
.dock-exp { cursor: default; }
.dock-exp .dock-icon {
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22), inset 0 0 0 1px rgba(0,0,0,0.05);
}
.dock-exp .dock-icon img {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  -webkit-user-drag: none; user-select: none; pointer-events: none;
}

@media (max-width: 900px) { #widgets { display: none; } }

/* ============================================================
   Scattered desktop icons, photos, Case Studies, Quick Look
   ============================================================ */
.desktop-icons {
  position: absolute; inset: 34px 300px 96px 0;
  left: 0 !important; right: 300px;
  display: block !important; z-index: 5; pointer-events: none;
}
.desktop-icon {
  position: absolute; width: 96px; padding: 7px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  border-radius: 8px; cursor: grab; user-select: none; pointer-events: auto;
}
.desktop-icon.dragging { cursor: grabbing; z-index: 40; }
.desktop-icon span {
  font-size: 11.5px; line-height: 1.25; text-align: center;
  max-width: 92px; word-break: break-word;
  text-shadow: 0 1px 3px rgba(0,0,0,0.75);
}

/* folder */
.dicon-folder {
  width: 52px; height: 40px; border-radius: 3px 8px 8px 8px; position: relative;
  background: linear-gradient(160deg,#7cb8ee,#3f86cf);
  box-shadow: 0 3px 7px rgba(0,0,0,0.28);
}
.dicon-folder::before {
  content: ""; position: absolute; top: -7px; left: 0; width: 23px; height: 9px;
  background: #6fadea; border-radius: 5px 7px 0 0;
}

/* photo thumbnail */
.dicon-photo {
  width: 54px; height: 54px; border-radius: 4px; overflow: hidden;
  background: #fff; padding: 3px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.32);
}
.dicon-photo img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 2px; }

/* Case Studies window */
.cases-body { background: #f7f7f9; }
.cases-toolbar {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 16px; border-bottom: 1px solid #e2e3e5; font-size: 13px;
}
.ct-path { font-weight: 600; color: #333; }
.ct-count { font-size: 11.5px; color: #8a8d93; }
.cases-grid {
  padding: 20px; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); align-content: start;
}
.case-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  text-align: center; padding: 12px 8px; border-radius: 8px; cursor: default;
}
.case-card:hover { background: rgba(10,132,255,0.08); }
.case-card strong { font-size: 12.5px; color: #1d1d1f; }
.case-card span { font-size: 10.5px; color: #6a6a6e; line-height: 1.4; }

/* Quick Look */
#quicklook {
  position: fixed; inset: 0; z-index: 200; display: flex;
  align-items: center; justify-content: center;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(6px);
}
#quicklook[hidden] { display: none; }
.ql-card {
  background: #fbfaf7; border-radius: 12px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
  max-width: min(90vw, 1000px); max-height: 88vh;
  display: flex; flex-direction: column;
}
#ql-img { max-width: 100%; max-height: calc(88vh - 52px); object-fit: contain; display: block; background: #111; }
.ql-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 11px 16px; color: #1d1d1f;
}
.ql-bar span { font-size: 12.5px; color: #55555a; }
.ql-close {
  background: #0a84ff; color: #fff; border: none; border-radius: 7px;
  padding: 5px 16px; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.ql-close:hover { background: #0870d8; }

@media (max-width: 900px) { .desktop-icons { right: 0; } }
@media (max-width: 720px) { .desktop-icons { display: none !important; } }

/* ============================================================
   App-style desktop glyphs + tools-only dock
   ============================================================ */
.dicon-glyph { width: 52px; height: 52px; border-radius: 9px; position: relative; }

/* prominent Case Studies folder */
.desktop-icon.is-large { width: 118px; }
.is-large .dicon-folder { width: 74px; height: 57px; border-radius: 4px 11px 11px 11px; }
.is-large .dicon-folder::before { width: 33px; height: 12px; top: -10px; }
.is-large .dicon-folder::after {
  content: ""; position: absolute; left: 50%; top: 52%; transform: translate(-50%,-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: inset 0 0 0 5px #4a90d9;
}
.is-large span { font-weight: 600; max-width: 114px; }

/* stickies / ReadMe */
.dicon-stickies {
  background: linear-gradient(#fdfdfb,#eceae2);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.dicon-stickies::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: 15px; height: 2px;
  background: #c9c6bd; box-shadow: 0 7px 0 #c9c6bd, 0 14px 0 #c9c6bd, 0 21px 0 #d9d6cd;
}
/* notebook / Notes */
.dicon-notebook {
  background: linear-gradient(160deg,#ffe27a,#f6c945);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.dicon-notebook::before {
  content: ""; position: absolute; left: 9px; top: 0; bottom: 0; width: 5px;
  background: rgba(255,255,255,0.55);
}
.dicon-notebook::after {
  content: ""; position: absolute; left: 22px; right: 9px; top: 16px; height: 2px;
  background: rgba(120,80,0,0.35); box-shadow: 0 8px 0 rgba(120,80,0,0.35), 0 16px 0 rgba(120,80,0,0.35);
}
/* writing / Safari */
.dicon-writing {
  background: radial-gradient(circle at 32% 30%, #eaf6ff, #4fa8ff 62%, #1c6fd9);
  border-radius: 50%; box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.dicon-writing::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 4px; height: 26px;
  background: linear-gradient(#ff3b30 50%, #fff 50%);
  transform: translate(-50%,-50%) rotate(42deg); border-radius: 2px;
}
/* terminal */
.dicon-terminal {
  background: #1c1c1e; box-shadow: 0 3px 8px rgba(0,0,0,0.34);
  display: flex; align-items: center; justify-content: center;
}
.dicon-terminal::after {
  content: ">_"; color: #4cd964; font-family: ui-monospace, Menlo, monospace;
  font-size: 17px; font-weight: 700;
}
/* mail */
.dicon-mail {
  background: linear-gradient(160deg,#6fc3ff,#0a84ff);
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
}
.dicon-mail::after {
  content: ""; width: 30px; height: 21px; border: 2px solid #fff; border-radius: 3px;
  background: linear-gradient(-45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%),
              linear-gradient(45deg, transparent 46%, #fff 46%, #fff 54%, transparent 54%);
  background-size: 15px 11px; background-position: right top, left top; background-repeat: no-repeat;
}
/* pdf on the desktop */
.dicon-pdf {
  width: 44px; height: 54px; border-radius: 4px;
  background: #fff; color: #d8483c; border: 1px solid #ddd;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.28);
}

/* dock caption */
#dock-caption {
  position: absolute; bottom: 84px; left: 50%; transform: translateX(-50%); z-index: 60;
  font-size: 10px; letter-spacing: 3px; color: rgba(255,255,255,0.82);
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* restore folder shape (must win over the generic .dicon-glyph box) */
.dicon-glyph.dicon-folder {
  width: 54px; height: 42px; border-radius: 3px 8px 8px 8px;
  background: linear-gradient(160deg,#7cb8ee,#3f86cf);
  box-shadow: 0 3px 7px rgba(0,0,0,0.28);
}
.is-large .dicon-glyph.dicon-folder { width: 76px; height: 59px; border-radius: 4px 11px 11px 11px; }
.dicon-glyph.dicon-pdf { width: 44px; height: 54px; border-radius: 4px; }

/* ============================================================
   Top-left intro, Live Stats + Mission widgets, PDF case studies
   ============================================================ */
#intro { position: absolute; top: 40px; left: 22px; z-index: 6; max-width: 330px; color: #fff; }
.intro-head {
  font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.55); margin-bottom: 10px;
}
#intro p {
  font-size: 12.5px; line-height: 1.6; margin-bottom: 8px;
  color: rgba(255,255,255,0.92); text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Live Stats */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; margin-top: 11px; }
.stats-grid > div { display: flex; flex-direction: column; gap: 1px; }
.stat-num { font-size: 23px; font-weight: 300; line-height: 1.1; letter-spacing: -.5px; }
.stat-label { font-size: 10.5px; opacity: .72; }

/* Mission */
.mission-text { font-size: 12.5px; line-height: 1.5; margin: 10px 0 12px; opacity: .95; }
.mission-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,0.14);
}
.mission-row .mr-label { opacity: .68; min-width: 44px; }
.mission-row .mr-val { margin-left: auto; font-variant-numeric: tabular-nums; }
.blocks { letter-spacing: 1px; font-size: 11px; }
.skills { margin-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.skill { display: grid; grid-template-columns: 78px 1fr; align-items: center; gap: 9px; }
.skill span { font-size: 10.5px; opacity: .8; }
.skill i {
  height: 5px; border-radius: 3px; background: rgba(255,255,255,0.22); display: block; position: relative;
}
.skill i::after {
  content: ""; position: absolute; inset: 0; width: var(--w);
  border-radius: 3px; background: #fff; opacity: .92;
}

/* PDF case-study cards */
.case-card.is-pdf { cursor: pointer; }
.pdf-cover {
  position: relative; width: 78px; height: 100px; border-radius: 4px; overflow: hidden;
  background: #fff; box-shadow: 0 3px 9px rgba(0,0,0,0.22); border: 1px solid #e2e2e5;
}
.pdf-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top center; display: block; }
.pdf-tag {
  position: absolute; left: 0; bottom: 0; background: #d8483c; color: #fff;
  font-size: 8.5px; font-weight: 800; letter-spacing: .5px; padding: 2px 5px; border-radius: 0 4px 0 3px;
}

/* PDF viewer window */
.pdf-body { display: flex; flex-direction: column; background: #52565c; }
#pdf-frame { flex: 1; width: 100%; border: none; background: #52565c; }
.pdf-actions { flex: 0 0 auto; padding: 8px 14px; background: #f2f2f4; border-top: 1px solid #dcdde0; text-align: right; }
.pdf-actions a { font-size: 12px; color: #0a84ff; font-weight: 600; }
.pdf-actions a:hover { text-decoration: underline; }

/* PDF stage: fallback sits behind the iframe */
.pdf-stage { position: relative; flex: 1; min-height: 0; background: #ececed; }
.pdf-stage #pdf-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: none; background: transparent; }
.pdf-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center;
}
.pdf-fallback img { max-height: 46%; border: 1px solid #d8d8dc; box-shadow: 0 6px 20px rgba(0,0,0,0.14); }
.pdf-fallback p { font-size: 12.5px; color: #6a6a6e; max-width: 340px; line-height: 1.5; }
.pdf-btn {
  background: #0a84ff; color: #fff; border-radius: 7px; padding: 7px 18px;
  font-size: 12.5px; font-weight: 600;
}
.pdf-actions { display: flex; gap: 18px; justify-content: flex-end; }

/* <object> based PDF stage */
.pdf-stage > object { width: 100%; height: 100%; display: block; }

/* ============================================================
   v2: real app icons, proper widgets, Safari + PDF reader
   ============================================================ */

/* --- real macOS app icons on the desktop --- */
.dicon-glyph.icon-img {
  width: 54px; height: 54px; border-radius: 0; background: none !important;
  box-shadow: none !important; display: block;
}
.dicon-glyph.icon-img::before, .dicon-glyph.icon-img::after { content: none !important; }
.dicon-glyph.icon-img img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 3px 5px rgba(0,0,0,0.34)); }
.is-large .dicon-glyph.icon-img { width: 72px; height: 72px; }

/* --- CURRENT STATS as a real widget --- */
.widget-stats .stats-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 11px;
  background: rgba(255,255,255,0.16); border-radius: 12px; overflow: hidden;
}
.stat-cell {
  background: rgba(255,255,255,0.07); padding: 11px 10px 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-cell .stat-num { font-size: 21px; font-weight: 300; letter-spacing: -.5px; line-height: 1.05; }
.stat-cell .stat-label { font-size: 9.5px; opacity: .7; line-height: 1.25; }

/* --- Mission: text + status bar only --- */
.mission-status { margin-top: 12px; }
.ms-top { display: flex; justify-content: space-between; font-size: 11px; opacity: .8; margin-bottom: 6px; }
.ms-pct { font-variant-numeric: tabular-nums; opacity: 1; }
.ms-track { height: 6px; border-radius: 4px; background: rgba(255,255,255,0.2); overflow: hidden; }
.ms-track i { display: block; height: 100%; width: var(--w); background: #fff; border-radius: 4px; }

/* --- Coffee counter --- */
.coffee-row { display: flex; align-items: center; gap: 12px; margin-top: 11px; }
.coffee-cups { display: flex; gap: 5px; }
.coffee-cups span { font-size: 19px; line-height: 1; cursor: pointer; transition: transform .12s, opacity .12s; }
.coffee-cups span.empty { opacity: .28; filter: grayscale(1); }
.coffee-cups span:hover { transform: translateY(-2px); }
.coffee-meta { margin-left: auto; text-align: right; }
.coffee-num { font-size: 22px; font-weight: 300; display: block; line-height: 1.05; }
.coffee-lbl { font-size: 9.5px; opacity: .7; }

/* --- Skills widget --- */
.widget-skills .skills { margin-top: 11px; gap: 9px; }
.widget-skills .skill { grid-template-columns: 78px 1fr 24px; }
.widget-skills .skill em { font-style: normal; font-size: 9.5px; opacity: .65; text-align: right; font-variant-numeric: tabular-nums; }

/* --- Projects / site cards --- */
.site-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.case-card.is-site { cursor: pointer; align-items: flex-start; text-align: left; gap: 4px; padding: 13px 14px; }
.case-card.is-site:hover { background: rgba(10,132,255,0.09); }
.site-favicon {
  width: 34px; height: 34px; border-radius: 8px; background: #fff; margin-bottom: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  border: 1px solid #e3e3e6; box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.site-favicon img { width: 24px; height: 24px; object-fit: contain; image-rendering: -webkit-optimize-contrast; }
.case-card.is-site strong { font-size: 13px; }
.case-card.is-site span { font-size: 11px; color: #0a84ff; }

/* --- Safari window --- */
.safari-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; background: linear-gradient(#f4f4f6,#e9e9ec);
  border-bottom: 1px solid #d9d9dd; font-size: 13px; color: #6a6a6e;
}
.safari-url {
  flex: 1; display: flex; align-items: center; gap: 6px; justify-content: center;
  background: #fff; border: 1px solid #dcdce0; border-radius: 7px;
  padding: 4px 12px; font-size: 12px; color: #333;
}
.safari-url .lock { font-size: 9px; opacity: .6; }
.sb-open { font-size: 12px; color: #0a84ff; font-weight: 600; white-space: nowrap; }
.sb-open:hover { text-decoration: underline; }
.safari-stage { background: #fff; position: relative; overflow: auto; }
.safari-stage iframe { width: 100%; height: 100%; border: none; display: block; }
.site-card {
  height: 100%; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 14px; padding: 40px 34px; text-align: center; color: #1d1d1f;
}
.site-card .sc-icon { width: 62px; height: 62px; border-radius: 14px; background: #fff; border: 1px solid #e3e3e6; display: flex; align-items: center; justify-content: center; box-shadow: 0 3px 10px rgba(0,0,0,0.1); }
.site-card .sc-icon img { width: 42px; height: 42px; object-fit: contain; }
.site-card h3 { font-size: 21px; font-weight: 600; }
.site-card .sc-scope { font-size: 13px; color: #6a6a6e; }
.site-card .sc-url { font-size: 12.5px; color: #0a84ff; }
.site-card .sc-note { font-size: 11.5px; color: #8a8a8e; max-width: 380px; line-height: 1.5; }
.site-card .sc-btn { background: #0a84ff; color: #fff; border-radius: 8px; padding: 9px 22px; font-size: 13px; font-weight: 600; }
.site-card .sc-btn:hover { background: #0870d8; }

/* --- PDF paged reader --- */
.pdf-stage { background: #55585e; overflow: auto; padding: 16px 0; }
.pdf-stage img {
  display: block; width: calc(100% - 32px); max-width: 720px; margin: 0 auto 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35); background: #fff;
}
.pdf-count { margin-right: auto; font-size: 11.5px; color: #8a8a8e; }
.pdf-actions { display: flex; align-items: center; gap: 18px; }
