:root {
  color-scheme: light;
  --grey-600: #52646d;
  --grey-700: #37474f;
  --accent: #0d9488;
  --accent-soft: #ccfbf1;
  --text: #2b2b2b;
  --text-light: #666;
  --page-bg: #fafafa;
  --card-bg: #fff;
  --border: #e8e8e8;
  --track: #dde2e4;
  --shadow: 0 1px 4px rgba(0,0,0,.15);
}

[data-theme="dark"] {
  color-scheme: dark;
  --grey-600: #4b5b63;
  --grey-700: #2b363c;
  --accent: #2dd4bf;
  --accent-soft: #164e46;
  --text: #e6e8eb;
  --text-light: #9aa0a6;
  --page-bg: #14181b;
  --card-bg: #1e2429;
  --border: #2c3338;
  --track: #333c42;
  --shadow: 0 1px 6px rgba(0,0,0,.5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }

body {
  margin: 0;
  font-family: 'Roboto', system-ui, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.6;
  transition: background .2s ease, color .2s ease;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 0 1.25rem; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ---------- Header / Nav ---------- */
.main-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--accent);
  box-shadow: var(--shadow);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; }

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 50%;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.theme-toggle:hover { background: rgba(255,255,255,.12); }
.theme-toggle .icon { margin: 0; width: 1.2rem; height: 1.2rem; color: inherit; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-right { display: flex; align-items: center; }

.nav-list {
  display: flex;
  gap: .25rem;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-list a {
  display: block;
  padding: 1rem .9rem;
  color: #fff;
  text-decoration: none;
  font-size: .92rem;
  transition: background .15s;
}
.nav-list a:hover, .nav-list a.active { background: color-mix(in srgb, var(--accent) 80%, black); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 2.25rem; height: 2.25rem;
  background: none; border: none; cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 1px; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--accent);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-list.open { max-height: 24rem; }
  .nav-list a { padding: .9rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); }
}

/* ---------- Icons (replace emoji) ---------- */
.icon {
  width: 1.35rem;
  height: 1.35rem;
  vertical-align: -0.3rem;
  margin-right: .5rem;
  color: var(--accent);
}
.icon-inline {
  width: 1rem;
  height: 1rem;
  vertical-align: -0.15rem;
  margin-right: .35rem;
  color: currentColor;
}

/* ---------- Sections ---------- */
.section { padding: 1.5rem 0; }
.section:first-of-type { padding-top: 2rem; }

#about {
  background: var(--card-bg);
  padding-top: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.section-title {
  display: flex;
  align-items: center;
  font-weight: 400;
  font-size: 1.5rem;
  margin: 0 0 1rem;
  color: var(--text);
}

.card {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 1.75rem;
}

/* ---------- About ---------- */
.intro {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.profile-pic-frame {
  width: 140px; height: 140px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.profile-pic {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 0%;
  transform: scale(1.3);
  transform-origin: center top;
}
.intro-content h1 { margin: 0 0 .3rem; font-weight: 400; }
.tagline { color: var(--text-light); margin: 0 0 1rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: .6rem 1.3rem;
  border-radius: 3px;
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid transparent;
  transition: background .15s, color .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 85%, black); }
.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--grey-700); border-color: var(--grey-700); color: #fff; }

.btn-mail { display: inline-flex; align-items: center; gap: .5rem; }
.btn-mail svg { flex-shrink: 0; }

.actions-social { margin-top: .75rem; }
.actions-social .btn { display: inline-flex; align-items: center; }

/* ---------- Skills ---------- */
.skills-card { background: var(--card-bg); color: var(--text); }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.tab {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: none;
  padding: .5rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-family: inherit;
  color: var(--text-light);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab:hover { background: var(--track); color: var(--text); }
.tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.tab-badge {
  background: var(--accent);
  color: #fff;
  font-size: .65rem;
  font-weight: 500;
  padding: .1rem .45rem;
  border-radius: 999px;
}

.tab-panel[hidden] { display: none; }
.tab-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem 2.5rem;
}

.skill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: .5rem;
}
.skill-head span:first-child { font-size: .85rem; }
.skill-head a { color: var(--accent); }
.skill-pct {
  flex-shrink: 0;
  font-size: .78rem;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.bar {
  background: var(--track);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 65%, white), var(--accent));
  transition: width 1.1s ease;
}
.reveal.in-view .bar-fill { width: var(--pct); }

.agentic-intro {
  grid-column: 1 / -1;
  color: var(--text-light);
  font-size: .9rem;
  margin: 0 0 .5rem;
}
.agentic-intro a { color: var(--accent); }

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  background: var(--track);
}
.tl-item {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
.tl-marker {
  position: relative;
  z-index: 1;
  width: 16px;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-self: stretch;
  align-items: center;
}
.tl-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--page-bg);
}
.tl-card {
  position: relative;
  flex: 1;
  min-width: 0;
  background: var(--card-bg);
  box-shadow: var(--shadow);
  border-radius: 4px;
  padding: 1.25rem 5.75rem 1.25rem 1.5rem;
}
.tl-logo-link-wrap {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  transform: translateY(-50%);
}
.tl-logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .15s ease;
}
.tl-logo-link:hover { transform: scale(1.06); }
.tl-logo {
  max-width: 46px;
  max-height: 46px;
  object-fit: contain;
}
.tl-logo-initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grey-700);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
}
.tl-date {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin: 0 0 .6rem;
}
.tl-card h3 { margin: 0 0 .25rem; font-weight: 500; }
.tl-card h3 a { color: inherit; text-decoration: none; }
.tl-card h3 a:hover { text-decoration: underline; }
.tl-sub { color: var(--text-light); margin: 0 0 .75rem; font-size: .9rem; }
.tl-card ul { margin: .4rem 0; padding-left: 1.2rem; }
.tl-card p { margin: .5rem 0; }

.tl-card .tl-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.tl-card.expanded .tl-body {
  max-height: 200rem;
}

.tl-toggle {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  margin-top: .5rem;
  padding: 0;
  background: none;
  border: none;
  color: var(--accent);
  font-size: .85rem;
  font-weight: 500;
  cursor: pointer;
}
.tl-toggle:hover { text-decoration: underline; }
.tl-toggle::after {
  content: '';
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform .2s ease;
}
.tl-card.expanded .tl-toggle::after { transform: rotate(180deg); }
.tl-toggle-less { display: none; }
.tl-card.expanded .tl-toggle-more { display: none; }
.tl-card.expanded .tl-toggle-less { display: inline; }

/* ---------- Horizontal timeline (Speaker at) ---------- */
.h-timeline { padding-bottom: .5rem; }
.h-track-wrap { position: relative; padding: 0 .5rem; }
.h-tracks { position: absolute; inset: 0; pointer-events: none; }
.h-track-line {
  position: absolute;
  height: 3px;
  background: var(--track);
  border-radius: 2px;
}
.h-points {
  display: flex;
  flex-wrap: wrap;
  column-gap: 2rem;
  row-gap: 1.5rem;
  position: relative;
}
.h-point {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .35rem;
  width: 9.5rem;
  background: none;
  border: none;
  padding: 1.1rem 0 0;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.h-dot {
  position: absolute;
  top: 0; left: 0;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 3px solid var(--accent);
  transition: transform .15s ease, background .15s ease;
}
.h-point:hover .h-dot, .h-point:focus-visible .h-dot {
  background: var(--accent);
  transform: scale(1.15);
}
.h-date { color: var(--accent); font-size: .78rem; font-weight: 500; }
.h-name { font-size: .9rem; line-height: 1.3; color: var(--text); }
.h-point:hover .h-name, .h-point:focus-visible .h-name { text-decoration: underline; }

.h-point-static { cursor: default; }
.h-point-static:hover .h-dot, .h-point-static:focus-visible .h-dot { transform: none; }
.h-point-static:hover .h-name, .h-point-static:focus-visible .h-name { text-decoration: none; }

/* ---------- Speaker dialog ---------- */
.speaker-dialog {
  border: none;
  border-radius: 6px;
  padding: 0;
  max-width: 620px;
  width: 90vw;
  max-height: 85vh;
  background: var(--card-bg);
  color: var(--text);
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
}
.speaker-dialog::backdrop { background: rgba(0,0,0,.5); }
.dialog-inner {
  position: relative;
  padding: 2rem;
  max-height: 85vh;
  overflow-y: auto;
}
.speaker-dialog .dlg-date {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 500;
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  margin: 0 0 .6rem;
}
.speaker-dialog h3 { margin: 0 0 .3rem; }
.speaker-dialog h3 a { color: inherit; text-decoration: none; }
.speaker-dialog h3 a:hover { text-decoration: underline; }
.speaker-dialog .dlg-sub { color: var(--text-light); margin: 0 0 .9rem; font-size: .9rem; }
.speaker-dialog ul { padding-left: 1.2rem; }

.dialog-close {
  position: absolute;
  top: .9rem; right: .9rem;
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
}
.dialog-close:hover { background: var(--track); color: var(--text); }

@media (max-width: 600px) {
  .h-point { width: 8rem; }
}

/* ---------- Trainings table ---------- */
.training-panel { display: block; }
.training-panel p { color: var(--text); font-size: .92rem; margin: 0 0 1.1rem; }
.training-panel > a.btn { display: table; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-light);
  font-size: .85rem;
}

/* ---------- Reveal-on-scroll (replaces WOW.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.in-view { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .bar-fill { transition: none; width: var(--pct); }
}
