@font-face { font-family: "Manrope"; src: url("../fonts/manrope-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/manrope-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --accent: #0F766E;
  --accent-dark: #0B5D57;
  --accent-tint: #E8F3F2;
  --ink: #1E2733;
  --body: #333D4A;
  --muted: #5B6572;
  --rule: #E3E6EA;
  --surface: #F6F8F9;
  --radius: 14px;
  --wide: 1120px;
  --text: 700px;
  --display: "DM Sans", "Manrope", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--body);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
  margin: 0;
}

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }

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

h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-family: var(--display); font-size: clamp(2.3rem, 5vw, 3.6rem); letter-spacing: -0.02em; }
h2 { font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1.1em; }

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; border-radius: 8px;
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 3rem, var(--wide)); margin-inline: auto; }
.narrow { width: min(100% - 3rem, var(--text)); margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.9rem;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; white-space: nowrap; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--body); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* Buttons — same size for <a> and <button> */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-sizing: border-box;
  height: 3.25rem;
  padding: 0 1.45rem;
  border-radius: 999px;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 0.97rem;
  line-height: 1;
  text-decoration: none;
  border: 2px solid var(--accent);
  transition: background 0.15s, color 0.15s;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  vertical-align: middle;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-secondary { color: var(--accent); background: #fff; }
.btn-secondary:hover { background: var(--accent-tint); }
.btn:disabled { opacity: 0.6; cursor: progress; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem; margin-top: 2rem; }

/* Hero */
.hero { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5rem); }
.hero h1 { max-width: 17ch; }
.hero .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 60ch; color: var(--body); }

/* Sections */
section { scroll-margin-top: 80px; }
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--surface); }
.section-head { margin-bottom: 2.5rem; max-width: 60ch; }

/* Work cards */
.work-list { display: grid; gap: 2rem; }
.work-card {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(1.5rem, 4vw, 3.5rem);
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem); text-decoration: none; color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.work-card:hover { border-color: var(--accent); box-shadow: 0 12px 32px rgba(30, 39, 51, 0.08); transform: translateY(-2px); color: inherit; }
.work-card .thumb { border-radius: 10px; overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface); }
.work-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card .company { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.work-card h3 { font-family: var(--display); font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin: 0.4rem 0 0.8rem; }
.work-card p { color: var(--muted); }
.work-card .result { font-weight: 700; color: var(--ink); }
.work-card .more { font-weight: 700; color: var(--accent); }
.tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700;
  padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark);
  margin-bottom: 0.9rem;
}

/* Earlier work */
.other-work { margin-top: clamp(3rem, 7vw, 4.5rem); }
.other-work-title { font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.6rem); margin-bottom: 0.3rem; }
.other-work-intro { color: var(--muted); margin-bottom: 1.5rem; }
.other-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1.25rem; }
.other-card { background: transparent; border: 0; border-radius: 0; overflow: hidden; }
.other-card img { border-radius: 10px; }
.other-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface); }
.other-card > div { padding: 1.1rem 1.25rem 1.3rem; }
.other-card .company { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.other-card h4 { font-size: 1.05rem; margin: 0.3rem 0 0.45rem; }
.other-card p { margin: 0; font-size: 0.93rem; line-height: 1.6; color: var(--muted); }
.other-card .more { display: inline-block; margin-top: 0.6rem; font-size: 0.93rem; font-weight: 700; text-decoration: none; }

/* Diagram thumb for NDA work */
.thumb-diagram { display: grid; place-items: center; background: var(--accent-tint) !important; }
.thumb-diagram svg { width: 86%; height: auto; }

/* About */
.about { display: grid; grid-template-columns: 300px 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about img { border-radius: var(--radius); width: 100%; }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem 2rem; margin-top: 2rem; }
.principle { padding: 0; }
.principle h3 { font-size: 1.02rem; margin-bottom: 0.35rem; }
.principle p { margin: 0; font-size: 0.97rem; color: var(--muted); }

.about-points {
  list-style: none; margin: 1.75rem 0 0; padding: 0;
  border-top: 1px solid var(--rule);
}
.about-points li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}
.about-points strong { color: var(--ink); }

/* Experience */
.experience { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.experience li { display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.experience strong { color: var(--ink); }
.experience .role { color: var(--muted); }
.experience .dates { color: var(--muted); font-size: 0.95rem; white-space: nowrap; }
.clients { margin-top: 1.25rem; color: var(--muted); font-size: 0.97rem; }

/* Contact */
.contact .section-head p { color: var(--muted); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2rem 0; font-size: 0.9rem; color: var(--muted); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: var(--muted); }

/* Case study */
.cs-hero { padding: clamp(3.5rem, 8vw, 6rem) 0 2.5rem; }
.cs-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); max-width: 22ch; }
.cs-hero .lead { font-size: clamp(1.08rem, 1.8vw, 1.25rem); max-width: 62ch; }
.back { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; text-decoration: none; font-size: 0.95rem; }

.meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 1.5rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0; margin-top: 2.5rem;
}
.meta dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.3rem; }
.meta dd { margin: 0; color: var(--ink); font-weight: 600; font-size: 0.98rem; line-height: 1.5; }

.cs-cover { margin: 0 auto 1rem; }
.cs-cover img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 1rem; margin: 2.5rem 0; }
.stat { background: var(--accent-tint); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.stat .num { display: block; font-family: var(--display); font-size: clamp(1.6rem, 3vw, 1.95rem); color: var(--accent-dark); line-height: 1.1; margin-bottom: 0.4rem; white-space: nowrap; }
.stat .label { font-size: 0.95rem; color: var(--ink); line-height: 1.45; display: block; }

.cs-body { padding-bottom: 4rem; }
.cs-section { padding-top: 3rem; }
.cs-section h2 { font-size: clamp(1.45rem, 2.6vw, 1.85rem); }
.cs-body ul { padding-left: 1.2rem; margin: 0 0 1.2em; }
.cs-body li { margin-bottom: 0.45em; }
.cs-body li::marker { color: var(--accent); }

.figure { margin: 2.25rem auto; }
.figure img { border-radius: 12px; border: 1px solid var(--rule); width: 100%; }
.figure figcaption { font-size: 0.9rem; color: var(--muted); margin-top: 0.7rem; }
.figure-wide { width: min(100% - 3rem, 1000px); margin-inline: auto; }
.figure-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.figure-pair img { aspect-ratio: 4 / 3; object-fit: cover; }
.figure-pair.screens img { aspect-ratio: auto; }

.callout {
  border-left: 4px solid var(--accent); background: var(--surface);
  padding: 1.3rem 1.5rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 2rem 0;
}
.callout p:last-child { margin: 0; }
.callout strong { color: var(--ink); }

.data-split { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.75rem 0; }
.data-split div { border: 1px solid var(--rule); border-radius: 12px; padding: 1.1rem 1.2rem; }
.data-split .num { display: block; font-family: var(--display); font-size: 1.9rem; color: var(--ink); line-height: 1.1; }
.data-split .highlight { border-color: var(--accent); background: var(--accent-tint); }
.data-split .highlight .num { color: var(--accent-dark); }
.data-split small { display: block; color: var(--muted); font-size: 0.9rem; line-height: 1.45; margin-top: 0.35rem; }

.nda {
  display: flex; gap: 1rem; align-items: flex-start;
  background: var(--accent-tint); border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 2.5rem 0 0;
}
.nda svg { flex: 0 0 24px; margin-top: 3px; color: var(--accent-dark); }
.nda p { margin: 0; color: var(--ink); }

.diagram { background: var(--surface); border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem); margin: 2rem 0; }
.diagram svg { width: 100%; height: auto; }
.diagram-caption { margin-top: 1rem; font-size: 0.9rem; color: var(--muted); }

.next-cs { border-top: 1px solid var(--rule); padding: 3rem 0 4rem; }
.next-cs a { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.6rem); text-decoration: none; }
.next-cs span { display: block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }

.tldr { background: var(--surface); border-radius: var(--radius); padding: 1.4rem 1.6rem 0.6rem; margin: 2.5rem 0 0; }
.tldr h2 { font-size: 0.85rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); font-family: inherit; margin-bottom: 0.8rem; }
.tldr ul { list-style: none; padding: 0; }
.tldr li { margin-bottom: 0.7rem; }
.tldr li::marker { content: none; }
.decision-block { border-top: 1px solid var(--rule); padding-top: 1.6rem; margin-top: 1.6rem; }
.decision-block h3 { font-family: var(--display); font-size: 1.25rem; }
.decision-block .num-label { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.3rem; }
.tradeoff { background: var(--accent-tint); border-radius: 10px; padding: 0.9rem 1.1rem; margin: 1rem 0 1.2rem; }
.tradeoff strong { color: var(--accent-dark); }

.quote { margin: 2.5rem 0; padding: 1.6rem 1.8rem; background: var(--surface); border-radius: var(--radius); }
.quote blockquote { margin: 0; font-family: var(--display); font-size: clamp(1.15rem, 2vw, 1.3rem); line-height: 1.5; color: var(--ink); }
.quote blockquote p { margin: 0; }
.quote figcaption { margin-top: 1rem; font-size: 0.95rem; color: var(--muted); }
.quote figcaption strong { color: var(--ink); }

/* Password protection */
.lock-page { padding: clamp(3.5rem, 10vw, 7rem) 0; }
.lock-card {
  width: min(100% - 3rem, 560px); margin-inline: auto;
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius);
  padding: clamp(1.75rem, 5vw, 2.75rem); box-shadow: 0 16px 40px rgba(30, 39, 51, 0.08);
}
.lock-card h1, .lock-card h2 { font-family: var(--display); font-size: clamp(1.5rem, 3vw, 1.9rem); margin-bottom: 0.7rem; }
.lock-card p { color: var(--muted); }
.lock-icon { display: block; color: var(--accent); margin-bottom: 1rem; }
.lock-form { margin-top: 1.5rem; }
.lock-form label { display: block; font-weight: 700; color: var(--ink); font-size: 0.95rem; margin-bottom: 0.4rem; }
.lock-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.lock-row input {
  flex: 1 1 200px; min-width: 0; font: inherit; color: var(--ink);
  padding: 0.75rem 1rem; border: 2px solid var(--rule); border-radius: 999px; background: #fff;
}
.lock-row input:focus { outline: none; border-color: var(--accent); }
.lock-row .btn { cursor: pointer; font-family: inherit; }
.lock-row .btn:disabled { opacity: 0.6; cursor: progress; }
.lock-error { color: #B42318 !important; font-weight: 600; font-size: 0.95rem; margin: 0.8rem 0 0; }
.lock-help { font-size: 0.95rem; margin: 1.5rem 0 0; }

.lock-dialog { border: 0; padding: 0; background: transparent; max-width: none; width: 100%; }
.lock-dialog::backdrop { background: rgba(30, 39, 51, 0.55); backdrop-filter: blur(3px); }
.lock-dialog .lock-card { position: relative; }
.lock-close {
  position: absolute; top: 0.9rem; right: 0.9rem; width: 2.4rem; height: 2.4rem;
  border: 0; border-radius: 50%; background: var(--surface); color: var(--ink);
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.lock-close:hover { background: var(--accent-tint); }

/* Contact form */
.contact-form {
  width: min(100%, 48rem);
}
.contact-form .field + .field { margin-top: 1.6rem; }
.contact-form label {
  display: block;
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}
.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif !important;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.15rem 1.3rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
  -webkit-appearance: none;
}
.contact-form input {
  height: 4rem;
  padding-top: 0;
  padding-bottom: 0;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--muted);
  font-family: "Manrope", system-ui, sans-serif !important;
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 1;
}
.contact-form textarea {
  resize: vertical;
  min-height: 13rem;
  line-height: 1.7;
}
.contact-form input:hover,
.contact-form textarea:hover { border-color: #C5CCD4; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  margin-top: 2.25rem;
}
.contact-linkedin {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.contact-linkedin:hover { color: var(--accent-dark); text-decoration: underline; }
.form-status {
  margin: 1.2rem 0 0;
  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
}
.form-status.is-ok { color: var(--accent-dark); }
.form-status.is-error { color: #B42318; }

/* CV page */
.cv-pages { display: grid; gap: 1.5rem; margin-top: 1.5rem; max-width: 900px; }
.cv-page { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(30, 39, 51, 0.06); }
.cv-page img { width: 100%; height: auto; display: block; }

@media (max-width: 820px) {
  .work-card { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }  .about img { max-width: 240px; }
  .principles { grid-template-columns: 1fr; }
  .data-split { grid-template-columns: 1fr; }
  .figure-pair { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .nav { gap: 1rem; }
  .nav .hide-sm { display: none; }
  .experience li { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
