@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =========================================================
   COLOURS - change these to retheme the whole site
   ========================================================= */
:root {
  --navy: #0f1b2d;        /* headings, dark bands, footer */
  --text: #1f2a3c;        /* body text */
  --muted: #5b6b82;       /* secondary text */
  --blue: #2563eb;        /* links and accents */
  --blue-dark: #1d4ed8;   /* link hover */
  --blue-visited: #1e40af;
  --blue-soft: #eaf1ff;   /* light blue bands, chips, hovers */
  --bg: #f5f8fc;          /* page background */
  --card: #ffffff;        /* card background */
  --border: #e1e8f2;
  --shadow: 0 6px 24px rgba(15, 27, 45, 0.08);
  --shadow-sm: 0 2px 10px rgba(15, 27, 45, 0.06);
  --radius: 16px;
}

/* =========================================================
   1. BASE (all screen sizes)
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;   /* smooth scrolling for the jump links */
  }
}

body {
  margin: 0;
  padding: 0 0 24px;
  background-color: var(--bg);
  background-image: radial-gradient(900px 420px at 88% -80px, #dce8ff 0%, rgba(220, 232, 255, 0) 70%);
  background-repeat: no-repeat;
  font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  text-align: left;
}

h1 {
  text-align: center;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 24px 0 8px;
}

h2 {
  color: var(--navy);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  text-align: center;
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 600;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}
a:visited {
  color: var(--blue-visited);
}
a:hover {
  color: var(--blue-dark);
}

/* =========================================================
   2. SITE NAVIGATION BAR (header.php) AND FOOTER (footer.php)
   ========================================================= */
ul.header {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px;
  width: fit-content;
  max-width: 95%;
  margin: 12px auto 28px;
  padding: 6px 10px;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

li.header {
  display: inline-block;
}

li a.header {
  display: block;
  padding: 8px 16px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: background-color 0.15s, color 0.15s;
}

li a.header:hover {
  background-color: var(--blue-soft);
  color: var(--blue);
  text-decoration: none;
}

ul.footer {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  width: 90%;
  max-width: 1100px;
  margin: 32px auto 0;
  padding: 8px 12px;
  box-sizing: border-box;
  background-color: var(--navy);
  border-radius: var(--radius);
  text-align: center;
}

li.footer {
  display: inline-block;
  padding: 10px 16px;
  color: #c9d8f0;
  font-size: 15px;
}

li a.footer {
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
}

li a.footer:hover {
  color: #9ec1ff;
  text-decoration: underline;
}

/* =========================================================
   3. FLOATING "JUMP TO" BAR (stays at the top while scrolling)
   ========================================================= */
.section-nav {
  position: sticky;
  top: 12px;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 95%;
  margin: 0 auto 28px;
  padding: 8px 14px;
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.section-nav span {
  padding: 0 6px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.section-nav a {
  padding: 6px 14px;
  background-color: var(--blue-soft);
  border: 1px solid #cfdffb;
  border-radius: 999px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.section-nav a:visited {
  color: var(--blue);
}

.section-nav a:hover {
  background-color: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}

/* =========================================================
   4. CARDS / CONTAINERS (used by the other portfolio pages)
   ========================================================= */
.left-container,
.right-container,
.middle-container,
.text-container,
.bio-container,
.contact-container {
  display: flex;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--text);
  overflow: hidden;
  width: 90%;
  max-width: 1100px;
  margin: 0 auto 20px;
  box-sizing: border-box;
}

.left-container {
  flex-direction: row;
  align-items: center;
}

.right-container {
  flex-direction: row-reverse;
  align-items: center;
}

.middle-container {
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 0;
}

/* Left-aligned body text with centred headings */
.text-container {
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 8px 32px 16px;
  margin-bottom: 0;
}

.text-container h1,
.text-container h2,
.text-container h3 {
  text-align: center;
}

.text-container li {
  margin-bottom: 6px;
}

.text-container .screenshot,
.text-container video {
  align-self: center;
}

.bio-container {
  display: grid;
  gap: 10px;
}

#bio {
  padding-right: 5%;
  padding-left: 5%;
  font-size: 16px;
  color: var(--text);
}

.container-child {
  margin: 0;
  padding: 8px 24px;
  text-align: left;
  font-size: 16px;
  color: var(--text);
}

p.container-child {
  font-size: 15px;
}

ul.container-child {
  list-style-type: circle;
}

.contact-container {
  flex-direction: column;
  width: 50%;
  background-color: var(--blue-soft);
  border-color: #cfdffb;
}

.image-text-container {
  position: relative;
  text-align: center;
  color: white;
}

.image-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding-left: 10%;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.left-container img,
.right-container img,
.middle-container img,
.bio-container img {
  border-radius: 12px;
}

.screenshot {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-sizing: border-box;
}

/* Small notice box (used for the disclaimer) */
.notice {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto 32px;
  padding: 16px 22px;
  box-sizing: border-box;
  background-color: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  font-size: 15px;
}

/* =========================================================
   5. SCREENSHOT GALLERY AND FULL-SIZE VIEWER
   ========================================================= */
.screenshot-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 10px;
}

.screenshot-gallery img {
  width: 100%;
  height: 150px;
  object-fit: cover;          /* crops to a uniform thumbnail size */
  object-position: top left;  /* keeps the top of the screenshot visible */
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform 0.15s, box-shadow 0.15s;
}

.screenshot-gallery img:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

#lightbox {
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  max-width: 95vw;
  max-height: 95vh;
}

#lightbox::backdrop {
  background: rgba(15, 27, 45, 0.88);
}

#lightbox img {
  display: block;
  max-width: 95vw;
  max-height: 80vh;
  margin: auto;
  border: none;
  border-radius: 8px;
}

#lightbox p {
  color: white;
  text-align: center;
  font-size: 18px;
  margin: 0 0 10px;           /* the caption sits above the image */
}

/* =========================================================
   6. BANDED PROJECT LAYOUT
   ========================================================= */
.project {
  margin-bottom: 64px;
  scroll-margin-top: 80px;    /* leaves room for the floating jump bar */
}

/* ---- Title band ---- */
.project-title {
  background: linear-gradient(135deg, #3b63c4 0%, #2a4a94 100%);
  text-align: center;
  padding: 48px 24px;
}

.project-title .eyebrow {
  margin: 0 0 8px;
  color: #bcd3ff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-title h2 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  text-align: center;
}

/* ---- Full-width colour bands ---- */
.band {
  padding: 56px 0;
}

.band-inner {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  box-sizing: border-box;
}

.band-white { background-color: #ffffff; }
.band-soft  { background-color: var(--blue-soft); }
.band-dark  { background-color: var(--navy); color: #dbe6f8; }

.band h3.band-heading {
  margin: 0 0 28px;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
}

.band-dark h3.band-heading { color: #ffffff; }
.band-dark a { color: #9ec1ff; }

.lead {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.7;
}

.band-dark .lead {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.25rem;
  text-align: center;
}

.band-note {
  margin: -12px 0 24px;
  text-align: center;
  color: var(--muted);
}

/* ---- Overview: description on the left, technologies on the right ---- */
.overview-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.tech-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---- Pill tags (technologies and skills) ---- */
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip-list.centered {
  justify-content: center;
}

.chip-list li {
  padding: 6px 14px;
  background-color: var(--blue-soft);
  border: 1px solid #cfdffb;
  border-radius: 999px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 600;
}

.band-soft .chip-list li {
  background-color: #ffffff;   /* white pills on the light blue band */
}

/* ---- Paragraph text inside a band ---- */
.prose {
  max-width: 780px;
  margin: 0 auto;
  text-align: left;
  font-size: 1.05rem;
}

.prose p {
  margin: 0 0 1em;
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ---- Key Features: cards with a check mark ---- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);   /* use for lists of 4 */
}

.feature-grid li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background-color: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.feature-grid li::before {
  content: "\2713";
  flex: 0 0 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--blue);
  border-radius: 50%;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

/* ---- Video Demo ---- */
.video-frame {
  display: block;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;        /* reserves space before the video loads */
  margin: 0 auto;
  background-color: #000000;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   7. TEMPORARY: older pages that still have inline white text
   (style="color: rgb(255,255,255);") from the dark theme.
   Delete this once those inline styles are removed.
   ========================================================= */
[style*="color: rgb(255,255,255)"],
[style*="color: rgb(255, 255, 255)"] {
  color: var(--text) !important;
}

/* =========================================================
   8. PHONES AND NARROW SCREENS
   ========================================================= */
@media only screen and (max-width: 1000px) {
  h1 {
    font-size: 1.6rem;
  }

  ul.header {
    border-radius: 20px;
    padding: 6px;
  }

  li a.header {
    padding: 8px 10px;
    font-size: 14px;
  }

  li.footer {
    padding: 8px 10px;
    font-size: 14px;
  }

  /* Jump bar becomes one scrollable row so it doesn't cover the screen */
  .section-nav {
    top: 8px;
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    max-width: 94%;
    margin-bottom: 20px;
    padding: 6px 10px;
    border-radius: 16px;
  }

  .section-nav span {
    display: none;
  }

  .section-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .left-container,
  .right-container {
    flex-direction: column;
    align-items: center;
  }

  .middle-container {
    text-align: left;
  }

  .text-container {
    padding: 8px 16px 12px;
  }

  .contact-container {
    width: 90%;
  }

  .screenshot {
    width: 90%;
    height: auto;
  }

  .doubleScreenshot {
    width: 40%;
    height: auto;
  }

  .column {
    float: left;
    width: 50%;
    padding: 5px;
  }

  .row::after {
    content: "";
    clear: both;
    display: table;
  }

  .screenshot-gallery {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));  /* about 2 columns */
    gap: 8px;
    padding: 8px 0;
  }

  .screenshot-gallery img {
    height: 100px;
  }

  #lightbox {
    max-width: 98vw;
  }

  #lightbox img {
    max-width: 98vw;
    max-height: 75vh;          /* leaves room for the caption and the address bar */
  }

  #lightbox p {
    font-size: 16px;
    margin: 0 0 8px;
  }

  /* Banded projects */
  .band {
    padding: 40px 0;
  }

  .project-title {
    padding: 36px 16px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .feature-grid,
  .feature-grid.cols-2 {
    grid-template-columns: 1fr;
  }

  .prose {
    font-size: 1rem;
  }
}
