/* ============================================================
   styles.css — Custom layer on top of Tailwind CDN
   Handles: cursor, animations, pseudo-elements, keyframes,
   and component variants that can't be expressed as utilities.
   ============================================================ */

/* ── Scroll offset for fixed nav ── */
html { scroll-padding-top: 60px; }

/* ── Custom cursor ── */
body { cursor: none; }
@media (max-width: 768px) { body { cursor: auto; } }

.cursor {
  position: fixed;
  width: 6px; height: 6px;
  background: #0D9373;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease;
}
.cursor-ring {
  position: fixed;
  width: 28px; height: 28px;
  border: 1px solid #0D9373;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width .2s ease, height .2s ease, opacity .2s ease;
  opacity: .5;
}
.cursor.hover  { width: 10px; height: 10px; }
.cursor-ring.hover { width: 44px; height: 44px; opacity: .3; }
@media (max-width: 768px) { .cursor, .cursor-ring { display: none; } }

/* ── Blink cursor in hero prompt ── */
.cursor-blink {
  display: inline-block;
  width: 8px; height: 14px;
  background: #0D9373;
  animation: blink 1.1s step-end infinite;
  vertical-align: middle;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ── Hero grid background ── */
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0,0,0,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,0,0,.09) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}
html.dark .hero-grid-bg {
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
}

/* ── Scroll hint ── */
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, #5DCAA5, transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ── Reveal on scroll ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible      { opacity: 1; transform: none; }
.reveal-delay-1      { transition-delay: .1s; }
.reveal-delay-2      { transition-delay: .2s; }
.reveal-delay-3      { transition-delay: .3s; }
.reveal-delay-4      { transition-delay: .4s; }

/* ── Section tag (::after line) ── */
.section-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #0D9373;
  margin-bottom: 1.5rem;
}
.section-tag::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: #5DCAA5;
  opacity: .5;
}

/* ── Skill bar ── */
.skill-fill {
  height: 100%;
  background: #0D9373;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s cubic-bezier(.16,1,.3,1);
}
.skill-fill.animated { transform: scaleX(1); }

/* ── Avatar corner decoration ── */
.avatar-corner {
  position: absolute;
  bottom: -8px; right: -8px;
  width: calc(100% - 20px);
  max-width: 220px;
  aspect-ratio: 1;
  border: 1px solid #5DCAA5;
  border-radius: 4px;
  pointer-events: none;
  opacity: .3;
}

/* ── Nav link underline hover ── */
.nav-link {
  position: relative;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: #888780;
  text-decoration: none;
  transition: color .2s;
  cursor: none;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0; height: 1px;
  background: #0D9373;
  transition: width .25s ease;
}
.nav-link:hover       { color: #0D9373; }
.nav-link:hover::after { width: 100%; }

/* ── Hamburger animation ── */
.hamburger-bar {
  display: block;
  width: 20px; height: 1.5px;
  background: #1a1a18;
  transition: transform .3s, opacity .3s;
}
html.dark .hamburger-bar { background: #e8e6df; }
#hamburger.open .hamburger-bar:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
#hamburger.open .hamburger-bar:nth-child(2) { opacity: 0; }
#hamburger.open .hamburger-bar:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ── Mobile menu ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: #ffffff;
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
html.dark .mobile-menu { background: #131311; }
.mobile-menu.open { display: flex; }

/* ── Theme toggle icons ── */
.icon-sun  { display: none;  }
.icon-moon { display: block; }
html.dark .icon-sun  { display: block; }
html.dark .icon-moon { display: none;  }

/* ── Project card thumb diagram ── */
.project-thumb-diagram { opacity: .3; transition: opacity .3s; }
.project-card:hover .project-thumb-diagram { opacity: .6; }
