@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-green: #87ff71;
  --c-cyan: #01cdfe;
  --c-dark: #192617;
  --c-pink: #FF71CE;
  --c-purple: #B967FF;
  --c-bg: #0a0e0a;
  --c-bg2: #0f1a1c;
  --c-surface: rgba(25, 38, 23, 0.85);
  --c-text: #e8ffe4;
  --c-text-dim: #9db89a;
  --c-border: rgba(135, 255, 113, 0.25);
  --c-glow-green: 0 0 8px #87ff71, 0 0 20px rgba(135,255,113,0.4);
  --c-glow-cyan: 0 0 8px #01cdfe, 0 0 20px rgba(1,205,254,0.4);
  --c-glow-pink: 0 0 8px #FF71CE, 0 0 20px rgba(255,113,206,0.4);
  --nav-h: 60px;
  --radius-card: 28px;
  --font: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
}

body.vp-body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.65;
  min-height: 100vh;
  padding-bottom: var(--nav-h);
  overflow-x: hidden;
}

/* scroll-margin for all sections */
article[id] {
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-cyan);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}

a:hover, a:focus-visible {
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  outline: none;
}

ul, ol {
  list-style: none;
}

/* =========================================
   RETRO GRID BACKGROUND
   ========================================= */
.vp-root {
  position: relative;
}

/* =========================================
   BOTTOM FIXED NAV
   ========================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 14, 10, 0.96);
  border-top: 1px solid var(--c-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-h);
  box-shadow: 0 -4px 24px rgba(1, 205, 254, 0.12);
}

.bottom-nav-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
  gap: 0.75rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.bottom-nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-height: 40px;
  text-decoration: none;
}

.nav-logo-img {
  height: 36px;
  width: auto;
}

.nav-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  margin-left: auto;
  min-height: 40px;
  min-width: 40px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-cyan);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition), background var(--transition);
  box-shadow: var(--c-glow-cyan);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* nav menu - dropdown from bottom */
.nav-menu {
  display: none;
  position: absolute;
  bottom: calc(var(--nav-h) + 4px);
  right: 1rem;
  background: rgba(10, 14, 10, 0.98);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 0.75rem 0;
  min-width: 200px;
  box-shadow: 0 -8px 32px rgba(135, 255, 113, 0.15), 0 0 0 1px rgba(1,205,254,0.1);
  backdrop-filter: blur(16px);
  z-index: 1001;
}

.nav-menu.is-open {
  display: block;
  animation: menuReveal 0.2s ease;
}

@keyframes menuReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-menu li {
  border-bottom: 1px solid rgba(135,255,113,0.08);
}

.nav-menu li:last-child {
  border-bottom: none;
}

.nav-menu li a {
  display: block;
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--c-text);
  min-height: 40px;
  line-height: 40px;
  padding-top: 0;
  padding-bottom: 0;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
  letter-spacing: 0.02em;
}

.nav-menu li a:hover,
.nav-menu li a:focus-visible {
  color: var(--c-green);
  background: rgba(135,255,113,0.06);
  padding-left: 1.6rem;
  text-shadow: var(--c-glow-green);
  outline: none;
}

/* desktop: show inline */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
    min-width: 0;
    box-shadow: none;
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex: 1;
    animation: none;
  }

  .nav-menu li {
    border-bottom: none;
  }

  .nav-menu li a {
    font-size: 0.82rem;
    padding: 0 0.7rem;
    height: 40px;
    line-height: 40px;
    border-radius: 8px;
    min-height: 40px;
    white-space: nowrap;
  }

  .nav-menu li a:hover,
  .nav-menu li a:focus-visible {
    padding-left: 0.7rem;
    background: rgba(135,255,113,0.08);
  }
}

@media (min-width: 1100px) {
  .nav-menu li a {
    font-size: 0.9rem;
    padding: 0 0.9rem;
  }
}

/* =========================================
   HERO
   ========================================= */
.hero-section {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(160deg, #1a0030 0%, #0a1a2e 30%, #0a2a1a 60%, var(--c-dark) 100%);
  padding: 5rem 1.5rem 8rem;
}

/* scanlines overlay */
.hero-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0,0,0,0.15) 3px,
    rgba(0,0,0,0.15) 4px
  );
  pointer-events: none;
  z-index: 1;
}

/* retro perspective grid */
.hero-grid-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55%;
  background:
    linear-gradient(rgba(1,205,254,0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(1,205,254,0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  transform: perspective(300px) rotateX(40deg);
  transform-origin: bottom center;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  text-align: left;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--c-pink), var(--c-purple));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
  box-shadow: var(--c-glow-pink);
  text-transform: uppercase;
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.hero-h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  background: linear-gradient(135deg, var(--c-green) 0%, var(--c-cyan) 50%, var(--c-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 12px rgba(135,255,113,0.35));
  letter-spacing: -0.01em;
}

.hero-lead {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--c-text-dim);
  margin-bottom: 2rem;
  max-width: 520px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  background: linear-gradient(90deg, var(--c-green), var(--c-cyan));
  color: var(--c-dark);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  letter-spacing: 0.04em;
  min-height: 44px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 20px rgba(135,255,113,0.3);
  transition: transform var(--transition), box-shadow var(--transition);
}

.hero-cta:hover, .hero-cta:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 32px rgba(135,255,113,0.5);
  color: var(--c-dark);
  text-shadow: none;
  outline: none;
}

.hero-media {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 1;
  overflow: hidden;
  opacity: 0.35;
}

.hero-media .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: hue-rotate(20deg) saturate(1.4);
}

/* skew clip bottom */
.hero-clip {
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--c-bg);
  clip-path: polygon(0 40px, 100% 0, 100% 100%, 0 100%);
  z-index: 3;
}

@media (max-width: 767px) {
  .hero-section {
    min-height: 70vh;
    padding: 4rem 1.25rem 6rem;
  }
  .hero-media {
    display: none;
  }
}

/* =========================================
   MAIN & WRAP
   ========================================= */
.site-main {
  padding: 3rem 1rem 2rem;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
}

/* content-section: div + aside */
.content-section {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .content-section {
    grid-template-columns: 1fr;
  }
  .content-aside {
    order: -1;
  }
}

/* =========================================
   CONTENT ARTICLE
   ========================================= */
.content-article {
  min-width: 0;
}

.page-content {
  line-height: 1.75;
}

/* Style page.content sections */
.page-content article {
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--c-border);
  scroll-margin-top: calc(var(--nav-h) + 12px);
}

.page-content article:last-child {
  border-bottom: none;
}

.page-content h2 {
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.page-content h2 + p,
.page-content h2 + .subtitle {
  color: var(--c-text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.page-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--c-cyan);
  margin-top: 1.75rem;
  margin-bottom: 0.6rem;
  text-shadow: var(--c-glow-cyan);
}

.page-content p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-text);
  margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
}

.page-content ul {
  list-style: disc;
}

.page-content ol {
  list-style: decimal;
}

.page-content li {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 0.4rem;
  color: var(--c-text);
}

.page-content a {
  color: var(--c-cyan);
  border-bottom: 1px solid rgba(1,205,254,0.3);
}

.page-content a:hover {
  color: var(--c-green);
  border-color: var(--c-green);
}

.page-content blockquote {
  border-left: 3px solid var(--c-pink);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: rgba(255,113,206,0.05);
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--c-text-dim);
}

.page-content strong {
  color: var(--c-green);
  font-weight: 600;
}

.page-content em {
  color: var(--c-cyan);
  font-style: normal;
  font-weight: 500;
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.92rem;
}

.page-content th {
  background: rgba(135,255,113,0.1);
  color: var(--c-green);
  padding: 0.6rem 0.9rem;
  text-align: left;
  border: 1px solid var(--c-border);
  font-weight: 600;
}

.page-content td {
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(135,255,113,0.1);
  color: var(--c-text);
}

.page-content tr:nth-child(even) td {
  background: rgba(1,205,254,0.04);
}

/* =========================================
   ASIDE
   ========================================= */
.content-aside {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.aside-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-card);
  padding: 1.4rem 1.25rem;
  backdrop-filter: blur(8px);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.aside-card:hover {
  border-color: rgba(135,255,113,0.5);
  box-shadow: 0 0 16px rgba(135,255,113,0.1);
}

.aside-card h2 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  margin-bottom: 0.25rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.aside-card .subtitle {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-bottom: 0.9rem;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.aside-links li a {
  display: block;
  font-size: 0.88rem;
  color: var(--c-text-dim);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  min-height: 36px;
  line-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  transition: color var(--transition), background var(--transition), padding-left var(--transition);
  border-bottom: none;
}

.aside-links li a:hover,
.aside-links li a:focus-visible {
  color: var(--c-cyan);
  background: rgba(1,205,254,0.08);
  padding-left: 1rem;
  text-shadow: var(--c-glow-cyan);
  outline: none;
}

.aside-tip-text {
  font-size: 0.85rem;
  color: var(--c-text-dim);
  line-height: 1.6;
}

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
  background: linear-gradient(180deg, var(--c-dark) 0%, #080d08 100%);
  border-top: 1px solid var(--c-border);
  margin-top: 3rem;
  padding-bottom: calc(var(--nav-h) + 1rem);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

@media (max-width: 640px) {
  .footer-main {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem 1.25rem;
  }
}

.footer-logo-img {
  height: 40px;
  width: auto;
  margin-bottom: 1rem;
}

.footer-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  display: block;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.footer-brand-desc {
  font-size: 0.88rem;
  color: var(--c-text-dim);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.footer-keyword {
  font-size: 0.78rem;
  color: rgba(135,255,113,0.45);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-cyan);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  text-shadow: var(--c-glow-cyan);
}

.footer-col-title + .subtitle {
  font-size: 0.78rem;
  color: var(--c-text-dim);
  margin-bottom: 1rem;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.footer-nav-list li a {
  font-size: 0.88rem;
  color: var(--c-text-dim);
  display: block;
  padding: 0.3rem 0;
  min-height: 36px;
  line-height: 36px;
  transition: color var(--transition), padding-left var(--transition);
  border-bottom: none;
}

.footer-nav-list li a:hover,
.footer-nav-list li a:focus-visible {
  color: var(--c-green);
  padding-left: 0.5rem;
  text-shadow: var(--c-glow-green);
  outline: none;
}

/* contact article */
.footer-contact {
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
  padding: 2.5rem 1.5rem;
}

.footer-contact-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-contact-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-green);
  text-shadow: var(--c-glow-green);
  margin-bottom: 0.3rem;
}

.footer-contact-title + .subtitle {
  font-size: 0.88rem;
  color: var(--c-text-dim);
  margin-bottom: 1.5rem;
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-form input[type="email"],
.footer-form textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 0.92rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
  min-height: 44px;
  resize: vertical;
}

.footer-form input[type="email"]::placeholder,
.footer-form textarea::placeholder {
  color: var(--c-text-dim);
}

.footer-form input[type="email"]:focus,
.footer-form textarea:focus {
  border-color: var(--c-cyan);
  box-shadow: 0 0 0 2px rgba(1,205,254,0.15);
}

.footer-submit {
  align-self: flex-start;
  background: linear-gradient(90deg, var(--c-cyan), var(--c-green));
  color: var(--c-dark);
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1.75rem;
  cursor: pointer;
  letter-spacing: 0.04em;
  min-height: 44px;
  transition: transform var(--transition), box-shadow var(--transition);
}

.footer-submit:hover,
.footer-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(1,205,254,0.35);
  outline: none;
}

/* footer bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
}

.footer-copy {
  font-size: 0.82rem;
  color: var(--c-text-dim);
}

.footer-bottom-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  font-size: 0.82rem;
  color: var(--c-text-dim);
  border-bottom: none;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-bottom-links a:hover {
  color: var(--c-green);
}

/* =========================================
   SUBTITLE CLASS (structural contract)
   ========================================= */
p.subtitle {
  font-size: 0.9rem;
  color: var(--c-text-dim);
  margin-bottom: 1rem;
  line-height: 1.55;
}

/* =========================================
   GLITCH ANIMATION (decorative)
   ========================================= */
@keyframes glitch {
  0%, 100% { clip-path: inset(0 0 95% 0); transform: translate(-2px, 0); }
  20%       { clip-path: inset(30% 0 50% 0); transform: translate(2px, 0); }
  40%       { clip-path: inset(70% 0 10% 0); transform: translate(-1px, 0); }
  60%       { clip-path: inset(10% 0 80% 0); transform: translate(1px, 0); }
  80%       { clip-path: inset(50% 0 30% 0); transform: translate(0, 0); }
}

/* =========================================
   SCROLL REVEAL
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =========================================
   UTILITY
   ========================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
