/* Phelan Foster — Scheme · Executive Chronicle */
:root {
  --ink: #121212;
  --ink-soft: #3a3a3a;
  --ink-faint: #6a6a6a;
  --paper: #f0eeea;
  --paper-deep: #e2dfd8;
  --white: #ffffff;
  --accent: #6b2d3c;
  --accent-soft: rgba(107, 45, 60, 0.12);
  --line: rgba(18, 18, 18, 0.12);
  --line-strong: rgba(18, 18, 18, 0.22);
  --shadow: 0 24px 60px rgba(18, 18, 18, 0.12);
  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --gutter: clamp(1.1rem, 4.5vw, 2.25rem);
  --measure: min(1120px, calc(100% - (var(--gutter) * 2)));
  --header-h: 3.75rem;
  --section-y: clamp(3.5rem, 9vw, 6.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--safe-top) + 0.75rem);
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-enter__item,
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 0.15vw + 0.94rem, 1.05rem);
  line-height: 1.7;
  color: var(--ink-soft);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-nav-open,
body.is-lightbox-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
}

ul,
ol,
h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: var(--measure);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  background: var(--ink);
  color: var(--white);
}

.skip-link:focus {
  top: calc(var(--safe-top) + 0.75rem);
}

/* Header — brand left, nav centered, tools right */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-top: var(--safe-top);
  color: var(--ink);
  background: rgba(240, 238, 234, 0.92);
  box-shadow: 0 1px 0 transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header.is-scrolled {
  background: rgba(240, 238, 234, 0.96);
  box-shadow: 0 1px 0 var(--line);
}

.header-inner {
  width: var(--measure);
  margin-inline: auto;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  position: relative;
  z-index: 2;
}

.brand-word {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.site-nav {
  display: none;
}

.site-nav a {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a.is-active {
  opacity: 1;
}

.header-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--ink);
  opacity: 0.9;
}

.lang-btn {
  min-width: 2rem;
  padding: 0.26rem 0.45rem;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.55;
}

.lang-btn.is-active {
  opacity: 1;
  background: var(--ink);
  color: var(--white);
}

.nav-toggle {
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-content: center;
  gap: 5px;
}

.nav-toggle-bar {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
}

body.is-nav-open .nav-toggle-bar:first-child {
  transform: translateY(3.25px) rotate(45deg);
}

body.is-nav-open .nav-toggle-bar:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

.mobile-nav {
  display: grid;
  padding: 0.75rem var(--gutter) 1.2rem;
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav a {
  padding: 0.85rem 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(26, 26, 26, 0.35);
}

.nav-backdrop[hidden] {
  display: none !important;
}

@media (min-width: 980px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .site-nav {
    display: flex;
    justify-content: center;
    gap: 1.15rem;
    justify-self: center;
  }

  .header-tools {
    margin-left: 0;
    justify-self: end;
  }

  .nav-toggle,
  .mobile-nav,
  .nav-backdrop {
    display: none !important;
  }
}

/* Hero — burgundy band, white copy, small portrait */
.hero {
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #f7f1f2;
  background:
    radial-gradient(ellipse 50% 70% at 90% 30%, rgba(255, 255, 255, 0.08), transparent 55%),
    #6b2d3c;
}

.hero-band {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: calc(var(--header-h) + var(--safe-top) + 2.25rem) 0 clamp(2.5rem, 6vw, 3.75rem);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 36rem;
}

.hero-media {
  margin: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  aspect-ratio: 4 / 5;
  width: min(18rem, 58vw);
  justify-self: start;
  border-radius: 2rem 3.5rem 2.25rem 3rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(247, 241, 242, 0.78);
  margin-bottom: 0.95rem;
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15em 0.35em;
  margin-bottom: 0.85rem;
  line-height: 0.92;
  max-width: 100%;
  color: #f7f1f2;
}

.hero-given,
.hero-family {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6.5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.hero-family {
  font-style: italic;
  font-weight: 500;
}

.hero-role {
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.85rem;
  color: rgba(247, 241, 242, 0.88);
}

.hero-lede {
  max-width: 34rem;
  margin-bottom: 1.1rem;
  color: rgba(247, 241, 242, 0.82);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  margin-bottom: 1.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(247, 241, 242, 0.62);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.65rem 1.3rem;
  background: #f7f1f2;
  color: #6b2d3c;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease);
}

.hero-cta:hover {
  transform: translateY(-2px);
}

.hero-enter__item {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.8s var(--ease) forwards;
  animation-delay: calc(var(--i, 0) * 85ms + 60ms);
}

@keyframes heroIn {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (min-width: 880px) {
  .hero-band {
    grid-template-columns: minmax(0, 1.1fr) minmax(16rem, 0.75fr);
    gap: 2.5rem;
  }

  .hero-media {
    width: 100%;
    max-width: 22rem;
    justify-self: end;
  }
}

/* About — quote lead + body only */
.section--about {
  background: var(--paper);
}

.about-quote {
  display: grid;
  gap: 1.75rem;
}

.about-lead {
  max-width: 28rem;
}

.about-mark {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  line-height: 0.7;
  color: var(--accent);
  margin: 0.35rem 0 0.5rem;
}

.about-lead-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.about-copy {
  max-width: 36rem;
}

.about-body + .about-body {
  margin-top: 0.85rem;
}

@media (min-width: 880px) {
  .about-quote {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: start;
  }
}

/* Shared section chrome */
.section {
  padding: var(--section-y) 0;
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(1.8rem, 4vw, 2.8rem);
}

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--ink);
}

.section-title--light {
  color: var(--white);
}

.section-dek {
  margin-top: 0.7rem;
  color: var(--ink-faint);
}

/* Career spine */
.section--spine {
  background: var(--white);
}

.section--spine .section-head {
  max-width: none;
}

.section--spine .section-title {
  font-size: clamp(1.55rem, 3.2vw, 2.45rem);
}

@media (min-width: 980px) {
  .section--spine .section-title {
    white-space: nowrap;
  }
}

.spine {
  position: relative;
  display: grid;
  gap: 0;
}

.spine::before {
  content: "";
  position: absolute;
  top: 0.4rem;
  bottom: 0.4rem;
  left: 0.35rem;
  width: 1px;
  background: var(--line-strong);
}

.spine-item {
  position: relative;
  display: grid;
  gap: 0.75rem;
  padding: 1.5rem 0 1.5rem 1.6rem;
}

.spine-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.75rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--white);
}

.spine-year {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  white-space: nowrap;
}

.spine-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.35rem;
}

.spine-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.spine-meta {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.spine-copy p + p {
  margin-top: 0.65rem;
}

@media (min-width: 860px) {
  .spine::before {
    left: 10.85rem;
  }

  .spine-item {
    grid-template-columns: 10rem 1fr;
    gap: 2.25rem;
    padding: 1.85rem 0 1.85rem 0;
  }

  .spine-item::before {
    left: 10.55rem;
    top: 2.15rem;
  }

  .spine-year {
    text-align: right;
    padding-top: 0.25rem;
    padding-right: 0.15rem;
  }
}

/* Year table — light two-column timeline */
.section--years {
  background: var(--white);
  overflow: hidden;
}

.year-rail {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.year-card {
  display: grid;
  gap: 0.4rem;
  padding: 1.15rem 0;
  background: transparent;
  border-bottom: 1px solid var(--line);
}

.year-card__when {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.year-card__body {
  font-size: 1.02rem;
  line-height: 1.55;
  color: var(--ink);
}

@media (min-width: 760px) {
  .year-card {
    grid-template-columns: minmax(11rem, 0.32fr) 1fr;
    gap: 1.75rem;
    align-items: baseline;
    padding: 1.25rem 0;
  }
}

/* Certificate grid — no horizontal page scroll */
.section--certs {
  background: var(--white);
  overflow: hidden;
}

.cert-rail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: var(--measure);
  margin-inline: auto;
}

.cert-tile {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: zoom-in;
  overflow: hidden;
  min-width: 0;
}

@media (min-width: 640px) {
  .cert-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .cert-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cert-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.45s var(--ease);
}

.cert-tile:hover img {
  transform: scale(1.03);
}

.cert-tile:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Signature — burgundy plaque */
.section--close {
  background: var(--paper);
  padding: var(--section-y) 0;
}

.close-plaque {
  background: #6b2d3c;
  color: #f7f1f2;
  padding: clamp(1.75rem, 4vw, 2.75rem);
}

.close-plaque__main {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(247, 241, 242, 0.2);
}

.close-plaque__person {
  display: grid;
  justify-items: start;
  gap: 0.65rem;
}

.close-photo {
  margin: 0;
  width: 6.75rem;
  height: 6.75rem;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(247, 241, 242, 0.35);
}

.close-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
}

.close-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: #f7f1f2;
  letter-spacing: -0.02em;
}

.close-role {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(247, 241, 242, 0.72);
}

.close-plaque__sign {
  position: relative;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(247, 241, 242, 0.35);
}

.close-plaque__sign .section-label {
  color: #d4a0ab;
}

.close-mark {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 0.7;
  color: rgba(247, 241, 242, 0.35);
  margin: 0.35rem 0 0.4rem;
}

.close-heading {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3.2vw, 2.1rem);
  color: #f7f1f2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.close-quote {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-style: italic;
  line-height: 1.5;
  color: rgba(247, 241, 242, 0.92);
  max-width: 30rem;
}

.close-plaque__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
  padding-top: 1.15rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(247, 241, 242, 0.68);
}

@media (min-width: 880px) {
  .close-plaque__main {
    grid-template-columns: minmax(10rem, 0.7fr) minmax(0, 1.3fr);
    gap: 2.75rem;
  }

  .close-photo {
    width: 7.5rem;
    height: 7.5rem;
  }
}

/* Footer */
.site-footer {
  padding: 2.5rem 0 calc(2rem + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: var(--white);
}

.footer-shell {
  display: grid;
  gap: 1.5rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--ink);
}

.footer-role {
  margin-top: 0.2rem;
  font-size: 0.9rem;
}

.footer-sign {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.4rem;
  justify-content: space-between;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.footer-copy {
  font-size: 0.76rem;
  color: var(--ink-faint);
}

.footer-nav {
  display: flex;
  gap: 1rem;
}

.footer-nav a {
  font-size: 0.76rem;
  font-weight: 600;
}

.footer-nav a:hover {
  color: var(--accent);
}

/* Reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Progress dots */
.page-progress {
  display: none;
}

@media (min-width: 1180px) {
  .page-progress {
    position: fixed;
    top: 50%;
    right: max(0.85rem, var(--safe-right));
    z-index: 45;
    display: grid;
    gap: 0.7rem;
    transform: translateY(-50%);
  }

  .page-progress a {
    width: 0.7rem;
    height: 0.7rem;
    display: grid;
    place-items: center;
  }

  .page-progress span {
    width: 0.35rem;
    height: 0.35rem;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.35;
    box-shadow: 0 0 0 2px var(--paper);
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .page-progress a:hover span,
  .page-progress a.is-active span {
    opacity: 1;
    transform: scale(1.35);
  }
}

/* Back to top */
.to-top {
  position: fixed;
  right: max(1rem, var(--safe-right));
  bottom: max(1rem, var(--safe-bottom));
  z-index: 46;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(240, 238, 234, 0.94);
  color: var(--ink);
  font-size: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}

.to-top[hidden] {
  display: none !important;
}

.to-top:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--accent);
}

.to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Lightbox */
.lightbox[hidden] {
  display: none !important;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: max(1rem, var(--safe-top)) max(1rem, var(--safe-right)) max(1rem, var(--safe-bottom)) max(1rem, var(--safe-left));
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 26, 0.72);
  cursor: zoom-out;
}

.lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 90dvh);
  overflow: auto;
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.lightbox-dialog img {
  width: 100%;
  height: auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 2.2rem;
  height: 2.2rem;
  display: grid;
  place-items: center;
  background: rgba(240, 238, 234, 0.92);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  border: 1px solid var(--line);
}

.lightbox-close:hover {
  color: var(--accent);
}
