:root {
  --bg-light: #f4f4f4;
  --text-light: #111;
  --bg-dark: #1e1e1e;
  --text-dark: #eaeaea;
  --accent: #888;
}

body {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
  background-color: var(--bg-dark);
  color: var(--text-dark);
  transition: background-color 0.3s ease, color 0.3s ease;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

body.light {
  background-color: var(--bg-light);
  color: var(--text-light);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: inherit;
  border-bottom: 1px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 999;
  flex-shrink: 0;
}

.title {
  font-weight: bold;
  font-size: 1.2rem;
  text-decoration: none;
  color: inherit;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  border: 1px solid var(--accent);
  padding: 0.3rem 0.75rem;
  border-radius: 4px;
  transition: background 0.2s ease;
}

nav a:hover {
  background-color: var(--accent);
  color: var(--bg-dark);
}

.theme-toggle {
  cursor: pointer;
  font-size: 1.2rem;
  border: none;
  background: none;
  color: inherit;
}

main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

footer {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--accent);
  flex-shrink: 0;
  padding: 1rem 0;
}

.interests {
  margin-top: 1.5rem;
}

.interests span {
  display: inline-block;
  background-color: var(--accent);
  color: var(--bg-dark);
  padding: 0.25rem 0.7rem;
  border-radius: 9999px;
  margin: 0 0.3rem;
  font-weight: 600;
  cursor: default;
  user-select: none;
  font-family: ui-monospace, monospace;
}

.big-buttons {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.big-buttons button {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  background-color: var(--accent);
  color: var(--bg-dark);
  border: none;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.3s ease;
  font-size: 1.1rem;
}

.big-buttons button:hover,
.big-buttons button:focus {
  background-color: #aaa;
  outline: none;
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #222;
  color: #ccc;
  padding: 2rem;
  border-radius: 12px;
  max-width: 90%;
  max-height: 90%;
  overflow-y: auto;
  text-align: center;
}

.modal-content code {
  white-space: pre-wrap;
  word-break: break-word;
  display: block;
  margin-bottom: 1rem;
  font-size: 1.1rem; /* o più grande, es. 1.2rem */
  line-height: 1.5;
}


.close-btn {
  background: none;
  border: none;
  color: #aaa;
  font-size: 1.5rem;
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  cursor: pointer;
}

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

  nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    justify-content: flex-start;
  }

  nav a {
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem;
  }

  .big-buttons {
    flex-direction: column;
    align-items: center;
  }

  .big-buttons button {
    width: 100%;
    max-width: 250px;
    font-size: 1rem;
  }

  .modal-content {
    width: 90%;
    padding: 1rem;
    font-size: 0.95rem;
  }

  .modal-content code {
    font-size: 1rem;
  }

  .interests {
    text-align: center;
  }

  .interests span {
    margin: 0.25rem 0.3rem;
    font-size: 0.9rem;
  }
}
