*,*::before,*::after{box-sizing:border-box}
html:focus-within{scroll-beavior:smooth}
body{margin:0;min-height:100dvh;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased}
img,svg{max-width:100%;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit}
:root{
  --bg:#ffffff;
  --fg:#111827; /* near-black */
  --muted:#475569; /* slate-600 */
  --faint:#6b7280; /* text tertiary */
  --accent:#0b6cc8; /* subtle, professional blue */
  --border:#e5e7eb; /* gray-200 */
  --rule:#f3f4f6;   /* gray-100 */
  --card:#ffffff;
  --shadow: 0 1px 2px rgba(0,0,0,.05);
  --radius:14px;
  --maxw:900px;
  --mono: ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  --sans: system-ui,-apple-system,Segoe UI,Roboto,Inter,"Helvetica Neue",Arial,"Noto Sans";

  --chip-embedded-light-hsv:  28 95% 90%;
  --chip-embedded-dark-hsv:   28 95% 35%;

  --chip-sysop-light-hsv:     95 85% 88%;
  --chip-sysop-dark-hsv:      95 85% 32%;

  --chip-dev-light-hsv:      315 90% 90%;
  --chip-dev-dark-hsv:       315 90% 35%;

  --chip-os-light-hsv:       170 80% 88%;
  --chip-os-dark-hsv:        170 80% 33%;

  --chip-cyber-light-hsv:     50 95% 90%;
  --chip-cyber-dark-hsv:      50 95% 32%;
}

body{font-family:var(--sans);background:var(--bg);color:var(--fg);line-height:1.6;letter-spacing:.1px}
h1,h2,h3{line-height:1.25;margin:0}
h1{font-size:clamp(2rem,5.2vw,2.6rem);font-weight:750;letter-spacing:.2px}
h2{font-size:clamp(1.05rem,2.8vw,1.2rem);font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:#111;border-bottom:1px solid var(--border);padding-bottom:.55rem;margin-bottom:.8rem}
h3{font-size:1.02rem;font-weight:600}
p,li{font-size:clamp(.97rem,2.6vw,1.02rem)}
small{color:var(--faint)}
strong{font-weight:bolder;}
a{color: var(--accent); font-weight: bold;}
.wrap{max-width:var(--maxw);padding:24px;margin-inline:auto}
header.resume{display:grid;gap:12px}
.card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}

.topline{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;justify-content:space-between}
.name-role{min-width:240px}
.name-role h1{margin-bottom:6px}
.subtitle{font-size:1.05rem;color:#222;font-weight:600}
.tagline{color:var(--muted)}

.contact{display:flex;gap:10px;flex-wrap:wrap}
.contact a{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid var(--border);border-radius:999px;background:#fff}
.contact a:hover{border-color:#d1d5db}

.infos{display:flex;gap:10px;flex-wrap:wrap}
.infos a{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;}

nav.sections{position:sticky;top:0;background:var(--bg);padding:10px 0;margin:8px 0 12px;border-bottom:1px solid var(--rule);z-index:10}
.nav-row{display:flex;gap:10px;overflow:auto}
.nav-row a{white-space:nowrap;padding:6px 10px;border-radius:999px;border:1px solid var(--border)}
.nav-row a:hover{border-color:#d1d5db}

main{display:grid;gap:14px}
section{scroll-margin-top:14px}

.exp-item{display:grid;gap:6px;padding:14px;border:1px solid var(--border);border-radius:12px;background:#fff}
.exp-item + .exp-item{margin-top:10px}
.exp-title{font-weight:650; background: #dddddd;border-radius:12px; padding-left: 12px;}
.exp-meta{display:flex;flex-wrap:wrap;gap:10px;color:var(--faint);font-family:var(--mono);font-size:.95rem; line-height: 1rem;}
.exp-meta span{display:inline-flex;align-items:center;gap:4px; margin: 0;}
.exp-item ul{margin:.2rem 0 0 1rem}

.chips{display:flex;flex-wrap:wrap;gap:8px; line-height: 1rem; vertical-align: middle;}
.chip{border:1px solid var(--border);background:#fafafa;padding:6px 10px;border-radius:999px;font-size:.92rem;font-family:var(--mono);  color: rgba(0,0,0,0.9);}
.chip[data-type="embedded"] { background: hsl(var(--chip-embedded-light-hsv)); border-color: hsl(var(--chip-embedded-dark-hsv)); }
.chip[data-type="sysop"]    { background: hsl(var(--chip-sysop-light-hsv));    border-color: hsl(var(--chip-sysop-dark-hsv)); }
.chip[data-type="dev"]      { background: hsl(var(--chip-dev-light-hsv));      border-color: hsl(var(--chip-dev-dark-hsv)); }
.chip[data-type="os"]       { background: hsl(var(--chip-os-light-hsv));       border-color: hsl(var(--chip-os-dark-hsv)); }
.chip[data-type="cyber"]    { background: hsl(var(--chip-cyber-light-hsv));    border-color: hsl(var(--chip-cyber-dark-hsv)); }

ul.link li {color: var(--accent);}
ul.link li::marker {content: "🔗  ";font-size: 0.95em;}

.projectBlock{border-left: 3px solid var(--accent);padding-left: 5px;}
ul#interestsList {list-style: none;margin: 0;padding: 0;display: flex;flex-wrap: wrap; gap: 1rem;}
ul#interestsList li {flex: 0 0 auto;background: var(--accent);font-weight:bold;color: #fff;padding: 0.5rem 1rem;border-radius: 6px;}
@media (min-width: 900px){
  main{grid-template-columns: 1fr 1fr}
  .col-span-2{grid-column: span 2}
}

footer{margin:18px 0;color:var(--faint);display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}

.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@page{ size:A4; margin:14mm 16mm; }
@media print{
  nav.sections,.actions,.contact a svg{display:none!important}
  .wrap{max-width:100%;padding:0}
  body{background:#fff;color:#000;-webkit-print-color-adjust:exact;print-color-adjust:exact}

  .card{box-shadow:none;border:0;border-top:0}
  header.resume.card{border:0;border-bottom:thin solid #000;border-radius:0}
  section.card{border:0;border-top:thin solid #000;border-radius:0;
    page-break-inside: avoid; break-inside: avoid;}
  .exp-item{border:thin solid #000;border-radius:0}
  .chip{border:thin solid #000;background:#fff}

  h1{font-size:22pt}
  h2{font-size:11pt; border-bottom:thin solid #000; padding-bottom:6pt; margin-bottom:8pt}
  p,li,small{font-size:10.5pt}

  header.resume{break-after:avoid}
  h2{break-after:avoid}
  .exp-item{break-inside:avoid}
  ul,ol{break-inside:avoid}

  p{hyphens:auto}
  p,li{orphans:2; widows:2}

  a[href^="http"]::after{content:" (" attr(href) ")";font-size:9pt}
}
