:root {
  --bg: #0e0e10;
  --bg-elev: #1a1a1f;
  --text: #f3f3f5;
  --text-dim: #9a9aa3;
  --accent: #ffce5b;
  --accent-soft: rgba(255, 206, 91, 0.15);
  --border: #2a2a31;
  --radius: 14px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.45;
  overflow-x: hidden;
}

a { color: inherit; }

/* ============ HOME ============ */

.home {
  max-width: 880px;
  margin: 0 auto;
  padding: 64px 24px 96px;
}

.home h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.home .subtitle {
  color: var(--text-dim);
  font-size: 17px;
  margin-bottom: 40px;
}

.proj-list { display: grid; gap: 16px; }

.proj-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s, transform 0.15s;
}

.proj-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.proj-card .pc-title { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.proj-card .pc-meta  { font-size: 14px; color: var(--text-dim); }
.proj-card .pc-arrow { color: var(--text-dim); font-size: 24px; }

/* ============ VIEWER ============ */

.viewer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.viewer-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: var(--text-dim);
}

.viewer-topbar a { text-decoration: none; color: var(--text-dim); }
.viewer-topbar a:hover { color: var(--text); }

.viewer-topbar .title-mid { color: var(--text); font-weight: 500; }

.viewer-topbar .controls { display: flex; gap: 18px; align-items: center; }
.viewer-topbar .controls button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
}
.viewer-topbar .controls button:hover { color: var(--text); border-color: var(--accent); }
.viewer-topbar .controls button.active { color: var(--accent); border-color: var(--accent); }

.viewer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 24px;
}

/* slide */

.slide {
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16 / 9;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.slide .badge {
  position: absolute;
  top: 18px;
  left: 24px;
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.slide .num {
  position: absolute;
  top: 18px;
  right: 24px;
  font-size: 12px;
  color: var(--text-dim);
}

/* layouts */

.slide.layout-title { text-align: center; align-items: center; }
.slide.layout-title h1 { font-size: 88px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.slide.layout-title h2 { font-size: 28px; font-weight: 400; color: var(--text-dim); margin-top: 24px; }

.slide.layout-section { text-align: center; align-items: center; background: linear-gradient(180deg, var(--bg-elev) 0%, #14141a 100%); }
.slide.layout-section .eyebrow { font-size: 14px; color: var(--accent); letter-spacing: 0.2em; margin-bottom: 18px; text-transform: uppercase; }
.slide.layout-section h1 { font-size: 72px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
.slide.layout-section h2 { font-size: 22px; font-weight: 400; color: var(--text-dim); margin-top: 18px; max-width: 720px; }

.slide.layout-bullets h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 32px; }
.slide.layout-bullets ul { list-style: none; }
.slide.layout-bullets li {
  font-size: 30px;
  font-weight: 500;
  padding: 12px 0 12px 36px;
  position: relative;
  line-height: 1.35;
}
.slide.layout-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.slide.layout-text h1 { font-size: 48px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 24px; }
.slide.layout-text p { font-size: 26px; font-weight: 400; color: var(--text); line-height: 1.45; }

.slide.layout-quote { text-align: center; align-items: center; justify-content: center; }
.slide.layout-quote .quote-mark { font-size: 80px; color: var(--accent); line-height: 0.5; margin-bottom: 24px; }
.slide.layout-quote p { font-size: 44px; font-weight: 600; line-height: 1.25; max-width: 880px; letter-spacing: -0.01em; }
.slide.layout-quote .author { font-size: 18px; color: var(--text-dim); margin-top: 32px; }

.slide.layout-pair h1 { font-size: 40px; font-weight: 700; margin-bottom: 28px; letter-spacing: -0.02em; }
.slide.layout-pair .pair-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; flex: 1; align-items: stretch; }
.slide.layout-pair .pair-col {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.slide.layout-pair .pair-col h3 { font-size: 22px; font-weight: 600; color: var(--accent); }
.slide.layout-pair .pair-col p, .slide.layout-pair .pair-col li { font-size: 19px; line-height: 1.4; }
.slide.layout-pair .pair-col ul { list-style: none; padding: 0; }
.slide.layout-pair .pair-col li { padding-left: 16px; position: relative; }
.slide.layout-pair .pair-col li::before { content: "·"; position: absolute; left: 0; color: var(--accent); }

/* notes */

.notes {
  width: 100%;
  max-width: 1100px;
  margin-top: 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.notes-head {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.notes-head:hover { background: rgba(255,255,255,0.03); }

.notes-head .chev { transition: transform 0.2s; }
.notes.open .notes-head .chev { transform: rotate(90deg); }

.notes-body {
  display: none;
  padding: 0 20px 20px;
  font-size: 17px;
  line-height: 1.6;
  color: #ddd;
}
.notes.open .notes-body { display: block; }
.notes-body p { margin-bottom: 10px; }
.notes-body ul { padding-left: 22px; margin-bottom: 10px; }
.notes-body li { margin-bottom: 6px; }
.notes-body strong { color: var(--accent); font-weight: 600; }

/* nav-bar */

.nav-bar {
  width: 100%;
  max-width: 1100px;
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nav-bar button {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 22px;
  font-size: 15px;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
}
.nav-bar button:hover:not(:disabled) { border-color: var(--accent); }
.nav-bar button:disabled { opacity: 0.35; cursor: not-allowed; }
.nav-bar .progress { color: var(--text-dim); font-size: 14px; }

/* slide thumbnails (sidebar) */

.thumbs {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: #07070a;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 12px;
  transform: translateX(-100%);
  transition: transform 0.2s;
  z-index: 20;
}
.thumbs.open { transform: translateX(0); }
.thumbs-item {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-dim);
  cursor: pointer;
  margin-bottom: 4px;
  line-height: 1.3;
  border: 1px solid transparent;
}
.thumbs-item:hover { background: var(--bg-elev); color: var(--text); }
.thumbs-item.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.thumbs-item .ti-num { color: var(--text-dim); font-size: 11px; margin-bottom: 2px; }
.thumbs-item.active .ti-num { color: var(--accent); }

/* fullscreen mode */

body.fullscreen .viewer-topbar,
body.fullscreen .notes,
body.fullscreen .nav-bar { display: none; }
body.fullscreen .viewer-main { padding: 0; min-height: 100vh; justify-content: center; }
body.fullscreen .slide {
  max-width: none;
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* responsive */

@media (max-width: 768px) {
  .slide { padding: 32px 28px; aspect-ratio: auto; min-height: 60vh; }
  .slide.layout-title h1 { font-size: 52px; }
  .slide.layout-title h2 { font-size: 20px; }
  .slide.layout-section h1 { font-size: 44px; }
  .slide.layout-bullets h1, .slide.layout-text h1, .slide.layout-pair h1 { font-size: 32px; }
  .slide.layout-bullets li { font-size: 20px; }
  .slide.layout-text p { font-size: 19px; }
  .slide.layout-quote p { font-size: 28px; }
  .slide.layout-pair .pair-grid { grid-template-columns: 1fr; }
  .home { padding: 32px 16px 64px; }
  .home h1 { font-size: 28px; }
  .thumbs { width: 80vw; }
}

/* small misc */
.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 80px 24px;
}
.error-box {
  background: rgba(255, 80, 80, 0.1);
  border: 1px solid rgba(255, 80, 80, 0.4);
  border-radius: 10px;
  padding: 16px 20px;
  color: #ff9090;
  margin: 24px;
}
