:root {
  --bg: #f3eee3;
  --bg-soft: #fbf8f1;
  --text: #111111;
  --line: rgba(17, 17, 17, 0.14);
  --shadow: 0 28px 70px rgba(17, 17, 17, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 32px;
  background: var(--bg);
  color: var(--text);
  font-family: "Instrument Sans", sans-serif;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.85), transparent 28%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 17, 17, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 85%);
}

.page {
  width: min(1080px, 100%);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 420px);
  grid-template-areas:
    "title profile"
    "links profile"
    "social profile";
  column-gap: clamp(32px, 7vw, 88px);
  row-gap: 18px;
  align-items: center;
}

h1 {
  grid-area: title;
  align-self: end;
  margin: 0;
  max-width: 4ch;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(4.2rem, 11vw, 8rem);
  line-height: 0.84;
  font-weight: 600;
  letter-spacing: -0.05em;
}

.profile {
  grid-area: profile;
  justify-self: end;
  display: block;
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 38%;
  border-radius: 28px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background: #e9e4d8;
  box-shadow: var(--shadow);
}

.links {
  grid-area: links;
  display: grid;
  align-self: start;
  width: min(100%, 420px);
}

.links a {
  display: block;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition:
    padding-left 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.links a:last-child {
  border-bottom: 1px solid var(--line);
}

.links a:hover {
  padding-left: 10px;
  border-color: rgba(17, 17, 17, 0.3);
}

.links a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.social {
  grid-area: social;
  display: flex;
  gap: 12px;
  align-self: start;
}

.social a {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: inherit;
  text-decoration: none;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.social a:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 17, 17, 0.3);
  background: rgba(255, 255, 255, 0.45);
}

.social a:focus-visible {
  outline: 2px solid #111111;
  outline-offset: 3px;
}

.social svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social svg .fill {
  fill: currentColor;
  stroke: none;
}

@media (prefers-reduced-motion: reduce) {
  .links a,
  .social a {
    transition: none;
  }
}

@media (max-width: 760px) {
  body {
    padding: 18px;
  }

  .page {
    min-height: auto;
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "profile"
      "links"
      "social";
    row-gap: 18px;
  }

  h1 {
    max-width: none;
  }

  .profile,
  .links {
    width: 100%;
  }

  .profile {
    justify-self: stretch;
  }
}
