:root {
  --accent: #08679f;
  --accent-dark: #064f7a;
  --text: #5e5e5e;
  --dark: #1b1b1b;
  --page-width: 936px;
  --gutter: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.5 Poppins, Arial, sans-serif;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-dark);
}

a:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 3px;
}

/* Profile: text on the left, name, photo and contact on the right */

.profile {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 48px;
  align-items: start;
  width: 100%;
  max-width: calc(var(--page-width) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 32px var(--gutter) 72px;
}

.tagline {
  color: var(--accent);
  font: 400 24px/1.4 Adamina, Georgia, serif;
}

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

h1 {
  color: var(--accent);
  font: 400 33px/1.2 Adamina, Georgia, serif;
  text-align: center;
  text-transform: uppercase;
}

.credential {
  margin: 4px 0 20px;
  text-align: center;
  text-wrap: balance;
}

.sidebar img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 15%; /* square crop keeps the face in frame */
}

/* Contact */

.contact {
  margin-top: 24px;
  overflow-wrap: anywhere;
}

h2 {
  margin-bottom: 8px;
  color: var(--dark);
  font-size: 16px;
  font-weight: 600;
}

.button {
  display: inline-block;
  margin-top: 16px;
  padding: 16px 32px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-dark);
  color: #fff;
}

/* Footer */

.site-footer {
  padding: 40px var(--gutter);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

.site-footer p {
  max-width: var(--page-width);
  margin: 0 auto;
}

/* Small screens: one column, text first, then name, photo and contact */

@media (max-width: 767px) {
  .profile {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-top: 24px;
    padding-bottom: 48px;
  }

  .sidebar {
    text-align: center;
  }

  .sidebar img {
    margin: 0 auto;
  }

  .tagline {
    text-align: center;
  }

  .site-footer {
    text-align: center;
  }
}
