:root {
  color-scheme: dark;
  --bg: #0d1414;
  --panel: #131e1c;
  --fg: #edf0e8;
  --body: #c6d0c8;
  --muted: #a7b5ab;
  --line: #34433c;
  --lime: #c9ef2a;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --anchor-offset: 6rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--anchor-offset); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 1rem/1.62 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
::selection { background: var(--lime); color: var(--bg); }
img { display: block; max-width: 100%; height: auto; }
p, figure, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--lime); }
a, button { -webkit-tap-highlight-color: transparent; }
.wrap { width: min(100%, 76rem); padding-inline: var(--gutter); margin-inline: auto; }
.meta {
  color: var(--muted);
  font: 400 .76rem/1.5 var(--mono);
  letter-spacing: .035em;
}
.link-arrow { font-size: .9em; color: var(--lime); }
.skip {
  position: fixed;
  top: .75rem;
  left: var(--gutter);
  z-index: 20;
  padding: .55rem .8rem;
  transform: translateY(calc(-100% - 1rem));
  background: var(--lime);
  color: var(--bg);
  font-weight: 700;
}
.skip:focus { transform: none; color: var(--bg); outline-offset: 2px; }

.site-header { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { min-height: 4.25rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1.5rem; }
.wordmark, .header-back, .site-header nav a { text-decoration: none; }
.wordmark { justify-self: start; display: inline-flex; align-items: center; min-height: 2.75rem; font-size: 1.25rem; font-weight: 700; letter-spacing: -.055em; }
.wordmark span { color: var(--lime); }
.site-header nav { display: flex; gap: clamp(.8rem, 2.6vw, 2.05rem); }
.site-header nav a { min-height: 2.75rem; display: inline-flex; align-items: center; color: var(--body); font-size: .87rem; font-weight: 600; }
.site-header nav a:hover { color: var(--lime); }
.site-header nav a[aria-current="location"] {
  color: var(--lime);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .35em;
}
.print-button, .header-back {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .48rem .82rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  font: 600 .84rem/1.3 var(--font);
  cursor: pointer;
}
.print-button:hover, .header-back:hover { border-color: var(--lime); color: var(--lime); }

.hero { background: radial-gradient(ellipse at 87% 46%, #223022 0%, var(--bg) 61%); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2.3rem, 6vw, 5.75rem);
  padding-block: clamp(3rem, 6.1vw, 5.5rem) clamp(2.75rem, 5.4vw, 4.75rem);
}
.hero-location { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.15rem; }
.hero-location::before { content: ""; width: .4rem; height: .4rem; background: var(--lime); border-radius: 50%; }
.hero h1 {
  font: 400 clamp(3.55rem, 7.15vw, 6.25rem)/.9 var(--serif);
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
.hero h1 span { display: block; }
.hero-role { margin-top: 1.6rem; color: var(--body); font-size: clamp(1rem, 1.8vw, 1.24rem); line-height: 1.45; }
.hero-role strong { color: var(--fg); font-weight: 700; }
.hero-bio { max-width: 36rem; margin-top: .85rem; color: var(--body); font-size: clamp(1rem, 1.5vw, 1.11rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem 1.5rem; margin-top: 1.65rem; }
.primary-link, .section-link {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 2.85rem;
  color: var(--fg);
  font-weight: 700;
  font-size: .91rem;
  text-decoration: none;
}
.primary-link { padding: .68rem .95rem; background: var(--lime); color: var(--bg); border-radius: 4px; }
.primary-link:hover { color: var(--bg); background: #e1fb68; }
.section-link:hover { text-decoration: underline; }
.profile-links { display: flex; flex-wrap: wrap; gap: .15rem 1.15rem; margin-top: 1rem; padding: 0; list-style: none; }
.profile-links a { color: var(--body); font-size: .89rem; display: inline-flex; align-items: center; gap: .28rem; min-height: 2rem; }
.profile-links a:hover { color: var(--lime); }
.profile-icon { inline-size: 1.05em; block-size: 1.05em; flex: none; }
.print-address { display: none; }
.portrait {
  position: relative;
  justify-self: end;
  width: min(100%, 21.875rem);
  padding: .5rem;
  border: 1px solid #56664d;
  border-radius: 5px;
  background: #17201a;
}
.portrait::after { content: ""; position: absolute; right: -.5rem; bottom: 1.2rem; height: 3rem; width: 2px; background: var(--lime); }
.portrait img { width: 100%; }

.highlights { background: #101b18; border-block: 1px solid var(--line); }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0; list-style: none; }
.metrics li + li { border-left: 1px solid var(--line); }
.metrics a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  height: 100%;
  padding: 1.3rem 2.5rem 1.45rem 1.25rem;
  text-decoration: none;
}
.metrics a:hover, .metrics a:focus-visible { background: #1a281f; }
.metrics strong { color: var(--lime); font: 400 clamp(1.8rem, 3.3vw, 2.9rem)/1 var(--serif); }
.metric-caption { color: var(--body); font-size: .86rem; }
.metric-arrow { position: absolute; top: 1.25rem; right: 1rem; color: var(--muted); }

.section { padding-block: clamp(3.6rem, 6vw, 5.25rem); }
.section + .section { padding-top: 0; }
.section-head { margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.section-head h2, .prose h1 { font: 400 clamp(2.7rem, 5vw, 4rem)/1 var(--serif); letter-spacing: -.015em; }
.timeline { padding: 0; list-style: none; }
.timeline-entry { display: grid; grid-template-columns: minmax(8.75rem, 1fr) 4fr; gap: 1.65rem; align-items: start; padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.timeline-entry .period { padding-top: .17rem; }
.timeline-entry.current .period { color: var(--lime); }
.timeline-copy { max-width: 49rem; }
.timeline-copy h3, .skill-grid h3, .update h3 { font-size: 1.19rem; font-weight: 700; }
.timeline-copy p, .skill-grid p, .credentials dd, .update p { color: var(--body); }
.timeline-copy h3 + p { margin-top: .17rem; }
.timeline-copy .role { font-weight: 600; color: var(--muted); }
.timeline-copy .role + p, .skill-grid h3 + p, .update h3 + p { margin-top: .35rem; }
.timeline-deliveries { margin-top: .55rem; padding-inline-start: 1.2rem; color: var(--body); }
.timeline-deliveries li + li { margin-top: .33rem; }
.timeline-deliveries li::marker { color: var(--lime); }
.timeline-photos { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: .95rem; }
.timeline-photo { flex: 1 1 14rem; min-width: 0; max-width: 23rem; }
.timeline-photo img { width: 100%; border: 1px solid var(--line); border-radius: 4px; }
.timeline-photo figcaption { margin-top: .35rem; color: var(--muted); font-size: .84rem; }
.context-link { display: inline-block; margin-top: .36rem; font-size: .85rem; font-weight: 600; color: var(--lime); text-underline-offset: .21em; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; }
.project:target { border-color: var(--lime); }
.project-with-image { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .96fr); align-items: center; }
.project-copy { padding: clamp(1.35rem, 2.7vw, 2.25rem); }
.project h3 { margin: .3rem 0 .75rem; font: 400 clamp(2rem, 3.6vw, 2.9rem)/.99 var(--serif); letter-spacing: -.01em; }
.project-problem, .project dd { color: var(--body); }
.project dl { margin-top: 1.1rem; display: grid; gap: .56rem; }
.project dl > div { display: grid; grid-template-columns: 8.6rem minmax(0, 1fr); gap: .3rem .6rem; border-top: 1px solid var(--line); padding-top: .6rem; }
.project dt { color: var(--fg); font-size: .83rem; font-weight: 700; line-height: 1.48; }
.project dd { font-size: .94rem; line-height: 1.48; }
.project .result dt { color: var(--lime); }
.project-link { margin-top: 1rem; font-size: .9rem; font-weight: 700; }
.project-image { margin: 1rem 1rem 1rem 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--bg); }
.project-image img { width: 100%; }

.skill-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
.skill-grid li { padding: .8rem 0 1.15rem; border-bottom: 1px solid var(--line); }
.credentials { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 2rem; margin-top: 2rem; padding: 1.35rem 1.5rem; border: 1px solid var(--line); border-radius: 4px; }
.credentials h3 { margin-bottom: .75rem; font: 400 1.95rem/1 var(--serif); }
.credentials dt { font-weight: 700; }
.credentials dl > div + div { margin-top: .55rem; }
.course-list { padding-inline-start: 1.15rem; }
.course-list li::marker { color: var(--lime); }

.update-list { padding: 0; list-style: none; }
.update { display: grid; grid-template-columns: minmax(8.75rem, 1fr) 4fr; gap: 1.65rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.update .update-date { color: var(--muted); padding-top: .13rem; }
.update-history { margin-top: 1rem; }
.update-history summary { width: fit-content; cursor: pointer; color: var(--lime); font-weight: 600; }

.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem 1.5rem; flex-wrap: wrap; padding-block: 1.7rem; }
.footer-row strong { display: block; }
.footer-row p, .footer-row nav { font-size: .86rem; color: var(--muted); }
.footer-row nav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem 1.1rem; }
.footer-row nav a { display: inline-flex; align-items: center; gap: .22rem; min-height: 2rem; }

.prose { min-height: 55vh; padding-block: clamp(3.25rem, 7vw, 5.85rem); }
.prose h1 { max-width: 15ch; }
.prose h2 { margin-top: 2rem; font-size: 1.4rem; }
.prose p { max-width: 45rem; margin-top: .85rem; color: var(--body); }
.prose .primary-link { margin-top: 1.4rem; }

@media (max-width: 49rem) {
  :root { --anchor-offset: 7.4rem; }
  .header-row { grid-template-columns: 1fr auto; gap: 0 .6rem; padding-top: .32rem; }
  .site-header nav { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: .1rem .6rem; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: .25rem; }
  .site-header nav a { font-size: .79rem; min-height: 2.5rem; }
  .print-button, .header-back { grid-column: 2; grid-row: 1; min-height: 2.4rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, .6fr); gap: 1.55rem; }
  .hero { background: radial-gradient(ellipse at 76% 80%, #223022, var(--bg) 65%); }
  .hero h1 { font-size: clamp(3.1rem, 8vw, 4.85rem); }
  .portrait { width: min(100%, 16rem); }
  .metrics a { padding-inline: .65rem 1.2rem; }
  .metric-arrow { right: .35rem; font-size: .78rem; }
  .project-grid, .project-with-image { grid-template-columns: minmax(0, 1fr); }
  .project-image { margin: 0 1rem 1rem; }
}

@media (max-width: 34rem) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) clamp(3.2rem, 18vw, 4.85rem); gap: .7rem .75rem; align-items: start; padding-block: 2rem 1.65rem; }
  .hero-copy { display: contents; }
  .hero-location { grid-area: 1 / 1; margin: 0; }
  .hero h1 { grid-area: 2 / 1; font-size: clamp(2.25rem, 11vw, 3.2rem); }
  .hero-role, .hero-bio, .hero-actions, .profile-links { grid-column: 1 / -1; margin-top: 0; }
  .hero-role { margin-top: .22rem; }
  .hero-actions { margin-top: .42rem; }
  .portrait { grid-area: 1 / 2 / 3 / 3; align-self: center; padding: .21rem; }
  .portrait::after { right: -.25rem; bottom: .35rem; height: 1.2rem; }
  .metrics { grid-template-columns: 1fr; }
  .metrics li + li { border-left: 0; border-top: 1px solid var(--line); }
  .metrics a { display: grid; grid-template-columns: minmax(5rem, 1.15fr) minmax(0, 1fr); align-items: center; gap: .65rem; padding: .9rem 1.1rem .9rem 0; }
  .metrics strong { font-size: clamp(1.55rem, 7vw, 2.1rem); }
  .metric-arrow { right: 0; top: .82rem; }
  .timeline-entry, .update { grid-template-columns: 1fr; gap: .25rem; }
  .timeline-entry .period, .update .update-date { padding: 0; }
  .timeline-copy h3 { font-size: 1.1rem; }
  .project dl > div { grid-template-columns: minmax(0, 1fr); gap: .12rem; }
  .skill-grid, .credentials { grid-template-columns: minmax(0, 1fr); gap: .65rem; }
  .credentials { padding: 1rem; }
  .credentials > div + div { border-top: 1px solid var(--line); padding-top: .8rem; }
}

@media (max-width: 21.25rem) {
  :root { --anchor-offset: 9.25rem; }
  .site-header nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .75rem; }
  .site-header nav a { font-size: .73rem; }
}

@media screen and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero { position: relative; isolation: isolate; overflow: clip; background: var(--bg); }
  .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse closest-side, #34462d, #273922 30%, #1b2b20a6 62%, transparent);
    transform: translate3d(var(--hero-glow-x, min(34%, 25rem)), var(--hero-glow-y, -4%), 0) scale(var(--hero-glow-spread, 1));
    transition: transform .46s cubic-bezier(.19, .72, .28, 1);
  }
}

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

@page { size: A4; margin: 12mm 14mm; }
@media print {
  :root { color-scheme: light; --bg: #fff; --fg: #111; --body: #1e1e1e; --muted: #3b3b3b; --line: #bcbcbc; --lime: #1c1c1c; --panel: #fff; }
  body { min-height: 0; font: 10.5pt/1.31 var(--font); background: #fff; color: #111; }
  .wrap { width: 100%; padding-inline: 0; }
  .site-header, .skip, .portrait, .hero-actions, .highlights, .timeline-photos, .project-image, .project-problem, .context-link, .link-arrow, .updates, .site-footer { display: none; }
  .hero { background: none; }
  .hero-grid { display: block; padding-block: 0 2mm; }
  .hero-copy { display: block; }
  .hero-location { margin-bottom: 1mm; }
  .hero-location::before { display: none; }
  .hero h1 { max-width: none; font: 600 25pt/1.08 var(--font); letter-spacing: -.025em; }
  .hero h1 span { display: inline; }
  .hero-role { margin-top: 1.5mm; font-size: 11pt; }
  .hero-bio { max-width: none; margin-top: 1.5mm; font-size: 10.5pt; }
  .profile-links { display: inline-flex; gap: 0 3mm; margin-top: 1mm; }
  .profile-links a, .print-address { min-height: 0; font-size: 8.5pt; }
  .print-address { display: inline-block; margin-left: 3mm; }
  .section { padding-block: 3.2mm 2.6mm; }
  .section + .section { padding-top: 2.5mm; }
  .section-head { margin-bottom: 1mm; padding-bottom: 1.1mm; break-after: avoid; }
  .section-head h2 { font: 700 14pt/1.1 var(--font); }
  .meta { font: 8.6pt/1.3 var(--font); letter-spacing: 0; }
  .timeline-entry { grid-template-columns: 34mm 1fr; gap: 2mm; padding-block: .75mm; }
  .timeline-copy { max-width: none; }
  .timeline-copy h3, .skill-grid h3 { font-size: 11pt; }
  .timeline-copy h3 + p, .timeline-copy .role + p, .skill-grid h3 + p { margin-top: .45mm; }
  .timeline-deliveries { margin-top: .9mm; padding-inline-start: 4mm; }
  .timeline-deliveries li + li { margin-top: .5mm; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7mm 5mm; }
  .project-with-image { display: block; }
  .project { border-radius: 0; border: 0; border-bottom: 1px solid var(--line); }
  .project-copy { padding: 1.25mm 0; font-size: 10pt; line-height: 1.27; }
  .project h3 { font: 700 11pt/1.2 var(--font); margin: .6mm 0 .75mm; }
  .project dl { gap: .35mm; margin-top: .55mm; }
  .project dl > div { display: block; border: 0; padding-top: 0; }
  .project dt, .project dd { display: inline; }
  .project dd { margin-inline-start: .45em; }
  .project-link { margin-top: 1mm; font-size: 8.8pt; }
  .skill-grid { grid-template-columns: 1fr 1fr; gap: 0 4mm; }
  .skill-grid li { padding: 1mm 0 1.5mm; }
  .credentials { grid-template-columns: 1.25fr 1fr; gap: 4mm; margin-top: 2mm; padding: 2mm 0 0; border: 0; }
  .credentials h3 { margin-bottom: 1mm; font: 700 11pt/1.2 var(--font); }
  .credentials dl > div + div { margin-top: .8mm; }
  .timeline-entry, .project, .skill-grid li, .credentials, .hero-grid { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  a { color: inherit; }
}
