:root {
  color-scheme: light dark;
  --background: #f3f0e9;
  --surface: #fffdf8;
  --text: #1d2926;
  --muted: #5c6965;
  --accent: #0c6657;
  --accent-soft: #dcece6;
  --rule: #cbd3ce;
  --shadow: 0 24px 70px rgb(24 39 35 / 12%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.13em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.language-nav {
  width: min(72rem, calc(100% - 2rem));
  margin: 1.25rem auto -0.75rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
}
.language-nav a {
  min-width: 2.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}
.language-nav a[aria-current="page"] { background: var(--accent); color: var(--surface); }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  padding: 0.65rem 1rem;
  background: var(--text);
  color: var(--surface);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.resume {
  width: min(72rem, calc(100% - 2rem));
  margin: 2rem auto;
  padding: clamp(2rem, 6vw, 5.5rem);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow, h2 {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.eyebrow { margin: 0 0 0.5rem; }
h1 { margin: 0; font-size: clamp(2.8rem, 8vw, 5.5rem); letter-spacing: -0.06em; line-height: 0.95; }
.role { margin: 1rem 0 0; color: var(--muted); font-size: 1.15rem; }

.contact { display: grid; gap: 0.25rem; color: var(--muted); font-style: normal; text-align: right; }
.layout { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(13rem, 1fr); gap: clamp(2rem, 6vw, 5rem); padding-top: 2.75rem; }
section + section { margin-top: 3rem; }
h2 { margin: 0 0 1.25rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--rule); }
h3 { margin: 0; font-size: 1.12rem; line-height: 1.3; }
p { margin-block: 0 1rem; }
ul { padding-left: 1.2rem; }
li + li { margin-top: 0.5rem; }
.entry + .entry { margin-top: 2.25rem; }
.entry-heading { display: flex; justify-content: space-between; gap: 1.5rem; }
.organization, .date { color: var(--muted); }
.organization { margin: 0.2rem 0 0; }
.date { flex: none; margin: 0; font-size: 0.9rem; }
.entry ul { margin-bottom: 0; }
.compact { padding-bottom: 0; }
.tags, .plain-list { margin: 0; padding: 0; list-style: none; }
.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tags li { margin: 0; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--accent-soft); color: #174e45; font-size: 0.88rem; }
.plain-list li { margin: 0; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }

.playground {
  width: min(72rem, calc(100% - 2rem));
  margin: 0 auto 3rem;
  text-align: center;
  color: var(--muted);
}
.playground p { margin-bottom: 0.75rem; }
.gravity-button, .gravity-reset {
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.gravity-button:hover, .gravity-reset:hover { background: var(--accent-soft); }
.status { min-height: 1.65em; margin-top: 0.65rem; font-size: 0.9rem; }
.gravity-layer { position: fixed; inset: 0; z-index: 20; pointer-events: none; }
.gravity-active [data-gravity-source], .gravity-active .language-nav { opacity: 0; }
.gravity-reset { position: fixed; right: 1rem; bottom: 1rem; z-index: 21; background: var(--surface); }

@media (max-width: 700px) {
  .language-nav { margin-top: 0.75rem; padding-inline: 0.5rem; }
  .resume { width: 100%; margin: 0; padding: 2rem 1.25rem 3rem; box-shadow: none; }
  .hero { align-items: start; flex-direction: column; }
  .contact { text-align: left; }
  .layout { grid-template-columns: 1fr; }
  aside { padding-top: 1rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

@media (prefers-color-scheme: dark) {
  :root { --background: #111916; --surface: #17221e; --text: #eef5f1; --muted: #aebdb7; --accent: #76d5c1; --accent-soft: #24483f; --rule: #3b4b46; --shadow: none; }
  .tags li { color: #dff9f1; }
}

@media print {
  :root { color-scheme: light; --background: #fff; --surface: #fff; --text: #111; --muted: #444; --accent: #174e45; --accent-soft: #eee; --rule: #bbb; }
  @page { margin: 0.55in; }
  body { font-size: 10pt; line-height: 1.45; }
  .resume { width: 100%; margin: 0; padding: 0; box-shadow: none; }
  .skip-link, .language-nav, .playground, .gravity-layer, .gravity-reset { display: none !important; }
  .hero { padding-bottom: 1.5rem; }
  .layout { grid-template-columns: 2.3fr 1fr; gap: 2rem; padding-top: 1.5rem; }
  section + section { margin-top: 1.5rem; }
  .entry + .entry { margin-top: 1.25rem; }
  a { color: inherit; text-decoration: none; }
  section, article { break-inside: avoid; }
}
