:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --ink: #10202a;
  --muted: #5d6d73;
  --line: #dce5df;
  --teal: #0f766e;
  --teal-dark: #104e47;
  --mint: #dff5ee;
  --amber: #d9912b;
  --coral: #b9503e;
  --shadow: 0 22px 55px rgba(16, 32, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 14px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(220, 229, 223, 0.85);
  background: rgba(246, 248, 245, 0.92);
  backdrop-filter: blur(18px);
}

.brand,
.site-nav,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.86rem;
}

.site-nav {
  gap: 8px;
}

.site-nav a {
  padding: 9px 12px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--mint);
  color: var(--teal-dark);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.section-shell {
  width: min(1120px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: clamp(32px, 6vw, 76px);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(54px, 9vw, 104px) 0 72px;
}

.eyebrow,
.section-kicker,
.project-label {
  margin: 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  font-size: clamp(2.45rem, 6.8vw, 5.45rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  font-size: 1.08rem;
  line-height: 1.25;
}

.hero-text {
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1.02rem, 1.7vw, 1.22rem);
}

.hero-actions,
.contact-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  background: var(--teal);
  color: var(--surface);
}

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(155deg, #ffffff 0%, #edf8f2 52%, #f8efe2 100%);
  box-shadow: var(--shadow);
}

.availability {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--teal-dark);
  font-size: 0.84rem;
  font-weight: 800;
}

.availability span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #20b26b;
}

.hero-photo {
  width: min(100%, 410px);
  aspect-ratio: 4 / 5;
  margin: 22px auto 24px;
  border: 1px solid rgba(220, 229, 223, 0.95);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  box-shadow: 0 24px 48px rgba(16, 32, 42, 0.16);
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick-stats article,
.project-card,
.timeline article,
.skill-groups article,
.credential-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.quick-stats article {
  padding: 14px;
}

.quick-stats strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.1;
}

.quick-stats span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: clamp(24px, 6vw, 80px);
  align-items: start;
  padding: 82px 0 72px;
  border-top: 1px solid var(--line);
}

.intro-grid p {
  color: var(--muted);
  font-size: 1.12rem;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 28px;
}

#proyectos,
.split-section,
.skills-section,
.credentials,
.services-section {
  padding: 76px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  min-height: 260px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 18px 38px rgba(16, 32, 42, 0.1);
}

.project-card.featured {
  background: var(--ink);
  color: var(--surface);
}

.project-card.store-card {
  min-height: 320px;
  background:
    linear-gradient(180deg, rgba(223, 245, 238, 0.58), rgba(255, 255, 255, 0.92)),
    var(--surface);
}

.project-card p:not(.project-label) {
  color: var(--muted);
}

.project-card.featured p:not(.project-label) {
  color: #d5e1df;
}

.project-card a,
.credential-card a {
  color: var(--teal);
  font-weight: 800;
}

.project-card.featured a {
  color: #8de8cd;
}

.project-image-link {
  display: block;
  margin-bottom: 18px;
}

.project-image-link:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 4px;
}

.project-visual {
  width: 100%;
  aspect-ratio: 16 / 10;
  border: 1px solid rgba(220, 229, 223, 0.95);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 14px 28px rgba(16, 32, 42, 0.09);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.project-meta span {
  padding: 7px 10px;
  border: 1px solid rgba(15, 118, 110, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--teal-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline article {
  padding: 24px;
}

.timeline span {
  display: block;
  margin-bottom: 8px;
  color: var(--coral);
  font-size: 0.9rem;
  font-weight: 800;
}

.timeline p,
.timeline li,
.credential-card p {
  color: var(--muted);
}

.timeline ul {
  margin: 14px 0 0;
  padding-left: 20px;
}

.skill-groups,
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.skill-groups article,
.credential-card,
.services-grid article {
  padding: 24px;
}

.services-grid article {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.services-grid p {
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4f0;
  color: var(--teal-dark);
  font-size: 0.88rem;
  font-weight: 700;
}

.credentials .section-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.credential-card {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  gap: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.credential-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.32);
  box-shadow: 0 18px 38px rgba(16, 32, 42, 0.1);
}

.credential-card small {
  align-self: flex-start;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.credential-card p {
  margin-bottom: 0;
  font-size: 0.93rem;
  line-height: 1.5;
}

.featured-credential {
  grid-column: span 2;
}

.image-card {
  overflow: hidden;
}

.image-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #eef4f0;
}

.image-card span {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.3;
}

.contact-section {
  margin-top: 60px;
  background: var(--ink);
  color: var(--surface);
}

.contact-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 72px 0;
}

.contact-inner .section-kicker {
  color: var(--amber);
}

.contact-inner h2 {
  max-width: 760px;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 64px);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--teal);
  font-weight: 800;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: 72px 18px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 14px;
  }

  .hero,
  .intro-grid,
  .contact-inner {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
  }

  .hero-panel {
    max-width: 560px;
  }

  .project-grid,
  .skill-groups,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .credential-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-credential {
    grid-column: auto;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .contact-actions {
    margin-top: 0;
  }
}

@media (max-width: 560px) {
  .site-header {
    min-height: 66px;
    padding-inline: 16px;
  }

  .brand span:last-child {
    display: none;
  }

  .section-shell {
    width: min(100% - 28px, 1120px);
  }

  .quick-stats {
    grid-template-columns: 1fr;
  }

  .credential-grid {
    grid-template-columns: 1fr;
  }

  .button,
  .hero-actions,
  .contact-actions {
    width: 100%;
  }

  .site-footer {
    flex-direction: column;
  }
}
