/* ==========================================================================
   CMPE 789 — Modern Cloud Computing
   Single stylesheet shared by every page. Plain CSS, no build step.
   ========================================================================== */

:root {
  --ink:          #16202c;
  --ink-soft:     #4a5a6b;
  --ink-faint:    #7b8a99;
  --bg:           #ffffff;
  --bg-soft:      #f5f7fa;
  --bg-sunken:    #eef2f7;
  --rule:         #dde4ec;
  --accent:       #f76902;  /* RIT orange */
  --link:         #1263b0;
  --link-hover:   #0d4a85;
  --header-a:     #0e2233;
  --header-b:     #1b3f63;
  --header-ink:   #eaf1f8;
  --header-faint: #9fb6ca;
  --shadow:       0 1px 2px rgba(16, 34, 51, .06), 0 8px 24px rgba(16, 34, 51, .06);
  --radius:       10px;
  --measure:      54rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink:        #e6edf4;
    --ink-soft:   #a9b8c7;
    --ink-faint:  #7f8fa0;
    --bg:         #0f1720;
    --bg-soft:    #151f2b;
    --bg-sunken:  #1a2635;
    --rule:       #26364a;
    --link:       #6cb2f2;
    --link-hover: #9acbf8;
    --shadow:     0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus {
  left: 1rem; top: 1rem; z-index: 10;
  background: var(--accent); color: #fff;
  padding: .5rem .9rem; border-radius: 6px;
}


/* --- Header -------------------------------------------------------------- */

.site-header {
  background:
    radial-gradient(120% 140% at 15% -10%, rgba(247, 105, 2, .28) 0%, rgba(247, 105, 2, 0) 55%),
    linear-gradient(160deg, var(--header-a) 0%, var(--header-b) 100%);
  color: var(--header-ink);
  padding: 3.25rem 0 0;
  border-bottom: 3px solid var(--accent);
}

.eyebrow {
  margin: 0 0 .5rem;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--header-faint);
}

.site-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.site-title a { color: inherit; text-decoration: none; }
.site-title a:hover { color: #fff; }

.site-tagline {
  margin: .85rem 0 0;
  max-width: 46rem;
  color: var(--header-faint);
  font-size: 1.02rem;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: 2rem;
}

.site-nav a {
  display: block;
  padding: .6rem 1.05rem;
  margin-bottom: -3px;
  border-radius: 8px 8px 0 0;
  border-bottom: 3px solid transparent;
  color: var(--header-faint);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
}
.site-nav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.site-nav a.is-current {
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border-bottom-color: var(--accent);
}
.site-nav .nav-right { margin-left: auto; }


/* --- Content ------------------------------------------------------------- */

.page {
  padding-top: 3rem;
  padding-bottom: 4rem;
}
/* For pages built around a wide table. */
.page--wide { max-width: 74rem; }

.page-title {
  margin: 0 0 .35rem;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.page-subtitle {
  margin: 0 0 2rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.page h2 {
  margin: 2.75rem 0 .75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.page h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.page h3 { margin: 2rem 0 .5rem; font-size: 1.12rem; font-weight: 600; }
.page h4 { margin: 1.5rem 0 .4rem; font-size: 1rem; font-weight: 600; color: var(--ink-soft); }

.page p, .page ul, .page ol { margin: 0 0 1rem; }
.page ul, .page ol { padding-left: 1.35rem; }
.page li { margin-bottom: .35rem; }
.page li > ul, .page li > ol { margin-top: .35rem; }

.page hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

.page blockquote {
  margin: 1.5rem 0;
  padding: .75rem 1.25rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink-soft);
}
.page blockquote > :last-child { margin-bottom: 0; }

code, kbd, samp, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.page code {
  background: var(--bg-sunken);
  padding: .12em .38em;
  border-radius: 4px;
  font-size: .88em;
}
.page pre {
  background: var(--bg-sunken);
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: .88rem;
  line-height: 1.55;
}
.page pre code { background: none; padding: 0; font-size: inherit; }


/* --- Tables -------------------------------------------------------------- */

/* Wrap a wide table in <div class="table-scroll"> so it scrolls on its own
   instead of pushing the whole page sideways on small screens. */
.table-scroll {
  overflow-x: auto;
  margin: 1.25rem 0 1.75rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .93rem;
  background: var(--bg);
}
.table-scroll > table { margin: 0; min-width: 46rem; }

thead th {
  background: var(--bg-soft);
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
  padding: .7rem .9rem;
  border-bottom: 2px solid var(--rule);
}

tbody td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg-soft); }

/* Break rows (October break, Thanksgiving, end of instruction). */
tbody tr.is-break td { background: var(--bg-sunken); color: var(--ink-soft); font-style: italic; }
tbody tr.is-break:hover td { background: var(--bg-sunken); }

/* Narrow columns in the schedule table. */
.col-narrow { width: 4.5rem; white-space: nowrap; }


/* --- Reusable blocks ----------------------------------------------------- */

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 2rem;
}

/* Key/value grid — used for the course facts on the home page. */
.factbox {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0 2.5rem;
  box-shadow: var(--shadow);
}
.factbox > div { background: var(--bg); padding: 1rem 1.15rem; }
.factbox dt {
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .2rem;
}
.factbox dd { margin: 0; font-weight: 500; }

/* Linked cards. */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2.5rem;
  padding: 0;
  list-style: none;
}
.card {
  display: block;
  padding: 1.2rem 1.3rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: inherit;
}
.card h3 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 600; }
.card p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.card .arrow { color: var(--accent); font-weight: 700; }

/* Highlighted note. */
.callout {
  padding: 1rem 1.25rem;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.75rem 0;
}
.callout > :last-child { margin-bottom: 0; }


/* --- Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  padding: 2rem 0 2.5rem;
  font-size: .9rem;
  color: var(--ink-soft);
}
.site-footer p { margin: 0 0 .35rem; }
.site-footer .muted { color: var(--ink-faint); }


/* --- Small screens ------------------------------------------------------- */

@media (max-width: 40rem) {
  body { font-size: 16px; }
  .site-header { padding-top: 2.25rem; }
  .site-nav { gap: .2rem; }
  .site-nav a { padding: .5rem .7rem; font-size: .88rem; }
  .site-nav .nav-right { margin-left: 0; }
  .page { padding-top: 2rem; }
}

@media print {
  .site-nav, .skip-link { display: none; }
  .site-header { background: none; color: #000; border-bottom: 2px solid #000; }
  .eyebrow, .site-tagline { color: #444; }
  .table-scroll { overflow: visible; box-shadow: none; }
  .table-scroll > table { min-width: 0; }
  a { color: #000; }
}
