:root {
  --bg: #F2F2F2;
  --card-bg: #F8F8F8;
  --accent: #8FC1E3;
  --accent-dark: #3D7190;
  --accent-hover: #6FAEDB;
  --text: #333333;
  --text-muted: #666666;
  --error: #E8762D;
  --font-sans: 'Lato', sans-serif;
  --font-display: 'Montserrat', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;
}

* {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

.wrapper {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
}

main#MyContent {
  flex: 1 0 auto;
}

footer {
  flex-shrink: 0;
}

/* background */
#particles-js canvas {
  display: block;
  -webkit-transform: scale(1);
  -ms-transform: scale(1);
  transform: scale(1);
  opacity: 1;
  -webkit-transition: opacity .8s ease, -webkit-transform 1.4s ease;
  transition: opacity .8s ease, transform 1.4s ease;
}

#particles-js {
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: -10;
}

/* ==============================
   Nav / header — terminal-prompt feel
   ============================== */

.desktop-container {
  display: none;
}

.topnav {
  overflow: hidden;
  background-color: var(--card-bg);
  border-bottom: 2px solid var(--accent-dark);
}

.topnav #NavButtons {
  display: none;
}

.site-prompt {
  padding: 14px 16px;
  display: inline-block;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
}

.site-prompt .prompt-user {
  color: var(--accent-dark);
}

.site-prompt .prompt-sep {
  color: var(--text-muted);
}

.site-prompt .prompt-cursor {
  color: var(--accent-dark);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

.topnav #NavButtons a {
  color: var(--accent-dark);
  padding: 14px 16px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 15px;
  display: block;
  font-weight: 500;
  cursor: pointer;
}

.topnav #NavButtons a::before {
  content: "[";
  color: var(--text-muted);
}

.topnav #NavButtons a::after {
  content: "]";
  color: var(--text-muted);
}

.topnav a.icon {
  display: block;
  position: absolute;
  right: 0;
  top: 0;
  color: var(--accent-dark);
}

.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.1em;
  color: var(--accent-dark);
  margin-top: 24px;
  margin-bottom: 8px;
  text-align: center;
}

.page-title::before {
  content: "// ";
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--accent);
}

.post {
  margin: 30px;
  padding: 18px;
  background-color: var(--card-bg);
  border: 2px solid var(--accent-dark);
  box-shadow: 6px 6px 0 var(--accent);
  overflow: auto;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post video {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  margin: 12px auto;
  border: 1px solid var(--accent);
}

.post img {
  display: block;
  max-width: 100%;
  max-height: 420px;
  width: auto;
  margin: 12px auto;
  border: 1px solid var(--accent);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post a:has(> img) {
  display: block;
  cursor: zoom-in;
}

.post a:has(> img):hover img {
  transform: scale(1.02);
  box-shadow: 6px 6px 0 var(--accent-hover);
}

.post p {
  margin-bottom: 14px;
  line-height: 1.6;
}

.post p:last-of-type {
  margin-bottom: 0;
}

.post ol,
.post ul:not(.socialLinks):not(.staticCarousel):not(.badges) {
  margin: 0 0 14px 24px;
}

.post pre {
  border: 1px solid var(--accent);
}

/* Course pages — collapsible project sections */
.course-section {
  margin: 0 0 16px;
  border: 2px solid var(--accent-dark);
  background-color: var(--bg);
}

.course-section summary {
  cursor: pointer;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-dark);
  background-color: var(--card-bg);
  list-style: none;
}

.course-section summary::-webkit-details-marker {
  display: none;
}

.course-section summary::before {
  content: "▸ ";
}

.course-section[open] summary::before {
  content: "▾ ";
}

.course-section[open] summary {
  border-bottom: 1px solid var(--accent);
}

.course-section > p {
  margin: 0;
  padding: 10px 14px 0;
  line-height: 1.6;
}

.course-section > p:last-child {
  padding-bottom: 14px;
}

.course-section > p a {
  color: var(--accent-dark);
  font-weight: 600;
}

.field-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
}

.field {
  flex: 1 1 180px;
  min-height: 44px;
  padding: 8px 10px;
  background-color: #ffffff;
  border: 1px solid var(--accent);
}

.field-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

/* ==============================
   Footer — badge row
   ============================== */
footer {
  background-color: var(--card-bg);
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  border-top: 2px solid var(--accent-dark);
  padding: 20px 10px;
}

.footer-line {
  margin-bottom: 8px;
}

.badges {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.badges li a {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--accent-dark);
  color: var(--accent-dark);
  text-decoration: none;
  font-size: 12px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.badges li a:hover {
  background-color: var(--accent-dark);
  color: var(--card-bg);
}

.badges li.badge-stamp a {
  padding: 0;
  border: none;
  line-height: 0;
}

.badges li.badge-stamp img {
  display: block;
  image-rendering: pixelated;
}

.badges li.badge-stamp a:hover {
  background-color: transparent;
  opacity: 0.8;
}

.socialLinks {
  margin: 0 auto;
  margin-top: 15px;
  list-style: none;
  position: relative;
  display: flex;
  justify-content: center;
}

.socialLinks li {
  position: relative;
  list-style: none;
}

.socialLinks li a {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #fff;
  margin: 0 10px;
  text-decoration: none;
  font-size: 20px;
  border: 2px solid var(--accent-dark);
}

.staticCarousel {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.staticCarousel li {
  flex: 0 0 auto;
  margin-right: 20px;
  scroll-snap-align: start;
}

.staticCarousel img {
  width: 200px;
  height: auto;
  border: 2px solid var(--accent-dark);
}

.staticCarousel img:hover {
  transform: scale(1.05);
  transition: 0.3s;
}

/*Contact me Page*/

form#contact-form {
  max-width: 90%;
  margin: 0 auto;
  margin-bottom: 40px;
  padding: 20px;
  background-color: var(--card-bg);
  border: 2px solid var(--accent-dark);
  box-shadow: 6px 6px 0 var(--accent);
}

form#contact-form .form-group {
  margin-bottom: 20px;
}

form#contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  margin-bottom: 5px;
  text-align: center;
}

form#contact-form input[type="text"],
form#contact-form input[type="email"],
form#contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--accent-dark);
  box-sizing: border-box;
  font-size: 16px;
  font-family: var(--font-sans);
  background-color: #ffffff;
}

form#contact-form textarea {
  height: 300px;
  resize: none;
}

form#contact-form button[type="submit"] {
  background-color: var(--accent);
  color: white;
  border: 2px solid var(--accent-dark);
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  display: block;
  margin: 0 auto;
}

form#contact-form button[type="submit"]:hover {
  background-color: var(--accent-hover);
}

.notification {
  display: none;
  background-color: var(--bg);
  color: var(--text);
  padding: 10px 20px;
  border: 1px solid var(--accent-dark);
  margin-bottom: 20px;
  margin-top: 20px;
  text-align: center;
  max-width: 100%;
  font-family: var(--font-mono);
}

.notification.success {
  background-color: var(--accent-hover);
}

.notification.error {
  background-color: var(--error);
}

/* ==============================
   New for the IndieWeb rebuild
   ============================== */

/* Nav active-page state */
.topnav #NavButtons a.nav-active {
  background-color: var(--accent-dark);
  color: var(--card-bg) !important;
  pointer-events: none;
}

.topnav #NavButtons a.nav-active::before,
.topnav #NavButtons a.nav-active::after {
  color: var(--card-bg);
}

nav a.nav-active {
  pointer-events: none;
}

@media only screen and (min-width: 1000px) {
  nav a.nav-active {
    background-color: var(--accent-dark);
    color: var(--card-bg) !important;
  }
  nav a.nav-active::before,
  nav a.nav-active::after {
    color: var(--card-bg) !important;
  }
}

/* Projects grid */
.project-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 30px;
}

.project-card {
  margin: 0;
  cursor: pointer;
}

.project-card:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: 10px 10px 0 var(--accent-hover);
  background-color: #ffffff;
  border-color: var(--accent-hover);
}

.project-card .badge {
  display: inline-block;
  background-color: var(--accent-dark);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 10px;
  margin-bottom: 8px;
}

.project-card .meta {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Blog index — terminal log feel */
.post-list {
  list-style: none;
}

.log-entry h2 {
  margin-bottom: 5px;
}

.log-entry .meta {
  font-family: var(--font-mono);
  color: var(--accent-dark);
  font-size: 12px;
  margin-bottom: 6px;
}

.log-entry .meta::before {
  content: "> ";
}

.log-entry {
  cursor: pointer;
}

.log-entry:hover {
  transform: translate(-3px, -3px) scale(1.02);
  box-shadow: 10px 10px 0 var(--accent-hover);
  background-color: #ffffff;
  border-color: var(--accent-hover);
}

/* About page two-column layout */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 30px;
}

@media only screen and (min-width: 800px) {
  .about-grid {
    grid-template-columns: 3fr 2fr;
    gap: 20px;
  }
}

.about-grid .post {
  margin: 0;
}

/* Retro terminal window (fastfetch-style, site palette) */
.terminal-window {
  padding: 0;
  background-color: var(--card-bg);
  overflow: hidden;
}

.term-titlebar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  background-color: var(--bg);
  border-bottom: 1px solid var(--accent);
}

.term-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.term-dot-red { background-color: var(--error); }
.term-dot-yellow { background-color: var(--accent); }
.term-dot-green { background-color: var(--accent-dark); }

.term-titlebar-label {
  margin-left: auto;
  margin-right: auto;
  transform: translateX(-16px);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.term-body {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
  padding: 16px;
}

.terminal-window .term-line {
  margin-bottom: 4px;
}

.term-prompt {
  color: var(--accent-dark);
  font-weight: 700;
}

.term-tilde {
  color: var(--accent);
  margin-right: 6px;
}

.term-cursor {
  color: var(--text);
  animation: blink 1.1s steps(1) infinite;
}

.fastfetch {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin: 12px 0 16px 0;
}

.fastfetch-info-col {
  flex: 1 1 0;
  min-width: 0;
}

.fastfetch-info {
  font-size: 13px;
}

.terminal-window .fastfetch-header {
  color: var(--accent-dark);
  font-weight: 700;
  margin-bottom: 2px;
}

.terminal-window .fastfetch-rule {
  color: var(--text-muted);
  margin-bottom: 6px;
}

.terminal-window .fastfetch-info p {
  margin-bottom: 6px;
  line-height: 1.5;
  color: var(--text);
}

.fastfetch-info .ff-label {
  color: var(--accent-dark);
  font-weight: 700;
}

.fastfetch-info a {
  color: var(--accent-dark);
  text-decoration: underline dashed;
}

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

.window-body {
  padding: 18px;
}

/* Webmentions */
.webmentions {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px dashed var(--accent);
}

.webmentions h3 {
  font-family: var(--font-mono);
  color: var(--accent-dark);
  margin-bottom: 10px;
}

.webmentions ul {
  list-style: none;
}

.webmentions li {
  margin-bottom: 10px;
}

.webmentions img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}

.post .meta {
  font-family: var(--font-mono);
  color: var(--text-muted);
  font-size: 13px;
}

@media only screen and (min-width: 1000px) {

  .wrapper {
    width: 100%;
  }

  .mobile-container {
    display: none;
  }

  .desktop-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }

  header {
    background-color: var(--card-bg);
    padding: 16px 20px;
    border-bottom: 2px solid var(--accent-dark);
  }

  .site-prompt.desktop-only {
    padding: 0;
  }

  nav {
    height: auto;
  }
  nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0px;
    padding: 0px;
  }

  nav li {
    margin-left: 8px;
  }

  nav a {
    border: none;
    background: none;
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 14px;
    margin: 0;
    color: var(--accent-dark);
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
  }

  nav a::before {
    content: "[";
    color: var(--text-muted);
  }

  nav a::after {
    content: "]";
    color: var(--text-muted);
  }

  nav a.nav-active::before,
  nav a.nav-active::after {
    color: var(--card-bg);
  }

  .socialLinks {
    justify-content: left;
    margin: 0 auto;
    margin-top: 15px;
    padding: 15px;
    list-style: none;
    position: relative;
    display: flex;
  }

  .socialLinks li {
    position: relative;
    list-style: none;
    color: var(--text);
  }

  .socialLinks li a {
    position: relative;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    margin: 0 10px;
    text-decoration: none;
    font-size: 20px;
    border: 2px solid var(--accent-dark);
    color: var(--text);
    transition: 0.2s;
  }

  .socialLinks li a:hover {
    color: #fff;
    background-color: var(--accent-dark);
    transform: translateY(-6px);
  }

  form#contact-form {
    max-width: 30%;
  }

}
