@charset "UTF-8";

/* Responsive home page stylesheet.
   Uses the original Jana Charl Design colors, typography and 4:3 thumbnails. */

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #F2F2F2;
  color: #666666;
  font-family: Verdana, Geneva, sans-serif;
}

.site-container {
  width: min(976px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 18px;
  background: #FFFFFF;
  box-shadow: 1px 1px 4px 0 #cccccc;
}

.site-header {
  position: relative;
  min-height: 145px;
  width: 100%;
}

.site-logo {
  position: absolute;
  top: 30px;
  left: 45px;
  display: block;
  width: 240px;
  line-height: 0;
}

.site-logo img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

#jcd_bugcont {
  position: absolute;
  top: 30px;
  left: 57px;
  width: 32px;
  height: 43px;
  z-index: 2;
}

#jcd_bug {
  width: 100%;
  height: 100%;
}

.email-link {
  position: absolute;
  top: 30px;
  right: 45px;
  display: block;
  width: 37px;
  height: 43px;
  line-height: 0;
}

.email-link img {
  display: block;
  width: 37px;
  height: 43px;
  border: 0;
}

.tagline {
  position: absolute;
  top: 91px;
  left: 45px;
  right: 45px;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: normal;
  letter-spacing: 0.1em;
  line-height: 1.4;
  color: #666666;
}

.mobile-nav {
  display: none;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 35px;
  row-gap: 25px;
  width: calc(100% - 90px);
  max-width: 886px;
  margin: 9px auto 0;
}

.portfolio-card {
  min-width: 0;
  margin: 0;
}

.thumbnail-link {
  display: block;
  width: 100%;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow: 2px 2px 4px 0 #999999;
  line-height: 0;
}

.thumbnail-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 0;
  transition: opacity 160ms ease;
}

.thumbnail-link:focus-visible {
  outline: 2px solid #cc0000;
  outline-offset: 4px;
}

.card-caption {
  min-height: 20px;
  margin: 7px 0 0;
  color: #666666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: normal;
  line-height: 1.4;
  letter-spacing: 0;
}

.card-caption strong {
  font-weight: bold;
}

.site-footer {
  width: calc(100% - 90px);
  max-width: 886px;
  margin: 27px auto 0;
  text-align: right;
}

.site-footer small {
  color: #999999;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 9px;
  line-height: 1.4;
}

/* Tablet: two columns, with the header and menu adapting to the narrower width. */
@media (max-width: 900px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 24px;
  }

  .site-header {
    min-height: 145px;
  }

  .email-link {
    right: 30px;
  }

  .tagline {
    left: 30px;
    right: 30px;
  }

  .portfolio-grid,
  .site-footer {
    width: calc(100% - 60px);
  }
}

/* Mobile: one column and a compact hamburger dropdown. */
@media (max-width: 620px) {
  .site-container {
    padding-bottom: 16px;
  }

  .site-header {
    min-height: 139px;
  }

  .site-logo {
    top: 22px;
    left: 16px;
    width: min(220px, calc(100% - 112px));
  }

  #jcd_bugcont {
    top: 22px;
    left: 28px;
    width: 29px;
    height: 39px;
  }

  .email-link {
    top: 20px;
    right: 66px;
    width: 32px;
    height: 38px;
  }

  .email-link img {
    width: 32px;
    height: auto;
  }

  .mobile-nav {
    display: block;
    position: absolute;
    top: 22px;
    right: 16px;
    z-index: 20;
  }

  .mobile-nav summary {
    display: flex;
    width: 36px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    list-style: none;
    border: 1px solid #dddddd;
    background: #FFFFFF;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary::marker {
    content: "";
  }

  .mobile-nav summary span {
    display: block;
    width: 18px;
    height: 2px;
    background: #666666;
  }

  .mobile-nav[open] summary {
    border-color: #cc0000;
  }

  .mobile-nav nav {
    position: absolute;
    top: 44px;
    right: 0;
    width: min(300px, calc(100vw - 32px));
    max-height: min(70vh, 560px);
    overflow-y: auto;
    padding: 10px 0;
    background: #FFFFFF;
    border: 1px solid #e5e5e5;
    box-shadow: 1px 2px 8px rgba(0, 0, 0, 0.16);
  }

  .mobile-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .mobile-nav li a {
    display: block;
    padding: 9px 16px;
    color: #666666;
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: 0.04em;
    text-decoration: none;
  }

  .mobile-nav li a:hover,
  .mobile-nav li a:focus {
    color: #cc0000;
    background: #f7f7f7;
  }

  .tagline {
    top: 83px;
    left: 16px;
    right: 16px;
    font-size: 11px;
    letter-spacing: 0.07em;
    line-height: 1.5;
  }

  .portfolio-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 22px;
    width: calc(100% - 32px);
    max-width: 420px;
    margin-top: 5px;
  }

  .card-caption {
    margin-top: 7px;
    font-size: 12px;
  }

  .site-footer {
    width: calc(100% - 32px);
    margin-top: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thumbnail-link img {
    transition: none;
  }
}
