/* Tosin Omotoyinbo · "Signal" direction */

:root {
  --ink: #0F0F0F;
  --paper: #FAFAF8;
  --white: #FFFFFF;
  --sand: #F0EFEA;
  --stone: #E9E8E3;
  --line: #E6E5E0;
  --line-2: #E3E2DD;
  --muted: #5F5E5A;
  --muted-2: #55544F;
  --on-dark: #C9C8C3;
  --on-dark-2: #A3A29D;
  --dark-line: #2E2E2C;
  --dark-card: #1A1A19;
  --dark-card-line: #2A2A28;
  --accent: #0043C4;
  --glow: #107EF1;
  --hover: #B8400F;

  --sans: 'Familjen Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --section-gap: 112px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* focus: hover one item and its siblings step back */
@media (hover: hover) and (pointer: fine) {
  .skill, .stat, .card, .job, .teach, .about__photo { transition-property: transform, box-shadow, background-color, border-color, color, padding, opacity, filter; transition-duration: .35s; transition-timing-function: var(--ease); }
  .skill-list:has(> .skill:hover) > .skill:not(:hover),
  .stats:has(> .stat:hover) > .stat:not(:hover),
  .work-grid:has(> .card:hover) > .card:not(:hover),
  .teach-list:has(> .teach:hover) > .teach:not(:hover) { opacity: .45; filter: blur(1.5px) saturate(.6); transform: scale(.98); }
  .timeline:has(> .job:hover) > .job:not(:hover) { opacity: .35; filter: blur(1px); }
  .about__grid:has(.stat:hover) .about__photo { opacity: .6; filter: blur(2px) grayscale(1); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--hover); }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 16px; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 999px; background: var(--white); color: var(--ink);
}
.skip-link:focus { top: 16px; }

.page { max-width: 1240px; margin: 0 auto; padding: clamp(12px, 2.5vw, 28px); }

/* ---------- shared ---------- */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--glow); flex: none; }
.dot--accent { background: var(--accent); }
.dot--lg { width: 10px; height: 10px; }
.mono { font-family: var(--mono); font-size: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}
.eyebrow svg .fill { fill: var(--accent); }
.eyebrow--dark { color: var(--white); }
.eyebrow--dark svg .fill { fill: var(--glow); }

.section { display: flex; flex-direction: column; gap: 32px; padding: var(--section-gap) clamp(8px, 2vw, 24px) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 48px; }
.section-head__title { display: flex; flex-direction: column; gap: 14px; }
.section-head p { margin: 0; max-width: 24em; color: var(--muted); }
h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); font-weight: 600; line-height: 1.05; letter-spacing: -0.03em; }

.panel { margin-top: var(--section-gap); padding: clamp(24px, 4vw, 56px); border-radius: 28px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border-radius: 999px;
  border: 1px solid var(--ink); font-size: 16px; font-weight: 600; text-decoration: none;
  color: var(--ink); transition: background .15s, color .15s;
}
.btn--solid { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: #2A2A28; color: var(--white); }
.btn--ghost:hover { background: var(--ink); color: var(--white); }

.round-link {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; text-decoration: none; font-size: 18px;
  background: var(--white); color: var(--ink); transition: transform .15s;
}
.round-link:hover { transform: rotate(45deg); color: var(--ink); }
.round-link--dark { background: var(--ink); color: var(--white); }
.round-link--dark:hover { color: var(--white); }

/* ---------- hero ---------- */
.hero {
  display: flex; flex-direction: column; gap: 40px; min-height: 680px;
  padding: clamp(20px, 3.5vw, 40px); border-radius: 28px;
  background: var(--ink); color: var(--white); overflow: hidden;
}
.site-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--white); text-decoration: none; font-weight: 600; font-size: 17px; }
.brand:hover { color: var(--white); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 26px; font-size: 15px; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; color: #D6D5D0; text-decoration: none; }
.main-nav a:hover { color: var(--white); text-decoration: underline; }
.cta-pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px;
  background: var(--white); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none;
}
.cta-pill:hover { background: #E6E5E0; color: var(--ink); }

.hero__body { flex: 1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 32px 48px; }
.hero__text { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.badge {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px; border: 1px solid var(--dark-line); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; color: var(--on-dark);
}
.hero h1 {
  margin: 0; font-weight: 700; font-size: clamp(56px, 10vw, 150px);
  line-height: 0.86; letter-spacing: -0.05em; color: var(--white);
}
.hero h1 span { display: block; }
.hero__lede { margin: 0; max-width: 26em; font-size: clamp(19px, 2vw, 24px); line-height: 1.35; color: var(--on-dark); }
.hero__photo {
  flex: 1 1 300px; min-width: 0; align-self: stretch; min-height: 380px; max-height: 520px;
  width: 100%; object-fit: cover; object-position: 50% 15%;
  border-radius: 20px; border: 1px solid var(--dark-line);
}
.signal { display: flex; align-items: center; gap: 16px; }
.wave { flex: 1; min-width: 0; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 3px; overflow: hidden; }
.wave span { flex: 1 1 0; min-width: 1px; max-width: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.3); }
.wave span.on { background: var(--glow); }
.signal__label { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark); }

/* ---------- about ---------- */
#about { gap: 56px; }
.about__intro { display: flex; flex-wrap: wrap; gap: 24px 64px; }
.about__intro > div { flex: 1 1 220px; }
.about__intro p {
  flex: 999 1 560px; min-width: 0; margin: 0;
  font-size: clamp(22px, 2.8vw, 36px); line-height: 1.28; font-weight: 500; letter-spacing: -0.015em;
}
.about__grid { display: flex; flex-wrap: wrap; gap: 16px; }
.about__photo { flex: 1 1 420px; min-width: 0; min-height: 320px; width: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 22px; }
.stats { flex: 1 1 420px; min-width: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat {
  display: flex; flex-direction: column; justify-content: space-between; gap: 28px;
  padding: 24px; border-radius: 22px; background: var(--white); border: 1px solid var(--line);
}
.stat dt { order: 2; font-size: 15px; color: var(--muted); }
.stat dd { order: 1; margin: 0; font-size: clamp(44px, 5vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -0.04em; }
.stat--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.stat--dark dt { color: var(--on-dark); }

/* ---------- what I do ---------- */
.skills { display: flex; flex-direction: column; gap: 32px; background: var(--sand); }
.skill-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.skill { display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); }
.skill h3 { margin: 0; font-size: 21px; font-weight: 600; }
.skill p { margin: 0; font-size: 15px; color: var(--muted); }
.skill__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.icon-box { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--ink); }
.skill--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.skill--dark p { color: var(--on-dark); }
.skill--dark .icon-box { border-color: #3A3A38; color: var(--white); }
.skill__tag { display: inline-flex; align-items: center; gap: 6px; color: var(--on-dark); }

/* ---------- work ---------- */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 16px; min-height: 440px; padding: 22px;
  border-radius: 24px; background: var(--white); border: 1px solid var(--line); color: var(--ink);
}
.card--dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.card--stone { background: var(--stone); border-color: var(--stone); }
.card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 44px; }
.card__kicker { color: var(--muted); }
.card--dark .card__kicker { color: var(--on-dark-2); }
.card--stone .card__kicker { color: var(--muted-2); }
.card__shot {
  flex: 1; width: 100%; min-height: 220px; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left;
  border-radius: 16px; border: 1px solid var(--dark-line);
}
.card--stone .card__shot { border-color: #CFCEC8; }
.card h3 { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.2; }
.card__meta { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.card--dark .card__meta { color: var(--on-dark-2); }
.card--stone .card__meta { color: var(--muted-2); }
.card--dark .card__meta a { color: var(--white); }

.steps { flex: 1; min-height: 220px; list-style: none; margin: 0; padding: 4px 0; display: flex; flex-direction: column; justify-content: center; }
.step { display: flex; align-items: center; gap: 16px; }
.step__node { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--white); }
.step__name { font-size: 18px; font-weight: 600; }
.step__num { margin-left: auto; color: var(--muted); }
.step-line { width: 14px; display: flex; justify-content: center; }
.step-line span { display: block; width: 1.5px; height: 18px; background: var(--ink); }
.step-line--accent span { background: var(--accent); }
.step--live .step__node { border-color: var(--accent); background: var(--accent); }
.live-pill { margin-left: auto; display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--white); }

.can { flex: 1; min-height: 220px; display: flex; flex-direction: column; justify-content: center; padding: 8px 4px; }
.can__row { display: flex; align-items: center; gap: 12px; }
.can__label { flex: none; width: 52px; color: var(--on-dark-2); }
.can__trace { flex: 1; min-width: 0; display: flex; height: 44px; }
.can__trace span { flex: 1 1 0; border: 2px solid transparent; border-right: 0; }

/* ---------- experience ---------- */
#experience { gap: 40px; }
.center-head { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.center-head p { margin: 0; max-width: 30em; color: var(--muted); }
.exp { display: flex; flex-wrap: wrap; gap: 24px; align-items: stretch; }
.exp__intro {
  flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 28px; border-radius: 24px; background: var(--sand);
}
.exp__intro > div { display: flex; flex-direction: column; gap: 12px; }
.exp__quote { margin: 0; font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.exp__intro p:not(.exp__quote) { margin: 0; font-size: 15px; color: var(--muted); }
.exp__intro .btn { align-self: flex-start; min-height: 48px; padding: 0 20px; font-size: 15px; }
.timeline { flex: 999 1 380px; min-width: 0; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.job { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.job__when { padding-top: 3px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.job__body { display: flex; gap: 14px; align-items: flex-start; }
.job__logo { flex: none; width: 112px; height: 40px; display: flex; align-items: center; gap: 8px; }
.job__logo img { height: auto; }
.job__role { font-size: 18px; font-weight: 600; line-height: 1.3; }
.job__org { font-size: 15px; color: var(--muted); }

.id-wrap { flex: 1 1 240px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 16px 0; }
.id-card {
  width: 236px; transform: rotate(4deg); display: flex; flex-direction: column; gap: 14px;
  padding: 16px 16px 18px; border-radius: 20px; background: var(--white); border: 1px solid var(--line-2);
  box-shadow: 0 20px 44px rgba(15, 15, 15, 0.12); transition: transform .3s ease;
}
.id-card:hover { transform: rotate(0deg); }
.id-card__slot { align-self: center; width: 46px; height: 8px; border-radius: 999px; background: var(--line-2); }
.id-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; }
.id-card__name { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.id-card__role { font-size: 14px; color: var(--muted); }
.id-card__foot {
  display: flex; justify-content: space-between; align-items: center; padding-top: 12px;
  border-top: 1px dashed #D5D4CF; color: var(--muted);
}
.id-card__foot span:last-child { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- teaching ---------- */
.teaching { display: flex; flex-direction: column; gap: 36px; background: var(--ink); color: var(--white); }
.teaching__lede { margin: 0; max-width: 20em; font-size: clamp(26px, 3.6vw, 46px); font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; }
.teach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
.teach { display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 18px; background: var(--dark-card); border: 1px solid var(--dark-card-line); }
.teach .mono { color: var(--on-dark-2); }
.teach strong { font-size: 19px; font-weight: 600; }
.teach span:last-child { font-size: 15px; color: var(--on-dark); }

/* ---------- contact ---------- */
.contact { align-items: center; gap: 24px; padding-top: 128px; padding-bottom: 72px; text-align: center; }
.contact h2 { max-width: 14em; font-size: clamp(34px, 5.4vw, 68px); line-height: 1.04; letter-spacing: -0.035em; }
.contact p { margin: 0; max-width: 30em; color: var(--muted); }
.contact__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- footer ---------- */
.site-footer { display: flex; flex-direction: column; gap: 20px; padding: clamp(20px, 3vw, 36px); border-radius: 28px; background: var(--ink); color: var(--white); overflow: hidden; }
.site-footer__name { margin: 0; white-space: nowrap; font-weight: 700; font-size: clamp(30px, 9.6vw, 128px); line-height: 0.84; letter-spacing: -0.055em; }
.site-footer__bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px;
  padding-top: 12px; border-top: 1px solid var(--dark-card-line); font-size: 14px; color: var(--on-dark-2);
}
.site-footer__bar a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer nav a { color: var(--on-dark); text-decoration: none; }
.site-footer nav a:hover { color: var(--white); text-decoration: underline; }

/* =========================================================
   Responsive
   ========================================================= */

/* iPad landscape / small laptops */
@media (max-width: 1100px) {
  :root { --section-gap: 96px; }
  .hero { min-height: 0; }
  .id-wrap { flex-basis: 100%; padding: 8px 0 0; }
}

/* iPad portrait */
@media (max-width: 900px) {
  :root { --section-gap: 80px; }
  .hero__text { flex-basis: 100%; }
  .hero__photo { flex-basis: 100%; min-height: 0; max-height: none; aspect-ratio: 4 / 3; }
  .about__intro > div,
  .about__intro p { flex-basis: 100%; }
  .about__photo, .stats { flex-basis: 100%; }
  .about__photo { min-height: 0; aspect-ratio: 3 / 2; }
  .card { min-height: 0; }
  .exp__intro { flex-basis: 100%; }
  .timeline { flex-basis: 100%; }
}

/* Phones */
@media (max-width: 640px) {
  :root { --section-gap: 64px; }
  body { font-size: 16px; }
  .page { padding: 10px; }
  .hero, .panel, .site-footer { border-radius: 22px; }
  .hero { gap: 28px; }

  /* header: brand + CTA on one row, nav scrolls on its own row */
  .site-header { display: grid; grid-template-columns: 1fr auto; }
  .main-nav {
    grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; gap: 0 20px;
    overflow-x: auto; scrollbar-width: none; margin: -4px 0;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .cta-pill { padding: 0 16px; font-size: 14px; }

  .badge { font-size: 11px; padding: 7px 12px; }
  .hero h1 { font-size: clamp(44px, 15vw, 72px); }
  .hero__photo { aspect-ratio: 4 / 5; object-position: 50% 20%; }
  .signal__label { font-size: 11px; }

  #about { gap: 32px; }
  .stats { gap: 10px; }
  .stat { padding: 18px; gap: 20px; border-radius: 18px; }
  .stat dd { font-size: 40px; }
  .stat dt { font-size: 14px; }

  .card { padding: 16px; border-radius: 20px; }
  .card__shot { min-height: 0; }
  .card h3 { font-size: 21px; }
  .step__name { font-size: 16px; }
  .steps, .can { min-height: 0; padding: 12px 0; }
  .can__label { width: 44px; font-size: 11px; }

  .exp__quote { font-size: 26px; }
  .job { grid-template-columns: 1fr; gap: 6px; }
  .job__body { flex-direction: column; gap: 8px; }
  .job__logo { width: auto; height: 32px; }
  .job__logo { height: 28px; }
  .job__logo img { height: 22px !important; width: auto !important; max-width: 110px; object-fit: contain; object-position: left center; }
  .job__logo img[alt="University of Gothenburg"] { height: 28px !important; }

  .contact { padding-top: 88px; padding-bottom: 56px; }
  .contact__links { flex-direction: column; align-self: stretch; }
  .contact__links .btn { width: 100%; }

  .site-footer__bar { flex-direction: column; align-items: flex-start; }
}

/* very narrow phones (iPhone SE, Galaxy Fold) */
@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .stat { flex-direction: row-reverse; align-items: center; }
  .stat dt { order: 0; }
}

/* =========================================================
   Motion: scroll reveal + hover interactions
   ========================================================= */
:root { --ease: cubic-bezier(.2, .7, .2, 1); }

/* scroll reveal (class added by main.js, so no-JS visitors see everything) */
/* blur -> sharp, like a lens pulling focus. `html .reveal` outranks the hover transitions below;
   main.js drops the class once the reveal finishes so hovers get their own timing back. */
html .reveal { opacity: 0; transform: translateY(28px) scale(.985); filter: blur(10px);
  transition: opacity .8s var(--ease), transform .8s var(--ease), filter .8s var(--ease); }
html .reveal.in { opacity: 1; transform: none; filter: blur(0); }

/* live signal: hero waveform breathes, status dots pulse */
@keyframes bar { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.wave span { transform-origin: center; animation: bar 2.4s ease-in-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16, 126, 241, .55); } 100% { box-shadow: 0 0 0 8px rgba(16, 126, 241, 0); } }
.badge .dot, .signal__label .dot, .skill__tag .dot, .site-footer__bar .dot { animation: pulse 2s ease-out infinite; }

/* CAN traces draw in when the card reveals */
.can__trace span { transition: opacity .3s; }
.card.reveal .can__trace span { opacity: 0; }
.card.reveal.in .can__trace span { opacity: 1; }

/* shared transitions */
.skill, .stat, .card, .teach, .exp__intro, .job, .btn, .cta-pill, .icon-box, .card__shot, .step__node, .step-line span,
.stat dd, .job__logo, .main-nav a, .brand svg { transition: transform .35s var(--ease), box-shadow .35s var(--ease), background-color .25s, border-color .25s, color .25s, padding .3s var(--ease); }
.btn span.arrow { display: inline-block; transition: transform .25s var(--ease); }
.card { overflow: hidden; }

@media (hover: hover) and (pointer: fine) {
  /* header */
  .brand:hover svg { transform: translateX(3px); }
  .cta-pill:hover { transform: translateY(-2px); }

  /* What I do */
  .skill:hover { transform: translateY(-6px); border-color: #CFCEC8; box-shadow: 0 18px 40px -18px rgba(15, 15, 15, .28); }
  .skill:hover .icon-box { background: var(--accent); border-color: var(--accent); color: var(--white); transform: rotate(-8deg) scale(1.06); }
  .skill--dark:hover { box-shadow: 0 18px 44px -14px rgba(16, 126, 241, .45); }
  .skill--dark:hover .icon-box { background: var(--glow); border-color: var(--glow); }

  /* stats */
  .stat:hover { transform: translateY(-4px); box-shadow: 0 16px 36px -18px rgba(15, 15, 15, .25); }
  .stat:hover dd { color: var(--accent); transform: translateX(4px); }
  .stat--dark:hover dd { color: var(--glow); }

  /* work cards */
  .card:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(15, 15, 15, .4); }
  .card:hover .card__shot { transform: scale(1.025); }
  .card:hover .round-link { transform: rotate(45deg); }
  /* Fireflies pipeline lights up step by step */
  .card:hover .step__node { border-color: var(--accent); background: var(--accent); }
  .card:hover .step-line span { background: var(--accent); }
  .card:hover .steps li:nth-child(1) .step__node { transition-delay: 0s; }
  .card:hover .steps li:nth-child(2) span { transition-delay: .08s; }
  .card:hover .steps li:nth-child(3) .step__node { transition-delay: .16s; }
  .card:hover .steps li:nth-child(4) span { transition-delay: .24s; }
  .card:hover .steps li:nth-child(5) .step__node { transition-delay: .32s; }
  .card:hover .steps li:nth-child(6) span { transition-delay: .40s; }
  .card:hover .steps li:nth-child(7) .step__node { transition-delay: .48s; }
  .card:hover .steps li:nth-child(8) span { transition-delay: .56s; }
  /* Volvo CAN bus: signal scrolls while hovered */
  @keyframes can-scroll { from { transform: translateX(0); } to { transform: translateX(-10%); } }
  .card:hover .can__trace { animation: can-scroll 1.2s linear infinite alternate; }

  /* experience */
  .exp__intro:hover { transform: translateY(-4px); }
  .job { position: relative; }
  .job::before { content: ""; position: absolute; left: -12px; top: 16px; bottom: 16px; width: 3px; border-radius: 3px; background: var(--accent); transform: scaleY(0); transition: transform .3s var(--ease); }
  .job:hover::before { transform: scaleY(1); }
  .job:hover { padding-left: 8px; }
  .job:hover .job__logo { transform: scale(1.06); }

  /* teaching */
  .teach { transition: transform .35s var(--ease), border-color .25s, background-color .25s; }
  .teach:hover { transform: translateY(-5px); border-color: var(--glow); background: #202020; }

  /* buttons */
  .btn:hover { transform: translateY(-2px); }
  .btn:hover span.arrow { transform: translate(2px, -2px); }
  .btn[download]:hover span.arrow { transform: translateY(3px); }
}

/* focus: hover one item and its siblings step back */
@media (hover: hover) and (pointer: fine) {
  .skill, .stat, .card, .job, .teach, .about__photo { transition-property: transform, box-shadow, background-color, border-color, color, padding, opacity, filter; transition-duration: .35s; transition-timing-function: var(--ease); }
  .skill-list:has(> .skill:hover) > .skill:not(:hover),
  .stats:has(> .stat:hover) > .stat:not(:hover),
  .work-grid:has(> .card:hover) > .card:not(:hover),
  .teach-list:has(> .teach:hover) > .teach:not(:hover) { opacity: .45; filter: blur(1.5px) saturate(.6); transform: scale(.98); }
  .timeline:has(> .job:hover) > .job:not(:hover) { opacity: .35; filter: blur(1px); }
  .about__grid:has(.stat:hover) .about__photo { opacity: .6; filter: blur(2px) grayscale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
