@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Inter:wght@400;600&display=swap');

:root {
  --bg: #0a0a0f;
  --bg-2: #111120;
  --fg: #e6e6f0;
  --muted: #a6a6bb;
  --neon: #ff3eb5;
  --neon-soft: #ff7ad6;
  --neon-edge: #ffa6e8;
  --brand: 'Orbitron', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  scroll-behavior: smooth;
  background: radial-gradient(1200px 800px at 50% 10%, #161628 0%, var(--bg) 55%, #07070b 100%);
  color: var(--fg);
  font-family: var(--body);
}

a { color: var(--fg); text-decoration: none; }
a:hover { color: var(--neon-soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: linear-gradient(180deg, rgba(10,10,15,0.85), rgba(10,10,15,0.55) 70%, rgba(10,10,15,0));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(255,62,181,0.15);
  box-shadow: 0 8px 24px rgba(255,62,181,0.07);
}

.brand {
  font-family: var(--brand);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.25rem;
  color: var(--neon);
  text-shadow:
    0 0 6px rgba(255,62,181,0.85),
    0 0 18px rgba(255,62,181,0.55),
    0 0 36px rgba(255,62,181,0.35);
}

.nav {
  display: flex;
  gap: 20px;
}
.nav a {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,62,181,0.25);
  box-shadow: inset 0 0 12px rgba(255,62,181,0.12);
  transition: 200ms ease;
}
.nav a:hover {
  border-color: rgba(255,62,181,0.6);
  box-shadow:
    0 0 12px rgba(255,62,181,0.25),
    inset 0 0 14px rgba(255,62,181,0.2);
  transform: translateY(-1px);
}

/* Home icon styles */
.nav .home-link {
  padding: 6px 8px; /* slightly narrower to fit square icon */
  width: 36px;
  display: grid;
  place-items: center;
}
.nav .home-link svg {
  width: 18px;
  height: 18px;
  display: block;
  filter:
    drop-shadow(0 0 4px rgba(255,62,181,0.8))
    drop-shadow(0 0 10px rgba(255,62,181,0.45));
}
.nav .home-link path {
  stroke: var(--neon);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Neon icon style to match h2 glow */
.neon-icon {
  color: var(--neon);
  filter:
    drop-shadow(0 0 6px rgba(255,62,181,0.65))
    drop-shadow(0 0 18px rgba(255,62,181,0.35))
    drop-shadow(0 0 36px rgba(255,62,181,0.2));
}
main {
  display: block;
}

.hero {
  min-height: 62vh;
  display: grid;
  place-items: center;
  gap: 24px;
  padding: 36px 20px 16px;
}

.svg-wrap {
  width: min(92vw, 920px);
  height: min(62vh, 520px);
  display: grid;
  place-items: center;
}

svg {
  max-width: 100%;
  max-height: 100%;
  overflow: visible;
}

.hero-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
}

/* Neon snake styling */
.snake {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Core stroke that draws in */
.snake-core {
  stroke: var(--neon);
  stroke-width: 4;
  filter: url(#glow);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2600ms ease-in-out forwards;
}

/* Outer glow layer for extra bloom */
.snake-glow {
  stroke: var(--neon-soft);
  stroke-width: 10;
  opacity: 0.75;
  filter: url(#glow);
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 2600ms ease-in-out forwards;
}

/* Traveling highlight "spark" */
.snake-highlight {
  stroke: var(--neon-edge);
  stroke-width: 6;
  filter: url(#glow);
  /* A short dash (12%) and long gap (88%) over normalized length */
  stroke-dasharray: 0.12 0.88;
  stroke-dashoffset: 0;
  opacity: 0.95;
  mix-blend-mode: screen;
  animation:
    travel 6s linear infinite;
  animation-delay: 2.6s; /* starts after draw completes */
}

@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes travel {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -1; }
}

.content-section {
  padding: 40px 20px;
  max-width: 960px;
  margin: 0 auto;
}
.content-section h2 {
  font-family: var(--brand);
  color: var(--neon);
  letter-spacing: 0.04em;
  text-shadow:
    0 0 6px rgba(255,62,181,0.65),
    0 0 18px rgba(255,62,181,0.35);
}
.content-section p, .content-section li {
  color: var(--fg);
  line-height: 1.7;
}
.content-section ul {
  padding-left: 1.1rem;
}

.site-footer {
  padding: 24px 20px 50px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid rgba(255,62,181,0.12);
}

/* Reduced motion: disable path animations but keep glow look */
@media (prefers-reduced-motion: reduce) {
  .snake-core,
  .snake-glow,
  .snake-highlight {
    animation: none !important;
  }
  .snake-core,
  .snake-glow {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
  }
  .snake-highlight {
    stroke-dasharray: none;
    opacity: 0.6;
  }
}

/* Responsive nav wrapping */
@media (max-width: 640px) {
  .nav {
    gap: 10px;
  }
  .nav a {
    padding: 6px 8px;
    font-size: 0.95rem;
  }
}

/* Improve focus styles for accessibility */
a:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 3px;
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(255,62,181,0.25);
}

/* Subtle container edge glow */
.content-section {
  background:
    linear-gradient(180deg, rgba(255,62,181,0.05), rgba(255,62,181,0) 30%) padding-box,
    linear-gradient(0deg, rgba(255,62,181,0.15), rgba(255,62,181,0.05)) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow:
    0 10px 30px rgba(255,62,181,0.07),
    inset 0 0 24px rgba(255,62,181,0.06);
  margin-bottom: 28px;
}
/* About section layout and portrait */
.about-layout {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
}

.profile-figure {
  margin: 0;
  text-align: center;
}

.profile-figure figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 8px;
}

.profile-img {
  width: 200px; /* initial size; will shrink on small screens */
  max-width: 40vw;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255,62,181,0.25);
  box-shadow:
    0 10px 30px rgba(255,62,181,0.07),
    inset 0 0 24px rgba(255,62,181,0.06);
}

@media (max-width: 800px) {
  .about-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .profile-figure {
    margin: 0 auto 16px;
  }
  .profile-img {
    width: 160px;
  }
}