:root {
  --bg: #FFFFFF;
  --soft: #F3F5F4;
  --ink: #15171A;
  --mute: #5A6068;
  --accent: #1B5E3F;
  --line: #E3E5E8;

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1120px;
  --measure: 65ch;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 400 17px/1.55 var(--body);
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 4px; z-index: 100; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }

h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(36px, 4.6vw, 58px); line-height: 1.08; font-weight: 400; letter-spacing: -.02em; }
h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.12; }
h3 { font-size: 22px; line-height: 1.25; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
p { margin: 0; }

.eyebrow { font: 600 12px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.mute { color: var(--mute); }

/* ---------- nav ---------- */
.nav { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 10; }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.name { font: 500 20px/1 var(--display); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-weight: 500; font-size: 16px; }
.nav-links a { color: var(--mute); text-decoration: none; }
.nav-links a:hover { color: var(--ink); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; font: 600 14px var(--body); color: var(--ink); cursor: pointer; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 6px;
  font: 600 15px/1 var(--body); text-decoration: none;
  border: 1px solid var(--ink); color: var(--ink); background: transparent;
}
.btn:hover { background: var(--soft); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- hero ---------- */
.hero { padding-block: clamp(40px, 7vw, 80px) clamp(24px, 4vw, 40px); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .sub { color: var(--mute); font-size: 19px; max-width: 54ch; margin-bottom: 28px; }
.photo { aspect-ratio: 4 / 5; width: 100%; max-width: 300px; justify-self: end; border-radius: 8px; overflow: hidden; background: var(--soft); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.92); }

.proof { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: 22px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 500 36px/1 var(--display); letter-spacing: -.02em; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.stat span { color: var(--mute); font-size: 15px; }

/* ---------- sections ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head { margin-bottom: 32px; max-width: 60ch; }
.section-head p { color: var(--mute); margin-top: 12px; font-size: 18px; }

/* ---------- work cards ---------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 26px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); text-decoration: none; }
.card:hover { border-color: var(--ink); text-decoration: none; }
.card h3 { color: var(--ink); }
.card:hover h3 { color: var(--accent); }
.card .more { color: var(--accent); }
.card:hover .more { text-decoration: underline; }
.card .meta { font: 600 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.card h3 { font-size: 24px; }
.card .outcome { color: var(--ink); font-size: 17px; }
.card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.card .tags span { font: 500 13px/1 var(--body); color: var(--mute); background: var(--soft); padding: 6px 10px; border-radius: 4px; }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 600; }

/* ---------- how ---------- */
.how-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.how-grid h3 { margin-bottom: 8px; }
.how-grid p { color: var(--mute); max-width: 48ch; }

/* ---------- stack ---------- */
.stack-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stack-grid h3 { font-size: 18px; margin-bottom: 10px; }
.stack-grid ul { list-style: none; margin: 0; padding: 0; color: var(--mute); line-height: 1.7; }
.certs { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mute); }
.certs b { color: var(--ink); font-weight: 600; }

/* ---------- elioo ---------- */
.elioo-card { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 26px 28px; background: var(--soft); border-radius: 10px; }
.elioo-mark { width: 56px; height: 56px; border-radius: 14px; background: #050B1E; display: grid; place-items: center; }
.elioo-mark i { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #9FE3FF 45%, #A08CFF); margin: 0 2px; box-shadow: 0 0 8px #9FE3FF; }
.elioo-card p { color: var(--mute); max-width: 60ch; }
.elioo-card p b { color: var(--ink); font-weight: 600; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding-block: 16px; border-top: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 1px solid var(--line); }
.timeline .when { color: var(--mute); font-variant-numeric: tabular-nums; }
.timeline .what b { font-weight: 600; }
.timeline .what span { color: var(--mute); }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: start; }
.contact .links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font-weight: 600; }
.contact .note { color: var(--mute); padding: 20px 22px; background: var(--soft); border-radius: 10px; }
.contact .note b { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */
.footer { padding-block: 24px; color: var(--mute); font-size: 15px; }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- case study ---------- */
.cs-head { padding-block: clamp(32px, 5vw, 56px) clamp(24px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.back { display: inline-block; margin-bottom: 24px; font-weight: 600; text-decoration: none; color: var(--mute); }
.back:hover { color: var(--ink); }
.cs-head h1 { font-size: clamp(32px, 4vw, 50px); margin-bottom: 16px; }
.cs-head .lede { font-size: 20px; color: var(--mute); max-width: 60ch; }
.cs-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 20px; color: var(--mute); font-size: 15px; }
.cs-meta b { color: var(--ink); font-weight: 600; }
.cs-body { padding-block: clamp(32px, 5vw, 56px); }
.prose { max-width: 820px; }
.prose p, .prose ul:not(.outcome-list), .prose h2 { max-width: var(--measure); }
.prose h2 { font-size: 26px; margin: 40px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li b { font-weight: 600; }
.diagram { margin: 16px 0 24px; padding: 20px; background: var(--soft); border-radius: 10px; overflow-x: auto; }
.diagram svg { display: block; width: 100%; min-width: 560px; height: auto; }
.outcome-list { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.outcome-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; }
.outcome-list b { display: block; font: 500 26px/1.1 var(--display); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.outcome-list span { color: var(--mute); font-size: 15px; }
.cs-foot { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- résumé ---------- */
.resume { max-width: 780px; margin: 0 auto; padding: clamp(24px, 5vw, 56px) var(--gutter) 64px; }
.resume h1 { font-size: 30px; margin-bottom: 6px; }
.resume .contact-line { color: var(--mute); font-size: 15px; margin-bottom: 22px; }
.resume h2 { font-size: 15px; font-family: var(--body); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 22px 0 8px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.resume h3 { font-family: var(--body); font-weight: 700; font-size: 16px; margin: 12px 0 2px; }
.resume h4 { font-family: var(--body); font-weight: 600; font-size: 15px; margin: 10px 0 2px; }
.resume .role-meta { color: var(--mute); font-size: 14px; margin-bottom: 4px; }
.resume p { font-size: 15px; margin-bottom: 8px; }
.resume ul { margin: 0 0 6px; padding-left: 18px; font-size: 15px; }
.resume li { margin-bottom: 3px; }
.resume-actions { display: flex; gap: 12px; margin-bottom: 24px; }

@media print {
  @page { size: A4; margin: 14mm 16mm; }
  body { font-size: 10.5pt; }
  .resume { max-width: none; padding: 0; }
  .resume-actions, .nav, .footer { display: none !important; }
  .resume h1 { font-size: 22pt; }
  .resume h2 { font-size: 10pt; margin-top: 12pt; }
  .resume h3 { font-size: 11pt; }
  .resume h4 { font-size: 10.5pt; }
  .resume p, .resume ul, .resume .role-meta, .resume .contact-line { font-size: 10pt; }
  .resume li { margin-bottom: 1.5pt; }
  a { color: var(--ink); text-decoration: none; }
  h3, h4 { break-after: avoid; }
  li { break-inside: avoid; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .stack-grid { grid-template-columns: 1fr 1fr; }
  .proof { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav-links.open { display: flex; }
  .nav-links li { padding-block: 10px; }
  .menu-btn { display: inline-block; }
  .hero-grid, .cards, .how-grid, .contact-grid { grid-template-columns: 1fr; }
  .photo { justify-self: start; max-width: 220px; order: -1; }
  .elioo-card { grid-template-columns: auto 1fr; }
  .elioo-card .btn { grid-column: 1 / -1; justify-self: start; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
  .outcome-list { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .stack-grid { grid-template-columns: 1fr; }
  .proof { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}
