:root {
  color-scheme: light;
  --ink: #101214;
  --muted: #60676f;
  --line: #dfe3e8;
  --paper: #f5f7fa;
  --white: #ffffff;
  --accent: #f6c343;
  --accent-strong: #b17a00;
  --blue: #184a7c;
  --blue-soft: #e9f1f8;
  --charcoal: #0c1117;
  --chip: #eef2f6;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(16, 18, 20, 0.08);
  box-shadow: 0 10px 32px rgba(16, 18, 20, 0.06);
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto 1fr;
  min-height: 68px;
  padding: 0 6vw;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
}

.navlinks {
  display: flex;
  gap: 1.4rem;
  font-size: 0.92rem;
  font-weight: 800;
  justify-content: center;
}

.navlinks a {
  color: #2c3136;
  text-decoration: none;
}

.navlinks a:hover {
  color: var(--blue);
}

.language-switcher {
  display: flex;
  gap: 0.35rem;
  justify-content: flex-end;
}

.lang-button {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #2c3136;
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  min-height: 32px;
  padding: 0 0.62rem;
}

.lang-button.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.hero {
  background:
    radial-gradient(circle at 78% 18%, rgba(36, 82, 120, 0.46), transparent 32%),
    linear-gradient(120deg, #070a0f 0%, #111820 52%, #172231 100%);
  color: var(--white);
  min-height: clamp(680px, calc(100vh - 68px), 860px);
  overflow: hidden;
  position: relative;
}

.hero::after {
  background:
    linear-gradient(90deg, rgba(7, 10, 15, 0.98) 0%, rgba(7, 10, 15, 0.9) 42%, rgba(7, 10, 15, 0.15) 100%),
    linear-gradient(0deg, rgba(7, 10, 15, 0.52), transparent 46%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-media {
  background-image: url("./assets/images/marcos-professional.png");
  background-position: right 8vw bottom;
  background-repeat: no-repeat;
  background-size: min(43vw, 560px) auto;
  filter: saturate(0.95) contrast(1.04);
  inset: 0;
  mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 88%, transparent 100%);
  mix-blend-mode: lighten;
  opacity: 0.9;
  position: absolute;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 42%, #000 88%, transparent 100%);
}

.hero-content {
  max-width: 780px;
  padding: clamp(5rem, 11vh, 8rem) 6vw 5rem;
  position: relative;
  z-index: 1;
}

.eyebrow,
.section-kicker {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(4.5rem, 10vw, 8rem);
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0 0 1rem;
  max-width: 7ch;
}

.headline {
  color: #f4f7fa;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  font-weight: 900;
  line-height: 1.24;
  margin: 0 0 1rem;
  max-width: 680px;
}

.hero-summary {
  color: #d5dce5;
  font-size: 1.08rem;
  margin: 0;
  max-width: 620px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
  max-width: 680px;
}

.hero-proof span {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #f7f9fb;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0.42rem 0.68rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.7rem;
}

.button {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 6px;
  display: inline-flex;
  font-weight: 900;
  justify-content: center;
  min-height: 44px;
  padding: 0.72rem 1.02rem;
  text-decoration: none;
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #101214;
}

.button.primary:hover {
  background: #ffd769;
  border-color: #ffd769;
}

.button.secondary {
  background: transparent;
  color: inherit;
}

.section {
  margin: 0 auto;
  max-width: 1160px;
  padding: 4.8rem 6vw;
  scroll-margin-top: 84px;
  width: 100%;
}

.section h2 {
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

.section-header {
  max-width: 820px;
  margin-bottom: 2rem;
}

.section-header p:not(.section-kicker),
.intro-copy,
.contact-section p {
  color: var(--muted);
  font-size: 1.02rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.intro-grid {
  align-items: start;
  display: grid;
  gap: clamp(2rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-width: 0;
}

.intro-copy p {
  max-width: 100%;
  margin-top: 0;
  overflow-wrap: anywhere;
}

.proof-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  max-width: none;
  padding-top: 3.2rem;
  padding-bottom: 3.2rem;
}

.proof-band div {
  border-left: 3px solid var(--accent);
  padding: 0.2rem 0 0.2rem 1rem;
}

.proof-band strong {
  display: block;
  font-size: 1.45rem;
}

.proof-band span {
  color: var(--muted);
  display: block;
  font-size: 0.94rem;
}

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

.skill-group,
.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(16, 18, 20, 0.04);
}

.skill-group {
  padding: 1.25rem;
}

.skill-group h3 {
  color: var(--blue);
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.85rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip {
  background: var(--chip);
  border: 1px solid #dce2e8;
  border-radius: 999px;
  color: #313840;
  font-size: 0.8rem;
  font-weight: 820;
  padding: 0.34rem 0.6rem;
}

.projects-section {
  max-width: 1240px;
}

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

.project-card {
  display: grid;
  gap: 1rem;
  overflow: hidden;
  padding: 0;
}

.project-card.featured {
  background:
    linear-gradient(180deg, rgba(24, 74, 124, 0.07), rgba(255, 255, 255, 0) 42%),
    var(--white);
  border-color: rgba(24, 74, 124, 0.22);
}

.project-image {
  aspect-ratio: 16 / 9;
  background: #dfe5ec;
  border-bottom: 1px solid var(--line);
  margin: 0;
  overflow: hidden;
}

.project-image img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.project-body {
  display: grid;
  gap: 1rem;
  padding: 1.3rem;
}

.project-topline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
}

.project-category {
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 950;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.project-period {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 820;
}

.project-card h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0;
}

.project-subtitle {
  color: #3f4852;
  font-weight: 850;
  margin: 0;
}

.project-card p {
  color: var(--muted);
  margin: 0;
}

.project-label {
  color: var(--ink);
  font-weight: 900;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.project-links a {
  border-bottom: 2px solid var(--accent);
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

.impact-list {
  margin: 0;
  padding-left: 1.05rem;
}

.impact-list li {
  color: #434b54;
  margin: 0.25rem 0;
}

.contact-section {
  align-items: end;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2rem;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.contact-details {
  color: var(--muted);
  flex-basis: 100%;
  font-size: 0.96rem;
  line-height: 1.45;
  margin-bottom: 0.2rem;
  text-align: right;
}

.contact-details p {
  margin: 0.2rem 0;
}

.contact-details strong {
  color: var(--ink);
}

.footer {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  font-size: 0.92rem;
  justify-content: space-between;
  padding: 1.2rem 6vw;
}

@media (max-width: 960px) {
  .hero-media {
    background-position: right 2vw bottom;
    background-size: min(58vw, 500px) auto;
    opacity: 0.64;
  }

  .hero::after {
    background:
      linear-gradient(90deg, rgba(7, 10, 15, 0.98) 0%, rgba(7, 10, 15, 0.88) 58%, rgba(7, 10, 15, 0.28) 100%),
      linear-gradient(0deg, rgba(7, 10, 15, 0.58), transparent 46%);
  }
}

@media (max-width: 840px) {
  .topbar {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.9rem 5vw;
  }

  .navlinks {
    gap: 0.85rem;
    overflow-x: auto;
    width: 100%;
  }

  .language-switcher {
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    background-position: center bottom;
    background-size: min(82vw, 430px) auto;
    opacity: 0.42;
  }

  .hero-content {
    padding: 5rem 5vw 4.5rem;
  }

  .intro-grid,
  .proof-band,
  .skills-grid,
  .projects-grid,
  .contact-section {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .intro-grid > *,
  .intro-copy,
  .section-header,
  .contact-section > * {
    max-width: 100%;
    min-width: 0;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .contact-details {
    text-align: left;
  }

  .footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.3rem;
  }
}

@media (max-width: 520px) {
  .section h2 {
    font-size: 2rem;
    line-height: 1.05;
    max-width: 12ch;
    overflow-wrap: break-word;
  }

  .hero h1 {
    font-size: 3.55rem;
    line-height: 0.94;
    max-width: 7ch;
  }

  .eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    max-width: 34ch;
  }

  .headline {
    font-size: 1rem;
    line-height: 1.35;
    max-width: 32ch;
  }

  .hero-summary {
    font-size: 0.98rem;
    line-height: 1.5;
    max-width: 33ch;
  }

  .hero-proof {
    display: none;
  }

  .section {
    padding: 3.8rem 5vw;
  }

  .intro-copy,
  .section-header p:not(.section-kicker),
  .contact-section p {
    max-width: 34ch;
  }
}
