/* ============================================================
   JOB DESCRIPTION PAGE — Dark/Tech Aesthetic
   Drop-in replacement for assets/css/jobdescription.css
   ============================================================ */

/* ── Progress Bar ── */
#read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--accent2));
  z-index: 9999;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px var(--neon-glow);
}

/* ── Page Shell ── */
.job-page {
  background: var(--bg);
  font-family: var(--font-body);
  color: var(--text-primary);
  min-height: 100vh;
}

/* ── Hero ── */
.job-hero {
  position: relative;
  padding: 140px 0 90px;
  overflow: hidden;
  background: var(--bg);
}

/* Animated grid background */
.job-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse 80% 60% at 50% 0%,
    black 40%,
    transparent 100%
  );
  pointer-events: none;
}

/* Radial glow at top */
.job-hero::after {
  content: "";
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(
    ellipse,
    rgba(0, 240, 255, 0.1) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.job-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 1;
}

/* Back link */
.job-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 0.04em;
  margin-bottom: 48px;
  transition: color 0.2s;
}
.job-back-link:hover {
  color: var(--neon);
}
.job-back-link i {
  font-size: 0.85rem;
}

/* Hero content */
.job-hero-content {
  max-width: 760px;
}

.job-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--neon);
  margin-bottom: 24px;
}
.job-kicker::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px var(--neon);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.job-hero-content h1 {
  font-family: var(--font-main);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin: 0 0 20px;
}

.job-hero-copy {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 540px;
  margin: 0 0 40px;
  font-weight: 300;
}

/* Meta tags — pill style */
.job-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.job-meta li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 0.82rem;
}
.job-meta li span {
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
}
.job-meta li strong {
  color: var(--text-primary);
  font-weight: 500;
}
.job-meta li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--neon);
  opacity: 0.6;
  flex-shrink: 0;
}

/* ── Content Layout ── */
.job-content-wrap {
  padding: 40px 0 100px;
  background: var(--bg);
}

.job-content-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

/* ── Section Nav (left scroll spy) ── */
.job-section-nav {
  display: none; /* shown via JS on desktop */
}

/* ── Main Content ── */
.job-main-content {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.job-section {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.job-section.in-view {
  opacity: 1;
  transform: translateY(0);
}

.job-block {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}
.job-block:last-child {
  border-bottom: none;
}

/* Section number + heading */
.job-block h2 {
  font-family: var(--font-main);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.job-block h2 .sec-num {
  font-family: var(--font-main);
  font-size: 0.68rem;
  color: var(--neon);
  letter-spacing: 0.12em;
  opacity: 0.7;
  flex-shrink: 0;
  margin-top: 2px;
}

.job-block p {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 0.97rem;
  margin: 0 0 14px;
  font-weight: 300;
}
.job-block p:last-child {
  margin-bottom: 0;
}

/* Job points */
.job-points {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.job-points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  font-weight: 300;
}
.job-points li::before {
  content: "→";
  color: var(--neon);
  font-family: var(--font-main);
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 3px;
  opacity: 0.8;
}

/* ── Requirements Grid ── */
.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.req-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition:
    border-color 0.25s,
    background 0.25s;
  position: relative;
  overflow: hidden;
}
.req-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--neon), var(--accent2));
  opacity: 0;
  transition: opacity 0.25s;
}
.req-card:hover {
  border-color: var(--border-bright);
  background: var(--bg-card-hover);
}
.req-card:hover::before {
  opacity: 1;
}

.req-card h3 {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin: 0 0 16px;
}

/* Skill chip tags for Technical Skills */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.skill-tag {
  font-family: var(--font-main);
  font-size: 0.72rem;
  color: var(--neon);
  background: var(--neon-dim);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 100px;
  padding: 4px 12px;
  letter-spacing: 0.04em;
}

/* ── Sidebar Apply Card ── */
.job-apply-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}

.apply-card {
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 32px;
  position: relative;
  overflow: hidden;
}
/* Glow corner */
.apply-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -60px;
  width: 180px;
  height: 180px;
  background: radial-gradient(
    circle,
    rgba(0, 240, 255, 0.08) 0%,
    transparent 65%
  );
  pointer-events: none;
}

.apply-card h2 {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 12px;
  display: block; /* override job-block h2 flex */
}

.apply-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.65;
  font-weight: 300;
  margin: 0 0 24px;
}

.apply-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.95rem 2.4rem;
  background: var(--color-primary);
  color: var(--color-white);
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition:
    background 0.3s,
    color 0.3s;
}
.apply-btn:hover {
  background: transparent;
  color: var(--color-primary) !important;
}

.apply-btn .arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease);
}
.apply-btn:hover .arrow {
  transform: translateX(4px);
}

/* Divider in card */
.card-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Share row */
.share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.share-label {
  font-family: var(--font-main);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}
.share-icons {
  display: flex;
  gap: 10px;
}
.share-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.share-icon:hover {
  color: var(--neon);
  border-color: rgba(0, 240, 255, 0.3);
}

/* Stat row */
.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.stat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px #22c55e;
  flex-shrink: 0;
}

/* ── Sticky floating CTA (mobile / scroll) ── */
.floating-apply {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  background: var(--neon);
  color: #050810;
  font-family: var(--font-main);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 14px 36px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 8px 40px rgba(0, 240, 255, 0.35);
  transition:
    opacity 0.3s,
    transform 0.3s;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.floating-apply.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .job-content-layout {
    grid-template-columns: 1fr;
  }
  .job-apply-sidebar {
    position: static;
    order: -1;
  }
  .floating-apply {
    display: flex;
  }
}

@media (max-width: 600px) {
  .job-hero {
    padding: 110px 0 60px;
  }
  .job-hero-content h1 {
    font-size: 2.4rem;
  }
  .req-grid {
    grid-template-columns: 1fr;
  }
}
