/* Typography and spacing retained from the original portfolio. */
:root {
  --site-width: 1920px;
  --gutter: 4vw;
  --type-step: min(1.2vw, 23.04px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; color: #000; background: #fff; font: calc(16px + .1 * var(--type-step))/1.8 Georgia, serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
figure, p, h1, h2, h3, h4 { margin: 0; }
p + p { margin-top: 1rem; }
p a { text-decoration: underline; text-underline-offset: .15em; }
h1, h2, h3, h4, .project-card span, .project-pagination span { font-family: 'Be Vietnam Pro', sans-serif; font-weight: 700; letter-spacing: -.03em; }
h2 { font-size: calc(16px + 1.6 * var(--type-step)); line-height: 1.3104; }
h3 { font-size: calc(16px + .8 * var(--type-step)); line-height: 1.3552; }
h4 { font-size: calc(16px + .2 * var(--type-step)); line-height: 1.3888; }
.large { font-size: calc(16px + .2 * var(--type-step)); }
.small { font-size: calc(16px - .1 * var(--type-step)); }
ul, ol { margin: 1em 0; padding-left: 40px; }
li p { margin: .5em 0; }
a:focus-visible, button:focus-visible { outline: 2px solid #5b9f35; outline-offset: 5px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 10px; left: 10px; z-index: 30; padding: 10px; background: white; }
/* One shared header for every page. */
.site-header { position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 1.8vw var(--gutter); background: #fff; box-shadow: 0 1px #000; line-height: 1; }
.desktop-nav { display: flex; gap: 20px; }
.desktop-nav a[aria-current] { text-decoration: underline; text-underline-offset: 8px; }
.logo { display: block; line-height: 0; }
.logo img { display: block; width: auto; height: 32px; }
.linkedin { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid #000; font: bold 19px/1 Arial, sans-serif; }
.desktop-linkedin { justify-self: end; }
.menu-toggle { display: none; }
.mobile-menu[hidden] { display: none; }
.mobile-menu { position: fixed; inset: var(--header-height, 90px) 0 0; z-index: 19; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fff; }
.mobile-menu > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 36px; }
.mobile-menu > .linkedin { position: absolute; bottom: 30px; }
body.menu-open { overflow: hidden; }
/* Natural document flow: text, split sections, media and galleries. */
.intro { padding: 4.136vw var(--gutter) 1.3vmax; color: #808080; text-align: center; }
.intro p { max-width: 53.31vw; margin-inline: auto; }
.case-study { width: calc(100% - 2 * var(--gutter)); max-width: var(--site-width); margin-inline: auto; padding-bottom: 4vw; }
.case-section { display: flow-root; }
.case-text { min-width: 0; }
.case-text h3 { margin-bottom: 16px; }
.case-split, .case-gallery { display: grid; align-items: start; }
.case-figure { min-width: 0; }
.case-split--image-first > .case-figure { order: -1; }
.media-frame { position: relative; }
.media-frame img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media-frame img.crop { object-fit: cover; }
.case-figure figcaption, .gallery-caption { margin-inline: auto; }
.case-figure figcaption p, .gallery-caption p { text-align: center; }
/* Portfolio thumbnails retain the square crop and hover titles. */
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; padding: 6.6vw var(--gutter); }
.project-card { position: relative; display: block; aspect-ratio: 1; overflow: hidden; container-type: inline-size; }
.project-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.project-card span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 7%; text-align: center; font-size: clamp(1rem, 7.5cqi, 1.8rem); line-height: 1.4; overflow-wrap: anywhere; hyphens: auto; opacity: 0; transition: opacity .25s; }
.project-card:hover img, .project-card:focus-visible img { opacity: .3; }
.project-card:hover span, .project-card:focus-visible span { opacity: 1; }
.about-layout { display: grid; grid-template-columns: 45% 45%; gap: 10%; margin: 3.3vmax var(--gutter); align-items: center; }
.about-layout > img { display: block; width: 100%; height: auto; }
.about-text h2 { margin-bottom: .8em; }
.project-pagination { display: flex; justify-content: space-between; gap: 8%; padding: 4vw; }
.project-pagination a { width: 46%; }
.project-pagination a.next { text-align: right; margin-left: auto; }
.project-pagination small { display: block; font-size: .85em; }
.project-pagination span { overflow-wrap: anywhere; display: block; font-size: calc(16px + .8 * var(--type-step)); line-height: 1.4; }
.site-footer { min-height: 33vh; padding: 5.066vw var(--gutter) 16.5vw; text-align: center; }
@media (max-width: 767px) {
  :root { --gutter: 6vw; }
  .site-header { grid-template-columns: 1fr auto; padding: 6vw; }
  .logo { grid-column: 1; grid-row: 1; justify-self: start; }
  .logo img { height: 24px; }
  .desktop-nav, .desktop-linkedin { display: none; }
  .menu-toggle { display: flex; width: 37px; height: 37px; border: 0; padding: 11px 1px; background: transparent; flex-direction: column; justify-content: space-between; cursor: pointer; }
  .menu-toggle span { width: 35px; height: 1px; background: #000; transition: transform .2s; }
  [aria-expanded="true"].menu-toggle span:first-child { transform: translateY(7px) rotate(45deg); }
  [aria-expanded="true"].menu-toggle span:last-child { transform: translateY(-7px) rotate(-45deg); }
  .intro { padding-block: 1.3vmax; }
  .intro p { max-width: none; }
  .site-footer { padding: calc(4vw + 35px) var(--gutter) calc(6.6vmax + 6vw); }
  .projects { grid-template-columns: 1fr; }
  .about-layout { grid-template-columns: 1fr; gap: 34px; }
  .about-text h2 { margin-bottom: .8em; }
}
@media (max-width: 767px) and (orientation: portrait) { :root { --type-step: min(1.2vh, 10.8px); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
