/* =============================================
     AFFECTIONNER.ME — EDIT GUIDE
     ─────────────────────────────────────────────
     Colors:
       --coral  #F4614A  primary accent
       --blue   #3EC8D4  secondary accent
       --blush  #F2B8B0  soft pink
       --cream  #FDF0EC  background
       --dark   #1A1A1A  text
       --muted  #7A6A66  secondary text
     ============================================= */

  :root {
    --coral:  #F4614A;
    --blue:   #3EC8D4;
    --blush:  #F2B8B0;
    --cream:  #FDF0EC;
    --dark:   #1A1A1A;
    --muted:  #7A6A66;
    --wc:     #E8E2DE;
    --wb:     #C8BDB9;
    --yellow: #FFD87A;
    --yb:     #C4A83A;
  }

  * { box-sizing: border-box; margin: 0; padding: 0; }

  body {
    background: var(--cream);
    font-family: 'Courier New', Courier, monospace;
    color: var(--dark);
  }

  /* ─── UTILITIES ─── */
  .sec-label {
    padding: 9px 40px;
    font-size: 9px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(242,184,176,.1);
    border-top: 1px solid var(--blush);
    border-bottom: 1px solid var(--blush);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .sec-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--blush);
  }
  .section {
    padding: 36px 40px;
    border-bottom: 1px solid var(--blush);
  }
  .section-title {
    font-size: 10px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 20px;
  }

  /* ─── HERO ─── */
  .hero {
    padding: 48px 40px 40px;
    border-bottom: 1px solid var(--blush);
    position: relative;
    overflow: hidden;
  }
  .hero-deco {
    position: absolute;
    right: 28px;
    top: 28px;
    font-size: 9px;
    color: rgba(26,26,26,.15);
    text-align: right;
    line-height: 1.8;
    pointer-events: none;
  }
  .hero-url {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: .12em;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .pulse {
    width: 6px; height: 6px;
    background: var(--coral);
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
  }
  @keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

  .hero-name {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: 10px;
  }
  .hero-headline {
    font-size: 54px;
    font-weight: bold;
    color: var(--dark);
    line-height: 1.0;
    letter-spacing: -.02em;
    margin-bottom: 6px;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
  }
  .hero-headline .br { color: var(--blue); font-size: 48px; }
  .cursor {
    display: inline-block;
    width: 3px; height: 50px;
    background: var(--coral);
    margin-left: 5px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
  }
  @keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

  .hero-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 20px;
    margin-bottom: 28px;
  }
  .pill {
    font-size: 11px;
    padding: 4px 13px;
    border-radius: 20px;
    border: 1px solid;
    font-family: 'Courier New', monospace;
    cursor: default;
    transition: transform .15s;
  }
  .pill:hover { transform: translateY(-1px); }
  .pill-coral { background: rgba(244,97,74,.08);  color: #9A2C18; border-color: rgba(244,97,74,.35); }
  .pill-blue  { background: rgba(62,200,212,.08);  color: #1A7A82; border-color: rgba(62,200,212,.4); }
  .pill-blush { background: rgba(242,184,176,.22); color: #7A3830; border-color: rgba(242,184,176,.7); }
  .pill-dark  { background: rgba(26,26,26,.05);    color: var(--dark); border-color: rgba(26,26,26,.2); }

  .hero-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .btn {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 9px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid;
    transition: all .15s;
    text-decoration: none;
    display: inline-block;
  }
  .btn-primary   { background: var(--coral); color: white; border-color: var(--coral); }
  .btn-primary:hover { background: #d94d38; }
  .btn-secondary { background: transparent; color: var(--dark); border-color: rgba(26,26,26,.25); }
  .btn-secondary:hover { background: rgba(26,26,26,.05); }
  .hero-email { font-size: 10px; color: var(--muted); }

  /* ─── DESKTOP ─── */
  .desktop {
    display: flex;
    height: 520px;
    position: relative;
    overflow: hidden;
  }
  .sidebar {
    width: 100%;
    background: transparent;
    border: none;
    padding: 16px 16px 12px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    z-index: 20;
    overflow-x: auto;
  }
  .sidebar-left {
    /* single top bar */
  }
  .folder-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 8px;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 8px;
    margin: 0 2px;
    transition: background .15s, transform .12s;
    font-family: 'Courier New', monospace;
    min-width: 68px;
  }
  .folder-btn:hover { background: rgba(244,97,74,.12); transform: translateY(-2px); }
  .folder-btn.active { background: rgba(244,97,74,.22); }
  .folder-icon { width: 48px; height: 38px; }
  .folder-icon svg { width: 100%; height: 100%; }
  .folder-label { font-size: 10px; font-weight: bold; color: var(--dark); text-align: center; line-height: 1.3; max-width: 72px; }

  .desktop { flex-direction: column; }
  .desktop-area { width: 100%; min-height: 0; height: auto; position: relative; overflow: visible; border-top: 1px solid var(--blush); margin-top: 4px; }
  .wallpaper-txt {
    position: absolute;
    bottom: 10px; right: 14px;
    font-size: 9px;
    color: rgba(26,26,26,.13);
    text-align: right;
    line-height: 1.5;
    pointer-events: none;
  }

  /* ─── WINDOWS ─── */
  .win {
    position: absolute;
    background: white;
    border: 1px solid var(--wb);
    border-radius: 6px;
    box-shadow: 6px 10px 28px rgba(0,0,0,.15);
    width: 305px;
    display: none;
    z-index: 5;
  }
  .win.show { display: block; }
  .win-chrome {
    background: var(--wc);
    border-bottom: 1px solid var(--wb);
    border-radius: 5px 5px 0 0;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    user-select: none;
    cursor: grab;
  }
  .win-chrome:active { cursor: grabbing; }
  .wbtn { width: 11px; height: 11px; border-radius: 50%; border: none; cursor: pointer; flex-shrink: 0; }
  .wbtn-close { background: var(--coral); }
  .wbtn-min   { background: var(--yellow); }
  .wbtn-zoom  { background: var(--blue); }
  .win-title  { font-size: 10px; color: var(--muted); flex: 1; text-align: center; font-family: 'Courier New', monospace; }

  .win-body { padding: 12px 14px 14px; max-height: 290px; overflow-y: auto; }
  .win-type { font-size: 8px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; }
  .win-heading { font-size: 13px; color: var(--dark); font-weight: bold; margin-bottom: 6px; }
  .win-desc { font-size: 10.5px; color: var(--muted); line-height: 1.6; margin-bottom: 8px; }
  .divider { border: none; border-top: 1px solid var(--blush); margin: 7px 0; }
  .entry { margin-bottom: 7px; }
  .entry-sub  { font-size: 9px; color: var(--coral); margin-bottom: 1px; }
  .entry-title { font-size: 10.5px; font-weight: bold; color: var(--dark); }
  .entry-date { font-size: 9px; color: var(--muted); }
  .entry-body { font-size: 10px; color: #666; line-height: 1.5; margin-top: 2px; }
  .tag-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
  .tag { font-size: 9px; padding: 2px 7px; border-radius: 3px; font-family: 'Courier New', monospace; }
  .tag-c { background: rgba(244,97,74,.1);  color: #9A2C18; border: 1px solid rgba(244,97,74,.28); }
  .tag-b { background: rgba(62,200,212,.1);  color: #1A7A82; border: 1px solid rgba(62,200,212,.3); }
  .tag-p { background: rgba(242,184,176,.22); color: #7A3830; border: 1px solid rgba(242,184,176,.55); }

  /* ─── STICKY NOTE ─── */
  .sticky {
    background: var(--yellow);
    border: 1px solid var(--yb);
    border-radius: 3px;
    padding: 10px 12px;
    font-size: 10px;
    color: #3A2800;
    line-height: 1.6;
    position: absolute;
    z-index: 6;
    cursor: grab;
  }
  .sticky:active { cursor: grabbing; }
  .sticky-header {
    height: 13px;
    background: rgba(0,0,0,.08);
    margin: -10px -12px 8px -12px;
    border-radius: 2px 2px 0 0;
    display: flex;
    align-items: center;
    padding: 0 6px;
  }
  .sticky-dot { width: 7px; height: 7px; background: rgba(0,0,0,.18); border-radius: 50%; }
  .quote-block {
    font-size: 9px;
    font-style: italic;
    color: #6A4E00;
    border-left: 2px solid var(--yb);
    padding-left: 6px;
    margin-top: 6px;
    line-height: 1.5;
  }

  /* ─── SELECTED WORK ─── */
  .work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 14px;
  }
  .work-card {
    background: white;
    border: 1px solid var(--wb);
    border-radius: 6px;
    padding: 16px;
    transition: transform .15s, box-shadow .15s;
    text-decoration: none;
    display: block;
    color: inherit;
  }
  .work-card:hover { transform: translateY(-2px); box-shadow: 4px 8px 20px rgba(0,0,0,.1); }
  .work-card-type { font-size: 8.5px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 5px; }
  .work-card-title { font-size: 13px; font-weight: bold; color: var(--dark); margin-bottom: 3px; line-height: 1.3; }
  .work-card-org   { font-size: 10px; color: var(--coral); margin-bottom: 8px; }
  .work-card-desc  { font-size: 10px; color: var(--muted); line-height: 1.5; }
  .work-card-tag   { display: inline-block; font-size: 8.5px; padding: 2px 7px; border-radius: 3px; margin-top: 10px; background: rgba(62,200,212,.1); color: #1A7A82; border: 1px solid rgba(62,200,212,.3); }
  .work-placeholder {
    border: 1px dashed var(--blush);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
    color: var(--blush);
    font-size: 10px;
    gap: 7px;
    cursor: pointer;
    transition: background .15s;
  }
  .work-placeholder:hover { background: rgba(242,184,176,.1); }

  /* ─── CERTIFICATES ─── */
  .cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
  }
  .cert-card {
    background: white;
    border: 1px solid var(--wb);
    border-radius: 6px;
    padding: 14px;
    display: flex;
    gap: 11px;
    align-items: flex-start;
  }
  .cert-icon {
    width: 30px; height: 30px;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
  }
  .ci-coral { background: rgba(244,97,74,.12); }
  .ci-blue  { background: rgba(62,200,212,.12); }
  .ci-blush { background: rgba(242,184,176,.3); }
  .cert-title  { font-size: 10.5px; font-weight: bold; color: var(--dark); line-height: 1.3; margin-bottom: 2px; }
  .cert-issuer { font-size: 9px; color: var(--coral); margin-bottom: 2px; }
  .cert-date   { font-size: 9px; color: var(--muted); }
  .cert-placeholder {
    border: 1px dashed var(--blush);
    border-radius: 6px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blush);
    font-size: 10px;
    gap: 6px;
    cursor: pointer;
    min-height: 60px;
    transition: background .15s;
  }
  .cert-placeholder:hover { background: rgba(242,184,176,.1); }

  /* ─── GALLERY ─── */
  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .g-slot {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
  }
  .g-slot.featured { grid-column: span 2; grid-row: span 2; }
  .g-inner {
    width: 100%; height: 100%;
    border: 1px dashed var(--blush);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--blush);
    font-size: 9px;
    background: white;
    transition: background .15s;
    cursor: pointer;
  }
  .g-inner:hover { background: rgba(242,184,176,.1); }
  /* When slot has a real image, use this pattern:
     <div class="g-slot featured">
       <img src="your-photo.jpg" alt="Description" style="width:100%;height:100%;object-fit:cover;border-radius:6px;">
     </div>
  */

  /* ─── FOOTER ─── */
  .footer {
    padding: 32px 40px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
  }
  .footer-name { font-size: 18px; font-weight: bold; color: var(--dark); line-height: 1.1; margin-bottom: 4px; }
  .footer-tagline { font-size: 10px; color: var(--muted); }
  .footer-links { display: flex; flex-direction: column; gap: 6px; }
  .footer-link {
    font-size: 10.5px;
    color: var(--dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 7px;
  }
  .footer-link:hover { color: var(--coral); }
  .footer-dot { width: 5px; height: 5px; background: var(--blue); border-radius: 50%; flex-shrink: 0; }
  .footer-copy { font-size: 9px; color: var(--blush); align-self: flex-end; }

  /* ─── MOBILE WINDOW PANEL ───
     On mobile we show a dedicated panel ABOVE the folder bars.
     When a folder is opened its windows appear there, full-width, scrollable.
     The panel is hidden when nothing is open.
  ─── */
  #mobile-panel {
    display: none; /* shown by JS when a window opens on mobile */
    width: 100%;
    background: var(--cream);
    border-bottom: 1px solid var(--blush);
    padding: 10px 12px 12px;
    box-sizing: border-box;
    order: 1; /* sits between top sidebar and desktop-area placeholder */
  }
  #mobile-panel.has-content { display: block; }
  #mobile-panel .win,
  #mobile-panel .img-win {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    display: block !important; /* always visible when inside panel */
  }
  #mobile-panel .img-win img { width: 100%; height: auto; display: block; }
  #mobile-panel .win-body { max-height: none; } /* no scroll cap on mobile */

  /* ─── RESPONSIVE ─── */
  @media (max-width: 768px) {
    /* Hero */
    .hero { padding: 28px 20px; }
    .hero-headline { font-size: 38px; }
    .hero-headline .br { font-size: 34px; }
    .cursor { height: 36px; }
    .hero-roles { gap: 5px; }
    .pill { font-size: 10px; padding: 3px 10px; }
    .hero-cta { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Sections */
    .section { padding: 24px 16px; }
    .sec-label { padding: 8px 16px; }

    /* Desktop: column layout — top sidebar / mobile panel / bottom sidebar */
    .desktop {
      flex-direction: column;
      height: auto;
    }
    /* sidebar already horizontal — just ensure order */
    .sidebar { order: 0; }

    /* Hide the desktop-area on mobile — windows live in #mobile-panel instead */
    .desktop-area { display: none; }

    /* Cards & grids */
    .work-grid { grid-template-columns: 1fr; }
    .cert-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; }

    /* Footer */
    .footer { padding: 24px 16px; flex-direction: column; gap: 16px; }
    .footer-copy { align-self: flex-start; }
  }

  @media (max-width: 400px) {
    .hero-headline { font-size: 30px; }
    .hero-headline .br { font-size: 27px; }
    .cursor { height: 28px; }
    .pill { font-size: 9px; padding: 2px 8px; }
  }

  /* ─── IMAGE WINDOWS ─── */
  .img-win {
    position: absolute;
    background: white;
    border: 1px solid var(--wb);
    border-radius: 6px;
    box-shadow: 6px 10px 28px rgba(0,0,0,.15);
    width: 200px;
    display: none;
    z-index: 5;
    overflow: hidden;
  }
  .img-win.show { display: block; }
  .img-win .win-chrome { border-radius: 5px 5px 0 0; }
  .img-win img {
    width: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
  }