:root {
  --night: #292722;
  --night-soft: #332f29;
  --signal: #c96545;
  --signal-blue: #687f73;
  --signal-warm: #d98967;
  --text: #292722;
  --muted: #6d675e;
  --hairline: rgba(53, 48, 41, 0.18);
  --cream: #f7f3ea;
  --cream-deep: #eee7db;
  --cream-card: #fbf8f2;
  --sage: #e5e9e1;
  --peach: #f1dfd1;
  --mono: "IBM Plex Mono", "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --humanist: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --editorial: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

html {
  color: var(--text);
  background: var(--cream);
  scroll-behavior: smooth;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at 88% 3%, rgba(201, 101, 69, 0.09), transparent 28rem),
    radial-gradient(circle at 8% 32%, rgba(104, 127, 115, 0.07), transparent 35rem),
    var(--cream);
  font-family: var(--humanist);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(53, 48, 41, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 48, 41, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  pointer-events: none;
}

::selection {
  color: #fffaf1;
  background: var(--signal);
}

a,
p,
h1,
h2,
h3,
h4 {
  color: inherit;
}

a:hover {
  color: var(--signal);
}

.navbar {
  min-height: 4.8rem;
  padding: 0.65rem 0;
  background: rgba(247, 243, 234, 0.9) !important;
  border-bottom: 1px solid var(--hairline);
  backdrop-filter: blur(18px);
}

.navbar > .container-fluid {
  max-width: 1480px;
}

.navbar-brand {
  color: var(--text) !important;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.navbar-brand::after {
  content: none;
}

.navbar-nav .nav-link {
  color: var(--muted) !important;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text) !important;
}

.navbar-toggler {
  border-color: var(--hairline);
}

.navbar-toggler-icon {
  filter: none;
}

.portfolio-home {
  width: min(calc(100% - 5rem), 1440px);
  padding: 0 0 4rem;
}

.hero-shell,
.current-role,
.section-shell,
.contact-panel {
  scroll-margin-top: 5rem;
}

.hero-shell {
  position: relative;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(3rem, 8vw, 8rem);
  min-height: calc(100vh - 4.8rem);
  padding: clamp(4rem, 9vh, 7rem) 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy::before {
  display: block;
  width: 3.2rem;
  height: 2px;
  margin-bottom: 2rem;
  background: var(--signal);
  content: "";
}

.eyebrow,
.section-index,
.fact-label,
.proof-label,
.company {
  color: #a94f35;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hero-copy h1 {
  max-width: none;
  margin: 0.9rem 0 2rem;
  color: var(--text);
  font-family: var(--editorial);
  font-size: clamp(4.5rem, 9vw, 9.2rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.82;
  text-transform: none;
}

.hero-copy h1 span {
  color: var(--signal);
  -webkit-text-stroke: 0;
}

.hero-lead {
  max-width: 760px;
  color: var(--text);
  font-size: clamp(1.08rem, 1.5vw, 1.28rem);
  line-height: 1.65;
}

.hero-personal {
  max-width: 700px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.72;
}

.button {
  min-height: 3.2rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.button-primary,
.button-light {
  color: #fffaf1;
  background: var(--night);
}

.button-primary:hover,
.button-light:hover {
  color: #fffaf1;
  background: #a94f35;
}

.button-secondary,
.button-ghost {
  color: var(--text);
  background: transparent;
  border-color: rgba(41, 39, 34, 0.34);
}

.button-secondary:hover,
.button-ghost:hover {
  color: var(--signal);
  background: rgba(255, 255, 255, 0.35);
  border-color: var(--signal);
}

.availability-line {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-dot {
  background: var(--signal-blue);
  box-shadow: 0 0 0 0.22rem rgba(104, 127, 115, 0.13);
}

.portrait-wrap {
  position: relative;
  width: min(86%, 510px);
  isolation: isolate;
}

.portrait-wrap::before {
  z-index: -2;
  inset: 9% -8% -8% 16%;
  width: auto;
  height: auto;
  background: linear-gradient(145deg, rgba(201, 101, 69, 0.12), rgba(104, 127, 115, 0.04));
  border: 1px solid var(--hairline);
  border-radius: 1.5rem;
}

.portrait-photo {
  aspect-ratio: 3 / 4;
  background-position: center 32%;
  border: 1px solid rgba(53, 48, 41, 0.22);
  border-radius: 1.5rem;
  box-shadow: 0 35px 80px rgba(70, 59, 44, 0.17);
  filter: saturate(0.8) contrast(1.02);
}

.portrait-wrap figcaption {
  right: auto;
  bottom: -3.2rem;
  left: -2.5rem;
  padding: 0.9rem 1.1rem;
  color: var(--text);
  background: rgba(251, 248, 242, 0.94);
  border: 1px solid var(--hairline);
  border-radius: 0.85rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.portrait-wrap figcaption span {
  display: block;
  color: var(--signal);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.orbit {
  position: absolute;
  z-index: -1;
  border: 1px solid rgba(169, 79, 53, 0.29);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-one {
  inset: -11% -20% 8% -15%;
  transform: rotate(-17deg);
}

.orbit-two {
  inset: 7% -11% -13% -27%;
  border-color: rgba(104, 127, 115, 0.25);
  transform: rotate(21deg);
}

.orbit-dot {
  position: absolute;
  top: 3%;
  right: -10%;
  width: 0.7rem;
  height: 0.7rem;
  background: var(--signal);
  border-radius: 50%;
  box-shadow: 0 0 0 0.4rem rgba(201, 101, 69, 0.1);
  animation: signal-pulse 2.8s ease-in-out infinite;
}

@keyframes signal-pulse {
  50% {
    opacity: 0.55;
    transform: scale(0.75);
  }
}

.section-dots {
  position: fixed;
  z-index: 20;
  top: 50%;
  right: 1.5rem;
  display: grid;
  gap: 0.8rem;
  transform: translateY(-50%);
}

.section-dots a {
  width: 0.5rem;
  height: 0.5rem;
  background: rgba(247, 243, 234, 0.72);
  border: 1px solid rgba(41, 39, 34, 0.52);
  border-radius: 50%;
  transition: background 180ms ease, transform 180ms ease;
}

.section-dots a:hover,
.section-dots a:focus {
  background: var(--signal);
  border-color: var(--signal);
  transform: scale(1.45);
}

.current-role {
  position: relative;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 2.5rem clamp(3rem, 7vw, 7rem);
  min-height: auto;
  padding: clamp(3.5rem, 7vw, 7rem);
  overflow: hidden;
  color: var(--text);
  background:
    linear-gradient(125deg, rgba(201, 101, 69, 0.07), transparent 44%),
    var(--cream-deep);
  border: 1px solid var(--hairline);
  border-radius: 1.5rem;
}

.current-role::after {
  position: absolute;
  z-index: 0;
  top: 1rem;
  right: 1.5rem;
  color: rgba(53, 48, 41, 0.035);
  font-family: var(--editorial);
  font-size: clamp(6rem, 16vw, 15rem);
  line-height: 1;
  content: "CURRENT";
  pointer-events: none;
}

.role-heading,
.role-facts,
.role-summary {
  position: relative;
  z-index: 1;
}

.current-role h2,
.section-heading h2,
.contact-panel h2 {
  color: var(--text);
  font-family: var(--editorial);
  font-weight: 500;
  letter-spacing: -0.045em;
}

.current-role h2 {
  max-width: 680px;
  font-size: clamp(2.75rem, 4.8vw, 4.9rem);
  line-height: 0.98;
}

.current-role p,
.role-summary {
  color: var(--muted);
}

.role-facts {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.role-facts > div {
  display: grid;
  grid-template-columns: minmax(105px, 0.35fr) 1fr;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--hairline);
}

.role-facts .fact-label {
  margin: 0;
  color: #a94f35;
}

.role-facts strong {
  color: var(--text);
  font-family: var(--humanist);
  font-size: 0.98rem;
  font-weight: 650;
}

.role-summary {
  grid-column: 2;
  max-width: 760px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.72;
}

.section-shell {
  padding: clamp(7rem, 11vw, 11rem) 0 0;
  border-top: 0;
}

.section-heading {
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 3rem 7rem;
  align-items: end;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section-heading h2 {
  max-width: 950px;
  font-size: clamp(3rem, 6.2vw, 6.8rem);
  line-height: 0.95;
}

.section-heading > p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  border-top: 0;
}

.project-card,
.project-card-featured {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: clamp(1.8rem, 3vw, 2.8rem);
  color: var(--text);
  background: var(--cream-card);
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
  box-shadow: 0 18px 45px rgba(70, 59, 44, 0.05);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}

.project-card:nth-child(2) {
  background: var(--cream-deep);
}

.project-card:nth-child(3) {
  background: var(--sage);
}

.project-card:nth-child(4) {
  background: var(--peach);
}

.project-card:hover {
  padding-right: clamp(1.8rem, 3vw, 2.8rem);
  padding-left: clamp(1.8rem, 3vw, 2.8rem);
  border-color: rgba(41, 39, 34, 0.32);
  box-shadow: 0 24px 55px rgba(70, 59, 44, 0.1);
  transform: translateY(-4px);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.project-number {
  color: var(--signal);
  font-family: var(--mono);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
}

.status-pill {
  display: inline-flex;
  width: fit-content;
  margin: 0;
  padding: 0.42rem 0.65rem;
  color: #5d574f;
  background: rgba(255, 255, 255, 0.44);
  border: 1px solid rgba(53, 48, 41, 0.18);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.project-card h3 {
  margin: 0;
  color: var(--text);
  font-family: var(--editorial);
  font-size: clamp(1.3rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-kicker {
  color: #9f4d35;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.project-card > p:not(.project-kicker) {
  max-width: 650px;
  margin: 1.2rem 0 1.5rem;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.metric-row {
  grid-column: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 0.5rem 0 1.4rem;
  padding: 1rem 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.metric-row span {
  color: var(--muted);
  font-size: 0.72rem;
}

.metric-row strong {
  color: var(--text);
  font-size: 1.15rem;
}

.tag-list {
  grid-column: auto;
  color: var(--muted);
}

.tag-list span {
  color: #5d574f;
  background: rgba(255, 255, 255, 0.38);
  border: 1px solid rgba(53, 48, 41, 0.16);
  border-radius: 999px;
  font-size: 0.66rem;
}

.card-links {
  grid-column: auto;
  grid-row: auto;
  display: flex;
  gap: 1rem;
  align-content: initial;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
}

.card-links a,
.text-link {
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.card-links a:hover,
.text-link:hover {
  color: var(--signal);
}

.timeline {
  border-color: var(--hairline);
}

.timeline-item {
  grid-template-columns: 0.45fr 1.35fr 0.35fr;
  padding: 2.4rem 0;
  border-color: var(--hairline);
}

.timeline-item h3 {
  color: var(--text);
  font-family: var(--editorial);
  font-size: clamp(1.5rem, 2.4vw, 2.5rem);
  font-weight: 500;
}

.timeline-item p,
.timeline-date,
.timeline-place {
  color: var(--muted);
}

.timeline-date,
.timeline-place {
  font-family: var(--mono);
}

.expertise-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  border: 0;
}

.expertise-grid article {
  min-height: 260px;
  padding: clamp(1.8rem, 3vw, 2.8rem);
  background: rgba(251, 248, 242, 0.65);
  border: 1px solid var(--hairline);
  border-radius: 1.25rem;
}

.expertise-grid article:hover {
  background: var(--cream-card);
}

.expertise-grid h3 {
  color: var(--text);
  font-family: var(--editorial);
  font-size: 1.7rem;
  font-weight: 500;
}

.expertise-grid p {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.expertise-icon {
  color: var(--signal);
  background: transparent;
  border: 1px solid rgba(201, 101, 69, 0.32);
  border-radius: 50%;
}

.publication-list,
.publication-list li {
  border-color: var(--hairline);
}

.publication-list a {
  color: var(--text);
  font-family: var(--editorial);
  font-size: 1.08rem;
  font-weight: 500;
}

.publication-list a:hover {
  color: var(--signal);
}

.publication-list span {
  color: var(--muted);
}

.contact-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  margin-top: clamp(7rem, 12vw, 11rem);
  padding: clamp(3.5rem, 8vw, 8rem);
  color: var(--text);
  background:
    radial-gradient(circle at 80% 30%, rgba(201, 101, 69, 0.11), transparent 30rem),
    var(--cream-deep);
  border: 1px solid var(--hairline);
  border-radius: 1.5rem;
}

.contact-panel h2 {
  max-width: 1000px;
  font-size: clamp(3rem, 7vw, 7rem);
  line-height: 0.92;
}

.contact-panel p,
.contact-panel > p:not(.section-index) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.contact-panel .section-index {
  color: #a94f35;
}

.nav-footer {
  color: var(--muted);
  background: var(--cream) !important;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 0.68rem;
}

.portfolio-page,
main.content:not(.page-layout-full main.content) {
  color: var(--text);
}

.portfolio-page h1,
.portfolio-page h2,
.portfolio-page h3,
.portfolio-page .page-title,
main.content h1,
main.content h2,
main.content h3 {
  color: var(--text);
}

.portfolio-page h1,
.portfolio-page h2,
.page-hero h1,
.quarto-title-block .quarto-title > h1,
.showcase-copy h2 {
  font-family: var(--editorial);
  font-weight: 500;
}

.portfolio-page p,
.portfolio-page li,
main.content p,
main.content li {
  color: var(--muted);
}

.case-hero,
.project-summary,
.proof-card,
.portfolio-intro,
.writing-intro,
.showcase-proof,
.article-cta,
.education-grid article {
  color: var(--text);
  background: var(--cream-card);
  border-color: var(--hairline);
  box-shadow: none;
}

.showcase-proof blockquote,
.proof-stat strong,
.article-status a,
.capability-list h3 {
  color: var(--text);
}

.page-layout-article table thead th,
blockquote {
  color: var(--text);
  background: var(--cream-deep);
}

code {
  color: #80412f;
}

:focus-visible {
  outline: 3px solid rgba(201, 101, 69, 0.5);
  outline-offset: 3px;
}

@media (max-width: 1050px) {
  .hero-shell {
    grid-template-columns: 1fr 0.72fr;
    gap: 3rem;
  }

  .current-role {
    grid-template-columns: 1fr;
  }

  .role-summary {
    grid-column: 1;
  }

  .section-heading {
    gap: 3rem;
  }
}

@media (max-width: 820px) {
  .portfolio-home {
    width: min(calc(100% - 2rem), 1440px);
  }

  .hero-shell {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-bottom: 5rem;
  }

  .hero-copy h1 {
    font-size: clamp(4rem, 15vw, 7rem);
  }

  .portrait-wrap {
    width: min(88%, 520px);
    margin: 1.5rem auto 3rem;
  }

  .portrait-photo {
    aspect-ratio: 4 / 4.7;
  }

  .section-dots {
    display: none;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .project-grid,
  .expertise-grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card-featured {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .navbar {
    min-height: 4.25rem;
  }

  .portfolio-home {
    width: min(calc(100% - 1.4rem), 1440px);
  }

  .hero-shell {
    padding-top: 2.5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.55rem, 18vw, 5rem);
    line-height: 0.87;
  }

  .hero-lead {
    font-size: 1.08rem;
  }

  .portrait-wrap figcaption {
    bottom: -2rem;
    left: -0.35rem;
  }

  .current-role,
  .contact-panel {
    padding: 1.65rem;
    border-radius: 1rem;
  }

  .current-role h2 {
    font-size: clamp(2.45rem, 12vw, 4rem);
  }

  .role-facts > div {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .section-heading h2 {
    font-size: clamp(2.75rem, 13vw, 4.2rem);
  }

  .project-card,
  .project-card-featured {
    padding: 1.5rem;
    border-radius: 1rem;
  }

  .project-card:hover {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .card-topline {
    align-items: flex-start;
    margin-bottom: 2.5rem;
  }

  .status-pill {
    max-width: 72%;
    text-align: right;
    white-space: normal;
  }

  .project-card h3 {
    font-size: clamp(1.2rem, 5.5vw, 1.6rem);
  }

  .metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-row span {
    display: flex;
    flex-direction: column;
  }

  .publication-list a {
    font-size: 1rem;
  }

  .contact-panel h2 {
    font-size: clamp(2.7rem, 14vw, 4.6rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
