:root {
  --bg-color: #f9f8f6;
  --text-color: #3e3a36;
  --header-bg: #e1e1e1;
  --link-color: #3e3a36;
  --link-hover: #5a5750;
  --overlay-bg: rgba(0, 0, 0, 0.60);
  --footer-bg: #ddd9d3;
  --footer-text: #e3dfda;
  --highlight-color: #f9f8f6;
}

body.dark {
  --bg-color: #0a0a0a;
  --text-color: #e4e2de;
  --header-bg: #1a1a1a;
  --link-color: #a29f99;
  --link-hover: #f9f8f6;
  --overlay-bg: rgba(20, 20, 20, 0.85);
  --footer-bg: #1f1f1f;
  --footer-text: #ddd9d3;
  --highlight-color: #b0aca6;
  --highlight-color2: #000;
}

body {
  margin: 0;
  padding-top: 100px;
  font-family: 'Segoe UI', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  padding: 0.5em 2em;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid var(--link-color);
  z-index: 1000;
}

.typewriter {
  font-family: monospace;
  font-size: 1.2rem;
  color: var(--text-color);
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.typewriter .line {
  display: block;
  font-size: 40px;
}

.top-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-right:10px;
}

.sidebar-toggle {
  font-size: 1.3rem;
  background: none;
  border: none;
  color: var(--link-color);
  cursor: pointer;
  z-index: 1100;
  font-size: 25px;
  margin:0px;
}

.switch {
  width: 50px;
  height: 28px;
  position: relative;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-round {
  position: absolute;
  cursor: pointer;
  background-color: var(--link-color);
  border-radius: 34px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: background-color 0.3s;
}

.slider-round::before {
  content: "";
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: transform 0.3s;
  border-radius: 50%;
}

input:checked + .slider-round {
  background-color: var(--link-color);
}

input:checked + .slider-round::before {
  transform: translateX(22px);
}

.sidebar {
  position: fixed;
  top: 0;
  right: -250px;
  width: 250px;
  height: 100%;
  background-color: var(--header-bg);
  padding-top: 5px;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1.5rem;
  transition: right 0.3s ease;
  z-index: 1001;
}

.sidebar a {
  text-decoration: none;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--link-color);
}

.sidebar a:hover {
  color: var(--link-hover);
}

body.sidebar-open .sidebar {
  right: 0;
}

.close-sidebar {
  align-self: flex-end;
  margin: 10px 1rem 0 0;
  background: none;
  border: none;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  color: var(--link-color);
}

.close-sidebar:hover {
  color: var(--link-hover);
}

.slider-wrapper,
.slider-wrapper-desmos {
  position: relative;
  padding: 0rem 1rem 2rem;
}

.slider-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding: 1rem 2rem;
  align-items: center;
}

.slide {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.image-wrapper {
  height: 500px;
  width: auto;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-wrapper img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
  border: none;
}

.image-wrapper-desmos {
  height: 500px;
  width: 500px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-wrapper-desmos iframe {
  height: 100%;
  width: 100%;
  object-fit: cover;
  border: none;
  display: block;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--overlay-bg);
  opacity: 0;
  transition: opacity 0.3s ease;
  color: var(--highlight-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-weight: 600;
  padding: 1rem;
  backdrop-filter: grayscale(80%);
}

.image-wrapper:hover .overlay,
.image-wrapper-desmos:hover .overlay {
  opacity: 1;
}

.overlay .title {
  font-size: 1.5rem;
  margin: 0;
}

.overlay .description {
  font-size: 1rem;
  margin-top: 0.5rem;
}

.desmos-button-wrapper {
  margin-top: 0.75rem;
  align-self: flex-start;
  padding-left: 0.5rem;
}

.desmos-button,
.welcome-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.4em;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  color: #000;
  background: transparent;
  border: 2px solid #000;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s ease;
}

.desmos-button:hover,
.welcome-button:hover {
  background: var(--link-color);
  color: white;
  border-color: var(--link-color);
}

.desmos-button:active,
.welcome-button:active {
  transform: scale(0.96);
}

body.dark .desmos-button,
body.dark .welcome-button {
  color: var(--footer-text);
  border-color: var(--footer-text);
}

body.dark .desmos-button:hover,
body.dark .welcome-button:hover {
  color: black;
  border-color: var(--footer-text);
}

.spark {
  display: inline-block;
  font-size: 1em;
  transform: translateX(0);
  transition: transform 0.3s ease;
  color: var(--highlight-color);
}

.desmos-button:hover .spark,
.welcome-button:hover .spark {
  transform: translateX(6px);
  color: white;
}

body.dark .desmos-button:hover .spark,
body.dark .welcome-button:hover .spark {
  color: black;
}

.nav-buttons {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none;
}

.nav-buttons button {
  pointer-events: all;
  background: rgba(124, 120, 110, 0.4);
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
}

.nav-buttons button:hover {
  background: rgba(124, 120, 110, 0.6);
}

body.dark .nav-buttons button {
  background: rgba(162, 159, 153, 0.5);
  color: var(--bg-color);
}

body.dark .nav-buttons button:hover {
  background: rgba(162, 159, 153, 0.7);
}

.welcome-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 2rem;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s, color 0.3s;
}

.typewriter-welcome {
  font-family: monospace;
  font-size: 2rem;
  margin-bottom: 3rem;
}

.nav-buttons-welcome {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  justify-content: center;
}

.toggle-container-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1rem;
  font-family: monospace;
  font-size: 0.95rem;
  color: var(--text-color);
}

body {
  margin: 0;
  padding-top: 100px;
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}


h1, h2, h3, h4, h5, h6,
p, a, span, button, label,
.typewriter, .typewriter-welcome,
.welcome-button, .desmos-button,
.sidebar a, .nav-buttons button,
.toggle-container-inline {
  font-family: 'IBM Plex Mono', monospace !important;
}

.nav-buttons-welcome a,
.sidebar a,
.welcome-button {
  position: relative;
  text-decoration: none;
  color: var(--link-color);
}

.nav-buttons-welcome a::after,
.sidebar a::after,
.welcome-button::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--link-color);
  transition: width 0.3s ease;
}

.nav-buttons-welcome a:hover::after,
.sidebar a:hover::after,
.welcome-button:hover::after {
  width: 100%;}

  .intro-text {
  padding-top: 6rem;
  padding-left: 2rem;
  padding-right: 2rem;
  max-width: 800px;
  margin: 10px 0px 0px 30px;
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-color);
}
}

/* Hide scrollbar track and buttons, show only a thin slider thumb */
.slider-container::-webkit-scrollbar {
  height: 6px; /* slim horizontal bar */
}

.slider-container::-webkit-scrollbar-track {
  background: transparent;
}

.slider-container::-webkit-scrollbar-thumb {
  background-color: var(--link-color); /* theme color */
  border-radius: 10px;
  border: none;
}

.slider-container::-webkit-scrollbar-thumb:hover {
  background-color: var(--link-hover);
}

.slider-container {
  scrollbar-color: var(--link-color) transparent;
  scrollbar-width: thin;
}

/* Grid Gallery Styles to match existing CSS */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--bg-color);
}

.grid-item:hover {
  transform: scale(1.03);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  transition: opacity 0.3s ease;
  border-radius: 12px 12px 0 0;
}

.grid-item p {
  text-align: center;
  font-size: 1rem;
  padding: 0.75rem;
  color: var(--text-color);
  background-color: var(--footer-bg);
  border-top: 1px solid var(--link-color);
  margin: 0;
  font-family: 'IBM Plex Mono', monospace;
}

/* Responsive fine-tuning */
@media (max-width: 500px) {
  .gallery {
    padding: 1rem;
    gap: 1rem;
  }
  .grid-item p {
    font-size: 0.9rem;
  }
}


.back-button-wrapper {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
}

.back-button-custom {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.7em 1.4em;
  font-size: 1rem;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-color);
  background: transparent;
  border: 2px solid var(--link-color);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, transform 0.2s ease;
}

.back-button-custom:hover {
  background: var(--link-color);
  color: white;
  border-color: var(--link-color);
}

.back-button-custom:active {
  transform: scale(0.96);
}

body.dark .back-button-custom {
  color: var(--footer-text);
  border-color: var(--footer-text);
}

body.dark .back-button-custom:hover {
  color: black;
  background: var(--footer-text);
}

.back-button-custom .spark {
  display: inline-block;
  transform: translateX(-6px); /* Move arrow slightly left */
  transition: transform 0.3s ease;
  color: var(--text-color);
}

.back-button-custom:hover .spark {
  transform: translateX(-10px); /* On hover, shift arrow more */
  color: white;
}

body.dark .back-button-custom:hover .spark {
  color: black;
}

.site-footer {
  background-color: var(--footer-bg);
  color: var(--link-color);
  padding: 2rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  margin-top: 4rem;
  border-top: 1px solid var(--link-color);
  font-family: 'IBM Plex Mono', monospace;
  transition: background-color 0.3s, color 0.3s;
}

.site-footer p {
  margin: 0.5rem 0;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem; /* nice spacing between links */
  flex-wrap: wrap;
  margin-top: 1rem;
}

.footer-nav a {
  position: relative;
  text-decoration: none;
  color: var(--link-color);
  font-family: 'IBM Plex Mono', monospace;
  transition: color 0.3s;
}

/* Underline animation */
.footer-nav a::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--link-color);
  transition: width 0.3s ease;
}

.footer-nav a:hover::after {
  width: 100%;
}

.footer-nav a:hover {
  color: var(--link-hover);
}


/* 🌙 Dark mode styles */
body.dark .site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  border-top: 1px solid var(--footer-text);
}

body.dark .footer-nav a,
body.dark .back-to-top {
  color: var(--footer-text);
}

body.dark .footer-nav a::after,
body.dark .back-to-top::after {
  background-color: var(--footer-text);
}

body.dark .footer-nav a:hover,
body.dark .back-to-top:hover {
  color: var(--highlight-color);
}

body.dark .footer-nav a:hover::after,
body.dark .back-to-top:hover::after {
  background-color: var(--highlight-color);
}

@media (max-width: 600px) {
  .gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
  }

  .grid-item {
    width: 100%;
    max-width: 90vw;
  }

  .grid-item img {
    width: 100%;
    height: auto;
  }

  .grid-item p {
    font-size: 0.95rem;
    padding: 0.5rem;
  }
}

@media (max-width: 600px) {
  .intro-text {
    margin-top: 1rem; /* pushes text below header */
  }
}

@media (max-width: 600px) {
  /* Turn horizontal slider into vertical column */
  .slider-container {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: visible;
    align-items: center;
    padding: 1rem;
    gap: 2rem;
  }

  .slide {
    width: 90vw;
    max-width: 500px;
    margin: 0 auto;
  }

  .image-wrapper,
  .image-wrapper-desmos {
    width: 100%;
    height: auto;
    max-height: none; /* Let height be determined by image content */
  }

  .image-wrapper img,
  .image-wrapper-desmos iframe {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .nav-buttons {
    display: none; /* Hide slider arrows on mobile */
  }
}

/* Hide by default, show only on mobile */
.back-to-top-mobile {
  display: none;
}

@media (max-width: 600px) {
  .back-to-top-mobile {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    padding: 0.6em 1.2em;
    background-color: var(--link-color);
    color: white;
    border: none;
    border-radius: 999px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    display: inline-block;
    opacity: 0.85;
    transition: background 0.3s, opacity 0.3s;
  }

  .back-to-top-mobile:hover {
    background-color: var(--link-hover);
    opacity: 1;
  }

  body.dark .back-to-top-mobile {
    background-color: var(--footer-text);
    color: black;
  }

  body.dark .back-to-top-mobile:hover {
    background-color: var(--highlight-color);
  }
}

@media (max-width: 600px) {
  .image-wrapper-desmos {
    width: 90vw;         /* almost full screen width */
    height: 90vw;        /* same as width for a perfect square */
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  .image-wrapper-desmos iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* fit inside the square */
    border: none;
    display: block;
  }
}

@media (max-width: 600px) {
  .intro-text {
    padding-left: 1rem;
    padding-right: 1rem;
    font-size: 1rem;
    margin-top: 5rem; /* enough to clear fixed header */
  }
}

@media (max-width: 600px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 1rem;
  }

  .typewriter {
    align-items: flex-start;
    width: 100%;
  }

  .top-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
  }

  .sidebar-toggle {
    font-size: 20px;
    padding: 0.3rem 0.6rem;
  }

  .switch {
    width: 48px;
    height: 26px;
  }

  .slider-round::before {
    width: 20px;
    height: 20px;
    bottom: 3px;
    left: 3px;
  }

  input:checked + .slider-round::before {
    transform: translateX(22px);
  }
}

@media (max-width: 600px) {
  .main-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    gap: 0.5rem;
  }

  .typewriter {
    align-items: flex-start;
    width: 100%;
    min-height: 60px;
  }

  .typewriter .line {
    font-size: 28px; /* smaller header font */
    line-height: 1.2;
  }

  .top-controls {
    display: flex;
    flex-direction: row;
    justify-content: flex-start; /* aligns left */
    align-items: center;
    width: 100%;
    gap: 1rem;
  }

  .sidebar-toggle {
    font-size: 20px;
    padding: 0.3rem 0.6rem;
  }

  .switch {
    width: 48px;
    height: 26px;
  }

  .slider-round::before {
    width: 20px;
    height: 20px;
    bottom: 3px;
    left: 3px;
  }

  input:checked + .slider-round::before {
    transform: translateX(22px);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

form {
  font-family: 'IBM Plex Mono', monospace;
  background-color: var(--bg-color);
  color: var(--text-color);
  max-width: 400px;
  margin: 3rem auto 4rem;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--link-color);
}

form h2 {
  margin-bottom: 1.5rem;
  font-weight: 600;
  font-size: 1.8rem;
  color: var(--text-color);
  text-align: center;
}

form label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

form input[type="text"],
form input[type="email"],
form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1.5px solid var(--link-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s;
  resize: vertical;
  box-sizing: border-box;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
  outline: none;
  border-color: var(--link-hover);
  box-shadow: 0 0 6px var(--link-hover);
}

form button[type="submit"] {
  margin-top: 2rem;
  width: 100%;
  padding: 12px 0;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  background-color: var(--link-color);
  color: var(--highlight-color);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button[type="submit"]:hover {
  background-color: var(--link-hover);
  color: var(--highlight-color);
}

form button[type="submit"]:active {
  transform: scale(0.97);
}


form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  border: 1.5px solid var(--link-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
  appearance: none; /* removes default arrow on some browsers */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 4 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%233e3a36' stroke-width='.75' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px 10px;
}

form select:focus {
  outline: none;
  border-color: var(--link-hover);
  box-shadow: 0 0 6px var(--link-hover);
}

form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 16px;
  border: 1.5px solid var(--link-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;

  /* Remove default arrow on some browsers */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  /* Custom arrow */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 4 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%233e3a36' stroke-width='.75' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px 10px;
}

form select:focus {
  outline: none;
  border-color: var(--link-hover);
  box-shadow: 0 0 6px var(--link-hover);
}


form input[type="tel"],
form input[type="text"],
form input[type="email"],
form textarea,
form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 16px;
  border: 1.5px solid var(--link-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;
}

form input[type="tel"]:focus,
form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--link-hover);
  box-shadow: 0 0 6px var(--link-hover);
}

form select {
  width: 100%;
  padding: 10px 12px;
  margin-top: 6px;
  margin-bottom: 16px;
  border: 1.5px solid var(--link-color);
  border-radius: 8px;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1rem;
  transition: border-color 0.3s;
  box-sizing: border-box;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 4 5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='none' stroke='%233e3a36' stroke-width='.75' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 8px 10px;
}

form select option {
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text-color);
  background-color: var(--bg-color);
}

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  animation: zoom 0.3s ease;
  border-radius: 10px;
}

.caption {
  text-align: center;
  color: white;
  padding: 10px;
  font-size: 1rem;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
}

@keyframes zoom {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.overlay {
  pointer-events: none;
}