:root {
  --ink: #101114;
  --text: #262a31;
  --muted: #6d7480;
  --line: #dfe4ea;
  --paper: #f7f9fb;
  --white: #ffffff;
  --card: #ffffff;
  --soft: #edf7f9;
  --field: #fbfcfd;
  --body-muted: #424a56;
  --intro: #3e4652;
  --header-bg: rgba(255, 255, 255, 0.86);
  --profile-caption-bg: #182233;
  --profile-caption-text: #ffffff;
  --profile-caption-muted: rgba(255, 255, 255, 0.72);
  --cyan: #18c7df;
  --cyan-dark: #0997ad;
  --green: #3bb273;
  --coral: #e56a54;
  --navy: #182233;
  --shadow: 0 18px 50px rgba(16, 17, 20, 0.12);
}

[data-theme='dark'] {
  color-scheme: dark;
  --ink: #f6f8fb;
  --text: #d8dee8;
  --muted: #a9b3c2;
  --line: rgba(222, 230, 242, 0.16);
  --paper: #090d14;
  --white: #ffffff;
  --card: #111925;
  --soft: rgba(24, 199, 223, 0.12);
  --field: #0c121b;
  --body-muted: #c0cad7;
  --intro: #c8d2df;
  --header-bg: rgba(13, 19, 29, 0.9);
  --profile-caption-bg: #111925;
  --profile-caption-text: #f6f8fb;
  --profile-caption-muted: #b8c3d1;
  --cyan: #22d6ef;
  --cyan-dark: #50ddec;
  --green: #63d693;
  --coral: #ff806b;
  --navy: #dce8f6;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--paper);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  background: var(--cyan);
  font-weight: 900;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  outline: 3px solid rgba(24, 199, 223, 0.25);
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 74px;
  margin: 16px auto 0;
  padding: 12px 18px;
  border: 1px solid rgba(223, 228, 234, 0.85);
  border-radius: 8px;
  background: var(--header-bg);
  box-shadow: 0 10px 30px rgba(16, 17, 20, 0.08);
  backdrop-filter: blur(18px);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 8px 18px rgba(16, 17, 20, 0.1));
}

[data-theme='dark'] .brand img {
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.28));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--ink);
  background: var(--soft);
  outline: none;
}

.theme-toggle,
.menu-toggle {
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--card);
  cursor: pointer;
}

.theme-toggle {
  display: grid;
}

.theme-toggle:focus-visible,
.menu-toggle:focus-visible,
.skill-chip:focus-visible,
.timeline-toggle:focus-visible {
  outline: 3px solid rgba(24, 199, 223, 0.24);
  outline-offset: 3px;
}

.menu-toggle {
  display: none;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .moon-icon {
  display: none;
}

[data-theme='dark'] .theme-toggle .sun-icon {
  display: block;
}

.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 92px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.98fr) minmax(430px, 1.02fr);
  align-items: center;
  gap: 42px;
  min-height: calc(100vh - 90px);
  padding-top: 64px;
}

.hero-content h1,
.section-heading h2,
.contact-copy h2 {
  margin: 0;
  color: var(--ink);
  letter-spacing: 0;
  line-height: 1.04;
}

.hero-content h1 {
  max-width: 760px;
  font-size: clamp(3rem, 9vw, 6.9rem);
}

.hero-content p {
  max-width: 680px;
  margin: 26px 0 0;
  color: var(--intro);
  font-size: 1.17rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan-dark);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: '';
  width: 34px;
  height: 3px;
  border-radius: 999px;
  background: var(--coral);
}

.hero-actions,
.quick-links,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.hero-actions {
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  color: var(--ink);
  background: var(--cyan);
  box-shadow: 0 14px 30px rgba(24, 199, 223, 0.28);
}

.btn.secondary {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}

.btn.secondary2 {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line);
}
.quick-links {
  margin-top: 26px;
}

.quick-links a {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(16, 17, 20, 0.06);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.quick-links a:hover,
.quick-links a:focus-visible {
  border-color: rgba(24, 199, 223, 0.75);
  box-shadow: 0 14px 28px rgba(24, 199, 223, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.quick-links img,
.contact-links img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(10%) sepia(14%) saturate(1161%) hue-rotate(179deg)
    brightness(92%) contrast(92%);
}

[data-theme='dark'] .quick-links img,
[data-theme='dark'] .contact-links img {
  filter: brightness(0) saturate(100%) invert(91%) sepia(14%) saturate(633%) hue-rotate(176deg)
    brightness(102%) contrast(93%);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(24, 34, 51, 0.95), rgba(16, 17, 20, 0.96)),
    url('assets/images/matheus-profile.png') center 18% / cover;
  box-shadow: var(--shadow);
}
.hero-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.55;
}

.hero-logo,
.hero-panel-title,
.metric-grid {
  position: relative;
  z-index: 1;
}

.hero-logo {
  width: min(200px, 88%);
  margin: 0 0 42px;
  transform: translate(-12px, -8px) scale(0.7);
  transform-origin: top left;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.26));
}

.hero-panel-title {
  margin: 0 0 28px;
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  line-height: 1.12;
  text-align: center;
}

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

.metric-grid article {
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.metric-grid strong {
  display: block;
  color: var(--cyan);
  font-size: 1.9rem;
  line-height: 1;
}

.metric-grid span {
  display: block;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.58fr) minmax(0, 1.16fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading.compact {
  display: block;
  max-width: 820px;
}

.section-heading h2,
.contact-copy h2 {
  max-width: 880px;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: 1.12;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr);
  gap: 28px;
  align-items: start;
}

.about-copy {
  display: grid;
  align-content: start;
  padding: 34px;
  border-left: 5px solid var(--cyan);
  background: var(--card);
  box-shadow: 0 16px 40px rgba(16, 17, 20, 0.07);
}

.about-copy p {
  margin: 0;
  color: var(--body-muted);
  font-size: 1.06rem;
}

.about-copy p + p {
  margin-top: 18px;
}

.profile-card {
  display: grid;
  grid-template-rows: auto auto;
  align-self: start;
  justify-self: end;
  overflow: hidden;
  width: min(100%, 430px);
  max-width: 490px;
  min-height: 0;
  border-radius: 8px;
  background: var(--profile-caption-bg);
  box-shadow: var(--shadow);
}

.profile-card img {
  display: block;
  width: 100%;
  height: clamp(360px, 36vw, 440px);
  min-height: 0;
  object-fit: cover;
  object-position: center 18%;
}

.profile-card div {
  padding: 20px;
  color: var(--profile-caption-text);
  background: var(--profile-caption-bg);
}

.profile-card strong,
.profile-card span {
  display: block;
}

.profile-card span {
  margin-top: 4px;
  color: var(--profile-caption-muted);
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.skill-chip {
  max-width: 280px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(16, 17, 20, 0.04);
  cursor: pointer;
  font-weight: 850;
  text-align: left;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.skill-chip:hover,
.skill-chip[aria-expanded='true'] {
  border-color: rgba(26, 196, 219, 0.55);
  box-shadow: 0 14px 30px rgba(16, 17, 20, 0.08);
  transform: translateY(-2px);
}

.skill-chip span {
  display: block;
}

.skill-chip small {
  display: block;
  width: min(220px, 100%);
  max-height: 0;
  overflow: hidden;
  color: var(--body-muted);
  font-size: 0.88rem;
  font-weight: 650;
  line-height: 1.42;
  opacity: 0;
  transition:
    max-height 0.22s ease,
    margin-top 0.22s ease,
    opacity 0.18s ease;
}

.skill-chip[aria-expanded='true'] small {
  max-height: 96px;
  margin-top: 8px;
  opacity: 1;
}

.timeline-stack {
  display: grid;
  gap: 16px;
}

.timeline-card {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 14px 38px rgba(16, 17, 20, 0.07);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.timeline-card:has(.timeline-toggle[aria-expanded='true']) {
  border-color: rgba(26, 196, 219, 0.48);
  box-shadow: 0 18px 42px rgba(16, 17, 20, 0.1);
}

.timeline-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 28px;
  width: 100%;
  padding: 28px 60px 28px 32px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.timeline-toggle::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: 30px;
  color: var(--cyan-dark);
  font-size: 1.45rem;
  font-weight: 950;
  line-height: 1;
  transform: translateY(-50%);
}

.timeline-toggle[aria-expanded='true']::after {
  content: '–';
}

.timeline-date {
  color: var(--cyan-dark);
  font-size: 0.92rem;
  font-weight: 950;
  white-space: nowrap;
}

.timeline-title,
.project-card h3,
.service-grid h3,
.proof-card h3 {
  margin: 0;
  color: var(--ink);
  line-height: 1.16;
}

.timeline-title {
  display: block;
  font-weight: 900;
}

.timeline-card p {
  margin: 12px 0 18px;
  color: var(--body-muted);
}

.timeline-details {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.28s ease,
    opacity 0.2s ease;
}

.timeline-toggle[aria-expanded='true'] + .timeline-details {
  max-height: 180px;
  opacity: 1;
}

.timeline-card ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0 60px 30px 250px;
  color: var(--body-muted);
}

.project-grid,
.service-grid,
.proof-grid {
  display: grid;
  gap: 18px;
}

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

.project-card,
.service-grid article,
.proof-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 32px rgba(16, 17, 20, 0.07);
}

.project-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--field);
}

.project-content {
  display: flex;
  min-height: 340px;
  flex-direction: column;
  padding: 20px;
}

.project-type {
  display: block;
  margin-bottom: 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.project-card p,
.service-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.project-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.project-stack li {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--field);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin-top: auto;
  color: var(--cyan-dark);
  font-size: 0.9rem;
  font-weight: 950;
  text-decoration: none;
}

.project-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.project-link:hover svg,
.project-link:focus-visible svg {
  transform: translate(2px, -2px);
}

.service-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 28px;
}

.service-grid article {
  min-height: 230px;
  padding: 24px;
}

.service-grid i,
.service-grid svg {
  width: 34px;
  height: 34px;
  margin-bottom: 18px;
  color: var(--coral);
}

.proof-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.proof-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  background: var(--field);
}

.proof-card h3 {
  padding: 16px;
  font-size: 1.02rem;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(320px, 1fr);
  gap: 34px;
  align-items: start;
}

.contact-copy p {
  margin: 20px 0 0;
  color: var(--body-muted);
  font-size: 1.08rem;
}

.contact-links {
  margin-top: 28px;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  background: var(--card);
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(16, 17, 20, 0.06);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: rgba(24, 199, 223, 0.75);
  box-shadow: 0 14px 28px rgba(24, 199, 223, 0.16);
  outline: none;
  transform: translateY(-2px);
}

.contact-form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 850;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  color: var(--ink);
  background: var(--field);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--cyan-dark);
  outline: 3px solid rgba(24, 199, 223, 0.16);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer img {
  width: 190px;
  filter: drop-shadow(0 8px 16px rgba(16, 17, 20, 0.08));
}

[data-theme='dark'] .site-footer img {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.28));
}

svg {
  width: 1.12em;
  height: 1.12em;
  stroke-width: 2.2;
}

@media (max-width: 980px) {
  .site-header {
    align-items: center;
  }

  .menu-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    width: 100%;
  }

  .hero,
  .about-grid,
  .contact,
  .section-heading,
  .timeline-card {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 620px) {
  .site-header,
  .section,
  .site-footer {
    width: min(100% - 22px, 1180px);
  }

  .brand img {
    width: 48px;
  }

  .section {
    padding: 64px 0;
  }

  .hero-content h1 {
    font-size: 3.18rem;
  }

  .hero-content p {
    font-size: 1.02rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-panel,
  .about-copy,
  .contact-form {
    padding: 22px;
  }

  .timeline-toggle {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 22px 54px 22px 22px;
  }

  .timeline-card ul {
    padding: 0 22px 24px 42px;
  }

  .metric-grid,
  .project-grid,
  .service-grid,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .service-grid article {
    min-height: auto;
  }

  .contact-links a {
    width: 100%;
  }
}
