:root {
  --bg: #F4F2EE;
  --surface: #FFFFFF;
  --ink: #161616;
  --text-2: #3B3A37;
  --green: #0E5A43;
  --green-light: #DDF1E7;
  --green-dark: #0A3E2E;
  --line: #DCD8D0;

  /* Type scale: use only these sizes */
  /* Desktop sizes; tablet and phone step down in the media queries below */
  --fs-xs: 16px;      /* chips, footer, hints */
  --fs-sm: 17px;      /* labels: kickers, card labels, form labels */
  --fs-body: 19px;    /* body copy */
  --fs-lg: 22px;      /* intro copy */
  --fs-xl: 28px;      /* card and step titles */
  --fs-2xl: 48px;     /* section headings, step numbers */
  --fs-display: clamp(40px, 5vw, 72px); /* hero and contact headings */
  --fs-nav: 22px;     /* hero nav links */
  --fs-brand: 30px;   /* name in the hero nav */
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--fs-body)/1.6 'Space Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ol, ul { list-style: none; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -9999px; top: 12px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 12px; }

.wrap { max-width: 1520px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 72px); }

/* Buttons */
.btn {
  display: inline-block;
  background: #fff;
  color: var(--green);
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 500;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  border: 0;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-line { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .6); }
.btn-line:hover { background: rgba(255, 255, 255, .08); }

/* Green panel: shared by the hero and contact so the page opens and closes the same way */
.panel {
  background: var(--green); color: #fff; border-radius: 28px;
  padding: 96px 72px;
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end;
}
.panel .kicker { color: var(--green-light); }
.panel h1, .panel h2 { color: #fff; font-size: var(--fs-display); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; margin-top: 14px; }
.panel .lead { color: var(--green-light); font-size: var(--fs-lg); margin-top: 18px; max-width: 30em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.panel .btn { margin-top: 32px; }
.panel .cta .btn { margin-top: 0; }
.side { font-size: var(--fs-body); color: var(--green-light); }
.social { display: flex; gap: 12px; margin-top: 16px; }
.social a { width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--green); display: flex; align-items: center; justify-content: center; transition: transform .15s ease, background .15s ease; }
.social a:hover { background: var(--green-light); transform: translateY(-1px); }
.social svg { width: 24px; height: 24px; }

.panel-hero { padding-top: 36px; padding-bottom: 72px; }
.panel-nav { grid-column: 1 / -1; align-self: start; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: var(--fs-nav); }
.panel-nav .brand { font-size: var(--fs-brand); font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: #fff; }
.panel-nav .links { display: flex; gap: 40px; }
.panel-nav .links a { color: #fff; font-weight: 700; text-decoration: none; }
.panel-nav .links a:hover { color: var(--green-light); text-decoration: underline; text-underline-offset: 6px; }
.hero-wrap { padding: 20px 0 112px; border-top: 0; }
.hero-wrap + section { border-top: 0; padding-top: 0; }

/* Sections */
section { padding: 112px 0; border-top: 1px solid var(--line); }
section:first-child { border-top: 0; }
.kicker { font-size: var(--fs-lg); font-weight: 700; color: var(--green); letter-spacing: .02em; }
h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; margin-top: 12px; }
.split { display: grid; grid-template-columns: 320px 1fr; gap: 56px; }
.about > div:last-child p { font-size: var(--fs-lg); line-height: 1.55; letter-spacing: -.01em; max-width: 34em; }
.about > div:last-child p + p { margin-top: 20px; color: var(--text-2); }

/* How I work */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface); border-radius: 20px; }
.steps li { padding: 36px 32px; border-right: 1px solid var(--line); position: relative; }
.steps li:last-child { border-right: 0; }
.steps li:not(:last-child)::after {
  content: '→';
  position: absolute; right: -15px; top: 44px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); color: #fff; font-size: 15px;
  display: flex; align-items: center; justify-content: center; z-index: 1;
}
.steps .n { display: block; font-size: var(--fs-2xl); font-weight: 700; color: var(--green); line-height: 1; letter-spacing: -.04em; }
.steps h3 { font-size: var(--fs-xl); font-weight: 700; margin: 18px 0 8px; letter-spacing: -.01em; }
.steps p { color: var(--text-2); font-size: var(--fs-body); }

/* Experience: one horizontal white card per job */
.jobs { display: flex; flex-direction: column; gap: 12px; }
.job {
  background: var(--surface); border-radius: 20px; padding: 22px 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 10em 150px;
  align-items: center; gap: 20px;
}
.job h3 { font-size: var(--fs-lg); font-weight: 700; letter-spacing: -.01em; }
.job .role { color: var(--text-2); }
.job .dates { font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job .place { justify-self: end; font-size: var(--fs-xs); font-weight: 500; color: var(--text-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; white-space: nowrap; }

/* Department cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; }
.card { background: var(--surface); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; }
.card .num { font-size: var(--fs-sm); font-weight: 700; color: var(--green); }
.card h3 { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.02em; margin: 6px 0 20px; }
.card h4 { font-size: var(--fs-sm); font-weight: 700; color: var(--green); margin-bottom: 4px; }
.flow { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.flow::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: var(--green); }
.flow li { position: relative; background: var(--surface); font-size: var(--fs-xs); font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; color: var(--text-2); white-space: nowrap; }
.flow li:last-child { background: var(--green); border-color: var(--green); color: #fff; }
.part { padding-top: 16px; border-top: 1px dashed var(--line); }
.part + .part { margin-top: 16px; }
.part:nth-last-child(2) { margin-bottom: 20px; }
.part p { font-size: var(--fs-body); color: var(--text-2); line-height: 1.55; }
.benefit { margin-top: auto; background: var(--green-light); border-radius: 12px; padding: 14px 18px; }
.benefit h4 { margin-bottom: 2px; }
.benefit p { color: var(--green-dark); font-weight: 500; font-size: var(--fs-body); line-height: 1.5; }

/* Contact */
.contact-wrap { border-top: 0; padding-top: 0; }

/* Resume request dialog */
.btn-solid { background: var(--green); color: #fff; }
.dialog { margin: auto; border: 0; border-radius: 24px; padding: 0; width: min(460px, calc(100% - 32px)); background: var(--surface); color: var(--ink); }
.dialog::backdrop { background: rgba(10, 30, 22, .55); }
.dialog-body { position: relative; padding: 40px 36px 36px; display: flex; flex-direction: column; gap: 18px; }
.dialog-body[hidden] { display: none; }
.dialog h2 { font-size: var(--fs-xl); margin: 0; padding-right: 32px; }
.dialog-lead { color: var(--text-2); margin-top: -6px; }
.dialog label { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 6px; font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.dialog input[type="email"], .dialog input[type="text"] {
  font: inherit; font-weight: 400; font-size: var(--fs-body); color: var(--ink);
  padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg);
  grid-column: 1 / -1;
}
.dialog input:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.dialog label span { display: inline; font-weight: 400; color: var(--text-2); font-size: var(--fs-xs); }
.dialog .btn-solid { align-self: flex-start; margin-top: 6px; }
.dialog .btn-solid:disabled { opacity: .7; cursor: default; }
.dialog-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--bg); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.form-error { color: #A32D2D; font-size: var(--fs-sm); margin-top: -8px; }
.hp { position: absolute; left: -9999px; }

.foot { padding-top: 40px; padding-bottom: 56px; color: var(--text-2); font-size: var(--fs-xs); display: flex; justify-content: space-between; }

/* Job cards no longer fit on one row: company and dates, then role and city */
@media (max-width: 1439px) {
  .job { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; }
  .job .role { grid-column: 1; grid-row: 2; }
  .job .dates { grid-column: 2; grid-row: 1; justify-self: end; }
  .job .place { grid-column: 2; grid-row: 2; }
}

/* Small laptops: two card columns so the flow chips fit; a ninth card spans both */
@media (max-width: 1200px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Five nav links no longer fit inside the hero card below this width: use a menu button */
.menu-toggle { display: none; }
@media (max-width: 960px) {
  .panel-nav { flex-wrap: wrap; }
  .panel-nav .links { display: none; }
  .menu-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 46px; height: 46px; padding: 0 13px; border-radius: 50%; cursor: pointer;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .35);
  }
  .menu-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
  .panel-nav.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .panel-nav.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .panel-nav.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .panel-nav.open .links { display: flex; flex-direction: column; gap: 0; width: 100%; margin-top: 20px; }
  .panel-nav.open .links a { font-size: var(--fs-lg); padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .18); }
}

/* Tablet */
@media (max-width: 1080px) {
  :root { --fs-xs: 15px; --fs-sm: 16px; --fs-body: 18px; --fs-lg: 20px; --fs-xl: 24px; --fs-2xl: 40px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
}

/* Phone */
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  .panel-hero { padding-top: 24px; }
  .panel-nav { margin-bottom: 24px; }
  section { padding: 72px 0; }
  .hero-wrap { padding: 12px 0 72px; }
  .panel { grid-template-columns: minmax(0, 1fr); padding: 44px 20px; gap: 32px; }
  :root { --fs-lg: 18px; --fs-xl: 22px; --fs-2xl: 28px; --fs-display: 30px; --fs-brand: 24px; --fs-xs: 14px; --fs-sm: 15px; --fs-body: 17px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px 24px; }
  .steps li:last-child { border-bottom: 0; }
  .steps li:not(:last-child)::after { content: '↓'; right: auto; left: 24px; top: auto; bottom: -15px; }
  .cards { grid-template-columns: 1fr; margin-top: 40px; }
  /* Phone: company, then role, then dates with the city chip */
  .job { padding: 18px 20px; gap: 4px 12px; }
  .job h3 { grid-column: 1 / -1; }
  .job .role { grid-column: 1 / -1; grid-row: 2; }
  .job .dates { grid-column: 1; grid-row: 3; justify-self: start; font-size: var(--fs-sm); color: var(--text-2); }
  .job .place { grid-column: 2; grid-row: 3; }
  .card:last-child:nth-child(odd) { grid-column: auto; }
  .card { padding: 24px; }
  .foot { flex-direction: column; gap: 4px; }
}

/* Small phones: keep "AI transformation," on one line */
@media (max-width: 360px) {
  :root { --fs-display: 26px; }
}
