/* ============================================================
   hinna_os — retro miffy desktop portfolio
   palette: pink stage / sage base / cream windows / black ink
   ============================================================ */

   :root {
    --pink: #f9d9e5;
    --pink-deep: #f2b9cd;
    --sage: #cbe0a6;
    --sage-soft: #e6f4ea;
    --cream: #fdfcf0;
    --ink: #1a1a1a;
    --accent: #e56a8f;
    --peach: #f5c98e;
    --sky: #cfe6f5;
    --shadow: 4px 4px 0 rgba(26, 26, 26, .85);
    --font-pixel: 'VT323', monospace;
    --font-head: 'Pixelify Sans', 'VT323', monospace;
  }
  
  * { margin: 0; padding: 0; box-sizing: border-box; }
  
  .hidden { display: none !important; }
  
  html, body { height: 100%; }
  
  body {
    font-family: var(--font-pixel);
    font-size: 20px;
    line-height: 1.35;
    color: var(--ink);
    background: var(--pink);
    text-transform: lowercase;     /* CRITICAL: every piece of text lowercase */
    overflow: hidden;
  }
  
  /* ---------- desktop shell ---------- */
  .desktop {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    transition: filter .6s ease;
  }
  
  /* night mode via the mood (moon) icon */
  body.night .desktop { filter: brightness(.82) saturate(.85) hue-rotate(-8deg); }
  body.night .mood-toggle .moon { display: none; }
  body.night .mood-toggle .sun { display: block; }
  .mood-toggle .sun { display: none; }
  
  .stage {
    position: relative;
    flex: 1;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 130px;
    align-items: start;
    gap: 12px;
    padding: 56px 24px 24px;
    background: var(--pink);
    overflow: hidden;
  }
  
  /* ---------- mood icon (persistent, every view) ---------- */
  .mood-toggle {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 50;
    width: 46px;
    height: 46px;
    background: none;
    border: none;
    cursor: pointer;
    transition: transform .25s ease;
  }
  .mood-toggle:hover { transform: rotate(-14deg) scale(1.12); }
  .mood-toggle svg { width: 100%; height: 100%; }
  
  /* ---------- nav icons ---------- */
  .icon-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 8px;
    z-index: 5;
  }
  
  .nav-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    background: none;
    border: 2px dashed transparent;
    border-radius: 6px;
    padding: 8px 4px;
    cursor: pointer;
    font-family: var(--font-pixel);
    font-size: 19px;
    color: var(--ink);
    text-transform: lowercase;
    transition: transform .15s ease;
  }
  .nav-icon svg { width: 66px; height: 84px; }
  a.nav-icon { text-decoration: none; }
  .nav-icon:hover { transform: translateY(-3px); }
  .nav-icon:hover .icon-label { background: var(--ink); color: var(--cream); }
  .nav-icon.active { border-color: var(--ink); background: rgba(253, 252, 240, .55); }
  .nav-icon:active { transform: scale(.95); }
  
  .icon-label { padding: 0 5px; border-radius: 3px; white-space: nowrap; }
  
  /* right-hand desktop shortcuts (folders off the main window) */
  .shortcut-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
    align-items: center;
    padding-top: 12px;
    z-index: 5;
  }
  .shortcut svg { width: 58px; height: 74px; }
  .shortcut .icon-label { font-size: 17px; white-space: normal; text-align: center; }
  
  /* ---------- big plug bunny mascot ---------- */
  .plug-bunny {
    position: absolute;
    left: 30px;
    bottom: -6px;
    width: 240px;
    height: auto;
    z-index: 2;
    pointer-events: none;
  }
  
  /* ---------- the os window ---------- */
  .window-zone {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 0;
    height: 100%;
    z-index: 10;
  }
  
  .os-window {
    width: min(620px, 100%);
    max-height: calc(100% - 8px);
    display: flex;
    flex-direction: column;
    background: var(--cream);
    border: 2.5px solid var(--ink);
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: win-open .22s ease-out;
    overflow: hidden;
  }
  .os-window.hidden { display: none; }
  .os-window.minimized .win-body { display: none; }
  .os-window.maximized {
    position: absolute;
    inset: 0;
    width: 100%;
    max-height: 100%;
  }
  
  @keyframes win-open {
    from { transform: scale(.94) translateY(8px); opacity: .4; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
  }
  
  .titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    border-bottom: 2.5px solid var(--ink);
    background: var(--cream);
    flex: none;
    user-select: none;
  }
  .win-title { font-size: 21px; letter-spacing: .5px; }
  
  .lights { display: flex; gap: 7px; }
  .dot {
    width: 13px;
    height: 13px;
    border: 1.8px solid var(--ink);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .12s ease;
  }
  .dot:hover { transform: scale(1.25); }
  .dot.red { background: #e57373; }
  .dot.yellow { background: #f5d76e; }
  .dot.green { background: #aecb84; }
  
  .win-body {
    padding: 22px 26px;
    overflow-y: auto;
    min-height: 0;
  }
  
  /* retro scrollbars */
  .win-body::-webkit-scrollbar, .scroll-list::-webkit-scrollbar, .ticker::-webkit-scrollbar { width: 14px; }
  .win-body::-webkit-scrollbar-track, .scroll-list::-webkit-scrollbar-track, .ticker::-webkit-scrollbar-track {
    background: repeating-linear-gradient(45deg, var(--cream) 0 3px, #efeddd 3px 6px);
    border-left: 2px solid var(--ink);
  }
  .win-body::-webkit-scrollbar-thumb, .scroll-list::-webkit-scrollbar-thumb, .ticker::-webkit-scrollbar-thumb {
    background: var(--pink-deep);
    border: 2px solid var(--ink);
  }
  
  /* ---------- home window ---------- */
  .home-body { text-align: center; }
  .avatar { width: 104px; height: 104px; margin-bottom: 10px; }
  .home-body h1, .about-body h2, .contact-left h2 {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 30px;
    margin-bottom: 4px;
  }
  .subtitle { font-size: 20px; color: #666; margin-bottom: 14px; }
  .accent { color: var(--accent); }
  .home-blurb { max-width: 46ch; margin: 0 auto 22px; }
  
  .btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
  
  .retro-btn {
    display: inline-block;
    font-family: var(--font-pixel);
    font-size: 20px;
    text-transform: lowercase;
    color: var(--ink);
    background: var(--sage);
    border: 2px solid var(--ink);
    border-radius: 4px;
    box-shadow: 3px 3px 0 rgba(26, 26, 26, .85);
    padding: 6px 18px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .1s ease, box-shadow .1s ease;
  }
  .retro-btn:hover { background: var(--peach); }
  .retro-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 rgba(0, 0, 0, 0); }
  
  /* ---------- about window ---------- */
  .about-body { text-align: center; }
  .about-text { max-width: 48ch; margin: 0 auto 18px; }
  .interests { border-top: 2px dashed var(--ink); padding-top: 14px; }
  .interests-title { margin-bottom: 10px; }
  
  .badge-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }
  .badge-list li, .tech-badge {
    font-size: 17px;
    background: var(--sky);
    border: 2px solid var(--ink);
    border-radius: 3px;
    padding: 1px 8px;
    box-shadow: 2px 2px 0 rgba(26, 26, 26, .8);
  }
  
  /* ---------- experience / projects list windows ---------- */
  .list-body { display: flex; flex-direction: column; padding: 0; }
  .list-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 2px solid var(--ink);
    background: #f6f4e4;
    flex: none;
  }
  .header-icon { width: 44px; height: 36px; flex: none; }
  .list-header p { font-size: 18px; color: #555; }
  
  .scroll-list { overflow-y: auto; padding: 6px 20px 18px; min-height: 0; }
  
  .xp-entry {
    padding: 12px 4px;
    border-bottom: 1.5px dotted #999;
  }
  .xp-entry:last-child { border-bottom: none; }
  .xp-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
  .xp-title { font-size: 21px; }
  .xp-title::before { content: '▸ '; color: var(--accent); }
  .xp-dates { font-size: 16px; color: #777; white-space: nowrap; }
  .xp-org { color: var(--accent); font-size: 18px; margin: 1px 0 3px 18px; }
  .xp-desc { font-size: 17px; color: #444; margin-left: 18px; }
  .xp-desc.confidential { color: #888; font-style: italic; }
  .xp-section {
    margin: 16px 0 4px;
    font-size: 17px;
    background: var(--ink);
    color: var(--cream);
    display: inline-block;
    padding: 1px 10px;
    border-radius: 3px;
  }
  
  /* projects: folder list, click to expand */
  .proj-entry { border-bottom: 1.5px dotted #999; }
  .proj-entry:last-child { border-bottom: none; }
  .proj-head {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: none;
    border: none;
    font-family: var(--font-pixel);
    font-size: 21px;
    color: var(--ink);
    text-transform: lowercase;
    padding: 12px 4px;
    cursor: pointer;
    text-align: left;
  }
  .proj-head svg { width: 34px; height: 28px; flex: none; }
  .proj-head:hover { background: #f6f4e4; }
  .proj-arrow { margin-left: auto; transition: transform .2s ease; }
  .proj-entry.open .proj-arrow { transform: rotate(90deg); }
  
  .proj-detail {
    display: none;
    padding: 2px 8px 16px 50px;
  }
  .proj-entry.open .proj-detail { display: block; animation: win-open .18s ease-out; }
  .proj-desc { font-size: 18px; color: #444; margin-bottom: 10px; }
  .proj-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; list-style: none; }
  .proj-links { display: flex; gap: 10px; }
  .proj-links .retro-btn { font-size: 17px; padding: 3px 12px; }
  
  /* ---------- social feed windows ---------- */
  .feed-scroll {
    overflow-y: auto;
    min-height: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
  }
  .fake-post {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid var(--ink);
    border-radius: 4px;
    box-shadow: 3px 3px 0 rgba(26, 26, 26, .8);
    text-decoration: none;
    color: var(--ink);
    transition: transform .12s ease;
  }
  .fake-post:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 rgba(26, 26, 26, .8); }
  .fake-thumb {
    flex: none;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--pink);
    border: 2px solid var(--ink);
  }
  .fake-post:nth-child(2n) .fake-thumb { background: var(--sky); }
  .fake-post:nth-child(3n) .fake-thumb { background: var(--sage-soft); }
  .fake-thumb svg { width: 70%; height: 80%; }
  .fake-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .fake-cap { font-size: 19px; line-height: 1.2; }
  .fake-meta { font-size: 15px; color: #888; }
  .feed-note { font-size: 16px; color: #888; text-align: center; padding: 4px 8px 0; }
  .feed-footer {
    flex: none;
    text-align: center;
    padding: 12px 20px 16px;
    border-top: 2px dashed var(--ink);
    background: #f6f4e4;
  }
  .feed-scroll .instagram-media { margin: 0 auto !important; max-width: 100% !important; min-width: 0 !important; }
  .li-embed { width: 100%; min-height: 420px; border: 2px solid var(--ink); background: #fff; }
  
  /* ---------- contact window ---------- */
  .contact-body { display: flex; gap: 20px; align-items: flex-start; }
  .contact-left { flex: 1; min-width: 0; }
  .contact-email { margin: 6px 0 12px; }
  .contact-email a { color: var(--accent); }
  
  .socials { border: 2px dashed var(--ink); border-radius: 4px; padding: 10px 12px; margin-bottom: 18px; }
  .socials-note { font-size: 18px; color: #555; margin-bottom: 8px; }
  .socials-row { display: flex; gap: 10px; flex-wrap: wrap; }
  .socials-row .retro-btn { font-size: 17px; padding: 3px 12px; background: var(--pink-deep); }
  .socials-row .retro-btn:hover { background: var(--peach); }
  .contact-bunny { width: 120px; flex: none; margin-top: 30px; }
  
  .retro-form { display: flex; flex-direction: column; gap: 6px; }
  .retro-form label { font-size: 18px; }
  .retro-form input, .retro-form textarea {
    font-family: var(--font-pixel);
    font-size: 19px;
    text-transform: lowercase;
    background: #fff;
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 3px;
    box-shadow: inset 2px 2px 0 rgba(26, 26, 26, .15);
    padding: 6px 10px;
    margin-bottom: 8px;
    resize: vertical;
  }
  .retro-form input:focus, .retro-form textarea:focus {
    outline: none;
    background: var(--sage-soft);
  }
  .retro-form .retro-btn { align-self: flex-start; }
  .form-note { font-size: 17px; color: var(--accent); margin-top: 6px; }
  
  /* ---------- places window ---------- */
  .places-body { display: flex; gap: 18px; align-items: stretch; }
  .globe-wrap {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  #globeCanvas {
    width: 260px;
    height: 260px;
    image-rendering: pixelated;
    cursor: grab;
    touch-action: pan-y;   /* horizontal drags spin the globe, vertical still scrolls */
    user-select: none;
  }
  .globe-hint { font-size: 16px; color: #888; }
  .globe-legend { font-size: 16px; color: #666; display: flex; align-items: center; gap: 6px; }
  .legend-pin {
    display: inline-block;
    width: 11px;
    height: 11px;
    background: var(--accent);
    border: 1.5px solid var(--ink);
  }
  
  .ticker-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-left: 2px dashed var(--ink);
    padding-left: 16px;
  }
  .ticker-title { margin-bottom: 8px; }
  .ticker {
    position: relative;
    flex: 1;
    max-height: 230px;
    overflow: hidden;
    border: 2px solid var(--ink);
    background: #fff;
    box-shadow: inset 2px 2px 0 rgba(26,26,26,.12);
  }
  .ticker::before, .ticker::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 24px;
    z-index: 2;
    pointer-events: none;
  }
  .ticker::before { top: 0; background: linear-gradient(#fff, transparent); }
  .ticker::after { bottom: 0; background: linear-gradient(transparent, #fff); }
  .ticker ul {
    list-style: none;
    padding: 10px 12px;
    will-change: transform;
  }
  .ticker li { padding: 3px 0; font-size: 19px; }
  .ticker li::before { content: '✈ '; color: var(--accent); }
  
  /* ---------- gallery window ---------- */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 16px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    min-width: 0;
  }
  .gallery-thumb {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--ink);
    box-shadow: 2.5px 2.5px 0 rgba(26,26,26,.8);
    transition: transform .12s ease;
  }
  .gallery-item:hover .gallery-thumb { transform: scale(1.06) rotate(-1.5deg); }
  .gallery-thumb svg { width: 60%; height: 70%; }
  .gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .gallery-name { display: none; }
  
  /* ---------- taskbar (constant green base) ---------- */
  .taskbar {
    flex: none;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 46px;
    padding: 0 18px;
    background: var(--sage);
    border-top: 2.5px solid var(--ink);
    font-size: 19px;
    z-index: 20;
  }
  .taskbar-msg {
    flex: 1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3c4a2c;
  }
  .taskbar-clock {
    background: var(--cream);
    border: 2px solid var(--ink);
    border-radius: 3px;
    padding: 1px 10px;
  }
  
  /* ---------- responsive ---------- */
  @media (max-width: 900px) {
    body { overflow: auto; overflow-x: hidden; }
    .desktop { height: auto; min-height: 100dvh; }
    .stage {
      grid-template-columns: 1fr;
      gap: 10px;
      padding: 60px 12px 16px;
      overflow: visible;
    }
  
    /* all eight icons live at the top, like a phone home screen */
    .icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; order: 1; }
    .nav-icon { font-size: 14px; gap: 2px; padding: 6px 2px; min-width: 0; }
    .nav-icon svg { width: 44px; height: 56px; }
    .icon-label {
      white-space: normal;
      text-align: center;
      line-height: 1.15;
      overflow-wrap: anywhere;
      max-width: 100%;
    }
    .shortcut-col {
      order: 2;
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 4px;
      padding: 0;
    }
    .shortcut svg { width: 44px; height: 56px; }
    .shortcut .icon-label { font-size: 14px; }
  
    /* one natural page scroll — no nested scroll areas */
    .window-zone { order: 3; height: auto; }
    .os-window { max-height: none; box-shadow: 3px 3px 0 rgba(26, 26, 26, .85); scroll-margin-top: 62px; }
    .os-window.maximized { position: relative; }
    .win-body { padding: 18px 16px; }
    .win-body, .scroll-list { max-height: none; overflow-y: visible; }
  
    /* comfier touch targets */
    .dot { width: 17px; height: 17px; }
    .titlebar { padding: 10px 14px; }
    .proj-head { padding: 14px 4px; }
    .proj-detail { padding: 2px 4px 16px 14px; }
    .retro-btn { padding: 8px 18px; }
  
    /* mascot tucks in above the taskbar instead of floating over content */
    .plug-bunny {
      position: static;
      order: 4;
      display: block;
      width: 132px;
      margin: 2px auto 0;
    }
  
    .contact-body { flex-direction: column; }
    .contact-bunny { align-self: center; margin-top: 0; width: 100px; }
  
    .places-body { flex-direction: column; align-items: center; }
    #globeCanvas { width: min(260px, 72vw); height: auto; aspect-ratio: 1; }
    .ticker-wrap { border-left: none; border-top: 2px dashed var(--ink); padding: 12px 0 0; width: 100%; }
    .ticker { max-height: 180px; }
  
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px 14px 16px; }
    .gallery-name { font-size: 12px; }
  
    .taskbar {
      position: sticky;
      bottom: 0;
      font-size: 16px;
      gap: 10px;
      padding: 0 12px;
    }
    .mood-toggle { top: 10px; right: 12px; width: 40px; height: 40px; }
  }
  
  @media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .home-body h1, .about-body h2, .contact-left h2 { font-size: 26px; }
    .xp-top { flex-direction: column; gap: 0; }
    .taskbar-brand { display: none; }
  }

  /* ---------- hinna bot window ---------- */
  .bot-log {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 20px;
  }
  .bot-msg {
    max-width: 82%;
    font-size: 18px;
    line-height: 1.3;
    padding: 8px 12px;
    border: 2px solid var(--ink);
    border-radius: 4px;
    box-shadow: 2.5px 2.5px 0 rgba(26, 26, 26, .8);
    white-space: pre-wrap;
    word-break: break-word;
  }
  .bot-msg.from-bot { align-self: flex-start; background: #fff; }
  .bot-msg.from-user { align-self: flex-end; background: var(--sky); }
  .bot-msg.typing { color: #888; font-style: italic; box-shadow: none; }
  
  .bot-input {
    flex: none;
    display: flex;
    gap: 10px;
    padding: 12px 20px 16px;
    border-top: 2px dashed var(--ink);
    background: #f6f4e4;
  }
  .bot-input input {
    flex: 1;
    min-width: 0;
    font-family: var(--font-pixel);
    font-size: 19px;
    text-transform: lowercase;
    background: #fff;
    color: var(--ink);
    border: 2px solid var(--ink);
    border-radius: 3px;
    box-shadow: inset 2px 2px 0 rgba(26, 26, 26, .15);
    padding: 6px 10px;
  }
  .bot-input input:focus { outline: none; background: var(--sage-soft); }
  .bot-input .retro-btn { flex: none; font-size: 17px; padding: 6px 14px; }
