/* Compact, editable profile based on the supplied personal introduction. */
.profile.section { padding-block: 24px; }
.profile .profile__overview { display: grid; grid-template-columns: minmax(190px, 22%) 1fr; align-items: center; gap: 26px; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 1px solid var(--line-dark); }
.profile .profile__heading h2 { font-size: clamp(28px, 2.8vw, 40px); line-height: 1.15; letter-spacing: .03em; }
.profile .profile__heading p { margin-top: 4px; color: #aaaab0; font-size: 12px; letter-spacing: .04em; }
.profile__highlights { display: grid; grid-template-columns: .8fr 1fr 1.15fr; }
.profile__highlights > div { display: grid; gap: 5px; padding-inline: 20px; border-left: 1px solid var(--line-dark); }
.profile__highlights > div:first-child { border-left: 0; padding-left: 0; }
.profile__highlights strong { color: var(--orange); font-size: clamp(22px, 2.35vw, 34px); line-height: 1.2; white-space: nowrap; }
.profile__highlights > div:last-child strong { font-size: clamp(18px, 1.85vw, 27px); align-self: center; }
.profile__highlights span { font-size: 12px; color: #aaaab0; }
.profile .profile__layout { display: grid; grid-template-columns: minmax(190px, 22%) 1fr; gap: 26px; align-items: start; }
.profile__identity { overflow: hidden; border: 1px solid var(--line-dark); border-radius: 12px; background: #0a0a0b; }
/* Display the standalone portrait at its original aspect ratio. */
.profile__portrait { aspect-ratio: 1222 / 1287; overflow: hidden; }
.profile__portrait img { display: block; width: 100%; height: auto; }
.profile__name { padding: 10px 18px; background: linear-gradient(105deg, #603719, #211d19 80%); }
.profile__name h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: .03em; }
.profile__name h3 span { color: var(--orange); font-size: 16px; white-space: nowrap; }
.profile__name p { margin-top: 4px; color: #d1c6bd; font-size: 13px; }
.profile .profile__facts { display: grid; grid-template-columns: 1fr; margin: 0; padding: 7px 14px 10px; border: 0; }
.profile .profile__facts div { display: grid; grid-template-columns: 32px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-dark); }
.profile .profile__facts div:last-child { grid-column: auto; border: 0; }
.profile .profile__facts dt, .profile .profile__facts dd { margin: 0; font-size: 12px; line-height: 1.4; }
.profile .profile__facts dt { color: #99999f; }
.profile .profile__facts dd { color: #d4d4d8; overflow-wrap: anywhere; }
.profile__work { min-width: 0; }
.profile__summary { margin-bottom: 12px; color: #dedee2; font-size: clamp(13px, 1.1vw, 15px); line-height: 1.65; }
.profile__company + .profile__company { margin-top: 12px; }
.profile__company > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 16px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: linear-gradient(100deg, #252525, #181818 68%, #683000); }
.profile__company h3 { margin: 0; font-size: clamp(14px, 1.25vw, 17px); font-weight: 650; line-height: 1.3; }
.profile__company header p { color: #d0c8c1; font-size: 11px; white-space: nowrap; }
.profile__company header p span { margin-left: 8px; padding-left: 8px; border-left: 1px solid #75695f; }
.profile__projects { display: grid; gap: 9px; padding: 10px 4px 0 8px; }
.profile__projects section { padding-left: 12px; }
.profile__projects h4 { position: relative; margin: 0 0 3px; color: #efeff1; font-size: clamp(13px, 1.15vw, 16px); line-height: 1.4; font-weight: 600; }
.profile__projects h4::before { content: ''; position: absolute; top: .18em; bottom: .18em; left: -12px; width: 3px; background: var(--orange); }
.profile__projects p { color: #a9a9af; font-size: clamp(12px, 1.05vw, 14px); line-height: 1.65; }
.profile__early { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-dark); font-size: 12px; line-height: 1.4; }
.profile__early strong { color: #dddde1; font-weight: 600; }
.profile__early span { color: #96969e; }
.profile .stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 18px; }
.profile .stats-grid article { gap: 5px; padding: 12px 16px; border-right: 1px solid var(--line-dark); border-bottom: 0; }
.profile .stats-grid article:last-child { border-right: 0; }
.profile .stats-grid strong { font-size: clamp(25px, 2.5vw, 34px); line-height: 1.1; }
.profile .stats-grid span { font-size: 11px; line-height: 1.4; }

/* Short desktop windows keep the full profile and six results in one view. */
@media (min-width: 901px) and (max-height: 800px) {
  .profile.section { padding-block: 18px; }
  .profile .profile__overview { padding-bottom: 10px; margin-bottom: 12px; }
  .profile__name { padding-block: 8px; }
  .profile__name h3 { font-size: 24px; }
  .profile__name p { margin-top: 2px; }
  .profile .profile__facts div { padding-block: 3px; }
  .profile__summary { margin-bottom: 8px; }
  .profile__company + .profile__company { margin-top: 8px; }
  .profile__company > header { padding-block: 7px; }
  .profile__projects { gap: 6px; padding-top: 8px; }
  .profile__projects h4 { margin-bottom: 2px; }
  .profile__early { margin-top: 8px; padding-top: 8px; }
  .profile .stats-grid { margin-top: 12px; }
  .profile .stats-grid article { padding-block: 10px; }
}

@media (max-width: 1050px) and (min-width: 901px) {
  .profile .profile__layout, .profile .profile__overview { grid-template-columns: 190px 1fr; gap: 20px; }
  .profile__highlights > div { padding-inline: 12px; }
  .profile__company header p { font-size: 10px; }
}

@media (max-width: 900px) {
  .profile.section { padding-block: 32px; }
  .profile .profile__overview { grid-template-columns: 1fr; gap: 20px; margin-bottom: 24px; }
  .profile .profile__layout { grid-template-columns: minmax(170px, 27%) 1fr; gap: 22px; }
  .profile__highlights strong { font-size: 25px; }
  .profile__highlights > div:last-child strong { font-size: 19px; }
  .profile__company > header { display: grid; gap: 6px; }
  .profile__projects p { font-size: 13px; }
  .profile__projects h4 { font-size: 14px; }
  .profile .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 24px; }
  .profile .stats-grid article:nth-child(3n) { border-right: 0; }
  .profile .stats-grid article:nth-child(-n+3) { border-bottom: 1px solid var(--line-dark); }
}

@media (max-width: 600px) {
  .profile .profile__layout { grid-template-columns: 1fr; gap: 24px; }
  .profile__identity { width: min(100%, 290px); justify-self: center; }
  .profile__highlights { grid-template-columns: .7fr 1fr 1.15fr; }
  .profile__highlights > div { padding-inline: 8px; }
  .profile__highlights strong { font-size: 19px; }
  .profile__highlights > div:last-child strong { font-size: 14px; }
  .profile__highlights span { font-size: 10px; line-height: 1.5; }
  .profile__summary { font-size: 14px; }
  .profile__summary br { display: none; }
  .profile__company + .profile__company { margin-top: 20px; }
  .profile__company h3 { font-size: 15px; }
  .profile__projects { gap: 16px; padding-top: 14px; }
  .profile__projects p { font-size: 14px; line-height: 1.7; }
  .profile .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile .stats-grid article { border-right: 1px solid var(--line-dark); }
  .profile .stats-grid article:nth-child(3n) { border-right: 1px solid var(--line-dark); }
  .profile .stats-grid article:nth-child(2n) { border-right: 0; }
  .profile .stats-grid article:nth-child(-n+4) { border-bottom: 1px solid var(--line-dark); }
}
