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

:root {
  --bg: #050510;
  --bg-alt: #0a0a1a;
  --text: #e8e8f0;
  --text-muted: #8e8ea6;
  --accent: #4a8fff;
  --accent-soft: rgba(74, 143, 255, 0.12);
  --border: rgba(255, 255, 255, 0.06);
}

/* Skip link — visible only on focus for keyboard users */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family:
    'Inter',
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================
 NAVIGATION
 ============================================ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition:
    background 0.4s ease,
    padding 0.4s ease;
}

nav.scrolled {
  background: rgba(5, 5, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 3rem;
}

.nav-logo {
  font-size: 0.8rem;
  letter-spacing: 0.35em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.nav-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-logo-mark {
  display: inline-flex;
  width: 22px;
  color: rgba(232, 232, 240, 0.85);
}

.nav-logo-mark svg {
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links a:hover {
  color: var(--text);
}
.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Mobile menu button */
.nav-menu {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 24px;
  height: 18px;
  position: relative;
  z-index: 1001;
}

.nav-menu:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.nav-menu span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.3s ease;
  position: absolute;
  left: 0;
}

.nav-menu span:nth-child(1) {
  top: 0;
}
.nav-menu span:nth-child(2) {
  top: 8px;
}
.nav-menu span:nth-child(3) {
  top: 16px;
}

.nav-menu.active span:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}
.nav-menu.active span:nth-child(2) {
  opacity: 0;
}
.nav-menu.active span:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 5, 16, 0.97);
  backdrop-filter: blur(30px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
}

.mobile-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* ============================================
 HERO SECTION
 ============================================ */
#hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#neural-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Gradient overlay for text readability */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, rgba(5, 5, 16, 0.55) 0%, rgba(5, 5, 16, 0.05) 70%);
  pointer-events: none;
}

/* Soft bloom glow behind hero text */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(74, 143, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 5;
  animation: glowPulse 8s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes glowPulse {
  0%,
  100% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 2rem;
}

/* Staggered entrance animations */
.hero-content > * {
  opacity: 0;
  transform: translateY(24px);
  animation: heroElementIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-content > *:nth-child(1) {
  animation-delay: 0.1s;
}
.hero-content > *:nth-child(2) {
  animation-delay: 0.2s;
}
.hero-content > *:nth-child(3) {
  animation-delay: 0.3s;
}
.hero-content > *:nth-child(4) {
  animation-delay: 0.4s;
}
.hero-content > *:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes heroElementIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero logo mark */
.hero-logo {
  width: 120px;
  margin: 0 auto 2rem;
  color: rgba(232, 232, 240, 0.85);
}

.hero-logo svg {
  width: 100%;
  height: auto;
}

.hero-content h1 {
  font-size: 3.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 1.6rem;
  color: rgba(232, 232, 240, 0.7);
}

/* Decorative accent line */
.hero-accent {
  width: 80px;
  height: 2px;
  background: var(--accent);
  opacity: 0.7;
  margin: 0 auto 2rem;
}

.hero-tagline {
  font-size: 3.2rem;
  font-weight: 300;
  line-height: 1.3;
  margin-bottom: 2.4rem;
  /* Animated gradient text */
  background: linear-gradient(
    135deg,
    #e8e8f0 0%,
    #a8c4ff 25%,
    #e8e8f0 50%,
    #88b4ff 75%,
    #e8e8f0 100%
  );
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    heroElementIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.25s,
    gradientShift 8s ease-in-out infinite 1s;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero-sub {
  font-size: 0.92rem;
  color: rgba(232, 232, 240, 0.7);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}

.hero-sub span {
  display: inline-block;
  margin: 0 0.6em;
  opacity: 0.5;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  opacity: 0;
  animation: heroElementIn 1s ease forwards 0.8s;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%,
  100% {
    opacity: 0.3;
    transform: scaleY(0.6);
  }
  50% {
    opacity: 0.8;
    transform: scaleY(1);
  }
}

/* ============================================
 SECTIONS
 ============================================ */
.section {
  padding: 5rem 2rem;
  max-width: 740px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    transform 0.8s ease;
}

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

.section-label {
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  font-weight: 500;
}

.section h3 {
  font-size: 1.85rem;
  font-weight: 300;
  margin-bottom: 2.5rem;
  line-height: 1.35;
  color: var(--text);
}

.section p {
  font-size: 1.02rem;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
  line-height: 1.85;
}

.section p:last-of-type {
  margin-bottom: 0;
}

/* Bio / Leadership */
.bio-title {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem !important;
  margin-top: -1.5rem;
  font-weight: 400;
}

/* Emphasis block */
.emphasis {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2.5rem 0;
}

.emphasis p {
  color: var(--text);
  font-weight: 300;
  font-size: 1.08rem;
}

/* Divider */
.divider {
  width: 40px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto;
  opacity: 0.35;
  border: none;
}

/* ============================================
 CONTACT FORM
 ============================================ */
#contact-form {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-field {
  flex: 1;
}

#contact-form input,
#contact-form textarea {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  border-radius: 4px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition:
    border-color 0.3s ease,
    outline-color 0.3s ease;
  width: 100%;
}

#contact-form input::placeholder,
#contact-form textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: var(--accent);
}

#contact-form input:focus-visible,
#contact-form textarea:focus-visible {
  outline-color: var(--accent);
}

#contact-form textarea {
  resize: vertical;
  min-height: 100px;
}

#contact-form button {
  align-self: flex-start;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 0.9rem 2.5rem;
  font-family: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

#contact-form button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

#contact-form button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

/* Inline field errors */
.field-error {
  font-size: 0.78rem;
  color: #ff6b6b;
  margin-top: 0.35rem;
  min-height: 0;
}

.field-error:empty {
  display: none;
}

/* Invalid field border */
#contact-form input.invalid,
#contact-form textarea.invalid {
  border-color: #ff6b6b;
}

/* Textarea wrapper with character counter */
.textarea-wrapper {
  position: relative;
}

.char-counter {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.5;
  text-align: right;
  margin-top: 0.3rem;
}

.char-counter.near-limit {
  color: #ffaa4c;
  opacity: 1;
}

.char-counter.at-limit {
  color: #ff6b6b;
  opacity: 1;
}

/* Submit button loading state */
#contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Form success state */
.form-success {
  text-align: center;
  padding: 3rem 0;
}

.form-success p {
  color: var(--text) !important;
  font-size: 1.1rem;
}

.form-success .check {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ============================================
 FOOTER
 ============================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
  margin-top: 2rem;
}

.footer-content {
  max-width: 740px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.footer-logo {
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
}

.footer-logo:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-logo-mark {
  display: inline-flex;
  width: 20px;
  color: rgba(232, 232, 240, 0.7);
}

.footer-logo-mark svg {
  width: 100%;
  height: auto;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-links a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  opacity: 0.6;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-muted);
  opacity: 0.4;
}

/* ============================================
 RESPONSIVE
 ============================================ */
@media (max-width: 1024px) {
  .hero-tagline {
    font-size: 2.6rem;
  }
  .hero-content h1 {
    font-size: 3rem;
    letter-spacing: 0.14em;
  }
  .section {
    padding: 4rem 1.8rem;
  }
  .credential-row {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1.2rem 1.5rem;
  }
  nav.scrolled {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    display: none;
  }
  .nav-menu {
    display: block;
  }

  .hero-logo {
    width: 80px;
    margin-bottom: 1.5rem;
  }
  .nav-logo-mark {
    width: 18px;
  }
  .hero-tagline {
    font-size: 2rem;
  }
  .hero-content h1 {
    font-size: 2.4rem;
    letter-spacing: 0.12em;
  }
  .hero-sub {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
  }
  .hero-glow {
    width: 300px;
    height: 250px;
  }

  .section {
    padding: 3.5rem 1.4rem;
  }
  .section h3 {
    font-size: 1.5rem;
  }

  .form-row {
    flex-direction: column;
  }

  .credential-row {
    flex-direction: column;
    gap: 0.8rem;
  }
  .credential {
    font-size: 0.78rem;
  }
  .section-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }
  .section-icon svg {
    width: 18px;
    height: 18px;
  }

  .footer-top {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }
  .footer-logo {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.9rem;
    letter-spacing: 0.08em;
  }
  .hero-tagline {
    font-size: 1rem;
  }
  .hero-sub {
    font-size: 0.72rem;
  }
  .section {
    padding: 2.8rem 1.2rem;
  }
  .section h3 {
    font-size: 1.3rem;
  }
  .section p {
    font-size: 0.95rem;
  }
}

/* Reduced motion — comprehensive override for all animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-content > * {
    opacity: 1;
    transform: none;
  }
  .scroll-indicator {
    opacity: 0.5;
  }
  .section {
    opacity: 1;
    transform: none;
  }
  .hero-glow {
    animation: none;
    opacity: 0.8;
  }
  .hero-tagline {
    animation: none;
    opacity: 1;
    background-size: 100% 100%;
  }
}

/* Section icons */
.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(74, 143, 255, 0.15);
  margin-bottom: 1.2rem;
}
.section-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Credential badges */
.credential-row {
  display: flex;
  gap: 1.2rem;
  margin: 2rem 0 1.8rem 0;
  flex-wrap: wrap;
}
.credential {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.1rem;
  background: rgba(74, 143, 255, 0.08);
  border: 1px solid rgba(74, 143, 255, 0.18);
  border-radius: 8px;
  font-size: 0.82rem;
  color: rgba(232, 232, 240, 0.85);
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.credential strong {
  color: var(--accent);
  font-weight: 500;
}
.credential-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.credential-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Visually hidden — accessible to screen readers */
.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;
}

/* Honeypot field — visually hidden from users, catches bots */
.honeypot-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
}

/* Legal pages — standalone disclosures/privacy */
.legal-page {
  padding-top: 8rem;
}

.legal-page h2 {
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

.legal-page a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.legal-page a:hover {
  color: var(--text);
}

.legal-page a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ============================================
   PRINT STYLESHEET
   ============================================ */

@media print {
  /* Reset backgrounds for readable printing */
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  /* Hide non-content elements */
  #canvas-container,
  .canvas-container,
  canvas,
  nav,
  .scroll-indicator,
  .skip-link,
  #contact-form,
  .form-status,
  footer {
    display: none !important;
  }

  /* Expand all sections */
  .section {
    opacity: 1 !important;
    transform: none !important;
    padding: 1.5rem 0 !important;
    max-width: 100% !important;
  }

  /* Readable hero */
  .hero {
    min-height: auto !important;
    padding: 2rem 0 !important;
    position: relative !important;
  }
  .hero-content {
    position: relative !important;
    transform: none !important;
  }
  .hero-content > * {
    opacity: 1 !important;
    transform: none !important;
  }
  .hero-glow {
    display: none !important;
  }

  /* Typography */
  h1,
  h2,
  h3 {
    page-break-after: avoid;
    orphans: 3;
    widows: 3;
  }

  /* Links */
  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.85em;
    color: #555 !important;
  }
  a[href^='#']::after,
  a[href^='javascript:']::after {
    content: '';
  }

  /* Avoid breaking inside cards */
  .credential {
    page-break-inside: avoid;
  }

  /* Page margins */
  @page {
    margin: 2cm;
  }
}
