:root {
  --header-height: 80px;
  /* accent color used for the thin blue divider */
  --accent: #00e5ff;
}

/* keep header pinned to the very top */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 1000;
}

/* offset *all* page content below the header */
main {
  padding-top: var(--header-height);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

/* Section layout */
section {
  position: relative;
  padding-top: calc(4rem + 4px);
  /* let navigation anchor directly to the very top */
  scroll-margin-top: 0;
}
/* add a thin accent line to the top of every section */
section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent);
  z-index: 0;
}

/* Slim full-width hero banner */
#home {
  margin-top: calc(-1 * var(--header-height));
  padding-top: 0;
  scroll-margin-top: 0;
}

.hero-banner {
  display: block;
  position: relative;
  top: -1px;
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc((100% - 100vw) / 2);
  max-height: 250px;
  object-fit: cover;
  border-radius: 0 0 10px 10px;
  z-index: 1;
}

#home .content {
  position: relative;
  z-index: 2;
}

/* Remove per-element transitions and drive all fades here */
.in-view {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Service & Project cards */
.service-card,
.project-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, background 0.3s ease, box-shadow 0.3s ease;
}
.service-card:hover,
.project-card:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
}

.service-icon img,
.project-icon img {
  filter: brightness(1.2);
}

#services h2,
#projects h2 {
  text-align: center;
  position: relative;
  margin-bottom: 2rem;
}
#services h2::after,
#projects h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 0.5rem auto 0;
  border-radius: 2px;
}

/* Laser beam animation */
.laser-beam {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 200vw;
  height: 3px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent), 0 0 12px var(--accent);
  pointer-events: none;
  z-index: 3000;
  transform-origin: center;
  opacity: 1;
  animation: laser-move var(--duration) linear forwards,
             laser-fade 2s linear forwards;
}

@keyframes laser-move {
  from {
    transform: translateX(-50vw) rotate(var(--angle));
  }
  to {
    transform: translateX(50vw) rotate(var(--angle));
  }
}

@keyframes laser-fade {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Lightning beam animation */
.lightning-beam {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2000;
}

.lightning-beam polyline {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px var(--accent)) drop-shadow(0 0 12px var(--accent));
  opacity: 1;
}

@keyframes lightning-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes lightning-fade {
  to {
    opacity: 0;
  }
}
