/* Thorsten Jäger portfolio. Scoped to avoid affecting Nexora, Academy or global pages. */
.ht-profile {
  min-width: 0;
  overflow: clip;
  color: var(--ht-text-primary);
  background:
    radial-gradient(circle at 8% 12%, var(--ht-primary-soft), transparent 31rem),
    var(--ht-bg-page);
}

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

.ht-profile__frame {
  width: min(100% - 3rem, 1180px);
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5.5rem) 0 4rem;
}

.ht-profile__eyebrow {
  margin:0 0 var(--ht-space-45);
  color: var(--ht-primary-hover);
  font:var(--ht-font-weight-bold) var(--ht-type-caption)/1.4 "JetBrains Mono", monospace;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ht-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(20rem, .84fr);
  gap: clamp(3rem, 7vw, 6.5rem);
  align-items: center;
  min-height: min(46rem, calc(100vh - 9rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.ht-profile-hero h1 {
  margin: 0;
  max-width: 12ch;
  color: var(--ht-text-primary);
  font-size: clamp(3.4rem, 5.4vw, 5.15rem);
  font-weight:var(--ht-font-weight-bold);
  line-height:var(--ht-leading-tight);
  letter-spacing: -.055em;
}

.ht-profile-hero h1 span { display: block; }
.ht-profile-hero h1 .ht-profile-hero__accent { color: var(--ht-primary-hover); }

.ht-profile-hero__intro {
  max-width: 39rem;
  margin:var(--ht-space-7) 0 0;
  color: var(--ht-text-secondary);
  font-size: clamp(1rem, 1.25vw, 1.12rem);
  line-height:var(--ht-leading-relaxed);
}

.ht-profile-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap:var(--ht-space-3);
  margin-top:var(--ht-space-8);
}

.ht-profile__button {
  display: inline-flex;
  min-height: 2.85rem;
  align-items: center;
  justify-content: center;
  gap:var(--ht-space-2);
  padding:var(--ht-space-3) var(--ht-space-5);
  border: 1px solid var(--ht-border-strong);
  border-radius: var(--ht-radius-sm);
  color: var(--ht-text-primary);
  font-size:var(--ht-type-body-sm);
  font-weight:var(--ht-font-weight-bold);
  letter-spacing: .06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.ht-profile__button:hover {
  border-color: var(--ht-primary-hover);
  background: var(--ht-primary-soft);
  color: var(--ht-text-primary);
  transform: translateY(-1px);
}

.ht-profile__button--primary { border-color: var(--ht-primary); background: var(--ht-primary); }
.ht-profile__button--primary:hover { background: var(--ht-primary-hover); }

.ht-profile-portrait {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid var(--ht-border);
  border-radius: var(--ht-radius-lg);
  background: var(--ht-bg-surface);
  box-shadow: var(--ht-shadow-md);
}

.ht-profile-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 36%;
  filter: saturate(.9) contrast(1.02);
}

.ht-profile-portrait::after {
  position: absolute;
  inset: 55% 0 0;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--ht-bg-page) 82%, transparent));
  content: "";
  pointer-events: none;
}

.ht-profile-portrait figcaption {
  position: absolute;
  z-index: 1;
  right: 1.4rem;
  bottom: 1.35rem;
  left: 1.4rem;
  padding-left:var(--ht-space-3);
  border-left: 2px solid var(--ht-primary);
  text-transform: uppercase;
}

.ht-profile-portrait figcaption strong,
.ht-profile-portrait figcaption span { display: block; }
.ht-profile-portrait figcaption strong { color: var(--ht-text-primary); font-size:var(--ht-type-meta); letter-spacing: .13em; }
.ht-profile-portrait figcaption span { margin-top:var(--ht-space-1); color: var(--ht-primary-hover); font:var(--ht-font-weight-bold) var(--ht-type-meta)/1.4 "JetBrains Mono", monospace; letter-spacing: .14em; }

.ht-profile-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--ht-border-soft);
}

.ht-profile-facts div {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap:var(--ht-space-3);
  padding:var(--ht-space-55) var(--ht-space-4);
  color: var(--ht-text-secondary);
  font-size:var(--ht-type-body);
  font-weight:var(--ht-font-weight-semibold);
}

.ht-profile-facts div + div { border-left: 1px solid var(--ht-border-soft); }
.ht-profile-facts i { color: var(--ht-primary-hover); font-size:var(--ht-icon-xl); }

.ht-profile-section { padding: clamp(3.75rem, 7vw, 6.25rem) 0; border-bottom: 1px solid var(--ht-border-soft); }
.ht-profile-section > .ht-profile__eyebrow { margin-bottom:var(--ht-space-6); }

.ht-profile-about {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 7vw, 6rem);
  align-items: end;
}

.ht-profile-about h2,
.ht-profile-experience > h2 {
  margin: 0;
  color: var(--ht-text-primary);
  font-size: clamp(2rem, 3.4vw, 3.2rem);
  line-height:var(--ht-leading-tight);
  letter-spacing: -.04em;
}

.ht-profile-about > p {
  margin: 0;
  color: var(--ht-text-secondary);
  font-size:var(--ht-type-body-lg);
  line-height: 1.8;
}

.ht-profile-expertise {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:var(--ht-space-3);
}

.ht-profile-expertise article {
  display: flex;
  min-height: 8.5rem;
  gap:var(--ht-space-4);
  padding:var(--ht-space-55);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-md);
  background: color-mix(in srgb, var(--ht-bg-surface) 76%, transparent);
}

.ht-profile-expertise article > i { flex: 0 0 auto; color: var(--ht-primary-hover); font-size:var(--ht-icon-2xl); }
.ht-profile-expertise h3,
.ht-profile-project h3 { margin: 0; color: var(--ht-text-primary); font-size:var(--ht-type-title); }
.ht-profile-expertise p { margin:var(--ht-space-2) 0 0; color: var(--ht-text-muted); font-size:var(--ht-type-body-sm); line-height:var(--ht-leading-normal); }

.ht-profile-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:var(--ht-space-35); }

.ht-profile-project {
  display: flex;
  min-height: 13rem;
  gap:var(--ht-space-5);
  padding:var(--ht-space-6);
  border: 1px solid var(--ht-border-soft);
  border-radius: var(--ht-radius-md);
  background: var(--ht-bg-surface);
  color: var(--ht-text-primary);
  text-decoration: none;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.ht-profile-project:hover { border-color: var(--ht-border-strong); background: var(--ht-bg-surface-soft); color: var(--ht-text-primary); transform: translateY(-2px); }
.ht-profile-project > i { color: var(--ht-primary-hover); font-size:var(--ht-icon-2xl); }
.ht-profile-project small { color: var(--ht-primary-hover); font:var(--ht-font-weight-bold) var(--ht-type-meta)/1.4 "JetBrains Mono", monospace; letter-spacing: .12em; text-transform: uppercase; }
.ht-profile-project h3 { margin-top:var(--ht-space-3); font-size:var(--ht-type-title); }
.ht-profile-project p { margin:var(--ht-space-2) 0 var(--ht-space-55); color: var(--ht-text-secondary); font-size:var(--ht-type-body); line-height:var(--ht-leading-relaxed); }
.ht-profile-project span { color: var(--ht-primary-hover); font-size:var(--ht-type-caption); font-weight:var(--ht-font-weight-bold); letter-spacing: .06em; text-transform: uppercase; }

.ht-profile-experience > h2 { max-width: 16ch; margin-bottom: clamp(2.75rem, 5vw, 4.25rem); }
.ht-profile-timeline { max-width: 68rem; }

.ht-profile-role {
  display: grid;
  grid-template-columns: 10.5rem 1.5rem minmax(0, 1fr);
  gap:var(--ht-space-4);
  min-width: 0;
  padding:0 0 var(--ht-space-10);
}

.ht-profile-role time { padding-top:var(--ht-space-05); color: var(--ht-primary-hover); font:var(--ht-font-weight-semibold) var(--ht-type-caption)/1.5 "JetBrains Mono", monospace; }
.ht-profile-role__marker { position: relative; display: block; width: .62rem; height: .62rem; margin-top:var(--ht-space-1); border: 2px solid var(--ht-primary); border-radius: 50%; background: var(--ht-bg-page); }
.ht-profile-role__marker::after { position: absolute; top: .7rem; bottom: -2.65rem; left: 50%; width: 1px; background: var(--ht-border); content: ""; transform: translateX(-50%); }
.ht-profile-role:last-child .ht-profile-role__marker::after { display: none; }
.ht-profile-role--current .ht-profile-role__marker { width: .8rem; height: .8rem; margin:var(--ht-space-05) 0 0 -.09rem; background: var(--ht-primary); }
.ht-profile-role h3 { margin: 0; color: var(--ht-text-primary); font-size:var(--ht-type-title); line-height:var(--ht-leading-snug); }
.ht-profile-role h3 span { color: var(--ht-text-secondary); font-weight:var(--ht-font-weight-semibold); }
.ht-profile-role p { max-width: 53rem; margin:var(--ht-space-2) 0 0; color: var(--ht-text-muted); font-size:var(--ht-type-body); line-height:var(--ht-leading-relaxed); }

@media (max-width: 1024px) {
  .ht-profile__frame { width: min(100% - 2.5rem, 1180px); }
  .ht-profile-hero { grid-template-columns: minmax(0, 1fr) minmax(18rem, .72fr); gap:var(--ht-space-10); }
  .ht-profile-hero h1 { font-size: clamp(3rem, 5.7vw, 4.25rem); }
  .ht-profile-expertise { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .ht-profile__frame { width: min(100% - 2rem, 42rem); padding-top:var(--ht-space-10); }
  .ht-profile-hero { grid-template-columns: 1fr; min-height: 0; }
  .ht-profile-hero__content { max-width: 42rem; }
  .ht-profile-portrait { width: min(100%, 31rem); }
  .ht-profile-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ht-profile-facts div:nth-child(3) { border-left: 0; }
  .ht-profile-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--ht-border-soft); }
  .ht-profile-about { grid-template-columns: 1fr; gap:var(--ht-space-6); }
  .ht-profile-projects { grid-template-columns: 1fr; }
  .ht-profile-role { grid-template-columns: 8.1rem 1.25rem minmax(0, 1fr); gap:var(--ht-space-25); }
}

@media (max-width: 520px) {
  .ht-profile__frame { width: min(100% - 1.5rem, 32rem); }
  .ht-profile-hero h1 { font-size: clamp(2.25rem, 11vw, 2.75rem); line-height:var(--ht-leading-tight); }
  .ht-profile-hero__intro { font-size:var(--ht-type-body-lg); }
  .ht-profile-hero__actions { align-items: stretch; flex-direction: column; }
  .ht-profile__button { width: 100%; }
  .ht-profile-portrait { border-radius: var(--ht-radius-md); }
  .ht-profile-facts div { justify-content: flex-start; padding:var(--ht-space-4) var(--ht-space-3); font-size:var(--ht-type-caption); }
  .ht-profile-expertise { grid-template-columns: 1fr; }
  .ht-profile-project { min-height: 0; padding:var(--ht-space-5); }
  .ht-profile-role { grid-template-columns: 1.15rem minmax(0, 1fr); gap:var(--ht-space-25); padding-bottom: 2.2rem; }
  .ht-profile-role time { grid-column: 2; grid-row: 1; }
  .ht-profile-role__marker { grid-column: 1; grid-row: 1 / span 2; }
  .ht-profile-role > div { grid-column: 2; grid-row: 2; }
  .ht-profile-role__marker::after { bottom: -4.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ht-profile a { transition: none; }
}
