:root {
  --font-display: "Sora";
  --font-sans: "DM Sans";
  --media-frame: #f1ece5;
}

@font-face {
  font-family: "Sora";
  src: url("/assets/fonts/sora-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/fonts/dm-sans-latin-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

body,
button,
summary {
  font-family: var(--font-sans), Arial, sans-serif;
}

h1,
h2,
h3 {
  font-family: var(--font-display), Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

p {
  line-height: 1.72;
}

/* Built by Kia uses standalone headings, not tiny eyebrow labels. */
.kicker,
.section-label {
  display: none !important;
}

.project-context {
  max-width: 46rem;
  margin: 0.8rem 0 1rem !important;
  color: var(--plum) !important;
  font-family: var(--font-sans), Arial, sans-serif;
  font-size: clamp(0.94rem, 1vw, 1.04rem) !important;
  font-weight: 650;
  line-height: 1.55 !important;
  letter-spacing: 0;
  text-transform: none;
}

.content-heading {
  margin: 0 0 1.5rem;
  font-size: clamp(1.55rem, 2.2vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.content-heading-light {
  color: #fff;
}

.project-role,
.card-role {
  letter-spacing: 0;
  text-transform: none;
}

.project-role {
  margin-top: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.card-role {
  font-size: 0.86rem;
  line-height: 1.55;
}

.cms-meta span {
  font-size: 0.76rem;
  letter-spacing: 0;
  text-transform: none;
}

.document-card p {
  font-size: 0.82rem;
  letter-spacing: 0;
  line-height: 1.5;
  text-transform: none;
}

.cms-project-number,
.website-card-image > span,
.practice-grid > a > span,
.home-cms-grid article > span,
.method-grid > div > span {
  display: none;
}

.button {
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  padding: 0.9rem 1.1rem;
  border-radius: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

/* Secondary actions remain visibly actionable on light and dark cards. */
.button-outline {
  border: 2px solid var(--plum);
  background: var(--paper);
  color: var(--plum);
  box-shadow: 0 7px 16px #35182314;
}

.button-outline-light {
  border: 2px solid #fff;
  background: #ffffff14;
  color: #fff;
}

.cms-project-links .button-outline,
.project-actions .button-outline {
  font-weight: 850;
}

/* A tighter rhythm keeps the work visible without oversized empty bands. */
.home-hero {
  min-height: 620px;
  padding-block: clamp(3.5rem, 5vw, 5.5rem);
}

.home-statement,
.featured-section,
.career-section,
.skills-section {
  padding-block: clamp(4rem, 6vw, 6.5rem);
}

.practice-section,
.home-cms-section,
.method-section,
.writing-block,
.teaching-topics,
.teaching-note,
.cms-project-list,
.web-cms-showcase {
  padding-block: clamp(3.75rem, 5.5vw, 6rem);
}

.section-heading-row {
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.practice-grid > a {
  min-height: 290px;
}

.home-split article {
  padding: clamp(3.5rem, 5vw, 5.75rem);
}

.page-hero,
.route-web-development .page-hero,
.route-cms-work .page-hero {
  padding-block: clamp(4rem, 6vw, 6.5rem);
}

.web-project-list {
  padding-bottom: clamp(4rem, 6vw, 6.5rem);
}

.project-detail-title {
  padding: clamp(3rem, 4.5vw, 5rem);
}

.project-detail-body {
  padding-block: clamp(4rem, 6vw, 6.5rem);
}

.project-gallery {
  padding-block: clamp(3.5rem, 5vw, 5.5rem);
}

.next-page-panel {
  min-height: 360px;
  padding: 3.5rem 4vw;
}

.teaching-hero {
  padding-block: clamp(5rem, 7vw, 7.5rem);
}

.teaching-content {
  padding-block: clamp(4rem, 6vw, 6.5rem);
}

.about-stats > div > div {
  min-height: 195px;
}

.project-actions .button-action-build {
  border-color: var(--gold);
  background: #f4e6c8;
  color: var(--ink);
}

.project-actions .button-action-live {
  background: var(--navy);
  color: #fff;
}

/* Balanced index-page heroes */
.route-web-development .page-hero,
.route-cms-work .page-hero {
  grid-template-columns: minmax(0, 1.45fr) minmax(19rem, 0.55fr);
  align-items: end;
  gap: clamp(2.5rem, 4vw, 4.5rem);
  padding-block: clamp(4rem, 6vw, 6.5rem);
}

/* The homepage CMS cards now include the project screenshots themselves. */
.home-cms-grid {
  align-items: stretch;
}

.home-cms-grid article {
  min-width: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.home-cms-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0;
  overflow: hidden;
  background: var(--media-frame);
  border-bottom: 1px solid var(--line);
}

.home-cms-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.home-cms-grid article > p,
.home-cms-grid article > h3,
.home-cms-grid article > a {
  margin-right: 1.4rem;
  margin-left: 1.4rem;
}

.home-cms-grid article > p {
  margin-top: 1.2rem;
  margin-bottom: 0;
}

.home-cms-grid article > h3 {
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.home-cms-grid article > a:first-of-type {
  margin-top: auto;
}

.home-cms-grid article > a:last-child {
  margin-bottom: 1.4rem;
}

.route-web-development .page-hero h1,
.route-cms-work .page-hero h1 {
  max-width: 58rem;
  font-size: clamp(3.5rem, 5vw, 4.8rem);
  line-height: 1.02;
}

.route-web-development .page-hero > p,
.route-cms-work .page-hero > p {
  width: 100%;
  max-width: 35rem;
  justify-self: end;
  margin: 0;
  padding-bottom: 0.35rem;
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.75;
}

/* One original, uncropped image field throughout the portfolio. */
.home-hero-image,
.featured-project-image,
.route-web-development .website-card-image,
.project-detail-media,
.route-cms-work .cms-project-media,
.route-web-development .web-cms-grid .cms-project-media {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--media-frame);
  border: 1px solid var(--line);
}

/* CMS cards retain their current layout while every image uses one frame. */
.route-cms-work .cms-project-media,
.route-web-development .web-cms-grid .cms-project-media {
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
}

.home-hero-image > img,
.featured-project-image img,
.route-web-development .website-card-image img,
.project-detail-media img,
.route-cms-work .cms-project-media img,
.route-web-development .web-cms-grid .cms-project-media img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.home-hero-image > img {
  object-fit: contain;
}

.project-image-mmorbit,
.project-image-kikis-reset-room,
.website-card-image.project-image-mmorbit,
.website-card-image.project-image-kikis-reset-room {
  background: var(--media-frame);
}

/* Kiki's wide desktop capture fills 16:9 by trimming only empty side margins. */
.featured-project-image.project-image-kikis-reset-room img,
.route-web-development .website-card-image.project-image-kikis-reset-room img,
.project-detail-media.project-image-kikis-reset-room img {
  object-fit: cover;
  object-position: center;
}

/* Web Development projects */
.route-web-development .web-project-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.route-web-development .website-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.route-web-development .website-card-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  padding: clamp(1.7rem, 3vw, 2.5rem);
}

.route-web-development .website-card-copy h2 {
  font-size: clamp(2.15rem, 3vw, 3.25rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.route-web-development .website-card .project-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: auto;
}

.route-web-development .website-card .project-actions .button {
  width: 100%;
}

.route-web-development .website-card .project-actions .button:nth-child(3) {
  grid-column: 1 / -1;
}

/* CMS projects are matching cards with fixed media frames and anchored actions. */
.route-cms-work .cms-project-list > .page-width,
.route-web-development .web-cms-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.5rem;
  display: grid;
}

.route-cms-work .cms-project,
.route-web-development .web-cms-grid .cms-project {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-width: 0;
  height: 100%;
  padding: 0;
  background: var(--paper);
  border: 0;
  border-top: 7px solid var(--gold);
  box-shadow: 0 18px 42px #0000002b;
}

.route-cms-work .cms-project-copy,
.route-web-development .web-cms-grid .cms-project-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  padding: 2rem 2rem 1.25rem;
}

.route-cms-work .cms-project-copy h2,
.route-web-development .web-cms-grid .cms-project-copy h2 {
  font-size: clamp(2rem, 2.65vw, 3rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.route-cms-work .cms-project-copy > p,
.route-web-development .web-cms-grid .cms-project-copy > p {
  overflow-wrap: anywhere;
}

.route-cms-work .cms-project-links,
.route-web-development .web-cms-grid .cms-project-links {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.75rem;
  width: 100%;
  margin-top: auto;
  padding: 0 2rem 2rem;
}

.route-cms-work .cms-project-links .button,
.route-web-development .web-cms-grid .cms-project-links .button {
  width: 100%;
}

.route-cms-work .document-link,
.route-web-development .web-cms-grid .document-link {
  display: block;
  min-width: 0;
  padding: 0.65rem 0;
  text-align: center;
  overflow-wrap: anywhere;
}

/* Reuse the CMS projects and images on the Web Development page. */
.web-cms-showcase {
  padding-block: clamp(5rem, 8vw, 9rem);
  background: var(--navy);
  color: #fff;
}

.web-cms-showcase .section-label {
  display: none;
}

.web-cms-showcase .section-heading-row h2 {
  max-width: 960px;
}

.web-cms-showcase .text-link {
  color: #fff;
}

.web-cms-intro {
  max-width: 780px;
  margin: -1rem 0 3rem;
  color: #ffffffc7;
  font-size: 1.05rem;
}

/* Keep secondary portfolio imagery uncropped as well. */
.project-gallery img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  padding: 0;
  object-fit: contain;
  object-position: center;
  background: var(--media-frame);
}

.editorial-card > img,
.case-study-document > img,
.document-card > img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.document-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1.4rem;
}

.document-card {
  min-width: 0;
  height: 100%;
  overflow: hidden;
}

.document-card > div {
  min-width: 0;
}

.document-card h3 {
  max-width: 100%;
  font-size: clamp(1.65rem, 2.1vw, 2.35rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.document-card > img {
  background: var(--media-frame);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

/* Writing case studies use one landscape media system; titles remain HTML. */
.case-study-document {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.case-study-document > img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 16 / 9;
  padding: 0;
  object-fit: contain;
  object-position: center;
}

.case-study-document > div {
  flex: 1;
}

.editorial-card > img {
  aspect-ratio: 16 / 9;
}

.career-cta-copy {
  max-width: 760px;
  margin: -0.4rem auto 2rem;
  color: #ffffffd4;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.75;
}

@media (width <= 1120px) {
  .route-writing .document-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .featured-project .project-actions {
    grid-template-columns: 1fr;
  }

  .featured-project .project-actions .button:nth-child(3) {
    grid-column: auto;
  }

  .route-web-development .page-hero,
  .route-cms-work .page-hero {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 2rem;
  }

  .route-web-development .page-hero > p,
  .route-cms-work .page-hero > p {
    max-width: 48rem;
    justify-self: start;
    padding-bottom: 0;
  }
}

@media (width <= 900px) {
  .route-web-development .web-project-list,
  .route-cms-work .cms-project-list > .page-width,
  .route-web-development .web-cms-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 760px) {
  .route-writing .document-grid {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .home-statement,
  .featured-section,
  .practice-section,
  .home-cms-section,
  .method-section,
  .writing-block,
  .teaching-topics,
  .teaching-note,
  .career-section,
  .skills-section,
  .cms-project-list,
  .web-cms-showcase {
    padding-block: 3.5rem;
  }

  .home-split article {
    padding: 3.5rem 1.25rem;
  }

  .route-web-development .page-hero,
  .route-cms-work .page-hero {
    padding-block: 3.75rem;
  }

  .route-web-development .page-hero h1,
  .route-cms-work .page-hero h1 {
    font-size: clamp(2.8rem, 13vw, 4.25rem);
  }

  .featured-project-image,
  .route-web-development .website-card-image,
  .project-detail-media,
  .route-cms-work .cms-project-media,
  .route-web-development .web-cms-grid .cms-project-media {
    padding: 0;
  }

  .route-web-development .website-card-copy,
  .route-cms-work .cms-project-copy,
  .route-web-development .web-cms-grid .cms-project-copy {
    padding: 1.6rem 1.25rem 1rem;
  }

  .route-web-development .website-card-copy h2,
  .route-cms-work .cms-project-copy h2,
  .route-web-development .web-cms-grid .cms-project-copy h2 {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .route-web-development .website-card .project-actions {
    grid-template-columns: 1fr;
  }

  .route-web-development .website-card .project-actions .button:nth-child(3) {
    grid-column: auto;
  }

  .route-cms-work .cms-project-links,
  .route-web-development .web-cms-grid .cms-project-links {
    padding: 0 1.25rem 1.5rem;
  }

  .web-cms-intro {
    margin-top: -0.5rem;
  }

  .project-detail-title {
    padding: 3.5rem 1.2rem;
  }

  .project-detail-body,
  .project-gallery {
    padding-block: 3.5rem;
  }

  .next-page-panel {
    min-height: 300px;
    padding-block: 3rem;
  }
}
