/*
Theme Name: Geiger Desktop
Theme URI: https://example.com/
Author: Geiger Powell
Description: A portfolio theme styled as an old-school Mac desktop. Projects, Pieces and Portfolio Settings are edited from the WordPress admin.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: geiger-desktop
*/

  /* Layout: a sky-blue Mac desktop. Header and nav on top, About + Currently windows,
     five Featured Work windows in a row, then a 3-column More Work cluster. */
  :root {
    --sky-1: #b4d0ee;
    --sky-2: #d4e3f5;
    --sky-3: #cfe0f3;
    --win: #e9edf8;
    --bar-1: #f8faff;
    --bar-2: #d2daee;
    --edge: #4c5b86;
    --ink: #1b2544;
    --ink-2: #4b5b84;
    --accent: #2f6fdb;
    --go: #2fae4a;
    --folder: #f0bf4a;
    --shadow: rgba(38, 56, 108, .34);
    --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
    color-scheme: light;
  }

  /* Registered so the wallpaper colors can crossfade when they change. */
  @property --sky-1 { syntax: '<color>'; inherits: true; initial-value: #b4d0ee; }
  @property --sky-2 { syntax: '<color>'; inherits: true; initial-value: #d4e3f5; }
  @property --sky-3 { syntax: '<color>'; inherits: true; initial-value: #cfe0f3; }
  html { transition: --sky-1 .8s ease, --sky-2 .8s ease, --sky-3 .8s ease; }

  * { box-sizing: border-box; }

  body {
    position: relative;
    overflow-x: clip;
    font: 400 15px/1.5 var(--font-ui);
    color: var(--ink);
    background: linear-gradient(180deg, var(--sky-1) 0, var(--sky-2) 55%, var(--sky-3) 100%);
    padding-block: 62px 40px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }

  .sky { position: absolute; inset: 0; overflow: clip; pointer-events: none; }
  .cloud {
    position: absolute; display: block; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(255,255,255,.95), rgba(255,255,255,.55) 60%, rgba(255,255,255,0));
    filter: blur(6px);
  }
  .c1 { width: 340px; height: 110px; top: 60px; right: 26%; }
  .c2 { width: 280px; height: 90px; top: 150px; right: 15%; opacity: .85; }
  .c3 { width: 420px; height: 130px; top: 520px; left: -60px; opacity: .55; }
  .c4 { width: 360px; height: 120px; top: 900px; right: -80px; opacity: .5; }

  .stage { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; }

  button { font: inherit; color: inherit; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

  /* ---------- Header ---------- */
  .top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 32px; align-items: start; }
  .avatar {
    width: 140px; height: 140px; border-radius: 50%;
    border: 5px solid #fff;
    box-shadow: 0 0 0 2px var(--edge), 4px 5px 0 var(--shadow);
    background: linear-gradient(160deg, #e4e8f2, #b9c2d9);
    display: grid; place-items: center;
    font: 700 38px var(--font-mono); color: var(--ink-2);
  }
  .avatar { position: relative; overflow: hidden; }
  .avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
  .avatar img.on { opacity: 1; }
  html.calm .avatar img { transition: none; }
  @media (prefers-reduced-motion: reduce) { .avatar img { transition: none; } }
  .who { min-width: 0; padding-top: 14px; }
  .who h1 { margin: 0; font: 700 clamp(28px, 5vw, 42px)/1.1 var(--font-mono); letter-spacing: -.02em; }
  .who .role { margin: 6px 0 14px; font: 400 clamp(16px, 2.4vw, 21px) var(--font-mono); color: var(--ink-2); }
  .social { display: flex; gap: 12px; }
  .sbtn {
    width: 46px; height: 46px; display: grid; place-items: center; cursor: var(--cursor-hand, pointer); text-decoration: none;
    border: 2px solid var(--ink); border-radius: 10px; color: var(--ink);
    background: linear-gradient(#fff, #dfe5f3); box-shadow: 2px 3px 0 var(--shadow);
  }
  .sbtn svg { width: 24px; height: 24px; }
  .sbtn:hover { background: #fff; transform: translate(-1px, -1px); box-shadow: 3px 4px 0 var(--shadow); }

  .top > .social { padding-top: 14px; justify-content: flex-end; }

  /* ---------- Windows ---------- */
  .win {
    position: relative; display: flex; flex-direction: column; min-width: 0;
    background: var(--win); border: 1.5px solid var(--edge); border-radius: 6px;
    box-shadow: 3px 4px 0 var(--shadow);
  }
  .win.dragging { box-shadow: 7px 9px 0 var(--shadow); }
  .win.flash { outline: 3px solid var(--accent); outline-offset: 3px; }
  .win-bar {
    display: flex; align-items: center; gap: 8px; padding: 5px 8px; user-select: none;
    background: linear-gradient(180deg, var(--bar-1), var(--bar-2));
    border-bottom: 1.5px solid var(--edge); border-radius: 4px 4px 0 0;
  }
  .win-icon {
    flex: none; position: relative; width: 13px; height: 15px; border-radius: 2px;
    background: var(--accent); border: 1px solid #1d4a9e;
  }
  .win-icon::after {
    content: ""; position: absolute; left: 2px; right: 2px; top: 3px; height: 2px; background: #fff;
    box-shadow: 0 3px 0 #fff, 0 6px 0 #fff;
  }
  .win-title { flex: 1; min-width: 0; font: 600 14px/1.2 var(--font-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .win-btns { display: flex; gap: 6px; }
  .wbtn {
    width: 22px; height: 20px; padding: 0; display: grid; place-items: center; cursor: var(--cursor-hand, pointer);
    border: 1.5px solid var(--edge); border-radius: 3px; background: linear-gradient(#fff, #d9e0f1); color: var(--ink);
  }
  .wbtn:hover { background: #fff; }
  .wbtn svg { width: 10px; height: 10px; }
  .win-body { flex: 1; min-height: 0; padding: 14px 16px; }
  .win.shaded .win-body { display: none; }
  .win.shaded { align-self: start; }
  .win.shaded .win-bar { border-bottom: 0; border-radius: 4px; }


  /* ---------- Placeholder imagery ---------- */
  .ph {
    position: relative; display: grid; place-items: center; overflow: hidden; min-width: 0;
    background: linear-gradient(135deg, var(--c1, #9db8e6), var(--c2, #5d86d1));
    border: 1.5px solid rgba(27, 37, 68, .55); border-radius: 2px;
  }
  .ph::before {
    content: ""; position: absolute; inset: 0;
    background: repeating-linear-gradient(135deg, rgba(255,255,255,0) 0 14px, rgba(255,255,255,.13) 14px 28px);
  }
  .ph-label {
    position: relative; max-width: 90%; padding: 5px 9px; border-radius: 2px; text-align: center;
    font: 400 11px/1.3 var(--font-mono); letter-spacing: .05em; text-transform: uppercase;
    background: rgba(27, 37, 68, .6); color: #fff;
  }

  /* ---------- Intro row ---------- */
  .intro { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 32px; margin-top: 22px; align-items: start; }
  .about-body { display: flex; align-items: center; gap: 22px; }
  .about-body p { margin: 0; font-size: 15.5px; line-height: 1.6; }
  .globe-wrap { position: relative; flex: none; }
  #globe { width: 88px; height: 88px; image-rendering: pixelated; display: block; }
  .spark { position: absolute; width: 14px; height: 14px; color: var(--ink-2); }
  .spark.s1 { left: -14px; top: -6px; }
  .spark.s2 { right: -8px; bottom: -4px; }
  .now { margin-top: 0; }
  .now-row { display: flex; align-items: center; gap: 12px; font-weight: 500; }
  .dot { flex: none; width: 13px; height: 13px; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 2px rgba(47,174,74,.25); }
  .now-btn {
    display: block; width: 100%; margin-top: 12px; padding: 8px 12px; cursor: var(--cursor-hand, pointer);
    font: 700 14px var(--font-mono); color: var(--ink); text-align: center;
    border: 2px solid var(--ink); border-radius: 8px;
    background: linear-gradient(#fff, #dfe5f3); box-shadow: 2px 3px 0 var(--shadow);
  }
  .now-btn:hover { background: linear-gradient(#fff, #cfd8ee); }
  .now-btn:active { transform: translate(2px, 3px); box-shadow: none; }
  .now-sub { margin: 4px 0 0 25px; padding-bottom: 8px; color: var(--ink-2); font-size: 14px; border-bottom: 1.5px solid rgba(76,91,134,.3); }

  /* ---------- Sections ---------- */
  .sec { display: flex; align-items: center; gap: 12px; margin: 36px 0 14px; scroll-margin-top: 48px; }
  .sec svg { width: 34px; height: 27px; flex: none; }
  .sec h2 { margin: 0; font: 700 20px var(--font-mono); letter-spacing: -.01em; }
  .sec::after { content: ""; flex: 1; height: 1.5px; background: var(--edge); opacity: .7; }

  .featured { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
  .card { transition: transform .12s ease, box-shadow .12s ease; }
  .card:hover { transform: translate(-2px, -2px); box-shadow: 5px 6px 0 var(--shadow); }
  .card .win-body { padding: 8px; display: flex; }
  .card-link { display: flex; flex-direction: column; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: 3px; }
  .card-link .ph { aspect-ratio: 1.1 / 1; }
  .card-text { flex: 1; display: flex; flex-direction: column; padding: 12px 4px 2px; }
  .card-cat { font-weight: 600; font-size: 13.5px; }
  .card-desc { margin: 2px 0 8px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
  .card-arrow { margin-top: auto; align-self: flex-end; width: 18px; height: 12px; }

  .sec-note { margin: -6px 0 16px; font-size: 14px; color: var(--ink-2); }
  .wall { position: relative; display: grid; gap: 20px; }
  .wall.is-masonry { display: block; }
  .wall-win { width: 100%; }
  .wall.is-masonry .wall-win { position: absolute; }
  .wall-win .win-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
  .wall-img { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; overflow: hidden; }
  .wall-img svg { display: block; width: 100%; height: auto; border: 1.5px solid rgba(27, 37, 68, .5); border-radius: 2px; }
  .wall-cap { margin: 0 2px 2px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
  .wall-hint {
    position: absolute; right: 8px; bottom: 8px; padding: 3px 9px; border-radius: 3px; opacity: 0; transition: opacity .12s;
    font: 700 11px var(--font-mono); letter-spacing: .05em; text-transform: uppercase;
    background: #fff; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 2px 2px 0 var(--shadow);
  }
  .wall-img:hover .wall-hint, .wall-img:focus-visible .wall-hint { opacity: 1; }
  @media (hover: none) { .wall-hint { opacity: 1; } }
  .v-art svg { display: block; width: 100%; height: auto; border: 1.5px solid rgba(27, 37, 68, .5); border-radius: 2px; }
  .piece .v-foot { flex-wrap: wrap; }
  .piece .v-count { flex: 1; text-align: center; }
  .piece .v-cap { order: 10; flex-basis: 100%; }
  .piece .v-cap:empty { display: none; }

  .foot {
    margin-top: 44px; padding-top: 14px; border-top: 1.5px solid var(--edge);
    display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; font-size: 14px;
  }
  .foot-mid { display: flex; align-items: center; gap: 12px; color: var(--ink-2); }
  .linkbtn { background: none; border: 0; padding: 2px 4px; cursor: var(--cursor-hand, pointer); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
  .linkbtn:hover { color: var(--accent); }
  .chips { display: flex; gap: 6px; }
  .chips i { display: block; width: 16px; height: 16px; border-radius: 3px; background: linear-gradient(#5a96ee, #2a5fc4); border: 1px solid #1d4a9e; }
  .chips i:nth-child(2) { background: linear-gradient(#3f6fc8, #1d3f8c); }
  .chips i:nth-child(3) { background: linear-gradient(#6a9de0, #3a6bb8); }
  .chips i:nth-child(4) { background: linear-gradient(#4a7fd6, #2a56a6); }

  /* ---------- Floating windows (image viewers, contact) ---------- */
  .float { position: fixed; z-index: 100; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
  .float .win-body { padding: 0; overflow: auto; }
  .v-stage { padding: 10px; }
  .v-stage .ph { width: 100%; aspect-ratio: 16 / 10; max-height: 58vh; }
  .v-foot {
    display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; border-top: 1.5px solid var(--edge);
    background: linear-gradient(180deg, var(--bar-1), var(--win));
  }
  .v-cap { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
  .v-count { font: 400 12px var(--font-mono); color: var(--ink-2); white-space: nowrap; }
  .nbtn {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; cursor: var(--cursor-hand, pointer); text-decoration: none;
    font: 600 13px var(--font-ui); color: var(--ink);
    border: 1.5px solid var(--edge); border-radius: 6px; background: linear-gradient(#fff, #d9e0f1); box-shadow: 1px 2px 0 var(--shadow);
  }
  .nbtn:hover { background: #fff; }
  .contact { padding: 16px; }
  .contact p { margin: 0 0 12px; }
  .contact ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
  .contact li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .contact .k { font: 700 12px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
  .todo { padding: 8px 10px; border: 1.5px dashed rgba(76,91,134,.55); border-radius: 4px; color: var(--ink-2); font-style: italic; }
  .contact .note { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }

  /* ---------- Case study window ---------- */
  html.lock { overflow: hidden; }
  .veil {
    position: fixed; inset: 0; z-index: 950; display: grid; place-items: center; background: rgba(28, 44, 92, .45);
    padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .cs-win {
    width: min(940px, 100%); box-shadow: 6px 8px 0 var(--shadow);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top, 0px)) - max(16px, env(safe-area-inset-bottom, 0px)));
  }
  .cs-win .win-body { padding: 0; overflow-y: auto; overscroll-behavior: contain; }
  .cs { padding: 22px 26px 28px; display: grid; gap: 18px; }
  .eyebrow { margin: 0; font: 700 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
  .cs-h { margin: -10px 0 0; font: 700 clamp(26px, 4.5vw, 38px)/1.1 var(--font-mono); letter-spacing: -.02em; text-wrap: balance; }
  .cs-lede { margin: -6px 0 0; font-size: 17px; max-width: 60ch; }
  .meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
  .meta div { min-width: 0; }
  .meta dt { font: 700 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
  .meta dd { margin: 0; }
  .hero { aspect-ratio: 16 / 9; width: 100%; }
  .cs section { display: grid; gap: 8px; }
  .cs h3 { margin: 0; font: 700 14px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
  .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .pair .ph { aspect-ratio: 4 / 3; }
  .cs-nav { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; padding-top: 6px; border-top: 1.5px solid rgba(76,91,134,.35); margin-top: 4px; padding-top: 16px; }

  /* ---------- Process board (inside case studies) ---------- */
  .board-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  .board-head h3 { margin: 0; }
  .board-head .hint-desk, .board-head .hint-touch { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
  .board-tools { display: flex; gap: 8px; margin-left: auto; }
  .board {
    position: relative; min-height: 240px; overflow: hidden;
    border: 1.5px solid var(--edge); border-radius: 6px;
    background-color: #dae5f6;
    background-image: radial-gradient(rgba(76, 91, 134, .3) 1px, transparent 1.3px);
    background-size: 16px 16px;
  }
  .board.tween .pw { transition: left .3s ease, top .3s ease; }
  .pw { position: absolute; top: 0; left: 0; width: 280px; }
  .pw.zoomed { box-shadow: 7px 9px 0 var(--shadow); }
  .board .pw .win-body { padding: 8px; overflow: visible; flex: none; }
  .pw svg { display: block; width: 100%; height: auto; border: 1.5px solid rgba(27, 37, 68, .5); border-radius: 2px; }
  .pw-cap { margin: 8px 2px 2px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); font-style: italic; }
  @media (min-width: 900px) and (pointer: fine) { .hint-touch { display: none; } }
  @media not all and (min-width: 900px) and (pointer: fine) {
    .hint-desk, .board-tools, .btn-zoom { display: none; }
    .board { height: auto !important; display: grid; gap: 14px; padding: 12px; background-image: none; }
    .pw { position: relative !important; left: auto !important; top: auto !important; width: auto !important; z-index: auto !important; }
  }

  .zoomrect { position: fixed; z-index: 1000; pointer-events: none; border: 2px solid var(--ink); opacity: 0; }

  /* ---------- Menu bar and cursors ---------- */
  html { cursor: var(--cursor-arrow, auto); }
  a[href], button { cursor: var(--cursor-hand, pointer); }
  .menubar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px;
    height: calc(30px + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    background: linear-gradient(180deg, #fbfcff, #dde4f4);
    border-bottom: 1.5px solid var(--edge); box-shadow: 0 2px 0 var(--shadow);
    font: 500 13.5px var(--font-ui); color: var(--ink);
  }
  .mb-left { display: flex; align-items: stretch; height: 30px; }
  .menu { position: relative; display: flex; }
  .mb-item {
    display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
    border: 0; background: none; color: var(--ink); font: inherit; text-decoration: none;
  }
  .mb-item:hover, .mb-item[aria-expanded="true"] { background: var(--ink); color: #fff; }
  .mb-item:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
  .mb-logo { padding: 0 12px; }
  .mb-logo svg { width: 14px; height: 14px; }
  .mb-caret { width: 8px; height: 5px; }
  .menu-panel {
    position: absolute; top: 100%; left: 0; min-width: 210px; padding: 4px 0;
    background: #fbfcff; border: 1.5px solid var(--edge); box-shadow: 3px 4px 0 var(--shadow);
  }
  .menu-panel [role="menuitem"] {
    display: block; width: 100%; padding: 5px 16px; border: 0; background: none; text-align: left;
    font: inherit; color: var(--ink); text-decoration: none; white-space: nowrap;
  }
  .menu-panel [role="menuitem"]:hover, .menu-panel [role="menuitem"]:focus-visible { background: var(--ink); color: #fff; outline: 0; }
  .menu-sep { height: 1.5px; margin: 4px 0; background: rgba(76, 91, 134, .4); }
  .mb-clock { height: 30px; display: flex; align-items: center; font: 400 13px var(--font-mono); white-space: nowrap; }
  .pw-cap b { font-style: normal; color: var(--ink); }
  @media (max-width: 599px) {
    .mb-direct, .mb-clock { display: none; }
    .mb-left, .menu { position: static; }
    .menu-panel { left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px)); }
  }

  .pf { padding: 16px; display: grid; gap: 14px; }
  .pf-head { display: flex; align-items: center; gap: 14px; }
  .pf-head svg { width: 44px; height: 44px; flex: none; color: var(--ink); }
  .pf-name { margin: 0; font: 700 18px/1.2 var(--font-mono); letter-spacing: -.01em; }
  .pf-ver { margin: 2px 0 0; font-size: 13px; color: var(--ink-2); }
  .pf-specs { margin: 0; display: grid; gap: 8px; }
  .pf-specs div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: baseline; }
  .pf-specs dt { font: 700 12px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
  .pf-specs dd { margin: 0; }
  .tips { margin: 0; padding: 16px 16px 16px 34px; display: grid; gap: 9px; }
  .prefs { padding: 14px 16px 16px; display: grid; gap: 16px; }
  .prefs fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
  .prefs legend { padding: 0; margin-bottom: 8px; font: 700 12px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
  .swatches { display: flex; flex-wrap: wrap; gap: 12px; }
  .swatch { display: grid; gap: 5px; justify-items: center; padding: 0; border: 0; background: none; font-size: 12px; color: var(--ink); }
  .swatch i { display: block; width: 64px; height: 42px; border: 1.5px solid var(--edge); border-radius: 4px; box-shadow: 2px 2px 0 var(--shadow); }
  .swatch[aria-pressed="true"] i { outline: 3px solid var(--accent); outline-offset: 2px; }
  .swatch[aria-pressed="true"] span { font-weight: 600; }
  .check { display: flex; align-items: flex-start; gap: 9px; line-height: 1.4; }
  .check input { flex: none; width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
  html.calm .win-bar::after, html.calm .spark, html.calm .dot { animation: none !important; }
  html.calm .ph::after, html.calm .sheen::after { display: none; }
  html.calm .cloud { transform: none !important; }

  .mb-clock { margin-right: -12px; }
  html.comic { --font-ui: 'Comic Sans MS', 'Comic Sans', 'Comic Neue', 'Chalkboard SE', cursive; --font-mono: 'Comic Sans MS', 'Comic Sans', 'Comic Neue', 'Chalkboard SE', cursive; }
  .fact-text { margin: 0; padding: 14px 16px; font-size: 14.5px; line-height: 1.5; }
  .fact.pop .win-body { animation: fact-pop .22s ease-out; }
  @keyframes fact-pop { from { opacity: .35; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

  /* ---------- Ambient touches ---------- */
  /* Clouds drift at different speeds as the page scrolls (--sy is scrollY, set in JS). */
  .cloud { will-change: transform; }
  .c1 { transform: translate(calc(var(--sy, 0) * -.04px), calc(var(--sy, 0) * .05px)); }
  .c2 { transform: translate(calc(var(--sy, 0) * .07px), calc(var(--sy, 0) * .02px)); }
  .c3 { transform: translate(calc(var(--sy, 0) * .05px), calc(var(--sy, 0) * -.03px)); }
  .c4 { transform: translate(calc(var(--sy, 0) * -.06px), calc(var(--sy, 0) * .04px)); }
  .c5 { width: 400px; height: 120px; top: 1250px; left: 6%; opacity: .5; transform: translate(calc(var(--sy, 0) * .04px), calc(var(--sy, 0) * -.05px)); }
  .c6 { width: 320px; height: 100px; top: 1650px; right: 10%; opacity: .55; transform: translate(calc(var(--sy, 0) * -.05px), calc(var(--sy, 0) * -.02px)); }

  /* A glint crosses each title bar once, the first time its window scrolls into view. */
  .win-bar { position: relative; overflow: hidden; }
  .win-bar::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none; opacity: 0;
    background: linear-gradient(105deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85) 50%, rgba(255, 255, 255, 0));
    transform: translateX(-130%) skewX(-18deg);
  }
  .glint > .win-bar::after { animation: glint .9s ease-out var(--d, 0ms) 1 both; }
  @keyframes glint {
    0% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateX(330%) skewX(-18deg); opacity: 0; }
  }

  /* A soft gloss slides across every image as it moves up the screen (--g is its position, set in JS). */
  .ph::after, .sheen::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, .3) 49%, rgba(255, 255, 255, .08) 53%, rgba(255, 255, 255, 0) 62%) no-repeat;
    background-size: 300% 100%;
    background-position: calc((1 - var(--g, .5)) * 100%) 0;
  }

  /* Idle details: twinkling sparkles and a status light that breathes. */
  .spark { animation: twinkle 2.8s ease-in-out infinite; }
  .spark.s2 { animation-delay: 1.3s; }
  @keyframes twinkle {
    0%, 100% { transform: scale(.7) rotate(0deg); opacity: .4; }
    50% { transform: scale(1.15) rotate(20deg); opacity: 1; }
  }
  .dot { animation: led 2.6s ease-in-out infinite; }
  @keyframes led {
    0%, 100% { box-shadow: 0 0 0 2px rgba(47, 174, 74, .25); }
    50% { box-shadow: 0 0 0 5px rgba(47, 174, 74, .08); }
  }
  @media (prefers-reduced-motion: reduce) {
    .win-bar::after, .spark, .dot { animation: none !important; }
    .ph::after, .sheen::after { display: none; }
    .cloud { transform: none !important; }
  }

  /* ---------- Responsive ---------- */
  @media (max-width: 999px) {
    .featured { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 899px) {
    .intro { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .now { margin-top: 0; }
    .top { grid-template-columns: auto minmax(0, 1fr); }
    .avatar { width: 96px; height: 96px; font-size: 28px; border-width: 4px; }
    .who { padding-top: 4px; }
    .top > .social { grid-column: 1 / -1; justify-content: flex-start; padding-top: 0; }
  }
  @media (max-width: 599px) {
    .featured { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .about-body { flex-direction: column-reverse; align-items: flex-start; }
    .meta { grid-template-columns: 1fr; }
    .pair { grid-template-columns: 1fr; }
    .cs { padding: 18px 16px 22px; }
  }
  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
  }

/* ---------- Base reset (the preview page had these from its host) ---------- */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html { background: var(--sky-3); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
img { max-width: 100%; }
/* ---------- Theme additions: real images, resume page, admin-driven content ---------- */
.wall-img img, .v-art img, .pw img, .hero-img img { display: block; width: 100%; height: auto; border: 1.5px solid rgba(27, 37, 68, .5); border-radius: 2px; }
.hero-img { margin: 0; }
.card-link .cover { display: block; width: 100%; height: auto; aspect-ratio: 1.1 / 1; object-fit: cover; border: 1.5px solid rgba(27, 37, 68, .5); border-radius: 2px; }
.cs-brief p, .cs-outcome p { margin: 0 0 10px; max-width: 66ch; }
.avatar-initials { font: 700 38px var(--font-mono); color: var(--ink-2); }
.empty-note { padding: 14px 16px; border: 1.5px dashed rgba(76, 91, 134, .55); border-radius: 6px; color: var(--ink-2); font-size: 14px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.page-win { max-width: 860px; margin: 22px auto 0; }
.page-win .win-body { padding: 22px 26px 26px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1.5px solid rgba(76, 91, 134, .35); }
.page-head h1 { margin: 0; font: 700 clamp(26px, 4.5vw, 36px)/1.1 var(--font-mono); letter-spacing: -.02em; }
.dl-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; cursor: var(--cursor-hand, pointer); text-decoration: none;
  font: 700 14px var(--font-mono); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 8px; background: linear-gradient(#fff, #dfe5f3); box-shadow: 2px 3px 0 var(--shadow);
}
.dl-btn:hover { background: linear-gradient(#fff, #cfd8ee); }
.dl-btn:active { transform: translate(2px, 3px); box-shadow: none; }
.dl-btn svg { width: 16px; height: 16px; }
.entry { font-size: 16px; line-height: 1.65; }
.entry > :first-child { margin-top: 0; }
.entry h2, .entry h3, .entry h4 { font-family: var(--font-mono); letter-spacing: -.01em; line-height: 1.2; margin: 1.6em 0 .5em; }
.entry h2 { font-size: 22px; } .entry h3 { font-size: 18px; } .entry h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .05em; }
.entry p, .entry ul, .entry ol { margin: 0 0 1em; }
.entry a { color: var(--accent); }
.entry img { max-width: 100%; height: auto; }
.entry .alignwide, .entry .alignfull { max-width: 100%; }
.entry hr { border: 0; border-top: 1.5px solid rgba(76, 91, 134, .35); margin: 1.6em 0; }
.entry table { width: 100%; border-collapse: collapse; }
.entry th, .entry td { text-align: left; padding: 6px 8px; border-bottom: 1px solid rgba(76, 91, 134, .3); }

/* ---------- Resume page ---------- */
.rs-top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px 28px; align-items: center; padding-top: 4px; }
.rs-top .who { min-width: 0; }
.rs-dl { align-self: start; padding-top: 10px; }
.rs-top h1 { margin: 0; font: 700 clamp(28px, 5vw, 42px)/1.1 var(--font-mono); letter-spacing: -.02em; }
.rs-top .role { margin: 6px 0 0; font: 400 clamp(16px, 2.4vw, 21px) var(--font-mono); color: var(--ink-2); }
.rs-intro { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; margin-top: 22px; align-items: start; }
.tt .win-body { padding: 0; background: #fff; }
.tt-text { margin: 0; padding: 18px 20px 22px; font: 400 14px/1.75 var(--font-mono); color: var(--ink); background: #fff; }
.tt-cursor { display: inline-block; width: .6em; height: 1.1em; margin-left: 2px; vertical-align: -.2em; background: var(--ink); animation: gp-blink 1.1s steps(1) infinite; }
@keyframes gp-blink { 50% { opacity: 0; } }
html.calm .tt-cursor { animation: none; }
.gi .win-body { padding: 0; }
.gi-head { display: flex; gap: 14px; align-items: center; padding: 16px 16px 12px; }
.gi-head .avatar { width: 64px; height: 64px; border-width: 3px; flex: none; }
.gi-name { font: 700 17px var(--font-mono); }
.gi-kind { font-size: 13px; color: var(--ink-2); }
.gi-rows { margin: 0; padding: 0 16px 8px; }
.gi-rows > div { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-top: 1px solid rgba(76, 91, 134, .25); font-size: 13.5px; }
.gi-rows dt { font: 700 11px var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); padding-top: 2px; }
.gi-rows dd { margin: 0; overflow-wrap: anywhere; }
.gi-rows a { color: var(--accent); }
.gi-rows .dot { display: inline-block; width: 9px; height: 9px; margin-right: 4px; vertical-align: 0; }
.gi-foot { padding: 6px 16px 16px; }

.rs-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.stat .win-body { padding: 16px 12px 18px; text-align: center; }
.stat-num { font: 700 clamp(32px, 4.2vw, 46px)/1 var(--font-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.stat-lab { margin: 8px 0 0; font-size: 13px; line-height: 1.35; color: var(--ink-2); }

.finder .win-body { padding: 0; background: #fff; }
.f-tools { display: flex; justify-content: space-between; gap: 12px; padding: 7px 14px; font-size: 12.5px; color: var(--ink-2); background: linear-gradient(#f6f8fd, #e3e8f4); border-bottom: 1.5px solid rgba(76, 91, 134, .35); }
.f-cols, .f-row { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 16px; align-items: center; padding-inline: 14px; }
.f-cols { padding-block: 6px; font: 700 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: #f3f5fb; border-bottom: 1px solid rgba(76, 91, 134, .3); }
.f-item { border-bottom: 1px solid rgba(76, 91, 134, .2); }
.f-item:last-child { border-bottom: 0; }
.f-item:nth-child(even) .f-row { background: #f5f8ff; }
.f-row { width: 100%; padding-block: 11px; border: 0; background: #fff; text-align: left; cursor: var(--cursor-hand, pointer); color: var(--ink); font: 400 14.5px var(--font-ui); }
.f-row:hover { background: #eaf1ff; }
.f-item.open .f-row { background: var(--accent); color: #fff; }
.f-name { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 600; }
.f-name svg { width: 26px; height: 21px; flex: none; }
.f-caret { flex: none; width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; }
.f-item.open .f-caret { transform: rotate(90deg); }
.f-ten { min-width: 0; }
.tenure { position: relative; display: block; height: 12px; border: 1.5px solid var(--edge); border-radius: 2px; background: #eef2fb; overflow: hidden; }
.tenure-fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--accent); }
.f-item.open .tenure { border-color: #fff; background: rgba(10, 30, 90, .35); }
.f-item.open .tenure-fill { background: #fff; }
.rs-js .tenure-fill { clip-path: inset(0 100% 0 0); transition: clip-path .8s ease-out; }
.rs-js .f-item.in .tenure-fill { clip-path: inset(0 0 0 0); }
html.calm .tenure-fill { transition: none !important; clip-path: none !important; }
.f-dur { display: block; margin-top: 3px; font-size: 11.5px; opacity: .8; }
.f-detail { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px 32px; align-items: start; padding: 16px 20px 20px 52px; background: #fbfcff; border-top: 1px solid rgba(76, 91, 134, .2); }
.f-detail[hidden] { display: none; }
.f-bul ul { margin: 0; padding-left: 18px; }
.f-bul li { margin: 0 0 6px; line-height: 1.5; }
.f-side { padding: 12px 14px 14px; background: #fff; border: 1.5px solid rgba(76, 91, 134, .4); border-radius: 6px; box-shadow: 2px 3px 0 var(--shadow); }
.f-side h4 { margin: 0 0 8px; font: 700 11px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.f-side h4:not(:first-child) { margin-top: 14px; }
.f-hl { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px 14px; }
.f-hl b { display: block; font: 700 24px/1.1 var(--font-mono); letter-spacing: -.02em; }
.f-hl span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.3; color: var(--ink-2); }

.folders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 16px; }
.folder { padding: 12px 14px 16px; background: #fff; border: 1.5px solid rgba(76, 91, 134, .4); border-radius: 6px; }
.folder h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font: 700 14px var(--font-mono); }
.folder h3 svg { width: 34px; height: 27px; flex: none; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; font-size: 12.5px; line-height: 1.4; border: 1.5px solid rgba(76, 91, 134, .45); border-radius: 999px; background: linear-gradient(#fff, #e9eefb); }

.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; padding: 26px 24px 28px; }
.note { position: relative; padding: 22px 20px 18px; background: #fff3a8; box-shadow: 3px 5px 0 var(--shadow); transform: rotate(-1.2deg); font-size: 14.5px; line-height: 1.5; }
.note:nth-child(even) { background: #ffd9e4; transform: rotate(1deg); }
.note::before { content: ""; position: absolute; top: -9px; left: 50%; width: 46px; height: 16px; margin-left: -23px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .08); transform: rotate(-3deg); }
.note b { display: block; margin-bottom: 6px; font: 700 15px var(--font-mono); }
.note p { margin: 0 0 8px; }
.note-link { font-weight: 600; color: var(--ink); text-underline-offset: 3px; }

.save { display: flex; gap: 14px; align-items: flex-start; padding: 18px; }
.save-main { flex: 1; min-width: 0; }
.save-msg { margin: 0 0 12px; font-size: 14px; overflow-wrap: anywhere; }
.mprog { height: 18px; padding: 2px; border: 2px solid var(--ink); border-radius: 3px; background: #fff; overflow: hidden; }
.mprog i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, #9cc2f8 8px 10px); }
.save-actions { margin-top: 14px; text-align: right; }

@media (max-width: 899px) {
  .rs-intro { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .rs-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 599px) { .stat .win-btns { display: none; } }
@media (max-width: 899px) { .rs-top { grid-template-columns: auto minmax(0, 1fr); } .rs-dl { grid-column: 1 / -1; padding-top: 0; } }
@media (max-width: 759px) {
  .f-cols { display: none; }
  .f-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name date" "role role" "ten ten"; gap: 4px 12px; padding-block: 12px; }
  .f-name { grid-area: name; } .f-date { grid-area: date; font-size: 12.5px; white-space: nowrap; }
  .f-role { grid-area: role; padding-left: 52px; font-size: 13px; opacity: .85; } .f-ten { grid-area: ten; padding-left: 52px; }
  .f-detail { grid-template-columns: minmax(0, 1fr); padding-left: 18px; }
  .folders, .notes { grid-template-columns: minmax(0, 1fr); }
}

.admin-bar .menubar { top: 32px; }
@media (max-width: 782px) { .admin-bar .menubar { top: 46px; } }
