/* =============================================================================
   TEARDOWN 2026 — "Current State of Open Silicon" slide deck
   Built on the EVEZOR design system color architecture
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. PRIMITIVE PALETTE (from the Evezor design system)
   ----------------------------------------------------------------------------- */
:root {
  --raw-green: #068770;
  --raw-magenta: #d93aa7;

  --raw-comp-2: #da3e5b;
  --raw-comp-4: #4e7971;

  --raw-ds-2: #dc7647;
  --raw-ds-3: #bee36d;
  --raw-ds-4: #3ea9da;

  --raw-split-1: #fef0fa;

  --raw-shade-1: #0b6f5d;
  --raw-shade-2: #105649;
  --raw-shade-3: #12302b;
  --raw-shade-4: #0c1311;

  --raw-mono-1: #36d9bb;

  --raw-neutral-100: #ffffff;
  --raw-neutral-200: #e2e8f0;
  --raw-neutral-300: #d4d4d4;
  --raw-neutral-400: #a0a0a0;
  --raw-neutral-500: #6b6b6b;
  --raw-neutral-600: #484848;
  --raw-neutral-700: #303030;
  --raw-neutral-800: #1a1a1a;
  --raw-neutral-900: #000000;
}

/* -----------------------------------------------------------------------------
   2. FUNCTIONAL TOKENS
   ----------------------------------------------------------------------------- */
:root {
  --bg-main: var(--raw-shade-4);
  --bg-surface: var(--raw-shade-3);
  --bg-element: var(--raw-shade-2);
  --bg-elevated: var(--raw-neutral-600);

  --text-high: var(--raw-split-1);
  --text-main: var(--raw-neutral-300);
  --text-muted: color-mix(in srgb, var(--raw-comp-4), white 25%);

  --brand-primary: var(--raw-green);
  --brand-primary-bright: var(--raw-mono-1);
  --brand-accent: var(--raw-magenta);
  --brand-secondary: var(--raw-ds-4);

  --border-default: var(--raw-green);
  --border-muted: var(--raw-shade-2);

  --font-body: "Segoe UI", Arial, sans-serif;
  --font-mono: "Consolas", "Monaco", "Courier New", monospace;
}

/* -----------------------------------------------------------------------------
   3. BASE / STAGE
   The deck renders on a fixed 1920x1080 stage, scaled to fit the viewport.
   ----------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg-main);
  font-family: var(--font-body);
  color: var(--text-main);
}

#stage-wrap {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

#stage {
  width: 1920px;
  height: 1080px;
  position: relative;
  transform-origin: center center;
  background: var(--bg-main);
}

/* subtle circuit-ish backdrop grid */
#stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(color-mix(in srgb, var(--raw-shade-2), transparent 82%) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--raw-shade-2), transparent 82%) 1px, transparent 1px);
  background-size: 96px 96px;
  pointer-events: none;
}

/* -----------------------------------------------------------------------------
   4. SLIDES
   ----------------------------------------------------------------------------- */
.slide {
  position: absolute;
  inset: 0;
  padding: 90px 110px 110px;
  display: none;
  flex-direction: column;
  opacity: 0;
}

.slide.active {
  display: flex;
  opacity: 1;
  animation: slide-in 0.45s ease both;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateX(28px); }
  to   { opacity: 1; transform: translateX(0); }
}

.slide.active.nav-back { animation-name: slide-in-back; }
@keyframes slide-in-back {
  from { opacity: 0; transform: translateX(-28px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* kicker + titles */
.kicker {
  font-family: var(--font-mono);
  font-size: 26px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--brand-primary-bright);
  margin: 0 0 14px;
}

.kicker::before {
  content: "// ";
  color: var(--brand-accent);
}

.slide h2 {
  font-size: 72px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--text-high);
  margin: 0 0 18px;
}

.slide h2 em {
  font-style: normal;
  color: var(--brand-accent);
}

.title-rule {
  width: 190px;
  height: 6px;
  border: none;
  margin: 0 0 40px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}

.slide-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* -----------------------------------------------------------------------------
   5. LAYOUT HELPERS
   ----------------------------------------------------------------------------- */
.cols {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr); /* bound the row so media can't overflow the slide */
  gap: 70px;
  align-items: center;
}

.cols--40-60 { grid-template-columns: 2fr 3fr; }
.cols--60-40 { grid-template-columns: 3fr 2fr; }
.cols--30-70 { grid-template-columns: 1fr 2.5fr; gap: 56px; }

/* feature gallery: one tall hero figure + a stacked pair */
.gallery--feature {
  grid-template-columns: 1.15fr 1fr;
  grid-template-rows: 1fr 1fr;
}

.gallery--feature > .hero { grid-row: 1 / 3; }

/* media children fill the bounded row; text children stay centered */
.cols > figure.frame,
.cols > .gallery {
  align-self: stretch;
  min-height: 0;
}

/* stacked-figures column helper */
.fill-col {
  align-self: stretch;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.big-text { font-size: 38px; line-height: 1.5; }
.big-text p { margin: 0 0 26px; }

.lead {
  font-size: 42px;
  line-height: 1.45;
  color: var(--text-high);
}

strong { color: var(--brand-primary-bright); font-weight: 600; }
.accent { color: var(--brand-accent); }

.mono {
  font-family: var(--font-mono);
  color: var(--brand-primary-bright);
}

a { color: var(--brand-secondary); text-decoration: none; }

/* credit panel — for image-less project slides */
.credit {
  align-self: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-top: 6px solid var(--brand-accent);
  border-radius: 16px;
  padding: 46px 50px;
}

.credit .credit-label {
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-primary-bright);
  margin: 0 0 14px;
}

.credit .credit-name { font-size: 52px; font-weight: 700; color: var(--text-high); margin: 0; }
.credit .credit-sub { font-size: 30px; color: var(--text-muted); margin: 6px 0 0; }

.credit .credit-links {
  margin-top: 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 25px;
  color: var(--brand-secondary);
  word-break: break-word;
}

.credit .credit-links p { margin: 0; display: flex; align-items: center; gap: 14px; }
.credit .credit-links .tag { display: inline-block; min-width: 40px; color: var(--text-muted); }

/* compact variant: avatar + text side by side */
.credit--compact { display: flex; align-items: center; gap: 30px; padding: 30px 34px; }
.credit--compact .credit-avatar {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  flex: none;
  background: #fff;
  object-fit: cover;
  border: 1px solid var(--border-muted);
}
.credit--compact .credit-name { font-size: 38px; }
.credit--compact .credit-links { margin-top: 18px; font-size: 22px; gap: 12px; }

/* YouTube logo mark */
.yt-logo { flex: none; display: inline-flex; }
.yt-logo svg { height: 26px; width: auto; display: block; }

/* bullet lists */
ul.points {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 36px;
  line-height: 1.4;
}

ul.points li {
  position: relative;
  padding-left: 52px;
  margin-bottom: 24px;
}

ul.points li::before {
  content: "▸";
  position: absolute;
  left: 8px;
  color: var(--brand-accent);
}

ul.points li ul {
  list-style: none;
  padding-left: 10px;
  margin-top: 14px;
  font-size: 32px;
  color: var(--text-muted);
}

ul.points li ul li { padding-left: 44px; margin-bottom: 10px; }
ul.points li ul li::before { content: "–"; color: var(--brand-primary); }

/* compact two-column list */
ul.points--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 50px;
  align-content: start;
}

ul.points--sm { font-size: 30px; }
ul.points--sm li { margin-bottom: 16px; }

/* chip tags (CPU / GPU / ...) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 34px;
}

.chip {
  font-family: var(--font-mono);
  font-size: 30px;
  padding: 12px 30px;
  border-radius: 9999px;
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary-bright);
  background: color-mix(in srgb, var(--brand-primary), transparent 88%);
}

/* -----------------------------------------------------------------------------
   6. FIGURES & GALLERIES
   ----------------------------------------------------------------------------- */
figure.frame {
  margin: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
}

figure.frame img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 8px;
  flex: 1;
}

figure.frame img.contain { object-fit: contain; background: var(--raw-neutral-100); }
figure.frame img.contain--dark { object-fit: contain; background: transparent; }

figure.frame figcaption {
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-muted);
  padding: 12px 6px 2px;
  text-align: center;
}

.gallery {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 30px;
}

.gallery--3 { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr; }
.gallery--2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }

/* full-bleed photo slides */
.slide--photo { padding: 0; }

.slide--photo .photo-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.slide--photo .photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(12, 19, 17, 0.82) 0%,
    rgba(12, 19, 17, 0.10) 40%,
    rgba(12, 19, 17, 0.05) 62%,
    rgba(12, 19, 17, 0.88) 100%);
}

.slide--photo .photo-caption {
  position: absolute;
  left: 110px;
  top: 84px;
  right: 110px;
}

.slide--photo .photo-footer {
  position: absolute;
  left: 110px;
  right: 110px;
  bottom: 70px;
  font-size: 34px;
  color: var(--text-high);
}

/* -----------------------------------------------------------------------------
   7. CARDS (who-am-i, steps)
   ----------------------------------------------------------------------------- */
.cards {
  flex: 0 0 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
  align-items: stretch;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-top: 6px solid var(--brand-primary);
  border-radius: 16px;
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
}

.card--accent { border-top-color: var(--brand-accent); }
.card--secondary { border-top-color: var(--brand-secondary); }

.card .logo {
  height: 120px;
  display: flex;
  align-items: center;
  margin-bottom: 30px;
}

.card .logo img { max-height: 110px; max-width: 100%; object-fit: contain; }

.card h3 {
  font-size: 40px;
  color: var(--text-high);
  margin: 0 0 6px;
}

.card .role {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--brand-primary-bright);
  margin-bottom: 22px;
}

.card p { font-size: 28px; line-height: 1.45; margin: 0; flex: 1; }

.card .url {
  font-family: var(--font-mono);
  font-size: 26px;
  color: var(--brand-accent);
  margin-top: 26px;
}

/* "also" row under the who-am-i cards */
.also-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 36px;
  margin-top: 26px;
}

.also-item {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-muted);
  border-left: 6px solid var(--brand-accent);
  border-radius: 14px;
  padding: 16px 26px;
}

.also-item .also-logo {
  height: 52px;
  max-width: 140px;
  object-fit: contain;
  flex: none;
}

.also-item .also-thumb {
  height: 66px;
  width: 66px;
  object-fit: cover;
  border-radius: 10px;
  flex: none;
}

.also-item .also-text p { font-size: 25px; line-height: 1.3; margin: 0; }

.also-item .also-role {
  font-family: var(--font-mono);
  font-size: 21px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-primary-bright);
  margin-bottom: 4px !important;
}

/* numbered step rows */
.steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-size: 34px;
  line-height: 1.4;
}

.step {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.step .num {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--raw-neutral-100);
  background: var(--brand-primary);
  min-width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.step:nth-child(even) .num { background: var(--brand-accent); }

/* big stat callout */
.stat {
  background: color-mix(in srgb, var(--brand-accent), transparent 86%);
  border: 1px solid color-mix(in srgb, var(--brand-accent), transparent 50%);
  border-radius: 16px;
  padding: 30px 40px;
  margin-top: 40px;
  font-size: 38px;
  color: var(--text-high);
}

.stat .huge {
  font-size: 64px;
  font-weight: 700;
  color: var(--brand-accent);
}

/* -----------------------------------------------------------------------------
   8. TITLE & CTA SLIDES
   ----------------------------------------------------------------------------- */
.slide--title {
  justify-content: center;
  padding: 0 150px;
}

.slide--title .ws-mark {
  position: absolute;
  right: -180px;
  top: 50%;
  transform: translateY(-50%);
  width: 950px;
  opacity: 0.07;
  pointer-events: none;
}

.slide--title h1 {
  font-size: 118px;
  line-height: 1.04;
  color: var(--text-high);
  margin: 30px 0 34px;
  max-width: 1450px;
}

.slide--title h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--brand-primary-bright), var(--brand-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.slide--title .subtitle {
  font-size: 40px;
  line-height: 1.5;
  color: var(--text-main);
  max-width: 1250px;
}

.slide--title .byline {
  margin-top: 70px;
  font-size: 32px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.slide--title .byline strong { color: var(--brand-primary-bright); font-weight: 600; }

/* partner logo row on CTA slides */
.logo-row {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-top: 70px;
}

.logo-row img { height: 82px; }

.logo-row .logo-x {
  font-size: 40px;
  color: var(--text-muted);
}

.logo-row .logo-name {
  font-size: 40px;
  font-weight: 600;
  color: var(--text-high);
  margin-left: -12px;
}

/* section divider slides */
.slide--section { justify-content: center; }

.slide--section h2 { font-size: 110px; max-width: 1500px; }

.slide--section .sub {
  font-size: 44px;
  color: var(--text-main);
  max-width: 1300px;
  line-height: 1.5;
}

/* -----------------------------------------------------------------------------
   9. CHROME: progress bar, counter, footer, help
   ----------------------------------------------------------------------------- */
#progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 7px;
  width: 0;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  transition: width 0.3s ease;
  z-index: 30;
}

#hud {
  position: absolute;
  bottom: 28px;
  right: 44px;
  z-index: 30;
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--text-muted);
  user-select: none;
}

#hud .cur { color: var(--brand-primary-bright); }

#brand-foot {
  position: absolute;
  bottom: 28px;
  left: 44px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 22px;
  color: var(--text-muted);
  user-select: none;
}

#brand-foot img { height: 40px; opacity: 0.6; }
#brand-foot .foot-sep { opacity: 0.4; }
#brand-foot .foot-link {
  color: var(--brand-primary-bright);
  text-decoration: none;
}
#brand-foot .foot-link:hover { text-decoration: underline; }

#help {
  position: absolute;
  inset: auto 44px 90px auto;
  z-index: 40;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  padding: 26px 34px;
  font-size: 24px;
  line-height: 1.9;
  display: none;
}

#help.open { display: block; }
#help kbd {
  font-family: var(--font-mono);
  background: var(--bg-element);
  border: 1px solid var(--border-muted);
  border-radius: 6px;
  padding: 2px 12px;
  margin-right: 10px;
  color: var(--brand-primary-bright);
}

/* -----------------------------------------------------------------------------
   10. OVERVIEW MODE
   ----------------------------------------------------------------------------- */
#stage.overview .slide {
  display: flex !important;
  opacity: 1;
  animation: none;
  transform: scale(0.155);
  transform-origin: top left;
  border: 6px solid var(--border-muted);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

#stage.overview .slide.active { border-color: var(--brand-accent); }
