@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --paper: #f7f7f4;
  --ink: #20211e;
  --muted: #73746e;
  --line: #dedfd9;
  --accent: #b6c8a5;
  font-family: "DM Sans", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: #667954; }
.page { width: min(100% - 64px, 880px); margin: 0 auto; }
.intro { min-height: 355px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 78px 0 50px; border-bottom: 1px solid var(--line); }
.eyebrow, .section-heading span, .tag, .experience-label, footer { font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.eyebrow { color: var(--muted); margin: 0 0 18px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font: 800 clamp(3rem, 8vw, 5.8rem)/.98 "Manrope", sans-serif; letter-spacing: -.075em; }
.period { color: #8ea27a; }
.lead { max-width: 610px; margin: 0; font-size: clamp(1rem, 2.1vw, 1.28rem); line-height: 1.7; color: #5d5e58; }
.lead a { color: var(--ink); text-decoration-color: #aeb89f; text-decoration-thickness: 2px; }
.index-link { flex: 0 0 auto; padding-bottom: 4px; font-size: .85rem; text-decoration: none; }
.index-link span { margin-left: 8px; }
.home-nav { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.intro { position: relative; }
.experience-portfolio { position: absolute; top: 20px; right: 0; display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid #bac5af; border-radius: 3px; background: #eef2e9; color: var(--ink); font-size: .8rem; font-weight: 500; text-decoration: none; }
.experience-portfolio:hover { background: #e4ebdc; }
.experience-portfolio:focus-visible { outline: 2px solid #667954; outline-offset: 4px; }
.experience-frame { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; border: 0; opacity: 0; pointer-events: none; }
.experience-frame.is-visible { opacity: 1; pointer-events: auto; transition: opacity 220ms ease; }
.experience-open { overflow: hidden; }
.experience-open .page { visibility: hidden; }
.experience-loading { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--paper); padding: 32px; text-align: center; }
.experience-loading[hidden] { display: none; }
.experience-loading h2 { font: 700 clamp(1.6rem, 5vw, 2.4rem) "Manrope", sans-serif; letter-spacing: -.05em; margin: 0 0 16px; }
.experience-loading-copy { color: var(--muted); max-width: 420px; font-size: .9rem; }
.experience-loading-track { width: min(280px, 80vw); height: 3px; background: var(--line); margin: 10px 0; }
.experience-loading-track i { display: block; height: 100%; width: 0; background: #8ea27a; transition: width 200ms ease; }
.experience-loading-percent { color: var(--muted); font-size: .75rem; }
.experience-loading button { border: 1px solid #bac5af; background: transparent; border-radius: 3px; padding: 10px 16px; color: var(--ink); font: inherit; font-size: .8rem; cursor: pointer; }
.experience-loading a { margin-top: 18px; font-size: .8rem; }
@media (prefers-reduced-motion: reduce) { .experience-frame.is-visible, .experience-loading-track i { transition: none; } }
.section { display: grid; grid-template-columns: 190px 1fr; gap: 30px; padding: 58px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: flex; gap: 14px; align-items: baseline; }
.section-heading span { color: #92938c; font-variant-numeric: tabular-nums; }
.section-heading h2 { margin: 0; font-size: .94rem; font-weight: 600; }
.project-card { border: 1px solid var(--line); background: rgba(255,255,255,.47); padding: 26px 28px 24px; }
.project-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.tag { display: inline-block; color: #56664a; background: #e9eee3; padding: 7px 10px; border-radius: 2px; letter-spacing: .04em; font-size: .67rem; }
.external { font-size: .8rem; text-decoration: none; }
h3 { margin: 24px 0 10px; font: 700 clamp(1.45rem, 3vw, 2rem)/1.2 "Manrope", sans-serif; letter-spacing: -.045em; }
.project-summary, .story-copy { color: #5f605a; font-size: .95rem; line-height: 1.8; }
.project-summary { max-width: 570px; margin-bottom: 26px; }
.project-links { display: flex; flex-wrap: wrap; gap: 10px 20px; border-top: 1px solid var(--line); padding-top: 17px; }
.project-links a { font-size: .78rem; text-decoration: none; }
.project-links span { color: #889777; margin-left: 3px; }
.story-copy p { margin-bottom: 17px; }
.story-copy p:last-child { margin-bottom: 0; }
.experience-list { display: grid; }
.experience-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.experience-item:first-child { padding-top: 0; }
.experience-item:last-child { border-bottom: 0; padding-bottom: 0; }
.experience-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.experience-top h3 { margin: 0; font: 700 .95rem/1.25 "Manrope", sans-serif; letter-spacing: -.025em; }
.experience-top span { color: var(--muted); font-size: .68rem; text-align: right; }
.experience-top h3 a { text-decoration-color: #aeb89f; text-underline-offset: 3px; }
.experience-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: .72rem; }
.experience-links a { text-decoration-color: #aeb89f; }
.experience-item p { margin: 5px 0 0; color: #5f605a; font-size: .78rem; line-height: 1.45; }
footer { display: flex; justify-content: space-between; padding: 24px 0 38px; color: #777870; font-size: .65rem; }
footer a { text-decoration: none; }
@media (min-width: 900px) and (min-height: 720px) {
  .page {
    width: min(100% - 80px, 1240px);
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    column-gap: clamp(36px, 5vw, 76px);
  }
  .intro { grid-column: 1 / -1; min-height: 0; padding: 30px 0 27px; align-items: flex-end; }
  h1 { font-size: clamp(3.3rem, 5vw, 4.5rem); margin-bottom: 9px; }
  .eyebrow { margin-bottom: 10px; }
  .lead { font-size: 1.05rem; line-height: 1.55; }
  .experience { grid-column: 1; grid-row: 2; }
  .featured { grid-column: 2; grid-row: 2; }
  .section { grid-template-columns: 1fr; align-content: start; gap: 15px; padding: 24px 0; }
  .project-card { padding: 21px 23px; }
  h3 { margin: 17px 0 8px; font-size: 1.6rem; }
  .project-summary, .story-copy { font-size: .86rem; line-height: 1.6; }
  .project-summary { margin-bottom: 17px; }
  .project-links { gap: 9px 16px; padding-top: 13px; }
  .story-copy p { margin-bottom: 11px; }
  .experience-item { padding: 9px 0; }
  .experience-item p { font-size: .75rem; }
  footer { grid-column: 1 / -1; grid-row: 3; padding: 15px 0 18px; }
}
@media (min-width: 900px) and (max-height: 800px) {
  .intro { padding-top: 19px; padding-bottom: 18px; }
  .section { padding-top: 17px; padding-bottom: 17px; }
  .project-card { padding: 16px 19px; }
  .story-copy, .project-summary { font-size: .82rem; line-height: 1.48; }
  .story-copy p { margin-bottom: 8px; }
  .experience-item { padding: 6px 0; }
  .experience-item p { font-size: .72rem; line-height: 1.35; }
  footer { padding-top: 10px; padding-bottom: 12px; }
}
@media (max-width: 650px) {
  .page { width: min(100% - 40px, 520px); }
  .intro { min-height: 310px; display: block; padding: 66px 0 34px; }
  .index-link { display: inline-block; margin-top: 24px; }
  .section { grid-template-columns: 1fr; gap: 22px; padding: 38px 0; }
  .project-card { padding: 21px 19px; }
  .project-topline { align-items: flex-start; }
  .project-links { gap: 12px 17px; }
  .experience-list a { grid-template-columns: 95px 1fr 14px; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Shared visual system for the linked detail pages. */
body:not(#top) {
  max-width: none;
  padding: 34px 28px;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  line-height: 1.65;
}
body:not(#top) .content-block { width: min(100%, 1000px); margin: 0 auto; }
body:not(#top) .page-title { margin: 28px 0 30px; font: 800 clamp(2.7rem, 7vw, 4.6rem)/1 "Manrope", sans-serif !important; letter-spacing: -.07em; color: var(--ink) !important; }
body:not(#top) h1,
body:not(#top) h2,
body:not(#top) h3,
body:not(#top) h4 { font-family: "Manrope", sans-serif !important; font-style: normal !important; color: var(--ink) !important; letter-spacing: -.045em; }
body:not(#top) p,
body:not(#top) li,
body:not(#top) blockquote { color: #5f605a !important; font-family: "DM Sans", sans-serif !important; line-height: 1.7 !important; }
body:not(#top) a { color: var(--ink) !important; text-decoration-color: #aeb89f; text-underline-offset: 4px; }
body:not(#top) a:hover { color: #667954 !important; }
body:not(#top) .back-link { display: inline-block; margin: 0; font-size: .84rem; font-weight: 500; text-decoration: none; }
body:not(#top) img { max-width: 100%; height: auto; }
@media (max-width: 650px) {
  body:not(#top) { padding: 24px 20px; }
  body:not(#top) .page-title { margin: 24px 0; }
}
