:root {
  /* Inverted "ink" theme: dark ground, warm-sand type. Footer keeps its blue. */
  --indigo: #114B78;
  --gold: #CEA85D;
  --gold-active: #EAD4A8;
  --bg: #1A1814;      /* ink ground */
  --paper: #24211c;   /* raised dark surface behind images */
  --cream: #F3EAD8;
  --ink: #F3EAD8;     /* light foreground: text, headings, borders */
  --ink-dark: #1A1814; /* true ink, for text on light surfaces (resume sheet) */
}

body {
  font-family: mr-eaves-modern, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 {
  font-size: 3.5rem;
  line-height: 1.1;
}

.lede {
  font-size: 2.75rem;
  line-height: 1.25;
  font-weight: 400;
  margin: 0 0 1em;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.25rem;
  line-height: 1.4;
}

h5 {
  font-size: 1.0625rem;
  line-height: 1.4;
}

h6 {
  font-size: 1rem;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

p, li {
  font-size: 1.25rem;
  line-height: 1.6;
  font-weight: 400;
}

p {
  margin: 0 0 1em;
}

caption, figcaption {
  font-size: 0.875rem;
  line-height: 1.4;
  font-style: italic;
  font-weight: 400;
}

a {
  color: var(--ink);
  text-decoration: none;
}

a:visited {
  color: var(--ink);
}

a:active {
  color: var(--gold-active);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  position: static;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-left: 8.3333%;
  padding-right: 8.3333%;
  background-color: var(--bg);
}

.nav-condensed header {
  border-bottom: 1px solid rgba(243, 234, 216, 0.16);
}

header nav {
  padding: 1.5rem 0;
}

.site-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header nav ul {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: clamp(1.5rem, 8vw, 6rem);
}

header nav a {
  font-family: "mr-eaves-modern", sans-serif;
  font-weight: 100;
  font-style: normal;
  font-size: clamp(1.375rem, 5vw, 2.5rem);
}

footer {
  background-color: #49798f;
  padding: 2.5rem 8.3333%;
}

footer nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer a,
footer a:visited {
  color: #fff;
}

footer a:active {
  color: var(--cream);
}

.copyright {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 100;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  opacity: 0.65;
}

main {
  text-align: left;
  padding-top: 25vh;
  padding-bottom: 6rem;
}

.main-standard {
  padding-left: 8.3333%;
  padding-right: 8.3333%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.hero-intro {
  max-width: 42rem;
  margin-left: 3.5rem;
  padding-top: clamp(8.5rem, 14vh, 10.5rem);
}

.hero-subtitle {
  white-space: nowrap;
}

.main-resume {
  padding-top: 20vh;
  padding-left: 12%;
  padding-right: 12%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .main-resume {
    padding-left: 8.3333%;
    padding-right: 8.3333%;
  }
}

.projects-heading {
  text-align: center;
  font-size: 55px !important;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.project-meta {
  list-style: none;
  margin: 0 0 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.project-meta li {
  margin: 0;
}

.project-hero {
  aspect-ratio: 16 / 9;
  background-color: var(--paper);
  border: 1px solid var(--ink);
  margin: 0 0 1.5rem;
}

.project-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-gallery {
  display: grid;
  gap: 1.5rem;
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
}

.poster-gallery figure {
  margin: 0;
}

.poster-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
}

.poster-gallery figcaption {
  margin-top: 0.5rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Variant A: even grid */
.gallery-grid {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Poster pairs: one row per designer, mockup and flat side by side */
.poster-pairs {
  margin: 0 0 3rem;
}

.poster-pair {
  margin-bottom: 3rem;
}

.pair-name {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin: 0 0 1.5rem;
}

.pair figure {
  margin: 0;
}

.pair img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
}

.pair figcaption {
  margin-top: 0.5rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.figure-wide {
  margin: 0 0 1.5rem;
}

.figure-wide img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--ink);
}

.figure-wide figcaption {
  margin-top: 0.5rem;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 600px) {
  .pair {
    grid-template-columns: 1fr;
  }
}

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Cap the grid at 3 columns; cards scale up with the viewport instead */
@media (min-width: 1200px) {
  .projects {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* On full-screen desktops, let the project grid grow 30% wider than the text column */
@media (min-width: 1400px) {
  .projects {
    width: 130%;
    margin-left: -15%;
  }
}

.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #221f19;
  border: 1px solid rgba(243, 234, 216, 0.14);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s ease, border-color 0.35s ease,
    background-color 0.35s ease, box-shadow 0.35s ease;
}

.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(243, 234, 216, 0.45);
  background-color: #2a251c;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.project-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.project-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background-color: #1a1814;
  overflow: hidden;
  border-bottom: 1px solid rgba(243, 234, 216, 0.12);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.project-card:hover .project-thumb img,
.project-card:focus-visible .project-thumb img {
  transform: scale(1.04);
}

.project-caption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 1.1rem 1.15rem 1.3rem;
  text-align: left;
}

.project-name {
  font-weight: 500;
  font-size: 1.625rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-thumb img {
    transition: none;
  }

  .project-card:hover,
  .project-card:focus-visible,
  .project-card:hover .project-thumb img,
  .project-card:focus-visible .project-thumb img {
    transform: none;
  }
}

.project-meta-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
}

.pm-row {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 0.6rem;
  align-items: start;
}

.pm-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  color: #a8a091;
  padding-top: 0.25em;
}

.pm-val {
  font-size: 1.125rem;
  line-height: 1.35;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 3rem;
}

.resume-sheet {
  background-color: #fff;
  color: var(--ink-dark);
  box-shadow: 0 1px 3px rgba(26, 24, 20, 0.08), 0 14px 44px rgba(26, 24, 20, 0.13);
  padding: 3.5rem;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0 3.5rem;
  align-items: start;
}

/* Résumé stays a light "printed page" on the dark site — keep its type dark */
.resume-sheet h1,
.resume-main h1,
.resume-main h3 {
  color: var(--ink-dark);
}

/* Download button lives on the white sheet — solid ink button */
.resume-sheet .cta-link {
  background-color: var(--ink-dark);
  color: var(--cream);
  border-color: var(--ink-dark);
}

/* Case-study pages read as a light document on the dark site: light ground,
   dark type and rules. Redefining the theme vars re-inverts the whole subtree. */
.main-standard:has(.project-meta) {
  --ink: #1A1814;
  --paper: #f8f5ee;
  background-color: #F3F1ED;
  color: #1A1814;
}

.resume-rail {
  position: sticky;
  top: 6.5rem;
}

.resume-monogram {
  width: 110px;
  height: auto;
  display: block;
  margin: 0 0 2rem;
}

.rail-heading {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #11687f;
  margin: 0 0 0.75em;
}

.resume-contact {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.resume-contact li {
  font-size: 1rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.resume-contact a,
.resume-contact a:visited {
  color: #11687f;
}

.resume-main h1 {
  font-size: 2.75rem;
  margin-bottom: 0.1em;
}

.resume-main .lede {
  font-size: 1.5rem;
  margin-bottom: 1.5em;
  color: #666668;
}

.resume-main h2 {
  font-size: 1.125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #11687f;
  border-bottom: 1px solid #ead4a8;
  padding-bottom: 0.35em;
  margin-top: 2em;
}

.resume-main h3 {
  font-size: 1.25rem;
}

.resume-main p,
.resume-main li {
  font-size: 1.0625rem;
}

@media (max-width: 760px) {
  .resume-sheet {
    grid-template-columns: 1fr;
    padding: 1.75rem;
    gap: 0;
  }

  .resume-rail {
    position: static;
    border-bottom: 1px solid #ead4a8;
    margin-bottom: 1.5rem;
  }

  .resume-monogram {
    width: 80px;
    margin-bottom: 1.25rem;
  }

  .skills-grid {
    grid-template-columns: 1fr;
  }
}

/* Sweetgrass typography specimen — editorial Aa grid */
.type-specimen {
  border-top: 1px solid var(--ink);
  margin: 2.5rem 0;
}

.type-specimen .spec-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 1rem 3rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--ink);
  align-items: start;
}

.type-specimen .spec-label {
  font-family: nobel, sans-serif;
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #2a6b52;
  margin: 0;
}

.type-specimen .spec-note {
  font-family: freight-text-pro, serif;
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0.75rem 0 0;
  max-width: 24ch;
}

/* Display row: oversized glyph beside alphabet samples */
.spec-display-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 3rem;
  align-items: end;
}

.spec-glyph {
  font-family: fields-display, serif;
  font-weight: 700;
  font-size: clamp(7rem, 16vw, 13rem);
  line-height: 0.78;
  letter-spacing: -0.02em;
  margin: 0;
}

.spec-alphabet {
  font-family: fields, serif;
  font-weight: 400;
  font-size: clamp(1.125rem, 1.9vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: 0.02em;
  margin: 0;
  word-break: break-all;
}

.spec-alphabet strong {
  font-weight: 700;
}

.spec-headline {
  font-family: fields-display, serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.1;
  margin: 1.25rem 0 0;
}

/* Freight body row */
.spec-weights {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.spec-weights li {
  font-family: freight-text-pro, serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.spec-w-book { font-weight: 400; }
.spec-w-italic { font-weight: 400; font-style: italic; }
.spec-w-bold { font-weight: 700; }

.spec-paragraph {
  font-family: freight-text-pro, serif;
  font-size: 1.1875rem;
  line-height: 1.7;
  margin: 0;
  max-width: 58ch;
}

.spec-paragraph .spec-drop {
  font-family: fields-display, serif;
  font-weight: 700;
  font-size: 3.1em;
  line-height: 0.8;
  float: left;
  padding-right: 0.08em;
}

/* Nobel wayfinding row */
.spec-way {
  font-family: nobel, sans-serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.spec-way-num {
  font-family: nobel, sans-serif;
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.3;
  letter-spacing: 0.06em;
  margin: 0.5rem 0 0;
}

/* Scale row: same line at descending sizes, meta on the right */
.type-specimen .spec-row-reverse {
  grid-template-columns: 1fr minmax(150px, 220px);
}

.type-specimen .spec-row-reverse .spec-meta {
  order: 2;
  text-align: right;
}

.spec-scale-line {
  font-family: fields, serif;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spec-scale-line small {
  font-family: nobel, sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  vertical-align: 0.35em;
  padding-right: 0.75em;
  color: #2a6b52;
}

/* Menu in use */
.spec-menu-head {
  font-family: fields-display, serif;
  font-weight: 700;
  font-size: 1.375rem;
  margin: 0 0 1rem;
}

.spec-dish {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.25rem;
}

.spec-dish dt {
  font-family: freight-text-pro, serif;
  font-size: 1.125rem;
}

.spec-dish .spec-dots {
  flex: 1;
  border-bottom: 1px dotted var(--ink);
  transform: translateY(-0.3em);
}

.spec-dish dd {
  font-family: freight-text-pro, serif;
  font-weight: 700;
  font-size: 1.125rem;
  margin: 0;
}

.spec-dish-note {
  font-family: freight-text-pro, serif;
  font-style: italic;
  font-size: 0.9375rem;
  margin: 0 0 0.875rem;
  color: var(--ink);
  opacity: 0.75;
}

.spec-menu-list {
  margin: 0;
  max-width: 34rem;
}

/* Stationery trio row */
.trio {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 700px) {
  .type-specimen .spec-row,
  .type-specimen .spec-row-reverse {
    grid-template-columns: 1fr;
  }

  .type-specimen .spec-row-reverse .spec-meta {
    order: 0;
    text-align: left;
  }

  .spec-display-grid {
    grid-template-columns: 1fr;
    gap: 1rem 0;
  }
}

@media (max-width: 600px) {
  .trio {
    grid-template-columns: 1fr;
  }
}

/* Interactive project link */
.cta-link {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
}

.cta-link:active {
  color: var(--gold-active);
}

/* Funding NC icon system strip */
.icon-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  background-color: #11303A;
  border: 1px solid var(--ink);
  padding: 2.5rem;
  margin: 0;
}

.icon-strip img {
  width: 100%;
  height: auto;
  border: 0;
}

@media (max-width: 600px) {
  .icon-strip {
    grid-template-columns: repeat(2, 1fr);
    padding: 1.5rem;
    gap: 1.5rem;
  }
}

.footer-heading {
  color: #fff;
  margin: 0 0 0.25em;
}

.footer-cta {
  color: #fff;
  opacity: 0.9;
  max-width: 55ch;
  margin: 0 0 2rem;
}

/* Woven texture behind image-grid bands (Sweetgrass) */
.grid-band {
  position: relative;
  padding: 2.75rem 0;
  margin: 0 0 1.5rem;
}

.grid-band > :last-child {
  margin-bottom: 0;
}

.grid-band::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50vw);
  z-index: -1;
  pointer-events: none;
  background-image: url("images-sweetgrass/web/texture-herringbone-weave.jpg");
  background: cover;
  background-size: 520px;
  opacity: 0.20;
}

/* ---- Scroll-driven nav brand transition ---- */

@property --nav-progress {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  --nav-progress: 0;
}

/* Offset in-page anchors (skip link, back-to-top) below the fixed nav */
html {
  scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Reserved, viewport-centered brand slot */
.nav-brand {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  opacity: var(--nav-progress);
  transform: translate(-50%, -50%) scale(calc(0.9 + var(--nav-progress) * 0.1));
  pointer-events: none;
  will-change: opacity, transform;
}

.nav-brand-mark {
  display: block;
  width: auto;
  height: 40px;
}

.nav-condensed .nav-brand,
.nav-static .nav-brand {
  pointer-events: auto;
}

/* Inner pages: no hero, brand shown permanently */
.nav-static {
  --nav-progress: 1;
}

/* Hero name recedes as the brand arrives */
.hero-name {
  font-family: mr-eaves-modern, sans-serif;
  font-weight: 300;
  font-size: clamp(8rem, 20vw, 20rem);
  transform-origin: left center;
  opacity: calc(1 - var(--nav-progress));
  transform: translateY(calc(var(--nav-progress) * -14px)) scale(calc(1 - var(--nav-progress) * 0.04));
  will-change: opacity, transform;
}
.hero-subtitle {
  
  font-family: mr-eaves-modern, sans-serif;
  font-weight: 300;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  transform-origin: left center;
  opacity: calc(1 - var(--nav-progress));
  transform: translateY(calc(var(--nav-progress) * -14px)) scale(calc(1 - var(--nav-progress) * 0.04));
  will-change: opacity, transform;
}
/* Keyboard focus for nav links and brand */
.nav-links a:focus-visible,
.nav-brand:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 4px;
  border-radius: 3px;
}

/* Reduced motion: no scrubbing, no movement — a simple crossfade */
@media (prefers-reduced-motion: reduce) {
  .hero-name {
    transform: none;
    opacity: 1;
    transition: opacity 0.25s ease;
  }

  .nav-condensed .hero-name {
    opacity: 0;
  }

  .nav-brand {
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.25s ease;
  }

  .nav-condensed .nav-brand,
  .nav-static .nav-brand {
    opacity: 1;
  }
}

/* Small screens: trim the mark so link groups never crowd the center */
@media (max-width: 600px) {
  .nav-brand {
    min-width: 44px;
    min-height: 44px;
  }

  .nav-brand-mark {
    height: 32px;
  }
}

/* Very narrow screens: tighten links so they never reach the centered mark */
@media (max-width: 360px) {
  header nav ul {
    gap: 1rem;
  }

  header nav a {
    font-size: 1.15rem;
  }

  .nav-brand-mark {
    height: 28px;
  }
}

/* Paper grain — page background and footer band */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.5;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

footer {
  position: relative;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: soft-light;
  pointer-events: none;
}
