/* Ben Zinser portfolio — shared styles for every page.
   Colors and fonts match the original Wix site. Edit the variables below to restyle everything. */

:root {
  --ink: #281a39;          /* main text, header and footer bars */
  --paper: #f6f6f6;        /* page sections */
  --page: #dddddd;         /* behind the sections */
  --link: #2061b7;
  --rule: #424242;         /* thin divider lines */
  --nav-bg: #c3bfc7;
  --accent: #f3d324;       /* yellow button */
  --content: 942px;        /* width of the text column */
  --font: "Avenir", "Avenir Next", "Nunito Sans", "Segoe UI", sans-serif;
  --font-weight: 800;      /* Avenir Heavy */
  --font-light: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: var(--font-weight);
  -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; }

a { color: var(--link); }

h1, h2, h3, h4, p { margin: 0; font-weight: var(--font-weight); }
h1 { font-size: 25px; line-height: 1.2; }
h2, h3 { font-size: 24px; line-height: 1.4; }
p, li { font-size: 20px; letter-spacing: 0.05em; line-height: 1.2; }
p + p { margin-top: 1.2em; }
.tight p + p { margin-top: 0; }

.wrap { width: min(var(--content), 100% - 32px); margin: 0 auto; }

/* ---------- header ---------- */

.site-header { background: var(--ink); color: var(--paper); padding-top: 56px; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: flex-end; padding: 12px 0 10px; }
.site-name { font-size: 72px; line-height: 80px; color: var(--paper); text-decoration: none; letter-spacing: 0; }
.header-contact { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-bottom: 8px; }
.header-contact a { color: var(--paper); font-size: 16px; text-decoration: none; letter-spacing: 0; }
.header-contact a:hover { text-decoration: underline; }
.icon-linkedin { width: 26px; height: 26px; display: block; }
.icon-mail { width: 26px; height: 26px; display: none; }

/* Pinned menu bar */
.nav {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(980px, 100% - 16px);
  display: flex; background: var(--nav-bg); border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .6); overflow: hidden;
}
.nav a, .nav button {
  flex: 1 1 auto; height: 36px; display: flex; align-items: center; justify-content: center;
  font: 300 14px/1 var(--font-light); color: var(--ink); text-decoration: none;
  background: none; border: 0; border-left: 1px solid rgba(40, 26, 57, .35); cursor: pointer; padding: 0 10px; white-space: nowrap;
}
.nav > :first-child { border-left: 0; }
.nav a:hover, .nav button:hover { background: rgba(40, 26, 57, .12); }
.nav [aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav .nav-toggle { display: none; }

/* Hamburger icon: three bars that turn into an X while the menu is open. */
.nav-icon, .nav-icon::before, .nav-icon::after {
  display: block; width: 18px; height: 2px; border-radius: 1px; background: var(--ink); transition: transform .2s, background .2s;
}
.nav-icon { position: relative; flex: none; }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; left: 0; }
.nav-icon::before { top: -6px; }
.nav-icon::after { top: 6px; }
.nav.open .nav-icon { background: transparent; }
.nav.open .nav-icon::before { transform: translateY(6px) rotate(45deg); }
.nav.open .nav-icon::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- page sections ---------- */

main { padding: 32px 0 40px; }
main::after { content: ""; display: table; clear: both; }
.section { padding: 32px 0; }
.section:first-child { padding-top: 6px; }

.cols { display: flex; gap: 40px; justify-content: space-between; align-items: flex-start; }
.cols > .text { flex: 1 1 auto; max-width: 621px; }
.cols > .media { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 24px; }

hr.rule { border: 0; border-top: 3px solid var(--rule); margin: 10px 0 30px; }
hr.rule-thick { border: 0; border-top: 7px solid var(--ink); margin: 20px 0 22px; }

figure { margin: 0; text-align: center; }
figcaption { font-size: 12px; letter-spacing: 0.05em; margin-top: 4px; }
figcaption.lg { font-size: 16px; }
.caption-link { color: var(--link); }
.cover { object-fit: cover; }

.note { font-size: 16px; text-align: center; margin: 6px 0 0; }
.center { text-align: center; }
.small { font-size: 16px; }

.btn {
  display: flex; align-items: center; justify-content: center; height: 40px;
  background: var(--accent); color: var(--ink); text-decoration: none; font-size: 16px;
}
.btn:hover { filter: brightness(.95); }

.dark-box { background: var(--ink); color: var(--paper); padding: 10px 8px; }
.dark-box p { font-size: 16px; letter-spacing: 0.05em; line-height: 1.55; }

/* ---------- footer ---------- */

.site-footer { text-align: center; padding-top: 24px; background: var(--paper); }
.site-footer p { font-size: 16px; letter-spacing: 0; line-height: 1.55; }
.site-footer p + p { margin-top: 0; }
.site-footer a { color: var(--ink); }
.copyright { margin-top: 10px; background: var(--ink); color: var(--paper); font: 300 14px/38px var(--font-light); }

/* ---------- contact popup ---------- */

.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(40, 70, 160, .25); padding: 16px; }
.modal.open { display: flex; }
.modal-card { position: relative; background: #fff; width: min(980px, 100%); padding: 40px 6px 30px; display: grid; grid-template-columns: 1fr 1.6fr; gap: 24px; box-shadow: 0 4px 30px rgba(0,0,0,.2); }
.modal-card h2 { font-size: 40px; line-height: 1.1; }
.modal-card .intro p { font-size: 17px; margin-top: 12px; }
.modal-card .intro a { color: var(--ink); }
.modal-close { position: absolute; top: 8px; right: 12px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--ink); }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-right: 10px; }
.contact-form input, .contact-form textarea {
  font: 400 14px var(--font-light); color: var(--ink); border: 1px solid #999; padding: 8px; width: 100%; background: #fff;
}
.contact-form .full { grid-column: 1 / -1; }
.contact-form textarea { min-height: 70px; resize: vertical; }
.contact-form button { grid-column: 1 / -1; height: 40px; background: var(--ink); color: var(--paper); border: 0; font: 400 14px var(--font-light); cursor: pointer; }
.form-status { grid-column: 1 / -1; font-size: 14px; min-height: 1em; }

/* ---------- phones and small tablets ---------- */

@media (max-width: 820px) {
  .site-header { padding-top: 52px; }
  .site-name { font-size: 48px; line-height: 56px; }

  /* Narrow screens: a compact "☰ Page name" button pinned top-left that opens a small panel. */
  .nav {
    top: 8px; left: 8px; transform: none; width: auto; max-width: calc(100% - 16px);
    flex-direction: column; align-items: stretch;
  }
  .nav.open { min-width: 260px; }
  .nav:not(.open) > :not(.nav-toggle) { display: none; }
  .nav a, .nav button { justify-content: flex-start; height: 44px; padding: 0 16px; border-left: 0; border-top: 1px solid rgba(40, 26, 57, .2); font-size: 15px; }
  .nav .nav-toggle { display: flex; gap: 12px; height: 40px; padding: 0 14px; border-top: 0; font-weight: 400; }
  .nav.open .nav-toggle { background: rgba(40, 26, 57, .12); }

  .cols { flex-direction: column; align-items: stretch; gap: 24px; }
  .cols > .text { max-width: none; }
  .cols > .media { align-self: center; }
  p, li { font-size: 18px; }

  .modal-card { grid-template-columns: 1fr; padding: 40px 16px 20px; }
  .contact-form { padding: 0; }
}

/* Very narrow screens: LinkedIn and a mail icon move up into the menu row, top-right, so the
   header stays short. */
@media (max-width: 450px) {
  .site-header { position: relative; }
  .header-contact {
    position: absolute; top: 8px; right: 8px; height: 40px; padding: 0;
    flex-direction: row; align-items: center; gap: 10px;
  }
  .header-contact { gap: 14px; }
  .icon-linkedin, .icon-mail { width: 24px; height: 24px; }
  .icon-mail { display: block; }
  .email-text { display: none; }
  .nav:not(.open) { max-width: calc(100% - 96px); }
  .nav-current { overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- home ---------- */

.home-portrait { float: right; margin: 0 0 20px 40px; }
.home-intro { max-width: 621px; }
.home-bg-heading { margin-top: 84px; }
.home-bg-heading + p { clear: right; }
.logo-band {
  margin: 36px 0; background: var(--ink); border-radius: 30px; min-height: 138px; padding: 20px 26px;
  display: flex; align-items: center; overflow: hidden;
}
.logo-track {
  --gap: 20px;
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--gap);
}
.logo-band img { height: auto; }
/* When the logos don't fit on one row, site.js duplicates them and adds .is-scrolling
   so they pan across in a seamless loop instead of wrapping. */
.logo-band.is-scrolling { padding-inline: 0; }
.logo-band.is-scrolling .logo-track {
  flex: none; flex-wrap: nowrap; justify-content: flex-start; padding-right: var(--gap);
  animation: logo-pan var(--pan-duration, 30s) linear infinite;
}
.logo-band.is-scrolling img { max-width: none; flex: none; }
.logo-band.is-scrolling:hover .logo-track { animation-play-state: paused; }
@keyframes logo-pan { to { transform: translateX(-50%); } }
.home-outside { display: grid; grid-template-columns: 240px 222px 1fr; gap: 22px 38px; align-items: start; }
.home-outside > div { margin-left: -16px; }
.home-outside img { width: 100%; height: 323px; }

@media (max-width: 820px) {
  .home-portrait { float: none; margin: 0 auto 24px; }
  .home-bg-heading { margin-top: 32px; }
  .home-outside > div { margin-left: 0; }
  .logo-band { border-radius: 20px; min-height: 100px; }
  .logo-track { --gap: 48px; justify-content: center; }
  .logo-band img { max-width: 42%; }
  .logo-band.is-scrolling img { width: auto; height: calc(var(--h) * 0.7px); }
  .home-outside { grid-template-columns: 1fr 1fr; }
  .home-outside > div { grid-column: 1 / -1; }
  .home-outside img { height: auto; aspect-ratio: 240 / 323; }
}

/* ---------- professional experience ---------- */

.job { padding-top: 6px; }
.job .cols > .text { max-width: 520px; }
.job-btn { width: 400px; max-width: 100%; margin: 30px 0 25px; }
.job-details { margin-top: 24px; }
.job-details p + p { margin-top: 1.2em; }
.job-media { width: 400px; max-width: 100%; padding-top: 16px; }
.job-media figcaption { max-width: 300px; margin-inline: auto; }
.job-dates { margin: 30px 0 16px; }
.job .note { margin-top: 8px; }
.job hr.rule { margin-top: 8px; }

@media (max-width: 820px) {
  .job-media { width: auto; }
}

/* ---------- leadership ---------- */

.lead { padding-top: 6px; }
.lead > p, .lead-seds p { max-width: 919px; }
.lead-title { margin: 14px 0 0; }
.lead hr.rule, .lead hr.rule-thick { margin: 16px 0 24px; }
.lead-sub { margin-top: 30px; }
.lead-seds { margin-top: 20px; }
.lead-gallery { display: flex; justify-content: space-between; gap: 40px; margin-top: 32px; }
.lead-photos { display: grid; grid-template-columns: 247px 247px; gap: 30px 53px; align-content: start; }
.lead-photos img { width: 247px; height: 247px; }
.lead-photos .wide { grid-column: 1 / -1; justify-self: start; }
.lead-photos .wide img { width: 406px; height: auto; }
.fb-embed { border: 0; flex: 0 0 auto; max-width: 100%; }

@media (max-width: 820px) {
  .lead-gallery { flex-direction: column; align-items: center; }
  .lead-photos { grid-template-columns: 1fr 1fr; gap: 20px; }
  .lead-photos img, .lead-photos .wide img { width: 100%; height: auto; }
}

/* ---------- awards and publications ---------- */

.awards { padding-top: 6px; }
.awards h1 { margin-bottom: 14px; }
.awards .big p, .awards p.big { font-size: 24px; letter-spacing: 0.05em; }
.awards .patents p + p { margin-top: 0; }
.awards p.gap, .awards .patents p.gap { margin-top: 1.2em; }
.award-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; margin: 18px 0 0; }
.award-row > p { max-width: 380px; margin: 0 20px 0 38px; }
.award-row img { flex: 0 0 auto; }
.doc-row { justify-content: center; gap: 82px; }
.doc { display: flex; flex-direction: column; align-items: center; margin: 26px auto 0; width: 180px; }
.awards .wide-text { max-width: 700px; }
.awards hr { margin-top: 30px; }

@media (max-width: 820px) {
  .award-row { flex-direction: column-reverse; gap: 16px; }
  .award-row > p { margin: 0; max-width: none; }
  .doc-row { flex-direction: column; }
  .awards .big p, .awards p.big { font-size: 20px; }
}

/* ---------- personal projects ---------- */

.proj { padding-top: 6px; }
.proj .pp, .proj .pp p, .proj-intro { font-size: 18px; }
.proj-intro { max-width: 492px; margin-bottom: 4px; }
.proj h3 { margin-top: 0; }
.proj .mt, .vex15 .mt { margin-top: 16px; }

.mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 60px; padding: 0 50px; justify-items: center; }
.mini-grid figure img { height: auto; }
.mini-grid figure:nth-child(1) img, .mini-grid figure:nth-child(2) img { height: 363px; }
.mini-grid figure:nth-child(3) img, .mini-grid figure:nth-child(4) img { height: 437px; }

.tower-grid { display: grid; gap: 14px; margin: 16px 0 24px; align-items: start; }
.tower-1 { grid-template-columns: 314px 297px 1fr; }
.tower-2 { grid-template-columns: 393px 252px 1fr; }
.tower-grid .stack { display: flex; flex-direction: column; gap: 8px; }
.tower-grid video, .tower-grid img { width: 100%; height: auto; }
video[data-hover-play] { cursor: pointer; }
/* Play icon over hover-to-play videos; fades out while the video runs. The frame also shows the
   poster as a backdrop, so something stays visible if the browser drops the video's picture. */
.video-frame { position: relative; display: block; background: center / cover no-repeat; }
.video-frame::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -22px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 3.8v16.4a1.3 1.3 0 0 0 2 1.1l13-8.2a1.3 1.3 0 0 0 0-2.2L8 2.7a1.3 1.3 0 0 0-2 1.1z' fill='white'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .8; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .55)); pointer-events: none; transition: opacity .2s;
}
.video-frame.is-playing::after { opacity: 0; }
.tower-grid figure.left figcaption { text-align: left; }
.tower-grid figure.right figcaption { text-align: right; margin: 0 0 4px; }
.tower-1 > figure img, .tower-1 > figure video { height: 517px; object-fit: cover; }
.tower-2 > figure img, .tower-2 > figure video { height: 451px; object-fit: cover; }
.tower-2 .pp { margin-bottom: 30px; }

.dice-jail { display: flex; align-items: center; justify-content: center; gap: 30px; }
.dice-jail p { font-size: 24px; text-align: center; max-width: 254px; line-height: 1.45; }

.pudle-top { display: grid; grid-template-columns: 434px 1fr; gap: 19px; margin-bottom: 56px; }
.pudle-top figure.left figcaption { text-align: left; }
.pudle-top h3 { margin: 4px 0 14px; }
.pudle-top .pp p { max-width: 492px; }
.feature { margin: 0 0 40px; }
.feature .text { max-width: 536px; }
.feature .text h3 { margin-bottom: 10px; }
.feature .text p + p { margin-top: 1.2em; }
.feature .media { width: 380px; }
.feature .media-low { margin-top: 100px; }
.clamp-media { gap: 300px !important; }
.fea-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 20px 0 40px; }
.fea-row figcaption { max-width: 232px; margin-inline: auto; }

.pawes { width: min(980px, 100%); margin: 0 auto; }
.pawes-photo { position: relative; }
.pawes-photo img { width: 100%; height: auto; }
.pawes-photo .dark-box { position: absolute; left: 0; bottom: 95px; width: 379px; max-width: 80%; }
.pawes-render { background: url(/images/mars-render.jpg) center / cover no-repeat; min-height: 868px; padding: 23px 10px; }
.pawes-text { max-width: 522px; }
.pawes-text h3 { margin-bottom: 14px; }
.pawes-text p { max-width: 344px; }
.press { display: grid; grid-template-columns: 284px 290px 400px; gap: 3px; align-items: start; }
.press .small { margin-top: 4px; letter-spacing: 0.02em; line-height: 1.5; }
.press .small + .small { margin-top: 0; }
.press-asme { padding: 43px 0 0 5px; }
.press-asme img { width: 289px; height: 160px; }
.press figure { padding-top: 0; }
.press figure figcaption { margin: 8px 25px 0; }

.vex16 h2 + h2 { margin-bottom: 0; }
.vex16-body { display: grid; grid-template-columns: 319px 648px; gap: 0 1px; justify-content: space-between; }
.vex16-body figure { margin-top: 0; }

.vex15 { display: grid; grid-template-columns: 349px minmax(0, 1fr) 413px; min-height: 1043px; }
.vex15-side { position: relative; overflow: hidden; background: #888; }
.vex15-side video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vex15-side .dark-box { position: absolute; bottom: 34px; left: 95px; width: 232px; }
.vex15-side.right .dark-box { left: 78px; bottom: 24px; width: 256px; }
.vex15-main { padding: 0 40px 40px 56px; background: var(--paper); }
.vex15-main .holonomic { margin: 0 0 30px 70px; }
.brake { display: flex; gap: 20px; align-items: flex-start; }

@media (max-width: 1100px) {
  .vex15 { grid-template-columns: 1fr; }
  .vex15-side { min-height: 520px; }
  .vex15-side .dark-box, .vex15-side.right .dark-box { left: 16px; bottom: 16px; }
  .vex15-main { padding: 24px 16px; }
  .press { grid-template-columns: 1fr 1fr; padding: 16px; gap: 20px; }
  .press figure { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .mini-grid { grid-template-columns: 1fr; padding: 0; }
  .mini-grid figure img { height: auto !important; }
  .tower-1, .tower-2 { grid-template-columns: 1fr; }
  .tower-grid > figure img, .tower-grid > figure video { height: auto !important; }
  .dice-jail { flex-direction: column; }
  .pudle-top { grid-template-columns: 1fr; }
  .feature .media { width: auto; }
  .feature .media-low { margin-top: 0; }
  .clamp-media { gap: 24px !important; }
  .fea-row { flex-direction: column; align-items: center; }
  .pawes-photo .dark-box { position: static; width: auto; max-width: none; }
  .pawes-render { min-height: 0; background: var(--paper); padding: 16px; }
  .press { grid-template-columns: 1fr; }
  .press-asme { padding: 0; }
  .vex16-body { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- medtronic portfolio (private) ---------- */

.mp-intro { display: flex; align-items: center; gap: 40px; padding-bottom: 4px; }
.mp-intro p { font-size: 16px; line-height: 1.45; max-width: 340px; }
.mp-project hr.rule-thick, .mp-patents hr.rule-thick { margin: 22px 0 22px; }
hr.rule-blue { border-top-color: var(--link); }
.mp-row { display: flex; flex-direction: row-reverse; gap: 30px; align-items: flex-start; }
.mp-row + hr { margin-top: 36px !important; }
.mp-text { flex: 1 1 auto; max-width: 490px; }
.mp-text h2 { font-size: 20px; line-height: 1.2; margin-bottom: 1.4em; }
.mp-text ol { margin: 0.6em 0 0; padding-left: 1.4em; }
.mp-text ol + p { margin-top: 1.2em; }
.mp-media { flex: 0 0 426px; display: flex; flex-direction: column; align-items: center; gap: 44px; }
.mp-media figcaption { max-width: 304px; margin-inline: auto; }
.mp-pair { margin-top: 36px; }
.mp-pair > div { display: flex; justify-content: center; align-items: flex-end; gap: 37px; }
.mp-patents p, .mp-patents dt, .mp-patents dd { font-size: 24px; letter-spacing: 0.05em; line-height: 1.25; }
.mp-patents h1 { margin-bottom: 12px; }
.mp-patents dl { margin: 1.25em 0 0; max-width: 789px; }
.mp-patents dl > div + div { margin-top: 1.25em; }
.mp-patents dd { margin: 0; }

@media (max-width: 820px) {
  .mp-intro { flex-direction: column; align-items: flex-start; gap: 16px; }
  .mp-intro p { max-width: none; }
  .mp-row { flex-direction: column; gap: 32px; }
  .mp-text { max-width: none; }
  .mp-media { flex-basis: auto; align-self: center; gap: 32px; }
  .mp-patents p, .mp-patents dt, .mp-patents dd { font-size: 18px; }
}
