/* ==========================================================================
   Jonathan Timmerman - style.css
   All presentation for index.htm lives here.
   ========================================================================== */


/* --------------------------------------------------------------------------
   Page defaults
   -------------------------------------------------------------------------- */
body {
  margin: 0;
  color: #000000;
}

a:link    { color: #336699; }
a:visited { color: #006699; }
a:active  { color: #cc0000; }
a         { text-decoration: none; }

.center { text-align: center; }


/* --------------------------------------------------------------------------
   Page layout: left film strip | resume | right film strip
   -------------------------------------------------------------------------- */
table.page,
table.resume,
table.stats { width: 100%; }

td.strip {
  width: 15%;
  vertical-align: top;
}
td.content {
  width: 70%;
  vertical-align: top;
}

/* Film strips, drawn entirely in CSS: a dark band with sprocket holes down
   both edges and the thumbnails as frames in the middle.

     20px edge | 112px frame | 20px edge   = 152px wide
     frames are 74px tall with a 6px gap   = one frame every 80px,
     and holes every 20px                  = four holes beside each frame

   Each hole is one tile of a repeating gradient (10px wide, 20px tall, hole
   from 6px to 14px). The tiles start 5px down, which centres the holes on
   the frames given the 8px of film above the first frame. */
.filmstrip {
  width: 152px;
  box-sizing: border-box;
  padding: 8px 20px;
  background-color: #141414;
  background-image:
    linear-gradient(to bottom, transparent 6px, #ffffff 6px, #ffffff 14px, transparent 14px),
    linear-gradient(to bottom, transparent 6px, #ffffff 6px, #ffffff 14px, transparent 14px);
  background-size: 10px 20px;
  background-repeat: repeat-y;
  background-position: left 5px top 5px, right 5px top 5px;
}
.filmstrip a             { display: block; margin-top: 6px; }
.filmstrip a:first-child { margin-top: 0; }
.filmstrip img {
  display: block;
  width: 112px;
  height: 74px;
  object-fit: cover;
}
.filmstrip a:focus-visible { outline: 2px solid #ffffff; outline-offset: -2px; }

/* The right strip is pushed against the right edge of its column */
.filmstrip-right { margin-left: auto; }

p.footer {
  font-family: Arial, Helvetica, sans-serif;
  font-size: large;
  text-align: center;
  margin: 1rem 0;                     /* 16px, as before the font size was raised */
}


/* --------------------------------------------------------------------------
   Resume table
   -------------------------------------------------------------------------- */
.resume th,
.resume td {
  font-family: Arial, Helvetica, sans-serif;
}

/* Headshot thumbnails: centred rows that wrap, with an even gap */
.headshots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 4px 0;
}
.headshots a   { display: block; line-height: 0; }
.headshots img { display: block; }
.headshots a:focus-visible { outline: 2px solid #336699; outline-offset: 2px; }
.resume th { text-align: left; }

.page-heading {                       /* "Experience" */
  font-size: x-large;
}
.section-title {                      /* "Film/TV:", "Modeling:", ... */
  font-size: large;
  text-decoration: underline;
}
tr.column-heads th {                  /* "Title | Role | Company" */
  font-size: large;
  font-weight: normal;
}

/* column widths (set once; they apply to the whole table) */
th.col-title  { width: 35%; }
th.col-role   { width: 34%; }
td.col-detail { width: 21%; }

/* Height / Weight / Hair / Eyes */
td.stats-cell { height: 58px; }
.stats td {
  font-size: small;
  font-weight: bold;
  text-align: center;
}

td.skills-cell { height: 39px; }

/* Grey divider bars and blank spacer rows */
tr.divider { background-color: #666666; }
tr.divider td,
tr.spacer td {
  padding: 0;
}
tr.divider td     { height: 15px; }
tr.spacer td      { height: 2px; }
tr.spacer-tall td { height: 6px; }


/* ==========================================================================
   Photo gallery lightbox  (built by gallery.js)
   ========================================================================== */
body.gallery-open { overflow: hidden; }

.gallery-lightbox {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.92);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
}
.gallery-lightbox.is-open { display: block; }

/* image area */
.gallery-stage {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  padding: 60px 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.6);
  opacity: 1;
  transition: opacity 0.15s ease;
}
.gallery-lightbox.is-loading .gallery-image { opacity: 0; }
.gallery-lightbox.has-error .gallery-image  { display: none; }

.gallery-error {
  display: none;
  margin: 0;
  font-size: 16px;
}
.gallery-lightbox.has-error .gallery-error { display: block; }

.gallery-spinner {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border: 3px solid rgba(255, 255, 255, 0.25);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: gallery-spin 0.8s linear infinite;
}
.gallery-lightbox.is-loading .gallery-spinner { display: block; }

@keyframes gallery-spin {
  to { transform: rotate(360deg); }
}

/* controls */
.gallery-btn {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font: 30px/44px Arial, Helvetica, sans-serif;
  text-align: center;
  cursor: pointer;
}
.gallery-btn:hover { background: rgba(255, 255, 255, 0.28); }
.gallery-btn:focus { outline: 2px solid #ffffff; outline-offset: 2px; }

.gallery-close { top: 12px; right: 12px; }
.gallery-prev  { top: 50%; left: 16px;  margin-top: -22px; }
.gallery-next  { top: 50%; right: 16px; margin-top: -22px; }

.gallery-counter {
  position: absolute;
  top: 24px;
  left: 20px;
  z-index: 2;
  font-size: 14px;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

/* a group with a single photo has nothing to page through */
.gallery-lightbox.is-single .gallery-prev,
.gallery-lightbox.is-single .gallery-next,
.gallery-lightbox.is-single .gallery-counter { display: none; }

/* narrow screens: give the photo the full width, move the arrows below it */
@media (max-width: 600px) {
  .gallery-stage { padding: 60px 8px 84px; }
  .gallery-prev,
  .gallery-next  { top: auto; bottom: 18px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-image   { transition: none; }
  .gallery-spinner { animation-duration: 2.4s; }
}
