/* Scroll entrance for the editorial sections below the project gallery. */
.about-layout {
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 104px);
}

.about-portrait {
  width: 240px;
  max-width: 100%;
  top: calc(var(--header-height) + 32px);
}

.about-portrait img {
  width: 240px;
  height: 240px;
  max-width: 100%;
  max-height: none;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 26%;
  border-radius: 50%;
}

.about-role {
  margin: 24px 0 6px;
  color: var(--ink);
  font-size: clamp(19px, 1.8vw, 25px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -.025em;
}

.about-specialty {
  margin: 0;
  color: #35332e;
  font-size: clamp(16px, 1.35vw, 20px);
  line-height: 1.5;
  letter-spacing: -.015em;
}

.about-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 18px;
  color: var(--muted-dark);
  font-size: 13px;
  line-height: 1.6;
}

.about-details p { margin: 0; }

.section-scroll-effects {
  position: relative;
  isolation: isolate;
  background: var(--section-from);
}

.section-scroll-effects::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--section-to);
  opacity: var(--section-progress, 1);
  transition: opacity 140ms linear;
}

.section-scroll-effects > .page-shell {
  position: relative;
  z-index: 1;
}

#tools.section-scroll-effects {
  --section-from: var(--ink);
  --section-to: var(--ink-soft);
}

/* Profile and career share one surface; its transition sits in the grid gutter. */
.profile-career,
.page-surface--profile {
  --profile-gap: clamp(96px, 10vw, 168px);
  --profile-width: min(var(--shell), calc(100% - var(--gutter) * 2));
  --profile-start: calc((100% - var(--profile-width)) / 2);
  --profile-about-width: calc((var(--profile-width) - var(--profile-gap)) * .475);
  --profile-fade-start: calc(var(--profile-start) + var(--profile-about-width));
  --profile-surface: linear-gradient(90deg, var(--paper) var(--profile-fade-start), var(--ink) calc(var(--profile-fade-start) + var(--profile-gap)));
  padding: clamp(88px, 8vw, 128px) 0;
  background: var(--profile-surface);
}

/* One viewport surface replaces the hard horizontal section bands. */
.section-surfaces-enabled { scroll-snap-type: y proximity; }
.section-surfaces-enabled .artwork-header { scroll-snap-align: start; }
.section-surfaces-enabled [data-scroll-frame="center"] { scroll-snap-align: center !important; }
.section-surfaces-enabled [data-scroll-frame="free"] { scroll-snap-align: none !important; }
.section-surfaces-enabled body { isolation: isolate; background: transparent; }
.page-surfaces { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--ink); }
.page-surface { position: absolute; inset: 0; opacity: 0; transition: opacity 900ms ease; }
.page-surface.is-active { opacity: 1; }
.page-surface--work { background: var(--ink); }
.page-surface--profile { padding: 0; background: var(--profile-surface); }
.page-surface--about { background: var(--paper); }
.page-surface--tools { background: var(--ink-soft); }
.page-surface--contact { background: var(--accent); }
.section-surfaces-enabled #work,
.section-surfaces-enabled #profileCareer,
.section-surfaces-enabled #tools,
.section-surfaces-enabled #contact { background: transparent; scroll-snap-align: start; scroll-snap-stop: normal; }
.section-surfaces-enabled .section-scroll-effects::before { display: none; }
.section-surfaces-enabled #profileCareer,
.section-surfaces-enabled #tools,
.section-surfaces-enabled #contact { min-height: calc(100svh - var(--header-height)); display: grid; align-content: center; }
.section-surfaces-enabled .site-footer { background: transparent; border-color: rgba(8,8,8,.2); }
.section-surfaces-enabled .site-footer p,
.section-surfaces-enabled .site-footer a { color: var(--ink); }

@media (max-width: 1100px) {
  .section-surfaces-enabled #profileCareer { display: block; scroll-snap-align: none; }
  .section-surfaces-enabled #about,
  .section-surfaces-enabled #experience { background: transparent; scroll-snap-align: start; min-height: calc(100svh - var(--header-height)); }
  .section-surfaces-enabled #experience { padding-top: 96px; }
}
@media (prefers-reduced-motion: reduce) {
  .section-surfaces-enabled { scroll-snap-type: none; }
  .page-surface { transition: none; }
}

#profileCareer.section-scroll-effects {
  --section-from: var(--ink);
  --section-to: var(--profile-surface);
}

.profile-career-layout {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: var(--profile-gap);
  align-items: start;
}

.profile-career .about-section,
.profile-career .experience-section {
  min-width: 0;
  padding: 0;
  background: transparent;
  scroll-margin-top: 100px;
}

.profile-career .about-layout {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr);
  gap: 30px 24px;
}
.profile-career .about-copy { display: contents; }
.profile-career .about-portrait { position: relative; top: auto; width: 136px; margin: 0; }
.profile-career .about-portrait img { width: 136px; height: 136px; }
.profile-career .about-copy > .section-heading { grid-column: 2; margin-bottom: 0 !important; }
.profile-career .about-copy h2 { font-size: clamp(40px, 3.75vw, 58px); line-height: 1; }
.profile-career .about-role { margin-top: 16px; font-size: 18px; }
.profile-career .about-specialty { font-size: 15px; }
.profile-career .about-details { margin-top: 14px; gap: 4px 16px; font-size: 12px; }
.profile-career .about-text,
.profile-career .about-links,
.profile-career .capability-list { grid-column: 1 / -1; min-width: 0; }
.profile-career .about-text { max-width: none; }
.profile-career .about-text p { font-size: 18px; line-height: 1.65; letter-spacing: -.02em; }
.profile-career .about-text p:last-child { margin-bottom: 0; }
.profile-career .about-links { margin-top: 0; padding-top: 20px; gap: 22px; }
.profile-career .experience-section .section-heading { margin-bottom: 30px !important; }
.profile-career .experience-section .section-heading h2 { font-size: clamp(48px, 4.6vw, 70px); line-height: 1; }
.profile-career .experience-item { grid-template-columns: minmax(98px, .32fr) minmax(0, 1fr); gap: 24px; padding: 28px 0; }
.profile-career .experience-period { font-size: 10px; letter-spacing: .045em; line-height: 1.65; }
.profile-career .experience-heading { grid-template-columns: minmax(0, 1fr); gap: 10px; }
.profile-career .experience-heading h3 { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.2; }
.profile-career .experience-role { font-size: 15px; line-height: 1.6; }

@media (max-width: 1100px) {
  .profile-career { --profile-surface: var(--paper); padding: 0; }
  .profile-career-layout { display: block; width: 100%; }
  .profile-career .about-section { padding: 80px var(--gutter) 40px; }
  .profile-career .experience-section {
    padding: 176px var(--gutter) 80px;
    background: linear-gradient(to bottom, var(--paper), var(--ink) 112px);
  }
  .profile-career .about-layout { grid-template-columns: 160px minmax(0, 1fr); column-gap: 32px; }
  .profile-career .about-portrait,
  .profile-career .about-portrait img { width: 160px; }
  .profile-career .about-portrait img { height: 160px; }
  .profile-career .about-copy h2 { font-size: clamp(42px, 6vw, 62px); }
  .profile-career .about-text { max-width: 720px; }
}

@media (max-width: 600px) {
  .profile-career .about-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .profile-career .about-copy > .section-heading { grid-column: 1; }
  .profile-career .about-portrait,
  .profile-career .about-portrait img { width: 180px; }
  .profile-career .about-portrait img { height: 180px; }
  .profile-career .experience-item { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 26px 0; }
  .profile-career .experience-period { order: 2; margin: 0; }
  .profile-career .experience-heading { order: 1; gap: 8px; }
  .profile-career .experience-section .section-heading h2 { font-size: clamp(42px, 11vw, 58px); }
}

#contact.section-scroll-effects {
  --section-from: var(--ink-soft);
  --section-to: var(--accent);
}

.js .section-scroll-effects .scroll-reveal {
  opacity: var(--reveal-progress, 1);
  transform: translateY(calc(24px * (1 - var(--reveal-progress, 1))));
  transition: opacity 140ms linear, transform 140ms linear;
}

.js .section-scroll-effects .scroll-reveal:focus-within {
  opacity: 1;
  transform: none;
}

@media (max-width: 1100px) {
  .about-layout {
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 780px) {
  .about-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .about-portrait {
    position: relative;
    top: auto;
    width: 180px;
    margin: 0;
  }

  .about-portrait img {
    width: 180px;
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-scroll-effects::before {
    opacity: 1;
    transition: none;
  }

  .js .section-scroll-effects .scroll-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
