/* Aligned profile labels and two columns of credentials. */
.overview-lead, .overview.profile-record {
  --profile-label: clamp(150px, 15vw, 200px);
  --profile-gap: clamp(24px, 3.4vw, 48px);
}
#profile.overview-header { display: block; padding: 48px 0; border: 0; }
#profile .overview-person { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
#profile .overview-identity h1 {
  margin: 0; font-size: clamp(40px, 3.6vw, 52px); line-height: 1.2;
  font-weight: 750; letter-spacing: -.055em;
}
#profile .overview-contact {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0;
}
#profile .overview-contact a {
  display: inline-flex; align-items: center; gap: 10px;
  color: #637182; font-size: 14px; line-height: 1.7;
}
#profile .overview-contact a:hover { color: var(--blue); }
#profile .overview-contact a:focus-visible { outline: 2px solid #397bcc; outline-offset: 4px; }
#profile .overview-contact svg { flex: none; width: 18px; height: 18px; }
#profile .overview-contact .github-icon { fill: currentColor; stroke: none; }

.overview.profile-record { padding-bottom: 0; }
.profile-record > .overview-details {
  display: block; padding-top: 0; border-top: 1px solid var(--folio-rule);
}
.profile-background { display: block; padding: 0; }
.profile-record .overview-section {
  display: grid;
  grid-template-columns: var(--profile-label) minmax(0, 1fr);
  column-gap: var(--profile-gap);
  padding: 32px 0; border: 0; background: transparent; box-shadow: none; clip-path: none;
}
.profile-record .overview-section + .overview-section,
.profile-record .overview-skills { border-top: 1px solid var(--folio-rule); }
.profile-record .overview-section-title {
  align-self: stretch; margin: 0; padding-right: 20px; border-right: 1px solid var(--folio-rule);
}
.profile-record .overview-section-title h2 {
  margin: 0; color: #465565; font-size: 18px; font-weight: 650; line-height: 1.6; letter-spacing: -.4px;
}
.profile-education-list, .profile-language-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--profile-gap); list-style: none; margin: 0; padding: 0;
}
.profile-education-list > li, .profile-language-item { min-width: 0; }
.profile-education-list > li {
  display: grid; grid-template-columns: minmax(0, 1fr) max-content;
  column-gap: 14px; align-content: start; align-items: baseline;
}
.profile-education-list .profile-entry-title { grid-column: 1; grid-row: 1; }
.profile-education-list .profile-entry-description { grid-column: 1 / -1; grid-row: 2; }
.profile-education-list .profile-entry-date { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; white-space: nowrap; }
.profile-education-list > li + li, .profile-language-item + .profile-language-item {
  padding-left: var(--profile-gap); border-left: 1px solid var(--folio-rule);
}
.profile-entry-title h3, .profile-language-item dt {
  margin: 0; color: #172633; font-size: 25px; font-weight: 650; line-height: 1.4; letter-spacing: -.6px;
}
.profile-entry-title .institution-sejong { color: #c3002f; }
.profile-entry-title .institution-ssafy { color: #3c93e8; }
.profile-entry-description, .profile-language-project { color: #637182; font-size: 14px; line-height: 1.7; }
.profile-entry-description { margin: 9px 0 0; }
.profile-record .profile-entry-date {
  margin-top: 7px; color: #7b8897; font-size: 12px; font-variant-numeric: tabular-nums; line-height: 1.7;
}
.profile-language-item {
  display: grid; grid-template-columns: max-content max-content minmax(0, 1fr); column-gap: 16px;
  align-content: start; align-items: baseline;
}
.profile-language-item dd { min-width: 0; margin: 0; }
.profile-language-score { display: flex; align-items: baseline; gap: 8px; }
.profile-language-score > span { color: #7b8897; font-size: 12px; }
.profile-language-score strong { color: #286c9d; font-size: 25px; font-weight: 650; line-height: 1.4; }
.profile-language-score .opic-grade-al { color: #e36b4d; font-weight: 700; }
.profile-language-score .opic-grade-ih { color: #7e9d18; font-weight: 700; }
.profile-language-item .profile-entry-date { grid-column: 3; grid-row: 1; justify-self: end; text-align: right; white-space: nowrap; }
.profile-language-project { grid-column: 1 / -1; grid-row: 2; justify-self: start; text-align: left; }
.profile-language-project { margin-top: 8px !important; }
.profile-language-project a { display: inline-flex; align-items: baseline; gap: 8px; }
.profile-language-project a:hover { color: var(--blue); }
.profile-language-project a:focus-visible { outline: 2px solid #397bcc; outline-offset: 4px; }
.profile-record .skill-exhibit {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px var(--profile-gap);
}
.profile-record .skill-collection { min-width: 0; padding: 0; border: 0; }
.profile-record .skill-collection:nth-child(even) {
  padding-left: var(--profile-gap); border-left: 1px solid var(--folio-rule);
}
.profile-record .skill-collection:nth-child(n + 3) {
  padding-top: 20px; border-top: 1px solid var(--folio-rule);
}
.profile-record .skill-collection h3 { margin: 0 0 8px; color: #7b8897; font-size: 13px; font-weight: 500; line-height: 1.6; }
.overview-skills .badge-shelf { gap: 4px 18px; }
.overview-skills .tech-badge {
  min-height: 36px; gap: 8px; padding: 5px 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none; color: #334a5d;
}
.overview-skills .tech-name { font-size: 14px; font-weight: 500; line-height: 1.6; }
.overview-skills .tech-badge .tech-mark { width: 21px; height: 21px; }
/* Match Baro's fixed hit area and elastic plus; animate only the symbol. */
.overview-skills .tech-badge::after {
  content: ''; display: inline-block; flex: none; width: 14px; height: 14px; margin-left: 2px;
  color: #899cac; transform-origin: center;
  background: linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat,
              linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
}
.overview-skills .tech-badge:hover, .overview-skills .tech-badge[aria-pressed=true] {
  color: #2166a4; background: transparent; box-shadow: none;
}
.overview-skills .tech-badge[aria-pressed=true]::after { color: #2166a4; background-size: 10px 1.5px, 0 0; }
@keyframes skill-plus-elastic {
  0%, 29.6%, 100% { transform: scale(1, 1); }
  8% { transform: scale(1.18, .82); }
  12.8% { transform: scale(.86, 1.14); }
  18% { transform: scale(1.08, .92); }
  22.8% { transform: scale(.97, 1.03); }
}
@media (hover: hover) and (pointer: fine) {
  .overview-skills .tech-badge:not([aria-pressed=true]):hover::after { color: #2166a4; animation: skill-plus-elastic 3s linear .35s infinite; }
}
.overview-skills .tech-badge:not([aria-pressed=true]):focus-visible::after { color: #2166a4; animation: skill-plus-elastic 3s linear .35s infinite; }
@media (prefers-reduced-motion: reduce) {
  .overview-skills .tech-badge::after { animation: none !important; transform: none; }
}
.overview-skills .tech-badge:focus-visible { outline: 2px solid #397bcc; outline-offset: 4px; }
.profile-record .skill-projects { grid-column: 2; margin-top: 20px; }
#skill-project-links a { font-size: 14px; line-height: 1.8; }

.additional-skills {
  grid-column: 1 / -1;
  border-top: 0;
}
.profile-record .overview-section.overview-skills { padding-bottom: 12px; }
.additional-skills > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding: 10px 0;
  color: #637182;
  font-size: 13px;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}
.additional-skills > summary::-webkit-details-marker { display: none; }
.additional-skills > summary:hover { color: var(--blue); }
.additional-skills > summary:focus-visible { outline: 2px solid #397bcc; outline-offset: 4px; }
.additional-skills-icon::before { content: '+'; font-size: 18px; }
.additional-skills[open] .additional-skills-icon::before { content: '−'; }
.additional-skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px var(--profile-gap);
  padding: 8px 0;
}

@media (max-width: 1100px) {
  .overview-lead, .overview.profile-record { --profile-label: 134px; --profile-gap: 24px; }
  .profile-entry-title h3, .profile-language-item dt, .profile-language-score strong { font-size: 23px; }
}
@media (min-width: 761px) and (max-width: 960px) {
  .profile-record .profile-education-list, .profile-record .profile-language-list { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .profile-education-list > li + li, .profile-language-item + .profile-language-item { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--folio-rule); }
}
@media (max-width: 760px) {
  #profile.overview-header { padding: 32px 0; }
  #profile .overview-person { align-items: flex-start; flex-direction: column; gap: 18px; }
  #profile .overview-contact a { font-size: 13px; }
  .profile-record .overview-section { grid-template-columns: minmax(0, 1fr); padding: 26px 0; }
  .profile-record .overview-section-title { margin-bottom: 20px; padding: 0; border: 0; }
  .profile-record .overview-section-title h2 { font-size: 16px; }
  .profile-record .profile-education-list, .profile-record .profile-language-list {
    grid-template-columns: minmax(0, 1fr); gap: 22px;
  }
  .profile-education-list > li + li, .profile-language-item + .profile-language-item {
    padding: 22px 0 0; border: 0; border-top: 1px solid var(--folio-rule);
  }
  .profile-language-item { column-gap: 10px; }
  .profile-language-project { font-size: 12px; }
  .profile-record .profile-entry-date { font-size: 11px; }
  .profile-record .skill-exhibit { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .profile-record .skill-exhibit > .skill-collection + .skill-collection { margin-top: 8px; }
  .profile-record .skill-collection:nth-child(even) { padding: 0; border-left: 0; }
  .profile-record .skill-collection + .skill-collection {
    padding-top: 18px; border-top: 1px solid var(--folio-rule);
  }
  .profile-record .skill-projects { grid-column: 1; }
  .additional-skill-groups { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media print {
  #profile.overview-header { padding: 18px 0; }
  .profile-record .overview-section { padding-block: 18px; }
  .overview-skills .tech-badge::after { display: none; }
}
