/* ============================================================
   Teaching Portfolio — Shared Stylesheet
   Self-contained: system fonts only, no external dependencies
   ============================================================ */

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

:root {
  --accent:       #2a6496;
  --accent-light: #d6eaf8;
  --accent-dark:  #1a3f5c;
  --text:         #222;
  --muted:        #555;
  --border:       #dce3ea;
  --bg:           #f7f9fb;
  --white:        #ffffff;
  --nav-width:    220px;
  --radius:       0px;
  --shadow:       0 2px 8px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
}

/* --- Sidebar Navigation ----------------------------------- */
nav {
  position: fixed;
  top: 0; left: 0;
  width: var(--nav-width);
  height: 100vh;
  background: var(--accent-dark);
  color: var(--white);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow-y: auto;
  z-index: 100;
}

.nav-header {
  padding: 28px 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.nav-header .name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.nav-header .title {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}

nav ul {
  list-style: none;
  padding: 16px 0;
  flex: 1;
}

nav ul li a {
  display: block;
  padding: 10px 20px;
  color: rgba(255,255,255,0.82);
  text-decoration: none;
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

nav ul li a:hover,
nav ul li a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  border-left-color: #7ec8e3;
}

nav ul li a .icon {
  margin-right: 8px;
  opacity: 0.75;
}

.nav-footer {
  padding: 16px 20px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* --- Main Content ----------------------------------------- */
main {
  margin-left: var(--nav-width);
  flex: 1;
  padding: 48px 52px;
  max-width: 900px;
}

/* --- Page Hero -------------------------------------------- */
.hero {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  margin-bottom: 36px;
  border-left: 5px solid var(--accent);
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}

.hero .subtitle {
  font-size: 1.05rem;
  color: var(--muted);
}

/* --- Section Cards ---------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 36px;
  margin-bottom: 28px;
}

.card h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

.card p { color: var(--muted); margin-bottom: 12px; }
.card p:last-child { margin-bottom: 0; }

/* --- Lists inside cards ----------------------------------- */
.card ol,
.card ul {
  padding-left: 1.5em;
  color: var(--muted);
  margin-bottom: 12px;
}
.card li { margin-bottom: 4px; }

/* --- Nav Grid (index page) -------------------------------- */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.nav-tile {
  display: block;
  background: var(--accent-light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.15s, transform 0.15s;
}

.nav-tile:hover {
  background: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
}

.nav-tile .tile-icon { font-size: 1.5rem; display: block; margin-bottom: 8px; }

/* --- Table ------------------------------------------------ */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: var(--accent-light); color: var(--accent-dark);
     font-weight: 600; text-align: left; padding: 10px 14px; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
tr:last-child td { border-bottom: none; }

/* --- Pill Tags -------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tag {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 0px;
  padding: 3px 12px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* --- Page-title bar (non-index pages) --------------------- */
.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--accent-light);
}

/* --- Responsive ------------------------------------------- */
@media (max-width: 700px) {
  nav { width: 100%; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; }
  main { margin-left: 0; padding: 24px 18px; }
}
