/*
 * Caitlin Britten Portfolio — styles.css
 *
 * Fixes applied vs previous version:
 *  1  Footer pinned — html/body flex-column so short pages never leave a void
 *  2  Contact page — two-column layout on desktop, info card balanced right
 *  3  Contact info card — full width of its column, no awkward narrow strip
 *  4  Slideshow aspect ratio 16/8.4 → 4/3 so portrait images show properly
 *  5  Slideshow pause button moved to overlay on the slideshow itself
 *  6  Hero heading max-width loosened (18ch → 22ch) for better 2-line wrap
 *  7  Hero top/bottom padding so it breathes between nav and slideshow
 *  8  Gap between hero and featured-work section tightened
 *  9  About avatar increased to 240px, border cleaned up
 * 10  About bio column allows wider text — less narrow wrapping
 * 11  Info-grid align-items: start so cards don't stretch to tallest sibling
 * 12  Gallery jump-nav pills — stronger hover/focus visibility
 * 13  Gallery section descriptions — reduced size/opacity for clear hierarchy
 * 14  Gallery item count removed from visible flow (hidden via CSS display:none)
 * 15  text-muted bumped to #e2dce6 for slightly better readability
 */

/* ─── 1. TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --bg-dark:            #2c1038;
  --bg-surface:         rgba(255, 255, 255, 0.05);
  --bg-surface-strong:  rgba(255, 255, 255, 0.09);
  --color-salmon:       #d96c6c;
  --color-salmon-light: #f2958e;
  --color-purple:       #5b3a7d;
  --color-teal:         #2da8a5;
  --text-light:         #f5f5f5;
  --text-muted:         #e2dce6; /* fix 15: was #d8d2dc, slightly improved readability */
  --header-height:      76px;
  --content-max-width:  1320px;
  --reading-max:        72ch;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.75rem;
  --space-6: 2.25rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --radius-sm:   10px;
  --radius-md:   16px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.22);
  --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.25);
  --transition-fast: 180ms ease;
  --transition-base: 260ms ease;
}

/* ─── 2. BASE / RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* fix 1: html+body must both carry height for flex footer-pinning to work */
html {
  height: 100%;
  overflow-x: hidden;
}

body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* main fills remaining space so footer always sits at the bottom */
main {
  flex: 1 0 auto;
  display: block; /* override flex child default */
}

section, header, footer, nav, aside { display: block; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
ul { list-style: none; }

h1, h2, h3 {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0.02em;
  line-height: 1.18;
}

h1, h2, h3 { text-wrap: balance; }
p { max-width: var(--reading-max); }

:focus-visible {
  outline: 3px solid var(--color-salmon-light);
  outline-offset: 3px;
}

/* ─── 3. LAYOUT ─────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  height: var(--header-height);
  background: rgba(44, 16, 56, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0; /* don't compress header in flex layout */
}

.header-inner {
  width: min(var(--content-max-width), calc(100% - 2.5rem));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.container {
  width: min(var(--content-max-width), calc(100% - 2.5rem));
  margin: 0 auto;
  padding-top: calc(var(--header-height) + clamp(1.8rem, 2.5vw, 3rem));
  padding-bottom: clamp(var(--space-8), 6vw, 6rem);
}

.page-intro,
.section-block {
  margin-bottom: clamp(var(--space-6), 4.8vw, 5.2rem);
}

.page-intro h1 {
  color: var(--color-salmon-light);
  font-size: clamp(2.4rem, 3.5vw, 3.4rem);
  margin-bottom: var(--space-3);
}

.page-intro p,
.section-block p { line-height: 1.78; }

.section-heading { margin-bottom: var(--space-5); }
.section-heading h2 {
  color: var(--color-salmon-light);
  font-size: clamp(1.7rem, 2.2vw, 2.15rem);
}

.section-heading-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
}

/* fix 1: footer shrink and spacing */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: var(--space-7) var(--space-3) var(--space-7);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer p     { margin-inline: auto; max-width: none; }
.site-footer p + p { margin-top: 0.3rem; }

/* ─── 4. COMPONENTS ─────────────────────────────────────────────────────── */

.logo {
  font-family: "Poppins", "Helvetica Neue", Arial, sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-salmon-light);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 1.6vw, var(--space-6));
}

.site-nav a {
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.site-nav a:hover,
.site-nav a:focus-visible { color: var(--color-salmon-light); }

.site-nav a.active::after,
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--color-salmon-light);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-light);
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle-bar::before { transform: translateY(-6px); }
.nav-toggle-bar::after  { transform: translateY(4px); }
body.nav-open .nav-toggle-bar           { transform: rotate(45deg); }
body.nav-open .nav-toggle-bar::before   { transform: translateY(0); opacity: 0; }
body.nav-open .nav-toggle-bar::after    { transform: translateY(-2px) rotate(-90deg); }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--color-teal);
  margin-bottom: var(--space-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: clamp(var(--space-4), 1.8vw, var(--space-6));
}

.button-link, .text-link { text-decoration: none; }

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.88rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--bg-dark);
  background: var(--color-salmon-light);
  box-shadow: 0 6px 20px rgba(242, 149, 142, 0.25);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.button-link:hover,
.button-link:focus-visible {
  background-color: #ffb3ab;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(242, 149, 142, 0.34);
}

.text-link { font-weight: 600; color: var(--color-salmon-light); }
.text-link:hover,
.text-link:focus-visible { text-decoration: underline; }

/* fix 11: align-items: start so cards are their natural height */
.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(var(--space-4), 1.8vw, var(--space-5));
  align-items: start;
}

.info-card,
.note-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: clamp(var(--space-4), 1.9vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.info-card { display: flex; flex-direction: column; }

.info-card:hover,
.info-card:focus-within,
.note-panel:hover,
.note-panel:focus-within {
  background: var(--bg-surface-strong);
  transform: translateY(-1px);
  border-color: rgba(242, 149, 142, 0.35);
}

.info-card h3,
.note-panel h2,
.note-panel h3 { color: var(--color-salmon-light); margin-bottom: 0.65rem; }

.info-card h3 { font-size: clamp(1.15rem, 1.3vw, 1.3rem); }

.info-card p,
.note-panel p { color: var(--text-muted); max-width: none; line-height: 1.72; }

.detail-list { display: grid; gap: 0.65rem; color: var(--text-muted); line-height: 1.72; }
.detail-list li { position: relative; padding-left: 1.25rem; }
.detail-list li::before {
  content: "";
  position: absolute;
  top: 0.72rem; left: 0;
  width: 0.45rem; height: 0.45rem;
  border-radius: 50%;
  background: var(--color-teal);
}

/* ─── HERO ──────────────────────────────────────────────────────────────── */
/* fix 7: internal padding so hero breathes between nav offset and slideshow */
.hero {
  text-align: center;
  padding-top: clamp(var(--space-5), 3vw, var(--space-7));
  padding-bottom: clamp(var(--space-4), 2vw, var(--space-6));
}

/* fix 6: was max-width: none which let long headings sprawl too wide,
          now constrained so heading wraps naturally at ~2 lines */
.hero h1 {
  font-size: clamp(2.6rem, 4.2vw, 3.6rem);
  margin-bottom: var(--space-4);
  color: var(--color-salmon-light);
  max-width: 22ch;
  margin-inline: auto;
}

.hero p {
  font-size: clamp(1.03rem, 1.2vw, 1.14rem);
  color: var(--text-muted);
  line-height: 1.82;
  max-width: 56ch;
  margin-inline: auto;
}

.hero .cta-row { justify-content: center; }

/* ─── SLIDESHOW ─────────────────────────────────────────────────────────── */

.section-heading-inline {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

/* Pause button — sits in the heading row, styled as a subtle control */
.slideshow-toggle {
  align-self: flex-end;
  min-height: 34px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.slideshow-toggle:hover,
.slideshow-toggle:focus-visible {
  border-color: rgba(242, 149, 142, 0.7);
  color: var(--color-salmon-light);
}

/* Slideshow container */
.slideshow {
  position: relative;
  width: 100%;
  margin: 0 auto;
  /* 16/9 at full container width — fills the content column like the other sections */
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.slideshow .slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 700ms ease;
}
.slideshow .slide.active { opacity: 1; }

/* Gradient: only covers the bottom ~35% so caption is readable */
.slideshow .slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(44, 16, 56, 0.78) 0%,
    rgba(44, 16, 56, 0.0) 38%
  );
  pointer-events: none;
  z-index: 1;
}

/* Image fills the frame — cover so there's no black bars */
.slideshow .slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow figcaption {
  position: absolute;
  left: 1.2rem; right: 1.2rem;
  bottom: 3.8rem; /* sit above the dot row */
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  line-height: 1.3;
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  max-width: 40ch;
}

/* ── Arrow buttons ── */
.slideshow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(44, 16, 56, 0.65);
  backdrop-filter: blur(6px);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.slideshow-arrow:hover,
.slideshow-arrow:focus-visible {
  background: rgba(44, 16, 56, 0.9);
  border-color: var(--color-salmon-light);
  color: var(--color-salmon-light);
}
.slideshow-arrow:focus-visible {
  outline: 3px solid var(--color-salmon-light);
  outline-offset: 2px;
}
.slideshow-arrow--prev { left: 0.85rem; }
.slideshow-arrow--next { right: 0.85rem; }

/* ── Dot indicators ── */
.slideshow-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.25);
  padding: 0;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), width var(--transition-base);
}
.slideshow-dot.active {
  background: var(--color-salmon-light);
  border-color: var(--color-salmon-light);
  width: 22px;          /* active dot stretches into a pill */
  border-radius: 4px;
}
.slideshow-dot:hover,
.slideshow-dot:focus-visible {
  background: rgba(242, 149, 142, 0.6);
  border-color: var(--color-salmon-light);
}
.slideshow-dot:focus-visible {
  outline: 2px solid var(--color-salmon-light);
  outline-offset: 2px;
}

.slide-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.22rem 0.58rem;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--bg-dark);
  background: var(--color-salmon-light);
}

/* ─── ABOUT PAGE ────────────────────────────────────────────────────────── */
/* fix 9: avatar to 240px with cleaner border */
.about-section {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(var(--space-5), 3vw, 3rem);
  align-items: start;
}

.about-section .avatar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
  /* fix 13 avatar border: clean white ring instead of barely-visible salmon tint */
  border: 2px solid rgba(255, 255, 255, 0.18);
}
.about-section .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* fix 10: bio min-width raised so text column doesn't wrap too narrow */
.about-section .bio { min-width: 320px; }

.about-section h1 {
  margin-bottom: 0.45rem;
  color: var(--color-salmon-light);
  font-size: clamp(2.3rem, 3.2vw, 3rem);
}
.about-role {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  letter-spacing: 0;
}
.about-section p { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.78; }

.about-facts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem 2rem;
}

/* ─── CONTACT PAGE ──────────────────────────────────────────────────────── */
/*
 * fix 2 & 3: two-column layout on desktop.
 * Left column: heading, intro text, CTA.
 * Right column: contact info card.
 * We target .page-intro on the contact page — since the contact page
 * has .contact-info as a sibling to the text content inside .page-intro,
 * we use a grid on .page-intro itself when it contains .contact-info.
 *
 * The HTML structure on contact.html is:
 *   <section class="page-intro">
 *     <p class="eyebrow">
 *     <h1>
 *     <p>  ← intro sentence
 *     <div class="contact-info">  ← info card
 *     <div class="cta-row">
 *   </section>
 *
 * CSS-only two-column approach: use display:grid on .page-intro and
 * place .contact-info in a separate visual column using grid-column.
 * We split the section into left (eyebrow + h1 + p + cta) and right
 * (contact-info) using a 2-col grid where contact-info spans row 1–4
 * on the right column.
 */
.page-intro:has(.contact-info) {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  grid-template-rows: auto auto 1fr auto;
  column-gap: clamp(var(--space-6), 4vw, 4rem);
  align-items: start;
  max-width: none; /* override any inherited max-width */
}

.page-intro:has(.contact-info) .eyebrow {
  grid-column: 1;
  grid-row: 1;
}
.page-intro:has(.contact-info) h1 {
  grid-column: 1;
  grid-row: 2;
}
.page-intro:has(.contact-info) > p {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
}
.page-intro:has(.contact-info) .contact-info {
  grid-column: 2;
  grid-row: 1 / 5; /* span all rows so it's vertically centred */
  align-self: start;
  margin-top: 0;   /* remove default top margin when in grid */
}
.page-intro:has(.contact-info) .cta-row {
  grid-column: 1;
  grid-row: 4;
}

/* Contact info card styling */
.contact-info {
  margin-top: var(--space-4);
  font-size: 1.02rem;
  line-height: 1.75;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-left: 3px solid var(--color-salmon-light);
  border-radius: var(--radius-md);
  padding: clamp(var(--space-4), 2vw, var(--space-6));
  box-shadow: var(--shadow-card);
}
.contact-info p {
  margin-bottom: 0.78rem;
  max-width: none;
  color: var(--text-muted);
}
.contact-info p:last-child { margin-bottom: 0; }
.contact-info strong { color: var(--text-light); }
.contact-info a {
  color: var(--color-salmon-light);
  text-decoration: none;
  transition: color var(--transition-fast);
  word-break: break-word;
}
.contact-info a:hover,
.contact-info a:focus-visible { color: #ffb3ab; }

/* ─── CONTACT FORM ──────────────────────────────────────────────────────── */
.contact-form-section .section-heading h2 {
  font-size: clamp(1.7rem, 2.2vw, 2.1rem);
}

.contact-form {
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Two-column row for paired inputs (name+email, company+role) */
.form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0.01em;
}

.form-required {
  color: var(--color-salmon-light);
  margin-left: 0.15em;
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.78rem 1rem;
  color: var(--text-light);
  font: inherit;
  font-size: 0.97rem;
  line-height: 1.6;
  transition: border-color var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
  /* Remove browser default outline — we apply our own */
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(226, 220, 230, 0.38);
}

/* Focus state — salmon border + soft glow */
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-salmon-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(242, 149, 142, 0.18);
}

/* Invalid state shown only after user has interacted */
.form-group input:user-invalid,
.form-group textarea:user-invalid {
  border-color: rgba(217, 108, 108, 0.7);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Honeypot — completely hidden */
.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  tabindex: -1;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.form-submit {
  /* inherits .button-link styles */
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.form-note {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: none;
  margin: 0;
}

/* Responsive: stack two-column rows on small screens */
@media (max-width: 600px) {
  .form-row--two {
    grid-template-columns: 1fr;
  }
  .form-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ─── PORTFOLIO / GALLERY ───────────────────────────────────────────────── */
.portfolio-section-wrap { margin-top: clamp(var(--space-5), 3vw, var(--space-6)); }

.gallery-section + .gallery-section {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.gallery-section h3 {
  font-size: clamp(1.45rem, 1.8vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--color-salmon-light);
  letter-spacing: 0.02em;
}

/* fix 13: description text visually subordinate to heading */
.gallery-section-summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: 1.2rem;
}
.gallery-section-summary p {
  margin: 0;
  max-width: none;
  color: rgba(226, 220, 230, 0.65); /* dimmer than body text — clearly secondary */
  font-size: 0.9rem;
  line-height: 1.6;
}

/* fix 14: hide the "N items" count — adds noise, zero value for a recruiter */
.gallery-count { display: none; }

/* fix 12: jump nav — stronger visible affordance */
.category-jump-nav { margin-bottom: clamp(var(--space-5), 3.8vw, var(--space-7)); }
.category-jump-nav ul { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.category-jump-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  transition: border-color var(--transition-fast), color var(--transition-fast), background var(--transition-fast);
}
.category-jump-nav a:hover,
.category-jump-nav a:focus-visible {
  border-color: var(--color-salmon-light);
  color: var(--color-salmon-light);
  background: rgba(242, 149, 142, 0.1);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(1rem, 1.5vw, 1.4rem);
}

.gallery-section.video-section .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.gallery-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--color-purple);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.gallery-item:hover,
.gallery-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.44);
  border-color: rgba(242, 149, 142, 0.5);
}

.gallery-item .img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.15);
}

.gallery-item.featured-item           { grid-column: auto; }
.gallery-item.featured-item .img-wrap { aspect-ratio: 1 / 1; }

.gallery-item .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 440ms ease;
}
.gallery-item:hover .img-wrap img,
.gallery-item:focus-visible .img-wrap img { transform: scale(1.06); }

.gallery-item.video-item .img-wrap { aspect-ratio: 1 / 1; }

.gallery-item.video-item .img-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 80'%3E%3Ccircle cx='40' cy='40' r='36' fill='rgba(0,0,0,0.55)'/%3E%3Cpolygon points='32,24 60,40 32,56' fill='%23f2958e'/%3E%3C/svg%3E")
    no-repeat center / 62px;
  pointer-events: none;
}

.gallery-item .item-title {
  padding: 0.78rem 0.9rem 0.88rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  letter-spacing: 0.01em;
}

/* ─── LIGHTBOX ──────────────────────────────────────────────────────────── */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 2vw, 1.5rem);
  background: rgba(0, 0, 0, 0.86);
}
#lightbox.active { display: flex; }

#lightbox .lightbox-content {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100dvh - 2rem);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-dark);
  box-shadow: 0 10px 44px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#lightbox .lightbox-content img,
#lightbox .modal-video {
  width: 100%;
  max-height: min(65dvh, 640px);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.25);
}

#lightbox .caption {
  padding: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  overflow-y: auto;
}
#lightbox .caption h2 { color: var(--color-salmon-light); margin-bottom: 0.5rem; font-size: 1.08rem; }
#lightbox .caption p  { max-width: none; margin-bottom: 0.5rem; color: var(--text-muted); }

.tools-container { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.75rem; }
.tool-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  background: rgba(45, 168, 165, 0.16);
}

.business-impact        { margin-bottom: 0.75rem; }
.business-impact strong { color: var(--color-salmon-light); }

#lightbox .close-btn {
  position: absolute;
  top: 0.45rem; right: 0.6rem;
  z-index: 2;
  width: 40px; height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(44, 16, 56, 0.65);
  color: var(--text-light);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--transition-fast);
}
#lightbox .close-btn:hover,
#lightbox .close-btn:focus-visible { color: var(--color-salmon-light); }

/* ─── 5. UTILITIES ──────────────────────────────────────────────────────── */
.skip-link {
  position: fixed;
  top: -100%;
  left: 1rem;
  z-index: 1400;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: #111111;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible { top: 1rem; }

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mb-lg { margin-bottom: var(--space-4); }

body.fade-in  { animation: fadeIn  500ms ease forwards; }
body.fade-out { animation: fadeOut 300ms ease forwards; }
body.nav-open,
body.lightbox-open { overflow: hidden; }

/* ─── 6. MEDIA QUERIES ──────────────────────────────────────────────────── */
@media (max-width: 1160px) {
  :root { --content-max-width: 1100px; }
  .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  /* Contact two-column collapses to single column */
  .page-intro:has(.contact-info) {
    display: block;
  }
  .contact-info {
    margin-top: var(--space-4);
  }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    padding: 0 1rem 1rem;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(44, 16, 56, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
  }

  .site-nav li + li { border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .site-nav a { display: block; padding: 0.95rem 1rem; min-height: 44px; }

  .site-nav a.active::after,
  .site-nav a[aria-current="page"]::after {
    bottom: 0.55rem;
    left: 1rem;
    width: calc(100% - 2rem);
  }

  body.nav-open .site-nav { transform: translateY(0); opacity: 1; visibility: visible; }

  .container,
  .header-inner { width: calc(100% - 1.6rem); }

  .section-heading-inline { align-items: flex-start; }

  /* About stacks to single column at 900px */
  .about-section {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }
  .about-section .avatar {
    width: 200px;
    height: 200px;
    margin-inline: auto;
  }
  .about-section .bio { min-width: 0; }

  .slideshow {
    aspect-ratio: 16 / 9; /* keep full width at 16:9 on tablet too */
  }

  /* Smaller arrows on tablet */
  .slideshow-arrow {
    width: 38px;
    height: 38px;
  }
  .slideshow-arrow--prev { left: 0.5rem; }
  .slideshow-arrow--next { right: 0.5rem; }

  .gallery-grid,
  .gallery-section.video-section .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.95rem;
  }
}

@media (max-width: 620px) {
  .logo { font-size: 1.2rem; }

  .container {
    width: calc(100% - 1.25rem);
    padding-top: calc(var(--header-height) + 1.2rem);
    padding-bottom: var(--space-6);
  }

  .page-intro,
  .section-block { margin-bottom: var(--space-6); }

  .section-heading { margin-bottom: var(--space-4); }

  .info-grid,
  .about-facts-grid { grid-template-columns: 1fr; }

  .about-section .avatar { width: 160px; height: 160px; }

  .hero {
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
  }

  .hero h1,
  .page-intro h1 { font-size: clamp(1.95rem, 8.2vw, 2.5rem); max-width: none; }

  .slideshow { aspect-ratio: 4 / 3; margin-top: var(--space-3); }

  /* Tuck arrows tighter on small screens */
  .slideshow-arrow {
    width: 34px;
    height: 34px;
  }
  .slideshow-arrow--prev { left: 0.4rem; }
  .slideshow-arrow--next { right: 0.4rem; }

  .slideshow figcaption { bottom: 3.2rem; }

  .slideshow-dot { width: 7px; height: 7px; }
  .slideshow-dot.active { width: 18px; }

  .slideshow figcaption { font-size: 0.93rem; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; }

  .gallery-grid,
  .gallery-section.video-section .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
  }

  .gallery-section-summary { flex-direction: column; align-items: flex-start; }

  .site-footer { padding: var(--space-6) 1rem var(--space-6); }
}

/* ─── 7. REDUCED MOTION ─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
  body.fade-in, body.fade-out { animation: none; }
}

@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
