/* ============================================================
   POKY Manual Stylesheet
   University of Colorado Denver — Lee Research Group
   ============================================================ */

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

:root {
  --poky-blue:      #1565C0;
  --poky-blue-dark: #0D47A1;
  --poky-blue-lt:   #E3F2FD;
  --poky-accent:    #FF6F00;
  --poky-gold:      #F9A825;
  --poky-green:     #2E7D32;
  --text-primary:   #212121;
  --text-secondary: #555;
  --text-muted:     #777;
  --border:         #dde3ec;
  --bg-page:        #f7f8fc;
  --bg-card:        #ffffff;
  --bg-code:        #f0f4f8;
  --radius:         8px;
  --shadow:         0 2px 8px rgba(0,0,0,.08);
  --shadow-lg:      0 4px 20px rgba(0,0,0,.12);
  --nav-width:      260px;
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.65;
  min-height: 100vh;
}

/* ── Side Navigation ────────────────────────────────────── */
#sidenav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-width);
  height: 100vh;
  overflow-y: auto;
  background: var(--poky-blue-dark);
  color: #fff;
  padding: 0 0 2rem 0;
  z-index: 200;
  box-shadow: 2px 0 12px rgba(0,0,0,.18);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}

#sidenav::-webkit-scrollbar { width: 4px; }
#sidenav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 4px; }

.sidenav-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  text-decoration: none;
}
.sidenav-logo .logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}
.sidenav-logo .logo-sub {
  font-size: .65rem;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
}

.sidenav-section {
  padding: 1rem 0 .25rem;
}
.sidenav-section-label {
  font-size: .65rem;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: .5rem 1.25rem .25rem;
}

#sidenav a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem 1.25rem;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .88rem;
  border-left: 3px solid transparent;
  transition: all .15s;
}
#sidenav a:hover,
#sidenav a.active {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-left-color: var(--poky-gold);
}
#sidenav a .nav-icon { font-size: 1rem; opacity: .7; }

/* ── Main Content ───────────────────────────────────────── */
#main {
  margin-left: var(--nav-width);
  flex: 1;
  max-width: 900px;
  padding: 2.5rem 3rem 4rem;
  min-width: 0;
}

/* ── Top Header Bar ─────────────────────────────────────── */
.page-topbar {
  background: linear-gradient(135deg, var(--poky-blue) 0%, var(--poky-blue-dark) 100%);
  color: #fff;
  padding: 2rem 3rem;
  margin-left: var(--nav-width);
  margin-bottom: 0;
  border-bottom: 4px solid var(--poky-gold);
}
.page-topbar h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: .25rem;
  color: rgba(255,255,255,1);
}
.page-topbar .subtitle {
  font-size: 1rem;
  color: rgba(255,255,255,.60);
}
.h1-icon {
  width: 1.6rem;
  height: 1.6rem;
  vertical-align: -.3rem;
  margin-right: .3rem;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .6rem 0 1.5rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
.breadcrumb a { color: var(--poky-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; color: var(--text-primary); }

h1 { font-size: 2rem; margin-bottom: 1.25rem; }
h2 {
  font-size: 1.5rem;
  margin: 2.5rem 0 .9rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--poky-blue-lt);
  color: var(--poky-blue-dark);
}
h3 { font-size: 1.15rem; margin: 1.75rem 0 .6rem; color: var(--poky-blue); }
h4 { font-size: 1rem; margin: 1.25rem 0 .4rem; }

p { margin-bottom: 1rem; color: var(--text-secondary); }

a { color: var(--poky-blue); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--poky-blue-dark); }

/* ── Code ───────────────────────────────────────────────── */
code, kbd {
  font-family: 'Roboto Mono', 'Courier New', monospace;
  font-size: .875em;
  background: var(--bg-code);
  padding: .1em .4em;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: #c7254e;
}

pre {
  background: #1e2d40;
  color: #e8edf4;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  font-family: 'Roboto Mono', monospace;
  font-size: .875rem;
  line-height: 1.6;
}
pre code { background: none; border: none; color: inherit; padding: 0; font-size: inherit; }

/* ── Two-letter commands ─────────────────────────────────── */
.cmd {
  display: inline-block;
  font-family: 'Roboto Mono', monospace;
  font-weight: 600;
  background: var(--poky-blue);
  color: #fff;
  padding: .1em .45em;
  border-radius: 4px;
  font-size: .8em;
  letter-spacing: .5px;
}

/* ── Download button ────────────────────────────────────── */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  background: var(--poky-blue);
  color: #fff !important;
  padding: .65em 1.25em;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none !important;
  margin: .75rem 0 1.25rem;
}
.btn-download:hover { background: var(--poky-blue-dark); }

/* ── Cards / Panels ─────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.25rem 0;
  box-shadow: var(--shadow);
}
.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--poky-blue-dark);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-title .icon { font-size: 1.2rem; }
.card-title .icon-img { width: 1.2rem; height: 1.2rem; }

/* ── Alert Boxes ────────────────────────────────────────── */
.alert {
  border-left: 4px solid;
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: .9rem 1.25rem;
  margin: 1rem 0 1.5rem;
  font-size: .92rem;
}
.alert-info    { border-color: var(--poky-blue);   background: #e3f2fd; }
.alert-tip     { border-color: var(--poky-green);  background: #e8f5e9; }
.alert-warning { border-color: var(--poky-accent); background: #fff8e1; }
.alert strong:first-child { display: block; margin-bottom: .25rem; }

/* ── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}
th {
  background: var(--poky-blue-dark);
  color: #fff;
  font-weight: 600;
  padding: .65rem 1rem;
  text-align: left;
}
td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #f7f9fc; }

td .cmd { font-size: .78em; }

/* ── Lists ───────────────────────────────────────────────── */
ul, ol {
  padding-left: 1.5rem;
  margin: .5rem 0 1rem;
  color: var(--text-secondary);
}
li { margin-bottom: .35rem; }

/* ── YouTube Embeds ─────────────────────────────────────── */
.yt-section { margin: 2rem 0; }
.yt-section h3 { margin-bottom: .75rem; }

.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin: 1rem 0;
}
.yt-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.yt-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.yt-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.yt-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}
.yt-thumb-link {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.yt-thumb-link img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.yt-play-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: 1.2rem;
}
.yt-embed-placeholder {
  background: linear-gradient(135deg, #2a2a2a, #444);
}
.yt-embed-placeholder .yt-thumb-link {
  flex-direction: column;
  gap: .5rem;
}
.yt-placeholder-label {
  position: relative;
  z-index: 1;
  font-size: .8rem;
  color: #eee;
}
.yt-card-body {
  padding: .85rem 1rem;
}
.yt-card-title {
  font-size: .92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .25rem;
  line-height: 1.35;
}
.yt-card-desc {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Single full-width embed ────────────────────────────── */
.yt-single {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1rem 0 1.5rem;
  box-shadow: var(--shadow);
}
.yt-single .yt-embed { padding-bottom: 56.25%; }
.yt-single-caption {
  padding: .6rem 1rem;
  font-size: .82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Publication list ────────────────────────────────────── */
.pub-list { list-style: none; padding: 0; }
.pub-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: .85rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.pub-year {
  background: var(--poky-blue);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .25em .55em;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: .15rem;
  flex-shrink: 0;
}
.pub-content {}
.pub-title { font-weight: 600; color: var(--text-primary); margin-bottom: .2rem; font-size: .95rem; }
.pub-authors { font-size: .82rem; color: var(--text-muted); margin-bottom: .2rem; }
.pub-journal { font-size: .82rem; color: var(--poky-green); font-style: italic; }
.pub-links { margin-top: .4rem; }
.pub-links a {
  font-size: .75rem;
  padding: .15em .5em;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-right: .35rem;
  color: var(--poky-blue);
  transition: background .15s;
}
.pub-links a:hover { background: var(--poky-blue-lt); text-decoration: none; }

/* ── Section TOC ─────────────────────────────────────────── */
.toc {
  background: var(--poky-blue-lt);
  border: 1px solid #bbdefb;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  font-size: .92rem;
}
.toc-title { font-weight: 600; margin-bottom: .5rem; color: var(--poky-blue-dark); }
.toc ul { margin: 0; }
.toc li { margin-bottom: .2rem; }
.toc a { color: var(--poky-blue); }

/* ── Footer ─────────────────────────────────────────────── */
#footer {
  margin-left: var(--nav-width);
  background: var(--poky-blue-dark);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 1.25rem;
  font-size: .82rem;
}
#footer a { color: var(--poky-gold); text-decoration: none; }
#footer a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --nav-width: 0; }
  #sidenav { transform: translateX(-260px); transition: transform .25s; }
  #sidenav.open { transform: translateX(0); --nav-width: 260px; }
  #main { padding: 1.5rem; }
  .page-topbar { padding: 1.5rem; }
  .yt-grid { grid-template-columns: 1fr; }
  #hamburger { display: flex; }
}

#hamburger {
  display: none;
  position: fixed;
  top: .75rem; left: .75rem;
  z-index: 300;
  background: var(--poky-blue-dark);
  border: none;
  border-radius: 6px;
  padding: .5rem .65rem;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
}
