/* -----------------------------
   ENGINEERING TIMELINE (FULL)
------------------------------ */

/* Global: keep sans-serif on this page even if style.css is missing it */
html, body {
  font-family: Arial, Helvetica, "Calibri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  line-height: 1.6;
}

/* Smooth anchor scrolling */
html { scroll-behavior: smooth; }

/* Layout container */
.page {
  max-width: 1240px;   /* was 1040px */
  margin: 2.5rem auto;
  padding: 0 1.5rem;
}


/* Intro box */
.hero {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 1.25rem;
  margin-bottom: 2.25rem;
}

.hero h2 { margin-top: 0; }

/* Jump links */
.jump-links {
  margin-top: 1rem;
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.jump-links a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #0a2540;
  background: #fff;
}

.jump-links a:hover { text-decoration: underline; }

/* Timeline container */
.timeline { position: relative; }

/* Each entry row */
.entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.25rem;
  align-items: start;
  padding: 2rem 0;
  border-top: 1px solid #e6e6e6;

  /* Parallax variables */
  --parallax-card: 0px;
  --parallax-media: 0px;
}

/* Sticky label column */
.sticky-label {
  position: sticky;
  top: 16px;
  align-self: start;
}

/* Year + Age chip (stacked) */
.label-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;

  padding: 0.55rem 0.75rem;
  min-width: 92px;

  text-align: center;
  background: #ffffff;
  border: 1px solid #d7d7d7;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);

  color: #0a2540;
}

.label-chip .year {
  font-size: 0.95rem;
  line-height: 1;
  letter-spacing: 0.3px;
  font-weight: 800;
}

.label-chip .age {
  font-size: 1.25rem;
  font-weight: 700;
  color: #555;
}

/* Card (reveal + parallax-aware transforms) */
.entry .card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 1.1rem;

  opacity: 0;
  transform: translateY(calc(18px + var(--parallax-card)));
  transition:
    opacity 520ms ease,
    transform 520ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;

  will-change: transform, opacity;
}

.entry.revealed .card {
  opacity: 1;
  transform: translateY(var(--parallax-card));
}

.card h3 {
  margin: 0 0 0.35rem 0;
  color: #0a2540;
}

.lede {
  margin: 0 0 0.9rem 0;
  color: #222;
  font-size: 1.05rem;
}

.bullets {
  margin: 0;
  padding-left: 1.2rem;
}

.bullets li { margin: 0.55rem 0; }

/* Ensure both cards always sit in the content column (right side) */
.entry > .card {
  grid-column: 2;
}

.entry > .sticky-label {
  grid-column: 1;
}

@media (max-width: 860px) {
  .entry > .card,
  .entry > .sticky-label {
    grid-column: auto;
  }
}





/* -----------------------------
   MEDIA RULES (single image)
   Target: ~50% width on desktop
   ------------------------------ */
   
   /* Make single-image media link behave like a tile */
.media a.lightbox-trigger {
  display: block;         /* anchor becomes a block */
  width: 100%;
  height: 100%;
  text-decoration: none;
}

/* Ensure image fills the figure cleanly */
.media a.lightbox-trigger img {
  display: block;
  width: 100%;
  height: auto;
}


.media {
  margin: 1rem 0 0 0;

  /* THIS is the "50% size" behavior */
  width: min(52%, 520px);

  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;

  background: #ffffff;
}

/* Image should NOT have its own rounding; container clips it perfectly */
.media img {
  display: block;
  width: 100%;
  height: auto;

  border-radius: 0;
  background: #ffffff;

  transform: translateY(var(--parallax-media));
  will-change: transform;
}

.media figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  color: #555;
}

/* -----------------------------
   MEDIA GRID (2–3 photos, videos)
------------------------------ */

.media-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

/* Responsive grid */
@media (max-width: 860px) {
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .media-grid { grid-template-columns: 1fr; }
}

.media-tile {
  position: relative;
  display: block;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  text-decoration: none;

  transition: transform 160ms ease, box-shadow 160ms ease;
}

.media-tile img {
  display: block;
  width: 100%;
  height: auto;

  border-radius: 0;
  background: #ffffff;

  transform: translateY(var(--parallax-media));
  will-change: transform;
}

/* YouTube play overlay */
.media-tile .play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 2.25rem;
  color: white;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
  opacity: 0.95;
  pointer-events: none;
}

.media-tile:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

/* Image fills container + parallax-safe */
.media img,
.media-tile img {
  display: block;
  width: 100%;
  height: auto;
      object-fit: cover;
      object-position: center center;

  /* IMPORTANT */
  transform: translateY(var(--parallax-media)) scale(1.05);
  transform-origin: center;

  border-radius: 0;
  background: #ffffff;

  will-change: transform;
}


.media-tile.push-up img {
  object-position: center 75%;
}

.media-tile.push-down img {
  object-position: center 25%;
}


/* -----------------------------
   ACTIVE ENTRY STYLING
------------------------------ */

.entry.active .label-chip {
  background: #0a2540;
  color: #ffffff;
  border-color: #0a2540;
  box-shadow: 0 12px 26px rgba(0,0,0,0.15);
}

.entry.active .label-chip .age {
  color: #dbe7ff;
}

.entry.active .card {
  border-color: #bfc8d2;
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transform: translateY(calc(-4px + var(--parallax-card)));
}

/* -----------------------------
   MOBILE LAYOUT
------------------------------ */

@media (max-width: 860px) {
  .entry {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .sticky-label { position: static; }

  .label-chip {
    min-width: auto;
    padding: 0.45rem 0.65rem;
  }

  .label-chip .year { font-size: 0.95rem; }
  .label-chip .age  { font-size: 0.78rem; }

  /* Single media should be full width on mobile */
  .media { width: 100%; }
}

/* -----------------------------
   REDUCED MOTION
------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .entry { --parallax-card: 0px; --parallax-media: 0px; }

  .entry .card {
    transition: none;
    opacity: 1;
    transform: none;
  }
  
  /* Default: visible */
.entry .card {
  opacity: 1;
  transform: translateY(var(--parallax-card));
}

  .media img,
  .media-tile img {
    transform: none;
  }
}


/* ------------------------------
   LIGHTBOX 
   ------------------------------------*/
   
/* -----------------------------
   LIGHTBOX (tap image to expand)
------------------------------ */

/* -----------------------------
   LIGHTBOX (tap image to expand)
------------------------------ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 9999;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(96vw, 1100px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.lightbox-caption {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: center;
  opacity: 0.95;
}

.lightbox-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.28);
}

/* Make tiles feel tappable */
.lightbox-trigger {
  cursor: zoom-in;
}

/* -------------------------------
  FIXED ASPECT RATIO FOR GALLERY IMAGES
  ----------------------------------*/
  
  /* ---------------------------------
   MEDIA GRID: FORCE EQUAL TILE SIZE
---------------------------------- */

/* Every tile has the same aspect ratio */
.media-tile {
  aspect-ratio: 4 / 3;     /* you can change this to 1 / 1 or 3 / 2 */
}

/* Image fills the tile and crops as needed */
.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* THIS is the key */
  object-position: center;
}


/* -----------------------------
   TWO-UP YOUTUBE VIDEO GRID
------------------------------ */

.video-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px; /* REQUIRED spacing */
}

/* Responsive video wrapper */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;

  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

/* Iframe fills wrapper */
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Stack on mobile */
@media (max-width: 720px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

.video-embed:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}


/* ---------------------------------
   FACEBOOK VIDEO GRID FIX
---------------------------------- */

/* Left-align grid columns instead of stretching */
.fb-grid {
  grid-template-columns: repeat(auto-fit, minmax(267px, max-content));
  justify-content: start;  /* THIS is the key */
  gap: 15px;
}

/* Tile wrapper */
.fb-tile {
  width: 267px;          /* match Facebook embed width */
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

/* Make iframe fill the tile */
.fb-tile iframe {
  width: 100%;
  height: 100%;
  aspect-ratio: 9 / 16;  /* portrait video */
  border: 0;
  display: block;
}

.fb-tile:hover {
  box-shadow: 0 14px 34px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  transition: transform 160ms ease, box-shadow 160ms ease;
}


/* Facebook posts (show_text=true) need flexible height */
.fb-grid.fb-posts {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  justify-content: start;
  gap: 15px;
}

.fb-tile.fb-post {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #fff; /* post background */
  border: 1px solid #e6e6e6;
}

/* Let Facebook decide the height */
.fb-tile.fb-post iframe {
  width: 100%;
  height: 720px;   /* ✅ gives room for post text */
  border: 0;
  display: block;
}

/* On smaller screens, give more height so text doesn't cut off */
@media (max-width: 720px) {
  .fb-tile.fb-post iframe {
    height: 860px;
  }
  
}


/* -----------------------------
   FACEBOOK EMBED ROUNDED FIX
------------------------------ */

.fb-post {
  margin-top: 1.25rem;
}

/* This is the clipping wrapper */
.fb-embed {
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  border: 1px solid #e6e6e6;
}

/* Make iframe fill the rounded container */
.fb-embed iframe {
  width: 100%;
  height: 500px;   /* adjust if your post text is taller */
  border: 0;
  display: block;
}






 /* LOCAL VIDEO CODE CSS */

.local-video {
  border-radius: 14px;
  overflow: hidden;
  background: #000;
}

.local-video video {
  width: 100%;
  height: 100%;
  display: block;
          object-fit: cover;
          object-position: center center;
}

.local-video-tile {
  aspect-ratio: 4 / 3;
  background: #000;
    margin-top: 1.25rem; 
}

.local-video-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
      object-position: center center;
}


/* Show more TOP (fix headroom / avoid cutting heads) */
.local-video-tile.focus-top video {
  object-position: center 15%;
}

/* Show more BOTTOM */
.local-video-tile.focus-bottom video {
  object-position: center 85%;
}

/* Lift a specific local video tile upward */
.local-video-tile.float-up {
  margin-top: 0px;
}


/* POSSUM SHRINK */

/* One-off: make THIS local video half-width */
.local-video-tile.possum {
  width: min(52%, 520px);   /* same sizing as .media images */
}

/* Mobile: full width */
@media (max-width: 860px) {
  .
}


/* ---------------------------------
   2-UP MEDIA GRID (even tiles)
---------------------------------- */

.media-grid.two-up {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 860px) {
  .media-grid.two-up {
    grid-template-columns: 1fr;
  }
}



/* Make an image tile match the 16:9 video-embed size */
.media-tile.tile-16x9 {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  display: block;
}

/* Ensure the image fills the 16:9 tile like a video */
.media-tile.tile-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  display: block;
}

/* Reuse your push-down behavior but make sure it applies */
/*.media-tile.tile-16x9.push-down img {*/
/*  object-position: center 25%;*/
/*}*/


/* Reuse your push-down behavior but make sure it applies */
.media-tile.tile-16x9.push-down img {
  object-position: center 1%;
}

/* Reuse your push-up behavior but make sure it applies */
.media-tile.tile-16x9.push-up img {
  object-position: center 99%;
}


/* FAILSAFE: never hide content if JS doesn't reveal it */
.no-js .entry .card,
.entry .card {
  opacity: 1;
}

.js .entry .card {
  opacity: 0;
  transform: translateY(calc(18px + var(--parallax-card)));
}

.js .entry.revealed .card {
  opacity: 1;
  transform: translateY(var(--parallax-card));
}


/********************  2 COLUMN UL LISTS 6/5 ****************************/
/* Mobile: 2 columns */
@media (max-width: 600px) {
  ul.skills-list {
    column-count: 2;
    column-gap: 1.25rem;
    padding-left: 1.2rem; /* keeps bullets nicely aligned */
  }

  ul.skills-list li {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 0.4rem 0;
  }

  /* Force 6 bullets in column 1, remaining 5 in column 2 */
  ul.skills-list li:nth-child(6) {
    break-after: column;
    -webkit-column-break-after: always;
  }
}

/* Optional: tiny screens go back to 1 column */
@media (max-width: 360px) {
  ul.skills-list { column-count: 1; }
}

/********************** FOR BOTH MOBILE AND LAPTOP VIEW **********************/
ul.skills-list {
  column-count: 2;
  column-gap: 2rem;
  padding-left: 1.2rem; /* keeps bullet alignment nice */
}

ul.skills-list li {
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin-bottom: 0.5rem;
}

/* Force 6 bullets into column 1, remaining 5 into column 2 */
ul.skills-list li:nth-child(6) {
  break-after: column;
  -webkit-column-break-after: always;
}

/* Optional: slightly tighter spacing on very small screens */
@media (max-width: 480px) {
  ul.skills-list {
    column-gap: 1.25rem;
  }
}


