/* ============================================================
   effects.css: glassmorphism, glows, gradients, decorative
   ============================================================ */

/* ── Glassmorphism Cards ──────────────────────────────────── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow:
    0 8px 32px rgba(10, 0, 15, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass--light {
  background: var(--glass-bg-light);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
}

.glass--orange {
  background: rgba(204, 85, 0, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-orange);
  border-radius: var(--radius-md);
}

.glass--teal {
  background: rgba(42, 191, 191, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(42, 191, 191, 0.25);
  border-radius: var(--radius-md);
}

/* ── Glow Text ────────────────────────────────────────────── */
.glow {
  text-shadow:
    0 0 10px var(--purple),
    0 0 25px var(--glow-purple),
    0 0 50px rgba(191, 95, 255, 0.25);
}

.glow--teal {
  text-shadow:
    0 0 10px var(--teal),
    0 0 25px var(--glow-teal);
}

.glow--orange {
  text-shadow:
    0 0 10px var(--burnt-orange),
    0 0 25px var(--glow-orange);
}

.glow--gold {
  text-shadow:
    0 0 10px var(--gold),
    0 0 25px rgba(255, 215, 0, 0.5);
}

/* ── Holographic / Iridescent Gradient Text ───────────────── */
.holo-text {
  background: linear-gradient(
    135deg,
    var(--purple)    0%,
    var(--teal)      30%,
    var(--burnt-orange) 60%,
    var(--purple)    100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: holo-shift 5s ease infinite;
}

@keyframes holo-shift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}

/* ── Gradient Backgrounds ─────────────────────────────────── */
.gradient-purple {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-alt) 100%);
}

.gradient-hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,   rgba(191, 95, 255, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 40% at 80% 80%,  rgba(42, 191, 191, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 10% 90%,  rgba(204, 85, 0, 0.07)   0%, transparent 60%),
    var(--bg-primary);
}

.gradient-section-alt {
  background:
    radial-gradient(ellipse 70% 50% at 20% 50%, rgba(138, 43, 226, 0.08) 0%, transparent 70%),
    var(--bg-alt);
}

/* ── Noise Texture Overlay ────────────────────────────────── */
.noise-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ── Star / Sparkle Decorations ───────────────────────────── */
.stars-bg {
  position: relative;
  overflow: hidden;
}

.stars-bg::after {
  content: '✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧';
  position: absolute;
  top: 0;
  left: 0;
  width: 200%;
  font-family: var(--font-pixel);
  font-size: 0.7rem;
  color: var(--purple);
  opacity: 0.15;
  letter-spacing: 0.5rem;
  line-height: 2.5;
  pointer-events: none;
  word-break: break-all;
  animation: stars-drift 20s linear infinite;
}

@keyframes stars-drift {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Decorative Star Elements ─────────────────────────────── */
.deco-star {
  position: absolute;
  font-family: var(--font-pixel);
  pointer-events: none;
  user-select: none;
  color: var(--purple);
  opacity: 0.4;
  animation: twinkle 3s ease-in-out infinite;
}

.deco-star:nth-child(2n) {
  color: var(--teal);
  animation-delay: 0.8s;
  animation-duration: 4s;
}

.deco-star:nth-child(3n) {
  color: var(--burnt-orange);
  animation-delay: 1.5s;
  animation-duration: 2.5s;
}

.deco-star:nth-child(4n) {
  color: var(--gold);
  animation-delay: 2s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.8); }
  50%       { opacity: 0.7;  transform: scale(1.2); }
}

/* ── Scrapbook / Floating Image Frames ────────────────────── */
.scrap-frame {
  position: relative;
  display: inline-block;
}

.scrap-frame::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--purple), var(--teal), var(--burnt-orange), var(--purple));
  background-size: 300% 300%;
  animation: holo-shift 4s ease infinite;
  z-index: -1;
  border-radius: var(--radius-md);
}

/* ── Photo frame with glow ────────────────────────────────── */
.photo-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 2px var(--border-purple),
    0 0 30px var(--glow-purple),
    0 0 60px rgba(191, 95, 255, 0.15);
}

.photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 60%,
    rgba(10, 0, 15, 0.6) 100%
  );
  pointer-events: none;
}

/* ── Scrolling Marquee Banner ─────────────────────────────── */
.marquee-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border-purple);
  border-bottom: 1px solid var(--border-purple);
  padding: 0.4rem 0;
  background: rgba(191, 95, 255, 0.04);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--purple);
  padding: 0 2rem;
  opacity: 0.7;
  white-space: nowrap;
}

.marquee-track span.accent {
  color: var(--burnt-orange);
}

@keyframes marquee-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── AIM / Draggable Window ───────────────────────────────── */
.aim-window {
  position: fixed;
  width: 300px;
  z-index: 1000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.8),
    0 0 0 1px var(--border-purple),
    0 0 30px var(--glow-purple);
  display: none;
  cursor: default;
  user-select: none;
}

.aim-window.active { display: block; }

.aim-titlebar {
  background: linear-gradient(90deg, var(--purple-dark), var(--purple-mid));
  padding: 0.4rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
}

.aim-titlebar span {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--text-primary);
}

.aim-close {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--parchment);
  cursor: pointer;
  line-height: 1;
  padding: 0 0.3rem;
  background: var(--deep-red);
  border-radius: 2px;
}

.aim-close:hover { background: #b02020; }

.aim-body {
  background: var(--bg-alt);
  padding: var(--space-md);
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--text-primary);
  min-height: 80px;
  border-top: 1px solid var(--border-purple);
}

/* ── Retro Pixel Border ───────────────────────────────────── */
.pixel-border {
  outline: 2px solid var(--purple);
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(191, 95, 255, 0.08);
}

/* ── Hover-reveal overlay ─────────────────────────────────── */
.hover-reveal-wrap {
  position: relative;
  overflow: hidden;
}

.hover-reveal-wrap .hover-content {
  position: absolute;
  inset: 0;
  background: rgba(10, 0, 15, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-mid);
  border-radius: inherit;
  padding: var(--space-md);
  text-align: center;
}

.hover-reveal-wrap:hover .hover-content {
  opacity: 1;
}

/* ── Cursor trail particle ────────────────────────────────── */
.cursor-particle {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  font-family: var(--font-pixel);
  font-size: 14px;
  animation: cursor-fade 0.8s ease forwards;
  transform-origin: center;
}

@keyframes cursor-fade {
  0%   { opacity: 1;   transform: scale(1)   translateY(0); }
  100% { opacity: 0;   transform: scale(0.3) translateY(-20px); }
}

/* ── Nav link underline effect ───────────────────────────── */
.nav-link {
  position: relative;
  font-family: var(--font-pixel);
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  transition: color var(--transition-fast);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--purple);
  box-shadow: 0 0 8px var(--purple);
  transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--purple);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ── Web badge (88×31) ────────────────────────────────────── */
.web-badge {
  image-rendering: pixelated;
  border: 1px solid var(--border-purple);
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}

.web-badge:hover {
  box-shadow: 0 0 10px var(--glow-purple);
  transform: scale(1.05);
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--purple), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--space-lg);
}

.timeline-item::before {
  content: '✦';
  position: absolute;
  left: -2.35rem;
  top: 0.1em;
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--burnt-orange);
}

.timeline-date {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--teal);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 0.2rem;
}

/* ── Skills grid ──────────────────────────────────────────── */
.skills-group {
  margin-bottom: var(--space-lg);
}

.skills-group h4 {
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--burnt-orange);
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* ── Project card ─────────────────────────────────────────── */
.project-card {
  padding: var(--space-lg);
  border-radius: var(--radius-md);
  transition: transform var(--transition-mid), box-shadow var(--transition-mid);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(191, 95, 255, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--border-purple),
    0 0 30px rgba(191, 95, 255, 0.1);
}

.project-card h3 {
  margin-bottom: var(--space-sm);
  font-size: 1.2rem;
}

.project-card p {
  font-size: 0.95rem;
  margin-bottom: var(--space-md);
}

.project-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.project-card-links {
  display: flex;
  gap: var(--space-sm);
}

.project-card-links a {
  font-family: var(--font-pixel);
  font-size: 0.85rem;
  color: var(--teal);
  letter-spacing: 0.05em;
  transition: color var(--transition-fast);
}

.project-card-links a:hover {
  color: var(--purple);
}

/* ── Section accent line ──────────────────────────────────── */
.accent-line {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, var(--burnt-orange), var(--purple));
  margin: var(--space-sm) 0 var(--space-md);
  border-radius: 2px;
}

/* ── "Currently" widget ───────────────────────────────────── */
.currently-widget {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--burnt-orange);
}

.currently-widget .cw-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.currently-widget .cw-row:last-child { margin-bottom: 0; }

.currently-widget .cw-label {
  font-family: var(--font-pixel);
  font-size: 0.8rem;
  color: var(--burnt-orange);
  min-width: 100px;
  letter-spacing: 0.05em;
}

.currently-widget .cw-value {
  font-size: 0.95rem;
  color: var(--text-primary);
}
