:root {
  --bg: #fafaf9;
  --fg: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --card: #ffffff;
  --accent: #ea580c;
  --accent-text: #c2410c;
  --btn-bg: #c2410c;
  --btn-fg: #ffffff;
  --chip: #f5f5f4;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0a09;
    --fg: #f5f5f4;
    --muted: #a8a29e;
    --line: #292524;
    --card: #161311;
    --accent: #fb923c;
    --accent-text: #fb923c;
    --btn-bg: #fb923c;
    --btn-fg: #0c0a09;
    --chip: #1c1917;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
main { position: relative; max-width: 720px; margin: 0 auto; padding: 88px 20px 64px; }
a { color: inherit; }

/* Hero */
.avatar {
  display: block; width: 128px; height: 128px; border-radius: 50%;
  object-fit: cover; margin-bottom: 28px;
  border: 1px solid var(--line);
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--line);
}
.alt-name { color: var(--muted); margin: -4px 0 12px; font-size: 1rem; }
h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 10px;
}
.role { font-size: 1.125rem; margin: 0 0 4px; }
.role b { font-weight: 600; }
.place { color: var(--muted); margin: 0 0 28px; font-size: .95rem; }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  text-decoration: none; border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 999px; font-size: .95rem;
  transition: border-color .15s, color .15s;
}
.links a { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.links a:hover { border-color: var(--accent); color: var(--accent); }
.links svg { width: 16px; height: 16px; flex: none; }

/* Media */
.media-lead { margin: -6px 0 20px; color: var(--muted); font-size: .98rem; }
.media { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.media .featured { grid-column: 1 / -1; }
@media (min-width: 601px) { .media { grid-template-columns: repeat(3, 1fr); } .media .video:not(.featured) strong { font-size: .95rem; } .media .video:not(.featured) span.desc { font-size: .88rem; } }
@media (max-width: 600px) { .media { grid-template-columns: 1fr; } }
.video { margin: 0; }
.player {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  border-radius: 14px; overflow: hidden; background: #000;
  border: 1px solid var(--line); cursor: pointer; padding: 0; display: block;
}
.player img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s, opacity .2s; opacity: .92; }
.player:hover img { transform: scale(1.02); opacity: 1; }
.player .play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%;
  background: rgba(0,0,0,.6); display: grid; place-items: center;
  transition: background .2s, transform .2s;
}
.player:hover .play { background: var(--accent); transform: scale(1.06); }
.player .play svg { width: 26px; height: 26px; margin-left: 4px; fill: #fff; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video figcaption { margin-top: 10px; }
.video .tag { color: var(--accent-text); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.video strong { display: block; font-size: 1.02rem; margin-top: 2px; }
.video span.desc { color: var(--muted); font-size: .93rem; }

/* Sections */
section { margin-top: 72px; }
h2 {
  font-size: .875rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--fg); font-weight: 700; margin: 0 0 20px;
}
h2::before {
  content: ""; display: inline-block; width: 16px; height: 2px;
  background: var(--accent); vertical-align: middle; margin: -2px 10px 0 0;
}
.about p { margin: 0 0 14px; font-size: 1.05rem; }
.about p:last-child { margin-bottom: 0; }

/* Experience timeline */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.job { position: relative; padding: 0 0 30px 24px; }
.job:last-child { padding-bottom: 0; }
.job::before {
  content: ""; position: absolute; left: -5px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--muted);
}
.job.current::before { border-color: var(--accent); background: var(--accent); }
.job-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; }
.job-title { font-weight: 600; font-size: 1.02rem; }
.job-date { color: var(--muted); font-size: .88rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job-org { color: var(--muted); font-size: .95rem; }
.job-org a { text-decoration: none; border-bottom: 1px solid var(--line); }
.job-org a:hover { color: var(--accent); border-color: var(--accent); }
.job p { margin: 6px 0 0; font-size: .95rem; }
.sub { margin-top: 10px; }
.sub div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; font-size: .95rem; }
.sub div + div { margin-top: 4px; }
.sub span:last-child { color: var(--muted); font-size: .88rem; white-space: nowrap; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--chip); border: 1px solid var(--line);
  padding: 6px 12px; border-radius: 8px; font-size: .92rem;
}

/* Two columns */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; gap: 0; } .grid2 > section + section { margin-top: 56px; } }
.grid2 section { margin-top: 72px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.plain li:last-child { border-bottom: 0; }
.plain small { display: block; color: var(--muted); font-size: .86rem; }

/* Projects */
.projects { display: grid; gap: 12px; }
.project {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 18px 20px; text-decoration: none;
  transition: border-color .15s, transform .15s;
}
a.project:hover { border-color: var(--accent); transform: translateY(-1px); }
.project strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.project span { color: var(--muted); font-size: .95rem; }
.project.soon { border-style: dashed; }

footer {
  margin-top: 88px; padding-top: 20px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: .875rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
}
footer a { text-decoration: none; }
footer a:hover { color: var(--accent); }

/* Language switcher */
.lang { position: absolute; top: 20px; right: 20px; display: flex; gap: 4px; font-size: .85rem; }
.lang a { text-decoration: none; color: var(--muted); min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.lang a:hover { color: var(--accent); }
.lang a[aria-current] { color: var(--fg); font-weight: 600; background: var(--chip); }

/* Highlights */
.highlights li { position: relative; padding-left: 20px; font-size: 1rem; }
.highlights li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Primary action */
.links a.primary { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); font-weight: 600; }
.links a.primary:hover { color: var(--btn-fg); border-color: var(--btn-bg); filter: brightness(1.08); }

/* Key numbers */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 48px; }
@media (max-width: 600px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat b { display: block; font-size: 2rem; line-height: 1.1; letter-spacing: -.02em; }
.stat span { display: block; margin-top: 6px; color: var(--muted); font-size: .85rem; line-height: 1.35; }

/* Earlier experience */
.earlier { margin-top: 24px; }
.earlier summary { cursor: pointer; list-style: none; color: var(--muted); font-size: .95rem; padding: 10px 0; }
.earlier summary::-webkit-details-marker { display: none; }
.earlier summary::before { content: "+"; display: inline-block; width: 20px; font-weight: 700; color: var(--accent-text); }
.earlier[open] summary::before { content: "−"; }
.earlier summary:hover { color: var(--fg); }
.earlier .timeline { margin-top: 16px; }

/* Videos: swipeable row on phones */
@media (max-width: 600px) {
  .media { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none; }
  .media::-webkit-scrollbar { display: none; }
  .media .video { flex: 0 0 82%; scroll-snap-align: start; }
}

/* Contact */
.cta p { font-size: 1.05rem; margin: 0 0 20px; }

/* Keyboard focus */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

/* Articles */
.articles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .articles { grid-template-columns: 1fr; } }
.article {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; text-decoration: none; transition: border-color .15s, transform .15s;
}
.article:hover { border-color: var(--accent); transform: translateY(-1px); }
.article.featured { grid-column: 1 / -1; padding: 28px; border-left: 3px solid var(--accent); }
.article .tag { color: var(--accent-text); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.article .meta { color: var(--muted); font-size: .85rem; }
.article strong { font-size: 1.05rem; line-height: 1.35; }
.article.featured strong { font-size: 1.35rem; line-height: 1.3; letter-spacing: -.01em; }
.article .desc { color: var(--muted); font-size: .93rem; }
.article .more { margin-top: auto; padding-top: 6px; color: var(--accent-text); font-weight: 600; font-size: .9rem; }

/* Original-language title under a translated one */
.orig { display: block; margin-top: 2px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
