/* style.css - shared by index.html, brands.html, about.html and contact.html */

:root {
  --bg: #f6f5f1;
  --surface: #ffffff;
  --ink: #15171c;
  --text: #2b2f38;
  --muted: #5d6572;
  --line: rgba(21, 23, 28, 0.09);
  --accent: #0e9488;
  --accent-ink: #0b766d;
  --accent-soft: rgba(14, 148, 136, 0.11);
  --shadow-sm: 0 1px 2px rgba(21, 23, 28, 0.06), 0 2px 8px rgba(21, 23, 28, 0.05);
  --shadow-md: 0 2px 4px rgba(21, 23, 28, 0.05), 0 10px 28px rgba(21, 23, 28, 0.09);
  --shadow-lg: 0 4px 8px rgba(21, 23, 28, 0.06), 0 18px 44px rgba(21, 23, 28, 0.15);
  --radius: 16px;
  --placeholder: #e5e7ec;
  --font-display: "Poppins", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* CV block colours: white text on every one of these passes contrast */
  --cv-navy: #1f3a5f;
  --cv-teal: #0f766e;
  --cv-slate: #475569;
  --cv-green: #3f7d20;
  --cv-amber: #b45309;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
/* slow, soft colour drift behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38% 34% at 18% 22%, rgba(20, 184, 166, 0.20), transparent 70%),
    radial-gradient(34% 38% at 82% 14%, rgba(129, 120, 255, 0.16), transparent 70%),
    radial-gradient(42% 38% at 72% 78%, rgba(255, 170, 120, 0.18), transparent 70%),
    radial-gradient(38% 38% at 14% 84%, rgba(96, 165, 250, 0.15), transparent 70%);
  animation: drift 48s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(4%, -3%, 0) scale(1.08); }
  100% { transform: translate3d(-4%, 3%, 0) scale(1.03); }
}
main { flex: 1; }
[hidden] { display: none !important; }
html.lb-open, html.lb-open body { overflow: hidden; }
img, video { max-width: 100%; }
a { color: var(--accent-ink); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -999px; top: 0.5rem; z-index: 10000;
  background: var(--ink); color: #fff; font-weight: 700;
  padding: 0.5rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { left: 0.5rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }

.ic { display: inline-flex; width: 1.1em; height: 1.1em; flex-shrink: 0; }
.ic svg { width: 100%; height: 100%; }
.ic .fill { fill: currentColor; stroke: none; }

/* ---------- header / nav (plain menu links) ---------- */
.site-header { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.55); backdrop-filter: blur(10px); }
.site-header .wrap {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.75rem 2rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.1rem;
}
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; color: var(--ink); }
.brand-logo { display: block; width: 46px; height: 46px; flex-shrink: 0; transition: transform 0.4s ease; }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.brand-role { color: var(--accent-ink); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-top: 0.15rem; }
.site-nav ul { display: flex; gap: 1.75rem; flex-wrap: wrap; list-style: none; }
.site-nav a {
  position: relative; display: inline-block; color: var(--muted); text-decoration: none;
  font-family: var(--font-display); font-size: 0.92rem; font-weight: 500; padding: 0.45rem 0;
  transition: color 0.2s;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.25s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 0.9rem;
  padding: 0.75rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
  text-decoration: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--accent-ink); box-shadow: var(--shadow-lg); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { box-shadow: var(--shadow-md); border-color: rgba(14, 148, 136, 0.5); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---------- type ---------- */
.eyebrow {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink);
}
.page-title {
  font-family: var(--font-display); font-weight: 600; color: var(--ink);
  font-size: clamp(1.85rem, 4.2vw, 3rem); line-height: 1.12; letter-spacing: -0.02em;
  max-width: 24ch; margin: 0.7rem 0 1rem;
}
.hero { padding: 2.75rem 0 1.5rem; }
.lede { color: var(--muted); max-width: 70ch; margin-bottom: 1.75rem; font-size: 1.05rem; }
.noscript { color: var(--muted); padding: 2rem 0; }

.section { margin-bottom: 4rem; }
.section-title {
  font-family: var(--font-display); font-size: 1.05rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  padding-bottom: 0.7rem; margin-bottom: 1.5rem; position: relative;
}
.section-title::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--line);
}
.section-title::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; background: var(--accent);
  border-radius: 3px; z-index: 1;
}
.subcategory-title {
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 2rem 0 1rem;
}

/* ---------- home intro (who I am) ---------- */
.intro { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 2.5rem 0 2.75rem; }
/* Square photo frames: the picture is a wide selfie, so it is zoomed in on the face a little */
.photo-frame { position: relative; display: block; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; flex-shrink: 0; }
.photo-frame > img {
  display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 45%;
  transform: scale(var(--zoom, 1)); transform-origin: var(--ox, 48%) var(--oy, 50%);
}
.avatar-frame { width: 104px; border-radius: 26px; border: 4px solid #fff; box-shadow: var(--shadow-lg); --zoom: 1.55; --oy: 52%; }
.avatar-fallback {
  width: 104px; height: 104px; border-radius: 26px; border: 4px solid #fff; box-shadow: var(--shadow-lg); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; color: var(--accent-ink);
}
.intro-name {
  font-family: var(--font-display); font-weight: 600; color: var(--ink); letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; margin-top: 1.1rem;
}
.identity-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; list-style: none; max-width: 780px; margin: 1rem 0 1.4rem; }
.id-tag {
  display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600; color: var(--ink);
  padding: 0.38rem 0.9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.id-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.intro-bio { max-width: 62ch; color: var(--text); font-size: 1.03rem; line-height: 1.7; }
.intro-value { max-width: 58ch; margin-top: 1rem; color: var(--ink); font-family: var(--font-display); font-weight: 500; font-size: 1.05rem; line-height: 1.55; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }

/* ---------- loading: page intro + per-tile shimmer ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(40% 36% at 25% 25%, rgba(20, 184, 166, 0.22), transparent 70%),
    radial-gradient(40% 36% at 78% 70%, rgba(255, 170, 120, 0.22), transparent 70%),
    var(--bg);
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
  animation: loader-failsafe 0.01s linear 9s forwards; /* never trap anyone if scripts fail */
}
.page-loader.is-done { opacity: 0; visibility: hidden; }
@keyframes loader-failsafe { to { opacity: 0; visibility: hidden; } }
.loader-inner { text-align: center; padding: 2rem; max-width: 26rem; }
.loader-mark {
  display: block; width: 84px; height: 84px; margin: 0 auto 1.4rem;
  filter: drop-shadow(0 8px 14px rgba(21, 23, 28, 0.22)); animation: loader-bob 1.8s ease-in-out infinite;
}
@keyframes loader-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.loader-bar { width: 180px; height: 4px; margin: 0 auto 1.3rem; border-radius: 4px; background: rgba(21, 23, 28, 0.1); overflow: hidden; }
.loader-bar span { display: block; width: 40%; height: 100%; border-radius: 4px; background: var(--accent); animation: loader-slide 1.3s ease-in-out infinite; }
@keyframes loader-slide { 0% { transform: translateX(-120%); } 100% { transform: translateX(320%); } }
.loader-title { font-family: var(--font-display); font-weight: 600; color: var(--ink); font-size: 1.1rem; }
.loader-sub { color: var(--muted); font-size: 0.9rem; margin-top: 0.4rem; }

@keyframes shimmer { 0% { background-position: 160% 0; } 100% { background-position: -60% 0; } }

/* ---------- testimonials ---------- */
.testimonials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; }
.testimonial-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.9rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.testimonial-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.t-logos { display: flex; align-items: center; gap: 0.7rem; min-height: 30px; }
.t-logo { height: auto; max-height: 28px; max-width: 108px; width: auto; object-fit: contain; display: block; }
.testimonial-quote { font-size: 0.9rem; font-style: italic; line-height: 1.55; color: var(--text); flex: 1; }
.testimonial-quote::before { content: "\201C"; }
.testimonial-quote::after { content: "\201D"; }
.testimonial-attrib {
  font-size: 0.74rem; font-weight: 700; color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ---------- showcase cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: 1.75rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-md);
  overflow: hidden; display: flex; flex-direction: column; transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
/* The preview is locked to 16:9 by the ::before spacer. Tiles sit in an absolutely positioned inner
   box, so the media's own shape (a tall portrait video, say) can never resize the card. */
.preview { position: relative; background: var(--placeholder); overflow: hidden; flex: none; }
.preview::before { content: ""; display: block; padding-top: 56.25%; }
.preview-inner { position: absolute; inset: 0; }
.preview-multi .preview-inner {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr); gap: 0.5rem; padding: 0.5rem;
}
.preview .tile { position: relative; width: 100%; height: 100%; min-width: 0; min-height: 0; }
.preview .tile-open { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-body { padding: 1.25rem 1.35rem 1.35rem; display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; }
.card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.card-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.55; }
.card-link {
  margin-top: auto; padding-top: 0.5rem; font-size: 0.86rem; font-weight: 700;
  text-decoration: none; align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem;
}
.card-link::after { content: "\2192"; display: inline-block; transition: transform 0.2s; }
.card-link:hover { text-decoration: underline; }
.card:hover .card-link::after, .card-link:hover::after { transform: translateX(5px); }

/* ---------- media tiles (showcase, archive, carousel triggers) ---------- */
.tile { position: relative; overflow: hidden; background: var(--placeholder); border-radius: 8px; width: 100%; height: 100%; }
.preview-single .tile { border-radius: 0; }
.tile-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.tile img, .tile video {
  display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%;
  transition: transform 0.4s ease;
}
.tile-open:hover img, .tile-open:hover video, .tile-open:focus-visible img, .tile-open:focus-visible video { transform: scale(1.04); }
/* "this opens bigger" badge: appears on hover/focus, always visible on touch screens */
.tile-open::after, .bts-open::after {
  content: ""; position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  background: rgba(21, 23, 28, 0.72)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5'/%3E%3C/svg%3E")
    center / 16px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); opacity: 0; transform: scale(0.7); transition: opacity 0.2s, transform 0.2s;
  pointer-events: none; z-index: 2;
}
.tile-open:hover::after, .tile-open:focus-visible::after, .bts-open:hover::after, .bts-open:focus-visible::after { opacity: 1; transform: scale(1); }
@media (hover: none) { .tile-open::after, .bts-open::after { opacity: 0.85; transform: scale(0.9); } }

.tile.is-loading::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.7) 50%, transparent 70%);
  background-size: 200% 100%; animation: shimmer 1.5s linear infinite;
}
.tile.is-error::after {
  content: "Media unavailable"; position: absolute; inset: 0; display: flex; z-index: 3;
  align-items: center; justify-content: center; font-size: 0.75rem; color: var(--muted); background: var(--placeholder);
}
.sound-btn {
  position: absolute; bottom: 10px; right: 10px; z-index: 3; display: inline-flex;
  align-items: center; gap: 0.4rem; background: rgba(21, 23, 28, 0.78); color: #fff;
  border: 0; padding: 6px 12px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 600; cursor: pointer; backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.sound-btn:hover { background: var(--accent-ink); }
.sound-btn .ic-on { display: none; }
.sound-btn.is-on { background: var(--accent-ink); }
.sound-btn.is-on .ic-on { display: inline-flex; }
.sound-btn.is-on .ic-off { display: none; }
.more-badge {
  position: absolute; inset: 0; z-index: 4; background: rgba(21, 23, 28, 0.62);
  color: #fff; border: 0; border-radius: 8px; font-size: 0.95rem; font-weight: 700; cursor: pointer;
  backdrop-filter: blur(3px); transition: background 0.2s;
}
.more-badge:hover { background: rgba(14, 118, 109, 0.85); }

/* ---------- masonry (archive galleries, natural aspect ratios, left to right) ---------- */
.masonry {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr));
  grid-auto-rows: 4px; gap: 14px; align-items: start; margin-bottom: 1.25rem;
}
.masonry:last-child { margin-bottom: 0; }
.masonry .tile { height: auto; box-shadow: var(--shadow-sm); }
.masonry .tile-open { height: auto; }
.masonry .tile img { height: auto; aspect-ratio: auto 4 / 3; }
.masonry .tile video { height: auto; aspect-ratio: auto 9 / 16; }
.masonry .tile.is-loading { min-height: 120px; }

/* ---------- accordion (archive projects) ---------- */
.brands-container { display: flex; flex-direction: column; gap: 1.1rem; }
.accordion-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  overflow: clip; transition: box-shadow 0.25s, border-color 0.25s, transform 0.25s; scroll-margin-top: 1rem;
}
.accordion-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.accordion-item.is-open { border-color: rgba(14, 148, 136, 0.5); box-shadow: var(--shadow-lg); transform: none; }
.accordion-header {
  width: 100%; text-align: left; cursor: pointer; border: 0; background: transparent;
  padding: 1.1rem 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  transition: background 0.2s;
}
.accordion-header:hover { background: var(--accent-soft); }
.accordion-side { display: inline-flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.accordion-hint {
  font-size: 0.74rem; font-weight: 700; color: var(--accent-ink); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
}
.accordion-hint::before { content: "Open"; }
.accordion-item.is-open .accordion-hint::before { content: "Close"; }
.accordion-chevron {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink); font-size: 1.15rem; transition: transform 0.3s, background 0.2s;
}
.accordion-item.is-open .accordion-chevron { transform: rotate(180deg); }
.accordion-header:hover .accordion-chevron { background: var(--accent); color: #fff; }
.accordion-header:hover .accordion-chevron .ic { animation: nudge 0.9s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
.accordion-body { padding: 1.4rem 1.5rem 1.6rem; border-top: 1px solid var(--line); background: rgba(246, 245, 241, 0.6); }

/* sticky close bar: stays in view while you scroll a long project */
.close-bar {
  position: sticky; top: 0.75rem; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.4rem 0.5rem 0.4rem 1.1rem; margin-bottom: 1.4rem; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-md);
}
.close-bar-title { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.close-bar-title span { color: var(--muted); font-weight: 500; margin-left: 0.5rem; }
.close-btn {
  display: inline-flex; align-items: center; gap: 0.4rem; flex-shrink: 0; cursor: pointer; border: 0;
  background: var(--ink); color: #fff; border-radius: 999px; padding: 0.5rem 1rem; font-weight: 600; font-size: 0.82rem;
  transition: background 0.2s, transform 0.2s;
}
.close-btn:hover { background: var(--accent-ink); transform: translateY(-1px); }

.brand-info { display: flex; align-items: center; gap: 1.1rem; min-width: 0; }
.brand-cover {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line); flex-shrink: 0; background: var(--placeholder); box-shadow: var(--shadow-sm);
}
.brand-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-cover-initial { font-family: var(--font-display); font-weight: 700; font-size: 1.4rem; color: var(--accent-ink); }
.brand-meta { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.brand-name {
  font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--ink);
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.2rem 0.75rem;
}
.brand-year {
  font-size: 0.95rem; color: var(--accent-ink); font-weight: 700; background: var(--accent-soft);
  padding: 1px 10px; border-radius: 6px; font-family: var(--font-body);
}
.brand-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag-pill {
  font-size: 0.75rem; color: var(--muted); background: rgba(21, 23, 28, 0.05);
  padding: 1px 9px; border-radius: 999px;
}
.brand-description { font-size: 0.97rem; line-height: 1.68; margin-bottom: 1.5rem; max-width: 880px; color: var(--text); }
.testimonial-box {
  margin-bottom: 1.75rem; padding: 1.1rem 1.3rem; background: #fff; box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--accent); border-radius: 10px; font-size: 0.92rem; max-width: 880px;
}
.testimonial-box .t-logos { margin-bottom: 0.7rem; }
.testimonial-box blockquote { font-style: italic; }
.testimonial-box blockquote::before { content: "\201C"; }
.testimonial-box blockquote::after { content: "\201D"; }
.testimonial-box figcaption {
  margin-top: 0.45rem; font-size: 0.76rem; font-weight: 700; color: var(--accent-ink);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.text-block-card {
  background: #fff; box-shadow: var(--shadow-sm); border-left: 4px solid var(--accent);
  padding: 1rem 1.3rem; border-radius: 10px; font-size: 0.94rem; line-height: 1.6; margin-bottom: 1.25rem; color: var(--text);
}

/* ---------- archive header: progress note + discipline tags ---------- */
.note-banner {
  display: flex; align-items: center; gap: 0.75rem; background: #fff; border: 1px solid var(--line);
  border-left: 4px solid var(--accent); border-radius: 10px; box-shadow: var(--shadow-sm);
  padding: 0.85rem 1.1rem; color: var(--text); font-size: 0.93rem; max-width: 760px; margin-bottom: 1.5rem;
}
.pulse-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(14, 148, 136, 0.5); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(14, 148, 136, 0.5); } 70%, 100% { box-shadow: 0 0 0 12px rgba(14, 148, 136, 0); } }
.tag-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem; }
.tag-row-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-right: 0.4rem; }
.tag-row .tag-pill {
  /* plain labels, not buttons: flat and quiet so they do not invite a click */
  font-size: 0.8rem; font-weight: 600; color: var(--text); background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line); padding: 0.3rem 0.85rem; cursor: default; user-select: none;
}
.filter-count { font-size: 0.82rem; color: var(--muted); margin-bottom: 1.25rem; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 62ch) auto; justify-content: start; gap: 5rem; align-items: center; margin-top: 1rem; }
.about-text p { color: var(--text); margin-bottom: 1.15rem; font-size: 1.05rem; line-height: 1.7; max-width: 62ch; }
.about-text a { font-weight: 600; }
.about-photo-wrap { width: 240px; }
.about-frame { width: 240px; border-radius: 28px; border: 5px solid #fff; box-shadow: var(--shadow-lg); --zoom: 1.3; --oy: 50%; }
.about-photo-fallback {
  width: 240px; aspect-ratio: 1 / 1; border-radius: 28px; border: 5px solid #fff; box-shadow: var(--shadow-lg); background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 3rem; color: var(--accent-ink);
}

/* ---------- CV: cover, profile, timeline, supporting cards ----------
   Reading order, biggest first: name (cover) > profile > roles (coloured header band) > details.
   Colour is used to tell roles apart and to add character, never to carry the dense text. */
.cv { margin-bottom: 4.5rem; }
.cv-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.cv-head .section-title { margin: 0; flex: 1; min-width: 12rem; }
.cv-subhead {
  display: flex; align-items: center; gap: 0.9rem; margin: 2.6rem 0 1.15rem;
  font-family: var(--font-display); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.cv-subhead::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cv-label { font-family: var(--font-display); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cv-teal); margin-bottom: 0.6rem; }

/* level 1: the cover */
.cv-cover {
  display: block; padding: 2.4rem 2.7rem; border-radius: 28px; color: #fff;
  background: linear-gradient(135deg, var(--cv-navy) 0%, var(--cv-teal) 100%); box-shadow: var(--shadow-lg);
}
.cv-person { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; }
.cv-title-line { font-family: var(--font-display); font-weight: 500; font-size: 1.1rem; opacity: 0.92; margin-top: 0.4rem; }
.cv-contact-row { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 0.6rem; margin-top: 1.15rem; }
.cv-contact-row li { background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.32); border-radius: 999px; padding: 0.25rem 0.9rem; font-size: 0.85rem; }
.cv-contact-row a { color: #fff; text-decoration: none; }
.cv-contact-row a:hover { text-decoration: underline; }

/* level 2: profile */
.cv-profile {
  margin-top: 1.25rem; background: #fff; border: 1px solid var(--line); border-left: 6px solid var(--cv-teal);
  border-radius: 20px; box-shadow: var(--shadow-md); padding: 1.6rem 2.1rem;
}
.cv-profile p { font-size: 1.1rem; line-height: 1.7; color: var(--ink); max-width: 82ch; }

/* level 3: roles on a timeline (date on the left, coloured dot on the line, card on the right) */
.cv-timeline { --rail: 150px; --gap: 1.25rem; --tgap: 1.9rem; --dot-y: calc(1.3rem + 11px); --line-x: calc(var(--rail) + var(--gap) + 12.5px); position: relative; display: flex; flex-direction: column; gap: var(--tgap); }
/* the line is drawn per role: from this role's dot down to the next one, so it stops at the last dot */
.cv-role-row:not(:last-child)::before {
  content: ""; position: absolute; left: var(--line-x); top: var(--dot-y); height: calc(100% + var(--tgap)); width: 3px;
  border-radius: 3px; background: var(--role); opacity: 0.4;
}
.cv-role-row { position: relative; --role: var(--cv-teal); display: grid; grid-template-columns: var(--rail) 28px minmax(0, 1fr); column-gap: var(--gap); align-items: start; }
.cv-role-row.teal { --role: var(--cv-teal); }
.cv-role-row.slate { --role: var(--cv-slate); }
.cv-role-row.green { --role: var(--cv-green); }
.cv-role-row.amber { --role: var(--cv-amber); }
.cv-role-row.navy { --role: var(--cv-navy); }
.cv-date { text-align: right; padding-top: 1.2rem; font-family: var(--font-display); font-weight: 600; font-size: 1rem; line-height: 1.3; color: var(--role); white-space: nowrap; }
.cv-dot {
  position: relative; z-index: 1; justify-self: center; margin-top: 1.3rem; width: 22px; height: 22px; border-radius: 50%;
  background: var(--role); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--role);
}
.cv-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-md); overflow: hidden; transition: transform 0.25s, box-shadow 0.25s; }
.cv-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cv-card-head { background: var(--role); color: #fff; padding: 1.2rem 1.8rem; }
.cv-role-title { font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; line-height: 1.3; }
.cv-company { font-weight: 600; font-size: 0.98rem; opacity: 0.95; margin-top: 0.25rem; }
.cv-note { font-size: 0.82rem; opacity: 0.9; font-style: italic; margin-top: 0.2rem; }
.cv-card-body { padding: 1.5rem 1.8rem 1.7rem; }
.cv-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.2rem; }
.cv-col-title {
  display: flex; align-items: center; gap: 0.55rem; padding-bottom: 0.55rem; margin-bottom: 0.9rem; border-bottom: 2px solid var(--role);
  font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--role);
}
.cv-col-title .ic { font-size: 1.2rem; }
.cv-bullets { list-style: none; }
.cv-bullets li { position: relative; padding-left: 1.2rem; margin-bottom: 0.7rem; font-size: 0.92rem; line-height: 1.6; color: var(--text); }
.cv-bullets li:last-child { margin-bottom: 0; }
.cv-bullets li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--role); }

/* level 4: supporting details */
.cv-support { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.cv-box {
  --box: var(--cv-navy); background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--box);
  border-radius: 18px; box-shadow: var(--shadow-md); padding: 1.3rem 1.6rem 1.6rem; transition: transform 0.25s, box-shadow 0.25s;
}
.cv-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.cv-box.amber { --box: var(--cv-amber); }
.cv-box.teal { --box: var(--cv-teal); }
.cv-box.slate { --box: var(--cv-slate); }
.cv-box.wide { grid-column: 1 / -1; }
.cv-box h4 { font-family: var(--font-display); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--box); margin-bottom: 1rem; }
.cv-skill-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.2rem 2.4rem; }
.chip-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.4rem; }
.chip {
  display: inline-block; background: var(--accent-soft); color: var(--accent-ink); border: 1px solid rgba(14, 148, 136, 0.2);
  padding: 0.18rem 0.75rem; border-radius: 999px; font-size: 0.8rem; margin: 0.15rem 0.3rem 0.15rem 0;
}
.cv-list { list-style: none; font-size: 0.92rem; line-height: 1.5; color: var(--text); }
.cv-list li { margin-bottom: 0.75rem; }
.cv-list li:last-child { margin-bottom: 0; }
.cv-list strong { display: block; color: var(--ink); font-weight: 700; }
.cv-fineprint { font-size: 0.84rem; color: var(--muted); margin-top: 0.9rem; line-height: 1.5; }

/* ---------- behind the scenes carousel ---------- */
.carousel-track {
  display: flex; gap: 1.25rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem 0.25rem 1.25rem; overscroll-behavior-x: contain; scrollbar-width: thin;
}
.carousel-track::-webkit-scrollbar { height: 6px; }
.carousel-track::-webkit-scrollbar-thumb { background: rgba(21, 23, 28, 0.2); border-radius: 3px; }
.bts-item {
  aspect-ratio: 9 / 16; border-radius: 14px; overflow: hidden; border: 4px solid #fff;
  background: var(--placeholder); box-shadow: var(--shadow-md); transition: transform 0.25s, box-shadow 0.25s;
}
.carousel .bts-item { flex: 0 0 clamp(170px, 22vw, 240px); scroll-snap-align: start; }
.bts-item:hover { transform: translateY(-6px) rotate(-0.6deg); box-shadow: var(--shadow-lg); }
.bts-open { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; }
.bts-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.carousel-bar { display: flex; justify-content: flex-end; align-items: center; gap: 0.5rem; margin-top: 0.25rem; }
.carousel-btn, .carousel-toggle {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer; box-shadow: var(--shadow-sm);
  display: inline-flex; align-items: center; justify-content: center; transition: box-shadow 0.2s, color 0.2s, transform 0.2s;
}
.carousel-btn:hover:not(:disabled), .carousel-toggle:hover { box-shadow: var(--shadow-md); color: var(--accent-ink); transform: translateY(-1px); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.carousel-toggle .ic-play { display: none; }
.carousel-toggle.is-paused .ic-play { display: inline-flex; }
.carousel-toggle.is-paused .ic-pause { display: none; }

/* ---------- contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 3rem; align-items: start; }
.contact-details { list-style: none; display: flex; flex-direction: column; gap: 0.8rem; margin-top: 1.5rem; }
.contact-details li { color: var(--muted); display: flex; gap: 0.75rem; align-items: baseline; }
.contact-details strong { color: var(--ink); display: inline-block; min-width: 5.5rem; font-family: var(--font-display); font-weight: 600; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-lg); padding: 2rem; }
.contact-form { display: flex; flex-direction: column; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.field input, .field textarea {
  width: 100%; background: #fff; border: 1px solid rgba(21, 23, 28, 0.18);
  border-radius: 10px; padding: 0.85rem 1rem; color: var(--ink);
  font-family: var(--font-body); font-size: 0.95rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { resize: vertical; min-height: 8rem; }
.contact-form .btn { align-self: flex-start; }
.form-status { font-size: 0.92rem; min-height: 1.4em; color: var(--muted); }
.form-status.is-ok { color: var(--accent-ink); font-weight: 600; }
.form-status.is-error { color: #b42318; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; background: rgba(255, 255, 255, 0.55); }
.site-footer .wrap {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
  gap: 0.5rem 2rem; padding-top: 1.5rem; padding-bottom: 1.75rem; font-size: 0.85rem; color: var(--muted);
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent-ink); }

/* ---------- lightbox (stays dark: it frames the media) ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 9999; background: rgba(10, 11, 14, 0.94);
  backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center;
  overscroll-behavior: contain;
}
.lb-stage {
  max-width: min(94vw, 1400px); max-height: 90vh; padding: 0 3.5rem;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
}
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 84vh; border-radius: 10px; background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lb-error { color: #cbd5e1; font-size: 0.9rem; padding: 2rem; }
.lb-btn {
  position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5); background: rgba(20, 22, 28, 0.7); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.lb-btn:hover { background: #fff; color: var(--ink); }
.lb-btn .ic { width: 22px; height: 22px; }
.lb-close { top: 1rem; right: 1rem; }
.lb-fs { top: 1rem; right: 4.5rem; }
.lb-nav { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }
.lb-counter { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: #cbd5e1; font-size: 0.85rem; letter-spacing: 0.05em; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .testimonials { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.4rem 0.3rem 1.2rem; }
  .testimonial-card { flex: 0 0 min(82%, 300px); scroll-snap-align: start; }
}
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .about-photo-wrap { order: -1; width: 180px; }
  .about-frame, .about-photo-fallback { width: 180px; }
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }

  /* CV: the date moves above each card, the line hugs the left edge, columns stack */
  .cv-cover { padding: 1.7rem 1.6rem; }
  .cv-timeline { --rail: 0px; --gap: 0.9rem; --tgap: 1.5rem; --dot-y: calc(0.05rem + 10px); --line-x: 10.5px; }
  .cv-role-row { grid-template-columns: 24px minmax(0, 1fr); grid-template-areas: "dot date" "dot card"; }
  .cv-date { grid-area: date; text-align: left; padding: 0.1rem 0 0.55rem; }
  .cv-dot { grid-area: dot; margin-top: 0.05rem; width: 20px; height: 20px; }
  .cv-card { grid-area: card; }
  .cv-columns { grid-template-columns: 1fr; gap: 1.6rem; }
  .cv-support { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .wrap { padding: 0 1.1rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; }
  .brand-logo { width: 40px; height: 40px; }
  .site-nav ul { gap: 1.25rem; }
  .intro { padding: 1.75rem 0 2rem; }
  .accordion-header { padding: 1rem; }
  .accordion-body { padding: 1rem 1rem 1.25rem; }
  .accordion-hint { display: none; }
  .lb-stage { padding: 0; max-width: 100vw; }
  .lb-stage img, .lb-stage video { border-radius: 0; max-height: 80vh; }
  .lb-btn { width: 40px; height: 40px; }
  .lb-prev { left: 0.5rem; }
  .lb-next { right: 0.5rem; }
  .contact-card { padding: 1.4rem; }
  .cv-card-head, .cv-card-body { padding-left: 1.3rem; padding-right: 1.3rem; }
  .cv-profile { padding: 1.3rem 1.4rem; }
}
@media (max-width: 640px) {
  .masonry { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
  .brand-cover { width: 52px; height: 52px; }
  .brand-name { font-size: 1.05rem; }
  .close-bar-title span { display: none; }
  .cv-support { grid-template-columns: 1fr; }
  .cv-skill-groups { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
  .tile.is-loading::before { animation: none; }
}
