/* Homepage styles. Replaces the old 736 KB Bootstrap bundle (main.js); the
   look follows Bootstrap's "Product" example, which the page was built on. */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #212529;
  background: #fff;
}

h1, h2 { margin: 0 0 .5rem; font-weight: 300; line-height: 1.2; }
p { margin: 0 0 1rem; }
img { display: block; }

/* Translucent sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: rgba(0, 0, 0, .85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.site-header nav {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 2rem;
  padding: 0 .75rem;
}
.site-header a {
  display: inline-flex;
  align-items: center;
  padding: .75rem 1rem;
  font-size: .875rem;
  color: #8e8e8e;
  text-decoration: none;
  transition: color .15s ease-in-out;
}
.site-header a:hover { color: #fff; }
.site-header a.active { color: #fff; border-bottom: 3px solid #fff; }
.site-header .icon { filter: grayscale(100%); transition: filter .3s ease-in-out; }
.site-header a:hover .icon { filter: grayscale(0%); }

/* Hero with the two decorative "devices" */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6rem 1rem;
  text-align: center;
  background: #f8f9fa;
}
.hero h1 { position: relative; z-index: 1; font-size: calc(1.475rem + 2.7vw); }
.hero .lead { position: relative; z-index: 1; max-width: 29rem; margin: 0 auto; }
.device {
  display: none;
  position: absolute;
  right: 10%;
  bottom: -30%;
  width: 300px;
  height: 540px;
  background-color: #333;
  border-radius: 21px;
  transform: rotate(30deg);
}
.device::before {
  position: absolute;
  top: 10%;
  right: 10px;
  bottom: 10%;
  left: 10px;
  content: "";
  background-color: rgba(255, 255, 255, .1);
  border-radius: 5px;
}
.device-2 { top: -25%; right: auto; bottom: 0; left: 5%; background-color: #e5e5e5; }

.lead { font-size: 1.25rem; font-weight: 300; text-align: justify; text-align-last: center; }

/* Project tiles: two per row from tablet width up */
.projects { display: grid; }
.tile {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 2rem 1rem 0;
  text-align: center;
  background: #f8f9fa;
}
.tile h2 { font-size: calc(1.425rem + 2.1vw); }
.tile.dark { background: #212529; color: #fff; }
.tile.blue { background: #0d6efd; color: #fff; }
.tile .text { flex-grow: 1; padding: 0 1rem 1rem; }
.shot {
  width: 100%;
  height: 200px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 21px 21px 0 0;
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}
.shot img {
  width: 100%;
  height: calc(100% + 10px);
  object-fit: cover;
  object-position: top;
  transition: margin-top .3s ease-in-out;
}
.shot img:hover { margin-top: -10px; }

footer { padding: 3rem 0; text-align: center; }
footer img { margin: 0 auto .5rem; }
footer small { color: #6c757d; font-size: .875em; }

@media (min-width: 768px) {
  .device { display: block; }
  .hero { margin: 1rem; padding: 8rem 1rem; }
  .projects { grid-template-columns: 1fr 1fr; gap: 1rem; margin: 0 1rem; }
  .tile { padding: 3rem 3rem 0; }
}
@media (min-width: 979px) {
  .shot { height: 300px; }
}
@media (min-width: 992px) {
  .shot { width: 83.333%; }
}
@media (min-width: 1200px) {
  .hero h1 { font-size: 3.5rem; }
  .tile h2 { font-size: 3rem; }
}
