/* Deep water, cut blocks of ice and a few loose shards. */
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; position: relative; overflow-x: hidden; color: #16294d;
       background: linear-gradient(#1a5c93, #123a7a 50%, #0a234f);
       font: 400 1.05rem/1.55 Nunito, ui-rounded, system-ui, sans-serif; }

header { position: relative; color: #fff; text-align: center; padding: 4rem 1rem 8rem; background: #232a5c; }

/* two layers of snow: everything below is under water */
.snow { display: block; position: absolute; left: 0; bottom: -1px; width: 100%; height: 7rem; }
h1 { margin: 0; font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 900; line-height: 1.1; }
header p { margin: .5rem 0 0; }
.contact { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; margin-top: 1.25rem; }
.contact span { background: rgb(255 255 255 / .12); border-radius: 99px; padding: .3rem 1rem; font-size: .95rem; font-weight: 700; }
.contact a { color: inherit; text-decoration: none; }

main { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; max-width: 60rem; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.wide { grid-column: 1 / -1; }
.tall { grid-row: span 2; }

/* ice block: a darker cut rim (::before) around a lighter face (::after) */
section { --c: 22px; position: relative; isolation: isolate; padding: 2rem 2.4rem 2.2rem;
          filter: drop-shadow(0 14px 18px rgb(3 12 35 / .5)) saturate(.95); }
section::before, section::after { content: ""; position: absolute; z-index: -1;
  clip-path: polygon(var(--c) 0, calc(100% - var(--c) * 1.6) 0, 100% var(--c), 100% calc(100% - var(--c)),
                     calc(100% - var(--c)) 100%, calc(var(--c) * 1.6) 100%, 0 calc(100% - var(--c)), 0 var(--c)); }
section::before { inset: 0; background: linear-gradient(160deg, #e8fbff 0 18%, #9fdcf2 18% 55%, #6fb4e0 55% 82%, #9fdcf2 82%); }
section::after { --c: 17px; inset: 8px 9px 12px; background:
    linear-gradient(118deg, transparent 0 74%, rgb(255 255 255 / .5) 74% 78%, transparent 78% 80%, rgb(255 255 255 / .5) 80% 81.5%, transparent 81.5%),
    linear-gradient(165deg, #dcf3fc, #acd9f0); }
h2 { margin: 0 0 .5rem; font-size: 1.4rem; font-weight: 900; color: #1d4f8c; }
h3 { margin: 0 0 .25rem; font-size: 1.15rem; }
h3 + p { margin: 0; }
.when + h3 { margin-top: .9rem; }
p + h3 { margin-top: 1.25rem; }
h3 + .when { margin: 0 0 .4rem; }
.when + p { margin-top: 0; }
.when { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.when span { background: #1d4f8c; color: #fff; border-radius: 99px; padding: .1rem .75rem; font-size: .85rem; font-weight: 700; }
section > :last-child { margin-bottom: 0; }
@media print { .when span { background: none; color: inherit; padding: 0; } }

/* loose shards */
.bits i { position: absolute; width: 34px; height: 30px; background: #9fdcf2; opacity: .55;
          clip-path: polygon(45% 0, 100% 38%, 78% 100%, 12% 86%, 0 35%); }
.bits i:nth-child(1) { top: 5rem; left: 9%; }
.bits i:nth-child(2) { top: 14rem; left: 17%; width: 16px; height: 14px; rotate: 40deg; }
.bits i:nth-child(3) { top: 3rem; right: 16%; width: 18px; height: 16px; rotate: -30deg; }
.bits i:nth-child(4) { top: 11rem; right: 8%; width: 48px; height: 42px; rotate: 70deg; }
.bits i:nth-child(5) { top: 31rem; left: 4%; width: 26px; height: 22px; rotate: 150deg; }
.bits i:nth-child(6) { top: 43rem; right: 4%; rotate: 200deg; }

@media (max-width: 700px) { main { grid-template-columns: 1fr; } .tall { grid-row: auto; } section { padding: 1.75rem; } .bits { display: none; } }

@media print {
  body { min-height: 0; background: #fff; color: #16294d; }
  header { color: #16294d; text-align: left; padding: 0; background: none; }
  .contact { justify-content: flex-start; }
  .contact span { background: none; padding: 0; }
  .bits, .snow, section::before, section::after { display: none; }
  main { display: block; padding: 0; }
  section { filter: none; padding: 0; margin-top: 1rem; }
}

/* keep the printed CV to one page */
@media print {
  body { font-size: 10pt; line-height: 1.35; }
  h1 { font-size: 22pt; }
  h2 { margin: 0 0 .25rem; font-size: 13pt; }
  h3 { font-size: 10.5pt; margin-bottom: .1rem; }
  section { margin-top: .7rem; }
  section p, header p { margin-top: .15rem; margin-bottom: 0; }
  p + h3, .when + h3 { margin-top: .45rem; }
  .when, h3 + .when { margin: .15rem 0 0; }
}
