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

:root {
  --menu-bar-h: 28px;
  --dock-icon-size: 64px;
  --overlay-title-bar-h: 36px;
  --overlay-radius: 10px;
  --overlay-shadow: 0 8px 30px rgba(0,0,0,0.25);
  --overlay-title-bg: #E0E0E0;
  --overlay-body-bg: #FAFAFA;
  --overlay-title-text: #4A4A4A;
  --overlay-body-text: #333333;
  --traffic-red: #FF5F57;
  --traffic-yellow: #FEBC2E;
  --traffic-green: #28C840;
  --sidebar-bg: #E8E8E8;
  --sidebar-border: #D0D0D0;
  --sidebar-active: #333333;
  --sidebar-inactive: #888888;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: #000;
  user-select: none;
  -webkit-user-select: none;
}

/* Black screen that fades away to reveal wallpaper */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  pointer-events: none;
  animation: blackFadeOut 2.4s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

/* UI elements hidden initially, fade in after wallpaper reveals */
#menu-bar,
#desktop-icons,
#dock {
  opacity: 0;
  animation: uiFadeIn 1.2s ease 2.2s forwards;
}

/* ========== WALLPAPER ========== */
#desktop {
  width: 100%; height: 100%;
  position: relative;
  background: url('./images/desktop-wallpaper.png') center 30%/cover no-repeat;
  animation: wallpaperZoom 3s cubic-bezier(0.25, 0.1, 0.25, 1) forwards,
             wallpaperDrift 6s ease-in-out forwards;
  transform: scale(1.06);
}

#desktop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(to left, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.15) 15%, transparent 35%),
    radial-gradient(ellipse at center, transparent 30%, rgba(0,0,0,0.12) 100%),
    linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.08) 100%);
  pointer-events: none;
  z-index: 0;
}

/* ========== MENU BAR ========== */
#menu-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: var(--menu-bar-h);
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 8px;
  z-index: 1000;
  font-size: 13.5px;
  color: #000;
  letter-spacing: 0;
  font-weight: 400;
}

#menu-bar .left { display: flex; align-items: center; gap: 0; }
#menu-bar .left .apple-logo { margin-right: 14px; opacity: 0.85; }
#menu-bar .left .finder-bold { font-weight: 600; margin-right: 18px; }
#menu-bar .left span { cursor: default; padding: 0; margin-right: 18px; font-size: 13.5px; font-weight: 400; }

#menu-bar .right {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: #222;
}
#menu-bar .right .menubar-icon { cursor: default; }
#menu-bar .right #clock { font-size: 13px; font-weight: 400; }

/* ========== DESKTOP ICONS ========== */
#desktop-icons {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 120px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.3s ease;
  opacity: 0;
  animation: iconFadeIn 0.5s ease forwards;
  pointer-events: auto;
  position: absolute;
}
.desktop-icon:nth-child(1) { animation-delay: 2.4s; }
.desktop-icon:nth-child(2) { animation-delay: 2.6s; }
.desktop-icon:nth-child(3) { animation-delay: 2.8s; }
.desktop-icon:nth-child(4) { animation-delay: 3.0s; }

/* Positioning: macOS-style right column stack */
.desktop-icon.icon-square    { top: 140px; right: 40px; left: auto; }
.desktop-icon.icon-draftkings { top: 275px; right: 40px; left: auto; }
.desktop-icon.icon-essay      { top: 410px; right: 40px; left: auto; }
.desktop-icon.icon-video      { top: 560px; right: 40px; left: auto; }

.desktop-icon:hover { 
  transform: scale(1.15) translateY(-8px); 
}

.desktop-icon .icon-img {
  width: 84px; height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.desktop-icon:hover .icon-img {
  filter: drop-shadow(0 14px 24px rgba(0,0,0,0.4));
  transform: rotateX(-8deg) rotateY(5deg);
}

.desktop-icon .icon-label {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.7), 0 0 2px rgba(0,0,0,0.4);
  text-align: center;
  max-width: 110px;
  line-height: 1.3;
}

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

/* ========== DOCK ========== */
#dock {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 900;
}

.dock-icon {
  width: var(--dock-icon-size);
  height: var(--dock-icon-size);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: 11px;
  position: relative;
}

.dock-icon:hover {
  transform: scale(1.15) translateY(-4px);
}

.dock-icon img {
  width: 100%; height: 100%;
  border-radius: 11px;
  object-fit: contain;
}

/* Dock icon tooltip */
.dock-icon::after {
  content: attr(data-tooltip);
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: rgba(30,30,30,0.85);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
  backdrop-filter: blur(6px);
}
.dock-icon:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ========== OVERLAYS ========== */
.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.overlay-window {
  background: var(--overlay-body-bg);
  border-radius: var(--overlay-radius);
  box-shadow: var(--overlay-shadow);
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}
.overlay-backdrop.active .overlay-window {
  transform: scale(1);
}

.overlay-title-bar {
  height: var(--overlay-title-bar-h);
  background: var(--overlay-title-bg);
  display: flex;
  align-items: center;
  padding: 0 12px;
  position: relative;
  flex-shrink: 0;
}

.traffic-lights {
  display: flex;
  gap: 7px;
  align-items: center;
}
.traffic-light {
  width: 12px; height: 12px;
  border-radius: 50%;
  cursor: pointer;
  transition: filter 0.15s;
}
.traffic-light:hover { filter: brightness(0.85); }
.tl-red { background: var(--traffic-red); }
.tl-yellow { background: var(--traffic-yellow); }
.tl-green { background: var(--traffic-green); }

.overlay-title-text {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: var(--overlay-title-text);
  font-weight: 500;
}

/* ========== NOTES OVERLAY ========== */
#notes-overlay .overlay-window {
  width: 560px;
  height: 520px;
}

#notes-overlay .overlay-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.notes-sidebar {
  width: 120px;
  min-width: 120px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notes-tab {
  padding: 7px 14px;
  font-size: 13px;
  color: var(--sidebar-inactive);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}
.notes-tab:hover { background: rgba(0,0,0,0.04); }
.notes-tab.active {
  font-weight: 600;
  color: var(--sidebar-active);
  background: rgba(0,0,0,0.06);
}

.notes-content {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 13.5px;
  color: var(--overlay-body-text);
  line-height: 1.6;
}

.notes-content .tab-panel { display: none; }
.notes-content .tab-panel.active { display: block; }

.notes-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #222;
}
.notes-content .location {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}

.notes-status {
  font-size: 12px;
  color: #888;
  font-style: italic;
}
.notes-status:last-of-type {
  padding-bottom: 14px;
  margin-bottom: 0;
}

.notes-content p {
  margin-bottom: 14px;
}
.notes-content p:last-child { margin-bottom: 0; }

.notes-content .email-link {
  color: #0066CC;
  text-decoration: none;
}
.notes-content .email-link:hover { text-decoration: underline; }

.notes-email {
  font-size: 12.5px;
  margin-bottom: 2px;
}

.notes-checklist-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  margin-top: 16px;
}

.notes-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.checklist-item {
  font-size: 13.5px;
  color: var(--overlay-body-text);
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.check-circle {
  width: 18px;
  height: 18px;
  min-width: 18px;
  border-radius: 50%;
  background: #F5A623;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.check-circle::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-top: -1px;
}

.checklist-item a {
  color: #0066CC;
  text-decoration: none;
}
.checklist-item a:hover { text-decoration: underline; }

.notes-closing {
  margin-top: 8px;
  font-style: italic;
  color: #555;
}

/* Skills tab */
.skill-category {
  margin-bottom: 16px;
}
.skill-category h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 6px;
}
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.skill-tag {
  font-size: 12px;
  padding: 3px 10px;
  background: #EBEBEB;
  border-radius: 4px;
  color: #444;
}

/* ========== PHOTOS OVERLAY ========== */
#photos-overlay .overlay-window {
  width: 520px;
  height: 75vh;
}

.photos-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #E5E5E5;
  flex-shrink: 0;
  background: rgba(0,0,0,0.02);
}
.photos-header .photos-icon-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}
.photos-header-text {
  display: flex;
  flex-direction: column;
}
.photos-header .photos-title { font-size: 13px; font-weight: 600; color: #333; }
.photos-header .photos-subtitle { font-size: 12px; color: #999; font-style: italic; }

.photos-grid-label {
  padding: 8px 16px 4px;
  font-size: 11px;
  color: #999;
  flex-shrink: 0;
}

.photos-grid {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-row {
  display: flex;
  gap: 6px;
}

.photo-item {
  flex: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #E8E8E8;
  cursor: pointer;
  transition: transform 0.2s;
  aspect-ratio: 3/4;
  position: relative;
}
.photo-item:hover { transform: scale(1.02); }

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder photo styling (remove when real photos added) */
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0ece6 0%, #ddd6cc 100%);
  color: #999;
  font-size: 11px;
  gap: 4px;
}
.photo-placeholder .pin { font-size: 16px; }

.photo-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 24px 8px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.5));
  font-size: 11px;
  color: #fff;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s;
}
.photo-item:hover .photo-caption {
  opacity: 1;
}

/* ========== SPOTIFY OVERLAY ========== */
#spotify-overlay .overlay-window {
  width: 460px;
  height: 202px;
}

.spotify-body {
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #282828;
}
.spotify-body iframe {
  width: 100%;
  flex: 1;
  border: none;
  border-radius: 0 0 var(--overlay-radius) var(--overlay-radius);
}

/* ========== NOTIFICATION BANNER ========== */
#notification {
  position: fixed;
  top: calc(var(--menu-bar-h) + 10px);
  right: 10px;
  width: 390px;
  background: rgba(246,244,242,0.9);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.06);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transform: translateY(-120%);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  visibility: hidden;
}
#notification.show {
  transform: translateY(0);
  visibility: visible;
}
#notification .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
#notification .notif-content { flex: 1; min-width: 0; }
#notification .notif-app {
  font-size: 11px;
  font-weight: 600;
  color: #999;
  letter-spacing: 0.2px;
  margin-bottom: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
#notification .notif-app .notif-emoji {
  font-size: 10px;
  line-height: 1;
}
#notification .notif-text {
  font-size: 12px;
  color: #1d1d1f;
  line-height: 1.3;
  font-weight: 400;
}

/* ========== ENTRANCE ANIMATIONS ========== */
@keyframes blackFadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes wallpaperZoom {
  0%   { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes wallpaperDrift {
  0%   { background-position: center 27%; }
  60%  { background-position: center 32%; }
  100% { background-position: center 30%; }
}

@keyframes uiFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ========== SCROLL BAR ========== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px) {
  #desktop { transform-origin: top center; }
  #notes-overlay .overlay-window { width: 500px; height: 480px; }
  #photos-overlay .overlay-window { width: 460px; height: 440px; }
}

@media (max-width: 768px) {
  #menu-bar .left span:not(:first-of-type):not(.apple-logo) { display: none; }
  
  /* Desktop icons - bigger and aligned on mobile */
  .desktop-icon .icon-img { width: 72px; height: 72px; }
  .desktop-icon .icon-label { font-size: 12px; max-width: 120px; }
  .desktop-icon { width: 120px; }
  .desktop-icon.icon-square    { top: 130px; right: 10px; }
  .desktop-icon.icon-draftkings { top: 260px; right: 10px; }
  .desktop-icon.icon-essay      { top: 390px; right: 10px; }
  .desktop-icon.icon-video      { top: 530px; right: 10px; }
  
  /* Dock */
  #dock { gap: 8px; padding: 5px 12px; bottom: 30px; }
  .dock-icon { width: 50px; height: 50px; }
  
  /* Overlays - full width on mobile */
  #notes-overlay .overlay-window { width: 92vw; height: 80vh; }
  #photos-overlay .overlay-window { width: 92vw; height: 80vh; }
  #spotify-overlay .overlay-window { width: 92vw; }
  .notes-sidebar { width: 80px; min-width: 80px; }
  .notes-content { padding: 16px 16px; }
  
  /* Notification */
  #notification { width: 88vw; right: 6vw; }
}
