/* ===========================================================
   Aviv Braun — personal site (matched to live avivbraun.com)
   =========================================================== */
:root {
  --bg: #1b1e29;
  --card: #24262f;
  --card-border: rgba(255,255,255,0.12);
  --pink: #e2498a;
  --salmon: #e16f7c;
  --cream: #f3efd9;
  --text: #d7d9e0;
  --text-dim: #9aa0b4;
  --periwinkle: #8aa0e8;
  --radius: 14px;
  --max: 1150px;
  font-size: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(27,30,41,0.85);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav { display: flex; align-items: center; justify-content: flex-end; height: 68px; gap: 30px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-size: 0.95rem; color: var(--pink); font-weight: 700; }
.nav-links a:hover { color: #fff; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--pink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 60px;
  text-align: center;
  overflow: hidden;
  background-image: url("https://avivbraun.com/wp-content/uploads/2025/02/DALL%C2%B7E-2025-02-28-16.04.08-An-elegant-abstract-background-featuring-fluid-waves-of-color-blending-between-deep-blue-purple-and-neon-pink.-The-design-should-feel-modern-sophi.webp");
  background-size: cover;
  background-position: 50% 0%;
  background-repeat: no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15, 16, 24, 0.6);
  z-index: 0;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 6px;
}
.hero .tagline {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  font-weight: 700;
  color: var(--cream);
  margin: 0 auto 28px;
  max-width: 760px;
  line-height: 1.3;
}
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn { border: 2px dashed rgba(255,255,255,0.4); }
.btn:hover { transform: translateY(-1px); }
.btn-salmon { background: var(--salmon); color: #fff; }
.btn-salmon:hover { background: #a3c0e2; border-color: rgba(232,232,232,0.6); color: #212121; box-shadow: 0 10px 24px -8px rgba(163,192,226,0.55); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.35); }
.btn-outline:hover { background: #a3c0e2; border-color: rgba(232,232,232,0.6); color: #212121; }

/* ---------- Testimonials ---------- */
.testi-viewport { overflow: hidden; position: relative; }
.testi-track {
  display: flex; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px 4px 20px;
  scrollbar-width: none;
}
.testi-track::-webkit-scrollbar { display: none; }
.testi-card {
  scroll-snap-align: start;
  flex: 0 0 calc(50% - 11px);
  min-width: 320px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 34px 36px;
  box-shadow: 0 18px 40px -24px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.testi-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.22); }
.testi-card .quote-mark { color: var(--periwinkle); font-size: 1.8rem; text-align: center; display: block; margin-bottom: 10px; }
.testi-card h3 { text-align: center; font-size: 1.25rem; color: #fff; margin: 0 0 18px; font-weight: 600; }
.testi-card p { text-align: center; color: var(--text); font-size: 0.96rem; margin: 0 0 26px; }
.testi-who { display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.08); }
.testi-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testi-who .name { color: var(--periwinkle); font-weight: 700; font-size: 0.95rem; }
.testi-who .role { color: #fff; font-weight: 600; font-size: 0.82rem; margin: 2px 0 8px; }
.testi-logo { display: block; height: 22px; width: auto; max-width: 120px; object-fit: contain; object-position: left center; }
/* square logo marks (vs. wide wordmarks) read better as a small rounded tile */
.testi-logo.is-square { width: 22px; border-radius: 5px; }
.carousel-controls { display: flex; justify-content: center; gap: 10px; margin-top: 4px; }
.carousel-controls button {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--card-border);
  background: var(--card); color: #fff; cursor: pointer; font-size: 1rem;
}
.carousel-controls button:hover { background: #303341; }

/* ---------- Section shell ---------- */
section { padding: 70px 0; }
.section-title {
  text-align: center; font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  color: var(--cream); font-weight: 600; margin: 0 0 44px;
}

/* ---------- Programs ---------- */
.programs-panel {
  position: relative;
  border: 2px dashed rgba(255,255,255,0.35);
  border-radius: 100px;
  padding: 46px 50px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  background-image: url("https://avivbraun.com/wp-content/uploads/2025/02/fc336455-f688-40c0-a145-625355165747.webp");
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  overflow: hidden;
}
.programs-panel::before {
  content: "";
  position: absolute; inset: 0;
  background: rgba(27,30,41,0.45);
  z-index: 0;
}
.program-col { text-align: center; position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.program-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.program-col h3 { font-size: 1.5rem; color: #fff; margin: 0 0 16px; font-weight: 600; }
.program-col p { color: var(--text); font-size: 0.98rem; margin: 0 0 24px; }
.program-col .btn { margin-top: auto; }

/* ---------- Speaking & Media ---------- */
.speaking-intro { text-align: center; color: var(--text-dim); font-size: 0.98rem; margin: -28px auto 40px; max-width: 560px; }
.speaking-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.speak-card {
  display: block; border-radius: var(--radius); overflow: hidden;
  background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.speak-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.24); }
.speak-card img { width: 100%; height: 260px; object-fit: contain; background: #14151d; }
.speak-meta { padding: 16px 18px 18px; }
.speak-event { color: #fff; font-weight: 700; font-size: 0.96rem; margin-bottom: 8px; line-height: 1.35; }
.speak-date { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-dim); font-size: 0.82rem; font-weight: 600; }
.speak-linkedin { color: var(--periwinkle); font-weight: 700; }
@media (max-width: 980px) { .speaking-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .speaking-grid { grid-template-columns: 1fr; } }

/* ---------- AI Programs ---------- */
/* 5 cards in a 3-up grid leaves an orphan row, so the first card spans two
   columns: row one is [featured][card], row two is three cards. No gaps. */
.ai-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ai-card {
  display: flex; gap: 16px; align-items: flex-start; padding: 26px 24px;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.ai-card-featured { grid-column: span 2; }
.ai-card-featured .ai-icon { font-size: 2.4rem; }
.ai-card-featured .ai-name { font-size: 1.25rem; }
.ai-card-featured .ai-desc { font-size: 0.94rem; max-width: 62ch; }
a.ai-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.24); }
.ai-card-soon { opacity: 0.85; }
.ai-icon { font-size: 1.8rem; flex-shrink: 0; line-height: 1; }
.ai-name { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 8px; }
.ai-desc { color: var(--text); font-size: 0.88rem; line-height: 1.55; margin: 0 0 14px; }
.ai-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 5px 12px; border-radius: 20px; white-space: nowrap; }
.ai-tag-live { background: rgba(138,160,232,0.16); color: var(--periwinkle); }
.ai-tag-soon { background: rgba(255,255,255,0.08); color: var(--text-dim); }
/* 2 columns: featured spans the full first row, then a tidy 2x2 below */
@media (max-width: 980px) { .ai-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-card-featured { grid-column: span 1; }
  .ai-card-featured .ai-icon { font-size: 1.8rem; }
  .ai-card-featured .ai-name { font-size: 1.05rem; }
  .ai-card-featured .ai-desc { font-size: 0.88rem; }
}

/* ---------- Skills ---------- */
.skill-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.skill-card {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 34px 24px;
  text-align: center;
  background: transparent;
}
.skill-card .ico { font-size: 1.8rem; color: #fff; margin-bottom: 18px; }
.skill-card h3 { color: var(--salmon); font-size: 1.15rem; margin: 0 0 10px; font-weight: 600; }
.skill-card p { color: var(--text); font-size: 0.9rem; margin: 0; }

/* ---------- Timeline ---------- */
.timeline-label {
  text-align: center; color: var(--periwinkle); font-size: 0.85rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  margin: 0 0 26px;
}
.timeline-label-volunteer { margin-top: 62px; color: var(--salmon); }
.timeline-row {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 34px 22px;
}
.timeline-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  width: 118px; text-align: center;
}
/* connector segment between adjacent items (desktop only, where the row does not wrap) */
.timeline-item::after {
  content: ""; position: absolute; top: 61px;
  left: calc(50% + 36px); width: 68px; height: 2px;
  background: var(--card-border); z-index: 0;
}
.timeline-item:last-child::after { display: none; }

.timeline-year {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  color: var(--periwinkle); margin-bottom: 8px; line-height: 1.1;
  white-space: nowrap;
}
.timeline-row-volunteer .timeline-year { color: var(--salmon); }

.timeline-logo, .timeline-badge {
  position: relative; z-index: 1;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--card-border);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  box-shadow: 0 10px 24px -16px rgba(0,0,0,0.6);
}
/* LinkedIn company marks are square tiles with their own background, so fill the
   circle rather than floating a small square inside it */
.timeline-logo img { width: 100%; height: 100%; object-fit: cover; }
.timeline-logo-text {
  background: linear-gradient(135deg, #57687f, #8aa0e8); border-color: transparent;
}
.timeline-logo-text span {
  color: #fff; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.01em;
}
.timeline-logo-text b { font-weight: 800; }

/* current / ongoing roles get an accent ring */
.timeline-item.is-current .timeline-logo {
  border-color: var(--periwinkle);
  box-shadow: 0 0 0 3px rgba(138,160,232,0.18), 0 10px 24px -16px rgba(0,0,0,0.6);
}
.timeline-row-volunteer .timeline-item.is-current .timeline-logo {
  border-color: var(--salmon);
  box-shadow: 0 0 0 3px rgba(225,111,124,0.18), 0 10px 24px -16px rgba(0,0,0,0.6);
}

.timeline-title {
  margin-top: 12px; font-size: 0.8rem; font-weight: 700; color: #fff;
  line-height: 1.4;
}
.timeline-title span {
  display: block; margin-top: 2px; font-size: 0.74rem; font-weight: 600;
  color: var(--text-dim);
}
@media (max-width: 1040px) {
  .timeline-item::after { display: none; }
}
@media (max-width: 700px) {
  .timeline-item { width: 104px; }
  .timeline-logo, .timeline-badge { width: 60px; height: 60px; }
  .timeline-year { font-size: 0.68rem; }
}

/* ---------- Portfolio ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: center; margin-bottom: 40px; }
.filter-btn {
  border: none; background: none; padding: 8px 4px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; cursor: pointer; color: var(--text-dim);
}
.filter-btn { transition: color 0.15s ease; }
.filter-btn.active, .filter-btn:hover { color: var(--periwinkle); }

/* ---------- Typewriter (sub-page hero headline) ---------- */
.typewriter::after { content: ""; display: inline-block; width: 2px; height: 0.9em; background: currentColor; margin-left: 4px; vertical-align: -0.1em; animation: tw-blink 0.9s steps(1) infinite; }
@keyframes tw-blink { 50% { opacity: 0; } }
.portfolio-grid {
  column-count: 4; column-gap: 20px;
}
.p-card {
  break-inside: avoid; margin-bottom: 20px;
  border-radius: 10px; overflow: hidden;
  background: var(--card); border: 1px solid var(--card-border);
  display: block;
  transition: transform 0.15s ease;
}
.p-card:hover { transform: translateY(-3px); }
.p-card img { width: 100%; display: block; }
.p-card .p-title { padding: 14px 16px; font-weight: 700; color: #1b1e29; background: #f2f0e6; font-size: 0.95rem; }
@media (max-width: 980px) { .portfolio-grid { column-count: 2; } }
@media (max-width: 560px) { .portfolio-grid { column-count: 1; } }

/* ---------- Posts (LinkedIn) ---------- */
.posts-carousel { max-width: 1080px; margin: 0 auto; }
.posts-controls-top { margin-bottom: 18px; }
.posts-viewport { overflow: hidden; }
.posts-track { display: flex; gap: 20px; transition: transform 0.45s ease; }
.post-slide { flex: 0 0 calc((100% - 40px) / 3); min-width: 0; }
.post-card {
  display: flex; flex-direction: column; height: 100%;
  border-radius: 16px; overflow: hidden; text-decoration: none;
  background: var(--card); border: 1px solid var(--card-border);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.24); }
.post-card img {
  width: 100%; aspect-ratio: 1.25; object-fit: cover; object-position: center;
  background: #14151d; display: block;
}
.post-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-caption {
  color: var(--text); font-size: 0.86rem; line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.post-caption[dir="rtl"] { text-align: right; }
.post-link { color: var(--periwinkle); font-weight: 700; font-size: 0.82rem; margin-top: auto; }
.posts-dots { display: flex; justify-content: center; gap: 8px; margin-top: 22px; }
.posts-dot {
  width: 9px; height: 9px; border-radius: 50%; border: none; padding: 0;
  background: rgba(255,255,255,0.22); cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.posts-dot.active { background: var(--periwinkle); transform: scale(1.15); }
@media (max-width: 900px) {
  .post-slide { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (max-width: 620px) {
  .post-slide { flex: 0 0 100%; }
}

/* ---------- Connect ---------- */
.connect-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.connect-left h3 { color: #fff; font-size: 1.4rem; margin: 0 0 24px; font-weight: 600; }
.connect-btn {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  border: 1.5px solid #fff; border-radius: 10px; color: #fff;
  padding: 16px 20px; font-weight: 700; letter-spacing: 0.03em;
  margin-bottom: 18px; font-size: 0.95rem;
}
.connect-btn { transition: background 0.2s ease, transform 0.15s ease, color 0.2s ease; }
.connect-btn:hover { background: var(--periwinkle); border-color: var(--periwinkle); color: #1b1e29; transform: translateY(-1px); }
.connect-embed { border-radius: 14px; overflow: hidden; background: #fff; min-height: 480px; }
.schedule-label { background: linear-gradient(135deg, #57687f, #b9c6d6); color: #fff; margin: 0; padding: 18px 24px; font-size: 1.3rem; font-weight: 600; }
.connect-embed iframe { width: 100%; height: 640px; border: none; display: block; }
@media (max-width: 860px) { .connect-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
footer.site { border-top: 1px solid rgba(255,255,255,0.08); padding: 30px 0; text-align: center; color: var(--text-dim); font-size: 0.85rem; }

/* ---------- Sub-page shared ---------- */
.page-hero { padding: 70px 0 50px; text-align: center; }
.page-hero .eyebrow { font-size: 1.05rem; margin-bottom: 18px; display: block; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0 0 20px; font-weight: 800; }
.page-hero p { max-width: 680px; margin: 0 auto; font-size: 1.05rem; font-weight: 600; }

/* Event / cohort card grids (used on sub-pages) */
.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.media-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px -18px rgba(0,0,0,0.3); }
.media-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.media-card .media-card-body { padding: 20px 24px 24px; }
.media-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.media-card p { margin: 0; font-size: 0.92rem; opacity: 0.85; }
.media-card .stat-row { display: flex; gap: 20px; align-items: center; padding: 16px 24px 0; font-size: 0.85rem; opacity: 0.75; }
.media-card .card-label { padding: 4px 24px 0; font-size: 1.15rem; font-weight: 700; }
.media-card .card-cta { margin: 14px 24px 20px; }

/* Two-column photo + text (Why sections) */
.split-photo { display: grid; grid-template-columns: 1fr 1.2fr; gap: 44px; align-items: center; }
.split-photo img { width: 100%; border-radius: 16px; display: block; }
.split-photo h2 { font-size: clamp(1.6rem,3vw,2.2rem); margin: 0 0 18px; font-weight: 800; line-height: 1.25; }
.split-photo p { margin: 0 0 14px; font-size: 0.98rem; }
.split-photo--stack { align-items: start; }
.photo-stack { display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 860px) { .split-photo { grid-template-columns: 1fr; } .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; } }

/* Cohort cards (PMM101 previous programs): show full flyer uncropped, no forced 16:9 */
.cohort-card img { aspect-ratio: auto; height: auto; object-fit: contain; background: #f3f1ea; }

/* Pastel icon cards (PMM101 curriculum) */
.pastel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pastel-card { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 16px; font-weight: 700; }
.pastel-card img { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: rgba(0,0,0,0.15); padding: 8px; box-sizing: border-box; }
@media (max-width: 900px) { .pastel-grid { grid-template-columns: 1fr; } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .programs-panel { grid-template-columns: 1fr; }
  .skill-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-card { flex-basis: 100%; }
}
@media (max-width: 700px) {
  .nav-links {
    position: fixed; top: 68px; left: 0; right: 0; background: var(--bg);
    flex-direction: column; padding: 20px 24px; border-bottom: 1px solid rgba(255,255,255,0.08);
    display: none; gap: 18px; align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav { justify-content: space-between; }
  .skill-grid { grid-template-columns: 1fr; }
}
