@import url("https://fonts.googleapis.com/css?family=Montserrat:400,500,600");

:root {
  --accent: #e94f45;
  --ink: #f6f6f4;
  --muted: rgba(255, 255, 255, .62);
  --line: rgba(255, 255, 255, .18);
  --page-max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #070809;
}

body {
  position: relative;
  display: grid;
  grid-template-rows: 80px 1fr 58px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: #070809 url("./assets/images/bk2.jpg") center / cover fixed no-repeat;
  font-family: "Montserrat", "Noto Sans TC", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: rgba(2, 4, 6, .87);
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 3px solid rgba(233, 79, 69, .55);
  outline-offset: 4px;
}

.card-header,
.profile-layout,
.card-footer {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), var(--page-max));
  margin-inline: auto;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  position: relative;
  z-index: 3;
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: .16em;
}

.brand span,
.profile-content h1 span {
  color: var(--accent);
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  transition: color .2s ease;
}

.portfolio-link:hover {
  color: #fff;
}

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1.18fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
  padding-block: 34px 54px;
}

.profile-photo {
  position: relative;
  width: 100%;
  max-height: 680px;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: 18px 18px 0 rgba(255, 255, 255, .055);
}

.profile-photo::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
}

.profile-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.02) brightness(.9);
}

.profile-photo figcaption {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  color: rgba(255, 255, 255, .72);
  background: rgba(5, 6, 7, .86);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.profile-content {
  max-width: 610px;
}

.eyebrow,
.disciplines,
.card-footer {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
}

.profile-content h1 {
  margin: 0;
  font-size: 4.6rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.role {
  margin: 20px 0 0;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
}

.disciplines {
  margin: 10px 0 0;
  color: var(--muted);
}

.intro {
  max-width: 570px;
  margin: 34px 0 0;
  padding-top: 30px;
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, .74);
  font-size: 1rem;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.social-links a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: rgba(255, 255, 255, .72);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.social-links a:hover {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.social-links .email-link {
  margin-left: 25px;
}

.social-links svg {
  display: block;
  width: 1em;
  height: 1em;
  overflow: visible;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, .36);
  font-size: .58rem;
}

@media (max-width: 800px) {
  body {
    grid-template-rows: 68px 1fr 50px;
    background-attachment: scroll;
  }

  .card-header,
  .profile-layout,
  .card-footer {
    width: min(calc(100% - 32px), 640px);
  }

  .profile-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-block: 20px 48px;
  }

  .profile-photo {
    width: min(100%, 520px);
    max-height: 560px;
    margin-inline: auto;
  }

  .profile-content {
    max-width: 100%;
  }

  .profile-content h1 {
    font-size: 3.6rem;
  }
}

@media (max-width: 480px) {
  .profile-photo {
    max-height: 470px;
    box-shadow: 10px 10px 0 rgba(255, 255, 255, .055);
  }

  .profile-photo figcaption {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .profile-content h1 {
    font-size: 3rem;
  }

  .card-footer span:last-child {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
