/* Custom Cursor Effects */
:root {
  --cursor-color-primary: #ff0000;
  --cursor-color-secondary: rgba(255, 0, 0, 0.3);
  --cursor-size: 36px;
  --sticky-note-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

/* Hide default cursor when custom cursor is active */
.custom-cursor-active {
  cursor: none !important;
}

.custom-cursor-active * {
  cursor: none !important;
}

/* Base cursor styles */
.custom-cursor {
  position: fixed;
  width: var(--cursor-size);
  height: var(--cursor-size);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, background-color 0.3s ease;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  position: fixed;
  width: 12px;
  height: 12px;
  background-color: var(--cursor-color-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, background-color 0.3s;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* Cursor states */
.cursor-hover {
  width: calc(var(--cursor-size) * 1.5);
  height: calc(var(--cursor-size) * 1.5);
}

.cursor-click {
  transform: translate(-50%, -50%) scale(0.8);
}

/* Section-specific cursors */
.cursor-home {
  background: radial-gradient(circle, var(--cursor-color-secondary) 0%, rgba(58, 93, 176, 0) 70%);
  width: calc(var(--cursor-size) * 1.5);
  height: calc(var(--cursor-size) * 1.5);
}

.cursor-about {
  background: url('icon/cursor-info.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.2);
  height: calc(var(--cursor-size) * 1.2);
}

.cursor-experience {
  background: url('icon/cursor-briefcase.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.2);
  height: calc(var(--cursor-size) * 1.2);
}

.cursor-certifications {
  background: url('icon/cursor-certificate.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.2);
  height: calc(var(--cursor-size) * 1.2);
}

.cursor-words {
  background: url('icon/cursor-quote.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.2);
  height: calc(var(--cursor-size) * 1.2);
}

.cursor-contact {
  background: url('icon/cursor-envelope.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.2);
  height: calc(var(--cursor-size) * 1.2);
}

/* Cursor trail effect */
.cursor-trail {
  position: fixed;
  width: 8px;
  height: 8px;
  background-color: rgba(255, 0, 0, 0.2);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease;
}

/* Pen cursor style */
.cursor-pen {
  background: url('icon/cursor-pen.svg') no-repeat center center;
  background-size: contain;
  width: calc(var(--cursor-size) * 1.5);
  height: calc(var(--cursor-size) * 1.5);
}

/* Sticky Notes */
.sticky-notes-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9000;
}

.sticky-note {
  position: absolute;
  width: 200px;
  height: 200px;
  padding: 20px;
  font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
  font-size: 16px;
  line-height: 1.4;
  color: #333;
  box-shadow: var(--sticky-note-shadow);
  border-radius: 2px;
  opacity: 0;
  transform: scale(0.8) rotate(0deg);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
  cursor: move !important;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-note::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 20px;
  background-color: rgba(0, 0, 0, 0.1);
}

.sticky-note-visible {
  opacity: 1;
  transform: scale(1) rotate(var(--rotation, 0deg));
}

.sticky-note:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
}

/* Disable custom cursor on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor, .cursor-dot, .cursor-trail {
    display: none !important;
  }
  
  .sticky-notes-container {
    display: none !important;
  }
}
