:root {
  --bg: #FFFFFF;
  --text: #000000;
  --accent: #2a2aff;
  --border: #ccc;
}

[data-theme="dark"] {
  --bg: #111111;
  --text: #ffffff;
  --border: #444;
}

* {
  box-sizing: border-box;
  transition: background 0.3s ease, color 0.3s ease;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 1.5rem 1rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
/*   margin-bottom: 2rem; */
  padding: 8px 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text);
  text-decoration: none;
  user-select: none;
}

nav .right {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  user-select: none;
}
nav a:hover,
nav a:focus {
  color: var(--accent);
  outline: none;
}

/* Theme toggle */

.toggle-theme-wrapper {
  position: relative;
  width: 50px;
  height: 25px;
  background: var(--text);
  border-radius: 50px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 7px;
  user-select: none;
}

.toggle-theme-wrapper svg {
  width: 14px;
  height: 14px;
  fill: var(--bg);
  pointer-events: none;
}

.toggle-theme-button {
  position: absolute;
  top: 2.5px;
  left: 2.5px;
  width: 20px;
  height: 20px;
  background: var(--bg);
  border-radius: 50%;
  transition: left 0.3s ease;
  pointer-events: none;
}

[data-theme="dark"] .toggle-theme-button {
  left: 27.5px;
}

.content {
  max-width: 100%;
  padding: 2rem;
/*   margin: 0 auto; */
/*   box-sizing: border-box; */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.intro {
  font-size: 1.15rem;
  max-width: 100%;
}

footer {
  text-align: left;
}

.projects {
  width: 100%;
}

.projects h2 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  user-select: none;
}

.projects ul {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.projects li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  gap: 0.5rem 1rem;
}

.projects li .info {
  font-size: 1rem;
  flex: 1 1 200px;
  min-width: 180px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.projects li .info a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.projects li .info a:hover,
.projects li .info a:focus {
  color: var(--accent);
  outline: none;
}

.projects li .info .number {
  font-weight: 400;
  color: gray;
  white-space: nowrap;
}

.projects li .tags {
  font-size: 0.85rem;
  color: gray;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

@media (max-width: 600px) {
  nav {
    justify-content: center;
  }
  nav .right {
    gap: 1rem;
  }

  .projects li {
    flex-direction: column;
    align-items: flex-start;
  }
  .projects li .info {
    min-width: auto;
    gap: 0.25rem;
  }
}
