/* Autumn red is the portfolio-wide primary accent. */
/* Source Sans Pro is hosted locally so previews also work offline. */
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/source-sans-pro-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("assets/fonts/source-sans-pro-bold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/source-sans-pro-italic.woff2") format("woff2");
}

:root {
  --blue: #cc4a39;
  --ink: #212529;
  --muted: #625674;
  --footer: #413e3f;
  --rule: #e3e5ec;
  --accent: #e74c3c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: var(--ink);
  font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
/* Identify inline links by more than color alone. Navigation stays unadorned. */
.home-columns a, .artwork-note a, .page-aside a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 4px;
}
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 .6rem; font-weight: 400; line-height: 1.25; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.15rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li + li { margin-top: .3rem; }
img { max-width: 100%; }
.container { width: calc(100% - 48px); max-width: 1120px; margin-inline: auto; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .9rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 10;
  padding: .5rem 1rem;
  background: #fff;
}
.skip-link:focus { top: 1rem; }
.site-header {
  position: relative;
  z-index: 1;
  background: #fff;
  box-shadow: 0 1px 15px rgb(50 50 93 / 15%);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 54px;
}
.site-title {
  color: var(--blue);
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
}
.site-title:hover { text-decoration: none; }
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 0; }
.nav-list a {
  display: block;
  padding: 10px 15px;
  font-size: 1.1rem;
  white-space: nowrap;
}
.nav-list a:hover, .nav-list a[aria-current="page"] {
  color: #fff;
  background: var(--blue);
  text-decoration: none;
}

/* A real image, not a background with cover: the entire scene stays visible. */
.campus-banner { position: relative; margin: 0; background: #fff; }
.campus-scene { position: relative; background: #e8d9c2; }
.campus-banner a { display: block; }
.campus-banner a:focus-visible { outline-offset: -5px; }
.campus-banner img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 3;
}

/* A light SVG overlay keeps the architecture, easter egg, and downloads static. */
.campus-breeze {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}
.breeze-leaf {
  --flight: 24s;
  --delay: -6s;
  --drift-x: 580px;
  --drift-y: 580px;
  color: #e3ae45;
  opacity: 0;
  animation: leaf-drift var(--flight) linear var(--delay) infinite;
}
.leaf-turn {
  transform-box: fill-box;
  transform-origin: center;
  animation: leaf-turn 7s ease-in-out var(--delay) infinite alternate;
}
.breeze-leaf--two {
  --flight: 29s;
  --delay: -18s;
  --drift-x: 520px;
  --drift-y: 520px;
  color: #cc4a39;
}
.breeze-leaf--three {
  --flight: 22s;
  --delay: -12s;
  --drift-x: 640px;
  --drift-y: 340px;
  color: #d88035;
}
.breeze-leaf--four {
  --flight: 26s;
  --delay: -3s;
  --drift-x: 390px;
  --drift-y: 340px;
  color: #a65b2f;
}
.breeze-leaf--five {
  --flight: 31s;
  --delay: -23s;
  --drift-x: 235px;
  --drift-y: 410px;
  color: #b3472a;
}
@keyframes leaf-drift {
  0% { transform: translate(0, 0); opacity: 0; }
  12% { opacity: .85; }
  30% { transform: translate(calc(var(--drift-x) * .28), calc(var(--drift-y) * .23)); }
  58% { transform: translate(calc(var(--drift-x) * .53), calc(var(--drift-y) * .56)); }
  82% { transform: translate(calc(var(--drift-x) * .87), calc(var(--drift-y) * .77)); opacity: .85; }
  100% { transform: translate(var(--drift-x), var(--drift-y)); opacity: 0; }
}
@keyframes leaf-turn {
  from { transform: rotate(-24deg) scaleX(.8); }
  to { transform: rotate(140deg) scaleX(1); }
}

/* A native checkbox provides keyboard/touch pause without any JavaScript. */
.breeze-toggle {
  position: absolute;
  right: 20px;
  bottom: 20px;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
}
.breeze-control {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid #d0d5e4;
  font-size: .875rem;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
}
.breeze-control::before {
  content: "";
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--muted);
  font-size: 13px;
}
.breeze-control:hover { border-color: var(--blue); }
.breeze-toggle:focus-visible ~ .breeze-control {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.breeze-toggle:checked ~ .breeze-control::before {
  content: "✓";
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.breeze-toggle:checked ~ .campus-scene .breeze-leaf,
.breeze-toggle:checked ~ .campus-scene .leaf-turn { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .campus-breeze, .breeze-toggle, .breeze-control { display: none; }
  .breeze-leaf, .leaf-turn { animation: none; }
}

.artwork-note {
  margin: 28px 0 0;
  text-align: right;
  font-size: .8rem;
  color: var(--muted);
}
.artwork-note a { white-space: nowrap; }
main { flex: 1; }
.home-main { padding: 30px 0 56px; }
.home-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.home-columns h1 { font-size: 1.25rem; }
.home-columns section + section { margin-top: 30px; }
.link-list { list-style: none; padding: 0; }
.link-list li + li { margin-top: .6rem; }
.section-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 56px;
  text-align: center;
}
.section-link { display: block; }
.section-link img { display: block; width: 180px; height: 150px; margin: 0 auto 12px; }
.section-link h2 { color: var(--blue); }
.section-link p { color: var(--muted); font-size: .95rem; }
.section-link:hover { text-decoration: none; }
.section-link:hover h2 { text-decoration: underline; }

/* Interior pages mirror the reference's illustration + uncluttered text layout. */
.page-main { padding: 70px 0 80px; }
.page-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 70px; }
.page-aside { padding-top: 18px; text-align: center; }
.page-aside img { width: 220px; height: 184px; display: block; margin-bottom: 20px; }
.page-aside p { font-size: .95rem; color: var(--muted); }
.page-aside a { display: inline-block; margin-top: 10px; }
.page-heading { margin-bottom: 36px; }
.page-heading h1 { color: var(--blue); }
.lead { font-size: 1.3rem; line-height: 1.5; color: #414156; }
.prose { max-width: 760px; }
.prose section + section { margin-top: 36px; }
.prose a:not(.permalink) { text-decoration: underline; text-underline-offset: 2px; }
.prose h2 { font-size: 1.5rem; }
.prose h3 { font-size: 1.25rem; }
.note { border-left: 2px solid var(--blue); padding-left: 20px; }
.timeline-container {
  margin-top: 20px;
}
.timeline { 
  list-style: none; 
  padding: 0; 
  margin: 0;
}
.timeline-entry {
  position: relative;
  margin: 0 0 48px;
  padding: 28px 0 0 0;
  border-top: 1px solid #e3e5ec;
}
.timeline-entry:first-child {
  border-top: none;
  padding-top: 0;
}
.entry-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.entry-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.entry-date {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.timeline-entry h2 {
  margin: 10px 0 16px;
  color: var(--ink);
  font-size: 1.35rem;
}
.timeline-entry p {
  margin: 0 0 14px;
  color: var(--ink);
  line-height: 1.65;
}
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
}
.tag {
  display: inline-block;
  padding: 5px 11px;
  background: #f1f3f9;
  color: var(--blue);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid #e3e5ec;
}
.blog-post h2 { margin-bottom: 12px; }
.permalink { color: inherit; }
.permalink:hover { color: var(--blue); }

.site-footer { margin-top: auto; background: var(--footer); color: #d5d5e2; }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding-block: 17px; font-size: .9rem; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; column-gap: 22px; row-gap: 8px; }
.site-footer a { color: #d5d5e2; }
.site-footer a:focus-visible { outline-color: #fff; }

@media (max-width: 900px) {
  .page-layout { grid-template-columns: 160px minmax(0, 1fr); gap: 36px; }
  .page-aside img { width: 160px; height: auto; }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 32px); }
  .header-inner { flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 17px; }
  .site-title { font-size: 1.6rem; }
  .site-header nav { width: 100%; }
  .nav-list { justify-content: space-between; }
  .nav-list a { padding: 10px 9px; font-size: 1rem; }
  /* Put the control below the picture on phones, never over the small scene. */
  .breeze-control { position: static; width: max-content; margin: 8px 16px 0 auto; }
  .artwork-note { text-align: left; font-size: .75rem; }
  .home-main { padding-top: 28px; }
  .home-columns { grid-template-columns: 1fr; gap: 30px; }
  .section-links { gap: 18px; margin-top: 36px; }
  .section-link img { height: auto; width: 100%; }
  .section-link h2 { font-size: 1.15rem; }
  .section-link p { display: none; }
  .page-main { padding: 36px 0 48px; }
  .page-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .page-aside { grid-row: 2; padding-top: 24px; border-top: 1px solid var(--rule); }
  .page-aside img { width: 140px; margin: 0 auto 16px; }
  h1 { font-size: 2rem; }
  .footer-inner { flex-direction: column; gap: 12px; }
  .entry-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .timeline-entry h2 {
    font-size: 1.15rem;
  }
  .entry-tags {
    gap: 6px;
  }
  .tag {
    font-size: 0.75rem;
    padding: 4px 9px;
  }
}
@media print {
  .site-header, .site-footer, .section-links, .page-aside, .skip-link,
  .campus-breeze, .breeze-toggle, .breeze-control { display: none; }
  .breeze-leaf, .leaf-turn { animation: none; }
  .page-layout, .home-columns { display: block; }
  .page-main { padding: 0; }
  a { color: inherit; }
}

/* Optional visual walkthrough on project page */
.visual-toggle {
  margin-top: 10px;
  border: 1px solid var(--rule);
  padding: 10px 14px;
  background: #fbfcff;
}
.deck-launch {
  display: inline-block;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid var(--blue);
  color: var(--blue);
  font-weight: 700;
}
.deck-launch:hover { background: #eef2ff; text-decoration: none; }
.visual-figure { margin: 18px 0 28px; }
.visual-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}
.visual-figure figcaption { margin-top: 8px; color: var(--muted); }

/* Code and Prompt Card Styling */
code {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.9em;
  background: #f1f3f9;
  padding: 2px 6px;
  border-radius: 4px;
}
pre {
  font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 0.88rem;
  line-height: 1.5;
  background: #f6f8fd;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  padding: 14px 16px;
  overflow-x: auto;
  border-radius: 4px;
  margin: 12px 0 20px;
  white-space: pre-wrap;
}
.prompt-card {
  margin: 20px 0 28px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.prompt-card h3, .prompt-card h4 {
  margin-top: 0;
  color: var(--blue);
}

/* A readable, self-contained guide; keep the wider talk layout separate. */
.bbpssw-main { max-width: 820px; padding-block: 48px 72px; }
.bbpssw-prose { max-width: none; font-size: 1.08rem; }
.bbpssw-prose h3 { margin-top: 24px; }
.bbpssw-prose section { scroll-margin-top: 24px; }
.bbpssw-prose code { overflow-wrap: anywhere; }
.bbpssw-prose pre code { padding: 0; background: none; }
.bbpssw-prose summary { cursor: pointer; font-weight: 700; }
.bbpssw-prose summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.bbpssw-prose details[open] summary { margin-bottom: 18px; }
.bbpssw-callout, .bbpssw-equations {
  margin-block: 20px;
  padding: 18px 22px;
  border-left: 3px solid var(--blue);
  background: #f6f8fd;
}
.bbpssw-callout p:last-child, .bbpssw-equations p:last-child { margin-bottom: 0; }
.bbpssw-contents { margin-block: 32px; padding: 24px; border: 1px solid var(--rule); }
.bbpssw-contents ol { margin-bottom: 0; }
.bbpssw-steps li + li, .bbpssw-file-guide li + li { margin-top: 16px; }
.bbpssw-results { margin: 20px 0; padding: 20px 24px; background: #f6f8fd; }
.bbpssw-results dt { font-weight: 700; }
.bbpssw-results dd { margin: 4px 0 16px; }
.bbpssw-results dd:last-child { margin-bottom: 0; }
.bbpssw-details { margin-block: 24px; padding: 18px; border: 1px solid var(--rule); }
@media (max-width: 680px) {
  .bbpssw-main { padding-block: 32px 48px; }
  .bbpssw-prose { font-size: 1rem; }
}

/* Full-page Lightning Talk deck */
.deck-main {
  padding: 46px 0 70px;
}
.deck-container {
  width: min(96vw, 1620px);
  margin: 0 auto;
}
.deck-header {
  margin-bottom: 26px;
}
.deck-prose {
  max-width: none;
  font-size: 1.14rem;
}
.deck-prose h2 {
  font-size: 1.65rem;
  margin-top: 30px;
}
.deck-figure {
  margin: 20px 0 34px;
}
.deck-figure img {
  width: min(100%, 1560px);
  margin-inline: auto;
}

@media (max-width: 680px) {
  .deck-main { padding: 28px 0 44px; }
  .deck-prose { font-size: 1rem; }
  .deck-prose h2 { font-size: 1.35rem; }
}

/* Dev-Log Style Layout */
.devlog-main {
  background: #ffffff;
  padding: 60px 0;
}

.devlog-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
  max-width: 1400px;
}

.devlog-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.devlog-nav h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.devlog-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.devlog-nav-list li {
  margin: 0;
}

.devlog-nav-list a {
  display: block;
  padding: 12px 0;
  font-size: 1.05rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  padding-left: 16px;
  transition: all 0.2s ease;
}

.devlog-nav-list a:hover {
  color: #cc4a39;
  border-left-color: #cc4a39;
}

.devlog-nav-list a:active,
.devlog-nav-list a[href*="#entry-"]:target {
  color: #cc4a39;
  border-left-color: #cc4a39;
  font-weight: 700;
}

.devlog-content {
  min-width: 0;
}

.devlog-header {
  margin-bottom: 60px;
}

.devlog-header h1 {
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.2;
  color: #cc4a39;
  margin: 0 0 16px;
}

.devlog-subtitle {
  font-size: 1.5rem;
  color: var(--muted);
  margin: 0 0 12px;
  font-weight: 400;
}

.devlog-description {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.devlog-entries {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.devlog-entry {
  position: relative;
  scroll-margin-top: 120px;
}

.devlog-entry-header {
  margin-bottom: 24px;
}

.devlog-entry-title {
  font-size: 2.8rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.2;
}

.devlog-entry-date {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
  font-weight: 500;
}

.devlog-entry-number {
  position: absolute;
  right: -100px;
  top: 0;
  font-size: 3.5rem;
  font-weight: 400;
  color: #f0f0f0;
  opacity: 0.8;
}

.devlog-entry h3 {
  font-size: 1.8rem;
  font-weight: 400;
  color: #cc4a39;
  margin: 0 0 20px;
  line-height: 1.3;
}

.devlog-entry p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0 0 20px;
}

.devlog-entry p:last-child {
  margin-bottom: 0;
}

.devlog-note {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--rule);
}

.devlog-note h2 {
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--ink);
  margin: 0 0 20px;
}

.devlog-note p {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--muted);
  margin: 0;
}

/* Tags styling */
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 0 !important;
}

.tag {
  display: inline-block;
  padding: 8px 16px;
  background: #fdf5f1;
  color: #cc4a39;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #f0d9d0;
}

/* Mobile responsiveness */
@media (max-width: 1100px) {
  .devlog-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .devlog-sidebar {
    position: relative;
    top: auto;
  }

  .devlog-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--rule);
    margin-bottom: 40px;
  }

  .devlog-nav h2 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .devlog-entry-number {
    position: relative;
    right: auto;
    top: auto;
    font-size: 2rem;
    margin-bottom: 16px;
    opacity: 0.5;
  }

  .devlog-header h1 {
    font-size: 2.5rem;
  }

  .devlog-entry-title {
    font-size: 1.8rem;
  }

  .devlog-entry h3 {
    font-size: 1.4rem;
  }

  .devlog-entry p {
    font-size: 1rem;
  }
}

@media (max-width: 680px) {
  .devlog-main {
    padding: 40px 0;
  }

  .devlog-container {
    gap: 30px;
  }

  .container {
    width: calc(100% - 32px);
  }

  .devlog-nav-list a {
    padding: 10px 0 10px 12px;
    font-size: 0.95rem;
  }

  .devlog-header h1 {
    font-size: 2rem;
  }

  .devlog-header h1 {
    margin-bottom: 12px;
  }

  .devlog-subtitle {
    font-size: 1.2rem;
  }

  .devlog-entry-title {
    font-size: 1.5rem;
  }

  .devlog-entry h3 {
    font-size: 1.2rem;
  }

  .devlog-entry p {
    font-size: 1rem;
    line-height: 1.6;
  }

  .entry-tags {
    gap: 8px;
  }

  .tag {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .devlog-entries {
    gap: 50px;
  }
}
