/* ===========================
   GLOBAL BASE & TOKENS
   =========================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

:root {
  --neon-blue: #16a34a;         /* accent green */
  --deep-blue: #15803d;         /* deeper green */
  --panel-radius: 18px;

  --t-fast: 0.25s;
  --t-med: 0.6s;
  --t-slow: 18s;

  --e-smooth: cubic-bezier(0.22, 0.61, 0.36, 1);
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: radial-gradient(circle at top left, #f9fafb 0, #e5e7eb 45%, #e5e7eb 100%);
  color: #111827;
  line-height: 1.6;
}

/* ===========================
   GLOBAL PCB TRACKS + PULSE LINES
   =========================== */

/* Static horizontal tracks across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  /* thin horizontal traces */
  background:
    radial-gradient(circle at top, rgba(209, 213, 219, 0.9), #e5e7eb 70%),
    repeating-linear-gradient(
      to bottom,
      rgba(243, 244, 246, 0.0) 0 14px,
      rgba(209, 213, 219, 0.9) 14px 15px,
      rgba(243, 244, 246, 0.0) 15px 28px
    );
  opacity: 0.6;
}

/* Bright data pulses travelling along a few of those tracks */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  background:
    /* upper track pulses */
    repeating-linear-gradient(
      to right,
      transparent 0 130px,
      rgba(34, 197, 94, 0.9) 130px 150px,
      transparent 150px 260px
    ) 0 25% / 260px 2px repeat-x,
    /* middle track pulses */
    repeating-linear-gradient(
      to right,
      transparent 0 150px,
      rgba(22, 163, 74, 0.8) 150px 168px,
      transparent 168px 300px
    ) 0 55% / 300px 2px repeat-x,
    /* lower track pulses */
    repeating-linear-gradient(
      to right,
      transparent 0 110px,
      rgba(74, 222, 128, 0.8) 110px 126px,
      transparent 126px 240px
    ) 0 82% / 240px 2px repeat-x;
  mix-blend-mode: multiply;
  opacity: 0.55;
  animation: pcbPulseLines 6s linear infinite;
}

/* pulses slide horizontally along the tracks */
@keyframes pcbPulseLines {
  from {
    background-position:
      0 25%,
      0 55%,
      0 82%;
  }
  to {
    background-position:
      260px 25%,
      300px 55%,
      240px 82%;
  }
}

/* Layout helpers */
main {
  padding-top: 80px; /* space for topbar */
}

section {
  padding: 80px min(6vw, 72px);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 2.4vw, 2.3rem);
  font-weight: 700;
  color: #0f172a;
}

/* Neon Green Highlight */
.eyebrow {
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neon-blue);
  margin-bottom: 10px;
}

/* ===========================
   TOP BAR
   =========================== */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(22, 163, 74, 0.18);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: conic-gradient(from 180deg, #4ade80, #22c55e, #15803d, #4ade80);
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.6);
}

.brand-text {
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;      /* remove underline for link */
}

.brand-text span {
  color: var(--neon-blue);
}

/* optional: show it's clickable on hover */
.brand-link:hover {
  opacity: 0.9;
  cursor: pointer;
}

.nav {
  display: flex;
  gap: 18px;
  font-size: 0.85rem;
}

.nav a {
  color: #6b7280;
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.2s ease;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, #4ade80, #22c55e);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.nav a:hover {
  color: #0f172a;
}

.nav a:hover::after {
  width: 100%;
}

/* ===========================
   HERO + PCB GRID BACKGROUND
   =========================== */

.hero {
  padding-top: 96px;
  padding-bottom: 72px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at top, #ffffff 0, #f3f4f6 60%, #e5e7eb 100%);
}

/* Faint PCB-like grid drifting diagonally */
.hero::before {
  content: "";
  position: absolute;
  inset: -40px;
  pointer-events: none;
  background-image:
    linear-gradient(
      rgba(209, 213, 219, 0.7) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(209, 213, 219, 0.7) 1px,
      transparent 1px
    );
  background-size: 32px 32px;
  mix-blend-mode: soft-light;
  opacity: 0.35;
  z-index: 0;
  animation: pcbGridDrift var(--t-slow) linear infinite;
}

@keyframes pcbGridDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 80px 80px, -80px -80px;
  }
}

.hero-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 40px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.hero-text h1 {
  font-size: clamp(2.3rem, 4vw, 3rem);
  line-height: 1.15;
  color: #0f172a;
  margin-bottom: 16px;
}

.hero-body {
  font-size: 0.98rem;
  color: #4b5563;
  max-width: 580px;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 30px;
}

.meta-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: radial-gradient(circle at top left, rgba(190, 242, 100, 0.15), #ffffff);
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #16a34a;
  letter-spacing: 0.08em;
}

.meta-value {
  font-size: 0.88rem;
  font-weight: 500;
  color: #111827;
}

/* ===========================
   PCB TRACE BORDER EFFECT
   =========================== */

.hero-panel,
.card,
.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--panel-radius);
  border: 1px solid rgba(22, 163, 74, 0.25);
  transform-origin: center;
  transition:
    transform var(--t-fast) var(--e-smooth),
    box-shadow var(--t-fast) var(--e-smooth),
    border-color var(--t-fast) var(--e-smooth);
}

/* base glowing border */
.hero-panel::before,
.card::before,
.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(52, 211, 153, 0.18);
  pointer-events: none;
}

/* moving trace segments around the perimeter */
.hero-panel::after,
.card::after,
.metric-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    /* top trace */
    linear-gradient(
      90deg,
      transparent 0 40%,
      rgba(52, 211, 153, 0.9) 48% 52%,
      transparent 60% 100%
    ) top / 220% 2px repeat-x,
    /* bottom trace */
    linear-gradient(
      90deg,
      transparent 0 40%,
      rgba(74, 222, 128, 0.85) 48% 52%,
      transparent 60% 100%
    ) bottom / 220% 2px repeat-x,
    /* left trace */
    linear-gradient(
      180deg,
      transparent 0 40%,
      rgba(52, 211, 153, 0.85) 48% 52%,
      transparent 60% 100%
    ) left / 2px 220% repeat-y,
    /* right trace */
    linear-gradient(
      180deg,
      transparent 0 40%,
      rgba(74, 222, 128, 0.85) 48% 52%,
      transparent 60% 100%
    ) right / 2px 220% repeat-y;
  opacity: 0.7;
  animation: pcbTraceRun 3.5s linear infinite;
}

/* hero heading + avatar */
.hero-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
}

.hero-heading h1 {
  margin-bottom: 0; /* we already add spacing via .hero-header */
}

/* circular PCB-style avatar */
.hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;

  border: 2px solid rgba(52, 211, 153, 0.9); /* neon green */
  box-shadow:
    0 0 0 4px rgba(190, 242, 100, 0.4),
    0 0 30px rgba(34, 197, 94, 0.5);
}

/* mobile: stack avatar above text if needed */
@media (max-width: 640px) {
  .hero-header {
    align-items: flex-start;
    gap: 14px;
  }

  .hero-avatar {
    width: 80px;
    height: 80px;
  }
}

@keyframes pcbTraceRun {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0;
  }
  to {
    background-position:
      -220% 0,
      220% 0,
      0 -220%,
      0 220%;
  }
}

/* hover: slight lift and stronger glow */
.hero-panel:hover,
.card:hover,
.metric-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  border-color: rgba(52, 211, 153, 0.9);
}

/* ===========================
   HERO PANEL CONTENT
   =========================== */

.hero-panel {
  padding: 20px 22px 22px;
  background: #ffffff;
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.12),
    0 0 30px rgba(22, 163, 74, 0.18);
  z-index: 1;
}

.hero-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.snapshot-list {
  list-style: none;
  margin-bottom: 18px;
}

.snapshot-list li {
  display: flex;
  flex-direction: column;
  padding: 10px 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.9);
}

.snapshot-list li:last-child {
  border-bottom: none;
}

.snap-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #16a34a;
}

.snap-value {
  font-size: 0.9rem;
  color: #111827;
}

/* ===========================
   BUTTONS
   =========================== */

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.15s var(--e-smooth),
    box-shadow 0.15s var(--e-smooth),
    background 0.15s var(--e-smooth),
    border-color 0.15s var(--e-smooth);
}

.primary-btn {
  background: linear-gradient(to right, #22c55e, #16a34a);
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(16, 185, 129, 0.55);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 45px rgba(16, 185, 129, 0.75);
}

.ghost-btn {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.9);
  color: #111827;
}

.ghost-btn:hover {
  background: rgba(243, 244, 246, 0.9);
}

/* ===========================
   PCB TRACE DIVIDER (SCAN LINE)
   =========================== */

.section-divider {
  width: 100%;
  height: 3px;
  margin: 50px 0;
  overflow: hidden;
  position: relative;
  background: rgba(209, 213, 219, 0.8);
}

/* faint moving scan bar */
.section-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0,
    rgba(52, 211, 153, 0.95) 20%,
    rgba(190, 242, 100, 0.95) 50%,
    rgba(52, 211, 153, 0.95) 80%,
    transparent 100%
  );
  transform: translateX(-100%);
  opacity: 0.9;
  animation: scanSweep 3s linear infinite;
}

@keyframes scanSweep {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* ===========================
   ABOUT – PCB LAB CARD
   =========================== */

.about {
  max-width: 1120px;
  margin: 0 auto;
}

.about-inner {
  position: relative;
  display: flex;
  gap: 22px;
  align-items: stretch;
}

/* vertical PCB “spine” */
.about-accent {
  width: 6px;
  border-radius: 999px;
  background:
    linear-gradient(
      180deg,
      rgba(74, 222, 128, 1),
      rgba(22, 163, 74, 0.5),
      rgba(209, 213, 219, 0.9)
    );
  box-shadow: 0 0 18px rgba(74, 222, 128, 0.7);
}

.about-content {
  flex: 1;
  padding: 24px 26px 26px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(190, 242, 100, 0.35), #ffffff);
  border: 1px solid rgba(22, 163, 74, 0.3);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  position: relative;
  overflow: hidden;
}

/* faint PCB-style overlay grid in the card */
.about-content::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.12;
  background-image:
    linear-gradient(
      rgba(209, 213, 219, 0.7) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(209, 213, 219, 0.7) 1px,
      transparent 1px
    );
  background-size: 18px 18px;
  mix-blend-mode: soft-light;
}

.about-title {
  font-size: 1.4rem;
  margin-bottom: 14px;
  color: #0f172a;
}

.about-text {
  position: relative;
  font-size: 0.96rem;
  color: #4b5563;
  line-height: 1.7;
  margin-bottom: 10px;
  z-index: 1; /* above the grid overlay */
}

/* subtle “data bracket” on left of each paragraph */
.about-text::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0.6em;
  width: 4px;
  height: 65%;
  border-radius: 999px;
  background: linear-gradient(to bottom, #4ade80, transparent);
  opacity: 0.7;
}

.about-tags {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  z-index: 1;
  position: relative;
}

.about-tags span {
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.7);
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #166534;
}

/* ===========================
   PILLARS / CARDS
   =========================== */

.pillars {
  max-width: 1120px;
  margin: 0 auto;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

/* cards inherit PCB border effect */
.card {
  background: #ffffff;
  padding: 22px 22px 20px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #0f172a;
}

.card p {
  font-size: 0.9rem;
  color: #4b5563;
  margin-bottom: 10px;
}

.card ul {
  list-style: none;
  font-size: 0.85rem;
  color: #065f46;
}

.card li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}

.card li::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  left: 2px;
  top: 8px;
  background: linear-gradient(to bottom, #4ade80, #22c55e);
}

/* ===========================
   METRICS + NETWORK FEEL
   =========================== */

.metrics {
  max-width: 1120px;
  margin: 0 auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  position: relative;
  padding: 10px;
}

/* faint glowing "nodes" behind metric cards */
.metrics-grid::before {
  content: "";
  position: absolute;
  inset: -10px;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(74, 222, 128, 0.18) 0, transparent 60%),
    radial-gradient(circle at 80% 70%, rgba(22, 163, 74, 0.22) 0, transparent 60%);
  background-size: 180px 180px, 220px 220px;
  opacity: 0.5;
  animation: nodeDrift var(--t-slow) linear infinite;
  z-index: 1;
}

@keyframes nodeDrift {
  from {
    background-position: 0 0, 0 0;
  }
  to {
    background-position: 120px 90px, -140px -100px;
  }
}

.metric-card {
  padding: 18px 18px 16px;
  background: #ffffff;
  position: relative;
  z-index: 2;
}

.metric-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #16a34a;
}

.metric-value {
  display: block;
  font-size: 1.6rem;
  font-weight: 700;
  color: #111827;
  margin: 4px 0 6px;
}

.metric-card p {
  font-size: 0.86rem;
  color: #6b7280;
}

/* ===========================
   TECH STACK
   =========================== */

.stack {
  max-width: 1120px;
  margin: 0 auto;
}

.stack-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.stack-column h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #0f172a;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list li {
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f9fafb;
  border: 1px solid rgba(148, 163, 184, 0.9);
  color: #374151;
  cursor: default;

  /* smooth hover animation */
  transition:
    transform 0.18s var(--e-smooth),
    background 0.18s var(--e-smooth),
    border-color 0.18s var(--e-smooth),
    box-shadow 0.18s var(--e-smooth),
    color 0.18s var(--e-smooth);
}

/* hover: upscale + green highlight */
.tag-list li:hover {
  transform: translateY(-2px) scale(1.06);
  background: radial-gradient(circle at top, rgba(34, 197, 94, 0.85), #ffffff);
  border-color: rgba(52, 211, 153, 0.95);
  box-shadow: 0 10px 26px rgba(22, 163, 74, 0.55);
  color: #0f172a;
}

/* ===========================
   CONTACT
   =========================== */

.contact {
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  border-bottom: 1px solid rgba(209, 213, 219, 0.9);
  background: radial-gradient(circle at center, #f9fafb, #e5e7eb);
}

.contact-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}

.contact-text {
  max-width: 520px;
  font-size: 0.9rem;
  color: #4b5563;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===========================
   FOOTER
   =========================== */

.footer {
  padding: 22px 20px 26px;
  text-align: center;
  font-size: 0.8rem;
  color: #6b7280;
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  background: #ffffff;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-panel {
    max-width: 400px;
  }

  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  section {
    padding-inline: 18px;
  }

  .hero {
    padding-top: 80px;
  }

  .about-inner {
    flex-direction: column;
  }

  .about-accent {
    display: none;
  }

  .about-content {
    padding: 20px 18px 22px;
  }

  .about-text::before {
    left: -8px;
  }

  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===========================
   REDUCED MOTION SUPPORT
   =========================== */

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
