/* ==========================================================================
   PS70 / Digital Fabrication
   Shares the type, color and nav of the main site (style.css), but set
   quieter: a narrower measure and calmer headings, because these are long
   technical write-ups rather than a landing page.
   ========================================================================== */

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

:root {
  --accent: #059bff;
  --ink: #222;
  --body: #444;
  --muted: #8a949e;
  --rule: #e6e6e6;
  --tint: #f7f7f7;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--body);
  background: #fff;
  padding-top: 0 !important;
  -webkit-font-smoothing: antialiased;
}

/* --------------------------------------------------------------- nav ---- */
/* Matches the main site's scrolled header: white, thin shadow, accent
   wordmark on the left, uppercase links on the right. */

.site-nav {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-nav-inner {
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-logo {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  padding: 18px 0;
  line-height: 1.2;
}

.site-logo:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}

.site-menu li {
  margin-left: 26px;
}

.site-menu a {
  display: block;
  padding: 20px 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #444;
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-menu a:hover,
.site-menu a.is-current {
  color: var(--accent);
  text-decoration: none;
}

/* ----------------------------------------------------------- content ---- */

.textcontainer {
  max-width: 760px;      /* readable measure for long documents */
  margin: 0 auto;
  padding: 60px 24px 90px;
}

.textcontainer img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
}

.textcontainer iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

p { font-size: 17px; }
li { font-size: 17px; }

/* Spacer paragraphs used throughout the write-ups. */
.margin { margin-bottom: 26px; }

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

a:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------- headings ---- */

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 28px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-size: 21px;
  margin: 52px 0 14px;
}

h3 {
  font-size: 17px;
  margin: 36px 0 10px;
  color: var(--ink);
}

h4 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin: 32px 0 10px;
}

/* ---------------------------------------------------------- captions ---- */

.caption {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
  max-width: 600px;
  margin: 10px auto 30px;
}

/* -------------------------------------------------------------- code ---- */

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background-color: var(--tint);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid var(--rule);
}

pre {
  background-color: var(--tint);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 20px 22px;
  border-radius: 4px;
  border: 1px solid var(--rule);
  overflow-x: auto;
  margin: 26px 0;
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
}

/* Reset the inline-pill styling on code INSIDE a pre block.
   white-space: pre is REQUIRED here -- Google Code Prettify (which strapdown
   invokes) checks the computed white-space and collapses indentation if it
   isn't "pre". */
pre code {
  background-color: transparent;
  color: inherit;
  border: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
  white-space: pre;
  tab-size: 4;
  -moz-tab-size: 4;
  display: block;
  font-family: inherit;
}

/* ------------------------------------------------------- week index ----- */
/* Same card treatment as Selected Work on the home page. */

/* Tinted ground so the white cards read as cards. The week write-ups stay
   on white -- they're documents, not a grid. */
body.index-page {
  background: #f2f4f7;
}

.week-index {
  max-width: 1170px;
  margin: 0 auto;
  padding: 60px 24px 90px;
}

.week-intro {
  max-width: 720px;
  margin: 0 auto 60px;
  text-align: center;
}

.week-intro h1 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.4px;
  margin: 0 0 14px;
  padding-bottom: 0;
  border-bottom: none;
}

.week-intro p {
  color: var(--body);
  margin: 0;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.week-tile {
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  text-decoration: none;
}

.week-tile:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.10);
  transform: translateY(-3px);
  text-decoration: none;
}

.week-tile-media {
  display: block;
  width: 100%;
  padding-top: 62%;
  background-color: #e9edf1;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

.week-tile-body {
  display: block;
  padding: 20px 22px 24px;
}

.week-tile-num {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.week-tile-label {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}

/* --------------------------------------------------- prev / next nav ---- */

.week-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 70px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}

.week-nav a {
  display: block;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.week-nav a:hover {
  border-color: #cfd6dd;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  transform: translateY(-2px);
  text-decoration: none;
}

.week-nav-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.week-nav-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}

.week-nav-prev { text-align: left; }
.week-nav-next { text-align: right; }

/* Invisible cell that preserves the grid when only one side has a link */
.week-nav-placeholder { visibility: hidden; }

/* -------------------------------------------------------- responsive --- */

@media (max-width: 767px) {
  body { font-size: 16px; }
  p, li { font-size: 16px; }

  .site-nav-inner {
    justify-content: center;
  }

  .site-logo {
    padding: 14px 0 4px;
  }

  .site-menu li {
    margin: 0 13px;
  }

  .site-menu a {
    padding: 10px 0 14px;
  }

  .textcontainer {
    padding: 40px 20px 70px;
  }

  h1 { font-size: 25px; }
  h2 { font-size: 19px; margin-top: 40px; }

  .week-nav {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------- footer ---- */
/* Matches the main site's footer so the two halves close the same way. */

.site-footer {
  background: #222;
  padding: 22px 0;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.site-footer a {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
}

.site-footer a:hover {
  color: #fff;
  border-bottom-color: #fff;
}
