:root{
    --font-body:Inter,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
    --font-display:Georgia,'Times New Roman',serif;
    --desk:#1a1f27;
    --dock:rgba(20,20,20,0.85);
    --modal:#f7f4ee;
    --modal-top:var(--dock);
    --text:#2a2b2e;
    --muted:#6a7078;
    --purple:#786b7d;
    --radius:15px;
    --shadow:0 12px 30px rgba(0,0,0,.35);
    --card-shadow:0 4px 15px rgba(0,0,0,.15);
    --dark-gray:#4D4D4D;
    --profile-bg:rgba(255,255,255,0.14);
  }

  *{ box-sizing:border-box; }
  html,body{ height:100%; margin:0; }
  body{ font-family:var(--font-body); font-size:14px; line-height:1.6; color:var(--text); background:var(--desk); overflow:hidden; }
  body::before{ content:""; position:fixed; inset:0; background:url('./photos/previews/background.webp') center/cover no-repeat; z-index:-1; }

  /* tighten gap above Nocturne link (only first project) */
  #win-projects .project-item:first-of-type .desc:last-of-type{ margin-bottom:2px; }

  /* ---------- Dock ---------- */
  .dock{ position:fixed; left:0; right:0; bottom:0; height:64px; background:var(--dock); color:#fff; display:flex; align-items:center; justify-content:space-between; padding:0 20px; backdrop-filter:blur(10px); z-index:1000; }
  .dock .icons{ display:flex; gap:22px; align-items:center; }
  .dock .icons .task{ position:relative; display:flex; align-items:center; gap:8px; height:36px; padding:0 6px; border:none; background:transparent; cursor:pointer; transition:transform .1s ease; border-radius:10px; color:#fff; }
  .dock .icons .task:hover{ transform:translateY(-2px); }
  .dock .icons .task img{ width:28px; height:28px; object-fit:contain; pointer-events:none; }
  .dock .icons .task::after{ content:attr(data-tooltip); position:absolute; bottom:48px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,.8); color:#fff; font-size:12px; padding:4px 8px; border-radius:6px; opacity:0; pointer-events:none; transition:opacity .15s ease; white-space:nowrap; }
  .dock .icons .task:hover::after{ opacity:1; }
  .dock .icons .task .label{ display:inline-block; font-size:14px; color:#fff; }

  /* Profile pill */
  .dock .profile{ position:relative; display:flex; align-items:center; gap:10px; background:var(--profile-bg); padding:6px 14px; border-radius:12px; cursor:pointer; }
  .dock .profile .avatar{ width:28px; height:28px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; }
  .dock .profile .avatar svg{ width:18px; height:18px; fill:#6b7280; }
  .dock .profile span{ color:#fff; font-size:14px; }
  .dock .profile::after{ content:"About Me"; position:absolute; bottom:48px; left:50%; transform:translateX(-50%); background:rgba(0,0,0,0.8); color:#fff; font-size:12px; padding:4px 8px; border-radius:6px; opacity:0; pointer-events:none; transition:opacity .15s ease; white-space:nowrap; }
  .dock .profile:hover::after{ opacity:1; }

  .dock .right{ display:flex; align-items:center; gap:14px; color:#fff; font-size:14px; }
  .vol-btn{ background:none; border:none; color:#fff; font-size:18px; cursor:pointer; outline:none; }

  /* ---------- Windows ---------- */
  .window{ position:absolute; background:var(--modal); border-radius:var(--radius); box-shadow:var(--shadow); border:none; display:none; overflow:hidden; background-clip:padding-box; }
  .window::before{ content:""; position:absolute; top:0; left:0; right:0; height:32px; background:var(--modal-top); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); z-index:1; }
  .window.active{ display:block; }
  .titlebar{ height:32px; display:flex; align-items:center; justify-content:space-between; padding:0 12px; cursor:grab; position:relative; z-index:2; }
  .titlebar .title{ font-weight:400; font-size:14px; color:#fff; }
  .btn-close{ border:none; background:none; font-size:16px; cursor:pointer; color:#fff; }
  .win-body{ height:calc(100% - 32px); overflow:auto; scrollbar-gutter:stable both-edges; }

  /* ---------- About ---------- */
  #win-about .win-body{ padding:24px 36px; }
  #win-about .about{ display:grid; grid-template-columns:150px 1fr; gap:20px; align-items:center; }
  #win-about .pfp{ width:130px; height:130px; border-radius:50%; background:url('./photos/about me profile picture.png') 40% 61% / 245% no-repeat; border:6px solid #f0ede6; }
  #win-about .name{ font-size:26px; font-weight:800; color:var(--purple); margin:0 0 4px; }
  #win-about .lead{ margin:0; font-size:14px; line-height:1.6; color:var(--muted); }
  #win-about .h{ font-weight:600; font-size:20px; color:var(--purple); margin:20px 0 4px; }
  #win-about .text-block{ margin-left:-150px; padding-left:150px; font-size:14px; line-height:1.6; }

  /* ---------- Projects ---------- */
  #win-projects .win-body{ padding:18px 28px; }
  #win-projects .project-item{ display:grid; grid-template-columns:220px 1fr; gap:20px; margin-bottom:24px; align-items:center; }
  #win-projects .thumb{ width:220px; height:130px; background:#ccc center/cover no-repeat; border-radius:10px; }
  #win-projects .project-title{ font-size:18px; font-weight:600; color:var(--purple); margin:0 0 6px; }
  #win-projects .chips{ display:flex; flex-wrap:wrap; gap:6px; margin:0 0 8px; }
  #win-projects .chip{ background:#ece8df; color:var(--dark-gray); border-radius:999px; padding:4px 10px; font-size:12px; line-height:1.4; }
  #win-projects .desc{ font-size:12px; line-height:1.5; margin:0 0 6px; }
  #win-projects a{ color:var(--purple); text-decoration:underline; font-size:12px; }

  /* ---------- Art ---------- */
  #win-art .win-body{ padding:20px; }
  #win-art .art-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  #win-art .art-item{ background:#eeeae2; border-radius:10px; overflow:hidden; box-shadow:var(--card-shadow); }
  #win-art .thumb{ width:100%; aspect-ratio:4/3; background:#ccc center/cover no-repeat; cursor:zoom-in; }
  #win-art .caption{ padding:10px 12px 12px; text-align:left; }
  #win-art .caption .title{ font-size:14px; font-weight:600; color:var(--purple); margin:0 0 4px; }
  #win-art .caption .meta{ font-size:12px; color:var(--muted); margin:0; line-height:1.5; }
  #win-art .art-item.placeholder{ display:flex; align-items:center; justify-content:center; min-height:220px; background:#f3efe8; }
  #win-art .art-item.placeholder .caption{ text-align:center; }
  #win-art .art-item.placeholder .title{ margin-bottom:6px; }
  #win-art .art-item.placeholder .meta{ font-size:13px; text-align:center; padding:0 20px; }

  /* ---------- Art Lightbox ---------- */
  .art-lightbox{ position:fixed; inset:0; z-index:1300; background:rgba(10,12,16,.78); display:none; align-items:center; justify-content:center; padding:24px; }
  .art-lightbox.show{ display:flex; }
  .art-lightbox-content{ margin:0; width:min(980px,92vw); max-height:90vh; display:flex; flex-direction:column; align-items:center; }
  .art-lightbox-img{ display:block; max-width:100%; max-height:78vh; border-radius:12px; box-shadow:var(--shadow); }
  .art-lightbox-cap{ margin-top:10px; background:#ece8df; border-radius:10px; padding:10px 12px; width:100%; }
  .art-lightbox-cap .title{ font-size:15px; font-weight:600; color:var(--purple); margin:0 0 4px; }
  .art-lightbox-cap .meta{ font-size:12px; color:var(--text); margin:0; line-height:1.5; }
  .art-lightbox-close{ position:absolute; top:18px; right:18px; width:38px; height:38px; border:none; border-radius:999px; font-size:18px; line-height:1; cursor:pointer; color:#fff; background:rgba(0,0,0,.45); }
  .art-lightbox-close:hover{ background:rgba(0,0,0,.6); }
  .art-lightbox-nav{ position:absolute; top:50%; transform:translateY(-50%); width:42px; height:42px; border:none; border-radius:999px; font-size:24px; line-height:1; cursor:pointer; color:#fff; background:rgba(0,0,0,.45); }
  .art-lightbox-nav:hover{ background:rgba(0,0,0,.6); }
  .art-lightbox-prev{ left:18px; }
  .art-lightbox-next{ right:18px; }

  /* ---------- Music ---------- */
  #win-music .win-body{ padding:50px 36px 24px; }
  #win-music .player{ background:#e8e6df; padding:32px; border-radius:10px; box-shadow:var(--card-shadow); margin-bottom:40px; }
  #win-music .song-title{ font-size:24px; color:var(--purple); font-weight:600; margin-bottom:4px; }
  #win-music .song-time{ font-size:14px; color:var(--muted); margin-bottom:20px; }
  #win-music .controls{ display:flex; justify-content:center; align-items:center; gap:40px; margin-bottom:20px; }
  #win-music .control-btn{ background:none; border:none; font-size:32px; cursor:pointer; color:#4D4D4D; }
  #win-music .control-btn[disabled]{ opacity:.4; cursor:default; }
  #win-music .progress-wrap{ width:100%; height:10px; border-radius:10px; background:#4D4D4D; position:relative; cursor:pointer; }

  #win-music .song-list{ display:flex; flex-direction:column; gap:16px; padding:0 16px; }
  #win-music .song-item{ display:flex; justify-content:space-between; align-items:center; font-size:16px; color:#6a7078; padding:6px 0; cursor:pointer; border-radius:8px; }
  #win-music .song-item.active{ color:var(--purple); font-weight:600; }
  #win-music .song-item .dur{ font-size:14px; color:#8a8f96; }

  /* ---------- CONTACT ---------- */
  #win-contact{ width:300px; height:600px; border-radius:var(--radius); }
  #win-contact .win-body{ padding:0; margin:0; overflow:hidden; scrollbar-gutter:auto; }
  #win-contact .win-body::-webkit-scrollbar{ display:none; }
  #win-contact .banner{
    position:relative; display:block; width:100%; height:170px; border-radius:0;
    background-image:url('photos/previews/contact.webp');
    background-position:center 99%;
    background-size:cover;
  }
  #win-contact .banner-overlay{
    position:absolute; left:0; right:0; bottom:0;
    padding:3px 16px; background:rgba(40,40,40,0.6);
    color:#fff; text-align:center; font-size:18px; line-height:1.2; font-weight:200;
    backdrop-filter:saturate(120%) blur(2px);
  }
  #win-contact .contact-info{
    margin-top:12px; padding:12px 10px 18px;
    display:flex; flex-direction:column; gap:12px;
  }
  #win-contact .info-card{ background:#e8e6df; border-radius:10px; padding:12px; box-shadow:none; position:relative; }
  #win-contact .info-card p{ margin:4px 0; font-size:14px; }
  #win-contact .info-card.notes{ min-height:120px; }
  #win-contact a, .email-link{ color:var(--purple); text-decoration:none; word-break:break-word; font-size:14px; }
  .email-link{ position:relative; cursor:pointer; display:inline-block; }
  .email-link::after{
    content:'Click to copy to clipboard'; position:absolute; top:-28px; left:50%; transform:translateX(-50%);
    background:rgba(0,0,0,.8); color:#fff; font-size:11px; padding:3px 6px; border-radius:4px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .2s ease;
  }
  .email-link:hover::after{ opacity:1; }

  /* ---------- Copy toast ---------- */
  .copy-confirm{ position:fixed; bottom:80px; right:30px; background:#333; color:#fff; font-size:12px; padding:6px 12px; border-radius:8px; opacity:0; transition:opacity .3s ease; pointer-events:none; z-index:1100; }
  .copy-confirm.show{ opacity:1; }

  /* ---------- Desktop photo icons ---------- */
  .photo-icon{ width:120px; cursor:pointer; }
  .photo-thumb{ width:120px; height:84px; object-fit:cover; border-radius:6px; display:block; border:none; box-shadow:none; background:none; }
  .photo-label{ text-align:center; color:#fff; font-size:18px; margin-top:6px; text-shadow:0 2px 4px rgba(0,0,0,.5); }

  /* Photo windows */
  .photo-body{ display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:20px 4px; overflow:auto; line-height:0; }
  .photo-img{ display:block; border-radius:8px; margin:0; max-width:100%; height:auto; }
  .photo-cap{ font-size:13px; line-height:1.5; color:var(--text); padding-top:8px; text-align:center; max-width:100%; margin:0; }

  /* ---------- Mobile layout ---------- */
  @media (max-width: 768px){
    body{ overflow:hidden; }

    /* Fullscreen panels above dock, not draggable */
    .window{
      position:fixed !important;
      left:0 !important;
      right:0 !important;
      top:0 !important;
      bottom:64px !important;
      width:auto !important;
      height:auto !important;
      border-radius:0 !important;   /* <-- ensure all windows lose rounding on mobile */
      box-shadow:none;
    }

    /* Contact window: force no rounding on mobile (ID selector override) */
    #win-contact{
      border-radius:0 !important;
    }
    .window::before{ height:48px; }
    .titlebar{ height:48px; padding:0 14px; cursor:default !important; } /* not draggable look */
    .win-body{ height:calc(100% - 48px); }

    /* Hide vol/time on mobile dock */
    .dock .right{ display:none; }

    /* Projects text de-squish */
    #win-projects .project-item{ grid-template-columns:1fr; gap:10px; }
    #win-projects .thumb{ width:100%; height:180px; }

    /* Art cards stack on mobile */
    #win-art .art-grid{ grid-template-columns:1fr; }

    /* Music tighter padding on mobile */
    #win-music .win-body{ padding:24px 16px 16px; }
  }
/* Small refinements to the original desktop, with touch and keyboard support. */
:root { --dock-height: 72px; --title-height: 40px; --focus: #665577; }
body { isolation: isolate; }
body::before { z-index: -1; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
button:focus-visible, a:focus-visible, [tabindex="0"]:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 4px;
}
.window:focus { outline: none; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 2000; padding: 12px 18px; border-radius: 8px; background: var(--modal); color: var(--text); }
.skip-link:focus { top: 12px; }
.photo-icon { background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 6px; width: 120px; text-align: center; align-self: start; transition: background .15s, transform .15s; }
.photo-icon:hover { background: #ffffff26; border-color: #ffffff38; transform: translateY(-2px); }
.photo-thumb { width: 106px; height: 78px; box-shadow: 0 3px 9px #152c3d30; }
.photo-label { display: block; font-size: 13px; margin-top: 7px; }
.dock { height: var(--dock-height); padding: 0 24px; background: rgba(24, 26, 30, .88); border-top: 1px solid #ffffff1f; }
.dock .icons { gap: 9px; }
.dock .icons .task { height: 46px; padding: 8px 12px; gap: 9px; font-size: 13px; transition: background .15s, transform .15s; }
.dock .icons .task:hover { background: #ffffff15; }
.dock .icons .task.active { background: #ffffff20; box-shadow: inset 0 -2px #c5b9cb; }
.dock .icons .task img { width: 27px; height: 27px; }
.dock-home { display: grid; place-items: center; width: 27px; height: 27px; color: #ddd2e2; font-size: 30px; line-height: 1; }
.dock .icons .task .label { font-size: 13px; }
.dock .profile { border: 1px solid #ffffff14; margin-right: 7px; }
.dock .profile span { font-size: 13px; }
.dock .profile::after { content: "About me"; }
.vol-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; }
.vol-btn:hover { background: #ffffff14; }
#clock { min-width: 72px; font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
.window { max-width: calc(100vw - 32px); max-height: calc(100dvh - var(--dock-height) - 24px); border: 1px solid #ffffff26; box-shadow: 0 18px 52px #18212b40, 0 3px 12px #18212b20; }
.window.active { animation: window-in .18s ease-out; }
.window::before { height: var(--title-height); }
.titlebar { height: var(--title-height); padding: 0 7px 0 16px; touch-action: none; user-select: none; }
.titlebar .title { font-size: 12px; letter-spacing: .15px; }
.window.is-front .titlebar .title { color: #fff; }
.window:not(.is-front) .titlebar .title { color: #d2d1d4; }
.btn-close { width: 32px; height: 32px; border-radius: 7px; font-size: 13px; display: grid; place-items: center; }
.btn-close:hover { background: #ffffff20; }
.win-body { height: calc(100% - var(--title-height)); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bfb7c1 transparent; }
.music-eyebrow { color: #756c79; letter-spacing: 1.6px; font-size: 10px; font-weight: 600; margin: 0 0 14px; }
#win-about .text-block { margin: 0; padding: 0; }
#win-about .h { font-size: 15px; margin: 22px 0 6px; }
#win-about .lead { font-size: 14px; line-height: 1.7; }
#win-about .pfp { flex-shrink: 0; }
#win-projects .win-body { padding-top: 24px; }
#win-projects .project-item { align-items: start; padding-bottom: 24px; border-bottom: 1px solid #d9d4ce; }
#win-projects .project-item:last-child { border-bottom: 0; margin-bottom: 0; }
#win-projects .project-title { font-size: 20px; }
#win-projects .desc { line-height: 1.7; }
#win-projects .thumb { background-color: #e8e6df; }
#win-projects .project-link { display: inline-block; font-size: 13px; font-weight: 600; margin: 4px 0 5px; text-underline-offset: 4px; }
#win-art .art-item { box-shadow: 0 2px 6px #2323230a; }
#win-art .thumb:hover { filter: brightness(1.04); }
dialog.art-lightbox { position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none; border: 0; margin: 0; color: var(--text); background: transparent; }
dialog.art-lightbox[open] { display: flex; }
dialog.art-lightbox::backdrop { background: rgba(10,12,16,.86); backdrop-filter: blur(7px); }
.art-lightbox-content { width: min(980px, calc(100vw - 150px)); max-height: 90dvh; }
.art-lightbox-img { max-height: 72dvh; object-fit: contain; }
.art-lightbox-cap { flex-shrink: 0; }
#win-music .win-body { padding: 28px 30px; }
#win-music .player { padding: 26px; margin-bottom: 24px; box-shadow: none; }
#win-music .song-title { font-size: 25px; line-height: 1.3; }
#win-music .song-time { margin: 10px 0 18px; font-size: 12px; font-variant-numeric: tabular-nums; }
#win-music .controls { margin-bottom: 14px; gap: 28px; }
#win-music .control-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 25px; }
#win-music .control-btn:hover { background: #d9d5cf; }
#win-music #playBtn { background: #786b7d; color: white; }
#win-music .progress-wrap { display: block; margin: 0; padding: 0; height: 20px; border-radius: 0; background: transparent; accent-color: #786b7d; }
#win-music .song-list { padding: 0; gap: 6px; }
#win-music .song-item { width: 100%; border: 0; background: transparent; padding: 13px 16px; font: inherit; font-size: 13px; text-align: left; gap: 12px; }
#win-music .song-item:hover { background: #ece8df; }
#win-music .song-item.active { background: #e8e3e9; color: #66546d; }
#win-music .song-item .dur { font-size: 11px; }
.player-status { font-size: 12px; line-height: 1.6; margin: 8px 0 0; color: #80534f; }
.player-status:empty { display: none; }
.music-mute { display: block; margin: 16px 0 0 auto; border: 0; background: transparent; color: #6d5a76; font-size: 11px; padding: 10px; border-radius: 6px; cursor: pointer; }
.music-mute:hover { background: #ece8df; }
#win-contact .win-body { overflow-y: auto; }
#win-contact a { color: #6d5a76; line-height: 1.65; text-underline-offset: 3px; }
#win-contact a:hover { text-decoration: underline; }
.email-link::after { display: none; }
.copy-email { display: block; background: #dcd5df; color: #56465e; border: 0; border-radius: 5px; font-size: 11px; padding: 7px 10px; margin-top: 10px; cursor: pointer; }
.copy-email:hover { background: #cfc5d4; }
#win-contact .info-card.notes { min-height: auto; }
#win-contact .info-card p { line-height: 1.7; }
.copy-confirm { bottom: calc(var(--dock-height) + 16px); padding: 10px 15px; max-width: calc(100vw - 32px); }
.photo-body { padding: 16px !important; }
.photo-img { max-width: 100%; max-height: 65dvh; object-fit: contain; }
.photo-cap { padding: 12px 4px 0; line-height: 1.7; }
.noscript-notice { position: fixed; top: 120px; left: 50%; transform: translateX(-50%); width: min(90vw, 420px); padding: 24px; background: var(--modal); border-radius: 12px; }
@keyframes window-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1000px) and (min-width: 769px) {
  .dock { padding: 0 12px; }
  .dock .icons { gap: 3px; }
  .dock .icons .task { padding: 8px; }
  .dock .profile { margin-right: 3px; }
  .dock .right { gap: 3px; }
}
@media (max-width: 768px) {
  :root { --dock-height: calc(74px + env(safe-area-inset-bottom, 0px)); --title-height: 48px; }
  .dock { padding: 0 8px env(safe-area-inset-bottom, 0px); }
  .dock .icons { width: 100%; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .dock .icons .task { display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 7px 2px; height: 58px; min-width: 0; border-radius: 9px; }
  .dock .icons .task .label, .dock .profile span { display: block; font-size: 10px; white-space: nowrap; }
  .dock .icons .task img { width: 25px; height: 25px; }
  .dock-home { width: 25px; height: 25px; font-size: 28px; }
  .dock .profile { margin: 0; background: transparent; border-color: transparent; }
  .dock .profile .avatar { width: 25px; height: 25px; }
  .dock .icons .task::after, .dock .profile::after { display: none; }
  .window { bottom: var(--dock-height) !important; max-width: none; max-height: none; border: 0; }
  .window.active { animation: none; }
  .titlebar { touch-action: auto; padding-left: 20px; }
  .btn-close { width: 44px; height: 44px; }
  .win-body { height: calc(100% - var(--title-height)); }
  #win-about .win-body { padding: 26px 24px; }
  #win-about .about { grid-template-columns: 88px 1fr; gap: 16px; align-items: start; }
  #win-about .pfp { width: 88px; height: 88px; border-width: 4px; }
  #win-about .name { font-size: 23px; }
  #win-about .lead { font-size: 14px; }
  #win-projects .win-body { padding: 22px; }
  #win-projects .thumb { height: auto; aspect-ratio: 16 / 9; }
  #win-projects .desc { font-size: 14px; }
  #win-music .win-body { padding: 20px 16px; }
  #win-music .player { padding: 24px 18px; }
  .music-eyebrow { letter-spacing: 1px; line-height: 1.7; }
  .art-lightbox-content { width: calc(100vw - 36px); margin-top: 18px; }
  .art-lightbox-img { max-height: 64dvh; }
  .art-lightbox-nav { top: auto; bottom: 14px; transform: none; width: 48px; height: 48px; }
  .art-lightbox-close { z-index: 1; width: 44px; height: 44px; top: 8px; right: 8px; }
  .copy-confirm { right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

