/* Jonathan Joyner Portfolio
   Brand direction: bright utility, structured curves, blue confidence,
   red punctuation, pink humanity, one smart surprise.
*/

:root {
  --blue: #007cbb;
  --blue-2: #005e9a;
  --blue-deep: #062b63;
  --blue-ink: #0a2244;
  --red: #e1194a;
  --pink: #f7d8df;
  --pink-soft: #fff1f5;
  --lavender: #a5a1c4;
  --lavender-soft: #f1eff8;
  --blue-soft: #e7eef4;
  --lavender-ink: #4c496b;
  --white: #ffffff;
  --off-white: #fffaf8;
  --ink: #141821;
  --muted: #5e6a78;
  --line: rgba(10, 34, 68, 0.13);
  --font-display: "Bricolage Grotesque", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1180px;
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --shadow-soft: 0 24px 70px rgba(10, 34, 68, 0.12);
  --shadow-card: 0 18px 44px rgba(10, 34, 68, 0.13);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  background:
    radial-gradient(circle at 90% 0%, rgba(247, 216, 223, 0.95), transparent 28rem),
    radial-gradient(circle at 4% 14%, rgba(0, 124, 187, 0.12), transparent 22rem),
    linear-gradient(180deg, var(--off-white) 0%, var(--white) 42%, var(--pink-soft) 100%);
  text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
::selection { background: var(--pink); color: var(--blue-ink); }
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.section-padding { padding: clamp(72px, 8vw, 112px) 0; }
.section-bleed { position: relative; overflow: hidden; }
.skip-link { position: fixed; left: 18px; top: 18px; z-index: 999; transform: translateY(-140%); background: var(--blue-ink); color: white; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-weight: 800; }
.skip-link:focus { transform: translateY(0); }

/* Header */
.site-header { position: sticky; inset-block-start: 0; z-index: 100; background: rgba(255, 250, 248, 0.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--line); transition: box-shadow 220ms ease, background 220ms ease; }
.site-header::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 5px; background: var(--red); }
.site-header.is-scrolled { background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 28px rgba(10, 34, 68, 0.08); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand-link { display: inline-flex; align-items: center; gap: 14px; color: var(--blue-ink); text-decoration: none; }
.logo-mark { position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; flex: 0 0 52px; }
.logo-mark img { max-width: 100%; max-height: 100%; display: block; transition: transform 220ms var(--ease); }
.logo-fallback { display: none; color: var(--blue); font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; letter-spacing: -0.14em; line-height: 1; }
.logo-mark.logo-missing img { display: none; }
.logo-mark.logo-missing .logo-fallback { display: block; }
.brand-link:hover .logo-mark img, .brand-link:hover .logo-fallback { transform: rotate(-3deg) scale(1.04); }
.brand-name { color: var(--blue-ink); font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; font-size: 0.95rem; }
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.desktop-nav a { position: relative; color: var(--blue-ink); font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.84rem; }
.desktop-nav a::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -9px; height: 3px; background: var(--red); border-radius: 999px; transform: scaleX(0); transform-origin: left; transition: transform 220ms var(--ease); }
.desktop-nav a:hover::after, .desktop-nav a:focus-visible::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--blue); color: white; cursor: pointer; box-shadow: 0 8px 0 rgba(10, 34, 68, 0.12); }
.menu-toggle span { display: block; width: 20px; height: 2px; margin: 4px auto; border-radius: 999px; background: white; transition: transform 220ms var(--ease), opacity 220ms ease; }
.menu-toggle.is-open span:first-child { transform: translateY(6px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: white; padding: 10px 20px 22px; }
.mobile-nav a { display: block; padding: 14px 0; color: var(--blue-ink); font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: 0.06em; }

/* Typography */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0; color: var(--red); font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; font-size: 0.8rem; }
.eyebrow::before { content: ""; width: 30px; height: 3px; border-radius: 999px; background: currentColor; }
h1, h2, h3 { margin-block-start: 0; }
h1, h2 { font-family: var(--font-display); color: var(--blue-ink); letter-spacing: -0.055em; }
h1 { margin: 16px 0 20px; font-size: clamp(3.6rem, 7.5vw, 7.4rem); line-height: 0.9; max-width: 860px; }
h1 span { color: var(--red); }
h2 { margin: 12px 0 16px; font-size: clamp(2.55rem, 5.5vw, 5rem); line-height: 0.95; }
h3 { font-family: var(--font-display); letter-spacing: -0.035em; }
.section-heading { max-width: 830px; margin-bottom: 44px; }
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.12rem); }

/* Hero */
.hero { padding: clamp(72px, 9vw, 118px) 0 clamp(64px, 7vw, 96px); }
.hero::before { content: ""; position: absolute; inset-block: 0; inset-inline-end: -10vw; width: min(66vw, 820px); background: linear-gradient(135deg, rgba(247, 216, 223, 0.95), rgba(255, 255, 255, 0)); clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%); z-index: -1; }
.hero::after { content: ""; position: absolute; left: 7vw; bottom: -80px; width: 210px; height: 210px; border: 30px solid rgba(0, 124, 187, 0.11); border-radius: 50%; z-index: -1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.88fr); gap: clamp(34px, 6vw, 76px); align-items: center; }
.hero-subhead { margin: 0 0 16px; color: var(--blue); font-size: clamp(1.15rem, 2vw, 1.45rem); font-weight: 800; }
.hero-body { max-width: 700px; margin: 0; color: var(--ink); font-size: clamp(1.02rem, 1.35vw, 1.13rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-media { position: relative; }
.portrait-card { position: relative; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); background: var(--pink); isolation: isolate; }
.portrait-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 8px; background: var(--red); z-index: 2; }
.portrait-card::after { content: ""; position: absolute; right: 20px; bottom: 20px; width: 94px; height: 94px; border-radius: 50%; background: rgba(247, 216, 223, 0.84); mix-blend-mode: multiply; z-index: 2; }
.portrait-card img { display: block; width: 100%; height: min(690px, 70vh); object-fit: cover; transition: transform 700ms var(--ease); }
.portrait-card:hover img { transform: scale(1.025); }

/* Buttons */
.btn { --x: 50%; --y: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 24px; overflow: hidden; border-radius: 14px; text-decoration: none; font-weight: 800; letter-spacing: 0.055em; text-transform: uppercase; font-size: 0.86rem; border: 2px solid transparent; transition: transform 180ms var(--ease), box-shadow 180ms var(--ease), background 180ms ease, color 180ms ease, border-color 180ms ease; }
.btn::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--x) var(--y), rgba(255, 255, 255, 0.32), transparent 35%); opacity: 0; transition: opacity 160ms ease; }
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-3px); }
.btn span { position: relative; transition: transform 180ms var(--ease); }
.btn:hover span { transform: translateX(4px); }
.btn-primary { background: var(--red); color: white; box-shadow: 0 8px 0 rgba(10, 34, 68, 0.14); }
.btn-primary:hover { box-shadow: 0 12px 0 rgba(10, 34, 68, 0.12); }
.btn-outline { background: white; color: var(--blue-ink); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: white; }

/* Approach */
.approach {
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.9), transparent 24rem),
    linear-gradient(135deg, var(--lavender-soft) 0%, #ffffff 52%, rgba(247, 216, 223, 0.42) 100%);
  border-block: 1px solid rgba(76, 73, 107, 0.14);
}
.approach::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--lavender), var(--red));
}
.approach .section-heading h2 { color: var(--lavender-ink); }
.approach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.approach-card { position: relative; min-height: 270px; padding: clamp(24px, 4vw, 34px); overflow: hidden; border-radius: var(--radius-lg); border: 1px solid var(--line); background: radial-gradient(circle at 100% 0%, rgba(247, 216, 223, 0.78), transparent 11rem), linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,255,255,0.88)); box-shadow: 0 0 0 rgba(0,0,0,0); transition: transform 220ms var(--ease), box-shadow 220ms var(--ease), border-color 220ms ease; }
.approach-card::after { content: ""; position: absolute; right: -44px; bottom: -44px; width: 130px; height: 130px; border-radius: 50%; background: rgba(0, 124, 187, 0.12); transition: transform 220ms var(--ease), background 220ms ease; }
.approach-card:hover { transform: translateY(-7px); border-color: rgba(0, 124, 187, 0.28); box-shadow: var(--shadow-card); }
.approach-card:hover::after { transform: scale(1.18); background: rgba(225, 25, 74, 0.12); }
.approach-number { color: var(--red); font-weight: 900; letter-spacing: 0.1em; font-size: 0.84rem; }
.approach-card h3 { margin: 30px 0 12px; color: var(--blue-ink); font-size: clamp(2rem, 4vw, 3.3rem); line-height: 0.95; }
.approach-card p { max-width: 32ch; margin: 0; color: var(--muted); }

/* Projects */
.projects { position: relative; background: linear-gradient(180deg, var(--off-white) 0%, #ffffff 28%, var(--pink-soft) 100%); }
.projects::before { content: ""; position: absolute; top: 0; right: 0; width: min(42vw, 560px); height: 320px; background: linear-gradient(135deg, rgba(247, 216, 223, 0.82), transparent); clip-path: polygon(32% 0, 100% 0, 100% 100%, 0 100%); pointer-events: none; }
.project-heading, .filter-bar, .projects-grid { position: relative; z-index: 1; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: -12px 0 32px; }
.filter-pill { min-height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--blue-ink); cursor: pointer; font-weight: 800; transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms var(--ease); }
.filter-pill:hover { transform: translateY(-2px); border-color: rgba(0, 124, 187, 0.45); }
.filter-pill.is-active { background: var(--blue); color: white; border-color: var(--blue); }
.projects-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.project-card { position: relative; display: grid; grid-template-rows: auto 1fr; min-height: 100%; overflow: hidden; border-radius: var(--radius-md); border: 1px solid var(--line); background: white; box-shadow: 0 0 0 rgba(0,0,0,0); cursor: pointer; transition: transform 240ms var(--ease), box-shadow 240ms var(--ease), border-color 240ms ease, opacity 220ms ease; }
.project-card::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 5px; background: var(--red); transform: scaleX(0.24); transform-origin: left; z-index: 2; transition: transform 260ms var(--ease); }
.project-card::after { content: "View project →"; position: absolute; right: 18px; top: 18px; padding: 8px 10px; border-radius: 999px; color: white; background: rgba(6, 43, 99, 0.84); font-size: 0.74rem; font-weight: 800; opacity: 0; transform: translateY(-5px); transition: opacity 180ms ease, transform 180ms var(--ease); z-index: 3; }
.project-card:hover, .project-card:focus-within { transform: translateY(-8px); box-shadow: var(--shadow-card); border-color: rgba(0, 124, 187, 0.34); }
.project-card:hover::before, .project-card:focus-within::before { transform: scaleX(1); }
.project-card:hover::after, .project-card:focus-within::after { opacity: 1; transform: translateY(0); }
.project-card.is-hidden { display: none; }
.project-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(circle at 80% 20%, rgba(247, 216, 223, 0.92), transparent 35%), linear-gradient(135deg, rgba(0, 124, 187, 0.24), rgba(255,255,255,0.8)); }
.project-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 520ms var(--ease), filter 220ms ease; }
.project-card:hover .project-image img { transform: scale(1.06); filter: saturate(1.08) contrast(1.03); }
.project-image.image-missing img { opacity: 0; }
.project-image.image-missing::after { content: "JJ"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--blue); font-family: var(--font-display); font-size: 3rem; font-weight: 800; letter-spacing: -0.14em; }
.project-content { display: grid; align-content: start; gap: 10px; padding: 20px; }
.project-kicker { margin: 0; color: var(--red); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.project-content h3 { margin: 0; color: var(--blue-ink); font-size: 1.45rem; line-height: 1; }
.project-content p:last-child { margin: 0; color: var(--ink); }

/* Experience */
.experience {
  position: relative;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 88% 8%, rgba(247,216,223,0.22), transparent 24rem),
    linear-gradient(135deg, #6c6894 0%, #4c496b 44%, #243460 100%);
}
.experience::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: linear-gradient(90deg, var(--lavender), var(--blue), var(--red));
}
.experience > .container { position: relative; z-index: 1; }
.experience .section-heading h2, .experience .section-heading p:not(.eyebrow) { color: white; }
.experience-list { display: grid; gap: 14px; }
.experience-row { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(22px, 4vw, 42px); padding: clamp(22px, 4vw, 32px); border-radius: var(--radius-md); border: 1px solid rgba(255, 255, 255, 0.15); background: radial-gradient(circle at 100% 0%, rgba(247, 216, 223, 0.18), transparent 14rem), rgba(255, 255, 255, 0.08); transition: transform 180ms var(--ease), background 180ms ease, border-color 180ms ease; }
.experience-row:hover { transform: translateX(6px); background: radial-gradient(circle at 100% 0%, rgba(225, 25, 74, 0.16), transparent 14rem), rgba(255, 255, 255, 0.09); border-color: rgba(247, 216, 223, 0.45); }
.experience-meta h3 { margin: 0 0 6px; color: var(--pink); font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1; }
.experience-meta p, .experience-row > p { margin: 0; color: rgba(255, 255, 255, 0.84); }

/* About */
.about { background: linear-gradient(135deg, white 0%, white 52%, var(--pink-soft) 52%, var(--pink-soft) 100%); }
.about-grid { display: grid; grid-template-columns: 1fr 0.92fr; gap: clamp(34px, 5vw, 64px); align-items: center; }
.about-copy { padding: clamp(28px, 5vw, 58px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: rgba(255, 255, 255, 0.94); box-shadow: var(--shadow-soft); }
.about-copy p:not(.eyebrow) { color: var(--ink); font-size: clamp(1rem, 1.35vw, 1.09rem); }
.pull-line { margin: 34px 0 !important; color: var(--red) !important; font-family: var(--font-display); font-size: clamp(2.6rem, 5vw, 5.6rem) !important; font-weight: 800; line-height: 0.88; letter-spacing: -0.055em; }
.about-close { color: var(--blue-ink) !important; font-weight: 900; }
.about-media { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--pink); box-shadow: var(--shadow-soft); }
.about-media::before { content: ""; position: absolute; inset-inline-start: 0; inset-block: 0; width: 8px; background: var(--red); z-index: 2; }
.about-media::after { content: ""; position: absolute; right: 0; bottom: 0; width: 42%; height: 42%; clip-path: circle(74% at 100% 100%); background: linear-gradient(135deg, transparent, rgba(225, 25, 74, 0.84)); mix-blend-mode: multiply; }
.about-media img { display: block; width: 100%; }

/* Contact */
.contact {
  background:
    radial-gradient(circle at 8% 0%, rgba(165,161,196,0.20), transparent 22rem),
    linear-gradient(135deg, var(--blue-deep), var(--blue-ink));
}
.contact-panel { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding: clamp(30px, 5vw, 60px); border-radius: var(--radius-lg); border: 1px solid rgba(255, 255, 255, 0.14); background: radial-gradient(circle at 90% 12%, rgba(247, 216, 223, 0.22), transparent 24rem), linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.04)); }
.contact h2 { color: white; }
.contact p:not(.eyebrow) { max-width: 720px; margin: 0; color: rgba(255, 255, 255, 0.84); font-size: 1.12rem; }

/* Modal */
.modal-shell { position: fixed; inset: 0; z-index: 200; display: none; }
.modal-shell.is-open { display: block; }
.modal-shell[aria-hidden="false"] .modal-overlay { opacity: 1; }
.modal-overlay { position: absolute; inset: 0; background: rgba(10, 34, 68, 0.62); backdrop-filter: blur(10px); opacity: 0; transition: opacity 180ms ease; }
.modal { position: relative; width: min(900px, calc(100% - 32px)); max-height: min(82vh, 820px); overflow: auto; margin: 8vh auto; border-radius: var(--radius-lg); background: white; box-shadow: 0 34px 100px rgba(0, 0, 0, 0.28); transform: translateY(18px) scale(0.98); opacity: 0; transition: transform 220ms var(--ease), opacity 220ms ease; }
.modal-shell.is-open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal::before { content: ""; position: absolute; inset-inline: 0; inset-block-start: 0; height: 7px; background: linear-gradient(90deg, var(--red), var(--blue), var(--pink)); }
.modal-close { position: sticky; top: 18px; float: right; z-index: 3; width: 44px; height: 44px; margin: 18px 18px 0 0; border: 0; border-radius: 50%; color: white; background: var(--blue-ink); cursor: pointer; font-size: 1.75rem; line-height: 1; transition: transform 180ms var(--ease), background 180ms ease; }
.modal-close:hover { transform: rotate(5deg) scale(1.05); background: var(--red); }
.modal-inner { padding: clamp(30px, 5vw, 58px); }
.modal h2 { margin-bottom: 18px; max-width: 720px; }
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.modal-tag { display: inline-flex; align-items: center; min-height: 30px; padding: 0 11px; border-radius: 999px; color: var(--blue-ink); background: var(--pink-soft); font-weight: 800; font-size: 0.76rem; }
.modal-content { display: grid; gap: 18px; }
.modal-content p { margin: 0; color: var(--ink); font-size: 1.08rem; }
.modal-content .result { margin-top: 8px; padding: 18px 20px; border-left: 5px solid var(--red); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--pink-soft); color: var(--blue-ink); font-weight: 800; }

/* Footer */
.site-footer { padding: 34px 0; background: var(--ink); color: rgba(255, 255, 255, 0.74); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.footer-brand .brand-name { color: white; }
.site-footer p { max-width: 520px; margin: 0; text-align: center; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: white; font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Micro-interactions */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 560ms ease, transform 560ms var(--ease); transition-delay: var(--delay, 0ms); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.magnetic { will-change: transform; }

/* Responsive */
@media (max-width: 1080px) {
  .projects-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-note { left: 18px; }
}
@media (max-width: 940px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: inline-block; }
  .mobile-nav.is-open { display: block; }
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .hero-media { max-width: 640px; }
  .approach-grid { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .experience-row { grid-template-columns: 1fr; }
  .contact-panel, .footer-inner { align-items: flex-start; flex-direction: column; }
  .site-footer p { text-align: left; }
}
@media (max-width: 720px) {
  .container { width: min(var(--container), calc(100% - 28px)); }
  .header-inner { min-height: 68px; }
  .brand-name { font-size: 0.78rem; }
  .logo-mark { width: 44px; height: 44px; flex-basis: 44px; }
  h1 { font-size: clamp(3.25rem, 16vw, 5.2rem); }
  h2 { font-size: clamp(2.45rem, 12vw, 4rem); }
  .hero-actions { flex-direction: column; }
  .btn { width: 100%; }
  .proof-grid, .projects-grid { grid-template-columns: 1fr; }
  .filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; }
  .filter-pill { flex: 0 0 auto; }
  .modal { width: calc(100% - 18px); margin: 5vh auto; max-height: 90vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* Embedded project videos inside modals */
.modal-video-single,
.modal-video-grid {
  display: grid;
  gap: 16px;
  margin: 8px 0 4px;
}

.modal-video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.modal-video-embed {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-md);
  background: var(--blue-ink);
  border: 1px solid rgba(10, 34, 68, 0.16);
  box-shadow: var(--shadow-soft);
}

.modal-video-embed::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: var(--red);
  z-index: 1;
}

.modal-video-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 720px) {
  .modal-video-grid {
    grid-template-columns: 1fr;
  }
}


/* Modal video sections restored from the original portfolio snippets */
.modal-video-section {
  margin: 26px 0 8px;
}

.modal-video-heading {
  margin: 0 0 14px;
  color: var(--blue-ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: -0.035em;
}


/* === Ready-to-publish refinements ===
   Fixes: header contrast, display font spacing, section separation,
   Experience eyebrow contrast, and About panel color break.
*/

/* Better section separation */
.about {
  background:
    linear-gradient(
      135deg,
      var(--white) 0%,
      var(--white) 52%,
      var(--blue-soft) 52%,
      var(--blue-soft) 100%
    ) !important;
}

/* The Experience background is darker, so the eyebrow needs a pale blue-grey instead of red. */
.experience .eyebrow {
  color: var(--blue-soft) !important;
}

.experience .eyebrow::before {
  background: var(--blue-soft) !important;
}

/* Bricolage Grotesque needs a little more breathing room at large sizes. */
h1,
h2,
.pull-line,
.modal h2,
.section-heading h2,
.about h2,
.contact h2,
.experience h2 {
  letter-spacing: -0.025em !important;
  word-spacing: 0.035em;
  line-height: 0.98;
  font-kerning: normal;
  text-wrap: balance;
}

.hero h1 {
  letter-spacing: -0.015em !important;
  word-spacing: 0.055em;
  line-height: 0.94;
}

.project-content h3,
.experience-meta h3,
.approach-card h3 {
  letter-spacing: -0.018em;
  word-spacing: 0.025em;
}

/* Locked header behavior.
   Before scroll: light header, blue mark/name/nav.
   After scroll: full blue header, white mark/name/nav.
*/
.site-header {
  background: rgba(255, 250, 248, 0.96) !important;
  border-bottom: 1px solid rgba(10, 34, 68, 0.13) !important;
  transition: background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.site-header .logo-mark img {
  opacity: 1;
  filter: brightness(0) saturate(100%) invert(36%) sepia(98%) saturate(1432%) hue-rotate(170deg) brightness(91%) contrast(101%) !important;
}

.site-header .logo-fallback,
.site-header .brand-name,
.site-header .desktop-nav a {
  color: var(--blue-ink) !important;
}

.site-header .menu-toggle {
  background: var(--blue) !important;
  color: var(--white) !important;
}

.site-header .menu-toggle span {
  background: var(--white) !important;
}

.site-header.is-scrolled {
  background: var(--blue) !important;
  border-bottom-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 14px 34px rgba(10, 34, 68, 0.18) !important;
}

.site-header.is-scrolled::before {
  background: var(--red) !important;
}

.site-header.is-scrolled .logo-mark img {
  filter: brightness(0) invert(1) !important;
}

.site-header.is-scrolled .logo-fallback,
.site-header.is-scrolled .brand-name,
.site-header.is-scrolled .desktop-nav a {
  color: var(--white) !important;
}

.site-header.is-scrolled .desktop-nav a::after {
  background: var(--blue-soft) !important;
}

.site-header.is-scrolled .menu-toggle {
  background: var(--white) !important;
  color: var(--blue) !important;
  box-shadow: 0 8px 0 rgba(10, 34, 68, 0.18) !important;
}

.site-header.is-scrolled .menu-toggle span {
  background: var(--blue) !important;
}

.site-header.is-scrolled .mobile-nav {
  background: var(--blue) !important;
  border-top-color: rgba(255, 255, 255, 0.22) !important;
}

.site-header.is-scrolled .mobile-nav a {
  color: var(--white) !important;
}

.site-footer .logo-mark img {
  filter: brightness(0) invert(1) !important;
}


/* Modal project media + outbound proof links */
.modal-project-image {
  position: relative;
  margin: 0 0 8px;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(10, 34, 68, 0.14);
  background: var(--blue-soft);
  box-shadow: var(--shadow-soft);
}

.modal-project-image::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--red);
  z-index: 1;
}

.modal-project-image img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.modal-links {
  margin: 8px 0 2px;
  padding: 20px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-soft), rgba(247, 216, 223, 0.45));
  border: 1px solid rgba(10, 34, 68, 0.12);
}

.modal-links-heading {
  margin: 0 0 12px;
  color: var(--blue-ink);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  letter-spacing: -0.02em;
}

.modal-link-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-ink);
  border: 1px solid rgba(0, 124, 187, 0.24);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.modal-proof-link:hover {
  transform: translateY(-2px);
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

/* === Modal media patch: use click-through video cards instead of iframe embeds ===
   This avoids YouTube Error 153 in strict preview/site-builder environments while
   still keeping video samples visible and useful.
*/
.modal-video-card-grid,
.modal-video-single {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.modal-video-single {
  grid-template-columns: minmax(0, 1fr);
}

.modal-video-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(160px, 0.42fr) 1fr;
  align-items: stretch;
  overflow: hidden;
  min-height: 132px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(10, 34, 68, 0.16);
  background: var(--white);
  color: var(--blue-ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: transform 180ms var(--ease), border-color 180ms ease, box-shadow 180ms ease;
}

.modal-video-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--red);
  z-index: 2;
}

.modal-video-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 124, 187, 0.34);
  box-shadow: 0 22px 54px rgba(10, 34, 68, 0.16);
}

.modal-video-thumb {
  position: relative;
  min-height: 132px;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  overflow: hidden;
}

.modal-video-thumb img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
  display: block;
  opacity: 0.9;
  transform: scale(1.01);
  transition: transform 260ms ease, opacity 260ms ease;
}

.modal-video-card:hover .modal-video-thumb img {
  transform: scale(1.06);
  opacity: 1;
}

.modal-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--red);
  font-size: 1rem;
  box-shadow: 0 14px 34px rgba(10, 34, 68, 0.18);
}

.modal-video-platform {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 132px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
}

.modal-video-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px;
}

.modal-video-copy strong {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  line-height: 1.05;
  letter-spacing: -0.018em;
}

.modal-video-copy em {
  color: var(--red);
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

.modal-outbound-link,
.modal-proof-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--white);
  color: var(--blue-ink);
  border: 1px solid rgba(0, 124, 187, 0.24);
  font-weight: 800;
  text-decoration: none;
  transition: transform 180ms var(--ease), color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.modal-outbound-link:hover,
.modal-proof-link:hover {
  transform: translateY(-2px);
  color: var(--white);
  background: var(--blue);
  border-color: var(--blue);
}

@media (max-width: 720px) {
  .modal-video-card-grid,
  .modal-video-single {
    grid-template-columns: 1fr;
  }

  .modal-video-card {
    grid-template-columns: 1fr;
  }
}

/* === About section: two-image layout test === */

.about-media-duo {
  position: relative;
  min-height: 620px;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  background: transparent;
}

.about-media-duo::after {
  display: none;
}

.about-photo {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid rgba(10, 34, 68, 0.12);
  box-shadow: 0 24px 70px rgba(10, 34, 68, 0.14);
  isolation: isolate;
}

.about-photo::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--red);
  z-index: 2;
}

.about-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.about-photo-primary {
  top: 8%;
  right: 0;
  width: 82%;
  aspect-ratio: 16 / 10;
}

.about-photo-secondary {
  left: 0;
  bottom: 7%;
  width: 46%;
  aspect-ratio: 4 / 6;
  transform: rotate(-2deg);
}

.about-photo-secondary::before {
  background: var(--blue);
}

.about-photo-primary img {
  object-position: center;
}

.about-photo-secondary img {
  object-position: center;
}

/* Small brand detail behind the image stack */
.about-media-duo::before {
  content: "";
  position: absolute;
  right: 12%;
  bottom: 15%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(247, 216, 223, 0.72);
  z-index: -1;
}

/* Responsive behavior */
@media (max-width: 980px) {
  .about-media-duo {
    min-height: auto;
    display: grid;
    gap: 18px;
  }

  .about-photo {
    position: relative;
    inset: auto;
    width: 100%;
    transform: none;
  }

  .about-photo-primary,
  .about-photo-secondary {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .about-media-duo::before {
    display: none;
  }
}