.brand { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 22px; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.nav-links a[aria-current="page"] { color: var(--text); text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 1px; }
.nav-links a:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; border-radius: 2px; }
.nav-tools { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%;
  color: var(--muted); background: none; cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}
.theme-toggle:hover { color: var(--text); background: var(--fill); }
.language-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; min-height: 36px; padding: 0 6px; border: 1px solid var(--hairline); border-radius: 8px;
  background: transparent; color: var(--muted); font: 600 12px var(--font); cursor: pointer;
}
.language-toggle:hover { color: var(--text); background: var(--fill); }
.language-toggle:focus-visible, .theme-toggle:focus-visible, .social-icon:focus-visible, .pill:focus-visible {
  outline: 2px solid var(--text); outline-offset: 4px;
}
.icon-sun { display: none; }
:root[data-theme="dark"] .icon-moon { display: none; }
:root[data-theme="dark"] .icon-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-moon { display: none; }
  :root:not([data-theme="light"]) .icon-sun { display: block; }
}

h1 { font-size: clamp(30px, 5vw, 40px); font-weight: 700; letter-spacing: -0.015em; line-height: 1.3; margin-bottom: 14px; }
.hero-summary { color: var(--text); font-size: 16.5px; line-height: 1.8; max-width: 34em; }
.hero-summary + .hero-summary { margin-top: 4px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.hero-socials { position: relative; gap: 10px; margin-top: 22px; }
.social-icon {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 9px; border: 1px solid var(--hairline); border-radius: 12px;
  color: var(--muted); background: transparent; cursor: pointer; list-style: none;
  transition: color 140ms ease, background-color 140ms ease;
}
.social-icon svg { width: 22px; height: 22px; flex-shrink: 0; }
.social-icon:hover, .contact-dropdown[open] .social-icon { color: var(--text); background: var(--fill); }
.social-icon::-webkit-details-marker { display: none; }
.social-tooltip {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  padding: 3px 8px; border-radius: 6px; background: var(--invert-bg); color: var(--invert-text);
  font-size: 12px; white-space: nowrap; pointer-events: none; visibility: hidden; opacity: 0;
}
.social-icon:focus-visible .social-tooltip { visibility: visible; opacity: 1; }
@media (hover: hover) { .social-icon:hover .social-tooltip { visibility: visible; opacity: 1; } }
.hero-socials .contact-dropdown { position: static; }
.contact-dropdown[open] .social-tooltip { visibility: hidden; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border: none; border-radius: 999px; cursor: pointer;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  transition: opacity 160ms ease, background-color 160ms ease;
}
.pill--dark { background: var(--invert-bg); color: var(--invert-text); }
.pill--dark:hover { opacity: 0.82; color: var(--invert-text); }
.pill--light { background: var(--fill); color: var(--text); }
.pill--light:hover { background: var(--fill-strong); color: var(--text); }

.email-contact { position: relative; }
.email-contact summary { list-style: none; }
.email-contact summary::-webkit-details-marker { display: none; }
.email-panel {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 5;
  width: min(320px, calc(100vw - 44px)); padding: 18px;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--bg); color: var(--text);
}
.email-panel label { display: block; color: var(--muted); font-size: 13px; }
.email-panel input {
  width: 100%; min-width: 0; margin: 6px 0 14px; padding: 8px 10px;
  border: 1px solid var(--hairline); border-radius: 6px;
  background: var(--fill); color: var(--text); font: inherit; font-size: 15px;
}
.email-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 14px; }
.email-actions a { text-decoration: underline; text-underline-offset: 3px; }
.email-panel p { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }

.hero-photo { position: relative; width: clamp(170px, 24vw, 200px); aspect-ratio: 1; margin: 8px 0 0; flex-shrink: 0; overflow: hidden; border-radius: 50%; background: var(--fill); }
.hero-photo img { position: absolute; left: -13.3%; top: -20.5%; width: 121%; height: 121%; max-width: none; object-fit: cover; }

.experience-item { padding: 22px 0; border-bottom: 1px solid var(--hairline); }
.experience-item:last-child { border-bottom: none; }
.experience-no { color: var(--light); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; }
.experience-item h3 { margin: 6px 0 8px; font-size: 17px; font-weight: 700; }
.experience-role { color: var(--light); font-size: 14px; font-weight: 500; margin-left: 8px; }
.experience-summary { color: var(--muted); font-size: 15px; line-height: 1.75; }
.experience-item ul { margin: 8px 0 0; padding: 0; list-style: none; }
.experience-item li { color: var(--light); font-size: 14px; line-height: 1.7; }

.rowitem { display: flex; align-items: baseline; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.rowitem:last-child { border-bottom: none; }
.rowitem h2, .rowitem h3 { font-size: 16px; font-weight: 600; }
.rowitem p { color: var(--muted); font-size: 14.5px; margin-left: auto; text-align: right; }
.ext {
  display: inline-flex; align-items: center; justify-content: center; align-self: center;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  color: var(--light); background: var(--fill); font-size: 13px;
  transition: background-color 140ms ease, color 140ms ease;
}
.rowitem:hover .ext { color: var(--text); background: var(--fill-strong); }

.education-content p { color: var(--muted); font-size: 15px; }
.education-school { color: var(--text); font-weight: 600; }

.thoughts-intro { color: var(--muted); font-size: 14px; }
.thoughts-language-note { margin-top: 6px; color: var(--light); font-size: 12px; }
.thought-list { margin-top: 18px; }
.thought-item { border-bottom: 1px solid var(--hairline); }
.thought-item:last-child { border-bottom: none; }
.thought { scroll-margin-top: 84px; }
.thought-summary { padding: 22px 0; list-style: none; cursor: pointer; }
.thought-summary::-webkit-details-marker { display: none; }
.thought-summary:focus-visible { outline: 2px solid var(--text); outline-offset: 5px; border-radius: 2px; }
.thought-heading { display: flex; align-items: center; gap: 16px; }
.thought-title { flex: 1; font-size: 17px; font-weight: 600; line-height: 1.6; }
.thought-heading time { color: var(--light); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.thought-chevron { width: 7px; height: 7px; margin: 0 3px; border: solid var(--light); border-width: 0 1px 1px 0; transform: rotate(45deg); flex-shrink: 0; transition: transform 140ms ease; }
.thought-excerpt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 8px; color: var(--muted); font-size: 14.5px; line-height: 1.8; }
.thought-summary:hover .thought-title { color: var(--muted); }
.thought[open] .thought-chevron { transform: rotate(225deg); }
.thought[open] .thought-excerpt { display: none; }
.thought-body { padding: 0 0 28px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font-size: 15.5px; line-height: 1.95; }

.footer-slogan { color: var(--text); font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--light); font-size: 13px; }
