/* --- Base Body and Typography --- */
body {
  background-color: #fff;
  padding: 50px;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  color: #595959;
  font-weight: 400;
  margin: 0;
}

/* --- Sidebar Navigation --- */
#sidebar-placeholder {
  margin-bottom: 30px;
}

#sidebar-placeholder a {
  margin-top: 30px;
}

#main-menu {
  text-align: center;
  padding: 20px 0;
}

#main-menu a {
  display: inline-block;
  margin: 0 10px;
  text-decoration: none;
  font-weight: bold;
  color: #333;
  padding-top: 20px;
}

#main-menu a:hover {
  text-decoration: underline;
}

/* --- Category Title (for PDF/badge headings) --- */
.category-title {
  text-align: center;
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1.6em;
  font-weight: 600;
}

.year-heading {
  text-align: center;
  font-size: 1.5em;
  margin: 2em 0 1em 0;
  position: relative;
}


.year-separator {
  width: 2px;
  height: 2em;
  background: #aaa;
  margin: 0 auto;
  display: block;
}


/* --- PDF/Badge Grid Layout --- */
#pdf-container {
  padding-bottom: 100px;
}

.thumbnail-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  justify-items: center;
  margin-bottom: 40px;
  padding: 0 10px;
}

.thumbnail {
  text-align: center;
  max-width: 160px;
}

.thumbnail img,
.thumbnail canvas {
  display: block;
  margin: 0 auto 10px auto;
  width: 100%;
  height: auto;
  max-width: 150px; /* limits them to a reasonable size on large screens */
  transition: transform 0.2s ease;
  /* removed: border, box-shadow, border-radius, aspect-ratio, object-fit */
}

.thumbnail:hover img,
.thumbnail:hover canvas {
  transform: scale(1.03); /* slight optional polish */
}


.thumbnail span,
.thumbnail a {
  display: block;
  font-size: 0.9em;
  color: #333;
  text-decoration: none;
  word-wrap: break-word;
  max-width: 100%;
  white-space: normal;
}

/* --- Layout --- */
.wrapper {
  width: 80%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

header {
  width: 270px;
  float: left;
  position: fixed;
  text-align: center;
  -webkit-font-smoothing: subpixel-antialiased;
}

#back-arrow {
  width: 100%;
  padding-left: 20%;
  text-align: left;
}

section {
  width: 70%;
  float: right;
  padding-bottom: 50px;
}

footer {
  width: 270px;
  position: fixed;
  margin-top: 100px;
  text-align: center;
  bottom: 50px;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* --- Headings and Text --- */
h1, h2, h3, h4, h5, h6 {
  color: #222;
  margin: 0 0 20px;
  line-height: 1.1;
  font-weight: 500;
}

h1 {
  font-size: 28px;
}

h2 {
  color: #393939;
}

h3, h4, h5, h6 {
  color: #494949;
}

p, ul, ol, table, pre, dl {
  margin: 0 0 20px;
}

a {
  color: #39c;
  text-decoration: none;
}

a:hover {
  color: #069;
}

a small {
  font-size: 11px;
  color: #777;
  margin-top: -0.3em;
  display: block;
}

a:hover small {
  color: #777;
}

strong {
  color: #222;
  font-weight: 500;
}

/* --- Lists and Tables --- */
blockquote {
  border-left: 1px solid #e5e5e5;
  margin: 0;
  padding: 0 0 0 20px;
  font-style: italic;
}

code, pre {
  font-family: Monaco, Consolas, "Liberation Mono", monospace;
  color: #333;
}

pre {
  padding: 8px 15px;
  background: #f8f8f8;
  border-radius: 5px;
  border: 1px solid #e5e5e5;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 10px;
}

th {
  color: #444;
}

dt {
  color: #444;
  font-weight: 500;
}

/* --- Sidebar Tabs --- */
header ul {
  list-style: none;
  height: 40px;
  padding: 0;
  background: #f4f4f4;
  border-radius: 5px;
  border: 1px solid #e0e0e0;
  width: 250px;
  margin: 0 auto;
}

header li {
  width: 89px;
  float: left;
  border-right: 1px solid #e0e0e0;
  height: 40px;
}

header li:first-child a {
  border-radius: 5px 0 0 5px;
}

header li:last-child a {
  border-radius: 0 5px 5px 0;
}

header ul a {
  line-height: 1;
  font-size: 11px;
  color: #999;
  display: block;
  text-align: center;
  padding-top: 6px;
  height: 34px;
}

summary {
  cursor: pointer;
}

header ul a:hover {
  color: #999;
}

header ul a:active {
  background-color: #f0f0f0;
}

header ul li + li + li {
  border-right: none;
  width: 89px;
}

header ul a strong {
  font-size: 14px;
  display: block;
  color: #222;
}

/* --- Project / Portfolio Grid Layout --- */
.project-grid,
.thumbnail-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 30px;
  justify-items: center;
  padding: 20px 5%;
  max-width: 650px; 
  margin: 0 auto;
}

.project-card,
.thumbnail {
  text-align: center;
  max-width: 200px;
}

.project-card i,
.thumbnail img {
  font-size: 140px;
  max-width: 100%;
  height: auto;
}

.project-card .label,
.thumbnail span {
  display: block;
  margin-top: 12px;
  font-weight: bold;
  font-size: 15px;
  color: #222;
}

.coming-soon i {
  font-size: 80px;
  color: #999;
}

.coming-soon .label {
  font-size: 14px;
  color: #555;
}

/* --- Misc --- */
#social-buttons {
  margin: 0 0 10px 10px;
}

#project-table {
  text-align: center;
}

#container {
  padding-top: 50px;
  border-top: 1px;
}

hr {
  border: 0;
  background: #e5e5e5;
  height: 1px;
  margin: 0 0 20px;
}

img {
  max-width: 100%;
}

#blog-posts summary {
  padding-top: 20px;
  font-weight: bold;
}

.qr-icon-container {
  display: none; /* hidden by default */
  text-align: center;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .qr-icon-container {
    display: block;
  }
}

/* --- Fullscreen QR Overlay --- */
#qr-overlay {
  display: none; /* hidden initially */
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#qr-content {
  position: relative;
  text-align: center;
}

#qr-image {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* --- Close Button --- */
#qr-close {
  position: absolute;
  top: -10px;
  right: -10px;
  font-size: 40px;
  color: white;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  padding: 0 12px;
  border-radius: 50%;
  line-height: 1;
  font-weight: bold;
}

@media (max-width: 768px) {
  .scripts-icon-container {
    display: none;
  }
}

/* --- Responsive Tweaks --- */
@media print, screen and (max-width: 960px) {
  div.wrapper {
    width: auto;
    margin: 0;
  }

  header, section, footer {
    float: none;
    position: static;
    width: auto;
  }

  header {
    padding: 0;
  }

  section {
    border: 1px solid #e5e5e5;
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 50px 20px;
  }

  header ul {
    position: absolute;
    right: 50px;
    top: 52px;
  }
}

@media print, screen and (max-height: 660px) {
  div.wrapper {
    width: auto;
    margin: 0;
  }

  header, section, footer {
    float: none;
    position: static;
    width: auto;
  }

  header {
    padding: 0;
  }

  section {
    border: 1px solid #e5e5e5;
    border-width: 1px 0;
    padding: 20px 0;
    margin: 0 50px 20px;
  }

  header ul {
    position: absolute;
    right: 50px;
    top: 52px;
  }
}

@media print, screen and (max-width: 720px) {
  body {
    word-wrap: break-word;
  }

  header {
    padding: 0;
  }

  header ul, header p.view {
    position: static;
  }

  pre, code {
    word-wrap: normal;
  }
}

@media print, screen and (max-width: 600px) {
  .thumbnail {
    width: 120px;
  }
}

@media print, screen and (max-width: 480px) {
  body {
    padding: 15px;
  }

  header ul {
    width: 99%;
  }

  header li, header ul li + li + li {
    width: 33%;
  }

  .thumbnail {
    width: 100px;
  }
}

@media print {
  body {
    padding: 0.4in;
    font-size: 12pt;
    color: #444;
  }
}
