/* ---------- Tokens ---------- */
:root {
  --bg:        #fbfbfa;
  --bg-raised: #ffffff;
  --ink:       #16181d;
  --ink-soft:  #4a4f5a;
  --ink-faint: #7b8290;
  --rule:      #e3e3e0;
  --accent:    #0f6d67;
  --accent-in: #ffffff;
  --tag-bg:    #f0f0ed;
  --focus:     #0f6d67;
  --maxw:      46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0d1117;
    --bg-raised: #141a22;
    --ink:       #e9ecf1;
    --ink-soft:  #a9b2c0;
    --ink-faint: #737d8c;
    --rule:      #232b36;
    --accent:    #4fd1c5;
    --accent-in: #08131a;
    --tag-bg:    #1a222c;
    --focus:     #4fd1c5;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-in);
  padding: .6rem 1rem;
  z-index: 100;
  text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
}

.site-header nav {
  display: flex;
  gap: 1.35rem;
  font-size: .875rem;
}

.site-header nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: .25rem 0;
  border-bottom: 1.5px solid transparent;
}
.site-header nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

@media (max-width: 34rem) {
  .site-header nav { gap: .95rem; font-size: .8125rem; }
  .brand { font-size: .9375rem; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 5.5rem 0 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.eyebrow {
  margin: 0 0 1rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .75rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.lede {
  margin: 0;
  max-width: 34rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
  margin-top: 2rem;
}

.btn {
  display: inline-block;
  padding: .55rem 1.15rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--ink);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .15s ease, transform .15s ease;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-in);
}
.btn-primary:hover { border-color: var(--accent); }

/* ---------- Sections ---------- */
section[id] { padding: 3.25rem 0; border-bottom: 1px solid var(--rule); }
section[id]:last-of-type { border-bottom: 0; }

section h2 {
  margin: 0 0 1.75rem;
  font-size: .8125rem;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- Entries ---------- */
.entry { margin-bottom: 2.5rem; }
.entry:last-child { margin-bottom: 0; }

.entry-head { margin-bottom: .75rem; }

.entry h3 {
  margin: 0 0 .2rem;
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}

.meta {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-soft);
}
.meta .org { font-weight: 500; color: var(--ink); }
.meta .sep { color: var(--ink-faint); margin: 0 .3rem; }

.when {
  margin: .15rem 0 0;
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8125rem;
  color: var(--ink-faint);
}

.bullets {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--ink-soft);
}
.bullets li { margin-bottom: .45rem; }
.bullets li::marker { color: var(--ink-faint); }

.note {
  margin: 0;
  font-size: .9375rem;
  color: var(--ink-soft);
}

/* ---------- Skills ---------- */
.skills { display: grid; gap: 1.85rem; }

.skill-group h3 {
  margin: 0 0 .7rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--ink);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: .3rem .7rem;
  background: var(--tag-bg);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: .8438rem;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* ---------- Contact ---------- */
.contact-line { margin: 0 0 .85rem; color: var(--ink-soft); max-width: 32rem; }

.contact-mail { margin: 0; font-size: 1.25rem; font-weight: 500; }
.contact-mail a {
  text-decoration: none;
  border-bottom: 1.5px solid color-mix(in srgb, var(--accent) 40%, transparent);
  padding-bottom: 1px;
}
.contact-mail a:hover { border-bottom-color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 2.75rem;
}
.site-footer p {
  margin: 0;
  font-size: .8438rem;
  color: var(--ink-faint);
}

@media print {
  .site-header, .actions, .skip { display: none; }
  body { font-size: 11pt; color: #000; background: #fff; }
  section[id] { padding: 1rem 0; border-bottom: 0; }
  .hero { padding: 0 0 1rem; border-bottom: 1px solid #ccc; }
}
