/* =========================================================
   Thiago Barbosa — Personal site
   System-font stack · WCAG AAA contrast · zero web font requests
   ========================================================= */

:root {
  /* palette — warm neutrals, deeper ink for AAA contrast */
  --bg:        #faf8f4;          /* warm off-white */
  --bg-2:      #f3efe8;          /* alt section bg */
  --ink:       #14110d;          /* near-black, 16.8:1 on bg */
  --ink-2:     #2e2a23;          /* body, 11.2:1 on bg */
  --ink-mute:  #595348;          /* muted labels, 6.4:1 on bg */
  --rule:      #d8d2c5;          /* hairlines */
  --rule-2:    #e7e2d6;          /* fainter hairlines */

  --accent:    #b54a26;          /* terracotta, 5.0:1 on bg */
  --accent-2:  #973c1d;          /* darker terracotta, 6.5:1 on bg */
  --accent-bg: #f3e3d6;          /* tinted card bg */

  --dark:      #14110d;          /* dark sections */
  --dark-ink:  #f3eee5;          /* text on dark, 14.5:1 */
  --dark-mute: #b8b0a0;          /* muted text on dark, 6.7:1 */

  /* type — 100% system stacks, no network */
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* spacing */
  --container: 1180px;
  --pad-x: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 10vw, 144px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--pad-x);
}

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

/* ---------- topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.topbar.is-scrolled { border-bottom-color: var(--rule); }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand__mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  background: var(--ink); color: var(--bg);
  border-radius: 7px;
  line-height: 1;
}
.brand__mark svg { display: block; }
.brand__name { font-size: 15px; color: var(--ink); }

.nav {
  display: flex; align-items: center; gap: 28px;
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
}
.nav a { transition: color .15s ease; }
.nav a:hover { color: var(--ink); }
.nav__cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink) !important;
  font-weight: 600;
}
@media (max-width: 720px) {
  .nav > a:not(.nav__cta) { display: none; }
}

/* ---------- shared section primitives ---------- */
.section-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  font-weight: 500;
}
.section-head__num { color: var(--accent-2); font-weight: 600; }
.section-head__label::before { content: "/ "; color: var(--rule); }
.section-head--light { border-color: rgba(243, 238, 229, 0.25); color: var(--dark-mute); }
.section-head--light .section-head__num { color: var(--accent-bg); }

.section-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 56px;
  max-width: 22ch;
  color: var(--ink);
}
.section-title em {
  font-style: italic;
  color: var(--accent-2);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
  cursor: pointer;
  font-family: var(--sans);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  background: var(--ink);
  color: var(--bg);
}
.btn--primary:hover { background: var(--accent-2); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink-mute);
}
.btn--ghost:hover { border-color: var(--ink); background: rgba(20, 17, 13, 0.04); }

.btn--text {
  background: transparent;
  color: var(--ink-2);
  border: none;
  padding: 14px 8px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  gap: 8px;
  transition: color .15s ease, border-color .15s ease;
}
.btn--text:hover {
  color: var(--accent-2);
  border-bottom-color: var(--accent-2);
}
.btn--text svg { opacity: 0.7; }

.btn--large { padding: 18px 28px; font-size: 16px; }

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(60px, 8vw, 110px);
  padding-bottom: clamp(80px, 10vw, 140px);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: var(--rule);
}

.hero__meta {
  display: flex; flex-wrap: wrap; gap: 16px 28px;
  margin-bottom: 44px;
}
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.kicker--muted { color: var(--ink-mute); }
.kicker .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #2e8f4f;
  box-shadow: 0 0 0 4px rgba(46, 143, 79, 0.22);
}

.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 100px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
  max-width: 14ch;
  color: var(--ink);
}
.hero__title em {
  font-style: italic;
  color: var(--accent-2);
}

.hero__lede {
  max-width: 56ch;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 40px;
}
.hero__lede strong { color: var(--ink); font-weight: 600; }

.hero__cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 88px;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding: 32px 0 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}
@media (max-width: 800px) {
  .hero__stats { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}
.stat dt {
  font-family: var(--mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 14px;
}
.stat dd { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.stat__num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 4.2vw, 50px);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.stat__unit {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* ---------- about ---------- */
.about { padding-block: var(--section-y); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 80px);
}
@media (max-width: 820px) { .about__grid { grid-template-columns: 1fr; } }

.about__col p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-2);
  margin: 0 0 1.2em;
  max-width: 50ch;
}
.about__col p strong { color: var(--ink); font-weight: 600; }
.about__col p em {
  font-family: var(--serif);
  font-size: 1.1em;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
}

.about__belief {
  font-family: var(--serif) !important;
  font-style: italic;
  font-size: 22px !important;
  line-height: 1.45 !important;
  color: var(--ink) !important;
  padding-left: 20px;
  border-left: 2px solid var(--accent-2);
  max-width: 38ch;
}
.about__belief strong { font-weight: 400 !important; }

/* ---------- services ---------- */
.services {
  padding-block: var(--section-y);
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
.services__list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
@media (max-width: 720px) { .services__list { grid-template-columns: 1fr; } }

.service {
  background: var(--bg-2);
  padding: 36px 32px;
  position: relative;
  transition: background .25s ease;
}
.service:hover { background: var(--bg); }

.service__head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.service__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.05em;
  font-weight: 600;
}
.service__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.service__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 9px 5px;
  background: var(--accent-2);
  color: #fff;
  border-radius: 3px;
  margin-left: auto;
}
.service__desc {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 42ch;
}
.service__items {
  display: flex; flex-wrap: wrap; gap: 6px 8px;
}
.service__items li {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 4px 10px;
  background: rgba(20, 17, 13, 0.06);
  border-radius: 999px;
  color: var(--ink-2);
  transition: background .15s ease;
}
.service:hover .service__items li {
  background: rgba(20, 17, 13, 0.09);
}

.service--feature {
  background: var(--accent-bg);
  grid-column: span 2;
}
@media (max-width: 720px) { .service--feature { grid-column: 1; } }

.service--wide { grid-column: span 2; }
@media (max-width: 720px) { .service--wide { grid-column: 1; } }

/* Language switcher */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 8px;
}
.lang-switch a,
.lang-switch span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-switch a:hover { color: var(--ink); background: rgba(20, 17, 13, 0.06); }
/* === Sparkline (papernest case study) === */
.lang-switch .is-active {
  background: var(--accent);
  color: #fff;
  cursor: default;
}
.spark {
  margin: 64px 0 8px;
  padding: 24px 0 0;
  border: none;
  border-top: 1px solid var(--ink-line);
  background: transparent;
}
.spark__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.spark__caption {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.spark__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 400;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
}
.spark__title em { font-style: italic; color: var(--accent); }
.spark__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.spark__fill {
  fill: var(--accent);
  opacity: 0;
  transition: opacity 0.8s ease 0.4s;
}
.spark__svg.is-in .spark__fill { opacity: 0.10; }
.spark__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.spark__dot {
  fill: var(--accent);
  opacity: 0;
  transform: scale(0);
  transform-origin: center;
  transform-box: fill-box;
  transition: opacity 0.4s ease 1.4s, transform 0.4s cubic-bezier(.34,1.56,.64,1) 1.4s;
}
.spark__svg.is-in .spark__dot { opacity: 1; transform: scale(1); }
.spark__peak {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  fill: var(--ink);
  text-anchor: end;
  opacity: 0;
  transition: opacity 0.5s ease 1.5s;
}
.spark__svg.is-in .spark__peak { opacity: 1; }
.spark__label {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--ink-muted);
  text-anchor: middle;
  letter-spacing: 0.04em;
}
.spark__baseline {
  stroke: var(--ink-line);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
@media (max-width: 720px) {
  .spark { margin-top: 44px; padding-top: 18px; }
  .spark__head { margin-bottom: 16px; }
  .spark__label { font-size: 9px; }
}
@media (max-width: 720px) {
  .lang-switch { font-size: 10px; margin-right: 4px; }
  .lang-switch a,
  .lang-switch span { min-width: 24px; height: 22px; padding: 0 6px; }
}
.service--feature .service__items li {
  background: rgba(151, 60, 29, 0.16);
  color: var(--ink);
}
.service--feature:hover { background: #efdcc9; }

/* ---------- experience ---------- */
.experience { padding-block: var(--section-y); }

.timeline { display: grid; gap: 0; }
.timeline__item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: clamp(20px, 4vw, 60px);
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  position: relative;
}
.timeline__item:last-child { border-bottom: 1px solid var(--rule); }
@media (max-width: 720px) {
  .timeline__item { grid-template-columns: 1fr; gap: 12px; padding: 28px 0; }
}

.timeline__when {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  display: flex; flex-direction: column; gap: 4px;
}
.timeline__year { color: var(--ink); font-weight: 600; }

.timeline__what h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.2;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.timeline__what p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 12px;
  max-width: 60ch;
}
.timeline__what p strong { color: var(--ink); font-weight: 600; }
.timeline__what ul {
  margin-top: 8px;
  display: grid; gap: 6px;
}
.timeline__what ul li {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  max-width: 60ch;
}
.timeline__what ul li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent-2);
  font-family: var(--mono);
  font-weight: 600;
}

.timeline__item--current .timeline__when::before {
  content: "● Current";
  color: #2e8f4f;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-weight: 600;
}

.timeline__item--muted .timeline__what h3 { color: var(--ink-2); }
.timeline__item--muted .timeline__what p { color: var(--ink-mute); }

/* Cards variant — toggleable via Tweaks */
.timeline--cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .timeline--cards { grid-template-columns: 1fr; } }
.timeline--cards .timeline__item {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: var(--bg);
}
.timeline--cards .timeline__item:last-child { border-bottom: 1px solid var(--rule); }
.timeline--cards .timeline__when { flex-direction: row; gap: 14px; align-items: baseline; }
.timeline--cards .timeline__item--current .timeline__when::before { margin-bottom: 0; }

/* ---------- stack ---------- */
.stack {
  padding-block: var(--section-y);
  border-top: 1px solid var(--rule);
  background: var(--bg-2);
}
.stack__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 820px) { .stack__grid { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; } }

.stack__group-title {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.stack__group ul { display: grid; gap: 6px; }
.stack__group ul li {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.stack__certs { display: none; }

/* ---------- contact ---------- */
.contact {
  background: var(--dark);
  color: var(--dark-ink);
  padding-block: var(--section-y);
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(181, 74, 38, 0.25) 0%, transparent 60%);
  pointer-events: none;
}
.contact__inner { position: relative; }

.contact__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.2vw, 76px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0 0 32px;
  max-width: 18ch;
  color: var(--dark-ink);
}
.contact__title em {
  font-style: italic;
  color: #e89868;
}

.contact__lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--dark-mute);
  max-width: 50ch;
  margin: 0 0 40px;
}

.contact .btn--primary {
  background: var(--bg);
  color: var(--ink);
}
.contact .btn--primary:hover { background: var(--accent); color: #fff; }

.contact__handle {
  margin: 28px 0 0;
  font-family: var(--mono);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--dark-mute);
  letter-spacing: 0.04em;
}
.contact__handle span { color: rgba(243, 238, 229, 0.45); }

/* Light contact variant — toggleable via Tweaks */
.contact--light {
  background: var(--bg-2);
  color: var(--ink);
  border-top: 1px solid var(--rule);
}
.contact--light::before {
  background: radial-gradient(circle, rgba(181, 74, 38, 0.13) 0%, transparent 60%);
}
.contact--light .contact__title { color: var(--ink); }
.contact--light .contact__title em { color: var(--accent-2); }
.contact--light .contact__lede { color: var(--ink-2); }
.contact--light .btn--primary { background: var(--ink); color: var(--bg); }
.contact--light .btn--primary:hover { background: var(--accent-2); color: #fff; }
.contact--light .contact__handle { color: var(--ink-mute); }
.contact--light .contact__handle span { color: var(--rule); }
.contact--light .section-head--light { border-color: var(--rule); color: var(--ink-mute); }
.contact--light .section-head--light .section-head__num { color: var(--accent-2); }

/* ---------- footer ---------- */
.footer {
  background: var(--dark);
  color: var(--dark-mute);
  border-top: 1px solid rgba(243, 238, 229, 0.10);
}
.footer__inner {
  padding-block: 36px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
}
@media (max-width: 720px) {
  .footer__inner { grid-template-columns: 1fr; gap: 16px; text-align: left; }
}
.footer__brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--dark-ink);
}
.footer__brand .brand__mark { background: var(--bg); color: var(--ink); }
.footer__nav {
  display: flex; gap: 24px; justify-self: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
@media (max-width: 720px) { .footer__nav { justify-self: flex-start; flex-wrap: wrap; gap: 14px; } }
.footer__nav a { color: var(--dark-mute); transition: color .15s ease; }
.footer__nav a:hover { color: var(--dark-ink); }
.footer__meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-align: right;
  display: flex; flex-direction: column; gap: 2px;
}
@media (max-width: 720px) { .footer__meta { text-align: left; } }

/* ---------- entrance animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .7s ease, transform .7s ease;
    transition-delay: var(--d, 0ms);
  }
  .reveal.is-in {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================
   MOBILE OPTIMISATIONS
   Tightens type, padding, tap targets and rhythm under 720px
   ========================================================= */
@media (max-width: 720px) {
  :root {
    --pad-x: 20px;
    --section-y: clamp(64px, 12vw, 88px);
  }

  body { font-size: 16px; }

  /* Topbar — keep brand visible, condense nav */
  .topbar__inner { height: 60px; }
  .brand__name { font-size: 14.5px; }
  .nav { gap: 0; }
  .nav__cta {
    padding: 8px 14px;
    border: 1px solid var(--ink);
    border-radius: 999px;
    font-size: 13px;
    min-height: 36px;
  }

  /* Hero — calmer scale, more breathing room above stats */
  .hero {
    padding-top: clamp(40px, 10vw, 64px);
    padding-bottom: clamp(56px, 12vw, 88px);
  }
  .hero__meta { gap: 10px 18px; margin-bottom: 28px; }
  .hero__title {
    font-size: clamp(38px, 11vw, 56px);
    line-height: 1.04;
    margin-bottom: 24px;
    max-width: none;
  }
  .hero__title br { display: none; } /* let the heading wrap naturally */
  .hero__lede {
    font-size: 16.5px;
    line-height: 1.55;
    margin-bottom: 28px;
  }
  .hero__cta {
    margin-bottom: 56px;
    gap: 10px;
    width: 100%;
  }
  .hero__cta .btn {
    flex: 1 1 auto;
    justify-content: center;
    min-height: 48px;
    padding: 14px 18px;
  }
  .hero__stats { gap: 24px 20px; padding-top: 24px; }
  .stat dt { font-size: 10.5px; margin-bottom: 10px; }
  .stat__num { font-size: 36px; }

  /* Section heads + titles — calm them down */
  .section-head { padding-bottom: 14px; margin-bottom: 28px; font-size: 11px; }
  .section-title {
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.1;
    margin-bottom: 36px;
    max-width: none;
  }

  /* About */
  .about__col p { font-size: 16px; line-height: 1.6; }
  .about__belief {
    font-size: 18px !important;
    padding-left: 14px;
    line-height: 1.45 !important;
  }

  /* Services — tighter cards */
  .service { padding: 28px 20px; }
  .service__head { gap: 10px; margin-bottom: 12px; }
  .service__title { font-size: 22px; line-height: 1.2; }
  .service__tag {
    margin-left: 0;
    font-size: 10px;
    padding: 3px 7px 4px;
    order: 3;
    flex-basis: auto;
  }
  .service__desc { font-size: 15px; margin-bottom: 16px; }
  .service__items li { font-size: 11.5px; padding: 4px 9px; }

  /* Experience timeline */
  .timeline__item { padding: 26px 0; gap: 10px; }
  .timeline__when { font-size: 12px; }
  .timeline__what h3 {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 10px;
  }
  .timeline__what p { font-size: 15.5px; }
  .timeline__what ul li { font-size: 14.5px; }
  .timeline__item--current .timeline__when::before { font-size: 10.5px; }

  /* Stack */
  .stack__group ul li { font-size: 19px; line-height: 1.3; }

  /* Contact */
  .contact__title {
    font-size: clamp(32px, 9vw, 44px);
    line-height: 1.08;
    margin-bottom: 24px;
    max-width: none;
  }
  .contact__lede {
    font-size: 16px;
    margin-bottom: 28px;
  }
  .contact .btn--large {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    padding: 16px 24px;
    font-size: 15.5px;
  }

  /* Footer */
  .footer__inner { padding-block: 28px; }
  .footer__nav { font-size: 11.5px; gap: 12px 18px; }
  .footer__meta { font-size: 11px; }

  /* All anchor/button tap targets */
  .nav a, .footer__nav a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }
}

/* Smaller phones — extra polish below 380px (iPhone SE etc.) */
@media (max-width: 380px) {
  :root { --pad-x: 16px; }
  .hero__title { font-size: clamp(32px, 11vw, 44px); }
  .section-title { font-size: 26px; }
  .stat__num { font-size: 32px; }
  .service { padding: 24px 18px; }
  .service__title { font-size: 20px; }
  .contact__title { font-size: 28px; }
}
