:root {
  --ink: #182024;
  --text: #374249;
  --muted: #66727a;
  --line: #e1e9ed;
  --line-soft: #eef3f5;
  --panel: #f7fafb;
  --panel-strong: #edf7f5;
  --shadow: 0 18px 44px rgba(24, 32, 36, 0.08);
}

body {
  background: #fcfdfd;
  text-rendering: optimizeLegibility;
}

main {
  width: min(1120px, calc(100% - 44px));
}

.site-header {
  padding-block: 16px;
  background: rgba(252, 253, 253, 0.9);
  border-bottom-color: var(--line-soft);
}

.brand {
  font-weight: 850;
}

.nav {
  gap: 18px;
  font-size: 0.92rem;
}

.nav a {
  color: var(--muted);
  font-weight: 650;
  white-space: nowrap;
}

.hero {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(44px, 7vw, 76px);
  padding: clamp(82px, 9vw, 112px) 0 66px;
}

h1 {
  max-width: 790px;
  margin-bottom: 20px;
  font-size: clamp(2.65rem, 5.2vw, 4.85rem);
  line-height: 0.96;
}

h2 {
  max-width: 760px;
  margin-bottom: 14px;
  font-size: clamp(1.95rem, 3vw, 2.75rem);
}

h3 {
  color: var(--ink);
  font-size: 1.08rem;
}

p {
  line-height: 1.62;
}

.lead {
  max-width: 660px;
  font-size: 1.08rem;
  line-height: 1.68;
}

.eyebrow {
  margin-bottom: 12px;
  color: var(--accent-dark);
  font-size: 0.74rem;
  letter-spacing: 0.11em;
}

.hero-actions,
.contact-actions {
  gap: 10px;
  margin-top: 30px;
}

.button {
  min-height: 46px;
  padding-inline: 20px;
  border-color: rgba(15, 118, 110, 0.2);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.78);
}

.profile-panel {
  justify-self: end;
  gap: 16px;
  width: 100%;
  max-width: 306px;
  padding: 24px;
  background: rgba(247, 250, 251, 0.88);
  border-color: var(--line-soft);
}

.profile-panel img {
  width: 132px;
  height: 132px;
  border-width: 3px;
}

.profile-name {
  margin-bottom: 0;
}

.profile-links {
  gap: 7px;
  font-size: 0.92rem;
}

.summary {
  gap: 12px;
  margin-bottom: 92px;
}

.summary > div {
  padding: 16px 18px;
  background: rgba(247, 250, 251, 0.8);
  border-color: var(--line-soft);
}

.metric {
  margin-bottom: 5px;
  font-size: 0.92rem;
}

.section {
  padding: 88px 0;
  border-top-color: var(--line-soft);
}

.section-heading {
  max-width: 700px;
  margin-bottom: 34px;
}

.section-heading p:not(.eyebrow) {
  max-width: 650px;
  line-height: 1.7;
}

.split {
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  gap: clamp(42px, 6vw, 72px);
}

.stack-list,
.project-grid,
.case-study-list,
.cv-grid {
  gap: 16px;
}

.stack-list > div,
.summary > div,
.cv-card {
  border-color: var(--line-soft);
}

.stack-list > div {
  padding: 20px;
  background: rgba(247, 250, 251, 0.72);
}

.filters {
  gap: 8px;
  margin-bottom: 28px;
}

.filter {
  min-height: 36px;
  padding-inline: 13px;
  color: var(--muted);
  border-color: var(--line-soft);
}

.filter.is-active,
.filter[aria-pressed="true"] {
  color: var(--white);
}

.project-card {
  padding: 24px;
  border-color: var(--line-soft);
}

.project-card.featured {
  background: #edf7f5;
  border-color: rgba(15, 118, 110, 0.2);
}

.project-card p {
  line-height: 1.62;
}

.project-card li {
  line-height: 1.55;
}

.project-card ul {
  gap: 8px;
  margin-bottom: 18px;
}

.project-topline {
  gap: 7px;
  margin-bottom: 18px;
}

.tag {
  min-height: 23px;
  padding-inline: 8px;
  color: #0c615b;
  background: #eef8f6;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
}

#proyectos {
  padding-top: 96px;
}

#case-studies {
  padding-top: 96px;
}

.case-study-list {
  gap: 22px;
}

.case-study {
  gap: 20px;
  padding: clamp(24px, 3vw, 34px);
  border-color: var(--line-soft);
}

.case-study--featured {
  background: #f1faf8;
  border-color: rgba(15, 118, 110, 0.18);
}

.case-study > p {
  max-width: 760px;
  line-height: 1.68;
}

.case-study-grid {
  gap: 12px;
}

.case-study-grid div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.64);
  border-color: var(--line-soft);
}

.case-study h4 {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.94rem;
}

.case-study-grid p {
  line-height: 1.58;
}

.case-study a,
.project-card a,
.link-row a,
.profile-links a {
  padding-top: 2px;
}

.project-card a[target="_blank"]::after,
.case-study a[target="_blank"]::after,
.profile-links a[target="_blank"]::after,
.link-row a[target="_blank"]::after {
  content: "↗";
  display: inline-block;
  margin-left: 0.28em;
  font-size: 0.82em;
  line-height: 1;
  transform: translateY(-0.04em);
}

.cv-section {
  padding-top: 76px;
  padding-bottom: 96px;
}

.cv-card {
  min-height: 126px;
  padding: 22px;
  background: rgba(247, 250, 251, 0.78);
}

.cv-card strong {
  color: var(--ink);
}

.contact {
  gap: 32px;
  padding: clamp(30px, 4vw, 44px);
  margin-bottom: 42px;
  background: #172126;
}

.contact p {
  max-width: 700px;
  color: rgba(255, 255, 255, 0.82);
}

.contact .eyebrow {
  color: #91e4d9;
}

.footer {
  align-items: center;
  padding-block: 28px;
  border-top-color: var(--line-soft);
  font-size: 0.92rem;
}

.footer p:first-child {
  color: var(--ink);
  font-weight: 750;
}

.footer p:last-child {
  color: var(--muted);
}

@media (max-width: 920px) {
  main {
    width: min(100% - 36px, 1120px);
  }

  .hero {
    gap: 42px;
    padding-top: 68px;
  }

  .profile-panel {
    justify-self: start;
    max-width: 100%;
  }

  .section {
    padding: 76px 0;
  }
}

@media (max-width: 680px) {
  main {
    width: min(calc(100% - 28px), 1120px);
  }

  .site-header {
    padding-block: 14px;
  }

  .nav {
    gap: 6px 10px;
    font-size: 0.84rem;
  }

  .hero {
    padding-top: 54px;
    padding-bottom: 48px;
  }

  h1 {
    font-size: clamp(2.15rem, 10vw, 2.65rem);
    line-height: 1;
  }

  h2 {
    font-size: clamp(1.7rem, 8vw, 2.05rem);
  }

  .lead {
    font-size: 1rem;
  }

  .summary {
    margin-bottom: 62px;
  }

  .section,
  #proyectos,
  #case-studies {
    padding: 62px 0;
  }

  .section-heading {
    margin-bottom: 26px;
  }

  .project-card,
  .case-study,
  .stack-list > div,
  .cv-card {
    padding: 20px;
  }

  .case-study-grid div {
    padding: 16px;
  }

  .contact {
    gap: 24px;
    padding: 26px;
  }

  .footer {
    align-items: flex-start;
    gap: 6px;
  }
}
