:root {
  /* ── Dark purple/blue, black, and white palette ── */
  --violet-900: #090b1f;
  --violet-800: #11113a;
  --violet-700: #1e1b4b;
  --violet-600: #312e81;
  --violet-500: #4338ca;
  --violet-400: #6366f1;
  --violet-300: #a5b4fc;
  --violet-200: #c7d2fe;
  --violet-100: #eef2ff;

  --grey-950: #03040c;
  --grey-900: #060817;
  --grey-850: #0b1020;

  --white: #ffffff;
  --bg: #060817;
  --bg-alt: #0b1020;
  --card: rgba(255,255,255,0.048);
  --text: #eef2ff;
  --text-muted: rgba(238,242,255,0.72);
  --accent: var(--violet-300);
  --border: rgba(199,210,254,0.14);

  --font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.18);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.24);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.34);

  --radius: 10px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --paper: #f7f3e8;
  --paper-soft: #fbf8ef;
  --paper-line: rgba(31, 41, 55, 0.105);
  --ink: #111111;
  --ink-muted: #4b5563;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-line) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--violet-200);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HERO ========== */
#hero {
  min-height: 100vh;
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  text-align: center;
  padding: 14vh 24px 60px;

  color: var(--violet-100);
  background:
    radial-gradient(circle at 50% 34%, rgba(79,70,229,0.16), transparent 34%),
    radial-gradient(circle at 50% 92%, rgba(59,130,246,0.14), transparent 35%),
    linear-gradient(180deg, #050816 0%, #090b1f 46%, #000000 100%);
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;

  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);

  background-size: 84px 84px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 26%, black 84%, transparent 100%);
}

#cityscape {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 980px;
  width: min(92vw, 980px);
  text-align: center;
}

#hero h1 {
  display: block;
  opacity: 1;
  visibility: visible;
  color: #ffffff;
  font-size: clamp(3rem, 6.4vw, 6.2rem);
  font-weight: 800;
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: -0.055em;
  text-shadow: 0 12px 42px rgba(0,0,0,0.55);
}

.hero-rule {
  display: block;
  width: 58px;
  height: 2px;
  margin: 20px auto 18px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.72), transparent);
}

/* ========== DECRYPT TEXT ========== */
.decrypt-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 2.6rem;
  margin-bottom: 30px;
  /* Single-line: never wrap, scale text down on narrow viewports */
  width: 100%;
  overflow: hidden;
}

.decrypt-text {
  display: inline-block;
  opacity: 1;
  visibility: visible;
  color: rgba(255,255,255,0.96);
  font-size: clamp(0.62rem, 1.55vw, 1.3rem);
  font-weight: 800;
  letter-spacing: 0.09em;
  white-space: nowrap;
}

.decrypt-text .glyph {
  display: inline-block;
  min-width: 0.58em;
  text-align: center;
  transition: color 0.12s, opacity 0.12s;
}

.decrypt-text .glyph.scramble {
  color: rgba(255,255,255,0.62);
  opacity: 0.92;
}

.decrypt-text .glyph.done {
  color: rgba(255,255,255,0.97);
}

.decrypt-text .glyph.space {
  min-width: 0.33em;
}

/* ========== FLOATING HERO BUBBLES ========== */
.bubbles-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
}

.bubble {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: rgba(255,255,255,0.95);

  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.18), transparent 32%),
    rgba(3,32,18,0.72);

  border: 1px solid rgba(199,210,254,0.38);

  box-shadow:
    0 16px 44px rgba(0,0,0,0.34),
    0 0 26px rgba(129,140,248,0.10);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease;
}

.bubble:hover {
  color: #ffffff;
  border-color: rgba(199,210,254,0.85);

  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.24), transparent 34%),
    rgba(6,78,59,0.82);

  box-shadow:
    0 18px 52px rgba(0,0,0,0.42),
    0 0 34px rgba(129,140,248,0.16);
}

.bubble i {
  font-size: 1.6rem;
  color: currentColor;
  pointer-events: none;
}

.bubble-label {
  font-family: var(--font-sans);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: currentColor;
  opacity: 0.96;
  transform: translateY(0);
  pointer-events: none;
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0,0,0,0.35);
}

.bubble:hover .bubble-label {
  opacity: 1;
}

.bubble-profile {
  width: 104px;
  height: 104px;
}

.bubble-profile i {
  font-size: 1.9rem;
  color: currentColor;
  pointer-events: none;
}

#bubble-education,
#bubble-experience,
#bubble-projects,
#bubble-chess,
#bubble-pitch,
#bubble-contact {
  width: 92px;
  height: 92px;
}

/* ========== HERO SIDE LINKS ========== */
.hero-side-links {
  position: absolute;
  z-index: 4;
  left: clamp(22px, 4vw, 64px);
  top: 38%;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-side-links a {
  color: rgba(255,255,255,0.72);
  font-size: 1.5rem;
  transition: 0.3s ease;
}

.hero-side-links a:hover {
  color: rgba(255,255,255,0.92);
  transform: translateX(4px);
}

/* ========== HERO DOTS — distribution selector ========== */
.hero-dots {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 4vw, 70px);
  top: 33%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.48);
  display: block;
  border: 0;
  padding: 0;
  cursor: pointer;
  position: relative;
  transition: all 0.25s ease;
}

.hero-dot:hover {
  background: rgba(255,255,255,0.85);
  transform: scale(1.18);
}

.hero-dot.active {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.85);
  background: radial-gradient(circle, rgba(255,255,255,0.95) 0 34%, transparent 38%);
}

/* Replay icon button — sits at the top of the distribution selector */
.hero-replay {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(199,210,254,0.40);
  background: rgba(3,32,18,0.55);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.92rem;
  margin-bottom: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-replay:hover {
  background: rgba(6,78,59,0.85);
  border-color: rgba(199,210,254,0.85);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(129,140,248,0.18);
}

.hero-replay:active {
  transform: rotate(-180deg);
}

/* ========== SCROLL INDICATOR ========== */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  z-index: 4;
  animation: bounce 2s infinite;
  color: rgba(255,255,255,0.45);
  font-size: 1.25rem;
}

@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-8px); }
  60% { transform: translateY(-4px); }
}

/* ========== SECTIONS ========== */
.section {
  padding: 80px 0;
  background:
    radial-gradient(circle at top left, rgba(16,185,129,0.05), transparent 35%),
    var(--bg);
}

.section-alt {
  background:
    radial-gradient(circle at top right, rgba(16,185,129,0.04), transparent 35%),
    var(--bg-alt);
}

.section-title {
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--violet-300);
  margin-bottom: 40px;

  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ========== ABOUT ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: start;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.about-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.detail-card,
.edu-block,
.timeline-content,
.project-card,
.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.detail-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius);
}

.detail-card:hover,
.timeline-item:hover .timeline-content,
.project-card:hover,
.contact-card:hover {
  border-color: rgba(255,255,255,0.20);
  box-shadow: var(--shadow-sm);
}

.detail-card i {
  font-size: 1.1rem;
  color: var(--violet-300);
  width: 20px;
  text-align: center;
}

.detail-card strong {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(238,242,255,0.50);
}

.detail-card span {
  font-size: 0.95rem;
  color: var(--text);
}

/* ========== EDUCATION ========== */
.edu-block {
  padding: 32px;
  border-radius: var(--radius-lg);
}

.edu-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 8px;
}

.edu-header h3,
.timeline-header h3,
.project-card h3 {
  color: var(--violet-100);
  font-weight: 800;
}

.edu-header h3 {
  font-size: 1.25rem;
}

.edu-degree {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 4px;
}

.edu-date,
.timeline-date {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--violet-200);
  background: rgba(129,140,248,0.10);
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
}

.coursework-heading {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(238,242,255,0.55);
  margin-bottom: 12px;
  font-weight: 800;
}

.coursework-grid,
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-tag,
.project-tags span {
  font-size: 0.85rem;
  padding: 6px 14px;
  background: rgba(129,140,248,0.10);
  color: var(--violet-200);
  border-radius: 20px;
  font-weight: 700;
}

/* ========== EXPERIENCE ========== */
.timeline {
  position: relative;
  padding-left: 32px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 40px;
}

.timeline-marker {
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--violet-400);
}

.timeline-content {
  padding: 24px;
  border-radius: var(--radius);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.timeline-header h3 {
  font-size: 1.1rem;
}

.timeline-date {
  font-size: 0.8rem;
  padding: 2px 10px;
}

.timeline-role {
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.timeline-content > p:last-child {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ========== PROJECTS ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* Single project card spans the full container width. */
.projects-grid-single {
  grid-template-columns: 1fr;
  max-width: 980px;
  margin: 0 auto;
}

.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-4px);
}

.project-card-front {
  padding: 28px;
  position: relative;
  padding-right: min(260px, 32%);
}

.project-skill-tag {
  position: absolute;
  top: 28px;
  right: 28px;
  max-width: 220px;
  padding: 7px 15px;
  border-radius: 999px;
  color: var(--violet-100);
  background: rgba(129,140,248,0.12);
  border: 1px solid rgba(199,210,254,0.30);
  box-shadow: 0 10px 28px rgba(0,0,0,0.16);
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  white-space: normal;
}

.project-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: rgba(129,140,248,0.10);

  display: flex;
  align-items: center;
  justify-content: center;

  margin-bottom: 16px;
  font-size: 1.25rem;
  color: var(--violet-300);
}

.project-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.project-summary {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.project-expand-hint {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet-300);
  font-weight: 800;

  display: flex;
  align-items: center;
  gap: 6px;
}

.project-expand-hint i {
  transition: transform var(--transition);
}

.project-card.expanded .project-expand-hint i {
  transform: rotate(180deg);
}

.project-card-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 28px;
  transition: max-height 0.35s ease, padding 0.35s ease, opacity 0.25s ease;
}

.project-card.expanded .project-card-details {
  max-height: 1400px;
  opacity: 1;
  padding: 0 28px 28px;
}

.project-card-details p {
  color: rgba(238,242,255,0.78);
  line-height: 1.65;
  font-size: 0.94rem;
  margin-bottom: 16px;
}

/* ========== PROJECT WORKFLOW ANIMATION ========== */
.workflow-blurb p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  max-width: 760px;
}

.workflow-stages {
  display: flex;
  align-items: stretch;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 0 4px;
}

.wf-stage {
  flex: 1 1 0;
  min-width: 150px;

  display: flex;
  flex-direction: column;

  padding: 16px 14px 18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
}

.wf-stage-label {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--violet-300);
  margin-bottom: 14px;
}

.wf-stage-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 110px;
}

.wf-arrow {
  display: flex;
  align-items: center;
  color: var(--violet-300);
  font-size: 0.95rem;
  opacity: 0.55;
}

/* ── Stage 1: envelope ──────────────────────────────── */
.wf-envelope {
  width: 86px;
  height: 60px;
  position: relative;
  animation: wf-envelope-bob 3.6s ease-in-out infinite;
}

.wf-envelope-body {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: rgba(129,140,248,0.08);
  border: 1px solid rgba(199,210,254,0.45);
  overflow: hidden;
  padding: 18px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wf-envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
  background: linear-gradient(180deg, rgba(199,210,254,0.30), rgba(129,140,248,0.10));
  border-bottom: 1px solid rgba(199,210,254,0.55);
  transform-origin: top center;
  animation: wf-flap-open 3.6s ease-in-out infinite;
  z-index: 2;
}

.wf-email-line {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: rgba(199,210,254,0.45);
  width: 100%;
  opacity: 0;
  animation: wf-line-in 3.6s ease-in-out infinite;
}

.wf-email-line:nth-child(2) { animation-delay: 0.15s; width: 86%; }
.wf-email-line:nth-child(3) { animation-delay: 0.30s; }
.wf-email-line.short { width: 60%; }

@keyframes wf-envelope-bob {
  0%, 100% { transform: translateY(8px); opacity: 0.35; }
  18%, 82% { transform: translateY(0);   opacity: 1; }
}

@keyframes wf-flap-open {
  0%, 28%   { transform: rotateX(0deg); }
  45%, 88%  { transform: rotateX(160deg); }
  100%      { transform: rotateX(0deg); }
}

@keyframes wf-line-in {
  0%, 35% { opacity: 0; transform: translateY(2px); }
  55%, 95% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(2px); }
}

/* ── Stage 2: parsed chips ──────────────────────────── */
.wf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 100%;
}

.wf-chip {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(129,140,248,0.12);
  color: var(--violet-200);
  border: 1px solid rgba(199,210,254,0.28);
  opacity: 0;
  transform: translateY(8px);
  animation: wf-chip-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  white-space: nowrap;
}

@keyframes wf-chip-in {
  0%, 12%  { opacity: 0; transform: translateY(10px); }
  30%, 78% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0; transform: translateY(-6px); }
}

/* ── Stage 3: score bars ────────────────────────────── */
.wf-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  max-width: 160px;
}

.wf-bar {
  height: 7px;
  border-radius: 4px;
  background: rgba(129,140,248,0.10);
  border: 1px solid rgba(199,210,254,0.18);
  overflow: hidden;
  position: relative;
}

.wf-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(199,210,254,0.85), rgba(16,185,129,0.85));
  border-radius: 4px;
  animation: wf-bar-fill 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-bar-fill {
  0%, 18%   { width: 0; }
  55%, 88%  { width: var(--w, 60%); }
  100%      { width: 0; }
}

/* ── Stage 4: ranked spreadsheet ────────────────────── */
.wf-spreadsheet {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  max-width: 150px;
  padding: 6px;
  border-radius: 6px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border);
}

.wf-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.7fr;
  gap: 4px;
  height: 9px;
  opacity: 0;
  transform: translateX(-6px);
  animation: wf-row-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.wf-row span {
  display: block;
  background: rgba(199,210,254,0.30);
  border-radius: 2px;
}

.wf-row-header {
  animation: wf-row-in-header 3.6s ease-in-out infinite;
}

.wf-row-header span {
  background: rgba(199,210,254,0.55);
}

@keyframes wf-row-in {
  0%, 25%  { opacity: 0; transform: translateX(-6px); }
  45%, 88% { opacity: 1; transform: translateX(0); }
  100%     { opacity: 0; transform: translateX(4px); }
}

@keyframes wf-row-in-header {
  0%, 8%   { opacity: 0; transform: translateX(-6px); }
  22%, 92% { opacity: 1; transform: translateX(0); }
  100%     { opacity: 0; transform: translateX(4px); }
}

/* Vertical chip layout (used by the bike-bridges stage) */
.wf-chips-vertical {
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.wf-chip-alt {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(199,210,254,0.35);
  margin-top: 4px;
}

/* ── Solar Stage 2: 40-yr DCF growing bars ─────────── */
.wf-dcf {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 78px;
  width: 100%;
  max-width: 150px;
  padding: 4px 4px 0;
  border-bottom: 1px solid rgba(199,210,254,0.30);
}

.wf-dcf-bar {
  flex: 1;
  height: 0;
  background: linear-gradient(180deg, rgba(199,210,254,0.85), rgba(16,185,129,0.85));
  border-radius: 1px 1px 0 0;
  animation: wf-dcf-grow 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-dcf-grow {
  0%, 12%   { height: 0; }
  60%, 88%  { height: var(--h, 50%); }
  100%      { height: 0; }
}

/* ── Solar Stage 3: NPV / IRR verdict ──────────────── */
.wf-classify {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wf-metric {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(129,140,248,0.10);
  border: 1px solid rgba(199,210,254,0.22);
  color: var(--violet-200);
  opacity: 0;
  transform: translateY(4px);
  animation: wf-fade-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.wf-verdict {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  padding: 4px 12px;
  border-radius: 4px;
  margin-top: 4px;
  background: rgba(199,210,254,0.22);
  border: 1px solid rgba(199,210,254,0.60);
  color: var(--violet-100);
  opacity: 0;
  transform: translateY(4px);
  animation: wf-fade-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-fade-in {
  0%, 20%  { opacity: 0; transform: translateY(4px); }
  42%, 88% { opacity: 1; transform: translateY(0); }
  100%     { opacity: 0; transform: translateY(-3px); }
}

/* ── Solar Stage 4: tornado / sensitivity ──────────── */
.wf-tornado {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
  max-width: 160px;
  position: relative;
  padding: 4px 0;
}

.wf-tornado-axis {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(199,210,254,0.45);
}

.wf-tor-row {
  height: 8px;
  position: relative;
  background: rgba(129,140,248,0.06);
  border-radius: 2px;
}

.wf-tor-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  background: linear-gradient(90deg, rgba(199,210,254,0.40), rgba(16,185,129,0.85));
  border-radius: 2px;
  animation: wf-tor-extend 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-tor-extend {
  0%, 18%   { width: 0; transform: translateX(0); }
  55%, 88%  { width: var(--tw, 30%); transform: translateX(var(--td, 0%)); }
  100%      { width: 0; transform: translateX(0); }
}

/* ── Bike Stage 2: labeled bars ────────────────────── */
.wf-bars-labeled {
  max-width: 170px;
}

.wf-bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.wf-bar-label {
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--violet-200);
  flex: 0 0 60px;
  white-space: nowrap;
  text-align: right;
}

.wf-bar-label i {
  margin-left: 3px;
  color: rgba(238,242,255,0.85);
}

.wf-bar-row .wf-bar {
  flex: 1;
  height: 7px;
  margin: 0;
}

.wf-bar-skip .wf-bar-label {
  color: var(--violet-100);
  font-weight: 800;
}

.wf-bar-skip .wf-bar span {
  background: linear-gradient(90deg, rgba(238,242,255,0.92), rgba(129,140,248,0.92));
}

/* ── Bike Stage 3: regression coefficients ─────────── */
.wf-coefs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  width: 100%;
  max-width: 150px;
}

.wf-coef {
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 3px;
  color: var(--violet-100);
  opacity: 0;
  transform: translateX(-4px);
  white-space: nowrap;
  animation: wf-coef-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.wf-coef-pos {
  background: rgba(199,210,254,0.18);
  border: 1px solid rgba(199,210,254,0.32);
}

.wf-coef-neg {
  background: rgba(129,140,248,0.08);
  border: 1px solid rgba(199,210,254,0.18);
}

.wf-coef-neg-big {
  background: rgba(129,140,248,0.10);
  border: 1px solid rgba(199,210,254,0.55);
}

.wf-r2 {
  font-size: 0.60rem;
  font-weight: 800;
  letter-spacing: 0.10em;
  color: var(--violet-300);
  margin-top: 4px;
  padding-left: 2px;
  opacity: 0;
  animation: wf-fade-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-coef-in {
  0%, 16%   { opacity: 0; transform: translateX(-6px); }
  36%, 88%  { opacity: 1; transform: translateX(0); }
  100%      { opacity: 0; transform: translateX(4px); }
}

/* ── Bike Stage 4: day-of-week kNN bars ────────────── */
.wf-dow-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 150px;
  gap: 3px;
}

.wf-dow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  height: 50px;
  width: 100%;
}

.wf-dow-bar {
  flex: 1;
  height: 0;
  background: linear-gradient(180deg, rgba(199,210,254,0.85), rgba(16,185,129,0.85));
  border-radius: 1px 1px 0 0;
  animation: wf-dow-grow 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-dow-grow {
  0%, 18%   { height: 0; }
  55%, 88%  { height: var(--h, 50%); }
  100%      { height: 0; }
}

.wf-dow-labels {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(199,210,254,0.65);
}

.wf-dow-labels span {
  flex: 1;
  text-align: center;
}

.wf-accuracy {
  margin-top: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--violet-300);
  text-align: center;
}

/* Vertical stack on narrow viewports */
@media (max-width: 768px) {
  .workflow-stages {
    flex-direction: column;
  }
  .wf-arrow {
    transform: rotate(90deg);
    align-self: center;
  }
}


/* ── ACC MATLAB Project Animation ───────────────────── */
.wf-acc-stack {
  width: 100%;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wf-acc-row {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(199,210,254,0.28), rgba(16,185,129,0.82));
  border: 1px solid rgba(199,210,254,0.18);
  width: 0;
  animation: wf-acc-row-load 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.wf-acc-row:nth-child(1) { --row-w: 88%; }
.wf-acc-row:nth-child(2) { --row-w: 72%; }
.wf-acc-row:nth-child(3) { --row-w: 96%; }
.wf-acc-row:nth-child(4) { --row-w: 64%; }
.wf-acc-row:nth-child(5) { --row-w: 82%; }

@keyframes wf-acc-row-load {
  0%, 18% { width: 0; opacity: 0.35; }
  50%, 88% { width: var(--row-w, 80%); opacity: 1; }
  100% { width: 0; opacity: 0.35; }
}

.wf-acc-compare {
  width: 150px;
  height: 92px;
  position: relative;
  border-left: 1px solid rgba(199,210,254,0.35);
  border-bottom: 1px solid rgba(199,210,254,0.35);
  border-radius: 0 0 0 4px;
}

.wf-acc-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 25px;
  height: 1px;
  background: rgba(199,210,254,0.13);
}

.wf-acc-line {
  position: absolute;
  left: 10px;
  right: 10px;
  height: 3px;
  border-radius: 999px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: wf-acc-line-draw 3.6s ease-in-out infinite;
}

.wf-acc-line-base {
  bottom: 34px;
  background: rgba(199,210,254,0.82);
}

.wf-acc-line-exp {
  bottom: 52px;
  background: rgba(16,185,129,0.92);
  animation-delay: 0.22s;
}

@keyframes wf-acc-line-draw {
  0%, 20% { transform: scaleX(0); opacity: 0.35; }
  54%, 88% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(0); opacity: 0.35; }
}

.wf-docs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.wf-doc {
  min-width: 86px;
  padding: 5px 9px;
  border-radius: 5px;
  background: rgba(129,140,248,0.10);
  border: 1px solid rgba(199,210,254,0.24);
  color: var(--violet-200);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(5px);
  animation: wf-fade-in 3.6s ease-in-out infinite;
}

.wf-doc i {
  margin-right: 5px;
}

.wf-doc-word {
  animation-delay: 0.16s;
}

.wf-honor {
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(199,210,254,0.18);
  border: 1px solid rgba(199,210,254,0.42);
  color: var(--violet-100);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(5px);
  animation: wf-fade-in 3.6s ease-in-out infinite;
  animation-delay: 0.34s;
}

/* ========== CONTACT ========== */
.contact-text {
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 600px;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;

  padding: 28px;
  border-radius: var(--radius-lg);
  color: var(--text);
}

.contact-card:hover {
  transform: translateY(-4px);
  color: var(--text);
}

.contact-card i {
  font-size: 1.5rem;
  color: var(--violet-300);
  margin-bottom: 12px;
}

.contact-card strong {
  font-size: 1rem;
  margin-bottom: 4px;
}

.contact-card span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== FOOTER ========== */
footer {
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border);
  color: rgba(238,242,255,0.50);
  font-size: 0.85rem;
  background: var(--grey-950);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  #hero {
    padding: 14vh 18px 48px;
  }

  #hero h1 {
    font-size: 2.4rem;
  }

  .decrypt-text {
    /* Stay single-line on mobile too — shrink instead of wrapping */
    white-space: nowrap;
    letter-spacing: 0.02em;
    font-size: clamp(0.55rem, 2.6vw, 0.95rem);
  }

  .hero-side-links,
  .hero-dots {
    display: none;
  }

  .bubble {
    width: 76px;
    height: 76px;
  }

  .bubble-profile {
    width: 84px;
    height: 84px;
  }

  #bubble-education,
  #bubble-experience,
  #bubble-projects,
  #bubble-chess,
  #bubble-pitch,
  #bubble-contact {
    width: 72px;
    height: 72px;
  }

  .bubble i {
    font-size: 1.2rem;
  }

  .bubble-label {
    font-size: 0.5rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .edu-header,
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .projects-grid,
  .contact-links {
    grid-template-columns: 1fr;
  }

  .project-card-front {
    padding-right: 28px;
  }

  .project-skill-tag {
    position: static;
    display: inline-flex;
    margin: 0 0 14px;
    text-align: left;
  }
}

/* ========== SECTION BACKGROUND ANIMATIONS ========== */
.animated-about-section,
.animated-education-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.animated-about-section > .container,
.animated-education-section > .container {
  position: relative;
  z-index: 2;
}

.about-chess-bg,
.train-track-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.about-chess-bg::after,
.train-track-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,8,20,0.92), rgba(10,8,20,0.56) 50%, rgba(10,8,20,0.92));
  z-index: 2;
}

.chess-board-3d {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(1040px, 124vw);
  height: 520px;
  transform: translate(-50%, -50%) rotate(-6deg);
  transform-origin: center;
  opacity: 0.26;
  background:
    linear-gradient(45deg, rgba(129,140,248,0.18) 25%, transparent 25%, transparent 75%, rgba(129,140,248,0.18) 75%),
    linear-gradient(45deg, rgba(129,140,248,0.18) 25%, transparent 25%, transparent 75%, rgba(129,140,248,0.18) 75%),
    rgba(255,255,255,0.018);
  background-position: 0 0, 40px 40px, 0 0;
  background-size: 80px 80px;
  border: 1px solid rgba(129,140,248,0.11);
  box-shadow: inset 0 0 70px rgba(129,140,248,0.06);
  animation: chessBoardDrift 28s linear infinite;
}

.chess-piece {
  position: absolute;
  z-index: 1;
  color: rgba(221,211,240,0.25);
  font-size: clamp(2.6rem, 5.4vw, 5.3rem);
  text-shadow: 0 8px 22px rgba(0,0,0,0.46);
  transform: translate3d(0,0,0);
}

.piece-king { left: 12%; top: 58%; animation: chessPieceOne 12s steps(1, end) infinite; }
.piece-queen { left: 34%; top: 34%; animation: chessPieceTwo 15s steps(1, end) infinite; }
.piece-knight { left: 56%; top: 62%; animation: chessPieceThree 13s steps(1, end) infinite; }
.piece-bishop { left: 74%; top: 32%; animation: chessPieceFour 16s steps(1, end) infinite; }
.piece-rook { left: 86%; top: 68%; animation: chessPieceFive 18s steps(1, end) infinite; }

@keyframes chessBoardDrift {
  0% { background-position: 0 0, 40px 40px, 0 0; }
  100% { background-position: 80px 80px, 120px 120px, 0 0; }
}

@keyframes chessPieceOne {
  0%,100% { transform: translate(0,0); opacity: 0.17; }
  25% { transform: translate(80px,0); opacity: 0.27; }
  50% { transform: translate(80px,-80px); opacity: 0.23; }
  75% { transform: translate(160px,-80px); opacity: 0.19; }
}

@keyframes chessPieceTwo {
  0%,100% { transform: translate(0,0); opacity: 0.16; }
  25% { transform: translate(-80px,80px); opacity: 0.26; }
  50% { transform: translate(80px,160px); opacity: 0.21; }
  75% { transform: translate(160px,80px); opacity: 0.18; }
}

@keyframes chessPieceThree {
  0%,100% { transform: translate(0,0) rotate(0deg); opacity: 0.18; }
  33% { transform: translate(-80px,-160px) rotate(-4deg); opacity: 0.28; }
  66% { transform: translate(80px,-80px) rotate(3deg); opacity: 0.22; }
}

@keyframes chessPieceFour {
  0%,100% { transform: translate(0,0); opacity: 0.15; }
  30% { transform: translate(-80px,80px); opacity: 0.24; }
  60% { transform: translate(-160px,160px); opacity: 0.20; }
}

@keyframes chessPieceFive {
  0%,100% { transform: translate(0,0); opacity: 0.14; }
  25% { transform: translate(-160px,0); opacity: 0.24; }
  50% { transform: translate(-160px,-80px); opacity: 0.21; }
  75% { transform: translate(-240px,-80px); opacity: 0.18; }
}

.train-track-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.about-chess-bg::after,
.train-track-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,8,20,0.92), rgba(10,8,20,0.56) 50%, rgba(10,8,20,0.92));
  z-index: 2;
}

.chess-board-3d {
  position: absolute;
  left: 50%;
  top: 56%;
  width: min(980px, 118vw);
  height: 520px;
  transform: translate(-50%, -50%) perspective(720px) rotateX(62deg) rotateZ(-14deg);
  transform-origin: center;
  opacity: 0.32;
  background:
    linear-gradient(45deg, rgba(129,140,248,0.16) 25%, transparent 25%, transparent 75%, rgba(129,140,248,0.16) 75%),
    linear-gradient(45deg, rgba(129,140,248,0.16) 25%, transparent 25%, transparent 75%, rgba(129,140,248,0.16) 75%),
    rgba(255,255,255,0.025);
  background-position: 0 0, 42px 42px, 0 0;
  background-size: 84px 84px;
  border: 1px solid rgba(129,140,248,0.14);
  box-shadow: 0 40px 120px rgba(0,0,0,0.42), inset 0 0 80px rgba(129,140,248,0.05);
  animation: chessBoardDrift 24s linear infinite;
}

.chess-piece {
  position: absolute;
  z-index: 1;
  color: rgba(221,211,240,0.19);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  text-shadow: 0 14px 30px rgba(0,0,0,0.44);
  filter: blur(0.1px);
  transform: translate3d(0,0,0);
}

.piece-king { left: 14%; top: 58%; animation: chessPieceOne 14s ease-in-out infinite; }
.piece-queen { left: 34%; top: 35%; animation: chessPieceTwo 17s ease-in-out infinite; }
.piece-knight { left: 58%; top: 62%; animation: chessPieceThree 16s ease-in-out infinite; }
.piece-bishop { left: 76%; top: 34%; animation: chessPieceFour 19s ease-in-out infinite; }
.piece-rook { left: 88%; top: 68%; animation: chessPieceFive 21s ease-in-out infinite; }

@keyframes chessBoardDrift {
  0% { background-position: 0 0, 42px 42px, 0 0; }
  100% { background-position: 84px 84px, 126px 126px, 0 0; }
}

@keyframes chessPieceOne {
  0%,100% { transform: translate(0,0) scale(1); opacity: 0.16; }
  35% { transform: translate(84px,-44px) scale(1.05); opacity: 0.24; }
  70% { transform: translate(126px,34px) scale(0.94); opacity: 0.18; }
}

@keyframes chessPieceTwo {
  0%,100% { transform: translate(0,0) scale(0.96); opacity: 0.14; }
  42% { transform: translate(-68px,72px) scale(1.06); opacity: 0.23; }
  74% { transform: translate(52px,104px) scale(0.98); opacity: 0.17; }
}

@keyframes chessPieceThree {
  0%,100% { transform: translate(0,0) scale(1.02); opacity: 0.15; }
  45% { transform: translate(-42px,-76px) scale(1.1); opacity: 0.25; }
  82% { transform: translate(72px,-18px) scale(0.96); opacity: 0.18; }
}

@keyframes chessPieceFour {
  0%,100% { transform: translate(0,0) scale(0.94); opacity: 0.13; }
  38% { transform: translate(-88px,36px) scale(1.04); opacity: 0.22; }
  76% { transform: translate(-42px,118px) scale(0.9); opacity: 0.16; }
}

@keyframes chessPieceFive {
  0%,100% { transform: translate(0,0) scale(0.98); opacity: 0.12; }
  48% { transform: translate(-138px,-28px) scale(1.08); opacity: 0.22; }
  80% { transform: translate(-64px,-92px) scale(0.94); opacity: 0.16; }
}

.train-track-bg {
  opacity: 0.92;
}

.train-track-bg::before {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  top: 62%;
  height: 130px;
  background:
    repeating-linear-gradient(90deg, rgba(129,140,248,0.18) 0 3px, transparent 3px 44px),
    linear-gradient(rgba(129,140,248,0.14), rgba(129,140,248,0.14)) center 72% / 100% 2px no-repeat,
    linear-gradient(rgba(129,140,248,0.11), rgba(129,140,248,0.11)) center 84% / 100% 2px no-repeat;
  transform: perspective(640px) rotateX(64deg);
  transform-origin: center top;
  opacity: 0.35;
}

.train-track-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 72%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(221,211,240,0.28), transparent);
}

.boilermaker-train {
  position: absolute;
  left: -360px;
  top: calc(72% - 112px);
  width: 330px;
  height: 145px;
  z-index: 1;
  opacity: 0.78;
  animation: trainTraverse 7.2s linear infinite;
}

.train-engine {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 305px;
  height: 112px;
  filter: drop-shadow(0 20px 28px rgba(0,0,0,0.44));
}

.train-boiler {
  position: absolute;
  left: 86px;
  bottom: 34px;
  width: 162px;
  height: 52px;
  border-radius: 30px 44px 44px 30px;
  background: linear-gradient(180deg, rgba(245,215,138,0.82), rgba(138,95,32,0.74));
  border: 2px solid rgba(255,232,178,0.68);
}

.train-cab {
  position: absolute;
  left: 20px;
  bottom: 34px;
  width: 86px;
  height: 82px;
  border-radius: 12px 12px 3px 3px;
  background: linear-gradient(180deg, rgba(43,30,20,0.94), rgba(12,9,8,0.88));
  border: 2px solid rgba(245,215,138,0.58);
}

.train-cab::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 16px;
  width: 36px;
  height: 28px;
  border-radius: 4px;
  background: rgba(238,242,255,0.42);
  border: 1px solid rgba(238,242,255,0.52);
}

.train-smokestack {
  position: absolute;
  left: 198px;
  bottom: 82px;
  width: 30px;
  height: 42px;
  border-radius: 6px 6px 0 0;
  background: rgba(32,23,18,0.96);
  border: 2px solid rgba(245,215,138,0.56);
}

.train-cowcatcher {
  position: absolute;
  left: 246px;
  bottom: 34px;
  width: 54px;
  height: 44px;
  clip-path: polygon(0 28%, 100% 100%, 0 100%);
  background: rgba(245,215,138,0.62);
  border-bottom: 2px solid rgba(255,232,178,0.62);
}

.train-wheel {
  position: absolute;
  bottom: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 5px solid rgba(245,215,138,0.76);
  background: rgba(8,7,8,0.90);
  box-shadow: inset 0 0 0 6px rgba(129,140,248,0.12);
  animation: wheelSpin 0.48s linear infinite;
}

.wheel-one { left: 46px; }
.wheel-two { left: 132px; width: 44px; height: 44px; bottom: 7px; }
.wheel-three { left: 208px; }

.steam {
  position: absolute;
  left: 211px;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(238,242,255,0.62);
  filter: blur(1.4px);
  animation: steamPuff 1.55s ease-out infinite;
}

.steam-two { animation-delay: 0.25s; left: 198px; }
.steam-three { animation-delay: 0.50s; left: 220px; }
.steam-four { animation-delay: 0.75s; left: 205px; }
.steam-five { animation-delay: 1.00s; left: 230px; }
.steam-six { animation-delay: 1.25s; left: 192px; }

@keyframes trainTraverse {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(100vw + 720px)); }
}

@keyframes wheelSpin {
  to { transform: rotate(360deg); }
}

@keyframes steamPuff {
  0% { transform: translate(0, 24px) scale(0.35); opacity: 0; }
  12% { opacity: 0.72; }
  100% { transform: translate(-44px, -104px) scale(2.55); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .chess-board-3d,
  .chess-piece,
  .boilermaker-train,
  .train-wheel,
  .steam {
    animation: none !important;
  }
}

/* ========== ABOUT FAB WORKFLOW BACKGROUND ========== */
.fab-workflow-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.96;
}

.fab-workflow-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 6;
  background:
    linear-gradient(90deg, rgba(10,8,20,0.94), rgba(10,8,20,0.48) 48%, rgba(10,8,20,0.92)),
    linear-gradient(180deg, rgba(10,8,20,0.26), rgba(10,8,20,0.84));
}

.fab-grid {
  position: absolute;
  inset: -14% -8%;
  z-index: 0;
  background:
    linear-gradient(rgba(221,211,240,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221,211,240,0.045) 1px, transparent 1px),
    radial-gradient(circle at 20% 30%, rgba(129,140,248,0.12), transparent 24%),
    radial-gradient(circle at 76% 68%, rgba(85,63,142,0.14), transparent 28%);
  background-size: 76px 54px, 76px 54px, 100% 100%, 100% 100%;
  transform: skewY(-3deg);
  animation: fabGridDrift 5.5s linear infinite;
}

.fab-route {
  position: absolute;
  left: 5%;
  right: 5%;
  height: 4px;
  border-radius: 999px;
  z-index: 1;
  background:
    repeating-linear-gradient(90deg,
      rgba(221,211,240,0.10) 0 18px,
      rgba(129,140,248,0.42) 18px 30px,
      rgba(221,211,240,0.10) 30px 54px);
  box-shadow: 0 0 22px rgba(129,140,248,0.10);
  animation: fabRouteFlow 1.1s linear infinite;
}

.fab-route-one { top: 42%; }
.fab-route-two { top: 63%; opacity: 0.62; animation-duration: 1.45s; }

.fab-station {
  position: absolute;
  z-index: 2;
  width: 132px;
  height: 76px;
  border-radius: 14px;
  border: 1px solid rgba(221,211,240,0.24);
  background:
    linear-gradient(180deg, rgba(38,22,83,0.72), rgba(12,9,24,0.76));
  box-shadow:
    0 16px 36px rgba(0,0,0,0.24),
    inset 0 0 0 1px rgba(255,255,255,0.035),
    0 0 22px rgba(129,140,248,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: rgba(238,242,255,0.74);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  animation: stationPulse 2.4s ease-in-out infinite;
}

.fab-station i {
  color: rgba(129,140,248,0.88);
  font-size: 1.05rem;
}

.station-receive { left: 8%; top: 30%; animation-delay: 0s; }
.station-photo { left: 27%; top: 47%; animation-delay: 0.35s; }
.station-etch { left: 47%; top: 29%; animation-delay: 0.7s; }
.station-metrology { left: 66%; top: 51%; animation-delay: 1.05s; }
.station-ship { left: 83%; top: 34%; animation-delay: 1.4s; }

.fab-wafer {
  position: absolute;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255,255,255,0.92), rgba(129,140,248,0.78) 28%, rgba(85,63,142,0.70) 68%, rgba(26,14,58,0.90));
  border: 1px solid rgba(238,242,255,0.72);
  box-shadow: 0 0 20px rgba(129,140,248,0.30);
  opacity: 0;
  animation: waferFlow 6.2s linear infinite;
}

.wafer-a { animation-delay: 0s; }
.wafer-b { animation-delay: -1.55s; }
.wafer-c { animation-delay: -3.1s; }
.wafer-d { animation-delay: -4.65s; }

.fab-wafer::before,
.fab-wafer::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(238,242,255,0.20);
  inset: 7px;
}

.fab-wafer::after {
  inset: 14px;
  background: rgba(238,242,255,0.34);
  border: 0;
}

.fab-carrier {
  position: absolute;
  z-index: 3;
  width: 64px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid rgba(221,211,240,0.32);
  background: rgba(16,13,28,0.76);
  box-shadow: 0 12px 26px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  opacity: 0;
  animation: carrierLoop 8.4s linear infinite;
}

.fab-carrier span {
  width: 12px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(238,242,255,0.76), rgba(129,140,248,0.28));
  border: 1px solid rgba(238,242,255,0.28);
}

.carrier-a { animation-delay: -0.8s; }
.carrier-b { animation-delay: -5.0s; top: 61%; }

.robot-arm {
  position: absolute;
  z-index: 4;
  width: 82px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245,215,138,0.68);
  transform-origin: 8px center;
  box-shadow: 0 0 16px rgba(245,215,138,0.20);
  animation: robotSweep 1.8s ease-in-out infinite;
}

.robot-arm::before {
  content: '';
  position: absolute;
  left: -7px;
  top: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,215,138,0.82);
  border: 1px solid rgba(255,232,178,0.50);
}

.robot-arm span {
  position: absolute;
  right: -13px;
  top: -5px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(129,140,248,0.78);
  box-shadow: 0 0 14px rgba(129,140,248,0.22);
}

.arm-photo { left: 31%; top: 39%; animation-delay: 0.15s; }
.arm-metrology { left: 70%; top: 45%; animation-delay: 0.85s; }

.scan-beam {
  position: absolute;
  z-index: 3;
  width: 2px;
  height: 96px;
  background: linear-gradient(180deg, transparent, rgba(112,255,173,0.74), transparent);
  box-shadow: 0 0 20px rgba(112,255,173,0.28);
  opacity: 0;
  animation: scanPass 2.2s ease-in-out infinite;
}

.scan-one { left: 50.4%; top: 23%; animation-delay: 0.35s; }
.scan-two { left: 70.6%; top: 46%; animation-delay: 1.3s; }

.fab-metric {
  position: absolute;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(221,211,240,0.18);
  background: rgba(10,8,20,0.54);
  color: rgba(221,211,240,0.58);
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.10em;
  animation: metricFlicker 2.8s ease-in-out infinite;
}

.metric-one { left: 18%; top: 72%; animation-delay: 0s; }
.metric-two { left: 50%; top: 69%; animation-delay: 0.7s; }
.metric-three { left: 76%; top: 24%; animation-delay: 1.4s; }

@keyframes fabGridDrift {
  to { background-position: 76px 54px, 76px 54px, 0 0, 0 0; }
}

@keyframes fabRouteFlow {
  to { background-position: 54px 0; }
}

@keyframes stationPulse {
  0%, 100% { border-color: rgba(221,211,240,0.18); transform: translateY(0); }
  50% { border-color: rgba(129,140,248,0.42); transform: translateY(-2px); }
}

@keyframes waferFlow {
  0% { left: 5%; top: 36%; opacity: 0; transform: scale(0.76) rotate(0deg); }
  6% { opacity: 0.92; }
  22% { left: 28%; top: 42%; transform: scale(1.0) rotate(130deg); }
  34% { left: 32%; top: 54%; transform: scale(0.92) rotate(190deg); }
  48% { left: 49%; top: 35%; transform: scale(1.02) rotate(270deg); }
  64% { left: 67%; top: 58%; transform: scale(0.94) rotate(345deg); }
  82% { left: 85%; top: 41%; opacity: 0.90; transform: scale(1.0) rotate(430deg); }
  100% { left: 98%; top: 41%; opacity: 0; transform: scale(0.72) rotate(520deg); }
}

@keyframes carrierLoop {
  0% { left: -8%; top: 61%; opacity: 0; transform: translateY(0); }
  8% { opacity: 0.72; }
  46% { left: 47%; top: 61%; opacity: 0.76; transform: translateY(-10px); }
  78% { left: 84%; top: 38%; opacity: 0.70; transform: translateY(0); }
  100% { left: 108%; top: 38%; opacity: 0; transform: translateY(0); }
}

@keyframes robotSweep {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(31deg); }
}

@keyframes scanPass {
  0%, 100% { opacity: 0; transform: translateX(-20px) scaleY(0.7); }
  20% { opacity: 0.75; }
  55% { opacity: 0.45; transform: translateX(44px) scaleY(1.1); }
  80% { opacity: 0; transform: translateX(78px) scaleY(0.8); }
}

@keyframes metricFlicker {
  0%, 100% { opacity: 0.34; }
  50% { opacity: 0.72; }
}

@media (max-width: 768px) {
  .fab-station {
    width: 92px;
    height: 58px;
    font-size: 0.48rem;
  }

  .fab-station i {
    display: none;
  }

  .fab-wafer {
    width: 24px;
    height: 24px;
  }

  .fab-carrier,
  .robot-arm,
  .fab-metric {
    opacity: 0.42;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fab-grid,
  .fab-route,
  .fab-station,
  .fab-wafer,
  .fab-carrier,
  .robot-arm,
  .scan-beam,
  .fab-metric {
    animation: none !important;
  }
}



/* ========== ABOUT FACTORY FLOOR BACKGROUND ========== */
.factory-floor-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.96;
}

.factory-floor-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 8;
  background:
    linear-gradient(90deg, rgba(10,8,20,0.94), rgba(10,8,20,0.54) 50%, rgba(10,8,20,0.94)),
    linear-gradient(180deg, rgba(10,8,20,0.24), rgba(10,8,20,0.82));
}

.factory-floor-grid {
  position: absolute;
  inset: -6%;
  background:
    linear-gradient(rgba(221,211,240,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(221,211,240,0.05) 1px, transparent 1px),
    radial-gradient(circle at 24% 30%, rgba(129,140,248,0.12), transparent 24%),
    radial-gradient(circle at 78% 66%, rgba(85,63,142,0.14), transparent 28%);
  background-size: 62px 62px, 62px 62px, 100% 100%, 100% 100%;
  transform: perspective(900px) rotateX(72deg) translateY(12%);
  transform-origin: center top;
  opacity: 0.34;
}

.factory-aisle {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 56px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    repeating-linear-gradient(90deg, rgba(221,211,240,0.14) 0 20px, transparent 20px 52px),
    rgba(14,10,28,0.34);
  box-shadow: inset 0 0 0 1px rgba(221,211,240,0.05);
  opacity: 0.34;
}

.aisle-one { top: 34%; }
.aisle-two { top: 62%; }

.factory-conveyor {
  position: absolute;
  z-index: 2;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(238,242,255,0.10), rgba(10,8,20,0.16)),
    repeating-linear-gradient(90deg, rgba(221,211,240,0.08) 0 18px, rgba(129,140,248,0.34) 18px 32px, rgba(221,211,240,0.08) 32px 50px);
  box-shadow: 0 0 20px rgba(129,140,248,0.08);
  animation: conveyorFlow 1.15s linear infinite;
}

.conveyor-one { left: 8%; top: 40%; width: 74%; }
.conveyor-two { left: 22%; top: 68%; width: 62%; animation-duration: 1.45s; }

.factory-package {
  position: absolute;
  top: -12px;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgba(221,211,240,0.84), rgba(129,140,248,0.34));
  border: 1px solid rgba(238,242,255,0.34);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  animation: packageMoveOne 7.2s linear infinite;
}

.conveyor-two .factory-package {
  animation-name: packageMoveTwo;
  top: -10px;
}

.pack-b { animation-delay: -1.8s; }
.pack-c { animation-delay: -3.6s; }
.pack-d { animation-delay: -5.4s; }
.pack-f { animation-delay: -2.4s; }
.pack-g { animation-delay: -4.8s; }

.factory-cell {
  position: absolute;
  z-index: 3;
  width: 122px;
  height: 92px;
}

.cell-one { left: 10%; top: 21%; }
.cell-two { left: 43%; top: 47%; }
.cell-three { left: 75%; top: 24%; }

.cell-base {
  position: absolute;
  inset: auto 0 0 0;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(38,22,83,0.72), rgba(12,9,24,0.80));
  border: 1px solid rgba(221,211,240,0.20);
  box-shadow: 0 16px 32px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.03);
}

.cell-base::before,
.cell-base::after {
  content: '';
  position: absolute;
  top: 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(238,242,255,0.12);
  box-shadow: 28px 0 0 rgba(238,242,255,0.08), 56px 0 0 rgba(238,242,255,0.12);
}

.cell-base::before { left: 16px; }
.cell-base::after { right: 16px; }

.cell-arm {
  position: absolute;
  left: 18px;
  top: 18px;
  width: 74px;
  height: 8px;
  border-radius: 999px;
  background: rgba(245,215,138,0.74);
  transform-origin: 8px center;
  box-shadow: 0 0 16px rgba(245,215,138,0.18);
  animation: factoryArmSweep 2.1s ease-in-out infinite;
}

.cell-arm::before {
  content: '';
  position: absolute;
  left: -8px;
  top: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,215,138,0.84);
  border: 1px solid rgba(255,232,178,0.48);
}

.cell-arm span {
  position: absolute;
  right: -12px;
  top: -5px;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(129,140,248,0.82);
}

.cell-light {
  position: absolute;
  right: 12px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(112,255,173,0.82);
  box-shadow: 0 0 12px rgba(112,255,173,0.32);
  animation: indicatorBlink 1.2s ease-in-out infinite;
}

.factory-rack {
  position: absolute;
  z-index: 1;
  width: 74px;
  height: 120px;
  border-radius: 8px;
  border: 1px solid rgba(221,211,240,0.16);
  background:
    linear-gradient(180deg, rgba(20,16,34,0.58), rgba(20,16,34,0.20)),
    repeating-linear-gradient(180deg, rgba(221,211,240,0.12) 0 2px, transparent 2px 24px);
  opacity: 0.42;
}

.rack-one { left: 3%; top: 18%; }
.rack-two { right: 5%; top: 50%; height: 104px; }

.factory-agv {
  position: absolute;
  z-index: 4;
  width: 70px;
  height: 34px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(238,242,255,0.14), rgba(38,22,83,0.72));
  border: 1px solid rgba(221,211,240,0.24);
  box-shadow: 0 10px 24px rgba(0,0,0,0.20);
  animation: agvRoute 8.8s linear infinite;
}

.factory-agv::before,
.factory-agv::after {
  content: '';
  position: absolute;
  bottom: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(8,7,8,0.92);
  border: 2px solid rgba(129,140,248,0.46);
}

.factory-agv::before { left: 12px; }
.factory-agv::after { right: 12px; }

.factory-agv span {
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(238,242,255,0.34);
}

.factory-agv span:nth-child(1) { left: 16px; }
.factory-agv span:nth-child(2) { left: 31px; }
.factory-agv span:nth-child(3) { left: 46px; }

.agv-two { animation-delay: -4.4s; }

.factory-scan {
  position: absolute;
  z-index: 5;
  width: 2px;
  height: 100px;
  background: linear-gradient(180deg, transparent, rgba(112,255,173,0.80), transparent);
  box-shadow: 0 0 18px rgba(112,255,173,0.24);
  opacity: 0;
  animation: factoryScan 2.4s ease-in-out infinite;
}

.factory-scan.scan-one { left: 48%; top: 34%; }
.factory-scan.scan-two { left: 79%; top: 18%; animation-delay: 1.1s; }

@keyframes conveyorFlow {
  to { background-position: 50px 0; }
}

@keyframes packageMoveOne {
  0% { left: 0%; opacity: 0; }
  8% { opacity: 0.84; }
  92% { opacity: 0.84; }
  100% { left: calc(100% - 22px); opacity: 0; }
}

@keyframes packageMoveTwo {
  0% { left: 0%; opacity: 0; }
  10% { opacity: 0.76; }
  90% { opacity: 0.76; }
  100% { left: calc(100% - 22px); opacity: 0; }
}

@keyframes factoryArmSweep {
  0%, 100% { transform: rotate(-18deg); }
  50% { transform: rotate(28deg); }
}

@keyframes indicatorBlink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@keyframes agvRoute {
  0% { left: 8%; top: 56%; transform: translateY(0); }
  22% { left: 28%; top: 56%; transform: translateY(0); }
  34% { left: 35%; top: 44%; transform: translateY(-8px); }
  58% { left: 58%; top: 44%; transform: translateY(0); }
  72% { left: 72%; top: 60%; transform: translateY(6px); }
  100% { left: 88%; top: 60%; transform: translateY(0); }
}

@keyframes factoryScan {
  0%, 100% { opacity: 0; transform: translateX(-16px) scaleY(0.7); }
  20% { opacity: 0.8; }
  60% { opacity: 0.46; transform: translateX(38px) scaleY(1.05); }
  85% { opacity: 0; transform: translateX(74px) scaleY(0.8); }
}

/* ========== EXPERIENCE CARDS ========== */
.experience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.experience-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 22px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.experience-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255,255,255,0.22);
  box-shadow: var(--shadow-sm);
}

.experience-visual {
  position: relative;
  width: 112px;
  height: 112px;
  margin: 0 auto 16px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(221,211,240,0.18);
  background: linear-gradient(180deg, rgba(38,22,83,0.60), rgba(12,9,24,0.82));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.03), 0 14px 32px rgba(0,0,0,0.24);
}

.experience-visual i {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: rgba(238,242,255,0.90);
  font-size: 1.8rem;
  z-index: 3;
}

.visual-glow {
  position: absolute;
  inset: auto;
  width: 74px;
  height: 74px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(129,140,248,0.22), rgba(129,140,248,0));
  z-index: 1;
}

.experience-card h3 {
  font-size: 1rem;
  color: var(--violet-100);
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 6px;
}

.experience-org {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.visual-sawtooth .sawtooth-wave {
  position: absolute;
  inset: auto 14px 22px 14px;
  height: 34px;
  background: linear-gradient(135deg, transparent 0 14%, rgba(245,215,138,0.80) 14% 18%, transparent 18% 32%, rgba(245,215,138,0.80) 32% 36%, transparent 36% 50%, rgba(245,215,138,0.80) 50% 54%, transparent 54% 68%, rgba(245,215,138,0.80) 68% 72%, transparent 72% 86%, rgba(245,215,138,0.80) 86% 90%, transparent 90% 100%);
  opacity: 0.68;
  animation: sawPulse 1.6s linear infinite;
}

.mini-drone {
  position: absolute;
  left: 50%;
  top: 28px;
  width: 46px;
  height: 46px;
  transform: translateX(-50%);
  animation: droneFloat 2.2s ease-in-out infinite;
  z-index: 2;
}

.mini-drone::before,
.mini-drone::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34px;
  height: 2px;
  background: rgba(221,211,240,0.66);
  transform: translate(-50%, -50%);
}

.mini-drone::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.mini-drone span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(221,211,240,0.62);
}

.mini-drone span:nth-child(1) { left: 0; top: 0; }
.mini-drone span:nth-child(2) { right: 0; top: 0; }
.mini-drone span:nth-child(3) { left: 0; bottom: 0; }
.mini-drone span:nth-child(4) { right: 0; bottom: 0; }

.visual-purdue .data-link {
  position: absolute;
  left: 22px;
  right: 22px;
  top: 56px;
  height: 2px;
  background: rgba(245,215,138,0.56);
  z-index: 1;
}

.data-nodes span {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(129,140,248,0.84);
  box-shadow: 0 0 12px rgba(129,140,248,0.22);
  z-index: 2;
  animation: nodePulse 1.8s ease-in-out infinite;
}

.data-nodes span:nth-child(1) { left: 16px; top: 28px; }
.data-nodes span:nth-child(2) { left: 34px; top: 62px; animation-delay: 0.25s; }
.data-nodes span:nth-child(3) { left: 56px; top: 40px; animation-delay: 0.5s; }
.data-nodes span:nth-child(4) { right: 28px; top: 62px; animation-delay: 0.75s; }
.data-nodes span:nth-child(5) { right: 14px; top: 26px; animation-delay: 1s; }

.visual-athletics .field-lines {
  position: absolute;
  inset: 14px;
  border-radius: 18px;
  border: 1px solid rgba(221,211,240,0.16);
  z-index: 1;
}

.visual-athletics .field-lines::before,
.visual-athletics .field-lines::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 49%, rgba(221,211,240,0.14) 50%, transparent 51%),
    linear-gradient(180deg, transparent 44%, rgba(221,211,240,0.14) 45%, transparent 46%);
}

.soccer-ball {
  position: absolute;
  left: 18px;
  top: 62px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.95), rgba(221,211,240,0.80));
  box-shadow: 0 0 12px rgba(255,255,255,0.10);
  z-index: 2;
  animation: ballMove 2.4s ease-in-out infinite;
}

.visual-micron .chip-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46px;
  height: 46px;
  transform: translate(-50%, -50%);
  border-radius: 10px;
  border: 2px solid rgba(245,215,138,0.74);
  background: rgba(16,13,28,0.56);
  z-index: 2;
}

.visual-micron .chip-traces,
.visual-micron .chip-traces::before,
.visual-micron .chip-traces::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84px;
  height: 84px;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  border: 1px dashed rgba(129,140,248,0.22);
  z-index: 1;
}

.visual-micron .chip-traces::before {
  width: 64px;
  height: 64px;
  animation: tracePulse 1.9s ease-in-out infinite;
}

.visual-micron .chip-traces::after {
  width: 96px;
  height: 96px;
  animation: tracePulse 1.9s ease-in-out infinite 0.45s;
}

@keyframes sawPulse {
  0% { transform: translateX(-8px); opacity: 0.44; }
  100% { transform: translateX(8px); opacity: 0.80; }
}

@keyframes droneFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes nodePulse {
  0%, 100% { transform: scale(1); opacity: 0.56; }
  50% { transform: scale(1.25); opacity: 1; }
}

@keyframes ballMove {
  0% { transform: translate(0, 0); }
  40% { transform: translate(28px, -18px); }
  70% { transform: translate(54px, -8px); }
  100% { transform: translate(76px, -30px); }
}

@keyframes tracePulse {
  0%, 100% { opacity: 0.18; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.52; transform: translate(-50%, -50%) scale(1.06); }
}

@media (max-width: 1000px) {
  .experience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .factory-cell { transform: scale(0.82); }
  .factory-rack { opacity: 0.28; }
  .experience-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .factory-conveyor,
  .factory-package,
  .cell-arm,
  .cell-light,
  .factory-agv,
  .factory-scan,
  .sawtooth-wave,
  .mini-drone,
  .data-nodes span,
  .soccer-ball,
  .visual-micron .chip-traces::before,
  .visual-micron .chip-traces::after {
    animation: none !important;
  }
}

/* ========== PROJECT GRID REWORK — 2x2 expandable cards ========== */
.projects-grid-quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 980px;
  margin: 0 auto;
  align-items: start;
}

.projects-grid-quad .project-card {
  min-height: 230px;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition),
    grid-column 0.35s ease;
}

.projects-grid-quad .project-card.expanded {
  grid-column: 1 / -1;
}

.projects-grid-quad .project-card-front {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.projects-grid-quad .project-card.expanded .project-card-front {
  min-height: auto;
}

.projects-grid-quad .project-card-details {
  transition: max-height 0.42s ease, padding 0.38s ease, opacity 0.28s ease;
}

.projects-grid-quad .project-card.expanded .project-card-details {
  max-height: 1600px;
}

@media (max-width: 760px) {
  .projects-grid-quad {
    grid-template-columns: 1fr;
  }

  .projects-grid-quad .project-card.expanded {
    grid-column: auto;
  }

  .projects-grid-quad .project-card-front {
    min-height: auto;
  }
}


/* ========== PROJECT GRID — vertical stack ========== */
.projects-grid-quad {
  grid-template-columns: 1fr;
  max-width: 980px;
  gap: 18px;
  align-items: stretch;
}

.projects-grid-quad .project-card {
  min-height: auto;
  height: auto;
}

.projects-grid-quad .project-card.expanded {
  grid-column: auto;
}

.projects-grid-quad .project-card-front {
  min-height: 190px;
  height: auto;
  padding: 26px 28px;
  display: grid;
  grid-template-columns: 54px 1fr 230px;
  grid-template-rows: auto auto auto;
  column-gap: 20px;
  row-gap: 8px;
  align-items: start;
}

.project-card-head {
  display: contents;
}

.projects-grid-quad .project-icon {
  grid-column: 1;
  grid-row: 1 / span 3;
  width: 48px;
  height: 48px;
  margin: 0;
}

.projects-grid-quad .project-skill-tag {
  grid-column: 3;
  grid-row: 1;
  width: 230px;
  min-height: 42px;
  margin-left: auto;
  padding: 8px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.08;
  white-space: normal;
}

.projects-grid-quad .project-card h3 {
  grid-column: 2;
  grid-row: 1;
  min-height: auto;
  margin: 0;
  line-height: 1.35;
}

.projects-grid-quad .project-summary {
  grid-column: 2 / 4;
  grid-row: 2;
  min-height: auto;
  max-width: 720px;
  margin: 0;
}

.projects-grid-quad .project-expand-hint {
  grid-column: 2;
  grid-row: 3;
  margin-top: 10px;
  padding-top: 0;
}

.projects-grid-quad .project-card.expanded .project-card-front {
  min-height: auto;
  height: auto;
}

.projects-grid-quad .project-card-details {
  transition: max-height 0.42s ease, padding 0.38s ease, opacity 0.28s ease;
}

.projects-grid-quad .project-card.expanded .project-card-details {
  max-height: 1600px;
}

@media (max-width: 760px) {
  .projects-grid-quad .project-card-front {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: auto;
  }

  .project-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }

  .projects-grid-quad .project-icon {
    width: 48px;
    height: 48px;
  }

  .projects-grid-quad .project-skill-tag {
    width: 180px;
    min-height: 42px;
    font-size: 0.74rem;
    margin-left: auto;
  }

  .projects-grid-quad .project-card h3,
  .projects-grid-quad .project-summary {
    min-height: auto;
  }

  .projects-grid-quad .project-expand-hint {
    margin-top: 4px;
  }
}

/* ── Research inquiry workflow animation ───────────────────── */
.wf-research-question {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--violet-100);
  font-weight: 800;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  animation: wf-fade-in 3.6s ease-in-out infinite;
}

.wf-research-question i {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(129,140,248,0.12);
  border: 1px solid rgba(199,210,254,0.35);
  color: var(--violet-200);
}

.wf-research-groups,
.wf-research-themes,
.wf-research-findings {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.wf-research-group,
.wf-research-themes span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(129,140,248,0.10);
  border: 1px solid rgba(199,210,254,0.25);
  color: var(--violet-200);
  opacity: 0;
  transform: translateY(8px);
  animation: wf-chip-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
  white-space: nowrap;
}

.wf-finding-line {
  display: block;
  height: 8px;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(199,210,254,0.85), rgba(16,185,129,0.85));
  animation: wf-research-line 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.wf-finding-verdict {
  margin-top: 5px;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-align: center;
  line-height: 1.15;
  color: var(--violet-100);
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(199,210,254,0.14);
  border: 1px solid rgba(199,210,254,0.35);
  opacity: 0;
  transform: translateY(5px);
  animation: wf-fade-in 3.6s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

@keyframes wf-research-line {
  0%, 18% { width: 0; opacity: 0.45; }
  55%, 88% { width: var(--w, 80%); opacity: 1; }
  100% { width: 0; opacity: 0.35; }
}


/* ========== EDUCATION + EXPERIENCE COMBINED SECTION ========== */
.section-anchor {
  position: absolute;
  top: 0;
  left: 0;
}

.edu-exp-section {
  position: relative;
}

.edu-exp-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.35fr);
  gap: 24px;
  align-items: stretch;
}

.edu-exp-education-card {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px 32px;
  background:
    radial-gradient(circle at 82% 18%, rgba(129,140,248,0.12), transparent 34%),
    var(--card);
}

.edu-exp-education-card .edu-header {
  display: block;
  margin-bottom: 26px;
}

.edu-exp-education-card .edu-header h3 {
  font-size: 1.42rem;
  margin-bottom: 6px;
}

.edu-exp-education-card .edu-degree {
  max-width: 330px;
}

.edu-exp-education-card .edu-date {
  display: inline-flex;
  margin-top: 18px;
}

.edu-exp-coursework-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 430px;
}

.edu-exp-experience-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.edu-exp-experience-grid .experience-card {
  min-height: 208px;
  height: 100%;
  padding: 22px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.edu-exp-experience-grid .experience-visual {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  margin-bottom: 14px;
}

.edu-exp-experience-grid .experience-visual i {
  font-size: 1.55rem;
}

.edu-exp-experience-grid .visual-glow {
  width: 58px;
  height: 58px;
}

.edu-exp-experience-grid .experience-card h3 {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 210px;
  margin-bottom: 6px;
}

.edu-exp-experience-grid .experience-org {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .edu-exp-layout {
    grid-template-columns: 1fr;
  }

  .edu-exp-education-card {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  .edu-exp-experience-grid {
    grid-template-columns: 1fr;
  }

  .edu-exp-experience-grid .experience-card {
    min-height: 190px;
  }
}


/* ========== INTERACTIVE RESUME DOCUMENT ========== */
.resume-section {
  background:
    radial-gradient(circle at 18% 12%, rgba(99,102,241,0.16), transparent 32%),
    radial-gradient(circle at 80% 70%, rgba(30,64,175,0.14), transparent 34%),
    linear-gradient(180deg, #050712 0%, #080b1f 52%, #03040c 100%);
}

.resume-section-title {
  color: #c7d2fe;
}

.resume-paper {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 4vw, 44px);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,248,255,0.96)),
    #ffffff;
  color: #101322;
  border: 1px solid rgba(255,255,255,0.68);
  box-shadow:
    0 26px 80px rgba(0,0,0,0.44),
    0 0 0 1px rgba(255,255,255,0.12) inset;
}

.resume-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px),
    linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
}

.resume-paper-header,
.resume-grid,
.resume-divider {
  position: relative;
  z-index: 1;
}

.resume-paper-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.resume-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #3730a3;
}

.resume-paper-header h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
  color: #050712;
}

.resume-headline {
  margin-top: 12px;
  color: #334155;
  font-weight: 800;
}

.resume-contact-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 360px;
}

.resume-contact-strip span,
.resume-tags span {
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resume-contact-strip span {
  padding: 7px 12px;
  color: #1e1b4b;
  background: rgba(99,102,241,0.10);
  border: 1px solid rgba(67,56,202,0.20);
}

.resume-divider {
  height: 1px;
  margin: 30px 0 24px;
  background: linear-gradient(90deg, rgba(15,23,42,0.08), rgba(15,23,42,0.38), rgba(15,23,42,0.08));
}

.resume-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.resume-entry {
  background: rgba(255,255,255,0.84);
  border: 1px solid rgba(15,23,42,0.12);
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  color: #101322;
}

.resume-entry:hover {
  transform: translateY(-3px);
  border-color: rgba(67,56,202,0.32);
  box-shadow: 0 18px 44px rgba(15,23,42,0.14);
}

.resume-entry.expanded {
  grid-column: 1 / -1;
  background: #ffffff;
  border-color: rgba(49,46,129,0.35);
}

.resume-entry-front {
  padding: 22px;
  padding-right: 22px;
}

.resume-entry-topline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.resume-category,
.resume-date {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.resume-category {
  color: #3730a3;
}

.resume-date {
  color: #475569;
}

.resume-title-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.resume-icon {
  flex: 0 0 auto;
  margin-bottom: 0;
  color: #312e81;
  background: rgba(99,102,241,0.11);
  border: 1px solid rgba(49,46,129,0.12);
}

.resume-entry h3 {
  color: #050712;
  font-size: 1.04rem;
  margin-bottom: 4px;
}

.resume-org {
  margin: 0;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 800;
}

.resume-summary {
  color: #334155;
  margin: 14px 0 12px;
}

.resume-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.resume-tags span {
  padding: 5px 9px;
  color: #1e1b4b;
  background: rgba(67,56,202,0.08);
  border: 1px solid rgba(67,56,202,0.14);
}

.resume-expand {
  color: #312e81;
}

.resume-entry-details {
  color: #101322;
}

.resume-entry.expanded .resume-entry-details {
  padding-bottom: 24px;
}

.resume-entry-details p,
.resume-paper .workflow-blurb p {
  color: #334155;
}

.resume-paper .workflow-stages {
  gap: 8px;
}

.resume-paper .wf-stage {
  background: rgba(248,250,252,0.95);
  border: 1px solid rgba(15,23,42,0.12);
}

.resume-paper .wf-stage-label,
.resume-paper .wf-arrow,
.resume-paper .wf-bar-label,
.resume-paper .wf-coef,
.resume-paper .wf-chip,
.resume-paper .wf-metric,
.resume-paper .wf-verdict,
.resume-paper .wf-research-group,
.resume-paper .wf-research-themes span,
.resume-paper .wf-research-question,
.resume-paper .wf-finding-verdict {
  color: #1e1b4b;
}

.resume-paper .wf-arrow {
  opacity: 0.75;
}

.resume-paper .wf-chip,
.resume-paper .wf-metric,
.resume-paper .wf-verdict,
.resume-paper .wf-coef,
.resume-paper .wf-research-group,
.resume-paper .wf-research-themes span,
.resume-paper .wf-research-question,
.resume-paper .wf-finding-verdict {
  background: rgba(67,56,202,0.08);
  border-color: rgba(67,56,202,0.18);
}

.resume-paper .wf-envelope-body,
.resume-paper .wf-spreadsheet {
  background: rgba(99,102,241,0.06);
  border-color: rgba(49,46,129,0.22);
}

.resume-paper .wf-envelope-flap,
.resume-paper .wf-bar span,
.resume-paper .wf-dcf-bar,
.resume-paper .wf-tor-bar {
  background: linear-gradient(90deg, rgba(49,46,129,0.82), rgba(99,102,241,0.72));
}

.resume-paper .wf-email-line,
.resume-paper .wf-row span,
.resume-paper .wf-finding-line {
  background: rgba(49,46,129,0.34);
}

.resume-paper .wf-row-header span {
  background: rgba(49,46,129,0.58);
}

.resume-paper .wf-bar,
.resume-paper .wf-tor-row {
  background: rgba(15,23,42,0.07);
  border-color: rgba(15,23,42,0.10);
}

.resume-paper .wf-tornado-axis,
.resume-paper .wf-dcf {
  border-color: rgba(15,23,42,0.18);
}

@media (max-width: 820px) {
  .resume-grid {
    grid-template-columns: 1fr;
  }

  .resume-entry.expanded {
    grid-column: auto;
  }

  .resume-paper {
    padding: 22px;
  }

  .resume-paper-header {
    align-items: flex-start;
  }

  .resume-contact-strip {
    justify-content: flex-start;
  }
}


/* ===== Authentic interactive resume document override ===== */
.resume-paper-authentic {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.995), rgba(250,251,255,0.985));
  color: #111827;
  border-radius: 18px;
  box-shadow:
    0 30px 90px rgba(0,0,0,0.52),
    0 0 0 1px rgba(255,255,255,0.22) inset;
}

.resume-paper-authentic::before {
  background:
    linear-gradient(90deg, rgba(30,41,59,0.025) 1px, transparent 1px),
    linear-gradient(rgba(30,41,59,0.025) 1px, transparent 1px);
  background-size: 22px 22px;
}

.resume-document-header {
  position: relative;
  z-index: 1;
  text-align: center;
  padding-bottom: 14px;
  border-bottom: 2px solid #111827;
  margin-bottom: 16px;
}

.resume-document-header h3 {
  margin: 0 0 4px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.035em;
  color: #020617;
  font-weight: 900;
}

.resume-document-header p {
  margin: 0;
  color: #1f2937;
  font-size: 0.94rem;
  font-weight: 700;
}

.resume-doc-section {
  position: relative;
  z-index: 1;
  margin-top: 18px;
}

.resume-doc-section h4 {
  margin: 0 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #111827;
  color: #111827;
  font-size: 0.83rem;
  letter-spacing: 0.10em;
  font-weight: 900;
}

.resume-static-section p,
.resume-line-block p {
  margin: 3px 0;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.35;
}

.resume-line-block {
  padding: 4px 0 2px;
}

.resume-line-card {
  margin: 8px 0 10px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.10);
  color: #111827;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.055);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.resume-line-card:hover {
  transform: translateY(-2px) scale(1.003);
  border-color: rgba(59,130,246,0.34);
  box-shadow: 0 16px 38px rgba(15,23,42,0.13);
  background: #ffffff;
}

.resume-line-card.expanded {
  background: #ffffff;
  border-color: rgba(67,56,202,0.38);
  box-shadow: 0 20px 48px rgba(15,23,42,0.15);
}

.resume-line-front {
  padding: 14px 16px 12px;
  padding-right: 16px;
}

.resume-line-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(110px, 0.8fr) auto;
  gap: 12px;
  align-items: baseline;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.25;
}

.resume-line-main strong {
  font-weight: 900;
  color: #020617;
}

.resume-line-main span {
  color: #111827;
  font-weight: 700;
}

.resume-role {
  margin: 3px 0 4px;
  color: #111827;
  font-weight: 850;
  font-size: 0.92rem;
  font-style: italic;
}

.resume-bullets {
  margin: 4px 0 0 18px;
  padding: 0;
  color: #111827;
  font-size: 0.90rem;
  line-height: 1.34;
}

.resume-bullets li {
  margin: 2px 0;
  padding-left: 2px;
}

.resume-expand {
  margin-top: 8px;
  color: #312e81;
  display: inline-flex;
}

.resume-line-card:hover .resume-expand {
  color: #1d4ed8;
}

.resume-entry-details {
  color: #111827;
  border-top: 1px solid rgba(15,23,42,0.08);
}

.resume-entry.expanded .resume-entry-details,
.resume-line-card.expanded .resume-entry-details {
  padding: 12px 16px 16px;
}

.resume-paper-authentic .workflow-blurb p {
  color: #334155;
  font-size: 0.88rem;
  margin: 0 0 10px;
}

.resume-paper-authentic .workflow-stages {
  padding-top: 4px;
}

.resume-paper-authentic .wf-stage {
  background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(241,245,249,0.96));
  border-color: rgba(15,23,42,0.13);
}

.resume-paper-authentic .wf-stage-label,
.resume-paper-authentic .wf-chip,
.resume-paper-authentic .wf-metric,
.resume-paper-authentic .wf-verdict,
.resume-paper-authentic .wf-coef,
.resume-paper-authentic .wf-arrow {
  color: #1e1b4b;
}

.resume-paper-authentic .wf-chip,
.resume-paper-authentic .wf-metric,
.resume-paper-authentic .wf-verdict,
.resume-paper-authentic .wf-coef {
  background: rgba(79,70,229,0.08);
  border-color: rgba(79,70,229,0.20);
}

.resume-paper-authentic .wf-envelope-flap,
.resume-paper-authentic .wf-bar span,
.resume-paper-authentic .wf-dcf-bar,
.resume-paper-authentic .wf-tor-bar {
  background: linear-gradient(90deg, rgba(49,46,129,0.88), rgba(37,99,235,0.70));
}

.resume-paper-authentic .wf-envelope-body,
.resume-paper-authentic .wf-spreadsheet {
  background: rgba(79,70,229,0.055);
  border-color: rgba(49,46,129,0.22);
}

.resume-paper-authentic .wf-email-line,
.resume-paper-authentic .wf-row span {
  background: rgba(49,46,129,0.34);
}

.resume-paper-authentic .wf-row-header span {
  background: rgba(49,46,129,0.58);
}

.compact-resume-entry .resume-line-front {
  padding-top: 12px;
  padding-bottom: 10px;
}

.mini-workflow .wf-stage-content {
  min-height: 72px;
}

.resume-interests p {
  font-weight: 750;
  color: #111827;
}

@media (max-width: 760px) {
  .resume-line-main {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .resume-document-header {
    text-align: left;
  }

  .resume-paper-authentic {
    padding: 22px 16px;
  }
}

/* ==========================================================
   Interactive resume document v120
   - replaces visible bullet lists with hover/focus animations
   - fixes header/date alignment
   ========================================================== */
.resume-section {
  background:
    radial-gradient(circle at top left, rgba(76, 92, 180, 0.16), transparent 34%),
    radial-gradient(circle at bottom right, rgba(88, 58, 150, 0.14), transparent 34%),
    linear-gradient(180deg, #070716 0%, #04040b 100%);
}

.resume-paper-live {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 54px);
  color: #071024;
  background:
    linear-gradient(rgba(20, 35, 80, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 35, 80, 0.028) 1px, transparent 1px),
    #fbfbfd;
  background-size: 18px 18px;
  border: 1px solid rgba(255,255,255,0.72);
  border-radius: 0;
  box-shadow:
    0 28px 90px rgba(0,0,0,0.42),
    0 0 0 1px rgba(80, 95, 170, 0.12) inset;
  overflow: hidden;
}

.resume-paper-live::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 12%, rgba(92, 110, 215, 0.08), transparent 25%),
    radial-gradient(circle at 84% 84%, rgba(84, 62, 150, 0.07), transparent 26%);
  mix-blend-mode: multiply;
}

.resume-paper-live > * {
  position: relative;
  z-index: 1;
}

.resume-document-header {
  text-align: center;
  padding-bottom: 18px;
  margin-bottom: 12px;
  border-bottom: 2px solid #111827;
}

.resume-document-header h3 {
  color: #020617;
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: -0.07em;
  margin: 0 0 8px;
}

.resume-document-header p {
  color: #071024;
  font-size: 0.86rem;
  line-height: 1.2;
  font-weight: 800;
  margin: 0;
}

.resume-doc-section {
  margin-top: 22px;
}

.resume-doc-section h4 {
  color: #020617;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  border-bottom: 1.7px solid #111827;
  padding-bottom: 5px;
  margin: 0 0 11px;
}

.resume-static-section p,
.resume-static-block p,
.resume-flow-note {
  color: #0f172a;
  font-size: 0.86rem;
  line-height: 1.45;
  margin: 3px 0;
}

.resume-meta-row {
  display: grid;
  gap: 18px;
  align-items: baseline;
  width: 100%;
  color: #020617;
  line-height: 1.25;
}

.resume-meta-row.three-col {
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.85fr) minmax(150px, 0.85fr);
}

.resume-meta-row.two-col {
  grid-template-columns: minmax(320px, 1.65fr) minmax(220px, 1fr);
}

.resume-meta-row strong {
  font-size: 0.91rem;
  font-weight: 900;
  color: #020617;
}

.resume-meta-row span {
  font-size: 0.86rem;
  font-weight: 850;
  color: #081326;
  white-space: nowrap;
}

.resume-meta-row span:last-child {
  text-align: right;
}

.resume-role {
  color: #071024;
  font-size: 0.86rem;
  font-style: italic;
  font-weight: 850;
  line-height: 1.25;
  margin: 4px 0 0;
}

.interactive-resume-group {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.interactive-resume-group h4 {
  margin-bottom: 0;
}

.resume-line-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 86px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 9px;
  background: rgba(255,255,255,0.82);
  box-shadow:
    0 10px 30px rgba(15,23,42,0.07),
    0 0 0 1px rgba(255,255,255,0.8) inset;
  cursor: pointer;
  outline: none;
  transition: min-height 0.32s ease, transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.resume-line-card:hover,
.resume-line-card:focus-within,
.resume-line-card.resume-active {
  min-height: 252px;
  transform: translateY(-2px);
  border-color: rgba(59, 72, 170, 0.34);
  box-shadow:
    0 18px 44px rgba(15,23,42,0.14),
    0 0 0 1px rgba(83, 98, 200, 0.18) inset;
}

.resume-line-card.compact-resume-entry:hover,
.resume-line-card.compact-resume-entry:focus-within,
.resume-line-card.compact-resume-entry.resume-active {
  min-height: 196px;
}

.resume-entry-summary {
  position: relative;
  z-index: 2;
  min-height: 84px;
  padding: 15px 17px 13px;
  background: rgba(255,255,255,0.94);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.resume-entry-summary::after {
  content: "hover to animate";
  display: inline-flex;
  margin-top: 9px;
  color: #25245f;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.72;
}

.resume-line-card:hover .resume-entry-summary,
.resume-line-card:focus-within .resume-entry-summary,
.resume-line-card.resume-active .resume-entry-summary {
  background: rgba(255,255,255,0.72);
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}

.resume-line-card:hover .resume-entry-summary::after,
.resume-line-card:focus-within .resume-entry-summary::after,
.resume-line-card.resume-active .resume-entry-summary::after {
  content: "animated workflow";
  color: #101746;
  opacity: 1;
}

.resume-entry-animation {
  position: absolute;
  left: 0;
  right: 0;
  top: 84px;
  min-height: 166px;
  padding: 14px 16px 16px;
  background:
    radial-gradient(circle at 12% 20%, rgba(68, 90, 210, 0.11), transparent 28%),
    radial-gradient(circle at 90% 70%, rgba(72, 45, 142, 0.10), transparent 28%),
    linear-gradient(180deg, rgba(248,250,252,0.96), rgba(241,245,249,0.96));
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.resume-line-card:hover .resume-entry-animation,
.resume-line-card:focus-within .resume-entry-animation,
.resume-line-card.resume-active .resume-entry-animation {
  opacity: 1;
  transform: translateY(0);
}

.resume-flow-note {
  color: #101746;
  font-weight: 850;
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid rgba(59, 72, 170, 0.44);
}

.resume-workflow {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: nowrap;
  padding: 0;
}

.resume-workflow .wf-stage {
  min-width: 0;
  flex: 1 1 0;
  padding: 11px 9px 12px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(30,41,59,0.12);
  box-shadow: 0 8px 20px rgba(15,23,42,0.05);
}

.resume-workflow .wf-stage-label,
.resume-workflow .wf-arrow,
.resume-workflow .wf-bar-label,
.resume-workflow .wf-coef,
.resume-workflow .wf-chip,
.resume-workflow .wf-metric,
.resume-workflow .wf-verdict {
  color: #111746;
}

.resume-workflow .wf-stage-label {
  margin-bottom: 9px;
  font-size: 0.62rem;
}

.resume-workflow .wf-stage-content {
  min-height: 74px;
}

.resume-workflow .wf-arrow {
  align-items: center;
  justify-content: center;
  flex: 0 0 14px;
  opacity: 0.55;
}

.resume-workflow .wf-chip,
.resume-workflow .wf-metric,
.resume-workflow .wf-verdict,
.resume-workflow .wf-coef {
  background: rgba(69, 83, 190, 0.10);
  border: 1px solid rgba(69, 83, 190, 0.18);
}

.resume-workflow .wf-envelope-body,
.resume-workflow .wf-spreadsheet {
  background: rgba(69, 83, 190, 0.06);
  border-color: rgba(69, 83, 190, 0.22);
}

.resume-workflow .wf-envelope-flap,
.resume-workflow .wf-bar span,
.resume-workflow .wf-dcf-bar,
.resume-workflow .wf-tor-bar {
  background: linear-gradient(90deg, rgba(58, 73, 180, 0.72), rgba(106, 83, 190, 0.72));
}

.resume-workflow .wf-email-line,
.resume-workflow .wf-row span {
  background: rgba(60, 75, 180, 0.32);
}

.resume-workflow .wf-row-header span {
  background: rgba(60, 75, 180, 0.56);
}

.resume-workflow .wf-bar,
.resume-workflow .wf-tor-row {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.10);
}

.resume-workflow .wf-tornado-axis,
.resume-workflow .wf-dcf {
  border-color: rgba(15, 23, 42, 0.24);
}

.resume-interests p {
  font-weight: 800;
}

.resume-bullets,
.resume-expand,
.project-expand-hint.resume-expand {
  display: none !important;
}

@media (max-width: 860px) {
  .resume-paper-live {
    padding: 26px 18px;
  }

  .resume-meta-row.three-col,
  .resume-meta-row.two-col {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .resume-meta-row span,
  .resume-meta-row span:last-child {
    text-align: left;
    white-space: normal;
  }

  .resume-line-card:hover,
  .resume-line-card:focus-within,
  .resume-line-card.resume-active,
  .resume-line-card.compact-resume-entry:hover,
  .resume-line-card.compact-resume-entry:focus-within,
  .resume-line-card.compact-resume-entry.resume-active {
    min-height: 480px;
  }

  .resume-entry-summary {
    min-height: 114px;
  }

  .resume-entry-animation {
    top: 114px;
    min-height: 350px;
  }

  .resume-workflow {
    flex-wrap: wrap;
  }

  .resume-workflow .wf-stage {
    flex: 1 1 155px;
  }

  .resume-workflow .wf-arrow {
    display: none;
  }
}

/* ==========================================================
   Resume Story Document — ergonomic whole-document hover model
   ========================================================== */
.resume-story-paper {
  position: relative;
  max-width: 980px;
  margin: 0 auto;
  padding: 34px 54px 42px;
  background:
    linear-gradient(rgba(12,16,28,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12,16,28,0.025) 1px, transparent 1px),
    #ffffff;
  background-size: 18px 18px;
  color: #07101f;
  border-radius: 3px;
  box-shadow: 0 28px 90px rgba(0,0,0,0.38), 0 0 0 1px rgba(255,255,255,0.18);
  transform-origin: top center;
}

.resume-hover-control {
  position: sticky;
  top: 16px;
  z-index: 8;
  width: fit-content;
  margin: -12px 0 18px auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(10,12,30,0.92);
  color: rgba(255,255,255,0.92);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.resume-hover-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #80ffd6;
  box-shadow: 0 0 0 0 rgba(128,255,214,0.55);
  animation: resume-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes resume-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(128,255,214,0.0); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(128,255,214,0.18); transform: scale(1.15); }
}

.resume-story-header {
  border-bottom: 2px solid #0b1224;
  padding-bottom: 12px;
  margin-bottom: 18px;
}

.resume-story-header h3 {
  color: #020817;
  letter-spacing: -0.055em;
}

.resume-story-header p,
.resume-story-paper p,
.resume-story-paper span,
.resume-story-paper strong {
  color: #07101f;
}

.resume-story-paper .resume-doc-section h4 {
  color: #050a17;
  border-bottom: 1.5px solid #0b1224;
  padding-bottom: 5px;
  margin: 18px 0 10px;
}

.resume-story-group {
  display: grid;
  gap: 10px;
}

.resume-story-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(8,15,31,0.12);
  border-radius: 13px;
  background:
    radial-gradient(circle at top right, rgba(28,44,100,0.045), transparent 36%),
    rgba(255,255,255,0.92);
  box-shadow: 0 8px 22px rgba(10,12,20,0.065);
  transition: border-color 0.28s ease, box-shadow 0.28s ease, transform 0.28s ease, background 0.28s ease;
}

.resume-story-paper:hover .resume-story-card,
.resume-story-paper.resume-paper-active .resume-story-card {
  border-color: rgba(42,52,96,0.22);
  box-shadow: 0 12px 28px rgba(10,12,20,0.09);
}

.resume-story-paper:hover .resume-story-card:nth-of-type(odd),
.resume-story-paper.resume-paper-active .resume-story-card:nth-of-type(odd) {
  transform: translateX(2px);
}

.resume-story-paper:hover .resume-story-card:nth-of-type(even),
.resume-story-paper.resume-paper-active .resume-story-card:nth-of-type(even) {
  transform: translateX(-2px);
}

.resume-story-card .resume-entry-summary {
  position: relative;
  z-index: 2;
  padding: 13px 16px 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0.98), rgba(248,250,255,0.90));
}

.resume-story-card .resume-entry-summary::after {
  content: none;
}

.resume-story-card .resume-meta-row {
  display: grid;
  align-items: baseline;
  column-gap: 18px;
  row-gap: 2px;
  font-size: 0.83rem;
}

.resume-story-card .resume-meta-row.three-col {
  grid-template-columns: minmax(210px, 1.35fr) minmax(140px, 0.9fr) minmax(150px, 0.85fr);
}

.resume-story-card .resume-meta-row.two-col {
  grid-template-columns: minmax(260px, 1.4fr) minmax(190px, 0.8fr);
}

.resume-story-card .resume-meta-row strong {
  font-weight: 900;
}

.resume-story-card .resume-meta-row span:last-child {
  text-align: right;
  font-weight: 800;
}

.resume-story-card .resume-role {
  margin: 3px 0 0;
  font-size: 0.82rem;
  font-weight: 800;
  font-style: italic;
  color: #182039;
}

.resume-impact-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-8px);
  padding: 0 16px;
  transition: max-height 0.45s ease, opacity 0.34s ease, transform 0.34s ease, padding 0.45s ease;
}

.resume-story-paper:hover .resume-impact-panel,
.resume-story-paper.resume-paper-active .resume-impact-panel {
  max-height: 240px;
  opacity: 1;
  transform: translateY(0);
  padding: 0 16px 16px;
}

.impact-caption {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #28324f !important;
}

.resume-impact-panel > div:not(.impact-caption) {
  min-height: 86px;
  border-radius: 12px;
  background: linear-gradient(135deg, #f7f9ff, #edf2ff);
  border: 1px solid rgba(35,45,88,0.10);
}

.impact-fab,
.impact-soccer,
.impact-drone,
.impact-service,
.impact-chess,
.impact-cad,
.impact-etl,
.impact-solar {
  position: relative;
  overflow: hidden;
}

/* Micron fab */
.fab-wafer {
  position: absolute;
  left: 20px;
  top: 17px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #ffffff, #bfc8e6 42%, #7e89ad 100%);
  box-shadow: inset -8px -12px 20px rgba(0,0,0,0.14), 0 12px 24px rgba(11,18,36,0.12);
}
.fab-wafer i { position: absolute; background: rgba(35,45,88,0.32); }
.fab-wafer i:nth-child(1) { left: 12px; top: 0; width: 1px; height: 58px; }
.fab-wafer i:nth-child(2) { left: 28px; top: 0; width: 1px; height: 58px; }
.fab-wafer i:nth-child(3) { left: 0; top: 21px; width: 58px; height: 1px; }
.fab-wafer i:nth-child(4) { left: 0; top: 38px; width: 58px; height: 1px; }
.fab-sql, .fab-kpi {
  position: absolute;
  top: 28px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  background: #101934;
  color: #fff !important;
}
.fab-sql { left: 110px; animation: chip-hop 2.8s ease-in-out infinite; }
.fab-kpi { left: 168px; animation: chip-hop 2.8s ease-in-out infinite 0.25s; }
.fab-dashboard { position: absolute; right: 18px; top: 18px; width: 132px; height: 54px; display: flex; align-items: end; gap: 7px; padding: 9px; border-radius: 10px; background: #fff; border: 1px solid rgba(12,18,36,0.12); }
.fab-dashboard b { flex: 1; display: block; height: 20%; border-radius: 3px 3px 0 0; background: linear-gradient(#8df3cb, #316e65); animation: metric-grow 2.8s ease-in-out infinite; }
.fab-dashboard b:nth-child(2) { --h: 76%; animation-delay: 0.12s; }
.fab-dashboard b:nth-child(3) { --h: 52%; animation-delay: 0.24s; }

@keyframes chip-hop { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes metric-grow { 0%,100% { height: 24%; } 50% { height: var(--h, 88%); } }

/* Soccer pitch */
.impact-soccer { background: linear-gradient(135deg, #ecfff7, #edf2ff) !important; }
.pitch-line.mid { position:absolute; left:50%; top:10px; bottom:10px; width:1px; background:rgba(0,70,50,0.18); }
.pitch-box { position:absolute; top:25px; width:42px; height:36px; border:1px solid rgba(0,70,50,0.22); }
.pitch-box.left { left:12px; border-left:0; }
.pitch-box.right { right:12px; border-right:0; }
.player-dot { position:absolute; width:10px; height:10px; border-radius:50%; background:#19a979; box-shadow:0 0 0 5px rgba(25,169,121,0.11); animation: player-run 3.2s ease-in-out infinite; }
.d1{left:72px;top:20px}.d2{left:126px;top:48px;animation-delay:.2s}.d3{left:174px;top:26px;animation-delay:.4s}.d4{left:218px;top:54px;animation-delay:.6s}
.soccer-bars { position:absolute; right:20px; bottom:13px; width:110px; display:grid; gap:5px; }
.soccer-bars b { display:block; width:0; height:7px; border-radius:999px; background:linear-gradient(90deg,#24314f,#19a979); animation: width-fill 3s ease-in-out infinite; }
@keyframes player-run { 0%,100%{transform:translate(0,0)} 50%{transform:translate(12px,-6px)} }
@keyframes width-fill { 0%,100%{width:18%} 50%{width:var(--w)} }

/* Drone */
.impact-drone svg, .impact-solar svg { position:absolute; inset:0; width:100%; height:100%; }
.impact-drone path, .cash-curve { fill:none; stroke:#27345c; stroke-width:3; stroke-linecap:round; stroke-dasharray:360; stroke-dashoffset:360; animation:path-draw 3.2s ease-in-out infinite; }
.drone-body { position:absolute; left:34px; top:28px; width:34px; height:14px; border-radius:999px; background:#111a36; z-index:2; animation: drone-fly 3.2s ease-in-out infinite; }
.drone-body i { position:absolute; width:14px; height:14px; border:2px solid #111a36; border-radius:50%; animation: rotor-spin .55s linear infinite; }
.drone-body i:nth-child(1){left:-18px;top:-12px}.drone-body i:nth-child(2){right:-18px;top:-12px}.drone-body i:nth-child(3){left:-18px;bottom:-12px}.drone-body i:nth-child(4){right:-18px;bottom:-12px}
.drone-label { position:absolute; z-index:2; padding:5px 9px; border-radius:999px; background:#fff; border:1px solid rgba(12,18,36,.12); font-size:.66rem; font-weight:900; }
.drone-label.one { left:116px; top:13px; }.drone-label.two { right:18px; bottom:16px; }
@keyframes path-draw { 0%,100%{stroke-dashoffset:360} 50%{stroke-dashoffset:0} }
@keyframes drone-fly { 0%,100%{transform:translate(0,0)} 50%{transform:translate(120px,-12px)} }
@keyframes rotor-spin { to { transform:rotate(360deg); } }

/* Service */
.impact-service { display:flex; align-items:center; justify-content:center; gap:12px; min-height:74px !important; }
.impact-service span { padding:8px 12px; border-radius:999px; background:#fff; border:1px solid rgba(12,18,36,.12); font-weight:900; font-size:.72rem; animation: chip-hop 2.8s ease-in-out infinite; }
.impact-service span:nth-child(2){animation-delay:.18s}.impact-service span:nth-child(3){animation-delay:.36s}

/* Chess */
.impact-chess { min-height:74px !important; display:flex; align-items:center; justify-content:center; gap:18px; background:
  linear-gradient(45deg, rgba(10,16,32,.08) 25%, transparent 25%),
  linear-gradient(-45deg, rgba(10,16,32,.08) 25%, transparent 25%),
  #f6f8ff !important; background-size:24px 24px !important; }
.king { font-size:2.2rem; color:#0b1328 !important; animation: chess-step 3s ease-in-out infinite; }
.elo-ring { width:58px; height:58px; border-radius:50%; border:5px solid #172144; display:grid; place-content:center; background:#fff; animation:ring-pulse 2.6s ease-in-out infinite; }
.elo-ring b { font-size:.82rem; line-height:1; }.elo-ring small { font-size:.48rem; text-align:center; font-weight:900; color:#405070; }
.team-label { font-size:.7rem; font-weight:900; padding:7px 10px; border-radius:999px; background:#101934; color:#fff !important; }
@keyframes chess-step { 0%,100%{transform:translateY(0) rotate(0)} 50%{transform:translateY(-5px) rotate(-5deg)} }
@keyframes ring-pulse { 50%{box-shadow:0 0 0 9px rgba(23,33,68,.08)} }

/* CAD */
.impact-cad { min-height:74px !important; }
.cube { position:absolute; left:36px; top:20px; width:52px; height:38px; border:2px solid #172144; transform:skewY(-12deg); }
.cube::before { content:''; position:absolute; inset:-12px 12px 12px -12px; border:2px solid rgba(23,33,68,.55); }
.cube::after { content:''; position:absolute; left:-12px; top:-12px; width:52px; height:38px; border-top:2px solid rgba(23,33,68,.55); border-right:2px solid rgba(23,33,68,.55); }
.dimension { position:absolute; background:#19a979; animation: dim-scan 2.8s ease-in-out infinite; }
.dim-a { left:108px; top:28px; width:72px; height:2px; }.dim-b { left:142px; top:18px; width:2px; height:44px; animation-delay:.2s; }
.cad-label { position:absolute; right:18px; bottom:18px; font-size:.7rem; font-weight:900; padding:7px 10px; border-radius:999px; background:#fff; border:1px solid rgba(12,18,36,.12); }
@keyframes dim-scan { 0%,100%{opacity:.25; transform:scaleX(.55)} 50%{opacity:1; transform:scaleX(1)} }

/* ETL */
.impact-etl { display:flex; align-items:center; gap:18px; padding:14px 18px; }
.mail-stack { position:relative; width:52px; height:38px; }
.mail-stack i { position:absolute; inset:0; border-radius:6px; background:#fff; border:1px solid rgba(12,18,36,.15); box-shadow:0 6px 14px rgba(12,18,36,.08); animation: mail-shuffle 3s ease-in-out infinite; }
.mail-stack i:nth-child(2){transform:translate(6px,6px);animation-delay:.15s}.mail-stack i:nth-child(3){transform:translate(12px,12px);animation-delay:.3s}
.etl-arrow { width:48px; height:2px; background:#172144; position:relative; }
.etl-arrow::after { content:''; position:absolute; right:-1px; top:-4px; border-left:8px solid #172144; border-top:5px solid transparent; border-bottom:5px solid transparent; }
.score-model { width:105px; display:grid; gap:6px; }
.score-model b { display:block; height:8px; width:0; border-radius:999px; background:linear-gradient(90deg,#172144,#19a979); animation:width-fill 3s ease-in-out infinite; }
.top-badge,.save-badge { padding:8px 10px; border-radius:999px; font-size:.68rem; font-weight:900; background:#101934; color:#fff !important; white-space:nowrap; }
.save-badge { background:#19a979; color:#04140e !important; }
@keyframes mail-shuffle { 50%{transform:translate(18px,4px) rotate(3deg)} }

/* Solar */
.impact-solar { min-height:96px !important; }
.solar-panel { position:absolute; left:22px; top:20px; width:70px; height:44px; display:grid; grid-template-columns:repeat(2,1fr); gap:3px; padding:4px; background:#172144; transform:skewX(-8deg); }
.solar-panel i { background:linear-gradient(135deg,#293d7a,#8fb6ff); animation: panel-shine 2.6s ease-in-out infinite; }
.solar-panel i:nth-child(2){animation-delay:.1s}.solar-panel i:nth-child(3){animation-delay:.2s}.solar-panel i:nth-child(4){animation-delay:.3s}
.sensitivity-bars { position:absolute; right:18px; top:22px; width:112px; display:grid; gap:7px; }
.sensitivity-bars b { display:block; height:9px; border-radius:999px; background:linear-gradient(90deg,#b34b4b,#f5d9d9,#19a979); width:0; animation:width-fill 3.1s ease-in-out infinite; }
@keyframes panel-shine { 50%{filter:brightness(1.35)} }

@media (max-width: 760px) {
  .resume-story-paper { padding: 28px 20px 34px; }
  .resume-hover-control { position: static; margin: -4px auto 16px; text-align:center; }
  .resume-story-card .resume-meta-row.three-col,
  .resume-story-card .resume-meta-row.two-col { grid-template-columns: 1fr; }
  .resume-story-card .resume-meta-row span:last-child { text-align: left; }
  .resume-story-paper:hover .resume-impact-panel,
  .resume-story-paper.resume-paper-active .resume-impact-panel { max-height: 320px; }
  .impact-etl { flex-wrap: wrap; }
  .fab-dashboard { position: absolute; right: 10px; width: 98px; }
}


/* ==========================================================
   INTERACTIVE RESUME DOCUMENT v141
   ========================================================== */
.resume-document-v2 {
  width: min(100%, 980px);
  margin: 0 auto;
  background:
    linear-gradient(rgba(49, 73, 137, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 73, 137, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #fbfcff 0%, #f6f8fc 100%);
  background-size: 22px 22px, 22px 22px, 100% 100%;
  color: #101828;
  border: 1px solid rgba(129, 140, 248, 0.18);
  border-radius: 20px;
  padding: 34px 32px 28px;
  box-shadow: 0 18px 58px rgba(0,0,0,0.22);
}

.resume-doc-head {
  border-bottom: 1px solid rgba(15, 23, 42, 0.22);
  padding-bottom: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.resume-doc-head h3 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1;
  color: #081225;
  margin-bottom: 8px;
  letter-spacing: -0.04em;
}

.resume-doc-head p {
  color: #334155;
  font-size: 0.94rem;
}

.resume-doc-block + .resume-doc-block {
  margin-top: 18px;
}

.resume-doc-block h4 {
  margin: 0 0 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.18);
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.resume-static-card {
  padding: 2px 0 0;
}

.resume-static-card p,
.resume-interests-v2 p,
.resume-entry-note {
  color: #263242;
  font-size: 0.96rem;
  line-height: 1.55;
}

.resume-static-card p + p,
.resume-entry-note {
  margin-top: 4px;
}

.resume-line-grid {
  display: grid;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
  color: #0f172a;
}

.resume-line-grid.line-3 {
  grid-template-columns: minmax(0, 1.5fr) minmax(140px, .9fr) minmax(180px, 1fr);
}

.resume-entry {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  margin-top: 12px;
  padding: 14px 16px;
  transition: transform 0.25s ease, box-shadow 0.28s ease, border-color 0.28s ease;
  position: relative;
}

.resume-entry.is-expandable {
  cursor: pointer;
}

.resume-entry.is-expandable:hover,
.resume-entry.is-expandable:focus-visible {
  border-color: rgba(99, 102, 241, 0.38);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
  animation: resumePulse 1.6s ease-in-out infinite;
}

@keyframes resumePulse {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10); }
  50% { transform: translateY(-3px) scale(1.008); box-shadow: 0 20px 40px rgba(79, 70, 229, 0.18); }
}

.resume-entry.is-open {
  border-color: rgba(79, 70, 229, 0.32);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.12);
}

.resume-entry-head {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr) auto;
  gap: 12px 18px;
  align-items: start;
}

.resume-entry-head.static-only {
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr);
}

.resume-entry-title strong {
  display: block;
  color: #0f172a;
  font-size: 1.03rem;
  margin-bottom: 3px;
}

.resume-entry-title span,
.resume-entry-meta span {
  display: block;
  color: #334155;
  font-size: 0.93rem;
}

.resume-entry-title span {
  font-style: italic;
  font-weight: 700;
  color: #1e293b;
}

.resume-entry-meta {
  text-align: right;
  padding-top: 1px;
}

.resume-entry-meta span + span {
  margin-top: 6px;
}

.resume-entry-meta-single {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.resume-entry-toggle {
  appearance: none;
  border: 1px solid rgba(79, 70, 229, 0.18);
  background: rgba(79, 70, 229, 0.06);
  color: #4338ca;
  border-radius: 999px;
  padding: 9px 12px;
  min-width: 104px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.24s ease;
}

.resume-entry-toggle:hover {
  background: rgba(79, 70, 229, 0.10);
}

.resume-entry.is-open .resume-entry-toggle {
  color: #ffffff;
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  border-color: transparent;
}

.resume-entry.is-open .resume-entry-toggle i {
  transform: rotate(45deg);
}

.resume-entry-toggle i {
  transition: transform 0.22s ease;
}

.resume-entry-note {
  margin-top: 8px;
}

.resume-entry-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.42s ease, opacity 0.28s ease, margin-top 0.28s ease;
  margin-top: 0;
}

.resume-entry.is-open .resume-entry-panel {
  max-height: 1200px;
  opacity: 1;
  margin-top: 16px;
}

.resume-panel-summary {
  color: #334155;
  font-size: 0.94rem;
  margin-bottom: 14px;
  font-weight: 700;
}

.workflow-track {
  display: grid;
  align-items: stretch;
  gap: 10px;
}

.workflow-track.steps-4 { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; }
.workflow-track.steps-5 { grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr; }
.workflow-track.steps-3 { grid-template-columns: 1fr auto 1fr auto 1fr; }

.workflow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.95rem;
}

.workflow-step {
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 12px;
  min-height: 186px;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.28s ease, transform 0.34s ease;
}

.resume-entry.is-open .workflow-step {
  opacity: 1;
  transform: translateY(0);
}

.resume-entry.is-open .workflow-step:nth-child(1) { transition-delay: .02s; }
.resume-entry.is-open .workflow-step:nth-child(3) { transition-delay: .08s; }
.resume-entry.is-open .workflow-step:nth-child(5) { transition-delay: .14s; }
.resume-entry.is-open .workflow-step:nth-child(7) { transition-delay: .20s; }
.resume-entry.is-open .workflow-step:nth-child(9) { transition-delay: .26s; }

.mini-visual {
  height: 88px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(238, 242, 255, 0.92), rgba(248, 250, 252, 0.98));
  border: 1px solid rgba(129, 140, 248, 0.14);
  position: relative;
  overflow: hidden;
  margin-bottom: 10px;
}

.step-label {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.step-desc {
  color: #475569;
  font-size: 0.83rem;
  line-height: 1.42;
}

/* shared micro visuals */
.table-visual {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
  padding: 12px;
}

.table-visual span {
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(99,102,241,.18), rgba(59,130,246,.10));
  animation: pulseCell 1.4s ease-in-out infinite;
}

.table-visual span:nth-child(4n+1) { animation-delay: .05s; }
.table-visual span:nth-child(4n+2) { animation-delay: .12s; }
.table-visual span:nth-child(4n+3) { animation-delay: .2s; }
.table-visual span:nth-child(4n+4) { animation-delay: .28s; }

@keyframes pulseCell { 0%,100%{opacity:.55} 50%{opacity:1} }

.model-visual .axis { position:absolute; background:#94a3b8; }
.model-visual .axis.x { left:12px; right:10px; bottom:12px; height:1px; }
.model-visual .axis.y { left:12px; top:12px; bottom:12px; width:1px; }
.model-visual svg { position:absolute; inset:0; width:100%; height:100%; }
.model-visual path { fill:none; stroke:#4f46e5; stroke-width:3; stroke-linecap:round; stroke-dasharray:180; stroke-dashoffset:180; }
.resume-entry.is-open .model-visual path { animation: drawLine 1.3s ease forwards .1s; }
@keyframes drawLine { to { stroke-dashoffset:0; } }
.proj-dot { position:absolute; width:8px; height:8px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.16); opacity:0; }
.proj-dot.p1{ left:36px; bottom:32px; }
.proj-dot.p2{ left:64px; bottom:42px; }
.proj-dot.p3{ left:92px; bottom:50px; }
.resume-entry.is-open .proj-dot { animation: dotPop .4s ease forwards; }
.resume-entry.is-open .proj-dot.p1 { animation-delay: .4s; }
.resume-entry.is-open .proj-dot.p2 { animation-delay: .55s; }
.resume-entry.is-open .proj-dot.p3 { animation-delay: .7s; }
@keyframes dotPop { from{opacity:0; transform:scale(.4)} to{opacity:1; transform:scale(1)} }

.dashboard-visual { display:flex; gap:10px; padding:12px; align-items:flex-end; }
.dash-card { background:#ffffff; border:1px solid rgba(148,163,184,.22); border-radius:10px; position:relative; }
.dash-card.main { flex: 1; height: 62px; display:flex; align-items:flex-end; gap:7px; padding:10px; }
.dash-card.main b, .mini-chart b, .prob-bars b { width:14px; border-radius:4px 4px 0 0; background:linear-gradient(180deg,#60a5fa,#4338ca); height: var(--h); align-self:flex-end; animation: riseBar 1s ease; }
.dash-card.side { width:34px; height:62px; padding:10px 7px; display:flex; flex-direction:column; gap:8px; justify-content:flex-end; }
.dash-card.side i { height:6px; border-radius:999px; background:rgba(59,130,246,.35); }
@keyframes riseBar { from { height: 0; } }

.fab-visual .fab-box { position:absolute; left:10px; right:10px; bottom:12px; height:34px; border-radius:8px; background:linear-gradient(180deg,#334155,#1e293b); }
.fab-visual .fab-box::before { content:''; position:absolute; inset:auto 8px 8px 8px; height:4px; background:rgba(255,255,255,.18); border-radius:999px; }
.wafer-stack { position:absolute; top:12px; left:50%; transform:translateX(-50%); display:flex; gap:8px; }
.wafer-stack span { width:18px; height:18px; border-radius:50%; border:2px solid #7c93ff; background:rgba(129,140,248,.12); }
.resume-entry.is-open .wafer-stack span { animation: floatWafer 1.8s ease-in-out infinite; }
.resume-entry.is-open .wafer-stack span:nth-child(2){ animation-delay:.18s; }
.resume-entry.is-open .wafer-stack span:nth-child(3){ animation-delay:.36s; }
@keyframes floatWafer { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-4px)} }

.field-visual { background: linear-gradient(180deg, #d9f99d, #86efac); }
.field-visual::before, .field-visual::after { content:''; position:absolute; top:10px; bottom:10px; width:1px; background:rgba(255,255,255,.8); }
.field-visual::before { left:10px; } .field-visual::after { right:10px; }
.field-midline { position:absolute; top:10px; bottom:10px; left:50%; width:1px; background:rgba(255,255,255,.85); }
.field-center { position:absolute; left:50%; top:50%; width:24px; height:24px; margin:-12px; border:1px solid rgba(255,255,255,.85); border-radius:50%; }
.player { position:absolute; width:10px; height:10px; border-radius:50%; box-shadow:0 0 0 3px rgba(255,255,255,.4); }
.player.a{ left:22px; top:24px; background:#1d4ed8; }
.player.b{ right:28px; top:22px; background:#dc2626; }
.player.c{ left:44px; bottom:18px; background:#1d4ed8; }
.player.d{ right:38px; bottom:20px; background:#dc2626; }
.resume-entry.is-open .player.a { animation: moveA 2s ease-in-out infinite; }
.resume-entry.is-open .player.b { animation: moveB 2s ease-in-out infinite; }
.resume-entry.is-open .player.c { animation: moveC 2s ease-in-out infinite; }
.resume-entry.is-open .player.d { animation: moveD 2s ease-in-out infinite; }
@keyframes moveA { 50%{ transform:translate(16px, 10px);} }
@keyframes moveB { 50%{ transform:translate(-14px, 12px);} }
@keyframes moveC { 50%{ transform:translate(18px, -8px);} }
@keyframes moveD { 50%{ transform:translate(-20px, -10px);} }
.prob-bars { position:absolute; inset:auto 14px 12px 14px; height:56px; display:flex; align-items:flex-end; gap:10px; }
.prob-chip { position:absolute; top:10px; right:10px; font-size:.66rem; font-weight:800; color:#4338ca; background:rgba(79,70,229,.1); border-radius:999px; padding:4px 8px; }
.gameplan-visual .clip-board { position:absolute; left:16px; right:16px; top:10px; bottom:10px; border-radius:10px; background:#fff; border:1px solid rgba(148,163,184,.3); }
.gameplan-visual svg { position:absolute; inset:0; width:100%; height:100%; }
.gameplan-visual path { fill:none; stroke:#2563eb; stroke-width:3; stroke-linecap:round; stroke-dasharray:160; stroke-dashoffset:160; }
.resume-entry.is-open .gameplan-visual path { animation: drawLine 1.2s ease forwards; }

.drone-visual .drone-shape { position:absolute; left:50%; top:38px; transform:translate(-50%,-50%); width:46px; height:18px; border-radius:10px; background:#1e293b; }
.drone-visual .drone-shape::before, .drone-visual .drone-shape::after { content:''; position:absolute; top:8px; width:60px; height:2px; background:#475569; }
.drone-visual .drone-shape::before { left:-28px; } .drone-visual .drone-shape::after { right:-28px; }
.drone-visual .drone-shape i { position:absolute; width:12px; height:12px; border-radius:50%; border:2px solid #64748b; }
.drone-visual .drone-shape i:nth-child(1){ left:-10px; top:-12px; }
.drone-visual .drone-shape i:nth-child(2){ right:-10px; top:-12px; }
.drone-visual .drone-shape i:nth-child(3){ left:-10px; top:18px; }
.drone-visual .drone-shape i:nth-child(4){ right:-10px; top:18px; }
.resume-entry.is-open .drone-shape { animation: bobDrone 2s ease-in-out infinite; }
@keyframes bobDrone { 50% { transform:translate(-50%,-56%);} }
.flight-dot { position:absolute; width:6px; height:6px; border-radius:50%; background:#38bdf8; }
.flight-dot.one { left:20px; bottom:18px; }
.flight-dot.two { right:22px; top:18px; }
.path-visual svg, .gameplan-visual svg { position:absolute; inset:0; width:100%; height:100%; }
.path-visual path { fill:none; stroke:#0ea5e9; stroke-width:3; stroke-linecap:round; stroke-dasharray:180; stroke-dashoffset:180; }
.resume-entry.is-open .path-visual path { animation: drawLine 1.2s ease forwards; }
.waypoint { position:absolute; width:8px; height:8px; border-radius:50%; background:#0ea5e9; box-shadow:0 0 0 4px rgba(14,165,233,.18); }
.w1{ left:16px; bottom:10px; } .w2{ left:54px; top:16px; } .w3{ right:16px; top:12px; }
.delivery-visual .video-window { position:absolute; left:12px; right:12px; top:12px; height:38px; background:linear-gradient(135deg,#1e3a8a,#0f172a); border-radius:8px; }
.delivery-visual .upload-bar { position:absolute; left:12px; right:12px; bottom:14px; height:8px; border-radius:999px; background:rgba(148,163,184,.28); overflow:hidden; }
.delivery-visual .upload-bar b { display:block; height:100%; width:0; background:linear-gradient(90deg,#22c55e,#38bdf8); }
.resume-entry.is-open .delivery-visual .upload-bar b { animation: uploadFill 1.2s ease forwards .2s; }
@keyframes uploadFill { to { width:100%; } }
.delivery-chip { position:absolute; top:12px; right:12px; font-size:.64rem; font-weight:800; color:#065f46; background:rgba(16,185,129,.12); border-radius:999px; padding:4px 8px; }

.email-visual .mail-card { position:absolute; left:14px; right:14px; top:12px; height:52px; background:#fff; border:1px solid rgba(148,163,184,.24); border-radius:10px; }
.email-visual .mail-card::before { content:''; position:absolute; left:14px; right:14px; top:16px; height:1px; background:rgba(148,163,184,.5); transform:skewY(-20deg); }
.email-visual .mail-line { position:absolute; left:26px; right:42px; height:4px; border-radius:999px; background:rgba(79,70,229,.2); }
.mail-line.l1 { top:28px; } .mail-line.l2 { top:40px; width:44%; }
.mail-player { position:absolute; right:18px; top:18px; font-size:.66rem; font-weight:800; color:#4338ca; background:rgba(79,70,229,.08); border-radius:999px; padding:4px 7px; }
.process-visual .gear { position:absolute; border:3px solid #818cf8; border-radius:50%; }
.process-visual .gear.one { width:24px; height:24px; left:26px; top:30px; }
.process-visual .gear.two { width:34px; height:34px; left:56px; top:22px; }
.resume-entry.is-open .process-visual .gear { animation: spinGear 2s linear infinite; }
.resume-entry.is-open .process-visual .gear.two { animation-direction: reverse; }
@keyframes spinGear { to { transform: rotate(360deg); } }
.fetch-pill { position:absolute; right:12px; bottom:12px; font-size:.68rem; font-weight:800; padding:5px 8px; border-radius:999px; color:#0f172a; background:rgba(129,140,248,.16); }
.scoring-visual { display:flex; align-items:center; justify-content:center; gap:12px; }
.score-ring { width:48px; height:48px; border-radius:50%; border:5px solid rgba(34,197,94,.18); border-top-color:#22c55e; display:flex; align-items:center; justify-content:center; font-weight:800; color:#166534; }
.score-bars { display:flex; flex-direction:column; gap:8px; width:42px; }
.score-bars i { display:block; height:8px; width:var(--w); background:linear-gradient(90deg,#4f46e5,#22c55e); border-radius:999px; }
.export-visual { display:flex; align-items:flex-end; gap:12px; padding:12px; }
.csv-sheet { width:38px; height:54px; background:#fff; border:1px solid rgba(148,163,184,.3); border-radius:8px; position:relative; }
.csv-sheet::before { content:'CSV'; position:absolute; top:8px; left:8px; font-size:.62rem; font-weight:800; color:#4f46e5; }
.csv-sheet::after { content:''; position:absolute; left:8px; right:8px; bottom:10px; top:22px; background:repeating-linear-gradient(to bottom, rgba(148,163,184,.18), rgba(148,163,184,.18) 4px, transparent 4px, transparent 10px); }
.mini-chart { flex:1; height:54px; display:flex; align-items:flex-end; gap:7px; }
.mini-chart b { width:12px; }

.finance-visual { padding:12px; }
.candles { display:flex; gap:10px; align-items:flex-end; height:52px; }
.candles i { position:relative; width:12px; border-radius:4px; background:#22c55e; }
.candles i::before { content:''; position:absolute; left:50%; transform:translateX(-50%); width:1px; background:#64748b; top:-8px; bottom:-8px; }
.candles i.up { height:24px; }
.candles i.down { height:16px; background:#ef4444; }
.hist-line { position:absolute; left:12px; right:12px; bottom:10px; height:1px; background:rgba(148,163,184,.42); }
.econ-visual { display:flex; gap:8px; align-items:center; justify-content:center; padding:14px; }
.econ-chip { font-size:.72rem; font-weight:800; color:#4338ca; padding:8px 10px; border-radius:10px; background:rgba(79,70,229,.08); border:1px solid rgba(79,70,229,.16); }
.report-visual .report-page { position:absolute; left:26px; right:26px; top:10px; bottom:10px; background:#fff; border:1px solid rgba(148,163,184,.28); border-radius:10px; }
.report-line { position:absolute; left:38px; right:38px; height:5px; background:rgba(79,70,229,.20); border-radius:999px; }
.report-line.r1 { top:26px; }
.report-line.r2 { top:40px; right:50px; }
.report-line.r3 { top:54px; right:62px; }

/* ===== Wafer portfolio sections v160 ===== */
.legacy-resume-archive,
.edu-exp-section.legacy-resume-archive {
  display: none !important;
}

.wafer-story-section,
.wafer-project-section,
.wafer-lab-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(54, 211, 153, 0.12), transparent 30%),
    radial-gradient(circle at 82% 30%, rgba(129, 140, 248, 0.14), transparent 34%),
    linear-gradient(180deg, #050812 0%, #0b1020 54%, #07111e 100%);
}

.wafer-lab-section {
  background:
    radial-gradient(circle at 14% 24%, rgba(20, 184, 166, 0.12), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(165, 180, 252, 0.16), transparent 32%),
    linear-gradient(180deg, #080a18 0%, #0d1024 100%);
}

.wafer-section-kicker {
  color: #8ee5c0;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.wafer-section-lede {
  max-width: 720px;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.7;
  margin: -10px 0 26px;
}

.wafer-track-map {
  min-height: 720px;
  position: relative;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 50% 44%, rgba(16, 185, 129, 0.08), transparent 45%),
    rgba(8, 13, 25, 0.72);
  background-size: 28px 28px, 28px 28px, 100% 100%, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 28px 70px rgba(0,0,0,0.28);
  overflow: hidden;
}

.wafer-track-map::before {
  content: "";
  position: absolute;
  width: 210px;
  height: 210px;
  right: 7%;
  top: 7%;
  border-radius: 50%;
  border: 1px solid rgba(142, 229, 192, 0.18);
  background:
    linear-gradient(90deg, transparent 48%, rgba(142, 229, 192, 0.16) 49%, rgba(142, 229, 192, 0.16) 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(142, 229, 192, 0.16) 49%, rgba(142, 229, 192, 0.16) 51%, transparent 52%),
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.40), transparent 8%),
    radial-gradient(circle, rgba(129, 140, 248, 0.16), rgba(20, 184, 166, 0.06) 62%, transparent 63%);
  opacity: 0.58;
  animation: waferSlowSpin 18s linear infinite;
}

@keyframes waferSlowSpin {
  to { transform: rotate(360deg); }
}

.wafer-track-svg {
  position: absolute;
  inset: 32px;
  width: calc(100% - 64px);
  height: calc(100% - 64px);
  pointer-events: none;
}

.track-shadow,
.track-line {
  fill: none;
  stroke-linecap: round;
}

.track-shadow {
  stroke: rgba(0, 0, 0, 0.38);
  stroke-width: 34;
}

.track-line {
  stroke: rgba(142, 229, 192, 0.78);
  stroke-width: 12;
  stroke-dasharray: 16 18;
  filter: drop-shadow(0 0 14px rgba(45, 212, 191, 0.38));
  animation: trackMarch 1.8s linear infinite;
}

@keyframes trackMarch {
  to { stroke-dashoffset: -34; }
}

.wafer-track-card {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(290px, 30vw);
  min-height: 220px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045)),
    radial-gradient(circle at 24% 0%, rgba(142, 229, 192, 0.20), transparent 38%),
    rgba(12, 18, 34, 0.82);
  color: #eef2ff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 18px 44px rgba(0,0,0,0.32);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
  backdrop-filter: blur(16px);
}

.wafer-track-card:hover,
.wafer-track-card:focus-visible,
.wafer-track-card.is-active {
  transform: translateY(-8px) scale(1.015);
  border-color: rgba(142, 229, 192, 0.58);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 24px 58px rgba(20,184,166,0.18);
}

.station-node {
  position: absolute;
  top: -16px;
  left: 18px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04111a;
  background: radial-gradient(circle at 32% 24%, #ffffff, #8ee5c0 42%, #14b8a6);
  font-weight: 900;
  box-shadow: 0 0 0 8px rgba(20,184,166,0.10), 0 0 28px rgba(20,184,166,0.42);
}

.station-visual {
  height: 92px;
  margin: 8px 0 14px;
  background-color: rgba(238, 242, 255, 0.96);
}

.wafer-track-card h3,
.project-wafer-card h3,
.lab-profile-panel h3 {
  color: #ffffff;
  line-height: 1.18;
  margin-bottom: 8px;
}

.wafer-track-card p,
.project-wafer-card p,
.lab-profile-panel p {
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.5;
}

.station-panel {
  display: grid;
  gap: 7px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.24s ease, margin-top 0.24s ease;
}

.wafer-track-card:hover .station-panel,
.wafer-track-card:focus-visible .station-panel,
.wafer-track-card.is-active .station-panel {
  max-height: 170px;
  opacity: 1;
  margin-top: 12px;
}

.station-panel strong {
  color: #8ee5c0;
  font-size: 0.92rem;
}

.station-panel span {
  color: rgba(226, 232, 240, 0.78);
  font-size: 0.88rem;
  line-height: 1.5;
}

.wafer-track-card:hover .model-visual path,
.wafer-track-card.is-active .model-visual path,
.wafer-track-card:hover .proj-dot,
.wafer-track-card.is-active .proj-dot {
  animation-play-state: running;
}

.wafer-lab-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr);
  grid-template-areas:
    "profile console"
    "detail console";
  gap: 18px;
}

.lab-profile-panel,
.lab-console,
.lab-detail-panel,
.project-wafer-card {
  border: 1px solid rgba(148, 163, 184, 0.18);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.04)),
    rgba(15, 23, 42, 0.76);
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 20px 48px rgba(0,0,0,0.24);
  backdrop-filter: blur(16px);
}

.lab-profile-panel {
  grid-area: profile;
  min-height: 260px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.lab-wafer-orbit {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  margin-bottom: 24px;
  border: 1px solid rgba(142, 229, 192, 0.22);
  background:
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.50), transparent 9%),
    radial-gradient(circle, rgba(129, 140, 248, 0.22), rgba(20, 184, 166, 0.10) 62%, transparent 63%);
  position: relative;
  animation: waferSlowSpin 14s linear infinite;
}

.lab-wafer-orbit span {
  position: absolute;
  background: rgba(142, 229, 192, 0.28);
  border-radius: 999px;
}
.lab-wafer-orbit span:nth-child(1) { left: 50%; top: 0; bottom: 0; width: 1px; }
.lab-wafer-orbit span:nth-child(2) { left: 0; right: 0; top: 50%; height: 1px; }
.lab-wafer-orbit span:nth-child(3) { left: 22%; right: 22%; top: 22%; bottom: 22%; border: 1px solid rgba(142,229,192,0.20); background: transparent; border-radius: 50%; }

.lab-stat-row {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.lab-stat-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(226,232,240,0.72);
  border-top: 1px solid rgba(148,163,184,0.14);
  padding-top: 8px;
}

.lab-stat-row strong {
  color: #8ee5c0;
}

.lab-console {
  grid-area: console;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.lab-chip {
  appearance: none;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)),
    rgba(15, 23, 42, 0.78);
  color: #eef2ff;
  padding: 14px;
  cursor: pointer;
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.lab-chip i {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04111a;
  background: radial-gradient(circle at 30% 24%, #ffffff, #a7f3d0 42%, #14b8a6);
  box-shadow: 0 0 22px rgba(20,184,166,0.28);
}

.lab-chip span {
  font-weight: 900;
}

.lab-chip:hover,
.lab-chip:focus-visible,
.lab-chip.is-active {
  transform: translateY(-4px);
  border-color: rgba(142, 229, 192, 0.55);
  background:
    radial-gradient(circle at 18% 0%, rgba(142, 229, 192, 0.18), transparent 38%),
    rgba(18, 28, 48, 0.92);
}

.lab-detail-panel {
  grid-area: detail;
  padding: 22px;
}

.detail-label {
  color: #8ee5c0;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.lab-detail-panel p {
  color: rgba(238,242,255,0.86);
  line-height: 1.65;
  margin: 12px 0 16px;
}

.detail-meter {
  height: 9px;
  border-radius: 999px;
  background: rgba(148,163,184,0.16);
  overflow: hidden;
}

.detail-meter b {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #a7f3d0, #818cf8);
  animation: meterSweep 1.4s ease infinite alternate;
}

@keyframes meterSweep {
  from { width: 46%; }
  to { width: 94%; }
}

.project-wafer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.project-wafer-card {
  padding: 22px;
  cursor: pointer;
  min-height: 330px;
  position: relative;
  overflow: hidden;
  transition: transform 0.26s ease, border-color 0.26s ease, box-shadow 0.26s ease;
}

.project-wafer-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -54px;
  top: -54px;
  border-radius: 50%;
  border: 1px solid rgba(142, 229, 192, 0.18);
  background:
    linear-gradient(90deg, transparent 48%, rgba(142, 229, 192, 0.16) 49%, rgba(142, 229, 192, 0.16) 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(142, 229, 192, 0.16) 49%, rgba(142, 229, 192, 0.16) 51%, transparent 52%),
    radial-gradient(circle at 32% 28%, rgba(255,255,255,0.42), transparent 8%),
    radial-gradient(circle, rgba(129,140,248,0.18), rgba(20,184,166,0.08) 62%, transparent 63%);
  opacity: 0.64;
  transition: transform 0.45s ease;
}

.project-wafer-card:hover,
.project-wafer-card:focus-visible,
.project-wafer-card.is-active {
  transform: translateY(-8px);
  border-color: rgba(142, 229, 192, 0.52);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 28px 62px rgba(20,184,166,0.16);
}

.project-wafer-card:hover::after,
.project-wafer-card.is-active::after {
  transform: rotate(80deg) scale(1.06);
}

.project-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #04111a;
  background: radial-gradient(circle at 30% 24%, #ffffff, #a7f3d0 42%, #14b8a6);
  font-size: 1.55rem;
  margin-bottom: 20px;
  box-shadow: 0 0 34px rgba(20,184,166,0.32);
}

.project-flow {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  transition: max-height 0.32s ease, opacity 0.24s ease, margin-top 0.24s ease;
}

.project-wafer-card:hover .project-flow,
.project-wafer-card:focus-visible .project-flow,
.project-wafer-card.is-active .project-flow {
  max-height: 160px;
  opacity: 1;
  margin-top: 22px;
}

.project-flow span {
  color: #dffcf2;
  border: 1px solid rgba(142, 229, 192, 0.24);
  background: rgba(20, 184, 166, 0.10);
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.project-flow i {
  color: rgba(142,229,192,0.72);
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .wafer-track-map {
    min-height: auto;
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .wafer-track-svg,
  .wafer-track-map::before {
    display: none;
  }

  .wafer-track-card {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
  }

  .wafer-lab-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "profile" "console" "detail";
  }

  .project-wafer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .lab-console {
    grid-template-columns: 1fr;
  }

  .wafer-section-lede {
    margin-top: 0;
  }
}

/* ===== Personable resume chapter pass v161 ===== */
.wafer-story-section,
.wafer-project-section,
.wafer-lab-section {
  background:
    radial-gradient(circle at 16% 18%, rgba(20, 184, 166, 0.10), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(129, 140, 248, 0.10), transparent 30%),
    linear-gradient(180deg, #090b18 0%, #101424 100%);
}

.wafer-section-kicker {
  color: #a7f3d0;
}

.wafer-section-lede {
  color: rgba(226, 232, 240, 0.82);
  font-size: 1.02rem;
}

.wafer-track-map {
  min-height: 650px;
  background:
    linear-gradient(rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(248, 250, 252, 0.045), rgba(248, 250, 252, 0.015));
  background-size: 30px 30px, 30px 30px, 100% 100%;
  border-radius: 18px;
}

.wafer-track-map::before {
  opacity: 0.22;
}

.track-line {
  stroke: rgba(167, 243, 208, 0.52);
  stroke-width: 8;
  stroke-dasharray: 10 16;
}

.track-shadow {
  stroke-width: 22;
  stroke: rgba(15, 23, 42, 0.42);
}

.wafer-track-card,
.lab-profile-panel,
.lab-console,
.lab-detail-panel,
.project-wafer-card {
  border-radius: 16px;
  background:
    linear-gradient(rgba(49, 73, 137, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(49, 73, 137, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 246, 252, 0.88));
  background-size: 22px 22px, 22px 22px, 100% 100%;
  color: #101828;
  border-color: rgba(148, 163, 184, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}

.wafer-track-card:hover,
.wafer-track-card:focus-visible,
.wafer-track-card.is-active,
.project-wafer-card:hover,
.project-wafer-card:focus-visible,
.project-wafer-card.is-active {
  border-color: rgba(20, 184, 166, 0.46);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.26);
}

.wafer-track-card h3,
.project-wafer-card h3,
.lab-profile-panel h3 {
  color: #101828;
}

.wafer-track-card p,
.project-wafer-card p,
.lab-profile-panel p {
  color: #475569;
}

.station-panel strong {
  color: #047857;
}

.station-panel span {
  color: #334155;
}

.station-node,
.lab-chip i,
.project-orb {
  background: radial-gradient(circle at 30% 22%, #ffffff, #d1fae5 40%, #5eead4);
  color: #0f172a;
}

.station-visual {
  border-color: rgba(20, 184, 166, 0.18);
}

.lab-console {
  align-content: stretch;
}

.lab-chip {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(241,245,249,0.92));
  border-color: rgba(148, 163, 184, 0.24);
  color: #172033;
}

.lab-chip:hover,
.lab-chip:focus-visible,
.lab-chip.is-active {
  background:
    radial-gradient(circle at 14% 0%, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(180deg, #ffffff, #f8fafc);
  border-color: rgba(20, 184, 166, 0.45);
}

.lab-stat-row span {
  color: #475569;
  border-top-color: rgba(148, 163, 184, 0.26);
}

.lab-stat-row strong,
.detail-label {
  color: #047857;
}

.lab-detail-panel p {
  color: #334155;
}

.detail-meter {
  background: rgba(148, 163, 184, 0.22);
}

.project-wafer-card::after {
  opacity: 0.24;
}

.project-flow span {
  color: #064e3b;
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(20, 184, 166, 0.28);
}

.project-flow i {
  color: #0f766e;
  transform: rotate(90deg);
  justify-self: center;
}

/* ===== Engineering paper rebuild v170 ===== */
.paper-section,
#contact {
  background:
    linear-gradient(rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  color: var(--ink);
}

.paper-section .section-title,
#contact .section-title {
  color: var(--ink);
}

.paper-kicker {
  color: #111;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.paper-lede {
  max-width: 760px;
  color: var(--ink-muted);
  margin: -8px 0 28px;
  line-height: 1.7;
}

.experience-rail-map {
  min-height: 680px;
  position: relative;
  border: 2px solid #111;
  border-radius: 4px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.075) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.075) 1px, transparent 1px),
    rgba(251, 248, 239, 0.72);
  background-size: 24px 24px;
  box-shadow: 8px 8px 0 #111;
  overflow: hidden;
}

.rail-line-svg {
  position: absolute;
  inset: 28px;
  width: calc(100% - 56px);
  height: calc(100% - 56px);
  pointer-events: none;
}

.rail-bed,
.rail-tie-line {
  fill: none;
  stroke-linecap: round;
}

.rail-bed {
  stroke: #111;
  stroke-width: 18;
}

.rail-tie-line {
  stroke: var(--paper);
  stroke-width: 12;
  stroke-dasharray: 4 18;
  animation: railTies 1.8s linear infinite;
}

@keyframes railTies {
  to { stroke-dashoffset: -22; }
}

.boiler-train {
  position: absolute;
  left: 6%;
  top: 11%;
  width: 82px;
  height: 46px;
  z-index: 2;
  animation: boilerRoute 25s linear infinite;
}

.train-body,
.train-cab,
.train-stack,
.train-wheel,
.train-smoke {
  position: absolute;
  background: #111;
}

.train-body {
  left: 18px;
  top: 18px;
  width: 48px;
  height: 18px;
  border-radius: 10px 12px 4px 4px;
}

.train-cab {
  left: 48px;
  top: 7px;
  width: 22px;
  height: 22px;
  border-radius: 3px 3px 0 0;
}

.train-stack {
  left: 20px;
  top: 6px;
  width: 9px;
  height: 15px;
}

.train-wheel {
  top: 34px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid #111;
  background: var(--paper);
  animation: wheelSpin 0.55s linear infinite;
}

.train-wheel.w1 { left: 25px; }
.train-wheel.w2 { left: 54px; }

.train-smoke {
  left: 6px;
  top: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.24;
  animation: trainSmoke 1.5s ease-out infinite;
}

@keyframes wheelSpin { to { transform: rotate(360deg); } }
@keyframes trainSmoke {
  to { opacity: 0; transform: translate(-18px, -18px) scale(1.8); }
}

@keyframes boilerRoute {
  0%, 15% { left: 6%; top: 10%; transform: rotate(-12deg); }
  20%, 35% { left: 59%; top: 10%; transform: rotate(10deg); }
  40%, 55% { left: 13%; top: 57%; transform: rotate(12deg); }
  60%, 75% { left: 44%; top: 39%; transform: rotate(-18deg); }
  80%, 95% { left: 75%; top: 58%; transform: rotate(8deg); }
  100% { left: 6%; top: 10%; transform: rotate(-12deg); }
}

.experience-stop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 3;
  width: min(300px, 30vw);
  min-height: 156px;
  border: 2px solid #111;
  border-radius: 4px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.055) 1px, transparent 1px),
    #fffdf6;
  background-size: 18px 18px;
  color: #111;
  padding: 16px;
  box-shadow: 5px 5px 0 #111;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.experience-stop:hover,
.experience-stop:focus-visible,
.experience-stop.is-active {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0 #111;
}

.stop-number {
  position: absolute;
  right: 12px;
  top: 10px;
  color: #111;
  font-size: 0.8rem;
  font-weight: 900;
  border: 2px solid #111;
  background: var(--paper);
  padding: 2px 7px;
}

.experience-stop h3 {
  max-width: 210px;
  color: #111;
  font-size: 1.15rem;
  line-height: 1.15;
  margin-bottom: 6px;
}

.exp-role,
.exp-date {
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.35;
}

.exp-date {
  margin-top: 5px;
  font-weight: 800;
}

.exp-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.36s ease, opacity 0.25s ease, margin-top 0.25s ease;
}

.experience-stop.is-active .exp-panel,
.experience-stop:hover .exp-panel,
.experience-stop:focus-visible .exp-panel {
  max-height: 250px;
  opacity: 1;
  margin-top: 12px;
}

.exp-panel .mini-visual {
  height: 86px;
  border: 2px solid #111;
  border-radius: 4px;
  margin-bottom: 10px;
}

.exp-panel p {
  color: #1f2937;
  font-size: 0.88rem;
  line-height: 1.5;
}

.service-visual {
  display: grid;
  place-items: center;
  background: #fff;
}

.service-visual i {
  font-size: 2rem;
  color: #111;
}

.service-visual span {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 2px;
  background: #111;
  opacity: 0.18;
}

.service-visual span:nth-child(2) { top: 24px; }
.service-visual span:nth-child(3) { top: 42px; }
.service-visual span:nth-child(4) { top: 60px; }

.education-paper-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  gap: 18px;
  align-items: stretch;
}

.education-main-card,
.education-tool-card,
.paper-note-card,
.project-workflow-card {
  border: 2px solid #111;
  border-radius: 4px;
  background:
    linear-gradient(rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.06) 1px, transparent 1px),
    #fffdf6;
  background-size: 18px 18px;
  box-shadow: 5px 5px 0 #111;
}

.education-main-card,
.paper-note-card,
.project-workflow-card {
  padding: 20px;
}

.education-main-card h3,
.project-workflow-card h3 {
  color: #111;
  line-height: 1.18;
  margin-bottom: 8px;
}

.education-main-card p,
.project-workflow-card p {
  color: #374151;
}

.education-facts {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.education-facts span {
  border-top: 1px solid rgba(17, 24, 39, 0.28);
  padding-top: 7px;
  color: #374151;
}

.education-facts strong {
  color: #111;
  margin-right: 8px;
}

.honor-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.honor-row span,
.paper-chip {
  border: 2px solid #111;
  background: #fff;
  color: #111;
  border-radius: 999px;
  font-weight: 900;
}

.honor-row span {
  padding: 6px 10px;
  font-size: 0.78rem;
}

.education-tool-card {
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.paper-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.paper-chip:hover,
.paper-chip:focus-visible,
.paper-chip.is-active {
  background: #111;
  color: #fffdf6;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(17, 17, 17, 0.28);
}

.paper-note-card {
  grid-column: 1 / -1;
  min-height: 120px;
}

.paper-note-card span {
  display: block;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.paper-note-card p {
  color: #374151;
  max-width: 760px;
}

.project-workflow-grid {
  display: grid;
  gap: 18px;
}

.project-workflow-card {
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.project-workflow-card:hover,
.project-workflow-card:focus-visible,
.project-workflow-card.is-open {
  transform: translateY(-3px);
  box-shadow: 8px 8px 0 #111;
}

.project-workflow-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.42s ease, opacity 0.28s ease, margin-top 0.28s ease;
}

.project-workflow-card.is-open .project-workflow-panel {
  max-height: 520px;
  opacity: 1;
  margin-top: 16px;
}

.project-workflow-card.is-open .workflow-step,
.experience-stop.is-active .workflow-step {
  opacity: 1;
  transform: translateY(0);
}

.project-workflow-card .workflow-step {
  border: 2px solid #111;
  border-radius: 4px;
  background: #fffdf6;
  box-shadow: none;
}

.project-workflow-card .workflow-arrow {
  color: #111;
}

.bridge-visual,
.regression-visual,
.residual-visual {
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.18);
}

.bridge-deck {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 42px;
  height: 4px;
  background: #111;
}

.bridge-arch {
  position: absolute;
  left: 20px;
  right: 20px;
  top: 22px;
  height: 42px;
  border: 4px solid #111;
  border-top: 0;
  border-radius: 0 0 90px 90px;
}

.bridge-visual i {
  position: absolute;
  top: 42px;
  bottom: 16px;
  width: 3px;
  background: #111;
}
.bridge-visual i:nth-child(3) { left: 35%; }
.bridge-visual i:nth-child(4) { left: 50%; }
.bridge-visual i:nth-child(5) { left: 65%; }

.regression-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.regression-visual path {
  fill: none;
  stroke: #111;
  stroke-width: 3;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
}

.project-workflow-card.is-open .regression-visual path {
  animation: drawLine 1.1s ease forwards;
}

.r-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #111;
  opacity: 0;
}
.r-dot.d1 { left: 28px; bottom: 28px; }
.r-dot.d2 { left: 48px; bottom: 38px; }
.r-dot.d3 { left: 75px; bottom: 30px; }
.r-dot.d4 { left: 94px; bottom: 50px; }
.project-workflow-card.is-open .r-dot { animation: dotPop .35s ease forwards; }
.project-workflow-card.is-open .r-dot.d2 { animation-delay: .18s; }
.project-workflow-card.is-open .r-dot.d3 { animation-delay: .32s; }
.project-workflow-card.is-open .r-dot.d4 { animation-delay: .46s; }

.residual-visual {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  padding: 14px;
}

.residual-visual b {
  width: 14px;
  height: var(--h);
  background: #111;
  transform-origin: bottom;
  transform: scaleY(0);
}

.project-workflow-card.is-open .residual-visual b {
  animation: residualRise .6s ease forwards;
}

.residual-visual span {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.68rem;
  font-weight: 900;
}

@keyframes residualRise {
  to { transform: scaleY(1); }
}

@media (max-width: 980px) {
  .experience-rail-map {
    min-height: auto;
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .rail-line-svg,
  .boiler-train {
    display: none;
  }

  .experience-stop {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
  }

  .education-paper-grid {
    grid-template-columns: 1fr;
  }

  .paper-note-card {
    grid-column: auto;
  }
}

@media (min-width: 761px) {
  .experience-rail-map {
    min-height: 700px;
    display: block;
    padding: 0;
  }

  .rail-line-svg,
  .boiler-train {
    display: block;
  }

  .experience-stop {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: min(252px, 26vw);
  }

  .experience-stop[style*="--x: 61%"] { --x: 58%; }
  .experience-stop[style*="--x: 67%"],
  .experience-stop[style*="--x: 72%"] { --x: 69%; }
}

@media (max-width: 760px) {
  .experience-rail-map {
    min-height: auto;
    display: grid;
    gap: 16px;
    padding: 18px;
  }

  .rail-line-svg,
  .boiler-train {
    display: none;
  }

  .experience-stop {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
  }
}

/* Make the original hero belong to the engineering-paper system. */
#hero {
  color: #111;
  background:
    linear-gradient(rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}

#hero::before {
  opacity: 0;
}

#hero h1,
.decrypt-line {
  color: #111;
  text-shadow: none;
}

#cityscape {
  filter: grayscale(1) contrast(1.1);
  opacity: 0.72;
}

.bubble {
  background: #fffdf6;
  border: 2px solid #111;
  color: #111;
  box-shadow: 5px 5px 0 #111;
}

.bubble:hover,
.bubble:focus-visible {
  color: #111;
  border-color: #111;
  box-shadow: 8px 8px 0 #111;
}

.social-links a {
  color: #111;
}

.scroll-indicator {
  color: #111;
}

.experience-stop[style*="--x: 72%"] {
  --x: 67%;
}

.experience-stop.is-active .drone-body { animation: droneBob 2.4s ease-in-out infinite; }
.experience-stop.is-active .drone-rotor::before { animation: rotorSpin 0.45s linear infinite; }
.experience-stop.is-active .drone-shadow { animation: shadowPulse 2.4s ease-in-out infinite; }
.experience-stop.is-active .player.a { animation: moveA 2.4s ease-in-out infinite; }
.experience-stop.is-active .player.b { animation: moveB 2.4s ease-in-out infinite; }
.experience-stop.is-active .player.c { animation: moveC 2.4s ease-in-out infinite; }
.experience-stop.is-active .player.d { animation: moveD 2.4s ease-in-out infinite; }
.experience-stop.is-active .ball { animation: ballRoll 3.2s ease-in-out infinite; }
.experience-stop.is-active .model-visual path,
.project-workflow-card.is-open .model-visual path {
  animation: drawLine 1.3s ease forwards .1s;
}
.experience-stop.is-active .proj-dot,
.project-workflow-card.is-open .proj-dot {
  animation: dotPop .4s ease forwards;
}
.experience-stop.is-active .fab-building .fab-window { animation: fabBlink 2.4s ease-in-out infinite; }
.experience-stop.is-active .fab-puff { animation: fabPuff 2.4s ease-out infinite; }
.experience-stop.is-active .wafer-disc { animation: waferRoll 3.6s linear infinite; }

.project-workflow-card.is-open .process-visual-v2 .gear { animation: spinGear 2.4s linear infinite; }
.project-workflow-card.is-open .process-visual-v2 .gear.two { animation-direction: reverse; }
.project-workflow-card.is-open .parse-chip { animation: parseChipIn 0.4s ease forwards; }
.project-workflow-card.is-open .parse-chip:nth-child(1) { animation-delay: 0.3s; }
.project-workflow-card.is-open .parse-chip:nth-child(2) { animation-delay: 0.5s; }
.project-workflow-card.is-open .parse-chip:nth-child(3) { animation-delay: 0.7s; }
.project-workflow-card.is-open .scoring-visual-v2 .score-ring { animation: scoreRing 1.2s ease forwards; }
.project-workflow-card.is-open .score-bars i { animation: scoreBar 0.8s ease forwards; }
.project-workflow-card.is-open .dash-spark polyline { animation: drawLine 1.2s ease forwards; }

@keyframes scoreRing {
  from { transform: rotate(-18deg) scale(0.92); }
  to { transform: rotate(0) scale(1); }
}

@keyframes scoreBar {
  from { transform: scaleX(0); transform-origin: left; }
  to { transform: scaleX(1); transform-origin: left; }
}

#about,
footer {
  background:
    linear-gradient(rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, 100% 100%;
  color: #111;
}

#about .section-title,
#about .about-text p,
#about .detail-card strong,
footer p {
  color: #111;
}

#about .detail-card,
#contact .contact-card {
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  color: #111;
}

#about .detail-card span,
#contact .contact-card span,
#contact .contact-text {
  color: #374151;
}

#contact .contact-card strong,
#contact .contact-card i {
  color: #111;
}

/* ===== Final requested state: original interactive resume on eggshell paper ===== */
body,
#hero,
#about,
#projects,
#education,
#contact,
footer {
  background:
    linear-gradient(rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    var(--paper);
  background-size: 24px 24px, 24px 24px, 100% 100%;
}

#cityscape {
  filter: none;
  opacity: 1;
}

#about .section-title,
#projects .section-title,
#education .section-title,
#contact .section-title,
#about .about-text p,
#contact .contact-text,
footer p {
  color: #111;
}

#projects.resume-section,
#education.edu-exp-section {
  color: #111;
}

.legacy-resume-archive {
  display: none !important;
}

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

.decrypt-text,
.decrypt-text .glyph.scramble,
.decrypt-text .glyph.done {
  color: #111;
}

.hero-divider {
  background: linear-gradient(90deg, transparent, rgba(17,17,17,0.46), transparent);
}

#about.animated-about-section,
#about .about-chess-bg {
  background:
    linear-gradient(rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 24, 39, 0.085) 1px, transparent 1px),
    var(--paper) !important;
  background-size: 24px 24px, 24px 24px, 100% 100% !important;
}

#about .about-chess-bg::after {
  background: transparent !important;
}

#about .fab-workflow-bg::after {
  background: transparent !important;
}

#about .chess-board-3d,
#about .chess-piece,
#about .about-fab-bg,
#about .fab-workflow-bg,
#about .factory-floor-bg {
  display: none !important;
}

@media (max-width: 768px) {
  #hero h1 {
    font-size: 2rem;
    max-width: 72vw;
    margin-inline: auto;
  }

  .bubble,
  .bubble-profile,
  #bubble-education,
  #bubble-experience,
  #bubble-projects,
  #bubble-chess,
  #bubble-pitch,
  #bubble-contact {
    width: 62px;
    height: 62px;
  }

  .bubble i,
  .bubble-profile i {
    font-size: 1.05rem;
  }

  .bubble-label {
    font-size: 0.45rem;
    letter-spacing: 0.07em;
  }
}

@media (max-width: 980px) {
  .resume-entry-head,
  .resume-entry-head.static-only,
  .resume-line-grid.line-3 {
    grid-template-columns: 1fr;
  }

  .resume-entry-meta { text-align: left; }
  .resume-entry-toggle { justify-self: start; }

  .workflow-track.steps-4,
  .workflow-track.steps-5,
  .workflow-track.steps-3 {
    grid-template-columns: 1fr;
  }

  .workflow-arrow {
    transform: rotate(90deg);
    min-height: 22px;
  }

  .workflow-step { min-height: auto; }
}

@media (max-width: 640px) {
  .resume-document-v2 {
    padding: 24px 16px 20px;
    border-radius: 16px;
  }

  .resume-doc-head h3 { font-size: 2rem; }
  .resume-doc-head p { font-size: 0.8rem; }
  .resume-entry { padding: 12px; }
  .resume-static-card p, .resume-entry-note, .resume-panel-summary { font-size: 0.88rem; }
  .step-label { font-size: 0.76rem; }
  .step-desc { font-size: 0.78rem; }
}

/* ═══════════════════════════════════════════════════════
   COMBINED EDUCATION & CAPABILITIES PANEL  (v142)
   Replaces the separate Education and Tools blocks.
   ═══════════════════════════════════════════════════════ */

.edu-capabilities-block {
  position: relative;
}

.edu-cap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 22px;
  padding-top: 4px;
}

.edu-cap-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edu-cap-school-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.edu-cap-school-row strong {
  color: #0b1224;
  font-size: 1.05rem;
}

.edu-cap-gpa {
  color: #4338ca;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
  font-weight: 800;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.edu-cap-degree {
  color: #1e293b;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.edu-cap-meta {
  color: #475569;
  font-size: 0.85rem;
  margin: 0 0 4px;
}

.edu-cap-section {
  margin-top: 4px;
}

.edu-cap-tag-label {
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #4338ca;
  margin-bottom: 6px;
}

.edu-cap-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.edu-cap-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(79, 70, 229, 0.06);
  border: 1px solid rgba(79, 70, 229, 0.16);
  color: #1e293b;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.edu-cap-pill i {
  font-size: 0.72rem;
  color: #4338ca;
}

.edu-cap-pill.honor {
  background: rgba(234, 179, 8, 0.10);
  border-color: rgba(202, 138, 4, 0.30);
}

.edu-cap-pill.honor i {
  color: #b45309;
}

.edu-cap-pill.cert {
  background: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.28);
}

.edu-cap-pill.cert i {
  color: #047857;
}

.edu-cap-pill.course {
  background: rgba(99, 102, 241, 0.07);
  border-color: rgba(99, 102, 241, 0.20);
  color: #312e81;
  font-size: 0.74rem;
  padding: 4px 10px;
}

.edu-cap-pill:hover {
  transform: translateY(-1px);
}

.edu-cap-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tool-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px 8px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f5f7ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.16);
  position: relative;
  overflow: hidden;
  animation: toolPulse 5.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.5s);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tool-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(79, 70, 229, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: toolShimmer 5.4s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.5s);
  pointer-events: none;
}

.tool-item i {
  font-size: 1.05rem;
  color: #4338ca;
}

.tool-item span {
  font-weight: 800;
  font-size: 0.84rem;
  color: #0f172a;
  letter-spacing: 0.01em;
}

.tool-item small {
  font-size: 0.66rem;
  color: #64748b;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tool-item:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.42);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.14);
}

@keyframes toolPulse {
  0%, 88%, 100% { transform: translateY(0); border-color: rgba(99, 102, 241, 0.16); }
  44% { transform: translateY(-2px); border-color: rgba(99, 102, 241, 0.36); }
}

@keyframes toolShimmer {
  0%, 30%, 100% { transform: translateX(-100%); }
  60% { transform: translateX(100%); }
}

.coursework-label {
  margin-top: 12px;
}

.coursework-row .edu-cap-pill.course {
  animation: coursePulse 6s ease-in-out infinite;
}
.coursework-row .edu-cap-pill.course:nth-child(1) { animation-delay: 0s; }
.coursework-row .edu-cap-pill.course:nth-child(2) { animation-delay: 0.4s; }
.coursework-row .edu-cap-pill.course:nth-child(3) { animation-delay: 0.8s; }
.coursework-row .edu-cap-pill.course:nth-child(4) { animation-delay: 1.2s; }
.coursework-row .edu-cap-pill.course:nth-child(5) { animation-delay: 1.6s; }
.coursework-row .edu-cap-pill.course:nth-child(6) { animation-delay: 2.0s; }

@keyframes coursePulse {
  0%, 92%, 100% { background: rgba(99, 102, 241, 0.07); border-color: rgba(99, 102, 241, 0.20); }
  50% { background: rgba(99, 102, 241, 0.18); border-color: rgba(99, 102, 241, 0.45); }
}

@media (max-width: 820px) {
  .edu-cap-grid {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 520px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════
   ENHANCED WORKFLOW VISUALS  (v142)
   ═══════════════════════════════════════════════════════ */

/* ── Fab v2 — building silhouette + wafer conveyor ── */
.fab-visual-v2 {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
}

.fab-building {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  bottom: 30px;
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
  border-radius: 6px 6px 2px 2px;
}

.fab-roof {
  position: absolute;
  top: -6px;
  left: 8px;
  right: 8px;
  height: 6px;
  background: #475569;
  border-radius: 3px 3px 0 0;
}

.fab-building .fab-window {
  position: absolute;
  width: 8px;
  height: 6px;
  background: rgba(165, 180, 252, 0.9);
  border-radius: 1px;
  animation: fabBlink 2.4s ease-in-out infinite;
}
.fab-building .fab-window:nth-child(2) { top: 10px; left: 14px; }
.fab-building .fab-window:nth-child(3) { top: 10px; right: 14px; animation-delay: .3s; }
.fab-building .fab-window:nth-child(4) { top: 22px; left: 14px; animation-delay: .6s; }
.fab-building .fab-window:nth-child(5) { top: 22px; right: 14px; animation-delay: .9s; }

.fab-stack {
  position: absolute;
  top: -14px;
  right: 14px;
  width: 6px;
  height: 14px;
  background: #94a3b8;
  border-radius: 2px 2px 0 0;
}

.fab-puff {
  position: absolute;
  top: -22px;
  right: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.85);
  animation: fabPuff 2.4s ease-out infinite;
}

@keyframes fabBlink {
  0%, 100% { background: rgba(165, 180, 252, 0.55); }
  50% { background: rgba(165, 180, 252, 1); box-shadow: 0 0 6px rgba(165, 180, 252, 0.7); }
}

@keyframes fabPuff {
  0% { opacity: 0.9; transform: translate(0, 0) scale(0.8); }
  100% { opacity: 0; transform: translate(0, -16px) scale(1.4); }
}

.wafer-conveyor {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 16px;
  background: linear-gradient(180deg, #cbd5e1, #94a3b8);
  border-radius: 4px;
  overflow: hidden;
}

.wafer-disc {
  position: absolute;
  top: 3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e0e7ff, #6366f1);
  border: 1px solid #4338ca;
  animation: waferRoll 3.6s linear infinite;
}
.wafer-disc:nth-child(1) { animation-delay: 0s; }
.wafer-disc:nth-child(2) { animation-delay: 1.2s; }
.wafer-disc:nth-child(3) { animation-delay: 2.4s; }

@keyframes waferRoll {
  0% { left: -12px; }
  100% { left: 100%; }
}

/* ── Table v2 — header + rows with content ── */
.table-visual-v2 {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  color: #1e293b;
  background: linear-gradient(180deg, #fafbff 0%, #f1f5f9 100%);
}

.table-visual-v2 .tv-header,
.table-visual-v2 .tv-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.5fr;
  gap: 6px;
  align-items: center;
  padding: 3px 4px;
  border-radius: 3px;
}

.table-visual-v2 .tv-header {
  background: rgba(79, 70, 229, 0.10);
  color: #4338ca;
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-visual-v2 .tv-row {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.16);
  opacity: 0;
  transform: translateY(4px);
}

.resume-entry.is-open .table-visual-v2 .tv-row {
  animation: tvRowIn 0.5s ease forwards;
}
.resume-entry.is-open .table-visual-v2 .tv-row:nth-child(2) { animation-delay: 0.10s; }
.resume-entry.is-open .table-visual-v2 .tv-row:nth-child(3) { animation-delay: 0.20s; }
.resume-entry.is-open .table-visual-v2 .tv-row:nth-child(4) { animation-delay: 0.30s; }
.resume-entry.is-open .table-visual-v2 .tv-row:nth-child(5) { animation-delay: 0.40s; }

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

.table-visual-v2 .ok { color: #16a34a; font-size: 1.1rem; line-height: 0; }
.table-visual-v2 .warn { color: #ea580c; font-size: 1.1rem; line-height: 0; }
.table-visual-v2 .bad { color: #dc2626; font-size: 1.1rem; line-height: 0; }

.soccer-table .tv-header,
.soccer-table .tv-row {
  grid-template-columns: 0.5fr 0.6fr 1fr;
}

/* ── Model band visual — forecast with confidence ── */
.model-band-visual {
  background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
}

.model-band-visual .band-fill {
  fill: rgba(99, 102, 241, 0.16);
  stroke: none;
  opacity: 0;
}

.model-band-visual .trend-line {
  fill: none;
  stroke: #4338ca;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 180;
  stroke-dashoffset: 180;
}

.resume-entry.is-open .model-band-visual .band-fill {
  animation: bandFade 1.4s ease forwards 0.3s;
}

.resume-entry.is-open .model-band-visual .trend-line {
  animation: drawLine 1.3s ease forwards 0.1s;
}

@keyframes bandFade {
  to { opacity: 1; }
}

.model-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #4338ca;
  background: rgba(79, 70, 229, 0.10);
  border: 1px solid rgba(79, 70, 229, 0.20);
  border-radius: 999px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
}

/* ── Dashboard v2 — KPIs + sparkline + bars ── */
.dashboard-visual-v2 {
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.dash-kpis {
  grid-column: 1 / -1;
  display: flex;
  gap: 6px;
}

.dash-kpi {
  flex: 1;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.dash-kpi small {
  font-size: 0.54rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dash-kpi strong {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
}

.dash-spark {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 4px;
  position: relative;
}

.dash-spark svg {
  width: 100%;
  height: 100%;
}

.dash-spark polyline {
  fill: none;
  stroke: #22c55e;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.resume-entry.is-open .dash-spark polyline {
  animation: drawLine 1.4s ease forwards 0.2s;
}

.dash-bars {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 6px;
  padding: 4px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
}

.dash-bars b {
  flex: 1;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(180deg, #60a5fa, #4338ca);
  height: var(--h);
  animation: riseBar 0.9s ease;
}

/* ── Field v2 — pitch with goals + ball ── */
.field-visual-v2 {
  background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%);
  position: relative;
}

.pitch-stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.07) 0,
    rgba(255, 255, 255, 0.07) 14px,
    transparent 14px,
    transparent 28px
  );
}

.pitch-mid {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 50%;
  width: 1.5px;
  background: rgba(255, 255, 255, 0.85);
}

.pitch-center {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
}

.pitch-goal {
  position: absolute;
  top: 50%;
  margin-top: -10px;
  width: 6px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 2px;
}
.pitch-goal.left { left: 4px; border-right: none; }
.pitch-goal.right { right: 4px; border-left: none; }

.field-visual-v2 .player {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 2px 4px rgba(0, 0, 0, 0.2);
}
.field-visual-v2 .player.a { left: 24px; top: 22px; background: #1d4ed8; }
.field-visual-v2 .player.b { right: 26px; top: 26px; background: #dc2626; }
.field-visual-v2 .player.c { left: 42px; bottom: 22px; background: #1d4ed8; }
.field-visual-v2 .player.d { right: 38px; bottom: 18px; background: #dc2626; }

.resume-entry.is-open .field-visual-v2 .player.a { animation: moveA 2.4s ease-in-out infinite; }
.resume-entry.is-open .field-visual-v2 .player.b { animation: moveB 2.4s ease-in-out infinite; }
.resume-entry.is-open .field-visual-v2 .player.c { animation: moveC 2.4s ease-in-out infinite; }
.resume-entry.is-open .field-visual-v2 .player.d { animation: moveD 2.4s ease-in-out infinite; }

.ball {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18);
  left: 50%;
  top: 50%;
  margin: -2.5px;
}
.resume-entry.is-open .ball { animation: ballRoll 3.2s ease-in-out infinite; }

@keyframes ballRoll {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(-18px, 8px); }
  60% { transform: translate(14px, -10px); }
}

/* ── Gameplan v2 — tactical board with plays ── */
.gameplan-visual-v2 {
  background: linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
}

.tactic-board {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 8px;
  bottom: 8px;
  background: #fffbeb;
  border: 1.5px solid #92400e;
  border-radius: 6px;
}

.tactic-board::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(180, 83, 9, 0.45);
  border-radius: 3px;
}

.gameplan-visual-v2 svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.play-line {
  fill: none;
  stroke: #b45309;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 140;
  stroke-dashoffset: 140;
}

.resume-entry.is-open .play-line.p1 { animation: drawLine 0.9s ease forwards 0.1s; }
.resume-entry.is-open .play-line.p2 { animation: drawLine 0.7s ease forwards 0.8s; }
.resume-entry.is-open .play-line.p3 { animation: drawLine 0.7s ease forwards 1.4s; }

.tactic-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b45309;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.16);
  opacity: 0;
}
.tactic-dot.d1 { left: 16px; bottom: 14px; }
.tactic-dot.d2 { left: 64px; top: 26px; }
.tactic-dot.d3 { right: 14px; top: 14px; }

.resume-entry.is-open .tactic-dot.d1 { animation: dotPop 0.4s ease forwards 0.7s; }
.resume-entry.is-open .tactic-dot.d2 { animation: dotPop 0.4s ease forwards 1.3s; }
.resume-entry.is-open .tactic-dot.d3 { animation: dotPop 0.4s ease forwards 1.8s; }

/* ── Drone v2 — rotating rotors + sky ── */
.drone-visual-v2 {
  background: linear-gradient(180deg, #bae6fd 0%, #e0f2fe 100%);
  position: relative;
}

.drone-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.85) 0%, transparent 18%),
    radial-gradient(circle at 75% 30%, rgba(255, 255, 255, 0.6) 0%, transparent 12%);
}

.drone-body {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 50px;
  height: 22px;
  margin: -11px -25px;
}

.resume-entry.is-open .drone-body { animation: droneBob 2.4s ease-in-out infinite; }

@keyframes droneBob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -6px); }
}

.drone-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 10px;
  margin: -5px -9px;
  background: #0f172a;
  border-radius: 4px;
}
.drone-core::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 2px;
  right: 3px;
  height: 2px;
  background: rgba(56, 189, 248, 0.85);
  border-radius: 999px;
}

.drone-rotor {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(15, 23, 42, 0.65);
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.10);
}

.drone-rotor.r1 { left: -2px; top: -2px; }
.drone-rotor.r2 { right: -2px; top: -2px; }
.drone-rotor.r3 { left: -2px; bottom: -2px; }
.drone-rotor.r4 { right: -2px; bottom: -2px; }

.drone-rotor::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border-top: 2px solid #38bdf8;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

.resume-entry.is-open .drone-rotor::before {
  animation: rotorSpin 0.3s linear infinite;
}

@keyframes rotorSpin {
  to { transform: rotate(360deg); }
}

.drone-shadow {
  position: absolute;
  left: 50%;
  bottom: 14px;
  margin-left: -16px;
  width: 32px;
  height: 5px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.18);
  filter: blur(2px);
}
.resume-entry.is-open .drone-shadow { animation: shadowPulse 2.4s ease-in-out infinite; }

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.32; }
  50% { transform: scaleX(0.72); opacity: 0.18; }
}

/* ── Path v2 — flight route with grid + tag ── */
.path-visual-v2 {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
}

.path-grid {
  position: absolute;
  inset: 8px;
  background:
    linear-gradient(rgba(100, 116, 139, 0.18) 1px, transparent 1px) 0 0 / 100% 14px,
    linear-gradient(90deg, rgba(100, 116, 139, 0.18) 1px, transparent 1px) 0 0 / 14px 100%;
  opacity: 0.6;
  border-radius: 4px;
}

.path-visual-v2 svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.path-route {
  fill: none;
  stroke: #0ea5e9;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.resume-entry.is-open .path-route {
  animation: drawLine 1.6s ease forwards 0.2s;
}

.path-visual-v2 .waypoint {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.18);
  opacity: 0;
}
.path-visual-v2 .waypoint.w1 { left: 12px; bottom: 12px; }
.path-visual-v2 .waypoint.w2 { left: 54px; top: 16px; }
.path-visual-v2 .waypoint.w3 { right: 12px; top: 14px; }

.resume-entry.is-open .path-visual-v2 .waypoint.w1 { animation: dotPop 0.4s ease forwards 0.4s; }
.resume-entry.is-open .path-visual-v2 .waypoint.w2 { animation: dotPop 0.4s ease forwards 1.0s; }
.resume-entry.is-open .path-visual-v2 .waypoint.w3 { animation: dotPop 0.4s ease forwards 1.6s; }

.path-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #0369a1;
  background: rgba(14, 165, 233, 0.14);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.06em;
}

/* ── Delivery v2 — video + upload bar + delivered ── */
.delivery-visual-v2 {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

.delivery-visual-v2 .video-window {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 10px;
  height: 38px;
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.95rem;
}

.delivery-visual-v2 .upload-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.30);
  overflow: hidden;
}

.delivery-visual-v2 .upload-bar b {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #22c55e, #38bdf8);
}

.resume-entry.is-open .delivery-visual-v2 .upload-bar b {
  animation: uploadFill 1.3s ease forwards 0.3s;
}

.delivery-visual-v2 .delivery-chip {
  position: absolute;
  bottom: 4px;
  right: 12px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #065f46;
  background: rgba(16, 185, 129, 0.14);
  border-radius: 999px;
  padding: 2px 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.delivery-visual-v2 .delivery-chip i {
  color: #047857;
}

/* ── Email v2 — envelope with flap + preview ── */
.email-visual-v2 {
  background: linear-gradient(180deg, #eef2ff 0%, #f5f3ff 100%);
}

.email-envelope {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 14px;
  bottom: 18px;
  background: #fff;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.email-flap {
  position: absolute;
  inset: 0 0 auto 0;
  height: 18px;
  background: linear-gradient(180deg, #c7d2fe, #a5b4fc);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
  opacity: 0.6;
}

.email-body {
  position: absolute;
  inset: 22px 10px 10px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-from {
  font-size: 0.58rem;
  font-weight: 800;
  color: #4338ca;
  letter-spacing: 0.04em;
}

.email-line {
  display: block;
  height: 4px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.20);
}
.email-line.short { width: 60%; }

.email-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  padding: 2px 7px;
  letter-spacing: 0.06em;
  animation: emailBadge 1.4s ease-in-out infinite;
}

@keyframes emailBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

/* ── Process v2 — gears + parsed field chips ── */
.process-visual-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
}

.gear-stack {
  position: relative;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
}

.process-visual-v2 .gear {
  position: absolute;
  border: 3px solid #818cf8;
  border-radius: 50%;
}
.process-visual-v2 .gear.one { width: 22px; height: 22px; left: 0; bottom: 0; }
.process-visual-v2 .gear.two { width: 28px; height: 28px; right: 0; top: 0; }
.resume-entry.is-open .process-visual-v2 .gear { animation: spinGear 2.4s linear infinite; }
.resume-entry.is-open .process-visual-v2 .gear.two { animation-direction: reverse; }

.parse-chips {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.parse-chip {
  font-size: 0.56rem;
  font-weight: 800;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.14);
  border-radius: 999px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateX(-6px);
}

.resume-entry.is-open .parse-chip { animation: parseChipIn 0.4s ease forwards; }
.resume-entry.is-open .parse-chip:nth-child(1) { animation-delay: 0.3s; }
.resume-entry.is-open .parse-chip:nth-child(2) { animation-delay: 0.5s; }
.resume-entry.is-open .parse-chip:nth-child(3) { animation-delay: 0.7s; }

@keyframes parseChipIn {
  to { opacity: 1; transform: translateX(0); }
}

/* ── Scoring v2 — ring + bars ── */
.scoring-visual-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 8px;
}

.scoring-visual-v2 .score-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 5px solid rgba(34, 197, 94, 0.18);
  border-top-color: #22c55e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #166534;
  line-height: 1;
}

.scoring-visual-v2 .score-ring b {
  font-size: 0.88rem;
}

.scoring-visual-v2 .score-ring small {
  font-size: 0.5rem;
  font-weight: 700;
  color: #15803d;
  margin-top: 1px;
}

.resume-entry.is-open .scoring-visual-v2 .score-ring {
  animation: ringSpin 1.4s ease forwards;
}

@keyframes ringSpin {
  from { transform: rotate(-180deg); opacity: 0; }
  to { transform: rotate(0deg); opacity: 1; }
}

.scoring-visual-v2 .score-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 56px;
}

.scoring-visual-v2 .score-bars i {
  display: block;
  height: 6px;
  width: 0;
  background: linear-gradient(90deg, #4f46e5, #22c55e);
  border-radius: 999px;
  animation: scoreFill 0.9s ease forwards;
}
.resume-entry.is-open .scoring-visual-v2 .score-bars i:nth-child(1) { animation-delay: 0.3s; }
.resume-entry.is-open .scoring-visual-v2 .score-bars i:nth-child(2) { animation-delay: 0.5s; }
.resume-entry.is-open .scoring-visual-v2 .score-bars i:nth-child(3) { animation-delay: 0.7s; }

@keyframes scoreFill {
  to { width: var(--w); }
}

/* ── Export v2 — sheet + bar chart ── */
.export-visual-v2 {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 10px;
}

.export-visual-v2 .csv-sheet {
  width: 38px;
  height: 54px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 6px;
  position: relative;
  padding: 14px 6px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.export-visual-v2 .csv-sheet::before {
  content: 'CSV';
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 0.5rem;
  font-weight: 800;
  color: #16a34a;
  letter-spacing: 0.06em;
}

.export-visual-v2 .csv-row {
  display: block;
  height: 3px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.45);
}
.export-visual-v2 .csv-row:nth-child(2) { width: 80%; }
.export-visual-v2 .csv-row:nth-child(3) { width: 60%; }

.export-visual-v2 .mini-chart {
  flex: 1;
  height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.export-visual-v2 .mini-chart b {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #60a5fa, #4338ca);
  height: var(--h);
  animation: riseBar 0.9s ease;
}

/* ── Finance v2 — candlesticks (improved) ── */
.finance-visual-v2 {
  padding: 10px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
}

.finance-visual-v2 .candles {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 56px;
}

.finance-visual-v2 .candles i {
  position: relative;
  width: 7px;
  border-radius: 2px;
  height: var(--h, 24px);
}

.finance-visual-v2 .candles i.up { background: #22c55e; }
.finance-visual-v2 .candles i.down { background: #ef4444; }

.finance-visual-v2 .candles i::before {
  content: '';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  background: #475569;
  top: -8px;
  bottom: -6px;
}

.finance-visual-v2 .hist-line {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  height: 1px;
  background: rgba(100, 116, 139, 0.45);
}

.finance-tag {
  color: #166534;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.28);
}

/* ── Econ v2 — NPV/IRR/MARR chips + verdict ── */
.econ-visual-v2 {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 10px;
}

.econ-visual-v2 .econ-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 800;
  color: #4338ca;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(79, 70, 229, 0.08);
  border: 1px solid rgba(79, 70, 229, 0.18);
}

.econ-visual-v2 .econ-chip small {
  font-size: 0.58rem;
  font-weight: 700;
  color: #475569;
}

.econ-verdict {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.6rem;
  font-weight: 800;
  color: #15803d;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.30);
  border-radius: 999px;
  padding: 3px 8px;
  margin-top: 4px;
  align-self: flex-start;
  letter-spacing: 0.04em;
}

.econ-verdict i { color: #15803d; }

/* ── Report v2 — page with body + chart + stamp ── */
.report-visual-v2 {
  background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%);
}

.report-visual-v2 .report-page {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 8px;
  bottom: 8px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 6px;
  padding: 8px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.report-visual-v2 .report-line {
  height: 3px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.22);
}
.report-visual-v2 .report-line.r2 { width: 80%; }
.report-visual-v2 .report-line.r3 { width: 64%; }
.report-visual-v2 .report-line.r4 { width: 72%; }

.report-mini-chart {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}

.report-mini-chart b {
  flex: 1;
  background: linear-gradient(180deg, #60a5fa, #4338ca);
  border-radius: 2px 2px 0 0;
  height: var(--h);
  animation: riseBar 0.9s ease;
}

.report-stamp {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 0.58rem;
  font-weight: 800;
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.30);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.06em;
  transform: rotate(-3deg);
}


/* ═══════════════════════════════════════════════════════
   LICHESS LIVE CHESS STATS  (About section)
   ═══════════════════════════════════════════════════════ */

.lichess-stats {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid #111;
}

.lichess-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #111;
  margin-bottom: 20px;
}

.lichess-heading i:first-child {
  font-size: 1rem;
}

.lichess-profile-link {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  color: #6b7280;
  transition: color 0.2s ease;
}

.lichess-profile-link:hover {
  color: #111;
}

.lichess-profile-link i {
  font-size: 0.55rem;
  margin-left: 3px;
}

/* ── Rating cards grid ── */

.lichess-rating-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.lichess-card {
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 16px 14px;
  text-align: center;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.lichess-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 #111;
}

.lichess-card-icon {
  font-size: 1.1rem;
  color: #111;
  margin-bottom: 6px;
}

.lichess-card-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #6b7280;
  margin-bottom: 6px;
}

.lichess-card-rating {
  font-size: 1.65rem;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.lichess-card-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: #9ca3af;
  font-weight: 600;
}

.lichess-prog {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.lichess-prog.up {
  color: #16a34a;
}

.lichess-prog.up::before {
  content: "▲ +";
}

.lichess-prog.down {
  color: #dc2626;
}

.lichess-prog.down::before {
  content: "▼ ";
}

.lichess-prog.flat {
  color: #9ca3af;
}

/* ── Summary bar ── */

.lichess-summary {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 20px;
  align-items: center;
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 14px 20px;
}

.lichess-summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.lichess-summary-stat strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #111;
  font-variant-numeric: tabular-nums;
}

.lichess-summary-stat span {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.lichess-summary-stat.win strong { color: #16a34a; }
.lichess-summary-stat.loss strong { color: #dc2626; }
.lichess-summary-stat.draw strong { color: #6b7280; }

.lichess-winrate-bar {
  grid-column: 1 / -1;
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: #e5e7eb;
}

.bar-win {
  background: #16a34a;
  transition: width 0.6s ease;
}

.bar-draw {
  background: #9ca3af;
  transition: width 0.6s ease;
}

.bar-loss {
  background: #dc2626;
  transition: width 0.6s ease;
}

/* --- Openings + CCL row --- */

.lichess-stats .lichess-extras {
  display: flex !important;
  flex-direction: row !important;
  gap: 20px;
  margin-top: 18px;
}

.lichess-stats .lichess-openings {
  flex: 1 1 0%;
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 14px 16px;
}

.lichess-stats .lichess-ccl {
  flex: 0 0 auto;
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 14px 20px;
  text-align: center;
}

.lichess-stats .lichess-sub-heading {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: #6b7280;
  margin: 0 0 10px 0;
}

/* --- Opening expandable cards --- */

.lichess-stats .lichess-opening-list {
  display: flex;
  flex-direction: column;
}

.lichess-stats .lichess-opening-item {
  border-top: 1px solid #e5e1d8;
}

.lichess-stats .lichess-opening-item:first-child {
  border-top: none;
}

.lichess-stats .lichess-opening-toggle {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 2px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s;
}

.lichess-stats .lichess-opening-toggle:hover {
  background: rgba(0,0,0,0.025);
}

.lichess-stats .lichess-opening-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 9px;
  background: #111;
  color: #fffdf6;
  border-radius: 3px;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.lichess-stats .lichess-opening-pgn {
  flex: 1;
  font-size: 0.65rem;
  font-family: 'Courier New', Courier, monospace;
  color: #9ca3af;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lichess-stats .lichess-opening-arrow {
  font-size: 0.55rem;
  color: #9ca3af;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.lichess-stats .lichess-opening-item.is-open .lichess-opening-arrow {
  transform: rotate(180deg);
}

/* Expandable board area */
.lichess-stats .lichess-opening-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0;
}

.lichess-stats .lichess-opening-item.is-open .lichess-opening-expand {
  max-height: 340px;
  padding: 4px 0 12px;
}

/* Mini chessboard */
.lichess-stats .lichess-mini-board {
  display: grid !important;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: 240px;
  height: 240px;
  margin: 0 auto;
  border: 2px solid #111;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 2px 2px 0 #111;
}

.lichess-sq {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lichess-sq.light {
  background: #f0e4d0;
}

.lichess-sq.dark {
  background: #b58863;
}

.lichess-sq.highlight.light {
  background: #f6ec8a;
}

.lichess-sq.highlight.dark {
  background: #d4a828;
}

.lichess-piece {
  font-size: 22px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.lichess-piece.white {
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.2));
}

.lichess-piece.black {
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
}

/* Board controls */
.lichess-stats .lichess-board-controls {
  display: flex !important;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.lichess-stats .lichess-ctrl-btn {
  width: 30px;
  height: 30px;
  border: 2px solid #111;
  border-radius: 3px;
  background: #fffdf6;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: #111;
  transition: background 0.15s, color 0.15s;
  padding: 0;
}

.lichess-stats .lichess-ctrl-btn:hover {
  background: #111;
  color: #fffdf6;
}

.lichess-stats .lichess-ccl-record {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.lichess-stats .lichess-ccl-stat {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 1px;
}

.lichess-stats .lichess-ccl-stat strong {
  font-size: 1.3rem;
  font-weight: 800;
  color: #111;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.lichess-stats .lichess-ccl-stat span {
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.lichess-stats .lichess-ccl-stat.win strong { color: #16a34a; }
.lichess-stats .lichess-ccl-stat.loss strong { color: #dc2626; }
.lichess-stats .lichess-ccl-stat.draw strong { color: #6b7280; }

.lichess-stats .lichess-ccl-divider {
  font-size: 1rem;
  font-weight: 800;
  color: #d1d5db;
  line-height: 1;
}

.lichess-stats .lichess-ccl-opponents {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #e5e1d8;
}

.lichess-stats .lichess-ccl-opponents span {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #9ca3af;
}

.lichess-stats .lichess-ccl-opponents span:first-child {
  font-style: italic;
  color: #b5b5b5;
}

/* --- Pitch Analytics Section --- */

.pitch-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #111;
  margin-bottom: 6px;
}

.pitch-heading i {
  font-size: 0.85rem;
}

.pitch-subtitle {
  font-size: 0.78rem;
  font-style: italic;
  color: #9ca3af;
  margin: 0 0 18px 0;
  font-weight: 600;
}

.pitch-toggle-row {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}

.pitch-toggle-btn {
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  border: 2px solid #111;
  border-radius: 3px;
  background: #fffdf6;
  color: #111;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pitch-toggle-btn.active {
  background: #111;
  color: #fffdf6;
}

.pitch-toggle-btn:hover:not(.active) {
  background: #f0ece3;
}

.pitch-layout {
  display: flex;
  gap: 22px;
  align-items: stretch;
}

.pitch-field-wrap {
  flex: 1 1 0%;
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 10px;
  min-width: 0;
}

.pitch-svg {
  width: 100%;
  display: block;
}

.pitch-zone {
  fill: transparent;
  cursor: pointer;
  transition: fill 0.25s ease;
}

.pitch-zone:hover {
  fill: rgba(0, 0, 0, 0.06);
}

.pitch-zone.zone-hot {
  fill: rgba(22, 163, 74, 0.22);
}

.pitch-zone.zone-warm {
  fill: rgba(234, 179, 8, 0.20);
}

.pitch-zone.zone-cold {
  fill: rgba(220, 38, 38, 0.18);
}

.pitch-zone-label {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 700;
  fill: #b5b0a4;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.pitch-stats-panel {
  flex: 0 0 260px;
  background: #fffdf6;
  border: 2px solid #111;
  border-radius: 4px;
  box-shadow: 4px 4px 0 #111;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
}

.pitch-stats-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  color: #c5c0b6;
}

.pitch-stats-empty i {
  font-size: 1.2rem;
}

.pitch-stats-empty p {
  font-size: 0.68rem;
  font-weight: 700;
}

.pitch-zone-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: #111;
  margin: 0 0 2px 0;
}

.pitch-zone-desc {
  font-size: 0.6rem;
  color: #9ca3af;
  font-style: italic;
  margin: 0 0 12px 0;
  font-weight: 600;
  line-height: 1.3;
}

.pitch-stat-row {
  margin-bottom: 10px;
}

.pitch-stat-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.pitch-stat-label {
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9ca3af;
}

.pitch-stat-value {
  font-size: 0.92rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.pitch-stat-value.stat-green { color: #16a34a; }
.pitch-stat-value.stat-amber { color: #d97706; }
.pitch-stat-value.stat-red { color: #dc2626; }

/* Player formation dots */
.pitch-player {
  fill: #fffdf6;
  stroke: #111;
  stroke-width: 2;
  pointer-events: none;
  transition: cx 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              cy 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.pitch-dist-svg {
  display: block;
  width: 100%;
  height: 30px;
}

.pitch-dist-fill {
  fill: rgba(0, 0, 0, 0.045);
}

.pitch-dist-stroke {
  fill: none;
  stroke: #d1d5db;
  stroke-width: 1.2;
}

.pitch-dist-marker {
  stroke-width: 2;
}

.pitch-dist-dot {
  r: 3.5;
}

.pitch-dist-zone-dot {
  fill: #d1d5db;
  r: 2;
}

/* --- Responsive --- */

@media (max-width: 640px) {
  .lichess-rating-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .lichess-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .lichess-winrate-bar {
    grid-column: 1 / -1;
  }

  .lichess-heading {
    flex-wrap: wrap;
  }

  .lichess-profile-link {
    margin-left: 0;
    width: 100%;
  }

  .lichess-stats .lichess-extras {
    flex-direction: column !important;
  }

  .lichess-stats .lichess-mini-board {
    width: 200px;
    height: 200px;
  }

  .lichess-piece {
    font-size: 18px;
  }

  .lichess-stats .lichess-opening-pgn {
    display: none;
  }

  .pitch-layout {
    flex-direction: column;
  }

  .pitch-field-wrap {
    flex: none;
    width: 100%;
  }
}
