/* Contact form layout */
.contact-form {
  display: grid;
  gap: 0.7em;
  max-width: 480px;
  width: 100%;
  margin: 2em 0 2em 0;
  padding: 1em 1.5em;
  border-radius: 6px;
  background: none;
  font-family: inherit;
  box-sizing: border-box;
  justify-items: start;
}
.contact-form .form-row {
  display: flex;
  gap: 0.7em;
  width: 100%;
}
.contact-form .form-row:first-child .form-group {
  flex: 1 1 0;
  min-width: 0;
}
.contact-form .form-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}
.contact-form input,
.contact-form textarea {
  font-size: 1rem;
  padding: 0.5em;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #fff;
  color: #222;
  margin-top: 0.2em;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-form button {
  margin-top: 0.7em;
  padding: 0.45em 1.5em;
  font-size: 1em;
  border-radius: 2px;
  background: #e0e0e0;
  border: 2px solid #bdbdbd;
  box-shadow: 1px 1px 0 #fff, 2px 2px 0 #bdbdbd;
  color: #222;
  font-family: inherit;
  cursor: pointer;
  outline: none;
  transition: background 0.1s, box-shadow 0.1s;
}
.contact-form button:active {
  background: #d0d0d0;
  box-shadow: 0 0 0 #fff, 1px 1px 0 #bdbdbd;
}
.contact-form label {
  font-size: 0.97em;
  margin-bottom: 0.1em;
}
@media (max-width: 700px) {
  .contact-form {
    padding: 1em 0.5em;
    max-width: 98vw;
  }
  .contact-form .form-row {
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
  }
}
/* Small UI tweaks: hover highlight and right-aligned date for Projects list
   Keeps retro, high-contrast aesthetic but subtle. */

/* Make each project block easier to scan */
.projects {
  position: relative;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: 4px;
  /* No background or shadow for crisp System 7 look */
  background: none;
  box-shadow: none;
  transition: none;
}
.projects:hover { /* no card-wide visual changes; keep hover simple */ }

/* Date floated to the right */

/* Make title and tags more readable */
.projects h3 { margin: 6px 0 8px 0; }
.projects .tags { margin: 6px 0 0 0; font-size: 0.95rem; }
.projects .tags a { text-decoration: underline; color: inherit; }

/* Individual element hover highlights (title + tags) */
.projects h3 a {
  color: var(--pico-color, inherit);
  transition: color 120ms ease, text-shadow 120ms ease, background 120ms ease;
  padding: 0 1px;
  border-radius: 2px;
  text-decoration: none;
}
.projects h3 a:hover,
.projects h3 a:focus {
  color: var(--pico-primary, inherit);
  background: transparent;
  text-decoration: underline;
}
.projects .tags a {
  color: var(--pico-muted-color, inherit);
  transition: color 120ms ease, background 120ms ease;
  padding: 0 4px;
  border-radius: 2px;
  text-decoration: none;
}
.projects .tags a:hover,
.projects .tags a:focus {
  color: var(--pico-primary, inherit);
  background: transparent;
  text-decoration: underline;
}

/* Slight retro border under the list */
section.projects + hr, .projects + .projects { border-top: 1px solid var(--pico-muted-border-color, rgba(0,0,0,0.06)); }

/* Ensure the hover effect looks good on dark background */
@media (prefers-reduced-motion: reduce) {
  .projects { transition: none; }
}

/* Logo light/dark swap (System 7 pixel art friendly) */
.site-logo {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
.logo-dark { display: none; }

/* Respect OS/browser setting when no explicit theme override is set */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline; }
}

/* Respect explicit overrides if you ever set data-theme */
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: inline; }
[data-theme="light"] .logo-light { display: inline; }
[data-theme="light"] .logo-dark { display: none; }
