/* ============================================================
   Twan Nooitmeer — CV Redesign
   "Editorial / Kinetic × Swiss" — warm editorial base, structural punch
   Fonts: DM Serif Display (display) · Geist (body) · JetBrains Mono (labels)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Geist:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root {
  --bg:           #f6f3ec;
  --bg-soft:      #efeae0;
  --bg-card:      #fffdf9;
  --border:       #e3ddd1;
  --border-soft:  #ece7dc;
  --text:         #181511;
  --text-muted:   #67615a;
  --text-subtle:  #a39a8d;
  --primary:      #1a5fa8;
  --primary-soft: #e8f0fb;
  --accent:       #c4622d;
  --accent-soft:  #faf0ea;
  --accent-2:     #2d7a6a;
  --accent-2-soft:#e8f4f1;
  --line:         #e0d9cc;
  --shadow-sm:    0 1px 2px rgba(26,23,20,.04), 0 2px 8px rgba(26,23,20,.05);
  --shadow-md:    0 2px 4px rgba(26,23,20,.06), 0 10px 30px rgba(26,23,20,.08);
  --shadow-lg:    0 30px 70px -20px rgba(26,23,20,.22);
  --radius:       14px;
  --radius-sm:    8px;
  --max:          940px;
  --font-serif:   'DM Serif Display', Georgia, serif;
  --font-sans:    'Geist', 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --transition:   180ms cubic-bezier(.4,0,.2,1);
  --ease-out:     cubic-bezier(.16,1,.3,1);

  --gantt-main:    #1a5fa8;
  --gantt-current: #c4622d;
  --gantt-side:    #2d7a6a;

  --blob-1: #1a5fa8;
  --blob-2: #c4622d;
  --blob-3: #2d7a6a;
}

[data-theme="dark"] {
  --bg:           #121110;
  --bg-soft:      #1c1a17;
  --bg-card:      #1e1b18;
  --border:       #2d2924;
  --border-soft:  #262220;
  --text:         #f1ede7;
  --text-muted:   #9c9389;
  --text-subtle:  #6a6157;
  --primary:      #5b9dd8;
  --primary-soft: #1a2535;
  --accent:       #d97c4e;
  --accent-soft:  #261a12;
  --accent-2:     #4aaa95;
  --accent-2-soft:#0e201d;
  --line:         #2a2622;
  --shadow-sm:    0 1px 2px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.25);
  --shadow-md:    0 2px 4px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.4);
  --shadow-lg:    0 30px 70px -20px rgba(0,0,0,.7);
  --gantt-main:    #5b9dd8;
  --gantt-current: #d97c4e;
  --gantt-side:    #4aaa95;
  --blob-1: #2f6fbf;
  --blob-2: #b5572a;
  --blob-3: #2f8472;
}

/* ---------- Language toggle ---------- */
html[lang="nl"] .en { display: none; }
html[lang="en"] .nl { display: none; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

/* ============================================================
   Animated atmosphere (gradient blobs + grain)
   ============================================================ */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.30;
  will-change: transform;
}
[data-theme="dark"] .bg-blob { opacity: 0.45; }
.bg-blob-1 {
  width: 46vw; height: 46vw;
  top: -10vw; left: -8vw;
  background: var(--blob-1);
  animation: drift1 26s ease-in-out infinite;
}
.bg-blob-2 {
  width: 40vw; height: 40vw;
  top: 12vw; right: -10vw;
  background: var(--blob-2);
  animation: drift2 32s ease-in-out infinite;
}
.bg-blob-3 {
  width: 38vw; height: 38vw;
  bottom: -12vw; left: 18vw;
  background: var(--blob-3);
  animation: drift3 30s ease-in-out infinite;
}
.bg-grain {
  position: absolute;
  inset: -50%;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
[data-theme="dark"] .bg-grain { opacity: 0.08; }

@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(6vw,4vw) scale(1.1)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(-5vw,5vw) scale(1.08)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4vw,-4vw) scale(1.12)} }

/* ---------- Theme + Lang controls ---------- */
.controls {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 20;
  display: flex;
  gap: 0.5rem;
}
.ctrl-btn {
  background: color-mix(in srgb, var(--bg-card) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.ctrl-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ---------- Skip link ---------- */
.skip-link { position: absolute; left: -9999px; top: auto; }
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--primary); color: #fff;
  border-radius: var(--radius-sm); text-decoration: none; box-shadow: var(--shadow-md);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 6rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}
.hero-inner {
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Oversized Swiss watermark */
.hero-watermark {
  position: absolute;
  top: 50%;
  right: -2vw;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: clamp(14rem, 38vw, 34rem);
  line-height: 0.8;
  color: var(--text);
  opacity: 0.05;
  letter-spacing: -0.04em;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  will-change: transform;
}

.hero-inner > * { position: relative; z-index: 1; }

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.6rem;
}
.hero-kicker-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-2) 18%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero-role {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 8.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0.2rem 0 1.5rem;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span { display: block; }

.hero-summary {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 40ch;
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}
.hero-link {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-card) 70%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  transition: border-color var(--transition), color var(--transition), transform var(--transition), background var(--transition);
}
.hero-link:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-2px);
}
.hero-link.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.hero-link.primary:hover { filter: brightness(1.08); color: #fff; }
.hero-link-arrow { transition: transform var(--transition); }
.hero-link.primary:hover .hero-link-arrow { transform: translateX(3px); }

/* Avatar floats top-right of hero block */
.hero-avatar {
  position: absolute;
  top: -1rem;
  right: 0;
  z-index: 2;
  will-change: transform;
}
.hero-avatar img {
  width: 150px; height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg-card);
  box-shadow: var(--shadow-lg);
  background: var(--bg-soft);
}
.hero-avatar-tag {
  position: absolute;
  bottom: 0; left: 50%;
  transform: translate(-50%, 35%);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  color: var(--accent-2);
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}
.hero-avatar-tag::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  animation: pulse 2s ease-in-out infinite;
}

.scroll-hint {
  position: absolute;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  color: var(--text-subtle);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 1;
}
.scroll-hint::after {
  content: '';
  width: 1px; height: 30px;
  background: linear-gradient(var(--text-subtle), transparent);
  animation: bob 2.4s ease-in-out infinite;
}

/* ---------- Kinetic load reveal ---------- */
[data-reveal] { opacity: 0; }
.hero [data-reveal] {
  transform: translateY(20px);
}
body.loaded .hero [data-reveal] {
  opacity: 1;
  transform: none;
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.hero-title .line > span {
  transform: translateY(105%);
}
body.loaded .hero-title [data-reveal] { opacity: 1; transform: none; }
body.loaded .hero-title .line > span {
  transform: none;
  transition: transform .9s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}
.hero-title .line[data-reveal] { opacity: 1; }

/* ============================================================
   Skills marquee
   ============================================================ */
.marquee {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0;
  background: color-mix(in srgb, var(--bg-card) 50%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 1.1rem;
  white-space: nowrap;
  animation: marquee 38s linear infinite;
  will-change: transform;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}
.marquee-track .marquee-dot { color: var(--accent); }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   MAIN
   ============================================================ */
#timeline {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

/* ---------- Section labels (Swiss) ---------- */
.section-label {
  display: flex;
  align-items: baseline;
  gap: 1.1rem;
  margin: 5rem 0 2rem;
}
.section-index {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 0.8;
  color: var(--accent);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.section-label h2 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  align-self: center;
}
.section-rule {
  flex: 1;
  height: 1px;
  background: var(--line);
  align-self: center;
}
.section-label:first-of-type { margin-top: 0; }

/* ============================================================
   Timeline track
   ============================================================ */
.track {
  list-style: none;
  padding-left: 0;
  position: relative;
}
.track::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 1px;
  background: linear-gradient(var(--line), var(--line) 70%, transparent);
}

.entry {
  position: relative;
  padding-left: 3.25rem;
  margin-bottom: 1.1rem;
}

/* Oversized Swiss index numeral */
.entry-num {
  position: absolute;
  left: -0.4rem;
  top: -0.9rem;
  font-family: var(--font-serif);
  font-size: 3.4rem;
  line-height: 1;
  color: var(--text);
  opacity: 0.06;
  z-index: 0;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.03em;
}

/* Timeline dot */
.entry::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 1.6rem;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 4px var(--bg);
  z-index: 2;
  transition: background var(--transition), transform var(--transition);
}
.entry:hover::before { transform: scale(1.15); }
.entry[data-kind="education"]::before { border-color: var(--accent); }
.entry[id="emp-brandpunt"]::before { border-color: var(--accent-2); }

/* Entry card */
.entry-inner {
  position: relative;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.entry-inner:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
}

/* Accent bar on left edge by kind */
.entry[data-kind="work"] .entry-inner { border-left: 3px solid var(--primary); }
.entry[data-kind="education"] .entry-inner { border-left: 3px solid var(--accent); }
.entry[id="emp-brandpunt"] .entry-inner { border-left: 3px solid var(--accent-2); }

/* ---------- Entry head ---------- */
.entry-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.3rem 1.3rem 1.3rem 1.15rem;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition);
}
.entry-head:hover { background: var(--bg-soft); }
.entry-head > div:not(.logo) { flex: 1; min-width: 0; }

.entry-head h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.22rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.entry-head .org {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* Chevron */
.entry-head::after {
  content: '';
  display: block;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--text-subtle);
  border-bottom: 1.5px solid var(--text-subtle);
  transform: rotate(45deg) translateY(-2px);
  flex-shrink: 0;
  transition: transform var(--transition);
  margin-right: 0.25rem;
  align-self: center;
}
.entry.collapsed .entry-head::after { transform: rotate(-45deg) translateY(2px); }
.entry.collapsed > .entry-inner > :not(.entry-head) { display: none; }

/* ---------- Entry body ---------- */
.entry > .entry-inner > .desc,
.entry > .entry-inner > .sub-list {
  padding: 0 1.3rem 1.3rem 1.15rem;
}
.desc {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  padding-top: 1rem !important;
}

/* ---------- Sub-list ---------- */
.sub-list {
  list-style: none;
  border-top: 1px solid var(--border-soft);
}
.sub-list > li { padding: 1rem 0; position: relative; }
.sub-list > li + li { border-top: 1px dashed var(--line); }
.sub-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}
.sub-head > div:not(.logo) { flex: 1; min-width: 0; }
.sub-role {
  font-weight: 600;
  font-size: 0.94rem;
  color: var(--text);
  margin-bottom: 0.12rem;
}
.sub-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.sub-desc {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-top: 0.4rem;
}

/* ---------- Tool pills ---------- */
.pills {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.6rem 0 0;
  padding: 0;
}
.pills li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, transparent);
  border-radius: 999px;
  padding: 0.2rem 0.62rem;
  white-space: nowrap;
  transition: transform var(--transition);
}
.pills li:hover { transform: translateY(-1px); }

/* ---------- Logos ---------- */
.logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 11px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.logo::after {
  content: attr(data-letter);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--primary);
}
.logo img {
  position: relative;
  z-index: 1;
  max-width: 78%; max-height: 78%;
  width: auto; height: auto;
  object-fit: contain;
}
.logo-sm { width: 36px; height: 36px; border-radius: 8px; }
.logo-sm::after { font-size: 1rem; }

/* ---------- Highlight (from Gantt click) ---------- */
.entry.highlight > .entry-inner {
  box-shadow: 0 0 0 2px var(--primary), var(--shadow-md);
  transition: box-shadow 1.4s ease;
}

/* ============================================================
   Gantt
   ============================================================ */
.gantt {
  margin: 0 0 2rem;
  padding: 1.3rem 1.4rem 1.2rem;
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  border-left: 3px solid var(--accent);
}
.gantt-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.4rem 0.85rem;
  align-items: center;
  min-width: 520px;
}
.gantt-axis {
  grid-column: 2;
  position: relative;
  height: 1.2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.25rem;
}
.gantt-tick {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-subtle);
  letter-spacing: 0.04em;
}
.gantt-tick::after {
  content: '';
  position: absolute;
  bottom: -0.35rem; left: 50%;
  width: 1px; height: 0.3rem;
  background: var(--line);
}
.gantt-label {
  grid-column: 1;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}
.gantt-row {
  grid-column: 2;
  position: relative;
  height: 17px;
  background: var(--bg-soft);
  border-radius: 5px;
}
.gantt-bar {
  position: absolute;
  top: 0; bottom: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), filter 140ms ease;
  border: none;
  padding: 0 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.9);
  line-height: 17px;
  overflow: hidden;
  white-space: nowrap;
}
.gantt-bar:hover,
.gantt-bar:focus-visible {
  transform: translateY(-1px) scaleY(1.12);
  filter: brightness(1.1);
  outline: none;
}
.gantt-bar.main    { background: var(--gantt-main); }
.gantt-bar.side    { background: var(--gantt-side); }
.gantt-bar.current { background: var(--gantt-current); overflow: visible; }
.gantt-bar.current::after {
  content: '';
  position: absolute;
  left: 80%; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gantt-current);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gantt-current) 25%, transparent);
  transform: translate(-50%, -50%);
  animation: pulse 2s ease-in-out infinite;
  pointer-events: none;
}

/* ============================================================
   Certifications
   ============================================================ */
.certs { display: flex; flex-direction: column; gap: 0.75rem; }
.cert-group {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.cert-group:hover { box-shadow: var(--shadow-md); }
.cert-group > summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  user-select: none;
  transition: background var(--transition);
}
.cert-group > summary:hover { background: var(--bg-soft); }
.cert-group > summary::-webkit-details-marker { display: none; }
.cert-group > summary::after {
  content: '';
  display: block;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--text-subtle);
  border-bottom: 1.5px solid var(--text-subtle);
  transform: rotate(-45deg);
  margin-left: auto;
  flex-shrink: 0;
  transition: transform var(--transition);
}
.cert-group[open] > summary::after { transform: rotate(45deg) translateY(-2px); }
.cert-group-name { font-weight: 600; font-size: 0.95rem; }
.cert-count {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  background: var(--bg-soft);
  color: var(--text-muted);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.cert-body { padding: 0 1.25rem 1rem; }
.cert-subhead {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin: 1rem 0 0.5rem;
  font-weight: 500;
  border-top: 1px solid var(--border-soft);
  padding-top: 0.75rem;
}
.cert-subhead:first-child { border-top: none; margin-top: 0; }
.cert-list { list-style: none; display: flex; flex-direction: column; }
.cert {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 1rem;
  padding: 0.5rem 0;
  border-top: 1px dashed var(--line);
  font-size: 0.88rem;
  align-items: baseline;
}
.cert:first-child { border-top: none; }
.cert-name { color: var(--text); }
.cert-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.cert-valid .cert-name::before {
  content: '✓';
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-2);
  margin-right: 0.5rem;
  font-weight: 700;
}
.cert-expired { opacity: 0.5; }
.cert-expired .cert-name::before {
  content: '×';
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-right: 0.5rem;
  font-weight: 700;
}
.cert-legacy {
  border-top: 1px solid var(--border-soft);
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}
.cert-legacy > summary {
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--text-subtle);
  letter-spacing: 0.04em;
  padding: 0.35rem 0;
  list-style: none;
  transition: color var(--transition);
}
.cert-legacy > summary:hover { color: var(--text-muted); }
.cert-legacy > summary::-webkit-details-marker { display: none; }
.cert-legacy > summary::before { content: '▸ '; }
.cert-legacy[open] > summary::before { content: '▾ '; }
.cert-legacy .cert-list { padding: 0; }

/* ---------- Education placeholder hidden ---------- */
.section-label:has(+ .track .entry[data-kind="education"]),
.track:has(> .entry[data-kind="education"]) { display: none; }

/* ============================================================
   Scroll reveal (JS-driven via .is-visible)
   ============================================================ */
#timeline [data-reveal],
.marquee[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
#timeline [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 3rem 1rem 3.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--primary); }
footer .footer-hire {
  font-family: var(--font-sans);
  font-size: 0.98rem;
  letter-spacing: 0;
  color: var(--text);
  max-width: 38rem;
  margin: 0 auto 1.3rem;
  line-height: 1.55;
}
footer .footer-hire a {
  color: var(--primary);
  font-weight: 500;
  border-bottom: 1px solid currentColor;
}

/* ---------- Focus ---------- */
a:focus-visible,
button:focus-visible,
.entry-head:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Animations ---------- */
@keyframes bob { 0%,100%{transform:translateY(0);opacity:.4} 50%{transform:translateY(6px);opacity:1} }
@keyframes pulse { 0%,100%{opacity:.35} 50%{opacity:1} }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 720px) {
  .hero { padding: 5rem 1.4rem 3rem; }
  .hero-avatar {
    position: static;
    margin-bottom: 1.6rem;
  }
  .hero-avatar img { width: 96px; height: 96px; }
  .hero-avatar-tag { transform: translate(-50%, 50%); }
  .hero-watermark { font-size: 40vw; opacity: 0.04; right: -6vw; }
  .hero-summary { max-width: 100%; }
  #timeline { padding: 3rem 1.1rem 5rem; }
  .entry { padding-left: 2.4rem; }
  .entry-num { font-size: 2.6rem; left: -0.2rem; }
  .track::before { left: 12px; }
  .entry::before { left: 5px; }
  .section-index { font-size: 2.4rem; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bg-blob, .marquee-track, .scroll-hint::after,
  .hero-kicker-dot, .hero-avatar-tag::before, .gantt-bar.current::after { animation: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero-title .line > span { transform: none !important; }
  * { transition-duration: 0.01ms !important; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  :root {
    --bg: #fff; --bg-card: #fff; --bg-soft: #f8f8f8;
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
    --border: #ddd; --line: #e0e0e0;
    --text: #000; --text-muted: #444; --text-subtle: #888;
    --primary: #1a5fa8; --accent: #c4622d;
  }
  body { font-size: 10.5pt; }
  .bg, .controls, .scroll-hint, .skip-link, .marquee, .hero-watermark { display: none !important; }
  .hero { min-height: auto; padding: 0 0 1rem; page-break-after: avoid; }
  .hero-avatar { position: static; }
  .hero-avatar img { width: 72px; height: 72px; box-shadow: none; }
  .hero-avatar-tag { display: none; }
  .hero-title { font-size: 26pt; }
  .hero-summary { font-size: 10pt; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  #timeline { padding: 0.5rem 0 0; max-width: none; }
  .entry-num { display: none; }
  .track::before { display: none; }
  .entry { padding-left: 0; }
  .entry::before { display: none; }
  .entry.collapsed > .entry-inner > :not(.entry-head) { display: block !important; }
  .entry-head::after { display: none; }
  .entry-inner { box-shadow: none; border: 1px solid #ccc; backdrop-filter: none; page-break-inside: avoid; }
  details:not([open]) > *:not(summary) { display: block !important; }
  footer { color: #999; }
  a[href^="http"]::after,
  a[href^="mailto"]::after { content: ' (' attr(href) ')'; font-size: 0.8em; color: #777; }
}
