/* The PDF's navy, lime and proportions, with fluid web typography and grids. */
@font-face {
  font-family: 'Portfolio Myriad';
  src: url('fonts/portfolio-myriad.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
:root {
  --navy: #1d283f;
  --lime: #abc62c;
  --grey: #949aa9;
  --page-gap: clamp(1.25rem, 2.2vw, 2.5rem);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: 'Portfolio Myriad', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}
::selection { background: var(--lime); color: var(--navy); }
::-moz-selection { background: var(--lime); color: var(--navy); }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; }
a:focus-visible { outline: 2px solid var(--lime); outline-offset: 5px; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
h1, h2, h3 { font-weight: 400; line-height: 1.2; }
h1, h2 { letter-spacing: .065em; }
h2 { font-size: clamp(1.35rem, 1.9vw, 1.75rem); }
h3 { font-size: 1rem; letter-spacing: .075em; }
p + p { margin-top: 1em; }
img { display: block; max-width: 100%; width: 100%; height: auto; }
figure { min-width: 0; }
figcaption {
  display: flex;
  align-items: baseline;
  gap: .5em;
  padding-top: .55rem;
  font-size: .8125rem;
  line-height: 1.4;
  color: #6d7689;
}
figcaption::before { content: '◆'; color: var(--lime); font-size: .5em; }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10;
  padding: 12px; background: var(--navy); color: white;
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
#portfolio { width: 100%; max-width: 1680px; margin-inline: auto; }
.portfolio-sheet {
  width: 100%;
  padding: clamp(1.25rem, 3.2vw, 3.5rem) clamp(1.25rem, 4vw, 4.5rem);
  scroll-margin-top: 1rem;
  /* Height is always content-driven: no aspect-ratio, scale or clipping. */
}
.page-header { border-bottom: 1px solid var(--grey); margin-bottom: 1rem; padding-bottom: .6rem; }
.page-header a { display: flex; align-items: baseline; gap: clamp(1rem, 3vw, 3rem); font-size: .875rem; letter-spacing: .04em; }
.chapter { color: #91ac19; }
.muted { color: var(--grey); }
.page-footer { border-top: 1px solid var(--grey); margin-top: 1.75rem; padding-top: .45rem; font-size: .75rem; letter-spacing: .1em; }
.page-footer span { font-size: .5rem; margin-right: .3rem; }
.project-title { margin-bottom: 1rem; }
.profile-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr) minmax(0, .9fr); gap: var(--page-gap); }
.profile-grid > *, .image-stack, .project-copy { min-width: 0; }
.identity { position: relative; isolation: isolate; color: white; padding: 0 1rem 2rem; }
.identity::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--navy); clip-path: polygon(0 15rem, 100% 3rem, 100% 100%, 0 100%); }
.portrait { width: 86%; margin-inline: auto; border-left: 5px solid var(--lime); border-bottom: 5px solid var(--lime); }
.identity-details { padding-top: 2rem; }
.identity h1 { color: var(--grey); font-size: clamp(1.35rem, 1.9vw, 1.85rem); overflow-wrap: break-word; }
.profession { color: var(--lime); letter-spacing: .065em; margin-top: .4rem; font-size: 1.0625rem; }
.contacts { margin-top: 2.5rem; }
.contacts h3 { color: var(--grey); border-bottom: 1px solid var(--grey); padding-bottom: .35rem; margin-bottom: .7rem; }
.contacts dl > div { display: grid; grid-template-columns: 5.4rem minmax(0, 1fr); gap: .5rem; margin-top: .55rem; font-size: .9375rem; }
.contacts dt { color: var(--grey); }
.contacts dd { min-width: 0; overflow-wrap: anywhere; }
.contacts a { text-underline-offset: .18em; }
.profile-copy h2 { margin-bottom: 1rem; }
.profile-copy .lead { font-size: 1.125rem; letter-spacing: .035em; line-height: 1.4; margin-bottom: 1.25rem; }
.profile-section { margin-top: 2.4rem; }
.profile-section h3 { border-bottom: 1px solid var(--grey); padding-bottom: .3rem; margin-bottom: .75rem; }
.diamond-list, .software-list { list-style: none; padding: 0; }
.diamond-list li, .software-list li { position: relative; padding-left: 1rem; margin-top: .5rem; }
.diamond-list li::before, .software-list li::before { content: '◆'; position: absolute; left: 0; top: .5em; color: var(--grey); font-size: .5em; }
.software-list li { margin-top: .25rem; }
.software-list li::before { color: var(--lime); }
.contents { border-left: 1px solid var(--lime); padding-left: var(--page-gap); }
.contents-labels, .contents a { display: grid; grid-template-columns: 2rem 2rem minmax(0, 1fr); gap: .6rem; }
.contents-labels { color: #91ac19; font-size: .75rem; margin-block: 2rem 1rem; }
.contents ol { list-style: none; padding: 0; }
.contents a { align-items: baseline; padding: .75rem 0; font-size: .9375rem; line-height: 1.4; }
.contents a > span:last-child { color: #788296; overflow-wrap: break-word; }
.page-number { color: #788296; font-size: .8125rem; }
.project-copy { line-height: 1.5; }
.outlined { border: 1px solid var(--lime); padding: clamp(.8rem, 1.4vw, 1.5rem); }
.keta-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.keta-hero { grid-column: 1 / 3; }
.keta-ground { grid-column: 3; grid-row: 1 / 3; }
.keta-copy { grid-column: 1; }
.keta-upper { grid-column: 2; }
.gallery { display: grid; align-items: start; gap: var(--page-gap); }
.gallery-keta { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.gallery-cava { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.image-stack { display: flex; flex-direction: column; gap: var(--page-gap); }
.eduso-details { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr); gap: var(--page-gap); align-items: start; margin-top: var(--page-gap); }
.eduso-plans { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--page-gap); align-items: start; }
.plan-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--page-gap); align-items: start; }
.cava-grid, .clema-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.construction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 6rem); padding-inline: clamp(0rem, 3vw, 3rem); align-items: start; }
.clema-layout-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--page-gap); align-items: start; }
.thanks { display: flex; flex-direction: column; min-height: 42rem; background: var(--navy); color: white; }
.thanks > h2 { margin: clamp(5rem, 12vw, 12rem) auto; font-size: clamp(2.5rem, 4vw, 4rem); color: var(--lime); border-bottom: 1px solid var(--grey); padding: 0 2rem .5rem; }
.thanks .contacts { margin: auto auto 0; width: min(100%, 23rem); }
.thanks .contacts h3 { text-align: center; }
/* Reflow before columns become narrow, including browser zoom. */
@media (max-width: 1199px) {
  .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contents { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--lime); padding: 1.5rem 0 0; }
  .contents ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; }
  .contents-labels { display: none; }
  .contents h2 { margin-bottom: .75rem; }
  .keta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .keta-hero { grid-column: 1 / -1; }
  .keta-ground { grid-column: 2; grid-row: 2 / 4; }
  .keta-copy { grid-column: 1; grid-row: 2; }
  .keta-upper { grid-column: 1; grid-row: 3; }
}
@media (max-width: 759px) {
  .portfolio-sheet { padding: 1.5rem 1.25rem; }
  .profile-grid, .keta-grid, .gallery, .eduso-details, .eduso-plans, .cava-grid, .clema-grid, .construction-grid, .clema-layout-grid { grid-template-columns: minmax(0, 1fr); }
  .profile-grid > *, .keta-grid > * { grid-column: auto; grid-row: auto; }
  .contents ol { grid-template-columns: minmax(0, 1fr); }
  .identity { max-width: 30rem; width: 100%; justify-self: center; padding: 0 1.25rem 1.75rem; }
  .identity h1 { font-size: 1.7rem; }
  .portrait { width: 85%; max-width: 21rem; }
  .profile-copy { margin-top: 1rem; }
  .contents { padding-top: 1.5rem; }
  .keta-hero { order: 0; }.keta-copy { order: 1; }.keta-ground { order: 2; }.keta-upper { order: 3; }
  .construction-grid { padding-inline: 0; }
  .thanks { min-height: 38rem; }
  .thanks > h2 { margin-block: 7rem; }
}
@media (max-width: 439px) {
  .plan-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .contacts dl > div { grid-template-columns: minmax(0, 1fr); gap: .1rem; margin-top: .85rem; }
  .page-header a { gap: 1rem; font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  .skip-link { display: none; }
  .portfolio-sheet { padding: 0; break-after: page; print-color-adjust: exact; }
  .portfolio-sheet:last-child { break-after: auto; }
  figure, .contacts, h2, h3 { break-inside: avoid; }
}
