/* =========================
   About
========================= */

.about {
  --about-accent: #ea0044;
  --about-heading: #fafafa;
  --about-muted: #b8b8b8;
  --about-border: #2b2b2b;

  width: 100%;
  min-width: 0;
  padding: 75px 0;

  position: relative;
  isolation: isolate;
  overflow: visible;

  color: var(--about-muted);
  font-family: "Roboto", Arial, Helvetica, sans-serif;

  scroll-margin-top: 100px;
}

.about,
.about *,
.about *::before,
.about *::after {
  box-sizing: border-box;
}

/* =========================
   Divider — same as Testimonial
========================= */

.about::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 0;

  border: 0;
  border-top: 1px solid var(--about-border);

  border-image-source: linear-gradient(
    to right,
    var(--about-border),
    var(--about-border)
  );

  border-image-slice: 1;
  border-image-width: 1 0 0;
  border-image-outset: 0 100vmax;
  border-image-repeat: stretch;

  pointer-events: none;
}

@media (width > 1920px) {
  .about::before {
    left: 50%;
    transform: translateX(-50%);

    width: 1920px;

    border-image-source: linear-gradient(
      to right,
      transparent 0%,
      var(--about-border) 15%,
      var(--about-border) 85%,
      transparent 100%
    );

    border-image-outset: 0;
  }
}

/* =========================
   Heading
========================= */

.about .about__heading {
  margin: 0 0 60px;

  font-family: "Space Grotesk", Arial, Helvetica, sans-serif;
  font-size: 60px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;

  color: var(--about-heading);

  overflow-wrap: anywhere;
}

.about .about__word {
  display: inline-block;
}

.about .about__word--accent {
  color: var(--about-accent);
}

.about .about__heading.is-ready .about__word {
  opacity: 0.001;
  transform: translateY(10px);

  transition:
    opacity 0.9s cubic-bezier(0.55, 0.01, 0.2, 1),
    transform 0.9s cubic-bezier(0.55, 0.01, 0.2, 1);

  transition-delay: var(--about-word-delay, 0s);
}

.about .about__heading.is-visible .about__word {
  opacity: 1;
  transform: none;
}

/* =========================
   Content
========================= */

.about .about__content {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  align-items: start;
  gap: 40px;

  min-width: 0;
  position: relative;
}

/* =========================
   Profile
========================= */

.about .about__profile {
  min-width: 0;

  position: sticky;
  top: 100px;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about .about__profile.is-too-tall {
  position: relative;
  top: auto;
}

.about .about__portrait {
  width: 100%;
  aspect-ratio: 19 / 21;

  position: relative;

  border-radius: 24px;
  background: #1b1b1d;
}

.about .about__photo {
  display: block;

  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  border-radius: inherit;

  object-fit: cover;
  object-position: center;
}

/* =========================
   Social Icons
========================= */

.about .about__socials {
  display: flex;
  gap: 6px;

  position: absolute;
  right: 14px;
  bottom: 14px;
}

.about .about__social-item {
  display: block;
}

.about .about__social {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 8px;

  border-radius: 24px;
  background: rgb(0 0 0 / 50%);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  color: #fff;
  text-decoration: none;

  -webkit-tap-highlight-color: transparent;
}

.about .about__social svg {
  display: block;

  width: 14px;
  height: 14px;

  flex-shrink: 0;
}

.about .about__social:not([href]) {
  cursor: default;
}

/* =========================
   Name / Role
========================= */

.about .about__identity {
  display: flex;
  flex-direction: column;
  gap: 6px;

  min-width: 0;
}

.about .about__name {
  margin: 0;

  color: var(--about-heading);

  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}

.about .about__role {
  margin: 0;

  font-size: 20px;
  line-height: 1.42;

  overflow-wrap: anywhere;
}

/* =========================
   Bio / Signature
========================= */

.about .about__details {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 56px;
}

.about .about__bio {
  display: flex;
  flex-direction: column;
  gap: 31px;

  min-width: 0;
}

.about .about__paragraphs {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.about .about__paragraphs p {
  margin: 0;

  font-size: 20px;
  line-height: 1.3;

  overflow-wrap: break-word;
}

.about .about__signature {
  display: block;

  width: 140px;
  max-width: 100%;
  height: auto;
}

/* =========================
   Work History
========================= */

.about .about__history {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about .about__history-heading {
  margin: 0;

  font-size: 24px;
  font-weight: 600;
  line-height: 1.4;

  color: var(--about-heading);
}

.about .about__history-stack {
  position: relative;
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 12px;
}

.about .about__history-card {
  min-width: 0;
  width: 100%;

  padding: 18px;

  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;

  border: 1px solid rgb(84 84 84 / 50%);
  border-radius: 16px;

  background: #1f1f1f;

  box-shadow:
    0 0.597144px 0.597144px -0.9375px rgb(0 0 0 / 7%),
    0 1.81088px 1.81088px -1.875px rgb(0 0 0 / 7%),
    0 4.78699px 4.78699px -2.8125px rgb(0 0 0 / 6%),
    0 15px 15px -3.75px rgb(0 0 0 / 3%);
}

.about .about__history-company {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.about .about__history-company h4 {
  margin: 0;

  color: #f7f7f7;

  font-size: 20px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;

  overflow-wrap: anywhere;
}

.about .about__history-company p,
.about .about__history-date {
  margin: 0;

  font-size: 14px;
  line-height: 1.12;
  letter-spacing: -0.01em;

  overflow-wrap: anywhere;
}

.about .about__history-date {
  flex-shrink: 0;
  max-width: 40%;

  text-align: right;
}

/* JS-enhanced stacked layout */

.about .about__history.is-enhanced .about__history-stack {
  display: block;

  height: var(--about-stack-height);
}

.about .about__history.is-enhanced .about__history-card {
  position: absolute;
  top: 0;
  left: 0;
}

.about .about__history.is-enhanced .about__history-card:first-child {
  z-index: 2;
  cursor: pointer;
}

.about .about__history.is-enhanced .about__history-card:nth-child(2) {
  z-index: 1;

  transform: translateY(var(--about-card-y, 8px))
    scale(var(--about-card-scale, 0.95));

  transform-origin: 50% 50%;

  cursor: pointer;
}

/* =========================
   Show All / Hide
========================= */

.about .about__history-toggle {
  display: none;

  align-self: center;
  align-items: center;
  justify-content: center;
  gap: 4px;

  margin: 16px 0 0;
  min-height: 36px;
  padding: 8px 12px 8px 16px;

  border: 1px solid var(--about-border);
  border-radius: 24px;

  background: var(--about-border);
  color: var(--about-muted);

  font:
    400 13px/18px "Roboto",
    Arial,
    Helvetica,
    sans-serif;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  box-shadow:
    0 0.602187px 0.602187px -1.25px rgb(0 0 0 / 18%),
    0 2.28853px 2.28853px -2.5px rgb(0 0 0 / 16%),
    0 10px 10px -3.75px rgb(0 0 0 / 6%);
}

.about .about__history.is-enhanced .about__history-toggle {
  display: inline-flex;
}

.about .about__history-caret {
  width: 12px;
  height: 12px;

  flex-shrink: 0;

  color: var(--about-accent);

  transform: rotate(var(--about-caret-angle, 0deg));
}

.about .about__social[href]:focus-visible,
.about .about__history-toggle:focus-visible {
  outline: 2px solid var(--about-accent);
  outline-offset: 4px;
}

/* =========================
   Tablet — 769px–1024px
========================= */

@media (min-width: 769px) and (max-width: 1024px) {
  .about {
    padding: 60px 0;
  }

  .about .about__heading {
    margin-bottom: 48px;
  }

  .about .about__content {
    grid-template-columns: 261px minmax(0, 1fr);
    gap: 40px;
  }

  .about .about__portrait {
    border-radius: 20px;
  }

  .about .about__role,
  .about .about__paragraphs p {
    font-size: 18px;
  }

  .about .about__history-heading {
    font-size: 20px;
  }
}

/* =========================
   Mobile — up to 768px
========================= */

@media (max-width: 768px) {
  .about {
    padding: 48px 0;
    scroll-margin-top: 96px;
  }

  .about .about__heading {
    font-size: clamp(32px, 8.5vw, 44px);
    margin-bottom: 48px;
  }

  .about .about__content {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .about .about__profile {
    position: relative;
    top: auto;
  }

  .about .about__portrait {
    border-radius: 20px;
  }

  .about .about__role,
  .about .about__paragraphs p {
    font-size: 18px;
  }

  .about .about__details {
    gap: 48px;
  }

  .about .about__history-heading {
    font-size: 20px;
  }
}

/* =========================
   Reduced Motion
========================= */

@media (prefers-reduced-motion: reduce) {
  .about .about__heading.is-ready .about__word {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
