/* Interactive Effects for Jack's Portfolio */

/* ========== Custom Coffee Cup Cursor ========== */
html, body {
  cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><text y='24' font-size='24'>☕</text></svg>"), auto;
}

a, button, .btn, [role="button"] {
  cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><text y='24' font-size='24'>👆</text></svg>"), pointer;
}

/* ========== Project Card Hover Effects ========== */
.archive__item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--background-color, #fff);
  position: relative;
  overflow: hidden;
}

.archive__item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.archive__item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.archive__item:hover::before {
  left: 100%;
}

.archive__item-title a {
  transition: color 0.3s ease;
  position: relative;
}

.archive__item-title a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #494e52, #7a8288);
  transition: width 0.3s ease;
}

.archive__item:hover .archive__item-title a::after {
  width: 100%;
}

.archive__item-excerpt {
  transition: opacity 0.3s ease;
}

.archive__item:hover .archive__item-excerpt {
  opacity: 0.8;
}

/* ========== Typing Effect for Bio ========== */
.author__bio {
  min-height: 3em;
}

.typing-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background-color: currentColor;
  margin-left: 2px;
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ========== Author Avatar Hover ========== */
.author__avatar img {
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  border-radius: 50%;
}

.author__avatar img:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ========== Social Icons Hover ========== */
.author__urls li a {
  transition: transform 0.2s ease, color 0.2s ease;
  display: inline-block;
}

.author__urls li a:hover {
  transform: translateX(5px);
}

.author__urls li a i {
  transition: transform 0.3s ease;
}

.author__urls li a:hover i {
  transform: scale(1.2);
}

/* ========== Navigation Hover Effects ========== */
.masthead__menu-item a {
  position: relative;
  transition: color 0.3s ease;
}

.masthead__menu-item a::before {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s ease, left 0.3s ease;
}

.masthead__menu-item a:hover::before {
  width: 100%;
  left: 0;
}

/* ========== Button Hover Effects ========== */
.btn {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
  transform: translateY(0);
}

/* ========== Page Title Animation ========== */
.page__title {
  animation: fadeInDown 0.6s ease-out;
}

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

/* ========== Smooth Scroll Indicator ========== */
@media (min-width: 768px) {
  .sidebar {
    transition: transform 0.3s ease;
  }
}

/* ========== Dark Mode Adjustments ========== */
.dark-mode .archive__item {
  background: var(--background-color, #1a1a1a);
}

.dark-mode .archive__item:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dark-mode .archive__item::before {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.05),
    transparent
  );
}
