/* ═══════════════════════════════════════════
   AKOS — Design System
   kurtolli.com
   Material You · Dark Theme · Google Pixel 9
═══════════════════════════════════════════ */

:root {
  --bg: #070a12;
  --surface: #1C1C1E;
  --elevated: #2C2C2E;
  --accent: #4ECDC4;
  --accent-dim: rgba(78,205,196,0.15);
  --text: #FFFFFF;
  --text-secondary: #8E8E93;
  --radius-widget: 24px;
  --radius-card: 16px;
  --radius-pill: 50px;
  --easing: cubic-bezier(.4,0,.2,1);
  --duration: 380ms;
  --status-bar-h: 28px;
  --bottom-nav-h: 140px;
  --font: 'Google Sans', 'Roboto', sans-serif;
}

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

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--font);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: pan-y;
}

/* ═══════════════════════════════════════════
   STATUS BAR — always on top, full width
═══════════════════════════════════════════ */
#status-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--status-bar-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: transparent;
  pointer-events: none;
}

#status-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(7,10,18,0.75) 0%, transparent 100%);
  z-index: -1;
}

#clock-status {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-icons .material-symbols-rounded {
  font-size: 14px;
  opacity: 0.9;
}

/* ═══════════════════════════════════════════
   PANORAMIC CANVAS — bg.jpg slides with pages
═══════════════════════════════════════════ */
#os-canvas {
  position: fixed;
  top: 0; left: 0; right: 0;
  bottom: var(--bottom-nav-h);
  overflow: hidden;
  /* bg.jpg at 300% wide — slides horizontally per page */
  background-image: url('images/bg.jpg');
  background-size: 300% 100%;
  background-position: 50% 50%;
  background-color: #070a12;
  transition: background-position var(--duration) var(--easing);
}

/* Pages track is transparent so bg.jpg shows through */
#pages-track {
  display: flex;
  width: 300%;
  height: 100%;
  transition: transform var(--duration) var(--easing);
  will-change: transform;
  background: transparent;
}

.page {
  width: calc(100% / 3);
  height: 100%;
  flex-shrink: 0;
  padding-top: var(--status-bar-h);
  background: transparent;
}

.page-scroll {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px 24px;
  scrollbar-width: none;
  background: transparent;
}
.page-scroll::-webkit-scrollbar { display: none; }

/* ═══════════════════════════════════════════
   BOTTOM NAV — unified dock + dots
═══════════════════════════════════════════ */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 14px;
  gap: 6px;
  background: linear-gradient(to top, rgba(7,10,18,0.95) 0%, rgba(7,10,18,0.7) 70%, transparent 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* Page dots + labels */
.page-dots {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-dots > span.dot { display: none; }

.dot-labels {
  display: flex;
  gap: 8px;
  align-items: center;
}

.dot-labels span {
  font-size: 11px;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--duration) var(--easing);
  position: relative;
}

.dot-labels span::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-secondary);
  margin: 0 auto 3px;
  transition: all var(--duration) var(--easing);
}

.dot-labels span.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.dot-labels span.active::before {
  background: var(--accent);
  width: 18px;
  border-radius: 3px;
}

/* Dock */
.dock {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: calc(100% - 32px);
  max-width: 420px;
  padding: 6px 16px;
  background: rgba(28,28,30,0.75);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 14px;
  border-radius: 16px;
  cursor: pointer;
  transition: all var(--duration) var(--easing);
  flex: 1;
}

.dock-item:hover,
.dock-item:active {
  background: rgba(78,205,196,0.1);
}

.dock-item.active .material-symbols-rounded { color: var(--accent); }
.dock-item.active .dock-label { color: var(--accent); }

.dock-item .material-symbols-rounded {
  font-size: 24px;
  color: var(--text-secondary);
  transition: all var(--duration) var(--easing);
}

.dock-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all var(--duration) var(--easing);
}

.home-indicator {
  width: 100px;
  height: 3px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   DISCOVER PAGE
═══════════════════════════════════════════ */
.discover-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text);
}
.discover-header .material-symbols-rounded { color: var(--accent); }

.feed-card {
  background: rgba(28,28,30,0.82);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-card);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 150ms var(--easing);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.feed-card:active { transform: scale(0.98); }

.feed-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}
.tag-new { background: rgba(78,205,196,0.2); color: var(--accent); }
.tag-press { background: rgba(255,149,0,0.2); color: #FF9500; }
.tag-case { background: rgba(52,199,89,0.2); color: #34C759; }
.tag-work { background: rgba(90,200,250,0.2); color: #5AC8FA; }

.feed-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feed-body { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin-bottom: 10px; }
.feed-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #666; }
.feed-meta .material-symbols-rounded { font-size: 12px; }

/* ═══════════════════════════════════════════
   HOME PAGE WIDGETS
═══════════════════════════════════════════ */
.clock-widget {
  text-align: center;
  padding: 16px 0 8px;
  margin-bottom: 12px;
}
.clock-time {
  font-size: 64px;
  font-weight: 300;
  letter-spacing: -2px;
  line-height: 1;
}
.clock-date {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.widget {
  background: rgba(28,28,30,0.82);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-widget);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: transform 150ms var(--easing), background 150ms;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.widget:active { transform: scale(0.99); background: rgba(44,44,46,0.9); }

/* About Widget */
.about-widget { display: flex; align-items: flex-start; justify-content: space-between; }
.about-left { flex: 1; }
.about-name { font-size: 16px; font-weight: 600; margin-bottom: 2px; }
.about-title { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.about-locs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.loc-pill {
  font-size: 11px;
  background: var(--elevated);
  border-radius: 8px;
  padding: 3px 8px;
  color: var(--text-secondary);
}
.status-badge {
  display: inline-block;
  font-size: 11px;
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  padding: 3px 10px;
  font-weight: 500;
}
.about-avatar {
  width: 70px; height: 70px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--elevated);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-left: 12px;
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Weather */
.weather-widget { display: flex; align-items: center; padding: 14px 16px; }
.weather-city { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.weather-loc { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.weather-loc .material-symbols-rounded { font-size: 13px; }
.weather-temp { font-size: 28px; font-weight: 300; margin: 2px 0; }
.weather-cond { font-size: 12px; color: var(--text-secondary); }
.weather-divider { width: 1px; height: 50px; background: rgba(255,255,255,0.1); margin: 0 16px; }

/* YouTube */
.yt-widget { display: flex; align-items: center; gap: 14px; padding: 12px; }
.yt-thumb {
  width: 80px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  background: var(--elevated);
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.yt-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4);
}
.yt-play .material-symbols-rounded { font-size: 24px; color: white; }
.yt-info { flex: 1; }
.yt-platform { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.yt-title { font-size: 14px; font-weight: 500; }
.yt-sub { font-size: 12px; color: var(--text-secondary); }

/* Spotify */
.spotify-widget { display: flex; align-items: center; gap: 14px; padding: 12px; }
.spotify-art {
  width: 56px; height: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, #1DB954, #006428);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.spotify-art .material-symbols-rounded { font-size: 28px; color: white; }
.spotify-info { flex: 1; }
.spotify-platform { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); margin-bottom: 3px; }
.spotify-track { font-size: 14px; font-weight: 500; }
.spotify-artist { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.spotify-controls { display: flex; align-items: center; gap: 12px; }
.spotify-controls .material-symbols-rounded { font-size: 20px; color: var(--text-secondary); cursor: pointer; }
.spotify-play-btn { font-size: 32px !important; color: #1DB954 !important; }

/* Standalone icons */
.standalone-row { display: flex; justify-content: space-around; padding: 8px 16px; margin-top: 4px; }
.standalone-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.app-icon-circle {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(44,44,46,0.85);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  transition: transform 150ms var(--easing);
}
.app-icon-circle:active { transform: scale(0.9); }
.app-icon-circle .material-symbols-rounded { font-size: 28px; color: var(--accent); }
.app-label { font-size: 12px; color: var(--text-secondary); }

/* ═══════════════════════════════════════════
   APPS PAGE — FOLDERS
═══════════════════════════════════════════ */
.apps-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.folders-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 12px;
  padding-bottom: 12px;
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.folder-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(28,28,30,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 12px;
  transition: transform 150ms var(--easing), box-shadow 150ms;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.folder-circle:active,
.folder-item:active .folder-circle {
  transform: scale(0.92);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.folder-icons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  width: 44px; height: 44px;
}
.folder-icons-grid .material-symbols-rounded { font-size: 18px; }
.folder-mini-img {
  width: 20px; height: 20px;
  object-fit: contain;
  border-radius: 4px;
}
.folder-mini-brand {
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px;
  border-radius: 4px;
  font-size: 9px; font-weight: 700;
}
.folder-mini-brand.linkedin { background: #0A66C2; color: white; }
.folder-mini-brand.instagram { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); color: white; }
.folder-mini-brand.youtube { background: #FF0000; color: white; font-size: 8px; }
.folder-mini-brand.x { background: #000; color: white; border: 1px solid #333; }

.folder-label {
  font-size: 11px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.2;
  max-width: 72px;
}

/* ═══════════════════════════════════════════
   OVERLAYS — centered scale-in (ALL breakpoints)
═══════════════════════════════════════════ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--easing);
}
.overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* Folder popup */
.folder-popup {
  background: rgba(28,28,30,0.95);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  width: calc(100% - 48px);
  max-width: 400px;
  max-height: 80vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 20px 20px 24px;
  transform: scale(0.88);
  opacity: 0;
  transition: transform var(--duration) var(--easing), opacity var(--duration) var(--easing);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.folder-popup::-webkit-scrollbar { display: none; }
.overlay.open .folder-popup {
  transform: scale(1);
  opacity: 1;
}

.folder-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.folder-popup-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}
.folder-popup-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 150ms;
  flex-shrink: 0;
}
.folder-popup-close:hover { background: rgba(255,255,255,0.2); }
.folder-popup-close .material-symbols-rounded { font-size: 16px; }

.folder-popup-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.popup-app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.popup-app-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--elevated);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  transition: transform 120ms var(--easing);
}
.popup-app-icon:active { transform: scale(0.88); }
.popup-app-icon img { width: 100%; height: 100%; object-fit: contain; }
.popup-app-icon .material-symbols-rounded { font-size: 26px; color: var(--accent); }
.popup-app-label { font-size: 11px; color: var(--text-secondary); text-align: center; }

/* Brand icon backgrounds in popup */
.popup-app-icon.linkedin-icon { background: #0A66C2; }
.popup-app-icon.instagram-icon { background: linear-gradient(135deg, #F58529, #DD2A7B, #8134AF); }
.popup-app-icon.youtube-icon { background: #FF0000; }
.popup-app-icon.x-icon { background: #000; border: 1px solid #333; }
.popup-app-icon.facebook-icon { background: #1877F2; }
.popup-app-icon.spotify-icon { background: #1DB954; }
.popup-app-icon.entermedia-icon { background: white; }
.popup-app-icon.airprishtina-icon { background: white; }

/* Connect popup */
.connect-popup {
  background: rgba(28,28,30,0.95);
  backdrop-filter: blur(40px) saturate(1.8);
  -webkit-backdrop-filter: blur(40px) saturate(1.8);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 24px;
  width: calc(100% - 48px);
  max-width: 400px;
  padding: 24px 20px 28px;
  transform: scale(0.88);
  opacity: 0;
  transition: transform var(--duration) var(--easing), opacity var(--duration) var(--easing);
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}
.overlay.open .connect-popup {
  transform: scale(1);
  opacity: 1;
}
.connect-title { font-size: 20px; font-weight: 600; text-align: center; margin-bottom: 8px; }
.connect-msg { font-size: 13px; color: var(--text-secondary); text-align: center; margin-bottom: 20px; line-height: 1.5; }
.connect-icons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.social-icon-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border-radius: 16px;
  background: var(--elevated);
  text-decoration: none;
  color: var(--text);
  transition: transform 120ms var(--easing), background 150ms;
  font-size: 12px;
}
.social-icon-btn:active { transform: scale(0.92); }
.social-icon-btn span { color: inherit; }
.linkedin-btn:hover { background: rgba(10,102,194,0.3); }
.instagram-btn:hover { background: rgba(221,42,123,0.25); }
.youtube-btn:hover { background: rgba(255,0,0,0.25); }
.x-btn:hover { background: rgba(255,255,255,0.1); }
.facebook-btn:hover { background: rgba(24,119,242,0.25); }
.spotify-btn:hover { background: rgba(29,185,84,0.25); }

/* ═══════════════════════════════════════════
   APP OVERLAYS (full screen, slides up)
═══════════════════════════════════════════ */
.app-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform 420ms var(--easing);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.app-overlay.open { transform: translateY(0); }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 44px 16px 12px;
  background: rgba(7,10,18,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  z-index: 10;
  flex-shrink: 0;
}

.app-back, .app-home-btn {
  background: none; border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--text);
  transition: background 150ms;
}
.app-back:hover, .app-home-btn:hover { background: rgba(255,255,255,0.1); }
.app-back .material-symbols-rounded,
.app-home-btn .material-symbols-rounded { font-size: 22px; }

.app-title { font-size: 18px; font-weight: 600; }

.app-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.app-content::-webkit-scrollbar { display: none; }

/* Desktop backdrop behind app overlays */
#app-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 695;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration) var(--easing);
}
#app-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ═══════════════════════════════════════════
   ABOUT APP CONTENT
═══════════════════════════════════════════ */
.about-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px 24px;
  text-align: center;
}
.about-hero-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--elevated);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  border: 3px solid var(--accent-dim);
  flex-shrink: 0;
}
.about-hero-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-hero-name { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.about-hero-title { font-size: 15px; color: var(--accent); margin-bottom: 4px; }
.about-hero-locs { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }

.about-bio {
  padding: 0 20px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin: 0 0 20px;
}

.fact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 0 16px 20px;
}
.fact-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 16px;
  text-align: center;
}
.fact-num { font-size: 28px; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
.fact-label { font-size: 12px; color: var(--text-secondary); }

.creds-section { padding: 0 16px 24px; }
.creds-title { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 12px; }
.cred-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.cred-item .material-symbols-rounded { font-size: 20px; color: var(--accent); margin-top: 1px; flex-shrink: 0; }
.cred-name { font-size: 14px; font-weight: 500; }
.cred-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

.about-ctas {
  display: flex;
  gap: 12px;
  padding: 16px 16px 32px;
}
.cta-primary, .cta-secondary {
  flex: 1;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 150ms var(--easing), opacity 150ms;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font);
}
.cta-primary { background: var(--accent); color: #000; }
.cta-secondary { background: var(--elevated); color: var(--text); }
.cta-primary:active, .cta-secondary:active { transform: scale(0.97); opacity: 0.9; }

/* ═══════════════════════════════════════════
   CASE STUDY APP CONTENT
═══════════════════════════════════════════ */
.case-study-content { padding: 0; }

.cs-hero {
  padding: 32px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.cs-brand-logo { margin-bottom: 16px; display: block; margin-left: auto; margin-right: auto; }
.cs-hero-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.cs-hero-sub { font-size: 13px; color: var(--text-secondary); }

.cs-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 16px 0; }
.cs-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--elevated);
  color: var(--text-secondary);
}

.cs-stats { display: flex; padding: 16px; gap: 0; }
.cs-stat { flex: 1; text-align: center; padding: 12px 8px; background: var(--surface); border-radius: 0; }
.cs-stat:first-child { border-radius: 12px 0 0 12px; }
.cs-stat:last-child { border-radius: 0 12px 12px 0; }
.cs-stat:not(:last-child) { border-right: 1px solid rgba(255,255,255,0.07); }
.cs-stat-num { font-size: 22px; font-weight: 700; margin-bottom: 3px; }
.cs-stat-label { font-size: 11px; color: var(--text-secondary); }

.cs-body { padding: 20px 16px; color: var(--text-secondary); font-size: 14px; line-height: 1.7; }
.cs-body p + p { margin-top: 12px; }

.cs-evidence { padding: 0 16px 16px; }
.cs-evidence-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-secondary); margin-bottom: 10px; }
.cs-evidence-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.cs-evidence-item .material-symbols-rounded { font-size: 16px; color: var(--accent); flex-shrink: 0; }
.cs-evidence-item a { color: inherit; }

/* ═══════════════════════════════════════════
   TABLET (768px+)
═══════════════════════════════════════════ */
@media (min-width: 768px) {
  :root {
    --bottom-nav-h: 130px;
  }

  .dock { max-width: 340px; }

  .page-scroll { padding: 16px 24px 32px; }

  .folders-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 24px 16px;
  }
  .folder-circle { width: 88px; height: 88px; }
  .folder-icons-grid .material-symbols-rounded { font-size: 22px; }
  .folder-mini-img { width: 24px; height: 24px; }
  .folder-mini-brand { width: 24px; height: 24px; font-size: 11px; }
}

/* ═══════════════════════════════════════════
   DESKTOP (1024px+)
═══════════════════════════════════════════ */
@media (min-width: 1024px) {
  :root {
    --bottom-nav-h: 130px;
    --status-bar-h: 32px;
  }

  /* bg.jpg covers full desktop viewport — no panoramic slide on desktop */
  #os-canvas {
    background-size: cover;
    background-position: center center;
    transition: none;
  }

  /* Show app backdrop on desktop */
  #app-backdrop { display: block; }

  #status-bar { padding: 0 24px; }

  .page-scroll {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 32px 40px;
  }

  /* Home page: 2-column widget layout */
  #page-home .page-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .clock-widget { grid-column: 1 / -1; padding: 24px 0 8px; }
  .clock-time { font-size: 80px; }
  .about-widget { grid-column: 1 / -1; }
  .standalone-row { grid-column: 1 / -1; }

  /* Folders: 5-col on desktop */
  .folders-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 28px 20px;
    max-width: 700px;
    margin: 0 auto;
  }
  .folder-circle { width: 100px; height: 100px; padding: 16px; }
  .folder-icons-grid { width: 54px; height: 54px; }
  .folder-icons-grid .material-symbols-rounded { font-size: 24px; }
  .folder-mini-img { width: 26px; height: 26px; }
  .folder-mini-brand { width: 26px; height: 26px; font-size: 12px; }
  .folder-label { font-size: 12px; max-width: 90px; }

  /* Dock on desktop */
  .dock { max-width: 500px; padding: 8px 40px; }
  .dock-item .material-symbols-rounded { font-size: 28px; }
  .dock-label { font-size: 12px; }

  /* App overlays: centered modal on desktop */
  .app-overlay {
    top: 5vh;
    left: 50%;
    right: auto;
    bottom: auto;
    width: 620px;
    max-width: 90vw;
    height: 88vh;
    border-radius: 24px;
    transform: translateX(-50%) translateY(120%);
    box-shadow: 0 40px 120px rgba(0,0,0,0.8);
    overflow: hidden;
  }
  .app-overlay.open { transform: translateX(-50%) translateY(0); }

  /* Popups wider on desktop */
  .connect-popup, .folder-popup { max-width: 480px; }

  /* Discover feed: 2-col on desktop */
  #page-discover .page-scroll {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
  .discover-header { grid-column: 1 / -1; }
}

/* ═══════════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════════ */
@keyframes pulse-ring {
  0% { opacity: 0.6; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.feed-card { animation: fade-in-up 300ms var(--easing) both; }
.feed-card:nth-child(2) { animation-delay: 60ms; }
.feed-card:nth-child(3) { animation-delay: 120ms; }
.feed-card:nth-child(4) { animation-delay: 180ms; }
.feed-card:nth-child(5) { animation-delay: 240ms; }
.feed-card:nth-child(6) { animation-delay: 300ms; }

/* Safe area for iPhone/Android notch */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottom-nav {
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
    height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }
  #os-canvas {
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  }
}
