/* Home contact row follows the same component as Contact. */
#hero .hero-contact-links { margin-top: 1.5rem; }
@media (max-width: 900px) {
  #hero .profile-links { justify-content: center; }
}
@media (max-width: 640px) {
  #hero .hero-contact-links { margin-top: 1.25rem; }
}
@media (max-width: 900px) and (max-height: 740px) {
  #hero { padding-top: 5rem; padding-bottom: 4rem; }
  #hero .scroll-indicator { bottom: 1rem; }
}
@media (min-width: 901px) {
  /* Keep the portrait close to the introduction instead of stretching the text column. */
  #hero .hero-content { display: grid; grid-template-columns: minmax(0, 390px) auto; justify-content: center; max-width: 1100px; padding: 0 2rem; gap: clamp(3rem, 5vw, 5rem); }
}

#particleCanvas { pointer-events: none; }
#neuralArchitecture { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }

/* Hide top navigation bar on Hero (Section 0) on desktop; reveal on Section 1+ */
@media (min-width: 1025px) {
  #navbar {
    transition: opacity 0.42s var(--ease-smooth), transform 0.42s var(--ease-smooth), background 0.4s var(--ease-smooth), padding 0.3s, box-shadow 0.3s;
  }
  body[data-current-section="0"] #navbar {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-24px);
  }
}

/* Ensure Hero Contact Me button has crystal-clear contrast and is never washed out */
#hero .btn-outline {
  background: rgba(37, 37, 48, 0.76);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
#hero .btn-outline:hover {
  background: var(--accent);
  color: var(--bg-primary);
}

.neural-interface { position: absolute; inset: 0; z-index: 3; pointer-events: none; font-family: var(--font-body); }
.neural-input { position: absolute; width: 44px; height: 44px; transform: translate(-50%,-50%); border: 0; border-radius: 50%; background: transparent; pointer-events: auto; cursor: pointer; }
.neural-layer-label { position: absolute; top: clamp(24px, 4vh, 48px); color: var(--text-secondary); font: 400 .85rem/1.4 var(--font-body); letter-spacing: .05em; transform: translateX(-50%); }
#neuralOutputLabel { transform: translateX(-100%); }
@media (max-width: 1024px) { .neural-interface, #neuralArchitecture { display: none; } }


/* Matte output nodes keep the navigation quieter than the portrait and introduction. */
@media (min-width: 1025px) {
  body.neural-output-mode #dotNav { gap: clamp(1.2rem, 2.4vh, 1.65rem); }
  body.neural-output-mode .dot-nav-item { width: 20px; height: 20px; background: rgba(194,166,103,.07); border-color: rgba(194,166,103,.46); box-shadow: none; transition: border-color .25s, background .25s; }
  body.neural-output-mode .dot-nav-item.active { transform: none; border-color: rgba(194,166,103,.75); background: rgba(194,166,103,.17); }
  body.neural-output-mode .dot-nav-item::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; }
  body.neural-output-mode .dot-nav-item::after { display: none; }
  body.neural-output-mode .dot-nav-item .dot-nav-tooltip { right: 34px; opacity: 1; background: transparent; border: 0; padding: 0; color: var(--text-secondary); font: 400 .85rem/1.4 var(--font-body); letter-spacing: .025em; pointer-events: auto; }
  body.neural-output-mode .dot-nav-item.active .dot-nav-tooltip, body.neural-output-mode .dot-nav-item:hover .dot-nav-tooltip { color: var(--text-primary); }
}

/* Section movement uses composited properties; mobile keeps its natural scroll. */
@media (min-width: 1025px) {
  body:not(.mobile-mode) .fp-section { transition: transform .54s cubic-bezier(.22,.68,.2,1), opacity .32s ease; opacity: 0; pointer-events: none; }
  body:not(.mobile-mode) .fp-section.is-current { opacity: 1; pointer-events: auto; }
  body:not(.mobile-mode) .fp-section > .section-inner { transform: translateY(14px) scale(.99); transition: transform .48s cubic-bezier(.22,.68,.2,1); }
  body:not(.mobile-mode) .fp-section.is-current > .section-inner { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fp-section, .fp-section > .section-inner, #navbar, .reveal-item { transition: none !important; }
  .reveal-item { opacity: 1; transform: none; }
  #hero .hero-greeting, #hero .hero-name, #hero .hero-subtitle, #hero .hero-buttons, #hero .hero-right { animation: none; opacity: 1; transform: none; }
  #hero .typewriter-cursor, #hero .scroll-indicator { animation: none; }
}
