:root {
  color-scheme: light;
  --paper: #f7f7ef;
  --ink: #142b26;
  --muted: #465e55;
  --night: #102923;
  --deeper: #0b201c;
  --on-dark: #f5f7ec;
  --acid: #c6ed88;
  --edge: #c6cfc2;
  --rule-dark: #40574e;
  --mono: "IBM Plex Mono", Consolas, "Courier New", monospace;
  --display: "Segoe UI", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 1.5rem; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 1.03rem/1.65 var(--display); }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #bc7326; outline-offset: 4px; }
::selection { background: var(--acid); color: var(--deeper); }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { line-height: 1.12; font-weight: 580; letter-spacing: -.045em; }
.wrap { width: min(78rem, calc(100% - clamp(2.25rem, 9vw, 9rem))); margin-inline: auto; }
.skip { position: fixed; top: -10rem; left: 1rem; z-index: 10; padding: .75rem; background: white; }
.skip:focus { top: .5rem; }
header, .hero, .cv-cover { color: var(--on-dark); background-color: var(--night); }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding-block: 1.2rem; border-bottom: 1px solid var(--rule-dark); }
.brand { display: inline-flex; align-items: center; gap: .85rem; font-size: 1rem; font-weight: 620; text-decoration: none; }
.brand b { display: inline-grid; place-items: center; width: 2.65rem; height: 2.65rem; color: var(--night); background: var(--acid); font-size: 1.18rem; letter-spacing: -.1em; border-radius: 50% 50% 4px 50%; padding-right: .1em; }
nav, .social, .buttons { display: flex; flex-wrap: wrap; align-items: center; }
nav { gap: clamp(.9rem, 2.1vw, 2.15rem); }
nav a { color: #dee6dc; font-size: .93rem; text-decoration: none; padding-block: .45rem; }
nav a:hover, .hero a:not(.button):hover, .contact a:hover { color: var(--acid); text-decoration: underline; }
nav a:last-child { border: 1px solid #7c9285; border-radius: 2rem; padding: .4rem 1.2rem; }
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0 0 0 46%; z-index: -1; background-image: linear-gradient(#a1b79712 1px, transparent 1px), linear-gradient(90deg,#a1b79712 1px,transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(100deg, transparent 1%, black 65%); }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: clamp(2rem, 6vw, 7rem); padding-block: clamp(3rem, 5.5vw, 6rem); }
.discipline { display: flex; align-items: center; gap: .8rem; color: var(--acid); font: .9rem/1.55 var(--mono); }
.discipline::before { content: ""; width: 1.9rem; height: 2px; background: currentColor; flex: none; }
.hero h1 { font-size: clamp(4.8rem, 7.8vw, 8.6rem); line-height: .9; letter-spacing: -.081em; margin-block: 1.35rem 1.6rem; }
h1 em { font-family: var(--serif); font-weight: 400; letter-spacing: -.075em; color: var(--acid); }
.introduction { color: #d4dfd5; font-size: clamp(1.02rem, 1.25vw, 1.17rem); line-height: 1.68; max-width: 33rem; }
.buttons { gap: 1.55rem; margin-top: 1.6rem; }
.button, button { display: inline-flex; align-items: center; justify-content: center; border: 0; padding: .8rem 1.45rem; min-height: 46px; border-radius: 2.5rem; background: var(--acid); color: var(--deeper); font: 650 .98rem/1.3 var(--display); cursor: pointer; text-decoration: none; }
.button:hover, button:hover { background: #ddffa9; }
.cv-link { font-weight: 560; font-size: 1rem; }
.social { gap: 1.2rem; font: .86rem/1.6 var(--mono); }
.social a { text-decoration: none; }
.hero .social { color: #bfd1c4; margin-top: 1.7rem; }
.portrait { position: relative; width: min(100%, 27rem); justify-self: center; background: var(--deeper); border: 1px solid #657b69; padding: .65rem; box-shadow: .7rem .7rem 0 #152f27, .73rem .73rem 0 #526a55; }
.portrait::before, .portrait::after { content: ""; width: 1.3rem; height: 1.3rem; position: absolute; pointer-events: none; }
.portrait::before { left: -2px; top: -2px; border-top: 3px solid var(--acid); border-left: 3px solid var(--acid); }
.portrait::after { right: -2px; bottom: -2px; border-right: 3px solid var(--acid); border-bottom: 3px solid var(--acid); }
.portrait-mat { background: #bccbb9; }
.portrait img { display: block; width: 100%; height: auto; aspect-ratio: 1.07; object-fit: cover; object-position: center 40%; filter: grayscale(1) contrast(1.05); mix-blend-mode: multiply; }
.portrait figcaption { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .9rem .45rem .3rem; font: .85rem/1.5 var(--mono); color: #e1ebdc; }
.signal { color: var(--acid); width: min(34%, 110px); flex: none; height: 20px; }
.section { padding-block: clamp(2.8rem, 5vw, 5rem); border-top: 1px solid var(--edge); }
.section > h2, .contact h2, .cv .article > h2 { font: 400 clamp(2.7rem, 4.5vw, 4.75rem)/1.06 var(--serif); letter-spacing: -.065em; }
#experience, #education { display: grid; grid-template-columns: minmax(11rem,.67fr) minmax(0,1.5fr); gap: clamp(2rem, 5vw, 6rem); }
#experience { border-top: 0; }
.timeline { padding-left: 1.15rem; }
.row { position: relative; padding: 0 0 2rem 1.95rem; border-left: 1px solid #a7b8a9; }
.row:last-child { border-left-color: transparent; padding-bottom: 0; }
.row::before { content: ""; position: absolute; left: -.31rem; top: .43rem; width: .55rem; height: .55rem; background: var(--ink); border-radius: 50%; outline: 4px solid var(--paper); }
.row aside { margin-bottom: .8rem; }
.row aside p:first-child { font: .88rem/1.5 var(--mono); color: var(--muted); margin-bottom: .35rem; }
.row aside p:nth-child(2) { font-size: clamp(1.4rem, 2.4vw, 2.05rem); letter-spacing: -.042em; font-weight: 580; line-height: 1.22; }
.row aside p:nth-child(3) { margin-top: .3rem; color: var(--muted); font-family: var(--mono); font-size: .91rem; }
.row > div { color: var(--muted); max-width: 70ch; }
.row > div p:first-child a { color: #29583b; font-weight: 600; }
.row > div > p + p, .row ul { margin-top: .5rem; }
.row ul, .expert ul, .article ol { padding-left: 1.25rem; }
.row li + li, .expert li + li, .article li + li { margin-top: .3rem; }
#skills { display: grid; grid-template-columns: minmax(11rem,.67fr) minmax(0,1.5fr); gap: clamp(2rem, 5vw, 6rem); }
.skills { align-self: center; display: flex; flex-wrap: wrap; list-style: none; padding: 0; gap: .65rem; }
.skills li { display: inline-flex; align-items: center; gap: .6rem; padding: .46rem .85rem; border: 1px solid #adbfa9; border-radius: .27rem; background: #eaf0e0; font: .92rem/1.5 var(--mono); }
.skills li::before { content: ""; width: .3rem; height: .3rem; background: #4e6946; }
.expert-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 1rem; margin-top: 2.1rem; }
.expert { background: #e9efe1; border-top: 3px solid #7c9a67; padding: clamp(1.25rem,2vw,2rem); }
.expert:first-child { background: var(--night); border-color: var(--acid); color: var(--on-dark); }
.expert h3 { font-size: 1.55rem; margin-bottom: 1.1rem; }
.contact { background: var(--deeper); color: var(--on-dark); padding-block: clamp(3rem,5vw,5.5rem); }
.contact .wrap { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem,7vw,8rem); }
.contact h2 { color: var(--acid); margin-bottom: 1.9rem; }
.contact h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.contact p, .contact small { color: #c1d1c4; }
.contact h4 { margin-top: 1.2rem; }
.contact .social { margin-top: 1.4rem; }
.contact form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact label { min-width: 0; font-size: .95rem; color: #e1eadd; }
.contact label:nth-of-type(n+3), .contact small { grid-column: 1/-1; }
.contact form button { justify-self: start; }
.contact input, .contact textarea { display: block; width: 100%; margin-top: .35rem; padding: .6rem .75rem; color: white; background: #18342c; border: 1px solid #566e61; border-radius: .25rem; font: inherit; }
.contact textarea { resize: vertical; }
.footer { padding-block: 1.35rem; font: .85rem/1.5 var(--mono); color: var(--muted); }
.cv-cover { padding-block: clamp(3rem,5vw,5.5rem); }
.cv-cover h1 { margin-block: 1rem; font-size: clamp(3.5rem,7.5vw,7rem); line-height: 1; letter-spacing: -.075em; }
.cv-cover p:last-child { color: #d4dfd5; font-size: 1.15rem; }
.cv .article { max-width: 58rem; margin: 0 auto; padding-block: 1rem 4rem; }
.cv .article > h2 { font-size: clamp(2rem,4vw,3rem); border-top: 1px solid var(--edge); margin: 2.5rem 0 1.4rem; padding-top: 1.5rem; }
.cv .article > h2:first-child { border: 0; margin-top: 1rem; }
.article h3 { margin: 1.65rem 0 .8rem; font-size: 1.3rem; }
.table-scroll { max-width: 100%; overflow: auto; }
.article table { width: 100%; border-collapse: collapse; }
.article th, .article td { text-align: left; vertical-align: top; padding: .8rem; border-bottom: 1px solid var(--edge); }
.article th { background: var(--night); color: var(--on-dark); font-weight: 550; }
.article tr:nth-child(even) td { background: #eaf0e2; }
@media (max-width: 900px) {
  header .wrap { gap: .6rem 1.5rem; flex-wrap: wrap; }
  .hero-layout { gap: 2rem; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); }
  .hero h1 { font-size: clamp(4.2rem,8.4vw,6rem); }
  .expert-grid { grid-template-columns: 1fr 1fr; }
  .expert:first-child { grid-column: 1/-1; }
}
@media (max-width: 700px) {
  header .wrap { padding-block: .9rem; gap: .55rem; }
  nav { width: 100%; gap: .1rem 1.05rem; }
  nav a { padding-block: .5rem; font-size: .9rem; }
  nav a:last-child { border: 0; padding: .5rem 0; }
  .hero-layout { grid-template-columns: 1fr; gap: 2.2rem; }
  .hero h1 { font-size: clamp(4.15rem,14vw,6.5rem); }
  .portrait { width: min(100% - .7rem, 23rem); justify-self: start; }
  .hero::before { inset-inline-start: 0; mask-image: linear-gradient(transparent 38%,black); }
  #experience, #education, #skills, .expert-grid, .contact .wrap { grid-template-columns: 1fr; }
  .timeline { padding-left: .35rem; }
  .row { padding-left: 1.3rem; }
  .expert-grid { margin-top: 1.5rem; }
  .contact small { max-width: 38ch; }
}
@media (max-width: 420px) {
  .contact form { grid-template-columns: 1fr; }
  .buttons { gap: 1rem; }
  .article th, .article td { padding: .55rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  header, .buttons, .social, .contact form, .skip { display: none; }
  body, .cv-cover, .hero, .contact { color: #111; background: white; }
  .wrap { width: 100%; }
  .cv-cover { padding-block: 1rem; }
  .cv-cover p, .cv-cover p:last-child, h1 em { color: #222; }
  .table-scroll { overflow: visible; }
  .row, tr, .expert { break-inside: avoid; }
}
