:root {
  --fg: #1a1a1a;
  --muted: #666;
  --accent: #2a5d8f;
  --rule: #e5e5e5;
  --bg: #fff;
  --maxw: 780px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--fg); }
body {
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding: 48px 24px;
}
main { max-width: var(--maxw); margin: 0 auto; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 4px; letter-spacing: -0.01em; }
h2 {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted); margin: 36px 0 14px; padding-bottom: 6px;
  border-bottom: 1px solid var(--rule);
}
h3 { font-size: 16px; font-weight: 600; margin: 0; }
h4 { font-size: 15px; font-weight: 600; margin: 0; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 4px 0; }
ul { margin: 6px 0 0; padding-left: 20px; }
li { margin: 3px 0; }

.header { display: flex; align-items: center; gap: 20px; margin-bottom: 4px; }
.header .header-text { flex: 1; min-width: 0; }
.header h1 { margin-bottom: 4px; }
.avatar {
  width: 88px; height: 88px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: var(--rule);
}
.label { color: var(--muted); margin: 0 0 10px; }
.summary { margin: 18px 0 0; font-size: 15px; line-height: 1.6; }
.contact {
  font-size: 14px; color: var(--muted);
  font-style: normal;
}
.contact a { color: var(--muted); }
.contact span + span::before { content: " · "; color: var(--rule); margin: 0 4px; }

.entry { margin: 0 0 18px; }
.entry:last-child { margin-bottom: 0; }
.entry-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  flex-wrap: wrap;
}
.entry-meta { font-size: 13px; color: var(--muted); white-space: nowrap; }
.entry-sub { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.entry-desc { margin-top: 6px; font-size: 14px; }
.entry-tags { margin-top: 6px; font-size: 12px; color: var(--muted); }

.skills { margin: 0; }
.skills dt { font-weight: 600; font-size: 14px; margin-top: 10px; }
.skills dt:first-child { margin-top: 0; }
.skills dd { margin: 2px 0 0 0; color: var(--muted); font-size: 14px; }

.entry-body {
  margin-top: 6px;
  padding-left: 14px;
  border-left: 2px solid var(--rule);
  font-size: 14px;
}
.entry-body > :first-child { margin-top: 0; }
.entry-body ul, .entry-body li { font-size: 14px; }
.entry-body > .entry-desc {
  font-style: italic;
  color: var(--muted);
  margin-bottom: 12px;
}

.position { margin-top: 14px; }
.position ul, .position li { font-size: 14px; }

/* Inline "View more" trigger inside entry-sub line */
details.inline-more { display: contents; }
details.inline-more > summary {
  display: inline;
  cursor: pointer; color: inherit;
  list-style: none;
}
details.inline-more > summary::-webkit-details-marker { display: none; }
details.inline-more > summary::marker { content: ""; }
details.inline-more > summary > .more-text { color: var(--accent); }
details.inline-more > summary:hover > .more-text { text-decoration: underline; }
details.inline-more[open] > summary { display: none; }
details.inline-more > .entry-body { display: none; }
details.inline-more[open] > .entry-body { display: block; }

/* Block-level "View N more / View less" toggle (projects tail) */
details.more { margin-top: 4px; }
details.more > summary {
  display: inline-block; cursor: pointer;
  color: var(--accent); font-size: 14px;
  margin-top: 12px; list-style: none;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::marker { content: ""; }
details.more > summary:hover { text-decoration: underline; }
details.more > summary > .more-hide { display: none; }
details.more[open] > summary > .more-show { display: none; }
details.more[open] > summary > .more-hide { display: inline; }

@media print {
  details.more > * { display: block !important; }
  details.more > summary { display: none; }
  details.inline-more > summary { display: none; }
  details.inline-more > .entry-body { display: block !important; }
}

@media print {
  body { padding: 0; font-size: 11pt; }
  h2 { margin-top: 18px; }
  a { color: inherit; }
}

@media (max-width: 640px) {
  .header { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .header .header-text { width: 100%; }
  .contact { display: flex; flex-wrap: wrap; justify-content: center; }
}
