:root {
  color-scheme: light;
  --paper: #fffdf8;
  --wash: #fbf7ef;
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #dcd7cc;
  --blue: #236de8;
  --green: #2e9c66;
  --gold: #f0b429;
  --shadow: 0 18px 40px rgba(30, 27, 22, 0.08);
  --radius: 10px;
  --hand: "Bradley Hand", "Marker Felt", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: linear-gradient(180deg, #fff 0, var(--paper) 34rem);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 14px;
  font-family: var(--hand);
  font-size: 3.85rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 0.98;
}
h2 {
  margin-bottom: 10px;
  font-size: 2rem;
  line-height: 1.08;
  letter-spacing: -0.025em;
}
h3 { margin-bottom: 7px; font-size: 1.06rem; line-height: 1.25; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 10px 42px;
  border-bottom: 1px solid #e9e5dc;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(16px);
}
.brand, .nav-links, .email-button { display: inline-flex; align-items: center; }
.brand { gap: 8px; justify-self: start; font-size: 1.1rem; font-weight: 900; }
.brand-mark { color: var(--blue); font-family: var(--hand); font-size: 1.55rem; font-weight: 500; line-height: 1; }
.nav-links { gap: 30px; justify-self: center; font-size: 0.82rem; }
.nav-links a, .email-button { min-height: 36px; }
.nav-links a:hover { color: var(--blue); }
.email-button {
  gap: 8px;
  justify-self: end;
  padding: 7px 12px;
  border: 1px solid #b9cdea;
  border-radius: var(--radius);
  color: var(--blue);
  font-weight: 750;
}

.page-shell { width: min(1000px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 60px; }
.hero-card {
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 18px 0 38px;
}
.portrait {
  width: min(178px, 100%);
  aspect-ratio: 1;
  border: 4px solid #f1eadf;
  border-radius: 50%;
  box-shadow: 0 14px 34px rgba(42, 39, 35, 0.12);
  object-fit: cover;
}
.hero-copy p { max-width: 620px; margin-bottom: 0; color: #32363b; font-size: 1rem; line-height: 1.62; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; }
.primary-action, .secondary-action, .link-row a, .gallery-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
}
.primary-action { padding: 9px 16px; background: var(--gold); color: #241706; box-shadow: 0 10px 24px rgba(145, 100, 15, 0.18); }
.secondary-action { padding: 8px 16px; border: 1px solid #b9cdea; background: #fff; color: var(--blue); }

.section { padding: 46px 0 0; border-top: 1px solid #e7e0d5; }
.section + .section { margin-top: 54px; }
.section-heading { max-width: 710px; margin-bottom: 22px; }
.section-heading > p:last-child { margin-bottom: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.eyebrow { margin: 0 0 8px; color: #1e66c5; font-size: 0.69rem; font-weight: 900; line-height: 1.35; text-transform: uppercase; letter-spacing: 0.08em; }

.feature-grid, .project-grid { display: grid; gap: 16px; }
.feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 10px 28px rgba(38, 31, 24, 0.05);
}
.project-card:hover { border-color: #c7c0b4; box-shadow: var(--shadow); transform: translateY(-1px); transition: 150ms ease; }
.forecast-card { border-color: #a9c4ec; box-shadow: 0 14px 34px rgba(35, 109, 232, 0.1); }
.image-wrap { position: relative; width: 100%; height: 210px; overflow: hidden; border-bottom: 1px solid #e5ded3; background: #f6f3ed; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.recruitos-preview { background: #071121; }
.gallery-trigger {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #071121;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
}
.gallery-trigger img { object-position: top left; transition: transform 180ms ease; }
.gallery-trigger:hover img { transform: scale(1.015); }
.gallery-trigger:focus-visible { outline: 3px solid #fff; outline-offset: -5px; }
.gallery-count {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  background: rgba(4, 12, 25, 0.86);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.01em;
}
.project-grid .project-card > img, .app-shot {
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  border-bottom: 1px solid #e5ded3;
  background: #f6f3ed;
  object-fit: cover;
}
.app-shot { display: grid; place-items: center; overflow: hidden; }
.app-shot img { width: 100%; height: 100%; object-fit: contain; }
.light-app-shot { background: #f3f7fc; }
.dark-app-shot { background: #0b2016; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 15px 16px 16px; }
.card-body p { margin-bottom: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

.badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #dff1df;
  color: #22633d;
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}
.blue-badge { background: #e7f0ff; color: #1859b2; }
.title-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.title-line h3 { margin: 0; }
.chip-row, .link-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.link-row { margin-top: auto; padding-top: 12px; }
.chip-row span, .status {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid #d4caba;
  border-radius: 5px;
  background: #f5eddc;
  color: #4d463a;
  font-size: 0.66rem;
  font-weight: 850;
}
.status.green { border-color: #bad7c5; background: #dff1e5; color: #21613e; }
.status.warm { border-color: #efce9f; background: #f8e6ca; color: #8a4d10; }
.status.blue { border-color: #b9cdea; background: #e8f1ff; color: #1d5fb8; }
.link-row a { min-height: 24px; padding: 5px 0; color: var(--blue); font-size: 0.76rem; }
.gallery-link {
  min-height: 24px;
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
}
.gallery-link:hover { text-decoration: underline; }
.gallery-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.private-label { min-height: 24px; padding: 5px 0; color: #747b83; font-size: 0.75rem; font-weight: 850; }

.product-illustration { height: 210px; overflow: hidden; border-bottom: 1px solid #e5ded3; }
.greenhouse-illustration { padding: 26px 34px; background: linear-gradient(135deg, #edf9f4, #fbfffd); }
.browser-bar { display: flex; gap: 5px; align-items: center; height: 29px; padding: 0 10px; border: 1px solid #d9e5df; border-radius: 9px 9px 0 0; background: #fff; color: #718078; font-size: 0.6rem; }
.browser-bar i { width: 6px; height: 6px; border-radius: 50%; background: #b7c4bd; }
.browser-bar span { margin-left: 7px; }
.review-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; height: 132px; border: 1px solid #d9e5df; border-top: 0; border-radius: 0 0 9px 9px; background: #fff; box-shadow: 0 14px 28px rgba(27, 81, 56, 0.09); }
.resume-page { display: grid; align-content: start; gap: 8px; padding: 15px; border-right: 1px solid #e3ebe7; }
.resume-page strong { color: #284439; font-size: 0.72rem; }
.resume-page span { width: 100%; height: 5px; border-radius: 99px; background: #dfe7e3; }
.resume-page span:nth-of-type(2) { width: 76%; }
.resume-page span:nth-of-type(4) { width: 58%; }
.review-panel { padding: 14px 15px; color: #26463a; }
.review-panel small { color: #168454; font-size: 0.52rem; font-weight: 900; }
.review-panel strong { display: block; margin: 4px 0; font-size: 0.76rem; }
.review-panel ul { margin: 0 0 9px; padding-left: 14px; color: #68756f; font-size: 0.57rem; line-height: 1.45; }
.review-panel b { display: inline-block; padding: 5px 9px; border-radius: 5px; background: #168454; color: #fff; font-size: 0.57rem; }

.pipeline-illustration { padding: 22px 24px; background: linear-gradient(135deg, #f3f7ff, #fbfcff); }
.rolelog-illustration { padding: 22px 24px; background: linear-gradient(135deg, #f7f4ff, #fbfcff); }
.mini-toolbar {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d8e0ed;
  border-radius: 9px 9px 0 0;
  background: #fff;
  color: #566177;
  font-size: 0.55rem;
}
.mini-toolbar strong { color: #172033; font-size: 0.72rem; }
.mini-toolbar b { padding: 4px 7px; border-radius: 5px; background: #25a36a; color: #fff; font-size: 0.52rem; }
.pipeline-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 132px;
  overflow: hidden;
  border: 1px solid #d8e0ed;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(49, 80, 133, 0.09);
}
.pipeline-stage { min-width: 0; padding: 10px 7px; border-right: 1px solid #e3e8f0; }
.pipeline-stage:last-child { border-right: 0; }
.pipeline-stage small { display: block; margin-bottom: 7px; overflow: hidden; color: #7a8497; font-size: 0.44rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.candidate-card { display: grid; gap: 3px; margin-bottom: 6px; padding: 7px; border: 1px solid #dfe4eb; border-top: 3px solid #9aa7b8; border-radius: 5px; background: #fff; box-shadow: 0 4px 10px rgba(30, 45, 70, 0.06); }
.candidate-card strong { color: #263044; font-size: 0.52rem; }
.candidate-card span { color: #7e8795; font-size: 0.44rem; }
.blue-card { border-top-color: #4e80e7; }
.gold-card { border-top-color: #e2a11a; }
.green-card { border-top-color: #35a66c; }
.empty-stage { display: grid; place-items: center; height: 52px; border: 1px dashed #d8dee8; border-radius: 5px; color: #adb4bf; font-size: 0.5rem; }

.rolelog-toolbar b { background: #236de8; }
.rolelog-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.7fr;
  height: 132px;
  overflow: hidden;
  border: 1px solid #d8e0ed;
  border-top: 0;
  border-radius: 0 0 9px 9px;
  background: #fff;
  box-shadow: 0 14px 28px rgba(49, 80, 133, 0.09);
}
.role-list { display: grid; align-content: start; gap: 6px; padding: 10px; border-right: 1px solid #e3e8f0; }
.role-list small, .role-timeline > small { color: #7e8798; font-size: 0.45rem; font-weight: 900; }
.role-list span { overflow: hidden; padding: 5px 6px; border-radius: 4px; color: #657086; font-size: 0.5rem; text-overflow: ellipsis; white-space: nowrap; }
.role-list .active-role { background: #eaf1ff; color: #1e61bd; font-weight: 800; }
.role-timeline { padding: 10px 12px; }
.role-timeline > strong { display: block; margin: 3px 0 6px; color: #202a3a; font-size: 0.68rem; }
.timeline-row { display: grid; grid-template-columns: 9px 1fr auto; gap: 7px; align-items: center; padding: 5px 0; border-top: 1px solid #edf0f4; }
.timeline-row i { width: 7px; height: 7px; border: 2px solid #236de8; border-radius: 50%; }
.timeline-row p { display: grid; margin: 0; line-height: 1.2; }
.timeline-row p b { color: #3f4a5e; font-size: 0.49rem; }
.timeline-row p span, .timeline-row time { color: #8c94a1; font-size: 0.43rem; font-style: normal; }

.gallery-dialog {
  width: min(1180px, calc(100% - 36px));
  max-width: none;
  max-height: calc(100dvh - 36px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  background: #081221;
  color: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}
.gallery-dialog::backdrop { background: rgba(13, 17, 23, 0.78); backdrop-filter: blur(6px); }
.gallery-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; max-height: calc(100dvh - 36px); }
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}
.gallery-header .eyebrow { margin-bottom: 5px; color: #7db0ff; }
.gallery-header h2 { margin: 0; font-size: 1.35rem; }
.gallery-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 3px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: 300 1.7rem/1 sans-serif;
}
.gallery-track {
  display: flex;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-color: #7da9ec #18263a;
}
.gallery-slide {
  display: grid;
  flex: 0 0 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 18px 20px 12px;
  scroll-snap-align: start;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: calc(100dvh - 210px);
  border-radius: 8px;
  background: #050c17;
  object-fit: contain;
}
.gallery-slide figcaption { padding-top: 10px; color: #c9d4e3; font-size: 0.8rem; font-weight: 750; }
.gallery-controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.gallery-controls button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
}
.gallery-controls button:first-child { justify-self: start; }
.gallery-controls button:last-child { justify-self: end; }
.gallery-controls button:disabled { cursor: default; opacity: 0.38; }
.gallery-controls span { color: #c9d4e3; font-size: 0.78rem; font-weight: 850; }
.gallery-close:focus-visible, .gallery-controls button:focus-visible { outline: 2px solid #87b7ff; outline-offset: 2px; }

footer {
  display: flex;
  justify-content: space-between;
  width: min(1000px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 34px;
  border-top: 1px solid #e7e0d5;
  color: var(--muted);
  font-size: 0.82rem;
}
footer a { color: var(--blue); font-weight: 800; }

@media (max-width: 820px) {
  h1 { font-size: 3.45rem; }
  .topbar { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .hero-card { grid-template-columns: 160px minmax(0, 1fr); gap: 30px; }
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  h1 { font-size: 3rem; }
  h2 { font-size: 1.65rem; }
  .page-shell { width: calc(100% - 24px); padding-top: 24px; }
  .topbar { min-height: 58px; padding: 10px 12px; }
  .email-button { padding: 7px 10px; font-size: 0.86rem; }
  .hero-card { grid-template-columns: 1fr; gap: 22px; padding-top: 10px; }
  .portrait { width: min(200px, 66vw); }
  .feature-grid, .project-grid { grid-template-columns: 1fr; }
  .image-wrap, .product-illustration { height: 180px; }
  .greenhouse-illustration, .pipeline-illustration, .rolelog-illustration { padding: 20px; }
  .review-layout { height: 128px; }
  .pipeline-board, .rolelog-layout { height: 108px; }
  .section { padding-top: 36px; }
  .section + .section { margin-top: 42px; }
  footer { width: calc(100% - 24px); }
  .gallery-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); }
  .gallery-shell { max-height: calc(100dvh - 16px); }
  .gallery-header { padding: 14px; }
  .gallery-slide { padding: 12px 10px 9px; }
  .gallery-slide img { max-height: calc(100dvh - 190px); }
  .gallery-controls { padding: 10px 12px 12px; }
  .gallery-controls button { padding: 7px 9px; font-size: 0.72rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .project-card:hover { transform: none; transition: none; }
  .gallery-trigger img { transition: none; }
  .gallery-track { scroll-behavior: auto; }
}
