:root {
  --ink: #1c1917;
  --ink-soft: #57534e;
  --muted: #625c57;
  --cream: #e8e2d5;
  --wall: #E4E8ED;
  --paper: rgba(255, 255, 255, 0.85);
  --accent: #2563eb;
  --radius: 16px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(15, 23, 42, 0.1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* round 26: one scrollbar style site-wide: thin rounded thumb on a clear track, kept off rounded corners.
   Chrome and Safari use the -webkit rules; the standard properties apply only where those are missing,
   because setting them in Chrome turns the rounded -webkit styling off. */
::-webkit-scrollbar{width:12px;height:12px}
::-webkit-scrollbar-track{background:transparent;margin:14px}
::-webkit-scrollbar-thumb{background:rgba(30,33,36,.30);border-radius:999px;border:4px solid transparent;background-clip:padding-box;min-height:40px}
::-webkit-scrollbar-thumb:hover{background:rgba(30,33,36,.5);border:3px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-button{display:none;width:0;height:0}
::-webkit-scrollbar-corner{background:transparent}
body.dark ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.30);border:4px solid transparent;background-clip:padding-box}
body.dark ::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.5);border:3px solid transparent;background-clip:padding-box}
@supports not selector(::-webkit-scrollbar){*{scrollbar-width:thin;scrollbar-color:rgba(30,33,36,.30) transparent}body.dark *{scrollbar-color:rgba(255,255,255,.35) transparent}}
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--wall);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Wallpaper layer: full-bleed image when in Full mode or dark mode */
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--wall);
  overflow: hidden;
}
.wallpaper img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
body.wp-full .wallpaper img { display: block; }
.wallpaper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(232, 226, 213, 0.35);
  display: none;
}
body.wp-full .wallpaper::after { display: block; }
body.dark.wp-full .wallpaper::after { background: rgba(20, 18, 16, 0.5); }

/* Framed artwork in the centre of the wall */
.framed-art {
  position: absolute;
  left: 50%;
  top: 21%;
  transform: translateX(-50%);
  width: min(880px, 46vw);
  margin: 0;
  z-index: 1;
}
.framed-art img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 68vh;
  margin: 0 auto;
  border: 14px solid #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3), 0 4px 16px rgba(15, 23, 42, 0.15);
}
.art-chip {
  display: inline-block;
  margin-top: 12px;
  font-size: 12px;
  color: rgba(28, 25, 23, 0.7);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  padding: 4px 12px;
  border-radius: 999px;
}
body.wp-full .framed-art { display: none; }
body.wp-solid .framed-art { display: none; }

/* Menu bar — 36px, 13px type */
.menubar {
  position: relative;
  z-index: 10000; /* always above every window, overlay and widget */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  font-size: 13px;
}
.mb-left, .mb-right { display: flex; align-items: center; gap: 2px; }
.mb-name { font-weight: 700; font-size: 15px; padding: 0 8px; }
.mb-item { color: var(--ink); }
.mb-clock { font-weight: 500; padding: 0 10px; font-size: 13px; }
.mb-text-btn, .mb-icon-btn {
  background: transparent;
  border: none;
  font: inherit;
  color: var(--ink-soft);
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  outline: none;
}
.mb-text-btn:hover, .mb-icon-btn:hover { background: rgba(28, 25, 23, 0.08); color: var(--ink); }
.mb-text-btn.active { background: rgba(28, 25, 23, 0.08); color: var(--ink); }

/* Left icon dock */
.dock-rail {
  position: fixed;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.dock-rail button {
  position: relative;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dock-rail button:hover { background: #e7e5e4; color: var(--ink); }
.dock-rail button:hover::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(28, 25, 23, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
}
.dock-rail button.has-min::before {
  content: '';
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.rail-sep { width: 28px; height: 1px; background: #d6d3d1; margin: 4px 0; }

/* Desktop canvas — everything is absolutely placed, so nothing can push anything else */
.desktop {
  position: relative;
  z-index: 1;
  height: calc(100vh - 36px);
}
.glass {
  background: var(--paper);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.window, .widget { position: absolute; overflow: hidden; }
#window-intro { left: 17%; top: 8%; width: 332px; z-index: 10; }
#widget-clocks { left: 38%; top: 6%; width: 480px; z-index: 10; }
#widget-weather { left: 17%; top: 58%; width: 300px; z-index: 10; }
.note { position: absolute; z-index: 10; }
#note-motto { left: 17%; top: 84%; width: 265px; }
#note-resume { left: 42%; top: 87%; }
#note-contact { right: 13%; top: 84%; }
.dragging { box-shadow: 0 32px 90px rgba(15, 23, 42, 0.35); }

.window-bar, .widget-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.5);
  cursor: grab;
  user-select: none;
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
  flex-shrink: 0;
}
.window-bar:active, .widget-bar:active { cursor: grabbing; }
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.dot[data-act] { cursor: pointer; }
.window-title, .widget-title { font-size: 13px; font-weight: 600; margin-left: 6px; color: var(--ink-soft); }
.widget-sub { font-size: 11px; color: var(--muted); }
.widget-actions { margin-left: auto; display: flex; gap: 2px; }
.bar-btn {
  border: none;
  background: transparent;
  font-size: 15px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 5px;
}
.bar-btn:hover { background: rgba(28, 25, 23, 0.1); color: var(--ink); }
.bar-btn.reset-notes { font-size: 12px; font-weight: 600; margin-left: auto; }

.window-body { padding: 18px 20px 20px; overflow-y: auto; }
.window-body h2, .window-body h3 { margin: 0 0 10px; }
.window-body p { line-height: 1.6; color: var(--ink-soft); }
.muted { color: var(--muted); font-size: 14px; }

/* Overlay windows: float above the desktop, open on demand */
.overlay-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  max-height: 86vh;
  z-index: 60;
  display: flex;
  flex-direction: column;
}
.overlay-window .window-body { max-height: calc(86vh - 41px); }
#window-work.overlay-window { width: min(860px, 94vw); }
#window-finder.overlay-window, #window-notes-win.overlay-window { width: min(760px, 94vw); }
#window-terminal.overlay-window { width: min(840px, 94vw); }
.hidden-window { display: none !important; }
.overlay-window.maximised {
  top: 48px !important;
  left: 24px !important;
  right: 24px !important;
  bottom: 24px !important;
  transform: none;
  width: auto !important;
  height: auto !important;
  max-height: none;
}
.overlay-window.maximised .window-body { max-height: calc(100vh - 48px - 24px - 41px); }
.overlay-window.maximised .window-body > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.overlay-window.maximised .timeline { max-width: none; }

/* Intro card */
.intro-body { text-align: center; padding: 22px 20px 20px; }
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 4px solid #fff;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.2);
}
.intro-body h1 { font-size: 30px; margin: 12px 0 6px; letter-spacing: -0.02em; }
.headline { font-size: 14px; line-height: 1.5; color: var(--ink-soft); max-width: 400px; margin: 0 auto 16px; }
.intro-title { font-size: 14px; font-weight: 700; color: var(--accent); max-width: 400px; margin: 0 auto 10px; line-height: 1.45; }
.intro-buttons { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.intro-buttons button, .pill-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.intro-buttons button:hover, .pill-btn:hover { background: #f5f5f4; }
.wp-footer { display: flex; justify-content: space-between; margin-top: 14px; }
.pill-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-btn.primary:hover { background: #1d4ed8; }
.welcome-strip {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}
.welcome-strip span { float: right; }

/* Widgets */
.widget { padding: 0; }
.widget .clock-grid, .widget .weather-body { padding: 14px 16px 16px; }
.widget ul { padding: 16px 20px 18px; }
.widget h2 { font-size: 14px; margin: 0 0 4px; }

/* Analog clocks */
.clock-grid { display: flex; gap: 8px; }
.clock-cell { flex: 1; text-align: center; min-width: 0; }
.clock-cell svg { width: 64px; height: 64px; display: block; margin: 0 auto 5px; }
.clock-city { font-size: 12px; font-weight: 600; }
.clock-time { font-size: 13px; font-weight: 700; }
.clock-day { font-size: 11px; color: var(--muted); }
.weather-body { font-size: 14px; }
.wx-scene { position: relative; height: 96px; border-radius: 12px; overflow: hidden; background: linear-gradient(180deg, #8fb8e0, #cfe1f1); }
.wx-scene.wx-dawn { background: linear-gradient(180deg, #8ea3c8 0%, #f2c6a6 70%, #f7dcc0 100%); }
.wx-scene.wx-dusk { background: linear-gradient(180deg, #3d4f7a 0%, #c9877a 70%, #e9b48f 100%); }
.wx-scene.wx-night { background: linear-gradient(180deg, #0f1a2e 0%, #23344f 100%); }
.wx-scene.wx-wet::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(105deg, transparent 0 7px, rgba(255,255,255,.18) 7px 8px); }
.wx-orb { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; }
.wx-orb.sun { background: radial-gradient(circle, #fff6d8 0 40%, #ffd476 41% 100%); box-shadow: 0 0 22px 6px rgba(255, 214, 120, .55); }
.wx-orb.moon { background: #e8edf5; box-shadow: inset -6px -2px 0 0 #b9c4d6, 0 0 14px 2px rgba(220, 230, 245, .35); }
.wx-city { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 46%; fill: rgba(30, 42, 60, .78); }
.wx-night .wx-city, .wx-dusk .wx-city { fill: rgba(8, 12, 22, .85); }
.weather-temp { position: absolute; right: 12px; top: 8px; font-size: 30px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.28); }
.weather-temp small { font-size: 14px; font-weight: 700; margin-left: 1px; }
.wx-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.weather-cond { color: var(--ink-soft); font-weight: 600; }
.wx-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.weather-src { font-size: 11px; color: var(--muted); margin-top: 6px; }
.wx-mini .wx-scene { height: 58px; }
.wx-mini .weather-temp { font-size: 22px; top: 6px; }
.wx-mini .weather-src { display: none; }

/* Work timeline */
.hint { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.timeline-controls { display: flex; gap: 8px; margin-bottom: 8px; }
.timeline-controls button {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid #d6d3d1;
  background: #fff;
  font-size: 16px; line-height: 1;
  cursor: pointer;
  color: var(--ink);
}
.timeline-viewport { overflow-x: auto; padding-bottom: 4px; }
.timeline {
  display: flex;
  gap: 0;
  min-width: 780px;
  padding-top: 28px;
  position: relative;
  transform-origin: left top;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 12px; left: 6px; right: 6px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}
.timeline-item { flex: 1 0 130px; padding: 0 12px 0 0; position: relative; }
.timeline-item::before {
  content: '';
  position: absolute;
  top: -21px; left: 0;
  width: 13px; height: 13px;
  background: #fff;
  border: 3px solid var(--accent);
  border-radius: 50%;
}
.timeline-item .years { color: var(--accent); font-weight: 700; font-size: 12px; margin: 0 0 4px; }
.timeline-item h4 { margin: 0 0 4px; font-size: 13.5px; line-height: 1.3; }
.timeline-item p { margin: 0; font-size: 12.5px; line-height: 1.5; }
.timeline-item .employer { font-size: 12.5px; font-weight: 600; color: var(--ink); margin: 0 0 2px; }
.edu { list-style: none; padding: 0; margin: 16px 0 0; }
.edu li { padding: 6px 0; border-top: 1px solid rgba(28, 25, 23, 0.08); font-size: 14px; color: var(--ink-soft); }
.edu li b { color: var(--ink); }
.showcase-link {
  display: inline-block;
  margin-top: 18px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.showcase-link:hover { text-decoration: underline; }

/* Projects */
.project { padding: 11px 0; border-bottom: 1px solid rgba(28, 25, 23, 0.08); }
.project:last-child { border-bottom: none; }
.project h4 { margin: 0 0 3px; font-size: 15px; }
.project p { margin: 0; font-size: 13.5px; }
.project a { color: var(--accent); text-decoration: none; font-weight: 600; }


/* Sticky notes */
.note {
  padding: 12px 16px;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(28, 25, 23, 0.16);
  font-size: 14px;
  cursor: grab;
  user-select: none;
  width: 240px;
}
.note:active { cursor: grabbing; }
.note.yellow { background: #fef08a; transform: rotate(-1.2deg); }
.note.pink { background: #fbcfe8; transform: rotate(0.9deg); }
.note.blue { background: #bfdbfe; transform: rotate(-0.5deg); }
.note-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(28, 25, 23, 0.55); margin: 0 0 2px; }
.note p { margin: 0; color: var(--ink); line-height: 1.45; text-wrap: balance; white-space: pre-line; }
.handwritten { font-family: 'Caveat', cursive; font-size: 22px; line-height: 1.2; }
.note a { color: var(--ink); font-weight: 600; }

/* Menus */
.menu { position: relative; }
.menu-btn {
  background: transparent;
  border: none;
  font: inherit;
  color: var(--ink-soft);
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.menu-btn:hover, .menu.open .menu-btn { background: rgba(28, 25, 23, 0.08); color: var(--ink); }
.menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 240px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(28, 25, 23, 0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(28, 25, 23, 0.25);
  z-index: 100;
}
.menu.open .menu-dropdown { display: block; }
.menu-dropdown button {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 10px;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  text-align: left;
  border-radius: 7px;
  cursor: pointer;
}
.menu-dropdown button:hover { background: rgba(37, 99, 235, 0.12); }
.menu-dropdown button.disabled { color: var(--muted); cursor: default; background: transparent; }
.menu-sep { height: 1px; background: rgba(28, 25, 23, 0.1); margin: 5px 4px; }
.menu-dropdown .check { width: 16px; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.menu-dropdown button .kbd, .menu-dropdown button .win-x { margin-left: auto; }
.menu-dropdown .win-dot { color: #28c840; font-size: 11px; }
.menu-dropdown .win-x { color: var(--muted); font-size: 14px; padding: 0 2px; }
.menu-dropdown .win-x:hover { color: var(--ink); }
.kbd {
  font-size: 11px;
  color: var(--muted);
  background: rgba(28, 25, 23, 0.07);
  border-radius: 4px;
  padding: 1px 5px;
}

/* Dark appearance */
body.dark {
  --ink: #f5f5f4;
  --ink-soft: #d6d3d1;
  --muted: #a8a29e;
  --wall: #1c1917;
  --paper: rgba(32, 29, 27, 0.88);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}
body.dark .menubar { background: rgba(28, 25, 23, 0.9); border-bottom-color: rgba(255, 255, 255, 0.08); }
body.dark .dock-rail { background: rgba(32, 29, 27, 0.85); border-color: rgba(255, 255, 255, 0.12); }
body.dark .dock-rail button:hover { background: #44403c; }
body.dark .menu-dropdown { background: rgba(32, 29, 27, 0.97); border-color: rgba(255, 255, 255, 0.12); }
body.dark .menu-dropdown button:hover { background: rgba(96, 165, 250, 0.2); }
body.dark .menu-btn:hover, body.dark .menu.open .menu-btn { background: rgba(255, 255, 255, 0.1); }
body.dark .window-bar, body.dark .widget-bar { background: rgba(255, 255, 255, 0.06); border-bottom-color: rgba(255, 255, 255, 0.06); }
body.dark .intro-buttons button, body.dark .timeline-controls button, body.dark .pill-btn { background: #292524; border-color: #57534e; color: #f5f5f4; }
body.dark .note.yellow { background: #854d0e; }
body.dark .note.pink { background: #831843; }
body.dark .note.blue { background: #1e3a8a; }
body.dark .wp-option { border-color: rgba(255, 255, 255, 0.15); }
/* dark-mode legibility: any control with a hardcoded light background must
   get a dark background here, or the light dark-mode text is unreadable */
body.dark .wp-mode { background: #292524; border-color: #57534e; color: #f5f5f4; }
body.dark .wp-mode.active { background: rgba(59, 130, 246, 0.18); }
body.dark .pill-btn:hover, body.dark .intro-buttons button:hover { background: #44403c; }
body.dark .pill-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
body.dark .pill-btn.primary:hover { background: #1d4ed8; }
body.dark .art-chip { background: rgba(28, 25, 23, 0.7); color: rgba(255, 255, 255, 0.85); }
body.dark #contact-form input, body.dark #contact-form select, body.dark #contact-form textarea { background: #292524; border-color: #57534e; color: #f5f5f4; }
body.dark .note-tag { color: rgba(255, 255, 255, 0.6); }
body.dark .wp-pack-btn { border-color: rgba(255, 255, 255, 0.2); }
body.dark .bar-btn:hover { background: rgba(255, 255, 255, 0.1); }
body.dark .finder-side { border-right-color: rgba(255, 255, 255, 0.1); }

/* Finder */
.finder-body { display: flex; gap: 0; padding: 0; min-height: 420px; }
.finder-side {
  width: 150px;
  flex-shrink: 0;
  padding: 14px 10px;
  border-right: 1px solid rgba(28, 25, 23, 0.1);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.finder-side-title { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 6px; }
.finder-side button {
  border: none;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  padding: 7px 8px;
  border-radius: 7px;
  cursor: pointer;
}
.finder-side button:hover, .finder-side button.active { background: rgba(37, 99, 235, 0.12); }
.finder-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  padding: 16px;
}
.finder-item {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 10px;
  padding: 12px 6px 10px;
  cursor: pointer;
  font: inherit;
  color: var(--ink);
  text-align: center;
}
.finder-item:hover { background: rgba(28, 25, 23, 0.05); }
.finder-item.selected { background: rgba(37, 99, 235, 0.12); border-color: rgba(37, 99, 235, 0.3); }
.finder-item .fi-icon { font-size: 30px; display: block; margin-bottom: 6px; }
.finder-item .fi-name { font-size: 12.5px; font-weight: 600; }
.finder-preview {
  border-top: 1px solid rgba(28, 25, 23, 0.08);
  padding: 14px 18px;
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.finder-preview b { color: var(--ink); }

/* Notes window */
.notes-list { list-style: none; margin: 0; padding: 0; }
.notes-list li { padding: 10px 2px; border-bottom: 1px solid rgba(28, 25, 23, 0.08); font-size: 14.5px; }
.notes-list li:last-child { border-bottom: none; }
.notes-list .note-tag { display: block; }
.notes-list a { color: var(--accent); font-weight: 600; text-decoration: none; }
.notes-section { font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 4px; }
.notes-section:first-child { margin-top: 0; }
.quote-btn { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--accent); background: transparent; border: none; cursor: pointer; padding: 0; }

/* Terminal */
.terminal { background: rgba(12, 12, 12, 0.94); color: #d4d4d4; }
.terminal .window-bar { background: rgba(255, 255, 255, 0.06); border-bottom-color: rgba(255, 255, 255, 0.08); }
.terminal .window-title { color: #d4d4d4; }
.terminal-body {
  padding: 16px 18px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  line-height: 1.65;
  overflow-y: auto;
  max-height: 420px;
  white-space: pre-wrap;
  word-break: break-word;
}
.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 18px 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
}
.terminal-prompt { color: #4ade80; flex-shrink: 0; }
#terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #d4d4d4;
  font: inherit;
}

/* Contact form */
#contact-form { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
#contact-form label { font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 4px; }
#contact-form input, #contact-form select, #contact-form textarea {
  font: inherit;
  font-size: 14px;
  padding: 9px 11px;
  border: 1px solid #d6d3d1;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}
#contact-form .pill-btn { align-self: flex-start; }
.contact-alt { margin-top: 16px; }
.contact-alt a { color: var(--accent); font-weight: 600; text-decoration: none; }

/* Wallpaper settings */
.wp-mode-row { display: flex; gap: 8px; margin-bottom: 14px; }
.wp-mode {
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.wp-mode.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wp-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
/* the settings window never needs to be wider than this; without the cap the
   option cards stretch into wide strips when the window is dragged wide */
#window-wallpaper { width: min(720px, 94vw); max-width: 720px; }
#window-wallpaper.maximised { max-width: none; }
.wp-packs { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.wp-pack-btn {
  border: 1px solid rgba(28, 25, 23, 0.15);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
}
.wp-pack-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.wp-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(28, 25, 23, 0.12);
  border-radius: 12px;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.wp-option:hover { border-color: var(--accent); }
.wp-option.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wp-swatch { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background-size: cover; background-position: center; }
.wp-option .check { color: var(--accent); font-weight: 700; }

/* Widget settings panel */
.widget-panel {
  position: fixed;
  top: 48px;
  right: 14px;
  width: 340px;
  z-index: 10010;
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 16px 16px 10px;
}
.wp-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.widget-panel h3 { margin: 0; font-size: 15px; }
.wp-count { font-size: 12px; color: var(--muted); }
.wp-head-actions { display: flex; align-items: center; gap: 6px; }
.wp-reset { font-size: 12px; padding: 5px 10px; }
.widget-panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 2px;
  border-bottom: 1px solid rgba(28, 25, 23, 0.08);
  font-size: 14px;
  font-weight: 600;
}
.widget-panel-row:last-child { border-bottom: none; }
.wp-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wp-sub { font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 1px; }
.wp-switch {
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  background: #d6d3d1;
  cursor: pointer;
  padding: 0;
  position: relative;
  transition: background 0.15s;
}
.wp-switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: left 0.15s;
}
.wp-switch[aria-checked="true"] { background: #2563eb; }
.wp-switch[aria-checked="true"] span { left: 18px; }
.wp-seg { display: flex; border: 1px solid #d6d3d1; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.wp-seg button {
  border: none;
  background: #f5f5f4;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.wp-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(28, 25, 23, 0.12); }
body.dark .wp-switch { background: #57534e; }
body.dark .wp-switch[aria-checked="true"] { background: #2563eb; }
body.dark .wp-seg { border-color: #57534e; }
body.dark .wp-seg button { background: #292524; }
body.dark .wp-seg button.on { background: #44403c; }

/* Dock icon colours */
.dock-rail button[data-dock="finder"] { color: #0a84ff; }
.dock-rail button[data-dock="work"] { color: #7c3aed; }
.dock-rail button[data-dock="projects"] { color: #d97706; }
.dock-rail button[data-dock="notes-win"] { color: #ca8a04; }
.dock-rail button[data-dock="terminal"] { color: #1c1917; }
.dock-rail button[data-dock="about"] { color: #57534e; }
.dock-rail button[data-dock="contact-win"] { color: #2563eb; }
.dock-rail button[data-dock="browser"] { color: #0891b2; }
.dock-rail button[data-href*="linkedin.com"] { color: #0a66c2; }

/* Resize handle + drag safety */
.resize-handle {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  z-index: 5;
  background: linear-gradient(135deg, transparent 0 55%, rgba(28, 25, 23, 0.35) 55% 62%, transparent 62% 72%, rgba(28, 25, 23, 0.35) 72% 79%, transparent 79%);
}
body.is-dragging iframe, body.is-resizing iframe { pointer-events: none; }

/* Browser window: Safari-style toolbar + iframe */
#window-browser.overlay-window { width: min(1120px, 94vw); height: min(700px, 86vh); }
.browser-toolbar {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.5);
  border-bottom: 1px solid rgba(28, 25, 23, 0.06);
  flex-shrink: 0;
}
.browser-toolbar button {
  width: 30px;
  height: 30px;
  border: 1px solid #d6d3d1;
  background: #fff;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.browser-toolbar button:disabled { opacity: 0.35; cursor: default; }
#browser-url {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 13.5px;
  padding: 7px 12px;
  border: 1px solid #d6d3d1;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
#browser-url:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2); }
.browser-tabs { display: flex; gap: 6px; align-items: center; padding: 8px 10px; background: rgba(255, 255, 255, 0.5); flex-shrink: 0; overflow-x: auto; scrollbar-width: none; }
.browser-tabs::-webkit-scrollbar { display: none; }
.browser-tab { display: flex; align-items: center; gap: 6px; max-width: 200px; padding: 6px 8px 6px 12px; border: 1px solid #d6d3d1; border-radius: 999px; background: transparent; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; flex-shrink: 0; }
.browser-tab-title { overflow: hidden; text-overflow: ellipsis; }
.browser-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.browser-tab-x { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; font-size: 13px; line-height: 1; color: inherit; opacity: 0.7; flex-shrink: 0; }
.browser-tab-x:hover { background: rgba(28, 25, 23, 0.15); opacity: 1; }
.browser-tab.active .browser-tab-x:hover { background: rgba(255, 255, 255, 0.25); }
.browser-body { position: relative; flex: 1; min-height: 0; background: #fff; }
.browser-body iframe { width: 100%; height: 100%; border: none; display: block; background: #fff; }
.browser-blocked {
  position: absolute;
  inset: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.browser-blocked p { margin: 4px 0; }
body.dark .browser-toolbar { background: rgba(255, 255, 255, 0.06); }
body.dark .browser-toolbar button, body.dark #browser-url { background: #292524; border-color: #57534e; color: #f5f5f4; }
body.dark .browser-body, body.dark .browser-blocked { background: #1c1917; }
body.dark .browser-blocked p { color: var(--ink-soft); }
body.dark .browser-tabs { background: rgba(255, 255, 255, 0.06); }
body.dark .browser-tab { border-color: rgba(255, 255, 255, 0.2); color: var(--ink-soft); }
body.dark .browser-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Search palette */
.palette {
  position: fixed;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 92vw);
  z-index: 10020;
  background: var(--paper);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(28, 25, 23, 0.35);
  overflow: hidden;
}
.palette input {
  width: 100%;
  padding: 14px 16px;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  border-bottom: 1px solid rgba(28, 25, 23, 0.1);
}
#palette-list { list-style: none; margin: 0; padding: 6px; max-height: 320px; overflow-y: auto; }
#palette-list li {
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
#palette-list li.selected, #palette-list li:hover { background: rgba(37, 99, 235, 0.12); }
#palette-list .hint { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Narrower desktops */
@media (max-width: 1400px) {
  #window-intro { left: 14%; width: 310px; }
  #widget-clocks { left: 40%; width: 380px; }
  .framed-art { width: min(680px, 48vw); top: 24%; }
  #note-motto { left: 14%; }
  #note-resume { left: 40%; }
}

/* Small screens: stack everything, page scrolls */
@media (max-width: 1100px) {
  html, body { overflow-x: hidden; }
  body { overflow: auto; }
  .desktop { display: flex; flex-direction: column; height: auto; padding: 14px 12px 140px; }
  /* the Welcome card comes first and spans the full width. The ID-width rules
     above (332px/310px intro, 480px/380px clocks) would otherwise beat the
     .window/.widget width:auto below and could overflow a phone screen */
  #window-intro { order: -1; width: auto; }
  #widget-clocks, #widget-weather, #widget-career, #widget-building { width: auto; }
  .framed-art { position: static; transform: none; width: 100%; margin-bottom: 14px; }
  .window, .widget, .note { position: static; width: auto; margin-bottom: 14px; }
  .overlay-window { position: fixed; width: min(560px, 92vw); margin-bottom: 0; }
  .dock-rail {
    left: 50%; top: auto; bottom: 14px;
    transform: translateX(-50%);
    flex-direction: row;
    padding: 8px 10px;
  }
  .dock-rail button { width: 42px; height: 42px; }
  .dock-rail button:hover::after { display: none; }
  .rail-sep { width: 1px; height: 28px; margin: 0 4px; }
  .mb-clock { display: none; }
  .mb-item { display: none; }
  .menu-btn { display: block; }
  .finder-body { flex-direction: column; }
  .finder-side { width: auto; flex-direction: row; border-right: none; border-bottom: 1px solid rgba(28, 25, 23, 0.1); flex-wrap: wrap; }
}

/* ================= PHONE ONLY (max-width 700px, not tablet) =================
   Phone gets a stacked, app-like page: no desktop windows to drag, no
   desktop-in-desktop browser, bottom dock as the tab bar. Tablet at 768px+
   keeps the desktop layout. The 1100px stacking rules above still apply;
   these rules fix what they miss on a 360-430px phone. */
@media (max-width: 700px) {
  html, body { -webkit-text-size-adjust: 100%; }
  body { overflow-x: hidden; }
  .menubar { height: 44px; padding: 0 8px 0 12px; }
  .menubar .mb-left .menu { display: none; }
  .mb-name { font-size: 14px; padding: 0 4px; }
  #mb-widgets-btn { font-size: 13px; }
  .desktop { padding: 12px 12px 132px; gap: 0; }
  .framed-art { margin-bottom: 12px; }
  .framed-art img { max-height: 38vh; border-width: 8px; }
  .intro-body h1 { font-size: 26px; }
  .avatar { width: 72px; height: 72px; }
  .intro-buttons button, .pill-btn { min-height: 44px; font-size: 14px; }
  .welcome-strip { min-height: 44px; font-size: 14px; }
  /* clocks: the JS widget width (480px) would overflow a phone; force full width */
  #widget-clocks, #widget-weather, #widget-career, #widget-building { width: auto !important; }
  .clock-grid { gap: 4px; }
  .clock-cell svg { width: 44px; height: 44px; }
  .clock-time { font-size: 12px; }
  .clock-city { font-size: 11px; }
  .note { width: auto; transform: none; }
  .handwritten { font-size: 20px; }
  /* bottom dock = phone tab bar */
  .dock-rail {
    left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    transform: none; width: auto; justify-content: space-around;
    padding: 6px 4px; gap: 0;
  }
  .dock-rail button { width: 40px; height: 40px; flex: 0 0 auto; }
  .rail-sep { width: 1px; height: 24px; margin: 0 2px; flex: 0 0 auto; }
  /* overlay windows become full-screen sheets on a phone */
  .overlay-window, #window-browser.overlay-window {
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    transform: none !important; width: 100vw !important; max-width: none !important;
    height: 100dvh !important; max-height: none !important; border-radius: 0;
  }
  .overlay-window .window-body { max-height: calc(100dvh - 41px); }
  .overlay-window.maximised .window-body { max-height: calc(100dvh - 41px); }
  .finder-body { min-height: 0; }
  .widget-panel { left: 8px; right: 8px; top: 52px; width: auto; }
  .palette { width: calc(100vw - 16px); top: 52px; }
  .browser-toolbar button { width: 34px; height: 34px; }
  #browser-url { font-size: 14px; }
}


/* ================= v23: career and building widgets ================= */
#widget-career { right: 3%; top: 7%; width: 300px; z-index: 10; }
#widget-building { right: 3%; top: 54%; width: 300px; z-index: 10; }
@media (max-width: 1400px) { #widget-career, #widget-building { right: 2%; } #widget-building { top: 58%; } }
.career-body, .building-body { padding: 14px 16px 16px; }
.odo { display: flex; align-items: baseline; gap: 3px; margin-bottom: 8px; }
.odo span { display: inline-grid; place-items: center; width: 30px; height: 40px; border-radius: 8px; background: #1E2124; color: #F4F1EA; font: 800 26px/1 Inter, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.odo span.plus { background: #E8A33D; color: #1E2124; }
.odo em { font-style: normal; font-weight: 700; font-size: 13px; color: var(--muted); margin-left: 6px; }
.career-cos { margin: 0 0 2px; font-size: 13px; font-weight: 600; line-height: 1.4; }
.career-where { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.career-adas { margin: 0 0 10px; font-size: 12.5px; line-height: 1.4; display: grid; grid-template-columns: 22px 1fr; gap: 8px; align-items: start; }
.fan { width: 20px; height: 16px; margin-top: 1px; background: rgba(34, 211, 238, .7); clip-path: polygon(0 50%, 100% 0, 100% 100%); border-radius: 0 6px 6px 0; animation: fan 2.4s ease-in-out infinite; transform-origin: 0 50%; }
@keyframes fan { 50% { opacity: .45; transform: scaleX(.8); } }
.career-part { cursor: pointer; padding: 10px 12px; border-radius: 12px; background: rgba(232, 163, 61, .14); margin-bottom: 10px; min-height: 64px; }
.career-part b { display: block; font-size: 13px; margin-bottom: 2px; }
.career-part span { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); }
.career-road { font-size: 13px; font-weight: 700; color: #8A520C; text-decoration: none; }
.career-road:hover { text-decoration: underline; }
body.dark .career-road { color: #F2B456; }
.build-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.build-stats div { text-align: center; }
.build-stats b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.build-stats span { display: block; font-size: 11px; color: var(--muted); }
.build-loop { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.build-loop li { font-size: 11.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(110, 123, 138, .14); transition: background .3s, color .3s; }
.build-loop li.on { background: #E8A33D; color: #1E2124; }
a.welcome-strip { text-decoration: none; display: flex; align-items: center; justify-content: space-between; box-sizing: border-box; }
.how { padding-left: 18px; margin: 6px 0 12px; }
.how li { margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .fan { animation: none; } }

/* ================= v24: welcome is the main window ================= */
:root { --hero-l: 112px; --hero-w: clamp(400px, 29vw, 500px); --col-gap: 36px; --right-w: 300px; --right-r: 3%; }
@media (max-width: 1400px) { :root { --right-r: 2%; } }
@media (min-width: 1101px) {
  #window-intro { left: var(--hero-l); top: 5%; width: var(--hero-w); z-index: 12; }
  /* the art and the clock share the middle column, so nothing sits under the welcome window */
  .framed-art {
    left: calc(var(--hero-l) + var(--hero-w) + var(--col-gap));
    right: calc(var(--right-r) + var(--right-w) + var(--col-gap));
    width: auto; transform: none; top: calc(5% + 214px);
    display: flex; justify-content: center;
  }
  .framed-art img { max-height: calc(79vh - 300px); }
  #widget-clocks { left: calc(var(--hero-l) + var(--hero-w) + var(--col-gap)); top: 5%;
    max-width: calc(100vw - var(--hero-l) - var(--hero-w) - 2 * var(--col-gap) - var(--right-w) - var(--right-r)); }
  #widget-weather { left: auto; right: var(--right-r); top: auto; bottom: 3%; }
  #note-motto { left: var(--hero-l); top: auto; bottom: 3%; width: 265px; }
  #note-resume { left: calc(var(--hero-l) + var(--hero-w) + var(--col-gap) + 20px); top: auto; bottom: 2.5%; }
  #note-contact { left: calc(var(--hero-l) + var(--hero-w) + var(--col-gap) + 280px); right: auto; top: auto; bottom: 3%; }
}
@media (min-width: 1101px) and (max-height: 820px) { .note { display: none; } .framed-art img { max-height: calc(88vh - 290px); } }
.art-frame { position: relative; display: inline-block; max-width: 100%; }
.art-frame img { display: block; }
.art-chip { position: absolute; left: 26px; bottom: 26px; margin: 0; }

/* the welcome window itself */
#window-intro { border: 1px solid rgba(37, 99, 235, 0.35); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10), 0 28px 70px rgba(15, 23, 42, 0.22), 0 4px 14px rgba(15, 23, 42, 0.10); }
body.dark #window-intro { border-color: rgba(96, 165, 250, 0.4); box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12), 0 28px 70px rgba(0, 0, 0, 0.55); }
#window-intro .intro-body { padding: 26px 30px 24px; }
.avatar-wrap { position: relative; display: inline-block; }
#window-intro .avatar { width: 124px; height: 124px; object-position: center 30%; }
#window-intro h1 { font-size: 34px; margin: 14px 0 6px; }
#window-intro .intro-title { font-size: 15px; max-width: 440px; }
#window-intro .headline { font-size: 15px; max-width: 440px; margin-bottom: 20px; }
.intro-actions { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.ia {
  font: inherit; font-size: 14.5px; font-weight: 700; text-decoration: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid #d6d3d1; background: #fff; color: var(--ink);
  transition: background .15s, transform .15s, box-shadow .15s;
}
.ia:hover { background: #f5f5f4; transform: translateY(-1px); }
.ia-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35); }
.ia-primary:hover { background: #1d4ed8; }
body.dark .ia:not(.ia-primary) { background: #292524; border-color: #57534e; color: #f5f5f4; }
body.dark .ia:not(.ia-primary):hover { background: #3a3532; }
.intro-road-cap { margin: 8px 0 14px; font-size: 12.5px; color: var(--muted); }
.intro-links { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.intro-link { font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); background: none; border: 0; padding: 4px 6px; cursor: pointer; border-radius: 6px; }
.intro-link:hover { color: var(--accent); background: rgba(37, 99, 235, 0.08); }
.intro-dot { color: var(--muted); }
@media (max-width: 1100px) { .intro-actions { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 420px) { .intro-actions { grid-template-columns: 1fr 1fr; } .ia-primary { grid-column: 1 / -1; } }

/* photo picker (preview only) */
.photo-pick-btn { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); white-space: nowrap;
  font: inherit; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  background: #1E2124; color: #fff; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.photo-pick-btn[hidden] { display: none; }
.photo-picker { width: min(860px, 94vw); left: 50%; top: 8%; transform: translateX(-50%); z-index: 150; }
.pp-layout { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pp-item { font: inherit; cursor: pointer; background: transparent; border: 2px solid transparent; border-radius: 14px; padding: 6px; display: grid; gap: 6px; justify-items: center; color: var(--ink); }
.pp-item img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; object-position: center 30%; box-shadow: 0 3px 10px rgba(0,0,0,.15); }
.pp-item span { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.3; }
.pp-item:hover { background: rgba(37, 99, 235, 0.06); }
.pp-item.selected { border-color: var(--accent); background: rgba(37, 99, 235, 0.08); }
.pp-preview { margin: 0; }
.pp-preview img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 12px; background: rgba(0,0,0,.04); display: block; }
.pp-preview figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; }
@media (max-width: 700px) { .pp-layout { grid-template-columns: 1fr; } .pp-preview { display: none; } }

/* ===== Work timeline v13: a visual map after the About Me slide ===== */
.timeline.tlv { display: block; min-width: 0; padding: 0; height: 318px; position: relative; transform: none; }
.timeline.tlv::before { display: none; }
.timeline-viewport { cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 12px; background: linear-gradient(180deg, rgba(120, 132, 150, 0.08), rgba(120, 132, 150, 0.16)); }
.timeline-viewport.dragging { cursor: grabbing; }
.timeline-viewport.dragging a { pointer-events: none; }
.overlay-window.maximised .window-body > .timeline-viewport { max-width: none; }
.tlv a { text-decoration: none; }
.tlv-zone { position: absolute; margin: 0; font-size: 9.5px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.tlv-zone.up { top: 10px; }
.tlv-zone.down { bottom: 8px; }
.tlv-zone.eng { letter-spacing: 0.2em; }
.tlv-axis { position: absolute; top: 146px; height: 3px; background: #3b4250; border-radius: 2px; }
.tlv-axis::after { content: ''; position: absolute; right: -8px; top: -5px; border-left: 10px solid #3b4250; border-top: 6.5px solid transparent; border-bottom: 6.5px solid transparent; }
.tlv-axis:not(.gm) { background: #8d9aab; }
.tlv-axis:not(.gm)::after { border-left-color: #8d9aab; }
.tlv-break { position: absolute; top: 136px; font-weight: 800; color: var(--muted); font-size: 15px; letter-spacing: -2px; }
.tlv-tick { position: absolute; top: 128px; font-size: 10px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.06em; transform: translateX(3px); white-space: nowrap; }
.tlv-tick::before { content: ''; position: absolute; left: -4px; top: 2px; width: 1px; height: 26px; background: rgba(59, 66, 80, 0.45); }
.tlv-tick.e { color: var(--muted); }
.tlv-b { position: absolute; display: flex; flex-direction: column; gap: 2px; padding: 7px 8px 7px 9px; border-radius: 6px; color: #fff; overflow: hidden; box-shadow: 0 6px 14px rgba(20, 28, 40, 0.16); transition: transform 0.15s, box-shadow 0.15s; }
.tlv-b:hover, .tlv-b:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(20, 28, 40, 0.26); z-index: 3; }
.tlv-b.up { top: 34px; height: 84px; }
.tlv-b.down { top: 214px; height: 76px; padding-left: 40px; }
.tlv-k { font-size: 8.5px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.86; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlv-t { font-size: 11.5px; font-weight: 700; line-height: 1.22; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tlv-y { margin-top: auto; font-size: 10px; font-weight: 600; opacity: 0.85; }
.tlv-b.up .tlv-flag { position: absolute; left: -12px; top: -12px; }
.tlv-b.up:has(.tlv-flag) { overflow: visible; }
.tlv-b.down .tlv-flag { position: absolute; left: 6px; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; }
.f-product { background: #6b7380; }
.f-cx { background: #c09020; }
.f-field { background: #17a05a; }
.f-digital { background: #0d2463; }
.f-eng { background: #8796ab; }
.tlv-flag { display: inline-block; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #dfe3e8; box-shadow: 0 0 0 2px #fff, 0 3px 8px rgba(0, 0, 0, 0.2); }
.tlv-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tlv-flag.sm { width: 26px; height: 26px; flex: none; }
.tlv-p { position: absolute; top: 166px; display: grid; grid-template-columns: 26px auto; column-gap: 6px; align-items: center; color: var(--ink); transform: translateX(-13px); }
.tlv-p .tlv-flag { grid-row: span 2; }
.tlv-p b { font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.1; }
.tlv-p i { font-style: normal; font-size: 9.5px; color: var(--muted); line-height: 1.2; white-space: nowrap; }
.tlv-p::before { content: ''; position: absolute; left: 12px; top: -18px; width: 2px; height: 18px; background: rgba(59, 66, 80, 0.35); }
.tlv-p:hover b { text-decoration: underline; }
.tlv-deg { position: absolute; top: 166px; display: grid; grid-template-columns: 24px auto; column-gap: 6px; align-items: center; color: var(--ink); transform: translateX(-12px); }
.tlv-cap { grid-row: span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #00274c; color: #ffcb05; box-shadow: 0 0 0 2px #fff; }
.tlv-deg b { font-size: 10.5px; font-weight: 800; line-height: 1.1; white-space: nowrap; }
.tlv-deg i { font-style: normal; font-size: 9.5px; color: var(--muted); }
.tlv-deg::before { content: ''; position: absolute; left: 11px; top: -18px; width: 2px; height: 18px; background: rgba(59, 66, 80, 0.35); }
.tlv-deg:hover b { text-decoration: underline; }
.tlv-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 2px; }
.tlv-lt { font-size: 9.5px; font-weight: 800; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.tlv-li { font-size: 10.5px; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 4px; }
body.dark .timeline-viewport { background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.08)); }
body.dark .tlv-axis.gm { background: #c9cfd8; }
body.dark .tlv-axis.gm::after { border-left-color: #c9cfd8; }
body.dark .tlv-tick::before, body.dark .tlv-p::before, body.dark .tlv-deg::before { background: rgba(255, 255, 255, 0.3); }
body.dark .f-digital { background: #2a4796; }
body.dark .tlv-flag, body.dark .tlv-cap { box-shadow: 0 0 0 2px #292524, 0 3px 8px rgba(0, 0, 0, 0.4); }
.tlv-zone.up:not(.eng) { margin-left: 26px; }

/* round 14: work window links */
.showcase-row { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; }
.showcase-row .showcase-link { margin-top: 0; }

/* ================= v27: the tools he built, as apps ================= */
#window-projects.overlay-window { width: min(720px, 94vw); }
#window-projects .window-body { max-height: min(78vh, 720px); overflow: auto; }
.proj-head h2 { margin-bottom: 2px; }
.proj-head p { margin: 0 0 14px; font-size: 13.5px; }
.app-ico { --s: 44px; flex: none; width: var(--s); height: var(--s); border-radius: calc(var(--s) * .26); display: inline-grid; place-items: center; color: #fff;
  background: linear-gradient(160deg, color-mix(in srgb, var(--app) 78%, #fff), var(--app) 60%, color-mix(in srgb, var(--app) 80%, #000));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(15, 23, 42, .18); }
.app-ico svg { width: 58%; height: 58%; }
.app-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.app-card { display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid rgba(28, 25, 23, .08); background: rgba(255,255,255,.55); color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.app-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 35%, transparent); box-shadow: 0 8px 22px rgba(15, 23, 42, .12); }
.app-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.app-txt b { font-size: 14.5px; }
.app-txt small { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.app-txt span { font-size: 12.5px; color: var(--ink-soft); line-height: 1.4; margin-top: 3px; }
.app-txt em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 6px; }
.kit-row { display: flex; flex-wrap: wrap; gap: 6px; }
.kit-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 5px; border-radius: 10px; border: 1px solid rgba(28, 25, 23, .08); background: rgba(255,255,255,.5); color: inherit; text-decoration: none; font-size: 12.5px; font-weight: 600; }
.kit-chip:hover { border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.live-dot { font-style: normal; font-size: 10.5px; font-weight: 700; color: #15803d; margin-left: 4px; }
.live-dot::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #22c55e; margin-right: 4px; vertical-align: 1px; animation: livePulse 2s infinite; }
@keyframes livePulse { 50% { opacity: .35; } }
#window-projects .notes-section { margin-top: 18px; }
.finder-item .fi-icon .app-ico { margin: 0 auto; }
.fp-meta { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
body.dark .app-card, body.dark .kit-chip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }
body.dark .live-dot { color: #4ade80; }
@media (max-width: 700px) { .app-grid { grid-template-columns: 1fr; } #window-projects .window-body { max-height: none; } }
@media (prefers-reduced-motion: reduce) { .live-dot::before { animation: none; } .app-card:hover { transform: none; } }

/* ================= v32: slim browser chrome, one row, no address bar ================= */
.browser-bar { gap: 6px; padding: 6px 10px; }
.browser-bar .dot { margin-right: 2px; }
.browser-bar .dot.green { margin-right: 10px; }
.browser-bar button:not(.browser-tab) {
  width: 26px; height: 26px; border: 1px solid #d6d3d1; background: #fff; border-radius: 7px;
  font-size: 14px; line-height: 1; cursor: pointer; color: var(--ink); flex-shrink: 0; padding: 0;
}
.browser-bar button:disabled { opacity: 0.35; cursor: default; }
.browser-bar .browser-tabs { flex: 1; min-width: 0; padding: 0 4px; background: none; }
.browser-bar .browser-tab { padding: 4px 8px 4px 11px; font-size: 12px; }
.browser-bar #browser-url { display: none; }
body.dark .browser-bar button:not(.browser-tab) { background: #292524; border-color: #57534e; color: #f5f5f4; }
#window-browser.overlay-window.maximised { left: 8px !important; right: 8px !important; bottom: 8px !important; }

/* v33: a widget with no free spot on a very short screen is left out instead of covering another one */
.widget.nofit { display: none !important; }
/* v33: short laptop windows (for example 1920x1080 at 150% scaling) keep the welcome window on screen */
@media (min-width: 1101px) and (max-height: 700px) {
  #window-intro { top: 64px; }
  #window-intro .intro-body { padding: 18px 24px 18px; }
  #window-intro .avatar { width: 84px; height: 84px; }
  #window-intro h1 { font-size: 28px; margin: 8px 0 4px; }
  #window-intro .headline { margin-bottom: 12px; }
}
/* v33: on a short window the dock tightens so it never runs under the menu bar */
@media (min-width: 701px) and (max-height: 700px) {
  .dock-rail { top: calc(50% + 18px); padding-top: 8px; padding-bottom: 8px; gap: 2px; max-height: calc(100vh - 56px); }
  .dock-rail button { width: 38px; height: 38px; }
}
/* v33: a visible focus ring for keyboard users on every control */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, [tabindex]:focus-visible, select:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }
body.dark a:focus-visible, body.dark button:focus-visible, body.dark [role="button"]:focus-visible, body.dark [tabindex]:focus-visible { outline-color: #93c5fd !important; }
/* v33: on a phone every dock icon fits on screen (no cut-off icon at the right edge) */
@media (max-width: 700px) {
  .dock-rail { overflow: hidden; padding: 4px; }
  .dock-rail button { flex: 1 1 0; min-width: 0; width: auto; height: 44px; border-radius: 12px; }
  .dock-rail .rail-sep { display: none; }
}
/* v33: dark mode, the Terminal and About icons were dark gray on the dark dock */
body.dark .dock-rail button[data-dock="terminal"] { color: #e7e5e4; }
body.dark .dock-rail button[data-dock="about"] { color: #d6d3d1; }

/* ---------- v38: site links in the menu bar; a plain "+" on the odometer ---------- */
.mb-links { display: flex; align-items: center; gap: 2px; margin: 0 auto 0 14px; padding-left: 14px; border-left: 1px solid rgba(28, 25, 23, 0.14); }
.mb-links a, .mb-links button { font-family: inherit; font-size: 13px; font-weight: 600; line-height: 1; color: var(--ink); background: transparent; border: 0; padding: 6px 10px; border-radius: 6px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.mb-links a:hover, .mb-links button:hover { background: rgba(28, 25, 23, 0.08); }
body.dark .mb-links { border-left-color: rgba(255, 255, 255, 0.16); }
body.dark .mb-links a:hover, body.dark .mb-links button:hover { background: rgba(255, 255, 255, 0.1); }
.odo span.plus { background: none; color: var(--ink); width: auto; padding: 0 1px 0 3px; }
@media (max-width: 700px) {
  .menubar { height: auto; min-height: 44px; flex-wrap: wrap; padding-bottom: 4px; }
  .mb-links { order: 3; flex: 1 0 100%; margin: 0 -8px 0 -12px; padding: 2px 8px 2px 8px; border-left: 0; overflow-x: auto; scrollbar-width: none; }
  .mb-links::-webkit-scrollbar { display: none; }
  .mb-links a, .mb-links button { flex: none; font-size: 13.5px; padding: 8px 10px; }
  .mb-left, .mb-right { min-height: 44px; }
}

/* v38: a video in fullscreen fills the screen in every browser, Firefox included */
video:fullscreen { width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; border-radius: 0 !important; background: #000 !important; }
video:-moz-full-screen { width: 100vw !important; height: 100vh !important; max-width: none !important; max-height: none !important; aspect-ratio: auto !important; object-fit: contain !important; border-radius: 0 !important; background: #000 !important; }

/* ================= v42: layered desk layout (his chosen arrangement) ================= */
/* Measured from his own arrangement on a 1384x862 window and kept proportional:
   career top left, the welcome window floating over it, clock and art in the middle,
   resume note, weather and "Now building" down the right, notes along the bottom. */
@media (min-width: 1280px) {
  #widget-career { left: 10.1%; right: auto; top: 6.3%; }
  #window-intro { left: 24%; top: 14.4%; }
  #widget-clocks { left: 39.7%; top: 5%; max-width: calc(57.3vw - 320px); }
  .framed-art { left: 39.7%; right: calc(3% + 322px); top: 30.9%; }
  #note-resume { left: auto; right: 5.3%; top: 5.9%; bottom: auto; }
  #widget-weather { left: auto; right: 3%; top: 24.9%; bottom: auto; }
  #widget-building { right: 3%; top: 65.9%; }
  #note-motto { left: 9.5%; top: 83.2%; bottom: auto; width: 265px; }
  #note-contact { left: 59.9%; right: auto; top: 87.3%; bottom: auto; }
}

/* ================= v42: wallpaper styles ================= */
body.wp-frame-black .framed-art img { border-color: #141414; }
body.wp-frame-none .framed-art img { border-width: 0; border-radius: 6px; }
body.wp-soften-0 .wallpaper::after { display: none !important; }
body.wp-soften-2.wp-full .wallpaper::after { background: rgba(232, 226, 213, 0.6); }
body.dark.wp-soften-2.wp-full .wallpaper::after { background: rgba(20, 18, 16, 0.72); }
.wallpaper img { transition: filter .3s ease, transform .3s ease; }
body.wp-blur .wallpaper img { filter: blur(16px); transform: scale(1.08); }

/* ================= v42: wallpaper settings window ================= */
#window-wallpaper { width: min(760px, 94vw); max-width: 760px; }
#window-wallpaper .window-body { max-height: min(78vh, 760px); overflow-y: auto; }
.wps-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.wps-mode {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 8px 8px 10px; border-radius: 12px; cursor: pointer; text-align: center;
  border: 1px solid rgba(28, 25, 23, 0.12); background: transparent;
}
.wps-mode:hover { border-color: rgba(37, 99, 235, 0.5); }
.wps-mode.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.wps-mini { display: block; position: relative; height: 54px; border-radius: 8px; overflow: hidden; }
.wps-mini i { position: absolute; display: block; }
.wps-mini-framed { background: #dfe5ec; }
.wps-mini-framed i { left: 32%; right: 32%; top: 22%; bottom: 22%; border: 3px solid #fff; background: linear-gradient(160deg, #6f8aa6, #2f4660); box-shadow: 0 3px 8px rgba(15, 23, 42, .25); }
.wps-mini-full { background: linear-gradient(160deg, #8fa7bf, #2f4660); }
.wps-mini-full i { left: 8px; top: 8px; width: 34%; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .7); }
.wps-mini-solid { background: #00274C; }
.wps-mini-solid i { left: 8px; top: 8px; width: 34%; height: 9px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.wps-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 4px 0 10px; flex-wrap: wrap; }
.wps-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wps-tabs { display: flex; gap: 2px; flex-wrap: wrap; }
.wps-tabs button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0;
  padding: 4px 8px; border-radius: 6px; cursor: pointer; border-bottom: 2px solid transparent; border-radius: 0;
}
.wps-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.wps-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; margin-bottom: 18px; }
.wps-img { display: flex; flex-direction: column; gap: 6px; padding: 0; background: none; border: 0; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.wps-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background-size: cover; background-position: center; outline: 1px solid rgba(28, 25, 23, .1); outline-offset: -1px; }
.wps-img:hover .wps-thumb { outline: 2px solid rgba(37, 99, 235, .5); }
.wps-img.on .wps-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.wps-name { font-size: 12px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wps-img.on .wps-name { color: var(--ink); font-weight: 600; }
.wps-group { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.wps-glabel { flex: 0 0 118px; font-size: 12.5px; color: var(--muted); }
.wps-swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.wps-sw {
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 1px solid rgba(28, 25, 23, .14);
}
.wps-sw.auto { background: linear-gradient(135deg, #E4E8ED 0 50%, #1c1917 50% 100%); }
.wps-sw:hover { transform: scale(1.08); }
.wps-sw.on { box-shadow: 0 0 0 2px var(--paper-solid, #fff), 0 0 0 4px var(--accent); }
.wps-current { margin: 2px 0 14px 132px; font-size: 12.5px; color: var(--ink-soft); min-height: 1em; }
.wps-opts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 2px 0 6px; }
.wps-row { display: flex; align-items: center; gap: 10px; }
.wps-label { font-size: 12.5px; color: var(--muted); }
.wps-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: rgba(28, 25, 23, .06); }
.wps-seg button { font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); background: none; border: 0; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.wps-seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.wps-mode:focus-visible, .wps-img:focus-visible, .wps-sw:focus-visible, .wps-seg button:focus-visible, .wps-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body.dark .wps-mode { border-color: rgba(255, 255, 255, .14); }
body.dark .wps-mode.on { border-color: #60a5fa; box-shadow: 0 0 0 1px #60a5fa; }
body.dark .wps-mini-framed { background: #2a2623; }
body.dark .wps-sw { border-color: rgba(255, 255, 255, .2); }
body.dark .wps-sw.on { box-shadow: 0 0 0 2px #1f1c1a, 0 0 0 4px #60a5fa; }
body.dark .wps-seg { background: rgba(255, 255, 255, .08); }
body.dark .wps-seg button.on { background: #44403c; color: #f5f5f4; }
body.dark .wps-thumb { outline-color: rgba(255, 255, 255, .12); }
body.dark .wps-img.on .wps-thumb, body.dark .wps-tabs button.on { outline-color: #60a5fa; border-bottom-color: #60a5fa; }
@media (max-width: 600px) {
  .wps-modes { gap: 6px; }
  .wps-mode { font-size: 12px; padding: 6px 6px 8px; }
  .wps-mini { height: 40px; }
  .wps-images { grid-template-columns: repeat(2, 1fr); }
  .wps-group { flex-direction: column; align-items: flex-start; gap: 6px; }
  .wps-glabel { flex: none; }
  .wps-current { margin-left: 0; }
}

/* v45 phone pass (under 768px): one Menu button holds the site links and the apps (js/phone-menu.js),
   so the floating dock is gone and nothing sits over the cards. Bigger tap targets. */
@media (max-width: 767px) {
  html.pm-on .desktop { padding-bottom: 28px; }
  .menubar { height: 52px; }
  .menubar .pm-btn { height: 44px; font-size: 15px; padding: 0 12px; }
  .mb-right .mb-icon-btn { width: 44px; height: 44px; justify-content: center; }
  .intro-links a, .intro-links button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
  .window-bar .bar-btn, .widget-bar .bar-btn { min-width: 44px; min-height: 40px; font-size: 18px; }
  .intro-actions .ia { min-height: 48px; }
}

/* v45 phone: small links on widgets and notes get a 44px tap area without moving the text */
@media (max-width: 767px) {
  .career-road, .handwritten a, #note-email, #note-linkedin { display: inline-block; padding: 13px 0; margin: -13px 0; }
}
