@charset "UTF-8";

/* =========================================================================
   Bridget Pivac — Portfolio
   Hand-written design system (replaces the old Bootstrap dump).
   Fresh green accent (from the original site) / serif / pastel character.
   ========================================================================= */

/* ---- Design tokens ---------------------------------------------------- */
:root {
  /* Brand palette */
  --link: rgb(79, 11, 187);     /* purple — all text links */
  --link-hover: #8b5cf6;        /* lighter violet — link hover */
  --accent: #29ff69ba;          /* bright green — decorative accents only */
  --accent-glow: #2bfa78;       /* fluorescent green — borders, never text */
  --accent-strong: #008a35;     /* the brightest green that still clears 4.5:1 on white */
  --border: #ff6667;            /* coral — header/footer double-lines only */
  --ink: #212529;               /* near-black headings */

  /* Text */
  --text: #212529;
  --muted: #666666;

  /* Surfaces */
  --bg-warm: #ffffff;
  --tint-focus: #fbf1f0;   /* soft pink   (original .focus)   */
  --tint-product: #f3fbf0; /* soft green  (original .product) */
  --tint-space: #fff3fc;   /* soft lilac  (original .space)   */

  /* Borders & shadow — coral is reserved for the header/footer double-lines
     (see --border). Card/image separation is done with soft shadow, and the
     rare hairline uses a quiet warm grey. */
  --line: #e7e3de;         /* soft warm-grey hairline */
  --line-strong: #d9d3cc;
  --shadow-card: 0 4px 18px rgba(45, 45, 45, .09);
  --shadow-md: 0 10px 30px rgba(45, 45, 45, .12);

  /* Chat bubbles — incoming neutral grey, outgoing a tint of --link */
  --chat-in: #f6f6f7;
  --chat-out: #efe8ff;

  /* Type */
  --font-serif: "Lora", Georgia, "Times New Roman", serif;
  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --container: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 10px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-glide: cubic-bezier(.76, 0, .24, 1); /* long, symmetric ease-in-out */
}

/* ---- Reset ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg-warm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
video { width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color .2s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Typography ------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .75em;
}

h1 { font-size: 26.6px; font-weight: 500; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); font-weight: 500; }
h4 { font-size: 1.3rem; margin-top: 1.5rem; }
h5 {
  font-size: .82rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: .6rem;
}

p { margin: 0 0 1.15rem; }
p:last-child { margin-bottom: 0; }

/* Inline emphasis labels used throughout case studies ("My role:", etc.) */
p > span:first-child,
span.label { font-weight: 700; color: var(--ink); }

ul, ol { padding-left: 1.2rem; margin: 0 0 1.15rem; color: var(--text); }
li { margin-bottom: .4rem; }

strong { font-weight: 700; color: var(--ink); }

/* ---- Layout primitives ------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container.narrow { max-width: 820px; }
/* Full-bleed: break out of the centered container to span the viewport,
   keeping only the page gutter. For image rows that need to run large. */
.bleed { width: 100%; padding-inline: var(--gutter); }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section.tight { padding-block: clamp(2rem, 4vw, 3rem); }
/* Pulls a section closer to the one above it */
.section.tight-top { padding-top: clamp(1.25rem, 2.5vw, 2rem); }

/* Tinted section variants (kept from the original palette) */
.tint-focus   { background: var(--tint-focus); }
.tint-product { background: var(--tint-product); }
.tint-space   { background: var(--tint-space); }

/* Lightweight 12-column responsive grid */
.row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.row + .row { margin-top: clamp(1.5rem, 3vw, 2.5rem); }

[class*="col-"] { grid-column: span 12; min-width: 0; }

/* Desktop spans */
@media (min-width: 768px) {
  .col-md-3  { grid-column: span 3; }
  .col-md-4  { grid-column: span 4; }
  .col-md-6  { grid-column: span 6; }
}
@media (min-width: 992px) {
  .col-lg-1  { grid-column: span 1; }
  .col-lg-2  { grid-column: span 2; }
  .col-lg-3  { grid-column: span 3; }
  .col-lg-4  { grid-column: span 4; }
  .col-lg-5  { grid-column: span 5; }
  .col-lg-6  { grid-column: span 6; }
  .col-lg-7  { grid-column: span 7; }
  .col-lg-8  { grid-column: span 8; }
  .col-lg-9  { grid-column: span 9; }
  .col-lg-10 { grid-column: span 10; }
  .col-lg-12 { grid-column: span 12; }
}

.text-end { text-align: right; }
.text-center { text-align: center; }

/* Available to screen readers and search engines, invisible on screen */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Media helpers */
.media { border-radius: var(--radius-sm); overflow: hidden; }
.framed {
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow-card);
}
.caption {
  display: block;
  margin-top: .6rem;
  font-size: .92rem;
  color: var(--muted);
}
.caption span { color: var(--ink); font-weight: 600; }

/* Responsive video wrappers */
.ratio { position: relative; width: 100%; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.ratio::before { content: ""; display: block; }
.ratio-16x9::before { padding-top: 56.25%; }
.ratio-4x3::before  { padding-top: 75%; }
.ratio > video,
.ratio > iframe { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---- Header / navigation --------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: saturate(180%) blur(12px);
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  /* Magazine masthead: generous air, weighted above the nav */
  padding-top: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: clamp(1rem, 2vw, 1.5rem);
}
.brand {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  color: var(--link);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand span { color: var(--muted); font-weight: 400; }
.brand:hover { color: var(--link-hover); }

.nav-links { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.nav-links a {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--link);
  position: relative;
  padding-block: .4rem;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav-links a:hover { color: var(--link-hover); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: none; cursor: pointer;
  padding: 0;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 24px; height: 2px;
  background: var(--ink);
  margin-inline: auto;
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav-toggle span::before { transform: translateY(-7px); }
.nav-toggle span::after  { transform: translateY(5px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-2px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
    background: var(--bg-warm);
    border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.25rem;
    box-shadow: var(--shadow-md);
    clip-path: inset(0 0 100% 0);
    opacity: 0;
    pointer-events: none;
    transition: clip-path .3s var(--ease), opacity .2s var(--ease);
  }
  .nav-links.open { clip-path: inset(0 0 0 0); opacity: 1; pointer-events: auto; }
  .nav-links a { width: 100%; font-size: .95rem; padding-block: .6rem; }
}

/* ---- Hero (home) ------------------------------------------------------ */
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero .row { align-items: center; }
.hero h1 { margin-bottom: 1.25rem; }
.hero-lead { font-size: 1.15rem; color: var(--text); max-width: 38ch; }

/* The green frame wraps the whole hero — chat and portrait sit inside it
   as one unit, so the two columns are pulled close together. */
.hero-frame {
  align-items: center;
  gap: clamp(1.5rem, 3vw, 2.25rem);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 22px;
  /* The frame's height is tweened in js as the chat grows; clip so new
     messages are revealed by the border rather than spilling past it. */
  overflow: hidden;
}
/* Once the photo is gone the chat anchors to the top, so an animated
   height grows downward instead of shunting the chat around. */
.hero-frame.is-chatting { align-items: start; }
/* Flush to the start of its column so the gap to the frame matches the
   frame's own padding on every side. Centred only once the columns stack. */
/* min() so the portrait can never grow past its column — a flat 360px
   overflowed the ~268px column on a 360px-wide phone and the frame's
   overflow:hidden sliced the right edge off. */
.hero-photo {
  max-width: min(360px, 100%);
  border-radius: 16px;
}
@media (max-width: 991px) {
  .hero-photo { margin-inline: auto; }
}

/* Once the conversation starts, the portrait leaves the layout — it has
   flown into the chat as an avatar — and the chat takes the full frame,
   centred. The flight itself is a fixed-position clone (see .photo-flight). */
.hero-frame.is-chatting .hero-media { display: none; }
.hero-frame.is-chatting .chat-col { grid-column: 1 / -1; }

.photo-flight {
  position: fixed;
  margin: 0;
  z-index: 60;
  transform-origin: top left;
  will-change: transform;
  /* Eases in and out of the trip rather than braking hard at the end */
  transition: transform 1.2s var(--ease-glide), border-radius 1.2s var(--ease-glide);
}

/* ---- Hero chat -------------------------------------------------------- */
.chat { max-width: 520px; margin-inline: auto; }
.chat.is-moving { transition: transform 1.2s var(--ease-glide); }

.chat-log {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

/* A message is an avatar beside a bubble; the bubble may hold several
   paragraphs. The avatar only appears once the portrait has flown in. */
.msg {
  display: flex;
  align-items: flex-end;
  gap: .55rem;
  max-width: 86%;
  animation: msg-in .28s var(--ease) both;
}
.msg.in { align-self: flex-start; }
.msg.out { align-self: flex-end; }

.avatar {
  display: none;
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}
.is-chatting .avatar { display: block; }

.bubble {
  padding: .7rem 1rem;
  font-size: .97rem;
  line-height: 1.6;
  border-radius: 16px;
}
.bubble p { margin: 0; }
.bubble p + p { margin-top: .7rem; }
.bubble a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
.bubble a:hover { color: var(--link-hover); }

.msg.in .bubble { background: var(--chat-in); border-bottom-left-radius: 5px; }
.msg.out .bubble { background: var(--chat-out); color: var(--ink); border-bottom-right-radius: 5px; }

/* Typing indicator */
.msg.typing .bubble { padding-block: .95rem; }
.msg.typing p { display: flex; gap: 4px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #b3b0ad; animation: blink 1.3s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .18s; }
.msg.typing i:nth-child(3) { animation-delay: .36s; }

.chat-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.25rem;
}
.pill {
  font: inherit;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--link);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: .45rem .95rem;
  cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), opacity .3s var(--ease);
}
.pill:hover:not(:disabled) { color: var(--link-hover); border-color: var(--link-hover); }
.pill:disabled { color: var(--muted); border-color: var(--line); opacity: .45; cursor: default; }

/* Soft-skills / about cards grid */
.skill-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  height: 100%;
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.skill-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.skill-card p { margin: 0; }
.skill-card span { display: block; margin-bottom: .35rem; }

/* ---- Case-study callouts (challenge / takeaway) ---------------------- */
.callout {
  background: #fff;
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  box-shadow: var(--shadow-card);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.callout:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ---- CTA band -------------------------------------------------------- */
.cta-band { text-align: center; }
.cta-band a { display: inline-flex; align-items: center; gap: .5rem; }
.cta-band h2 {
  display: inline-flex; align-items: center; gap: .6rem;
  transition: color .2s var(--ease), gap .25s var(--ease);
}
.cta-band a:hover h2 { color: var(--link-hover); gap: 1rem; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; letter-spacing: .04em;
  color: var(--link);
}
.arrow-link:hover { color: var(--link-hover); gap: .85rem; }

/* ---- Project grid (projects.html + featured) ------------------------- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.25rem);
}
.project-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
  isolation: isolate;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
/* Hover draws a green rule around the whole card rather than washing over
   the artwork. Sits inside the card's clipped corners, so it follows them. */
.project-card .overlay {
  position: absolute;
  inset: 0;
  border: 3px solid var(--accent-glow);
  border-radius: var(--radius);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s var(--ease);
  z-index: 2;
}
.project-card .info {
  padding: 1.25rem 1.5rem 1.5rem;
  color: var(--ink);
}
.project-card .info span {
  display: block;
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; margin-bottom: .35rem;
  color: var(--accent-strong);
}
.project-card .info h3 { color: var(--ink); margin: 0 0 .25rem; font-size: 1.5rem; }
.project-card .info p { margin: 0; font-size: .98rem; }
.project-card:hover img { transform: scale(1.06); }
.project-card:hover .overlay,
.project-card:focus-within .overlay { opacity: 1; }

/* Placeholder card (project page exists but artwork/content not ready) */
.project-card.is-placeholder { background: #fff; }
.project-card .ph-art {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--tint-product), var(--tint-space));
}
.project-card .ph-art .badge {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 700; color: var(--accent-strong);
  border: 1px solid currentColor; border-radius: 999px;
  padding: .35rem .85rem; background: rgba(255, 255, 255, .7);
}

/* ---- Project detail page --------------------------------------------- */
.project-detail .section { padding-block: clamp(2.25rem, 5vw, 4rem); }
.project-detail img.framed { border-radius: var(--radius-sm); }
.project-detail .framed { border: 0; }
/* Images on case-study pages sit flat on the page — no lift. The .callout
   cards keep their shadow. */
.project-detail img { box-shadow: none; }
.project-logo { max-width: 160px; margin-bottom: 1.25rem; }

/* ---- Footer ---------------------------------------------------------- */
.site-footer {
  background: #fff;
  color: var(--link);
  border-top: 4px double var(--border);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  margin-top: clamp(3rem, 6vw, 5rem);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem 2rem;
}
.footer-inner a { color: var(--link); }
.footer-inner a:hover { color: var(--link-hover); }
.back-to-top { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.copyright { margin: .5rem 0 0; color: var(--muted); font-size: .9rem; }
.social { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.social a { display: inline-flex; align-items: center; gap: .45rem; font-size: .95rem; }
.social .icon { font-size: 1.35rem; }

/* ---- Scroll-reveal --------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].in-view { opacity: 1; transform: none; }

/* Staggered reveal — direct children fade up one after another.
   The per-item delay is set inline by script.js (--reveal-delay). */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-stagger].in-view > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-stagger] > * { opacity: 1; transform: none; transition: none; }
}

/* ---- Ambient motion -------------------------------------------------- */
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
}
@keyframes blink {
  0%, 60%, 100% { opacity: .3; }
  30%           { opacity: 1; }
}

/* ---- Icons ------------------------------------------------------------
   Inline SVG, sized in em so each icon tracks the font-size of whatever it
   sits in — exactly how the old icon-font glyphs behaved. Previously these
   came from cdnjs; privacy browsers refused the request as a third party and
   every icon collapsed to nothing. */
.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.125em;
}
.icon.x2 { width: 1.35em; height: 1.35em; }

/* ---- Small screens tweaks -------------------------------------------- */
@media (max-width: 560px) {
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .text-end { text-align: left; }
}
