/* Portfolio-aligned Reveal.js theme overrides */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --accent: #1772d0;
  --text: #222;
  --text-light: #555;
  --text-muted: #777;
  --bg-soft: #fafafa;
  --slide-width: 94%;
  --slide-body: 0.66em;
  --slide-gap: 1.2em;
  --slide-v-pad: 2.2em;
  --panel-divider: #eee;
  --kw-color: #1a1a1a;
}

/* Scannable keywords — bold terms hiring teams scan for */
.reveal .kw {
  font-weight: 600;
  color: var(--kw-color);
}

.reveal .slide-subtitle {
  text-align: center;
  font-size: 0.58em;
  color: var(--text-muted);
  margin: -0.3em auto 0.6em;
  max-width: 88%;
  line-height: 1.4;
}

.reveal .profile-summary .kw {
  color: var(--accent);
}

.reveal .proposal-list > li > strong {
  color: var(--accent);
  font-weight: 600;
}

.reveal .profile-list li::marker {
  color: var(--accent);
}

.reveal .project-lead {
  font-size: 0.88em;
  line-height: 1.4;
  margin: 0 0 0.45em;
  color: var(--text);
}

.reveal {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 28px;
  color: var(--text);
}

.reveal h1,
.reveal h2,
.reveal h3 {
  font-weight: 600;
  color: var(--text);
  text-transform: none;
  letter-spacing: -0.02em;
}

.reveal h1 {
  font-size: 2.1em;
  margin-bottom: 0.3em;
}

.reveal h2 {
  font-size: 1.45em;
  margin-bottom: 0.55em;
}

.reveal h3 {
  font-size: 1.05em;
  color: var(--accent);
  margin-bottom: 0.35em;
}

/* Shared slide shell — consistent width, type scale, headings */
.reveal .deck-slide {
  text-align: left;
}

.reveal .deck-slide > h2 {
  text-align: center;
  margin-bottom: 0.35em;
  padding-bottom: 0.25em;
  border-bottom: 2px solid var(--panel-divider);
  display: inline-block;
  width: 100%;
}

.reveal .project-facts dt {
  color: var(--accent);
}

.reveal .deck-slide .deck-body {
  max-width: var(--slide-width);
  margin: 0 auto;
  font-size: var(--slide-body);
}

.reveal a {
  color: var(--accent);
}

.reveal .subtitle {
  font-size: 0.72em;
  color: var(--text-light);
  line-height: 1.45;
  max-width: 90%;
  margin: 0.5em auto;
}

.reveal .tagline {
  font-size: 0.65em;
  color: var(--text-light);
  margin-top: -0.3em;
  margin-bottom: 0.8em;
}

.reveal .muted {
  color: var(--text-muted);
}

.reveal .small {
  font-size: 0.72em;
}

.reveal .center {
  text-align: center;
}

.reveal .links {
  margin-top: 1em;
  font-size: 0.75em;
}

.reveal .meta {
  color: var(--text-muted);
}

/* Closing slide */
.reveal .closing-slide {
  text-align: center;
}

/* About Me */
.reveal .about-slide-section {
  text-align: left;
}

.reveal .about-slide {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: var(--slide-gap);
  align-items: start;
  max-width: var(--slide-width);
  margin: 0 auto;
  font-size: var(--slide-body);
}

.reveal .about-photo {
  width: 200px;
  border-radius: 4px;
  display: block;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.1);
}

.reveal .about-name {
  font-size: 1.85em;
  margin: 0 0 0.15em;
  line-height: 1.1;
}

.reveal .about-headline {
  margin: 0 0 0.65em;
  line-height: 1.4;
}

.reveal .about-role {
  display: block;
  font-size: 1.08em;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: -0.01em;
  margin-bottom: 0.45em;
}

.reveal .about-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
}

.reveal .focus-pill {
  font-size: 0.72em;
  font-weight: 500;
  line-height: 1;
  padding: 0.38em 0.7em;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--accent);
  white-space: nowrap;
}

.reveal .about-content .application-line {
  font-size: 0.82em;
  font-style: italic;
  margin: 0 0 0.65em;
}

.reveal .about-content .about-bio {
  font-size: 0.92em;
  line-height: 1.45;
  color: var(--text-light);
  margin: 0 0 0.75em;
}

.reveal .about-content ul.compact {
  margin-bottom: 0.45em;
}

.reveal .about-content ul.compact li {
  margin-bottom: 0.22em;
}

.reveal .about-content .contact-line {
  font-size: 0.78em;
  margin: 0.65em 0 0;
}

.reveal .closing-slide .contact-line {
  font-size: 0.58em;
  margin-top: 1.2em;
}

/* Layout helpers */
.reveal .two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  text-align: left;
  font-size: 0.78em;
}

.reveal .two-col h3 {
  font-size: 0.95em;
  margin-top: 0;
}

.reveal .dense-slide {
  font-size: 0.72em;
}

.reveal .dense-slide h2 {
  margin-bottom: 0.45em;
}

.reveal .dense-slide .two-col h3:not(:first-child) {
  margin-top: 0.65em;
}

.reveal .dense-slide ul.compact li {
  margin-bottom: 0.28em;
}

/* Combined profile slide */
.reveal .profile-slide {
  font-size: var(--slide-body);
}

.reveal .profile-grid {
  display: grid;
  grid-template-columns: 0.54fr 0.46fr;
  gap: var(--slide-gap);
  align-items: start;
  max-width: var(--slide-width);
  margin: 0 auto;
}

.reveal .profile-panel h3 {
  font-size: 1em;
  margin: 0 0 0.35em;
  color: var(--accent);
}

.reveal .profile-fit h3:not(:first-child) {
  margin-top: 0.5em;
}

.reveal .profile-exp td {
  padding: 0.3em 0.5em 0.3em 0;
}

.reveal .profile-exp td.year {
  width: 5.2em;
  min-width: 5.2em;
  font-size: 0.92em;
  padding-right: 0.65em;
}

.reveal .profile-exp td:not(.year) {
  line-height: 1.35;
}

.reveal .profile-exp strong {
  font-size: 0.96em;
}

.reveal .profile-exp .muted {
  font-size: 0.9em;
  line-height: 1.3;
}

.reveal .profile-summary {
  margin: 0.4em 0 0;
  font-size: 0.88em;
  line-height: 1.35;
  padding-top: 0.4em;
  border-top: 1px solid var(--panel-divider);
}

.reveal .profile-list li {
  margin-bottom: 0.2em;
  line-height: 1.32;
  font-size: 0.94em;
}

.reveal .stack-row {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 0.5em;
  align-items: baseline;
}

.reveal .stack-groups {
  display: grid;
  gap: 0.26em;
  margin: 0;
}

/* Slide vertical placement — uniform offset, avoids per-slide centering jumps */
.reveal .slides section {
  height: 100%;
  box-sizing: border-box;
}

.reveal .slides section.deck-slide,
.reveal .slides section.closing-slide {
  padding-top: var(--slide-v-pad);
  padding-bottom: 0.75em;
}

.reveal .stack-row dt {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.92em;
}

.reveal .stack-row dd {
  margin: 0;
  color: var(--text-light);
  line-height: 1.3;
  font-size: 0.92em;
}

.reveal ul.compact {
  margin: 0;
  padding-left: 1.1em;
}

.reveal ul.compact li {
  margin-bottom: 0.35em;
}

.reveal .two-col-list {
  columns: 2;
  column-gap: 2em;
  text-align: left;
  font-size: 0.78em;
}

.reveal .two-col-list li {
  break-inside: avoid;
  margin-bottom: 0.5em;
}

/* Experience table */
.reveal table.exp-table {
  width: 100%;
  font-size: 0.72em;
  border-collapse: collapse;
  margin: 0;
}

.reveal table.exp-table td {
  padding: 0.45em 0.6em;
  vertical-align: top;
  border: none;
}

.reveal table.exp-table td.year {
  width: 18%;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.reveal table.exp-table tr + tr td {
  border-top: 1px solid #eee;
}

/* Project overview list */
.reveal ol.project-list {
  font-size: 0.78em;
  text-align: left;
  display: inline-block;
  margin: 1em auto 0;
}

.reveal ol.project-list li {
  margin-bottom: 0.4em;
}

/* Project slides — unified two-column layout */
.reveal .project-card-slide {
  max-width: var(--slide-width);
  margin: 0 auto;
  font-size: var(--slide-body);
}

.reveal .project-header {
  margin-bottom: 0.5em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid var(--panel-divider);
}

.reveal .project-row {
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  gap: var(--slide-gap);
  align-items: start;
}

.reveal .project-media {
  display: flex;
  gap: 0.45rem;
  min-height: 360px;
  align-items: center;
  justify-content: center;
}

.reveal .project-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55em 0.75em;
  margin-bottom: 0.12em;
}

.reveal .project-header h3 {
  margin: 0;
  font-size: 1.15em;
  color: var(--text);
}

.reveal .project-header .tagline {
  margin: 0;
  font-size: 0.72em;
  color: var(--text-light);
}

.reveal .project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35em;
}

.reveal .project-tags .tag {
  font-size: 0.58em;
  font-weight: 500;
  line-height: 1;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  background: #eef4fb;
  color: var(--accent);
  white-space: nowrap;
}

.reveal .project-row.media-tall {
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  align-items: start;
}

.reveal .project-text .desc {
  font-size: 0.92em;
  line-height: 1.45;
  color: var(--text-light);
  margin: 0 0 0.55em;
}

.reveal .project-highlights {
  margin: 0 0 0.55em;
  padding-left: 1.05em;
}

.reveal .project-highlights li {
  font-size: 0.82em;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 0.22em;
}

.reveal .project-facts {
  display: grid;
  gap: 0.28em;
  margin: 0 0 0.45em;
  font-size: 0.78em;
}

.reveal .project-facts div {
  display: grid;
  grid-template-columns: 4.2em 1fr;
  gap: 0.5em;
  align-items: baseline;
}

.reveal .project-facts dt {
  margin: 0;
  font-weight: 600;
  color: var(--text-muted);
}

.reveal .project-facts dd {
  margin: 0;
  color: var(--text-light);
}

.reveal .project-text .links {
  margin: 0;
  font-size: 0.78em;
}

.reveal .project-text .meta {
  margin: 0.35em 0 0;
}

/* Media blocks with captions */
.reveal .media-figure {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.reveal .project-media.portrait-tall {
  flex-direction: row;
  gap: 0.5rem;
  align-self: stretch;
}

.reveal .project-media.portrait-tall .media-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.reveal .project-media.portrait-tall .media-figure img {
  width: auto;
  max-width: 100%;
  max-height: 360px;
  aspect-ratio: 320 / 569;
  object-fit: contain;
  object-position: center;
}

.reveal .media-figure img,
.reveal .media-figure video {
  width: 100%;
  border-radius: 4px;
  display: block;
  background: #f3f3f3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.reveal .media-figure figcaption {
  margin-top: 0.35em;
  font-size: 0.62em;
  line-height: 1.25;
  color: var(--text-muted);
  text-align: center;
}

/* Portrait pair — medium height (LocoGen real, etc.) */
.reveal .project-media.portrait {
  flex-direction: row;
}

.reveal .project-media.portrait .media-figure img {
  width: 100%;
  max-height: 360px;
  aspect-ratio: 320 / 460;
  object-fit: contain;
  object-position: center;
}

/* Tall portrait — WBC-Mjlab (320×569) */

/* LocoGen — side-by-side sim + hardware (like homepage portrait row) */
.reveal .project-media.locogen-media .media-figure img.locogen-sim {
  width: 100%;
  height: 300px;
  max-height: 360px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

.reveal .project-media.locogen-media .media-figure img.locogen-real {
  width: 100%;
  height: 300px;
  max-height: 360px;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

/* Mixed stack — landscape on top, portrait below (legacy) */
.reveal .project-media.mixed-stack {
  flex-direction: column;
  gap: 0.5rem;
}

.reveal .project-media.mixed-stack .media-figure img.media-landscape {
  width: 100%;
  max-height: 150px;
  aspect-ratio: 480 / 171;
  object-fit: contain;
  object-position: center;
}

.reveal .project-media.mixed-stack .media-figure img.media-portrait {
  width: auto;
  max-width: 70%;
  margin: 0 auto;
  max-height: 200px;
  aspect-ratio: 320 / 460;
  object-fit: contain;
  object-position: center;
}

/* Landscape stack */
.reveal .project-media.landscape {
  flex-direction: column;
}

.reveal .project-media.landscape .media-figure img,
.reveal .project-media.landscape .media-figure video {
  width: 100%;
  max-height: 175px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
}

.reveal .project-media.landscape.single .media-figure video {
  max-height: 340px;
  width: 100%;
  object-fit: contain;
  object-position: center;
}

.reveal .project-row.sber-layout {
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
}

/* Sber media — WBC-style: max-height + contain; row 1 grid, row 2 landscape */
.reveal .project-media.sber-grid {
  flex-direction: column;
  gap: 0.1rem;
  width: 100%;
  min-height: unset;
  align-self: stretch;
  align-items: stretch;
  justify-content: center;
}

.reveal .project-media.sber-grid .media-figure {
  flex: none;
  margin: 0;
}

.reveal .project-media.sber-grid .sber-top {
  display: grid;
  grid-template-columns: 602fr 453fr 506fr;
  column-gap: 0.06rem;
  row-gap: 0;
  width: 100%;
  align-items: start;
}

.reveal .project-media.sber-grid .sber-top .media-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.reveal .project-media.sber-grid .sber-top .media-figure:has(.sber-catch) {
  overflow: hidden;
}

.reveal .project-media.sber-grid .sber-top .media-figure img {
  width: 100%;
  height: 275px;
  object-fit: cover;
  object-position: center center;
}

.reveal .project-media.sber-grid .sber-catch {
  width: calc(100% * 320 / 288);
  margin-left: calc(100% * -32 / 288);
  object-fit: cover;
  object-position: right center;
}

.reveal .project-media.sber-grid .sber-top .media-figure figcaption {
  margin-top: 0.12em;
  line-height: 1.15;
}

.reveal .project-media.sber-grid .sber-wide {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
  line-height: normal;
}

.reveal .project-media.sber-grid .sber-wide img {
  width: 100%;
  height: 168px;
  object-fit: contain;
  object-position: center bottom;
}

.reveal .project-media.sber-grid .sber-wide figcaption {
  margin-top: 0.12em;
  font-size: 0.62em;
  line-height: 1.15;
  text-align: center;
}

/* Open Source slide */
.reveal .opensource-slide .two-col-list {
  max-width: var(--slide-width);
  margin: 0 auto;
  font-size: var(--slide-body);
  column-gap: 2em;
}

.reveal .opensource-slide .two-col-list li {
  margin-bottom: 0.45em;
  line-height: 1.38;
}

/* Motivation & fit slide */
.reveal .motivation-slide {
  font-size: var(--slide-body);
}

.reveal .motivation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--slide-gap);
  max-width: var(--slide-width);
  margin: 0 auto;
  align-items: start;
}

.reveal .motivation-panel h3 {
  font-size: 1em;
  margin: 0 0 0.35em;
  color: var(--accent);
}

.reveal .motivation-panel h3:not(:first-child) {
  margin-top: 0.45em;
}

.reveal .motivation-panel p {
  margin: 0 0 0.4em;
  line-height: 1.35;
  color: var(--text-light);
}

.reveal .motivation-panel ul.compact li {
  margin-bottom: 0.18em;
  line-height: 1.28;
  font-size: 0.92em;
}

.reveal .motivation-note,
.reveal .fit-line {
  margin: 0.4em 0 0;
  font-size: 0.9em;
  line-height: 1.35;
}

.reveal .proposal-list li {
  line-height: 1.35;
}

.reveal .proposal-list a {
  font-weight: 500;
}

/* Legacy media helpers (optional custom slides) */
.reveal .media-row {
  display: flex;
  gap: 0.8em;
  justify-content: center;
  align-items: center;
  margin: 0.6em 0;
}

.reveal .media-row.single {
  max-width: 70%;
  margin-left: auto;
  margin-right: auto;
}

.reveal .media-row img,
.reveal .media-row video {
  max-height: 320px;
  max-width: 48%;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.reveal .media-row.single video {
  max-width: 100%;
}

.reveal .media-grid.sber {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6em;
  max-width: 85%;
  margin: 0 auto;
}

.reveal .media-grid.sber img {
  max-height: 180px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.reveal .media-grid.sber img.wide {
  grid-column: 1 / -1;
  max-height: 200px;
}

/* Publications */
.reveal ul.pub-list {
  text-align: left;
  max-width: 92%;
  margin: 0 auto;
}

.reveal ul.pub-list li {
  margin-bottom: 0.7em;
  line-height: 1.35;
}

.reveal code {
  font-size: 0.85em;
  background: #f4f4f4;
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

/* Progress & navigation */
.reveal .progress {
  height: 3px;
  color: var(--accent);
}

.reveal .controls {
  color: var(--accent);
}

/* Speaker notes indicator */
.reveal aside.notes {
  display: none;
}

@media (max-width: 768px) {
  .reveal .two-col,
  .reveal .two-col-list {
    columns: 1;
    grid-template-columns: 1fr;
  }

  .reveal .about-slide {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .reveal .about-photo {
    width: 180px;
    margin-bottom: 0.5em;
  }

  .reveal .profile-grid {
    grid-template-columns: 1fr;
    gap: 0.9em;
  }

  .reveal .motivation-grid {
    grid-template-columns: 1fr;
    gap: 0.9em;
  }

  .reveal .stack-row {
    grid-template-columns: 1fr;
    gap: 0.1em;
  }

  .reveal .project-row {
    grid-template-columns: 1fr;
    gap: 0.75em;
  }

  .reveal .project-media.portrait-tall .media-figure img {
    max-height: 280px;
  }

  .reveal .project-media.portrait .media-figure img {
    max-height: 220px;
  }

  .reveal .project-media.mixed-stack .media-figure img.media-portrait {
    max-height: 220px;
    max-width: 85%;
  }

  .reveal .project-media.landscape.single .media-figure video {
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  .reveal .project-facts div {
    grid-template-columns: 1fr;
    gap: 0.1em;
  }

  .reveal .media-row {
    flex-direction: column;
  }

  .reveal .media-row img,
  .reveal .media-row video {
    max-width: 90%;
  }
}
