/* ==========================================
   ENGINEERING DESK — DEVELOPER JOURNAL POPUP
   Krishna Sahoo Portfolio
   ========================================== */

/* App Wrapper Scaling & Blur */
#app-wrapper {
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease, opacity 0.45s ease;
  transform-origin: center center;
}

#app-wrapper.journal-open {
  transform: scale(0.98);
  filter: blur(8px) grayscale(10%);
  opacity: 0.85;
  pointer-events: none;
}

body.journal-modal-active {
  overflow: hidden !important;
  touch-action: none;
}

/* Modal Overlay Container */
.desk-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s ease;
  padding: 20px;
}

.desk-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Main Popup Window Card (Hero Dual-Theme Synergy) */
.desk-popup-card {
  width: 95vw;
  height: 92vh;
  max-width: 1680px;
  max-height: 1050px;
  background: lab(96.69% 0.14 4.91); /* Exact off-white hero shade #F7F7F5 */
  border-radius: 32px;
  border: 1px solid rgba(16, 185, 129, 0.18);
  box-shadow: 0 30px 90px -15px rgba(0, 0, 0, 0.3), 0 10px 40px -10px rgba(16, 185, 129, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.96);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Subtle Sketch Noise Texture (Matches Hero Body) */
.desk-popup-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 250 250' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

.desk-modal-backdrop.active .desk-popup-card {
  transform: scale(1);
}

/* Top Close Button (Hero Dark Theme Glass) */
.desk-close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 100;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #F3F4F6;
  transition: transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.desk-close-btn:hover {
  transform: scale(1.08) rotate(90deg);
  background: #10B981;
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.5);
}

/* Two Column Main Layout (Default: 70% Canvas + 30% Preview) */
.desk-layout-grid {
  display: grid;
  grid-template-columns: 70% 30%;
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Interactive Resizer Splitter Handle */
.desk-resizer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 70%;
  width: 12px;
  margin-left: -6px;
  z-index: 50;
  cursor: col-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.desk-resizer::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(16, 185, 129, 0.18);
  transition: background-color 0.2s ease, width 0.2s ease, box-shadow 0.2s ease;
}

.desk-resizer:hover::after,
.desk-resizer.resizing::after {
  background: #10B981;
  width: 3px;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.resizer-handle-pill {
  width: 14px;
  height: 38px;
  background: #FFFFFF;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  z-index: 51;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
  opacity: 0.75;
  transition: all 0.2s ease;
}

.desk-resizer:hover .resizer-handle-pill,
.desk-resizer.resizing .resizer-handle-pill {
  opacity: 1;
  border-color: #10B981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transform: scale(1.1);
}

.resizer-handle-pill span {
  width: 2px;
  height: 12px;
  background: #10B981;
  border-radius: 1px;
}

/* ==========================================
   COLUMN 1: SIDEBAR (22%)
   ========================================== */
.desk-sidebar {
  background: #FCFDFB;
  border-right: 1px solid rgba(16, 185, 129, 0.08);
  padding: 20px 16px 16px 20px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  user-select: none;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.desk-sidebar::-webkit-scrollbar {
  display: none;
}

.desk-journal-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.desk-journal-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ECFDF5;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10B981;
  flex-shrink: 0;
}

.desk-journal-title-box h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 4px 0;
  letter-spacing: -0.3px;
}

.desk-journal-title-box p {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.45;
}

/* Navigation List */
.desk-nav-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.desk-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.desk-nav-item:hover {
  background: #F3F4F6;
  color: #1F2937;
}

.desk-nav-item.active {
  background: #ECFDF5;
  color: #047857;
  font-weight: 600;
  border-color: rgba(16, 185, 129, 0.18);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.06);
}

.desk-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.desk-nav-icon {
  font-size: 15px;
  color: #6B7280;
  display: flex;
  align-items: center;
}

.desk-nav-item.active .desk-nav-icon {
  color: #10B981;
}

.desk-nav-badge {
  background: #F3F4F6;
  color: #6B7280;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.desk-nav-item.active .desk-nav-badge {
  background: #D1FAE5;
  color: #047857;
}

/* Pinned Thought Card */
.desk-pinned-thought {
  background: #F0FDF4;
  border: 1px solid rgba(16, 185, 129, 0.16);
  border-radius: 16px;
  padding: 16px;
  margin-top: auto;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
}

.pinned-thought-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.pinned-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
}

.pinned-label {
  font-size: 12px;
  font-weight: 600;
  color: #065F46;
}

.pinned-quote {
  font-size: 12.5px;
  line-height: 1.45;
  color: #1F2937;
  margin: 0 0 6px 0;
  font-style: italic;
}

.pinned-author {
  font-size: 11px;
  font-weight: 600;
  color: #10B981;
  margin: 0;
  text-align: right;
}

/* Sidebar Search Box */
.desk-search-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.09);
  border-radius: 12px;
  padding: 9px 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.desk-search-wrapper:focus-within {
  border-color: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.desk-search-icon {
  color: #9CA3AF;
  font-size: 14px;
  display: flex;
}

.desk-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  color: #1F2937;
}

.desk-search-input::placeholder {
  color: #9CA3AF;
}

.desk-kbd-badge {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 600;
  color: #6B7280;
  padding: 2px 6px;
}

/* ==========================================
   COLUMN 2: CANVAS AREA (Expanded Left & Middle)
   ========================================== */
.desk-canvas-container {
  background: lab(96.69% 0.14 4.91); /* Exact off-white hero shade #F7F7F5 */
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  height: 100%;
}

/* Header inside Canvas */
.desk-canvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 14px 28px;
  z-index: 20;
  flex-shrink: 0;
}

.desk-title-group h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 4px 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Underlined word "live" */
.live-accent {
  position: relative;
  color: #1F2937;
  display: inline-block;
}

.live-accent::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M0 12 Q 25 2, 50 12 T 100 12' stroke='%2310B981' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center/contain;
}

.desk-title-group p {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
}

/* Top Filter Pills */
.desk-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  justify-content: flex-end;
}

.filter-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  color: #4B5563;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.filter-pill:hover {
  border-color: #10B981;
  color: #10B981;
  background: #ECFDF5;
}

.filter-pill.active {
  background: #D1FAE5;
  color: #047857;
  border-color: #A7F3D0;
  font-weight: 600;
}

.filter-options-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-options-btn:hover {
  border-color: #10B981;
  color: #10B981;
}

/* Engineering Desk Surface (Viewport) */
.desk-canvas-surface {
  flex: 1;
  margin: 0 24px 10px 24px;
  border-radius: 24px;
  background-color: #F4F4F1; /* Exact matching off-white surface */
  background-image: radial-gradient(rgba(16, 185, 129, 0.18) 1.2px, transparent 1.2px);
  background-size: 24px 24px;
  border: 1px solid rgba(16, 185, 129, 0.12);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
  position: relative;
  overflow: hidden;
  user-select: none;
  cursor: grab;
}

.desk-canvas-surface.panning {
  cursor: grabbing !important;
}

/* World Container for Pan & Zoom */
.desk-canvas-world {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

/* Floating Zoom & Pan Control Bar */
.canvas-controls-bar {
  position: absolute;
  bottom: 18px;
  left: 20px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 4px;
  background: #FFFFFF;
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 20px;
  padding: 4px 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  user-select: none;
}

.zoom-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: #ECFDF5;
  color: #10B981;
}

.zoom-level {
  font-size: 11.5px;
  font-weight: 600;
  color: #047857;
  padding: 0 6px;
  cursor: pointer;
  min-width: 42px;
  text-align: center;
}

.zoom-level:hover {
  color: #10B981;
}

/* Desk Marginalia Doodles */
.doodle-annotation {
  position: absolute;
  font-family: 'Caveat', 'Comic Sans MS', cursive, sans-serif;
  font-size: 16px;
  color: #059669;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.85;
}

.doodle-top-right {
  top: 14px;
  right: 130px;
}

.doodle-middle-right {
  top: 52%;
  right: 170px;
}

.doodle-plant {
  bottom: 12px;
  right: 18px;
  width: 60px;
  height: 110px;
}

/* Background SVG Doodles & Desk Marginalia */
.desk-doodle-svg {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.desk-doodle-svg:hover {
  opacity: 1;
}

.doodle-coffee {
  top: 15px;
  left: 740px;
  width: 85px;
  height: 85px;
}

.doodle-laptop {
  top: 180px;
  left: 1010px;
  width: 130px;
  height: 110px;
}

.doodle-ai-nn {
  top: 380px;
  left: 1020px;
  width: 130px;
  height: 100px;
}

.doodle-bulb {
  top: 15px;
  left: 410px;
  width: 55px;
  height: 75px;
}

.doodle-monstera {
  top: 360px;
  left: 240px;
  width: 75px;
  height: 130px;
}

.doodle-ruler {
  top: 15px;
  left: 200px;
  width: 60px;
  height: 40px;
}

.doodle-target {
  top: 380px;
  left: 630px;
  width: 65px;
  height: 65px;
}

/* ==========================================
   HANDCRAFTED CARDS ON CANVAS
   ========================================== */
.desk-card {
  position: absolute;
  cursor: grab;
  user-select: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.05));
  will-change: transform;
}

.desk-card:hover {
  transform: scale(1.03) translateY(-6px) rotate(0deg) !important;
  z-index: 50 !important;
  filter: drop-shadow(0 16px 32px rgba(16, 185, 129, 0.18));
}

.desk-card:active,
.desk-card.dragging {
  cursor: grabbing !important;
  z-index: 60 !important;
  transition: none !important;
}

.desk-card.selected {
  box-shadow: 0 0 0 2px #10B981, 0 16px 36px rgba(16, 185, 129, 0.22) !important;
}

/* Push Pin Elements & Color Variations */
.push-pin {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  background: #10B981;
  border-radius: 50%;
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.3), 0 3px 8px rgba(0, 0, 0, 0.25);
  z-index: 10;
}

.push-pin.pin-purple { background: #A855F7; }
.push-pin.pin-coral { background: #F43F5E; }
.push-pin.pin-teal { background: #0EA5E9; }
.push-pin.pin-red { background: #EF4444; }

.push-pin::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
}

.desk-card:hover .push-pin {
  animation: pinWiggle 0.4s ease infinite alternate;
}

@keyframes pinWiggle {
  0% { transform: translateX(-50%) rotate(-8deg); }
  100% { transform: translateX(-50%) rotate(8deg); }
}

/* Metallic Paper Clip Elements */
.paper-clip {
  position: absolute;
  top: -12px;
  right: 20px;
  width: 14px;
  height: 32px;
  border: 2.5px solid #94A3B8;
  border-radius: 10px;
  z-index: 10;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.15);
}

.paper-clip.clip-left {
  right: auto;
  left: 20px;
}

/* Masking Tape Element Variations */
.masking-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 70px;
  height: 20px;
  background: rgba(254, 240, 138, 0.85);
  backdrop-filter: blur(1px);
  border: 1px dashed rgba(234, 179, 8, 0.3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.masking-tape.tape-corner-left {
  top: -8px;
  left: -15px;
  transform: rotate(-35deg);
  width: 55px;
  height: 18px;
}

.masking-tape.tape-corner-right {
  top: -8px;
  right: -15px;
  left: auto;
  transform: rotate(35deg);
  width: 55px;
  height: 18px;
}

.masking-tape.tape-clear {
  background: rgba(243, 244, 246, 0.7);
  border-color: rgba(209, 213, 219, 0.5);
}

/* Staple Mark */
.staple-mark {
  position: absolute;
  top: 8px;
  left: 12px;
  width: 14px;
  height: 3px;
  background: #64748B;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.2);
  transform: rotate(-25deg);
  z-index: 10;
}

/* Dog-Ear Corner Fold */
.card-dog-ear::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 16px 16px;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.06);
}

/* Card Badges */
.card-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 6px;
}

/* ==========================================
   AUTHENTIC PHYSICAL CARD DESIGNS (Compact & Elegant)
   ========================================== */

/* 1. Green Sticky Note */
.card-green-sticky {
  background: #E6F4EA;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 4px;
  padding: 14px 12px 10px 12px;
  width: 175px;
  box-shadow: 0 8px 20px -5px rgba(16, 185, 129, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-green-sticky .card-badge { color: #047857; }
.card-green-sticky h3 { font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 700; color: #1F2937; margin: 0 0 4px 0; line-height: 1.25; }
.card-green-sticky p { font-size: 10.5px; color: #4B5563; margin: 0 0 10px 0; line-height: 1.35; }

.card-footer-meta {
  font-size: 9.5px;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 500;
}

.card-arrow { color: #10B981; font-weight: 700; font-size: 12px; }

/* 2. Notebook Page Tear-Out */
.card-notebook-page {
  background: #FFFFFF;
  border-radius: 3px;
  padding: 12px 12px 10px 24px;
  width: 175px;
  border: 1px solid rgba(0, 0, 0, 0.09);
  position: relative;
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.binder-holes {
  position: absolute;
  left: 6px;
  top: 10px;
  bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.binder-hole {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E5E7EB;
  box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.25);
}

.card-notebook-page .card-badge { color: #10B981; }

.handwritten-text {
  font-family: 'Caveat', 'Comic Sans MS', cursive, sans-serif;
  font-size: 14.5px;
  line-height: 1.3;
  color: #1F2937;
  margin: 0;
}

/* 3. Taped Build Log Card with mini macOS Code Window */
.card-build-log {
  background: #FFFDF7;
  border-radius: 6px;
  border: 1px solid rgba(217, 119, 6, 0.15);
  padding: 12px;
  width: 290px;
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-build-log .card-badge { color: #10B981; }
.card-build-log h3 { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: #1F2937; margin: 0 0 3px 0; line-height: 1.2; }
.card-build-log p { font-size: 10px; color: #6B7280; margin: 0 0 8px 0; line-height: 1.3; }

/* Mini macOS Code Window */
.mini-code-editor {
  background: #111827;
  border-radius: 8px;
  padding: 6px 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  font-family: monospace;
  font-size: 8.5px;
  line-height: 1.3;
}

.mac-traffic-lights { display: flex; gap: 3px; margin-bottom: 5px; }
.mac-dot { width: 5px; height: 5px; border-radius: 50%; }
.mac-dot.red { background: #EF4444; }
.mac-dot.yellow { background: #F59E0B; }
.mac-dot.green { background: #10B981; }

.code-green { color: #A7F3D0; }
.code-purple { color: #C084FC; }
.code-blue { color: #60A5FA; }

/* 4. Polaroid Photo Card */
.card-polaroid {
  background: #FFFFFF;
  border-radius: 3px;
  padding: 6px 6px 10px 6px;
  width: 150px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.polaroid-img-wrapper {
  width: 100%;
  height: 100px;
  border-radius: 2px;
  overflow: hidden;
  background: #E5E7EB;
  margin-bottom: 6px;
}

.polaroid-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.polaroid-caption { font-family: 'Caveat', 'Comic Sans MS', cursive, sans-serif; font-size: 14px; color: #1F2937; text-align: center; margin: 0; }

/* 5. System Design Architecture Sketch (Grid Paper) */
.card-system-sketch {
  background: #FFFFFF;
  background-image: linear-gradient(rgba(16, 185, 129, 0.09) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 185, 129, 0.09) 1px, transparent 1px);
  background-size: 12px 12px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 10px 12px;
  width: 215px;
  box-shadow: 0 10px 22px -6px rgba(16, 185, 129, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sketch-header { font-size: 10px; font-weight: 700; color: #065F46; text-align: center; margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.sketch-svg-diagram { width: 100%; height: 75px; }

/* 6. Purple / Lavender Sticky Note */
.card-purple-sticky {
  background: #F3E8FF;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 4px;
  padding: 14px 12px 10px 12px;
  width: 170px;
  box-shadow: 0 10px 22px -6px rgba(168, 85, 247, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-purple-sticky .card-badge { color: #7E22CE; }
.card-purple-sticky h3 { font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 700; color: #1F2937; margin: 0 0 3px 0; line-height: 1.25; }
.card-purple-sticky p { font-size: 10px; color: #4B5563; margin: 0 0 8px 0; line-height: 1.35; }

/* 7. Yellow Sticky Note with Masking Tape */
.card-yellow-sticky {
  background: #FFF9DB;
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: 4px;
  padding: 14px 12px 10px 12px;
  width: 170px;
  box-shadow: 0 10px 22px -6px rgba(234, 179, 8, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-yellow-sticky .card-badge { color: #B45309; }
.card-yellow-sticky h3 { font-family: 'Outfit', sans-serif; font-size: 13.5px; font-weight: 700; color: #1F2937; margin: 0 0 3px 0; line-height: 1.25; }
.card-yellow-sticky p { font-size: 10px; color: #4B5563; margin: 0 0 8px 0; line-height: 1.35; }

/* 8. Sky Blue Sticky Note */
.card-blue-sticky {
  background: #E0F2FE;
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: 4px;
  padding: 12px;
  width: 275px;
  display: grid;
  grid-template-columns: 1fr 85px;
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 22px -6px rgba(14, 165, 233, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-blue-sticky .card-badge { color: #0284C7; }
.card-blue-sticky h3 { font-family: 'Outfit', sans-serif; font-size: 13px; font-weight: 700; color: #1F2937; margin: 0 0 3px 0; line-height: 1.25; }
.card-blue-sticky p { font-size: 10px; color: #4B5563; margin: 0 0 8px 0; line-height: 1.35; }
.api-doodle-svg { width: 85px; height: 65px; }

/* 9. Coral Pink Quote Card (Torn Deckle Edge) */
.card-coral-sticky {
  background: #FFE4E6;
  border: 1px solid rgba(244, 63, 94, 0.25);
  border-radius: 4px;
  padding: 12px;
  width: 165px;
  box-shadow: 0 10px 22px -6px rgba(244, 63, 94, 0.15), 0 2px 6px rgba(0, 0, 0, 0.04);
  clip-path: polygon(0% 4px, 5% 0px, 10% 4px, 15% 0px, 20% 4px, 25% 0px, 30% 4px, 35% 0px, 40% 4px, 45% 0px, 50% 4px, 55% 0px, 60% 4px, 65% 0px, 70% 4px, 75% 0px, 80% 4px, 85% 0px, 90% 4px, 95% 0px, 100% 4px, 100% calc(100% - 4px), 95% 100%, 90% calc(100% - 4px), 85% 100%, 80% calc(100% - 4px), 75% 100%, 70% calc(100% - 4px), 65% 100%, 60% calc(100% - 4px), 55% 100%, 50% calc(100% - 4px), 45% 100%, 40% calc(100% - 4px), 35% 100%, 30% calc(100% - 4px), 25% 100%, 20% calc(100% - 4px), 15% 100%, 10% calc(100% - 4px), 5% 100%, 0% calc(100% - 4px));
}

.quote-mark { font-family: Georgia, serif; font-size: 24px; color: #E11D48; line-height: 1; margin-bottom: -8px; }

/* 10. Ruled Index Card (Growth Graph) */
.card-index-ruled {
  background-color: #FFFFFF;
  background-image: repeating-linear-gradient(transparent, transparent 19px, rgba(96, 165, 250, 0.18) 20px);
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-top: 3px solid #EF4444; /* Red top index margin line */
  padding: 12px;
  width: 275px;
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  align-items: center;
  box-shadow: 0 10px 22px -6px rgba(0, 0, 0, 0.09), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-index-ruled .card-badge { color: #DC2626; }
.graph-doodle-svg { width: 110px; height: 75px; }

.card-growth-graph .card-badge {
  color: #10B981;
}

.card-growth-graph h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 14.5px;
  font-weight: 700;
  color: #1F2937;
  margin: 0 0 4px 0;
  line-height: 1.25;
}

.card-growth-graph p {
  font-size: 11px;
  color: #6B7280;
  margin: 0 0 10px 0;
  line-height: 1.35;
}

.graph-doodle-svg {
  width: 110px;
  height: 75px;
}

/* ==========================================
   BOTTOM TIMELINE & FLOATING BUTTON
   ========================================== */
.desk-timeline-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 6px 16px 16px 16px;
  z-index: 20;
  flex-shrink: 0;
}

.timeline-year {
  font-size: 13px;
  font-weight: 600;
  color: #9CA3AF;
  cursor: pointer;
  transition: color 0.2s ease;
  position: relative;
}

.timeline-year:hover {
  color: #10B981;
}

.timeline-year.active {
  color: #047857;
  font-weight: 700;
}

.timeline-track {
  width: 60px;
  height: 2px;
  background: repeating-linear-gradient(90deg, #D1D5DB, #D1D5DB 4px, transparent 4px, transparent 8px);
}

.active-year-dot {
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Floating Action Button */
.desk-floating-btn {
  position: absolute;
  bottom: 18px;
  right: 24px;
  z-index: 50;
  background: #10B981;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.desk-floating-btn:hover {
  background: #059669;
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.45);
}

.desk-floating-btn .plus-icon {
  font-size: 16px;
  transition: transform 0.3s ease;
}

.desk-floating-btn:hover .plus-icon {
  transform: rotate(90deg);
}

/* ==========================================
   COLUMN 3: ARTICLE PREVIEW PANEL (22%)
   ========================================== */
/* ==========================================
   COLUMN 3: ARTICLE PREVIEW PANEL (Sleek Hero Dark Theme)
   ========================================== */
.desk-preview-panel {
  background-color: #262626;
  background-image: 
    linear-gradient(135deg, var(--bg-dark-start, #3a3a3a) 0%, var(--bg-dark-end, #1a1a1a) 100%),
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: cover, 45px 45px, 45px 45px;
  background-position: center;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  position: relative;
  color: #E5E7EB;
}

/* Custom Sleek Dark Scrollbar */
.desk-preview-panel::-webkit-scrollbar {
  width: 6px;
}
.desk-preview-panel::-webkit-scrollbar-track {
  background: transparent;
}
.desk-preview-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}
.desk-preview-panel::-webkit-scrollbar-thumb:hover {
  background: #10B981;
}

.preview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #9CA3AF;
  padding: 20px;
}

.empty-state-icon {
  width: auto;
  height: auto;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  padding: 0;
}

.empty-state-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: brightness(0) invert(0.85);
  opacity: 0.8;
  transition: all 0.3s ease;
}

.empty-state-logo-img:hover {
  opacity: 1;
  filter: brightness(0) invert(1);
  transform: scale(1.06);
}

.preview-empty-state h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16.5px;
  font-weight: 600;
  color: #F9FAFB;
  margin: 0 0 8px 0;
}

.preview-empty-state p {
  font-size: 12.5px;
  color: #9CA3AF;
  margin: 0;
  line-height: 1.5;
}

/* Active Preview State */
.preview-content-box {
  display: none;
  animation: fadeIn 0.3s ease;
}

.preview-content-box.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.preview-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.preview-category-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.3);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-date {
  font-size: 11.5px;
  color: #9CA3AF;
}

.preview-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #F9FAFB;
  line-height: 1.3;
  margin: 0 0 14px 0;
  letter-spacing: -0.3px;
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #9CA3AF;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #D1D5DB;
  margin-bottom: 20px;
}

/* Inline Article Content Styling in Dark Hero Mode */
.preview-body-content {
  font-size: 13.5px;
  line-height: 1.7;
  color: #D1D5DB;
}

.preview-body-content p {
  margin-bottom: 16px;
}

.preview-body-content p.article-lead {
  font-size: 15px;
  font-weight: 500;
  color: #F3F4F6;
  line-height: 1.65;
}

.preview-body-content h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  color: #F9FAFB;
  margin: 24px 0 10px 0;
}

.preview-body-content blockquote,
.preview-body-content .article-quote {
  border-left: 3px solid #10B981;
  background: rgba(16, 185, 129, 0.1);
  padding: 12px 16px;
  border-radius: 0 10px 10px 0;
  font-style: italic;
  color: #6EE7B7;
  margin: 18px 0;
  font-size: 14px;
}

.preview-body-content ul,
.preview-body-content ol {
  padding-left: 20px;
  margin-bottom: 18px;
  color: #D1D5DB;
}

.preview-body-content li {
  margin-bottom: 8px;
}

.preview-body-content pre,
.article-code-block pre {
  background: #0D1117;
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: #A7F3D0;
  padding: 14px 16px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  margin: 16px 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.preview-body-content code {
  background: rgba(255, 255, 255, 0.1);
  color: #A7F3D0;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.preview-btn-primary {
  width: 100%;
  background: #10B981;
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.preview-btn-primary:hover {
  background: #059669;
  transform: translateY(-2px);
}

/* Fullscreen Reader Modal */
.journal-reader-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: center;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 40px 20px;
}

.journal-reader-overlay.active {
  opacity: 1;
  visibility: visible;
}

.journal-reader-container {
  max-width: 760px;
  width: 100%;
  background: #FFFFFF;
  padding: 40px;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.06);
  position: relative;
}

.reader-close-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F3F4F6;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4B5563;
  font-size: 18px;
}

.reader-body {
  font-size: 16px;
  line-height: 1.75;
  color: #1F2937;
}

.reader-body h1, .reader-body h2, .reader-body h3 {
  font-family: 'Outfit', sans-serif;
  color: #111827;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.reader-body pre {
  background: #111827;
  color: #A7F3D0;
  padding: 18px;
  border-radius: 12px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 14px;
}

/* ==========================================
   RESPONSIVE SCALING & BREAKPOINTS
   ========================================== */
@media (max-width: 1200px) {
  .desk-layout-grid {
    grid-template-columns: 24% 76%;
  }
  .desk-preview-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .desk-popup-card {
    width: 98vw;
    height: 96vh;
    border-radius: 20px;
  }
  .desk-layout-grid {
    grid-template-columns: 1fr;
  }
  .desk-sidebar {
    display: none;
  }
  .desk-canvas-header {
    padding: 16px;
  }
  .desk-canvas-surface {
    margin: 0 12px 10px 12px;
  }
}
