/* ============================================================
   about.css — styles specific to about.html
   Loaded after style.css, so it can override body/layout rules.
   ============================================================ */

/* ── Override homepage fixed layout for scrollable about page */
body {
  overflow-y: auto !important;
  height: auto !important;
  min-height: 100dvh;
}

/* Fixed atmosphere — same “world” as home (stars vs waves), very subtle */
.about-atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.14;
  transition: opacity var(--speed);
  background-image:
    radial-gradient(1px 1px at 7% 11%, rgba(228, 223, 240, 0.5) 50%, transparent 52%),
    radial-gradient(1px 1px at 19% 84%, rgba(228, 223, 240, 0.38) 50%, transparent 52%),
    radial-gradient(1.5px 1.5px at 91% 28%, rgba(167, 139, 250, 0.42) 50%, transparent 52%),
    radial-gradient(1px 1px at 64% 58%, rgba(255, 255, 255, 0.32) 50%, transparent 52%),
    radial-gradient(1px 1px at 33% 42%, rgba(228, 223, 240, 0.26) 50%, transparent 52%),
    radial-gradient(1px 1px at 82% 74%, rgba(228, 223, 240, 0.22) 50%, transparent 52%),
    radial-gradient(1px 1px at 51% 16%, rgba(255, 255, 255, 0.2) 50%, transparent 52%),
    radial-gradient(1px 1px at 13% 54%, rgba(167, 139, 250, 0.28) 50%, transparent 52%),
    radial-gradient(1px 1px at 76% 41%, rgba(228, 223, 240, 0.18) 50%, transparent 52%),
    radial-gradient(1px 1px at 44% 91%, rgba(255, 255, 255, 0.14) 50%, transparent 52%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body.shore .about-atmosphere {
  opacity: 0.2;
  background-image:
    linear-gradient(180deg, transparent 0%, rgba(29, 78, 216, 0.045) 36%, transparent 50%),
    linear-gradient(180deg, transparent 0%, rgba(61, 117, 133, 0.065) 52%, transparent 64%),
    linear-gradient(180deg, transparent 0%, rgba(181, 132, 90, 0.055) 68%, transparent 82%),
    radial-gradient(ellipse 130% 45% at 50% 100%, rgba(232, 242, 249, 0.45) 0%, transparent 72%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 55%;
  background-repeat: no-repeat;
}

/* Sit content above atmosphere layer */
.about-main {
  position: relative;
  z-index: 1;
}

/* Footer becomes sticky at bottom when page is short */
#bottom-bar {
  position: sticky;
  bottom: 0;
  z-index: 1;
}

/* ── Page wrapper ─────────────────────────────────────────── */
/* Uses --content-max-wide (see style.css); center column still caps at 720px like case studies. */
.about-main {
  padding-top: calc(var(--nav-height) + 48px);
  padding-bottom: 80px;
  padding-left: var(--page-padding-x);
  padding-right: var(--page-padding-x);
  max-width: min(var(--content-max-wide), 100%);
  margin-left: auto;
  margin-right: auto;
}

/* ── 3-column grid ───────────────────────────────────────── */
/* Outer columns equal (1fr each); center capped at 720px to
   match the .cs-content-col max-width in the case studies. */
.about-grid {
  display: grid;
  grid-template-columns: 1fr minmax(0, 720px) 1fr;
  gap: 48px;
  align-items: start;
}

.about-left,
.about-center,
.about-theme-panel {
  min-width: 0;
  /* Fill grid tracks (helps when children use transform animation) */
  width: 100%;
}

.about-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

@media (max-width: 1100px) {
  .about-grid {
    /* Fix 5: widen left column from hard 180px to a flexible 180–240px range */
    grid-template-columns: minmax(180px, 240px) minmax(0, 720px);
    grid-template-rows: auto auto;
  }
  .about-theme-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-left {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .about-img-pair {
    grid-column: 1 / -1;
  }
  .status-card {
    grid-column: 1 / -1;
  }
  /* Fix 9: images fill their column with an explicit aspect ratio so
     they don't collapse to natural height and leave gaps. */
  .about-img-frame {
    aspect-ratio: 4/5;
  }
  .about-img {
    height: 100%;
  }
  /* fluid tokens handle minimum sizes at all viewports */
}


/* ── Images ──────────────────────────────────────────────── */
.about-img-frame {
  position: relative;
  border-radius: 2px;
  overflow: hidden;
  border: 0.5px solid var(--card-border);
  background: var(--card-bg);
  margin-bottom: 0;
  width: 100%;
}

.about-img {
  width: 100%;
  display: block;
  object-fit: cover;
  filter: brightness(0.92) saturate(0.9);
  transition: filter 0.4s ease;
}

.about-img-frame:hover .about-img {
  filter: brightness(1) saturate(1);
}

.about-img-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-bottom: 0;
  width: 100%;
}

.about-img-pair .about-img-frame {
  margin-bottom: 0;
}

.about-img-frame--caption {
  cursor: default;
  overflow: visible;
}

.about-img-frame--caption .about-img {
  border-radius: 2px;
}

.about-img-caption {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 40;
  width: max-content;
  max-width: 140px;
  padding: 6px 8px;
  border-radius: 2px;
  border: 0.5px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  line-height: 1.3;
  color: var(--text1);
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  will-change: left, top;
  transition: opacity 0.15s ease, color var(--speed), background var(--speed), border-color var(--speed);
}

.about-img-frame--caption.is-caption-active .about-img-caption {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .about-img-caption {
    transition: none;
  }
}

/* ── Status card ─────────────────────────────────────────── */
.status-card {
  border: 0.5px solid var(--card-border);
  border-radius: 2px;
  background: var(--card-bg);
  padding: 16px;
  width: 100%;
  transition: background var(--speed), border-color var(--speed);
}

.status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.status-key {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex-shrink: 0;
  transition: color var(--speed);
}

.status-value {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--text2);
  text-align: right;
  margin-inline-start: auto;
  max-inline-size: 100%;
  overflow-wrap: anywhere;
  transition: color var(--speed);
}

/* Star: telemetry-style keys — rhythm + live dot */
@keyframes about-status-signal {
  0%, 100% { opacity: 0.88; transform: scale(1); }
  50% { opacity: 0.42; transform: scale(0.92); }
}

body:not(.shore) .status-card .status-key {
  letter-spacing: 0.16em;
}

body:not(.shore) .status-card .status-key::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  margin-inline-end: 7px;
  vertical-align: middle;
  animation: about-status-signal 2.6s ease-in-out infinite;
}

body:not(.shore) .status-card .status-row:nth-child(2) .status-key::before {
  animation-delay: 0.35s;
}

body:not(.shore) .status-card .status-row:nth-child(3) .status-key::before {
  animation-delay: 0.7s;
}

/* Shore: draw the eye to hiring status */
body.shore .status-value--signal {
  color: var(--text1);
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 2px;
  background: linear-gradient(
    105deg,
    var(--gold-tint) 0%,
    rgba(29, 78, 216, 0.07) 100%
  );
  box-shadow: inset 0 0 0 0.5px rgba(201, 168, 76, 0.38);
}

@media (prefers-reduced-motion: reduce) {
  body:not(.shore) .status-card .status-key::before {
    animation: none;
    opacity: 0.85;
    transform: none;
  }
}


/* ── Typography ──────────────────────────────────────────── */
.about-h1 {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: 1;
  color: var(--text1);
  margin-bottom: 40px;
  text-wrap: balance;
  overflow-wrap: anywhere;
  transition: color var(--speed);
}

.about-section-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text3);
  margin-bottom: 14px;
  margin-top: 36px;
  transition: color var(--speed);
}

.about-section-label:first-child,
.about-h1 + .about-section-label {
  margin-top: 0;
}

.about-body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--text2);
  margin-bottom: 16px;
  max-width: 65ch;
  overflow-wrap: anywhere;
  transition: color var(--speed);
}

.about-body:last-child {
  margin-bottom: 0;
}

/* ── Center column: matches .cs-content-col padding (0 24px) so
   text starts at the same horizontal position as case study content. */
.about-center {
  padding: 0 24px;
}

/* ── Center column: spacing between the three text sections ── */
.about-center > section + section {
  margin-top: 28px;
}


/* ── Theme panel (right column) ──────────────────────────── */
.about-theme-panel {
  border: 0.5px solid var(--card-border);
  border-radius: 2px;
  padding: 20px 16px;
  background: var(--card-bg);
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  transition: background var(--speed), border-color var(--speed);
}

.about-theme-panel .about-section-label {
  margin-top: 0;
  margin-bottom: 10px;
}

.about-theme-panel .about-body {
  font-size: var(--text-sm);
  max-width: 100%;
}

.theme-item-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 16px;
}

.theme-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.theme-tag {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text3);
  overflow-wrap: anywhere;
  transition: color var(--speed);
}

.theme-tag--accent {
  color: var(--accent);
}

.theme-star {
  font-size: var(--text-2xs);
  color: var(--accent);
  opacity: 0.5;
}

.theme-item-head {
  flex-wrap: wrap;
}

.theme-item {
  min-width: 0;
}

.theme-item .about-body {
  max-width: 60ch;
}

[dir="rtl"] .about-body,
[dir="rtl"] .status-value,
[dir="rtl"] .theme-tag {
  text-align: start;
}

/* ── Entrance choreography (CSS-only — no JS). Content must never stay opacity:0 if scripts fail. ── */
@keyframes about-reveal-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.about-reveal {
  opacity: 0;
  animation: about-reveal-in 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger by layout order (matches .about-grid: left → center → theme panel) */
.about-grid > .about-left.about-reveal {
  animation-delay: 0.06s;
}

.about-grid > .about-center > .about-h1.about-reveal {
  animation-delay: 0.12s;
}

.about-grid > .about-theme-panel.about-reveal {
  animation-delay: 0.16s;
}

.about-grid > .about-center > section.about-reveal:nth-child(2) {
  animation-delay: 0.26s;
}

.about-grid > .about-center > section.about-reveal:nth-child(3) {
  animation-delay: 0.38s;
}

.about-grid > .about-center > section.about-reveal:nth-child(4) {
  animation-delay: 0.5s;
}

@media (prefers-reduced-motion: reduce) {
  .about-reveal {
    animation: none !important;
    animation-delay: 0s !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
