/*
  Home Profile Feature Section 
  Original drop-in styling for an Academic Pages / Jekyll website.
  Edit the content in: _data/home_profile.yml
*/

:root {
  /* Reuse the Academic Pages theme colors so these sections blend with the page. */
  --sms-panel-bg: var(--global-bg-color);
  --sms-panel-bg-soft: var(--global-bg-color);
  --sms-card-bg: var(--global-code-background-color);
  --sms-card-border: var(--global-border-color);
  --sms-panel-border: var(--global-border-color);
  --sms-heading: var(--global-text-color);
  --sms-text: var(--global-text-color);
  --sms-muted: var(--global-text-color);
  --sms-accent: var(--global-link-color);
  --sms-accent-2: var(--global-base-color);
}


/* Homepage wrapper: fills the same archive content column used by Research. */
.sms-home-page {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.sms-home-page *,
.sms-home-page *::before,
.sms-home-page *::after {
  box-sizing: border-box;
}

.sms-profile-panel,
.sms-collaboration {
  box-sizing: border-box;
  color-scheme: normal;
  font-family: inherit;
}

.sms-profile-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 2.6rem 0 4.25rem;
  padding: clamp(1.15rem, 2.2vw, 1.8rem);
  border: /*1px solid var(--sms-card-border);*/
  border-radius: 1.25rem;
  background: var(--sms-panel-bg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.045);
}

.sms-profile-panel__grid-pattern {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: none;
}

.sms-profile-panel__header {
  max-width: 760px;
  margin-bottom: 1.65rem;
}

.sms-profile-panel__eyebrow {
  margin: 0 0 0.5rem;
  color: var(--sms-accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.sms-profile-panel__title,
.sms-collaboration__title {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--sms-heading);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.sms-profile-panel__title {
  /* Same size as the page title “About me” in this Academic Pages theme. */
  font-size: 1.563em;
  line-height: 1;
}

.sms-profile-panel__description {
  max-width: 680px;
  margin: 0.75rem 0 0;
  color: var(--sms-text);
  font-size: clamp(0.96rem, 1.8vw, 1.08rem);
  line-height: 1.7;
}

.sms-profile-cards {
  display: grid;
  grid-template-columns: repeat(var(--sms-profile-columns-desktop, 3), minmax(0, 1fr));
  gap: 1rem;
}

.sms-profile-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
  min-height: 112px;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--sms-card-border);
  border-radius: 1rem;
  background: var(--sms-card-bg);
  color: var(--sms-heading);
  text-decoration: none !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.035);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.sms-profile-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(to bottom, transparent, var(--sms-accent), transparent);
  opacity: 0;
  transition: opacity 180ms ease;
}

.sms-profile-card:hover,
.sms-profile-card:focus-visible {
  transform: translateY(-3px);
  border-color: var(--global-link-color);
  background: var(--global-bg-color);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  outline: none;
  text-decoration: none !important;
}

.sms-profile-card:hover::before,
.sms-profile-card:focus-visible::before {
  opacity: 1;
}

.sms-profile-card__icon {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border: 1px solid var(--global-border-color);
  border-radius: 0.8rem;
  background: var(--global-footer-bg-color);
  font-size: 1.35rem;
  line-height: 1;
}

.sms-profile-card__copy {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sms-profile-card__title,
.sms-profile-card__subtitle {
  display: block;
}

.sms-profile-card__title {
  color: var(--sms-heading);
  font-size: clamp(0.93rem, 1.35vw, 1.05rem);
  font-weight: 750;
  line-height: 1.3;
}

.sms-profile-card__subtitle {
  margin-top: 0.32rem;
  color: var(--sms-muted);
  opacity: 0.76;
  font-size: 0.80rem;
  line-height: 1.45;
}

.sms-profile-card__arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--sms-accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.sms-profile-card__arrow svg {
  width: 1.3rem;
  height: 1.3rem;
}

.sms-profile-card:hover .sms-profile-card__arrow,
.sms-profile-card:focus-visible .sms-profile-card__arrow {
  opacity: 1;
  transform: translateX(0);
}

.sms-collaboration {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 2.5rem;
  padding: clamp(2.25rem, 7vw, 4.5rem) clamp(1.2rem, 6vw, 4.5rem);
  border: /*1px solid var(--sms-panel-border);*/
  border-radius: 1.25rem;
  background: var(--global-bg-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.045);
}

.sms-collaboration__content {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.sms-collaboration__title {
  /* Same size as the page title “About me” in this Academic Pages theme. */
  font-size: 1.563em;
  line-height: 1;
}

.sms-collaboration__text {
  max-width: 760px;
  margin: 1.15rem auto 0;
  color: var(--sms-text);
  opacity: 0.86;
  font-size: clamp(0.98rem, 2.2vw, 1.17rem);
  line-height: 1.65;
}

.sms-collaboration__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.sms-action-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.8rem;
  font-size: 0.96rem;
  font-weight: 750;
  line-height: 1;
  text-decoration: none !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.sms-action-button svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: 0 0 auto;
}

.sms-action-button--primary {
  background: var(--sms-accent-2);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.sms-action-button--secondary {
  border-color: var(--global-border-color);
  background: var(--global-code-background-color);
  color: var(--sms-heading);
}

.sms-action-button:hover,
.sms-action-button:focus-visible {
  transform: translateY(-2px);
  text-decoration: none !important;
  outline: none;
}

.sms-action-button--primary:hover,
.sms-action-button--primary:focus-visible {
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.sms-action-button--secondary:hover,
.sms-action-button--secondary:focus-visible {
  border-color: var(--global-link-color);
  background: var(--global-bg-color);
}

.sms-collaboration__circle {
  position: absolute;
  z-index: 1;
  border: 1px solid var(--global-link-color);
  opacity: 0.12;
  border-radius: 50%;
  pointer-events: none;
}

.sms-collaboration__circle--left {
  width: 235px;
  height: 235px;
  left: -115px;
  bottom: -120px;
}

.sms-collaboration__circle--middle {
  width: 165px;
  height: 165px;
  left: 19%;
  bottom: -75px;
}

.sms-collaboration__circle--right {
  width: 310px;
  height: 310px;
  right: -125px;
  top: -115px;
}

@media (max-width: 1100px) {
  .sms-profile-cards {
    grid-template-columns: repeat(var(--sms-profile-columns-tablet, 2), minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .sms-profile-cards {
    grid-template-columns: repeat(var(--sms-profile-columns-mobile, 1), minmax(0, 1fr));
  }

  .sms-profile-panel,
  .sms-collaboration {
    border-radius: 1rem;
  }

  .sms-profile-card__arrow {
    opacity: 0.8;
    transform: none;
  }
}

@media (max-width: 480px) {
  .sms-profile-panel {
    padding: 1.05rem;
  }

  .sms-profile-card {
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 88px;
    padding: 0.9rem;
  }

  .sms-profile-card__arrow {
    display: none;
  }

  .sms-collaboration__actions,
  .sms-action-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sms-profile-card,
  .sms-profile-card__arrow,
  .sms-action-button {
    transition: none;
  }
}

/* ==========================================================================
   ABOUT-ME INTRODUCTION
   Content source: _data/home_profile.yml -> page.introduction

   This section is intentionally rendered before the Profile at a Glance panel.
   ========================================================================== */

.sms-about-intro {
  box-sizing: border-box;
  margin: 0 0 1.5rem;
  padding: clamp(1rem, 2.4vw, 1.35rem);
  border: 1px solid var(--global-border-color);
  border-left: 4px solid var(--global-link-color);
  border-radius: 0.8rem;
  background: var(--global-code-background-color);
  color: var(--global-text-color);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.035);
}

.sms-about-intro__eyebrow {
  margin: 0 0 0.58rem;
  color: var(--global-link-color);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.sms-about-intro__content {
  max-width: 64rem;
}

.sms-about-intro__content p {
  margin: 0 0 0.78rem;
  color: var(--global-text-color);
  font-size: 0.96rem;
  line-height: 1.68;
}

.sms-about-intro__content p:last-child {
  margin-bottom: 0;
}

.sms-about-intro__content a {
  color: var(--global-link-color);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

/* Reduce the former large gap because the About section now precedes it. */
.sms-profile-panel {
  margin-top: 1.35rem;
}

@media (max-width: 480px) {
  .sms-about-intro {
    padding: 0.95rem;
    border-radius: 0.68rem;
  }

  .sms-about-intro__content p {
    font-size: 0.91rem;
    line-height: 1.62;
  }
}
