/* Base colors and defaults */
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #282a2d;
  color: #f3f5ef;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

/* Page layout */
.page {
  width: min(960px, calc(100% - 64px));
  margin: auto;
}

header {
  padding: 38px 0;
  border-bottom: 1px solid #34413b;
}

.name {
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: .025em;
}

main {
  min-height: calc(100svh - 100px);
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  padding: 64px 0 90px;
}

.eyebrow {
  margin: 0 0 24px;
  color: #b7d2ab;
  font-size: .875rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 600;
}

/* Heading and biography */
h1 {
  margin: 0 0 30px;
  font-size: clamp(2.4rem, 4.9vw, 4.4rem);
  line-height: 1.04;
  letter-spacing: -.055em;
  font-weight: 650;
}

.intro {
  max-width: 30rem;
  font-size: clamp(1.1rem, 1.8vw, 1.2rem);
  line-height: 1.75;
  color: #c4cec7;
}

.intro p {
  margin: 0 0 18px;
}

.intro p:last-child {
  margin-bottom: 0;
}

/* Portrait and its soft glow */
figure {
  margin: 0;
}

.portrait {
  display: block;
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 2px solid #00ABD8;
  box-shadow: 0 0 28px 3px rgb(0 171 216 / 8%), 0 0 85px 22px rgb(0 171 216 / 6%), 0 0 150px 45px rgb(0 171 216 / 3%);
}

/* Mobile layout (700px and below) */
@media (max-width: 700px) {
  .page {
    width: calc(100% - 40px);
  }
  header {
    padding: 26px 0;
  }
  main {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 48px 0;
  }
  h1 {
    margin-bottom: 24px;
  }
  figure {
    width: min(100%, 420px);
  }
}

/* Social links: small icons with generous keyboard and touch targets. */
.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  transition: transform 180ms ease;
}

.social-icon {
  display: block;
  width: 23px;
  height: 23px;
  object-fit: contain;
}

.social-icon--mono {
  filter: invert(88%);
}

.social-link:hover, .social-link:focus-visible {
  transform: translateY(-3px) scale(1.08);
}

.social-link:focus-visible {
  outline: none;
}

.social-link:focus-visible .social-icon {
  filter: brightness(0) invert(1) drop-shadow(0 0 3px rgb(255 255 255 / 55%));
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .social-link {
    transition: none;
  }
  .social-link:hover, .social-link:focus-visible {
    transform: none;
  }
}

/* Keep the greeting with the portrait;
introduce Kevin first on mobile. */
main {
  grid-template-areas: "profile about";
}

.about {
  grid-area: about;
  min-width: 0;
}

.profile {
  grid-area: profile;
  min-width: 0;
}

.profile h1 {
  text-align: center;
}

/* Mobile layout (700px and below) */
@media (max-width: 700px) {
  main {
    grid-template-areas: "profile" "about";
  }
  .profile {
    width: min(100%, 380px);
    justify-self: center;
  }
}
