/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --lavender:       #c8b4e8;
  --lavender-light: #e8dcf5;
  --lavender-deep:  #9d7ec9;
  --lavender-pale:  #f3eeff;
  --blush:          #f0d9ea;
  --wood:           #d4a97a;
  --bg:             #1a1625;
  --text:           #2d2040;
  --text-soft:      #7a6a9a;
  --white:          #ffffff;
  --radius-sm:      8px;
  --radius-md:      16px;
  --radius-lg:      24px;
  --font-display:   'Quicksand', sans-serif;
  --font-body:      'Nunito', sans-serif;
  --ease-spring:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

/* ─────────────────────────────────────────
   CANVAS
───────────────────────────────────────── */
#threeCanvas {
  display: block;
  width: 100%;
  height: 100%;
  position: fixed;
  inset: 0;
  cursor: grab;
}
#threeCanvas:active { cursor: grabbing; }
#threeCanvas.pointer { cursor: pointer; }

/* ─────────────────────────────────────────
   LOADER
───────────────────────────────────────── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--lavender-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.7s var(--ease-smooth), visibility 0.7s;
}
#loader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  position: relative;
}

/* Animated blob */
.loader-blob {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 35% 35%, var(--lavender-light), var(--lavender-deep));
  border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%;
  animation: blobMorph 3s ease-in-out infinite, blobPulse 2s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(157, 126, 201, 0.4);
}

@keyframes blobMorph {
  0%, 100% { border-radius: 60% 40% 55% 45% / 45% 55% 40% 60%; }
  25%       { border-radius: 40% 60% 45% 55% / 55% 40% 60% 45%; }
  50%       { border-radius: 50% 50% 40% 60% / 40% 60% 50% 50%; }
  75%       { border-radius: 45% 55% 60% 40% / 60% 40% 55% 45%; }
}
@keyframes blobPulse {
  0%, 100% { transform: scale(1);    }
  50%       { transform: scale(1.08); }
}

/* Spinning ring */
.loader-ring {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 118px;
  height: 118px;
  border-radius: 50%;
  border: 2px dashed var(--lavender);
  animation: spin 8s linear infinite;
  opacity: 0.6;
}
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* Label */
.loader-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: var(--lavender-deep);
  letter-spacing: 0.04em;
}
.dots::after {
  content: '';
  animation: dotAnim 1.4s steps(4, end) infinite;
}
@keyframes dotAnim {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
}

/* Progress bar */
.progress-track {
  width: 180px;
  height: 4px;
  background: var(--lavender-light);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--lavender), var(--lavender-deep));
  border-radius: 99px;
  transition: width 0.3s var(--ease-smooth);
}

/* ─────────────────────────────────────────
   CLICK INDICATOR
───────────────────────────────────────── */
.click-indicator {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
  transition: opacity 0.5s;
}
.click-indicator.hidden { opacity: 0; }

.click-arrow {
  font-size: 28px;
  color: #ffffff;
  animation: bounceDown 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(160, 120, 255, 0.9));
}
.click-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(100, 60, 200, 0.5);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 99px;
  border: 1px solid rgba(200, 160, 255, 0.4);
  white-space: nowrap;
}
@keyframes bounceDown {
  0%, 100% { transform: translateY(0);    }
  50%       { transform: translateY(10px); }
}
.hint {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: rgba(130, 80, 220, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid rgba(180, 140, 255, 0.5);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth);
  white-space: nowrap;
  animation: hintPulse 2s ease-in-out infinite;
  box-shadow: 0 0 24px rgba(130, 80, 220, 0.4);
}
@keyframes hintPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(130, 80, 220, 0.4); }
  50%       { box-shadow: 0 0 40px rgba(130, 80, 220, 0.7); }
}
.hint.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
}

/* ─────────────────────────────────────────
   PROJECTS OVERLAY
───────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 22, 37, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s;
}
.overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-screen {
  width: min(900px, 92vw);
  max-height: 82vh;
  background: var(--lavender-pale);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(157, 126, 201, 0.2),
    0 32px 80px rgba(26, 22, 37, 0.45),
    0 0 60px rgba(157, 126, 201, 0.15);
  display: flex;
  flex-direction: column;
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-spring);
}
.overlay:not(.hidden) .overlay-screen { transform: scale(1); }

/* Top bar */
.screen-topbar {
  background: var(--lavender-light);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(157, 126, 201, 0.2);
  flex-shrink: 0;
}
.topbar-dots { display: flex; gap: 7px; align-items: center; }
.dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.dot.red    { background: #ff6058; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.topbar-title {
  flex: 1;
  text-align: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.05em;
}
.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-soft);
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: background 0.2s, color 0.2s;
}
.close-btn:hover { background: rgba(157, 126, 201, 0.2); color: var(--text); }

/* Body */
.screen-body {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.screen-body::-webkit-scrollbar { width: 5px; }
.screen-body::-webkit-scrollbar-track { background: transparent; }
.screen-body::-webkit-scrollbar-thumb { background: var(--lavender); border-radius: 99px; }

/* Tabs */
.project-tabs {
  display: flex;
  gap: 8px;
}
.tab {
  background: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  padding: 6px 16px;
  border-radius: 99px;
  transition: all 0.2s var(--ease-smooth);
  letter-spacing: 0.03em;
}
.tab:hover { border-color: var(--lavender); color: var(--text); }
.tab.active {
  background: var(--lavender-deep);
  border-color: var(--lavender-deep);
  color: var(--white);
}

/* Project cards grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.project-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid rgba(157, 126, 201, 0.15);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-smooth), border-color 0.25s;
  animation: cardIn 0.4s var(--ease-spring) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.project-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 12px 32px rgba(157, 126, 201, 0.2);
  border-color: var(--lavender);
}

.card-thumb {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
  overflow: hidden;
}

/* Video thumbnail */
.card-thumb--video { cursor: pointer; }

.thumb-emoji {
  font-size: 40px;
  position: relative;
  z-index: 2;
  transition: opacity 0.3s;
  pointer-events: none;
}
.thumb-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 3;
}
.card-thumb--video:hover .thumb-video { opacity: 1; }

.thumb-play-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.3);
  padding: 3px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  z-index: 4;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.card-body { padding: 14px; }
.card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.card-desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 10px;
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--lavender-light);
  color: var(--lavender-deep);
  text-transform: uppercase;
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 600px) {
  .projects-grid { grid-template-columns: 1fr; }
  .screen-body   { padding: 16px; }
}

/* ─────────────────────────────────────────
   SHELF PROJECT CARD
───────────────────────────────────────── */
.shelf-card {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: start;
  justify-content: center;
  background: rgba(26, 22, 37, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s;
  overflow-y: auto;        /* ← add this */
  padding: 20px 0;         /* ← add this */
}
.shelf-card.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.shelf-card-inner {
  background: var(--lavender-pale);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  width: min(960px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(157, 126, 201, 0.2),
    0 32px 80px rgba(26, 22, 37, 0.4);
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-spring);
}
.shelf-card:not(.hidden) .shelf-card-inner { transform: scale(1); }

.shelf-card-icon { font-size: 48px; }
.shelf-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.shelf-card-desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}
.shelf-card-close {
  margin-top: 8px;
  background: var(--lavender-deep);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.shelf-card-close:hover { background: var(--lavender); }

/* ─────────────────────────────────────────
   OS SCREEN OVERLAY
───────────────────────────────────────── */
.os-screen {
  width: min(960px, 94vw);
  height: min(640px, 88vh);
  background: #1a1428;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 0 0 1px rgba(180,140,255,0.25),
    0 40px 100px rgba(0,0,0,0.7),
    0 0 80px rgba(120,80,200,0.3);
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-spring);
}
.overlay:not(.hidden) .os-screen { transform: scale(1); }

/* Menu bar */
.os-menubar {
  background: rgba(40,28,60,0.95);
  backdrop-filter: blur(10px);
  padding: 0 16px;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(180,140,255,0.15);
  flex-shrink: 0;
}
.os-apple {
  color: var(--lavender);
  font-size: 13px;
}
.os-menu-item {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.03em;
  cursor: default;
}
.os-menu-item:hover { color: white; }
.os-menubar-right {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}
.os-time { letter-spacing: 0.05em; }

/* Desktop layout */
.os-desktop {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar */
.os-sidebar {
  width: 180px;
  background: rgba(30,20,50,0.9);
  border-right: 1px solid rgba(180,140,255,0.12);
  display: flex;
  flex-direction: column;
  padding: 20px 12px;
  gap: 4px;
  flex-shrink: 0;
}
.os-sidebar-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(200,160,255,0.5);
  padding: 0 8px;
  margin-bottom: 6px;
}
.os-tab {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}
.os-tab:hover {
  background: rgba(180,140,255,0.12);
  color: rgba(255,255,255,0.9);
}
.os-tab.active {
  background: linear-gradient(135deg, rgba(140,100,220,0.4), rgba(100,70,180,0.4));
  color: white;
  border: 1px solid rgba(180,140,255,0.3);
}
.os-sidebar-divider {
  height: 1px;
  background: rgba(180,140,255,0.12);
  margin: 12px 0;
}
.os-close-btn {
  background: none;
  border: 1px solid rgba(255,100,100,0.3);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,120,120,0.8);
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  transition: all 0.2s;
  margin-top: auto;
}
.os-close-btn:hover {
  background: rgba(255,80,80,0.15);
  color: #ff8080;
}

/* Main content area */
.os-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: linear-gradient(160deg, #1e1430 0%, #160e28 100%);
}
.os-content::-webkit-scrollbar { width: 4px; }
.os-content::-webkit-scrollbar-thumb { background: rgba(180,140,255,0.3); border-radius: 99px; }

.os-content-header { flex-shrink: 0; }
.os-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.01em;
}
.os-cursor {
  color: var(--lavender);
  animation: blink 1s steps(1) infinite;
}
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.os-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 4px;
  font-family: var(--font-display);
}

/* Project cards — dark OS theme */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.project-card {
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(180,140,255,0.15);
  cursor: pointer;
  transition: transform 0.25s var(--ease-spring), box-shadow 0.25s, border-color 0.25s;
  animation: cardIn 0.4s var(--ease-spring) both;
}
.project-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 32px rgba(120,80,200,0.3);
  border-color: rgba(180,140,255,0.4);
}
.card-body { padding: 12px; }
.card-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: white;
  margin-bottom: 4px;
}
.card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
  margin-bottom: 8px;
}
.tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(180,140,255,0.2);
  color: rgba(200,170,255,0.9);
  border: 1px solid rgba(180,140,255,0.2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─────────────────────────────────────────
   DETAIL VIEW
───────────────────────────────────────── */
.detail-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: fadeSlideIn 0.3s ease both;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.detail-view.hidden { display: none; }

.detail-back {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: rgba(200,170,255,0.7);
  padding: 0;
  transition: color 0.2s;
  text-align: left;
  letter-spacing: 0.02em;
}
.detail-back:hover { color: white; }

.detail-media {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-video, .detail-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}
.detail-emoji-thumb {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  border-radius: var(--radius-md);
}

.detail-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.detail-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: white;
}
.detail-desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,0.65);
}
.detail-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, rgba(140,100,220,0.5), rgba(100,70,180,0.5));
  border: 1px solid rgba(180,140,255,0.3);
  color: white;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 99px;
  text-decoration: none;
  transition: all 0.2s;
  width: fit-content;
}
.detail-link:hover {
  background: linear-gradient(135deg, rgba(160,120,240,0.6), rgba(120,90,200,0.6));
  transform: translateY(-1px);
}

/* Image card thumb */
.card-thumb--img {
  height: 130px;
  overflow: hidden;
}
.card-thumb--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Grid view wrapper */
#gridView { display: flex; flex-direction: column; gap: 20px; }
#gridView.hidden { display: none; }

/* ─────────────────────────────────────────
   ABOUT VIEW
───────────────────────────────────────── */
.about-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeSlideIn 0.3s ease both;
}
.about-view.hidden { display: none; }

.about-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.about-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(140,100,220,0.5), rgba(100,70,180,0.5));
  border: 2px solid rgba(180,140,255,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}
.about-name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: white;
}
.about-role {
  font-size: 13px;
  color: rgba(200,170,255,0.7);
  margin-top: 4px;
  font-family: var(--font-display);
}
.about-bio {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.65);
  max-width: 560px;
}
.about-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.about-link {
  display: inline-flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(180,140,255,0.2);
  color: rgba(200,170,255,0.9);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 99px;
  text-decoration: none;
  transition: all 0.2s;
}
.about-link:hover {
  background: rgba(140,100,220,0.25);
  border-color: rgba(180,140,255,0.4);
  color: white;
  transform: translateY(-1px);
}
.about-skills-title {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: rgba(200,160,255,0.5);
  margin-bottom: 10px;
}
.about-skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.about-skill {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 99px;
  background: rgba(140,100,220,0.2);
  border: 1px solid rgba(180,140,255,0.2);
  color: rgba(200,170,255,0.9);
  font-family: var(--font-display);
}

/* Clickable menu item */
.os-menu-btn {
  cursor: pointer;
  transition: color 0.2s;
}
.os-menu-btn:hover { color: white !important; }

/* ─────────────────────────────────────────
   SHELF CARD
───────────────────────────────────────── */
.shelf-card {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(26, 22, 37, 0.4);
  backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: 20px 0;
  transition: opacity 0.5s, visibility 0.5s;
}
.shelf-card.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.shelf-card-inner {
  background: var(--lavender-pale);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: min(960px, 92vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(157, 126, 201, 0.2),
    0 32px 80px rgba(26, 22, 37, 0.4);
}
.shelf-card-icon { font-size: 36px; }
.shelf-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.shelf-card-desc {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.6;
}
.shelf-card-close {
  background: var(--lavender-deep);
  color: white;
  border: none;
  padding: 10px 28px;
  border-radius: 99px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}
.shelf-card-close:hover { background: var(--lavender); }

/* ─────────────────────────────────────────
   MOBILE RESPONSIVE
───────────────────────────────────────── */

/* Mobile tap button to open projects */
#mobileBtn {
  display: none;
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: rgba(100, 60, 200, 0.7);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(180, 140, 255, 0.5);
  color: white;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 99px;
  cursor: pointer;
  letter-spacing: 0.04em;
  animation: hintPulse 2s ease-in-out infinite;
  white-space: nowrap;
}

@media (max-width: 768px) {
  /* Show mobile button, hide click indicator */
  #mobileBtn { display: block; }
  .click-indicator { display: none !important; }

  /* Hint smaller on mobile */
  .hint {
    font-size: 12px;
    padding: 10px 16px;
    white-space: normal;
    text-align: center;
    width: 90vw;
  }

  /* OS screen full screen on mobile */
  .os-screen {
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    max-height: 100vh !important;
  }

  /* Hide sidebar on mobile — use menu bar instead */
  .os-sidebar { display: none !important; }

  /* Menu bar bigger touch targets */
  .os-menubar {
    padding: 0 12px;
    height: 44px;
    gap: 16px;
  }
  .os-menu-item { font-size: 15px; padding: 8px 4px; }

  /* Single column cards on mobile */
  .projects-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  /* Bigger card thumbs on mobile */
  .card-thumb, .card-thumb--video, .card-thumb--img {
    height: 180px !important;
  }

  /* Detail view adjustments */
  .detail-title { font-size: 20px; }
  .detail-desc  { font-size: 13px; }
  .os-title     { font-size: 22px; }
  .os-content   { padding: 16px; }

  /* About view */
  .about-name { font-size: 18px; }
  .about-role { font-size: 11px; }
  .about-bio  { font-size: 13px; }

  /* Shelf card full width on mobile */
  .shelf-card-inner {
    width: 94vw !important;
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  /* Exit button in menu bar on mobile */
  .os-menubar-right::after {
    content: '⏏';
    font-size: 16px;
    cursor: pointer;
    color: rgba(255,120,120,0.8);
  }
}

@media (max-width: 400px) {
  .os-title { font-size: 18px; }
  .hint { font-size: 11px; }
}

.detail-media {
  aspect-ratio: unset !important;
  max-height: 500px;
  overflow-y: auto;
  flex-direction: column;
}