/* ============================================================================
   ESTILO — aparência estilo "área de trabalho macOS"
   (você normalmente não precisa editar este arquivo)
============================================================================ */

:root {
  --fonte: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --vidro: rgba(255, 255, 255, 0.55);
  --vidro-forte: rgba(250, 250, 252, 0.82);
  --borda-vidro: rgba(255, 255, 255, 0.6);
  --sombra-janela: 0 30px 70px rgba(0, 0, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.2);
  --raio: 12px;
  --texto-escuro: #1d1d1f;
  --texto-claro: #f5f5f7;
  --azul: #0a84ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;              /* a área de trabalho não rola no desktop */
  font-family: var(--fonte);
  color: var(--texto-escuro);
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(160deg, #d9dde6 0%, #c3b6ad 45%, #8f8a86 100%);
  user-select: none;
  touch-action: manipulation;
}

.oculto { display: none !important; }

/* ---------- Papel de parede ---------- */
#wallpaper {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
#wallpaper-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,0.25), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.10), rgba(0,0,0,0.12));
}

/* ---------- Barra superior ---------- */
#topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 30px;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 13px;
  color: #1d1d1f;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-logo {
  width: 14px; height: 14px;
  background: #1d1d1f;
  -webkit-mask: radial-gradient(circle at 50% 42%, #000 62%, transparent 63%);
          mask: radial-gradient(circle at 50% 42%, #000 62%, transparent 63%);
  border-radius: 50%;
}
.topbar-item {
  font: inherit; color: inherit;
  background: none; border: 0; padding: 2px 6px;
  border-radius: 6px; cursor: pointer;
  font-weight: 600;
}
.topbar-item:hover { background: rgba(0,0,0,0.08); }
.topbar-nome { font-weight: 700; padding: 2px 2px; }
.topbar-sub { opacity: 0.65; font-weight: 400; }
.topbar-clock { font-variant-numeric: tabular-nums; font-weight: 500; }

@media (max-width: 640px) {
  .topbar-sub { display: none; }
}

/* ---------- Área de trabalho ---------- */
#desktop {
  position: fixed;
  inset: 30px 0 0 0;            /* abaixo da barra superior */
  z-index: 10;
}

/* Ícones de projeto (arquivos na área de trabalho) */
.icone {
  position: absolute;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: grab;
  touch-action: none;           /* permite arrastar no toque sem rolar a página */
  text-align: center;
  padding: 6px 4px;
  border-radius: 10px;
  transition: transform 0.12s ease;
}
.icone:active { cursor: grabbing; }
.icone.arrastando { transform: scale(1.05); z-index: 50; }
.icone.selecionado { background: rgba(10, 132, 255, 0.18); }

.icone .miniatura {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
  background: #e9e9ee;
  pointer-events: none;
}
.icone .rotulo {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.15;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,0.85), 0 0 1px rgba(0,0,0,0.6);
  max-width: 100px;
  word-break: break-word;
  pointer-events: none;
}

/* ---------- Dock ---------- */
#dock {
  position: fixed;
  z-index: 1400;
  left: 50%;
  /* respeita a área segura inferior do celular (barra do Chrome/Safari, home indicator) */
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  max-width: calc(100vw - 16px);
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 8px 12px;
  background: var(--vidro);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border: 1px solid var(--borda-vidro);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.dock-item {
  position: relative;
  width: 52px; height: 52px;
  border: 0; padding: 0; background: none;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(.2,.8,.2,1);
  transform-origin: bottom center;
}
.dock-item svg, .dock-item img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3)); }
.dock-item:hover { transform: scale(1.35) translateY(-6px); z-index: 2; }
.dock-item:hover .dock-tooltip { opacity: 1; transform: translate(-50%, -4px); }
.dock-tooltip {
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translate(-50%, 4px);
  margin-bottom: 10px;
  background: rgba(30,30,30,0.9);
  color: #fff;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.dock-sep { width: 1px; height: 44px; align-self: center; background: rgba(0,0,0,0.18); margin: 0 2px; }

/* ---------- Janelas ---------- */
.janela {
  position: fixed;
  z-index: 200;
  width: 420px;
  max-width: calc(100vw - 24px);
  background: var(--vidro-forte);
  backdrop-filter: saturate(180%) blur(26px);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--raio);
  box-shadow: var(--sombra-janela);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: abrir-janela 0.22s cubic-bezier(.2,.9,.3,1);
}
@keyframes abrir-janela {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.janela.fechando { animation: fechar-janela 0.16s ease forwards; }
@keyframes fechar-janela {
  to { opacity: 0; transform: scale(0.96); }
}

.janela-barra {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: rgba(240,240,242,0.7);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  cursor: grab;
  touch-action: none;
}
.janela-barra:active { cursor: grabbing; }
.semaforo { display: flex; gap: 8px; }
.semaforo span {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
}
.sem-vermelho { background: #ff5f57; cursor: pointer; }
.sem-amarelo  { background: #febc2e; }
.sem-verde    { background: #28c840; }
.janela-titulo {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #3a3a3c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 52px;          /* compensa o semáforo para centralizar */
}
.janela-corpo {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(100vh - 150px);
}

/* Cabeçalho do projeto (ícone + título + cliente) */
.proj-cabecalho { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.proj-cabecalho img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; box-shadow: 0 3px 8px rgba(0,0,0,0.25); }
.proj-cabecalho .titulo { font-size: 16px; font-weight: 700; }
.proj-cabecalho .cliente { font-size: 13px; color: #6a6a6e; }
.proj-descricao { font-size: 13.5px; line-height: 1.5; color: #2a2a2c; white-space: pre-wrap; }
.proj-legenda-preview { font-size: 12px; font-weight: 700; color: #6a6a6e; margin: 14px 0 8px; text-transform: none; }

/* Abas de vídeo (projetos com vários vídeos, ex.: Projeto 05) */
.proj-video-abas { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.proj-video-aba {
  font: inherit; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid rgba(0,0,0,.12); background: #f2f2f4; color: #2a2a2c;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.proj-video-aba:hover { background: #e6e6ea; }
.proj-video-aba.ativo { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }

/* Mídia (vídeo/placeholder) */
.midia { width: 100%; border-radius: 9px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.midia video, .midia iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }
.midia-placeholder {
  width: 100%; aspect-ratio: 16/9;
  border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px;
  color: #fff;
  background: repeating-linear-gradient(45deg, #2b2b30, #2b2b30 12px, #333338 12px, #333338 24px);
  border: 1px dashed rgba(255,255,255,0.25);
  font-size: 13px;
  text-align: center;
  padding: 10px;
}
.midia-placeholder .play {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.9);
  display: flex; align-items: center; justify-content: center;
}
.midia-placeholder .play::after {
  content: ""; width: 0; height: 0;
  border-left: 14px solid #1d1d1f;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 4px;
}

/* ---------- Grade da Lixeira (bastidores) ---------- */
.grade-bastidores { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.card-bastidor {
  cursor: pointer; border-radius: 9px; overflow: hidden;
  background: #000; position: relative; aspect-ratio: 9/14;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.15s ease;
}
.card-bastidor:hover { transform: translateY(-3px); }
.card-bastidor .capa { width: 100%; height: 100%; object-fit: cover; }
.card-bastidor .info {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 8px; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 12px;
}
.card-bastidor .info b { display: block; font-size: 12.5px; }
.card-bastidor .play-mini {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center;
}
.card-bastidor .play-mini::after {
  content: ""; border-left: 9px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 2px;
}

/* ---------- Galeria de fotos ---------- */
.grade-galeria { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.foto-galeria {
  aspect-ratio: 1/1; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: #e9e9ee; box-shadow: 0 3px 8px rgba(0,0,0,0.22);
  transition: transform 0.15s ease;
}
.foto-galeria:hover { transform: scale(1.03); }
.foto-galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Célula de VÍDEO dentro da grade da Lixeira (miniatura + ícone de play) */
.foto-galeria.bastidor-video { position: relative; background: #000; }
.foto-galeria.bastidor-video img { opacity: 0.9; }
.foto-galeria.bastidor-video::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 42px; height: 42px; transform: translate(-50%, -50%);
  border-radius: 50%; background: rgba(0,0,0,0.5); pointer-events: none;
}
.foto-galeria.bastidor-video::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-38%, -50%);
  border-left: 15px solid #fff; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  pointer-events: none;
}

/* ---------- Janela de Contato ---------- */
.contato-corpo { display: flex; flex-direction: column; gap: 14px; }
.contato-intro { margin: 0; color: #444; font-size: 13.5px; line-height: 1.45; }
.contato-email-linha {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f2f2f4; border-radius: 10px; padding: 10px 12px;
}
.contato-email { flex: 1 1 auto; font-weight: 600; color: #1d1d1f; font-size: 14px; word-break: break-all; }
.contato-btn {
  font: inherit; font-size: 13px; font-weight: 600; border-radius: 8px; cursor: pointer;
  border: 1px solid rgba(0,0,0,0.12); padding: 8px 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; transition: background 0.15s ease;
}
.contato-copiar { background: #1d1d1f; color: #fff; border-color: #1d1d1f; }
.contato-copiar:hover { background: #333; }
.contato-copiar.copiado { background: #2e9e4f; border-color: #2e9e4f; }
.contato-linkedin { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.contato-linkedin:hover { background: #0956a8; }
.contato-linkedin svg { display: block; }

/* ---------- Janela Bloco de Notas (menu lateral) ---------- */
.janela.notas .janela-barra { background: #fff7cf; }
.janela.notas .janela-corpo { background: #fffdf2; padding: 0; overflow: hidden; }
.notas-layout { display: flex; min-height: 280px; }
.notas-menu {
  width: 150px; flex-shrink: 0;
  background: #fbf3b8;
  border-right: 1px solid #ece3a0;
  padding: 10px 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.notas-item {
  text-align: left; font: inherit; font-size: 14px; font-weight: 600;
  color: #6a6333; background: none; border: 0;
  padding: 9px 11px; border-radius: 8px; cursor: pointer;
}
.notas-item:hover { background: rgba(0,0,0,0.06); }
.notas-item.ativo { background: #ffd84d; color: #3a3416; }
.notas-conteudo { flex: 1; padding: 16px 18px; overflow-y: auto; max-height: calc(100vh - 160px); }
.notas-titulo { margin: 0 0 12px; font-size: 17px; color: #3a3416; }
.notas-texto { font-size: 14px; line-height: 1.6; color: #3a3a30; white-space: pre-wrap; }

/* Mural de fotos da seção "Interesses" (dentro da janela do Notas).
   Composição estilo mural/álbum, com alturas variadas (masonry). */
.notas-mural { column-width: 120px; column-gap: 8px; }
.notas-foto {
  margin: 0 0 8px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}
.notas-foto img { width: 100%; height: auto; display: block; transition: transform 0.25s ease; }
.notas-foto:hover img { transform: scale(1.04); }

/* ---------- Lightbox (foto ampliada) ---------- */
#camada-lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 14px;
  padding: 24px;
}
#camada-lightbox img { max-width: 92vw; max-height: 78vh; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
#camada-lightbox .legenda-lb { color: #fff; font-size: 14px; }
.lb-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 26px; cursor: pointer;
}
.lb-btn:hover { background: rgba(255,255,255,0.3); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-fechar { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; font-size: 22px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.15); color: #fff; cursor: pointer; }
.lb-fechar:hover { background: rgba(255,255,255,0.3); }

/* ---------- Diálogo de sistema (easter egg dos apps Adobe) ---------- */
.dialogo-fundo { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.15); }
.dialogo {
  width: 320px; max-width: calc(100vw - 32px);
  background: var(--vidro-forte);
  backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
  border-radius: 14px; box-shadow: var(--sombra-janela);
  padding: 20px; text-align: center;
}
.dialogo .emoji { font-size: 34px; }
.dialogo h3 { margin: 10px 0 4px; font-size: 15px; }
.dialogo p { margin: 0 0 16px; font-size: 13px; color: #555; }
.dialogo button {
  width: 100%; padding: 8px; border: 0; border-radius: 9px;
  background: var(--azul); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.dialogo button:hover { filter: brightness(1.05); }

/* ============================================================================
   RESPONSIVO — TABLET E CELULAR
============================================================================ */
@media (max-width: 820px) {
  html, body { overflow: auto; }        /* permite rolar no celular */

  /* O Dock PERMANECE horizontal no rodapé — só adapta para caber na tela */
  #dock {
    /* overflow VISÍVEL: no hover o ícone sobe acima da barra sem ser cortado.
       Os ícones já cabem na largura do celular, então não é preciso rolar. */
    overflow: visible;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .dock-item { width: 46px; height: 46px; }

  /* A área de trabalho ocupa a tela real do celular e rola junto com a página.
     100dvh = altura DINÂMICA: acompanha as barras do navegador que surgem/somem.
     A altura final é ajustada pelo conteúdo via JavaScript (sem faixa vazia grande). */
  #desktop {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 100vh;      /* fallback p/ navegadores antigos */
    min-height: 100dvh;
  }
  .icone { width: 92px; }
  .icone .miniatura { width: 72px; height: 72px; }

  .janela { width: calc(100vw - 20px); }
  .janela-corpo { max-height: 70vh; }
  .grade-galeria { grid-template-columns: repeat(2, 1fr); }
}

/* Celular: Dock continua embaixo, apenas menor e rolável para manter a usabilidade */
@media (max-width: 600px) {
  #dock {
    gap: 3px; padding: 6px; border-radius: 16px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .dock-item { width: 36px; height: 36px; }
  .dock-item:hover { transform: scale(1.18) translateY(-5px); z-index: 2; }
  .dock-sep { height: 30px; margin: 0 1px; }
  /* Bloco de Notas: menu lateral mais estreito no celular */
  .notas-menu { width: 116px; padding: 8px 6px; }
  .notas-item { font-size: 13px; padding: 8px 9px; }
  .notas-conteudo { padding: 14px; }
}

@media (max-width: 480px) {
  .grade-bastidores { grid-template-columns: 1fr 1fr; }
}
