/* ─── DOCUMENT HEADER (above hero name) ─── */
.doc-header {
  position: absolute;
  top: 72px;
  right: 40px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 96px 40px 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}


/* ─── HERO DOSSIER FRAME ─── */
/* Corner registration marks: L-shaped arms drawn as background gradients */
.hero::before {
  content: '';
  position: absolute;
  inset: 76px 20px 20px;
  pointer-events: none;
  z-index: 0;
  background:
    /* top-left horizontal */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 0 0 / 28px 1px no-repeat,
    /* top-left vertical */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 0 0 / 1px 28px no-repeat,
    /* top-right horizontal */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 100% 0 / 28px 1px no-repeat,
    /* top-right vertical */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 100% 0 / 1px 28px no-repeat,
    /* bottom-left horizontal */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 0 100% / 28px 1px no-repeat,
    /* bottom-left vertical */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 0 100% / 1px 28px no-repeat,
    /* bottom-right horizontal */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 100% 100% / 28px 1px no-repeat,
    /* bottom-right vertical */
    linear-gradient(rgba(167, 139, 250, 0.35), rgba(167, 139, 250, 0.35)) 100% 100% / 1px 28px no-repeat;
}

/* Subtle technical mesh grid behind hero content */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(167, 139, 250, 0.035) 0px,
      rgba(167, 139, 250, 0.035) 1px,
      transparent 1px,
      transparent 48px),
    repeating-linear-gradient(90deg,
      rgba(167, 139, 250, 0.035) 0px,
      rgba(167, 139, 250, 0.035) 1px,
      transparent 1px,
      transparent 48px);
  mask-image: radial-gradient(ellipse 85% 75% at 30% 50%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 30% 50%, black 30%, transparent 75%);
}

.hero-voxel-bg {
  position: absolute;
  /* Anchor to the right half of the hero */
  top: 50%;
  right: -80px;
  transform: translateY(-50%);
  width: min(780px, 65vw);
  aspect-ratio: 1 / 1;
  pointer-events: none;
  z-index: 0;

  background-image: url('voxel_bg.png');
  background-size: cover;
  background-position: center;

  opacity: 0.2;
  mix-blend-mode: lighten;

  /* Mask: strong center-right, fades softly to nothing left and bottom */
  mask-image: radial-gradient(ellipse 90% 80% at 70% 45%,
      black 15%,
      rgba(0, 0, 0, 0.6) 55%,
      transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 70% 45%,
      black 15%,
      rgba(0, 0, 0, 0.6) 55%,
      transparent 85%);
}

/* WebGL active: hide PNG, switch to screen blend (additive glow on dark bg) */
.hero-voxel-bg.has-webgl {
  background-image: none;
  opacity: 1;
  mix-blend-mode: screen;
}

/* Voxel canvas: fills parent square, fades in on first WebGL frame */
#voxel-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 1.6s ease;
}

#voxel-canvas.voxel-ready {
  opacity: 1;
}

/* Slightly reduce on mid-width screens where rails aren't visible */
@media (max-width: 900px) {
  .hero-voxel-bg {
    display: none;
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  min-width: 0;
  width: 100%;
  user-select: none;
}

/* Left document margin rule: fades top and bottom */
.hero-inner::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(167, 139, 250, 0.2) 15%,
      rgba(167, 139, 250, 0.2) 85%,
      transparent 100%);
  pointer-events: none;
}

/* Full-bleed rule helper */
.rule {
  display: block;
  position: relative;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 0;
}

.rule.accent {
  background: linear-gradient(90deg,
      rgba(167, 139, 250, 0.3),
      rgba(45, 212, 191, 0.12) 50%,
      rgba(167, 139, 250, 0.3));
}

.rule.full-bleed {
  position: relative;
  left: 50%;
  right: 50%;
  width: 100vw;
  margin-left: -50vw;
}

/* ─── HERO NAME BLOCK ─── */
.hero-eyebrow {
  font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.hero-eyebrow::before {
  content: none;
}

.hero-eyebrow::after {
  content: '_';
  color: var(--accent-bright);
  animation: blink 1.1s step-end infinite;
  margin-left: 4px;
  opacity: 0.7;
}

.hero-name {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(56px, 9vw, 112px);
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1.05;
  color: var(--text);
  margin-bottom: 0;
  transform: skewX(-8deg);
  display: inline-block;
}

/* ─── HERO IMPACT LINE ─── */
.hero-impact {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  max-width: 640px;
  margin-top: 20px;
  margin-bottom: 0;
  letter-spacing: -0.2px;
}

/* ─── HERO BOTTOM ROW (socials + actions side by side) ─── */
.hero-bottom-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-bottom-row .hero-socials {
  margin-top: 0;
  margin-bottom: 0;
}

.hero-bottom-row .hero-actions {
  margin-top: 0;
}

/* ─── METADATA MANIFEST ─── */
.hero-manifest {
  margin-top: 36px;
  margin-bottom: 0;
}

.manifest-rule {
  height: 1px;
  background: linear-gradient(90deg,
      rgba(167, 139, 250, 0.2),
      rgba(45, 212, 191, 0.07) 60%,
      transparent);
  margin-bottom: 16px;
}

.manifest-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  align-items: start;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.manifest-col {
  padding-right: 24px;
}

.manifest-col:not(:last-child) {
  border-right: 1px solid var(--border);
  padding-right: 24px;
}

.manifest-key {
  font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 5px;
  display: block;
}

.manifest-val {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

.manifest-val strong {
  font-weight: 500;
  color: var(--text);
}

.manifest-col:not(:first-child) {
  padding-left: 24px;
}

.manifest-status-live {
  display: inline-flex;
  align-items: flex-start;
  gap: 7px;
  line-height: 1.55;
}

.manifest-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cat-security);
  flex-shrink: 0;
  margin-top: 5px;
  animation: pulse-dot 1.8s ease-in-out infinite, radar-ping 2.4s ease-out infinite;
}

.manifest-classify {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-bright);
  border: 1px solid rgba(167, 139, 250, 0.35);
  padding: 5px 10px;
  border-radius: 2px;
  line-height: 1.6;
}

.manifest-classify::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-bright);
  opacity: 0.8;
}

/* ─── ABSTRACT ─── */
.hero-abstract {
  margin-top: 24px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.abstract-marker {
  font-family: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 5px;
  white-space: nowrap;
}

.abstract-body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 680px;
  min-width: 0;
  text-align: left;
  overflow-wrap: break-word;
}

/* ─── HERO SOCIALS & ACTIONS ─── */
.hero-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
  margin-bottom: 0;
  align-items: center;
}

.hero-social {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-width: 34px;
  border: 1px solid var(--border-bright);
  border-radius: 2px;
  color: var(--text-tertiary);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}

.hero-social svg {
  width: 14px;
  height: 14px;
}

.hero-social:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  background: var(--accent-dim);
}

.hero-social-location {
  cursor: default;
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--text-tertiary);
  opacity: 0.7;
  position: relative;
}

.hero-social-location:hover {
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--text-tertiary);
  background: transparent;
}

/* Tooltip on location icon */
.hero-social-location::after {
  content: attr(aria-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
}

.hero-social-location:hover::after {
  opacity: 1;
}

/* Resume icon: spinning comet border + tooltip */
@property --resume-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes resume-border-spin {
  to { --resume-angle: 360deg; }
}

.hero-social-resume {
  position: relative;
  border-color: transparent;
}

.hero-social-resume::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 3px;
  padding: 1px;
  background: conic-gradient(from var(--resume-angle),
    rgba(124, 58, 237, 0)    0deg,
    rgba(124, 58, 237, 0.5)  60deg,
    rgba(167, 139, 250, 0.9) 90deg,
    rgba(196, 181, 253, 1)   110deg,
    rgba(167, 139, 250, 0.5) 150deg,
    rgba(124, 58, 237, 0)    200deg,
    rgba(124, 58, 237, 0)    360deg
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask-composite: exclude;
  animation: resume-border-spin 3s linear infinite;
  pointer-events: none;
}

.hero-social-resume:hover {
  color: var(--accent-bright);
  border-color: transparent;
  background: var(--accent-dim);
}

.hero-social-resume::after {
  content: 'Resume';
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface3);
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 1;
}

.hero-social-resume:hover::after {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-social-resume::before {
    animation: none;
    background: rgba(167, 139, 250, 0.35);
  }
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 28px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  background: var(--accent-deep);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-radius: 2px;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.25), 0 0 12px rgba(124, 58, 237, 0.35);
  transition: background 0.2s, box-shadow 0.2s, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 0 0 1px rgba(167, 139, 250, 0.5), 0 0 22px rgba(124, 58, 237, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid var(--border-bright);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

