/* ---------- Projects ---------- */

.project-grid {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.project {
  position: relative;
  padding: 1.25rem;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--line);
  border-radius: 2px;
  background: var(--sunken);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
    background 0.3s var(--ease);
}

.project:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.project h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.project h3 a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

.project h3 a:hover,
.project h3 a:focus-visible {
  color: var(--accent);
}

.project p {
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}

.project-tech {
  font-family: var(--mono);
  font-size: 0.7rem !important;
  letter-spacing: 0.04em;
  color: var(--accent) !important;
  opacity: 0.8;
  margin: 0 !important;
}

/* Placeholder cards read as obviously unfinished. */
.project--placeholder {
  border-style: dashed;
  opacity: 0.6;
}

/* ---------- Links ---------- */

.link-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.link-list a {
  color: var(--fg);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.link-list a:hover,
.link-list a:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.link-list a[aria-disabled="true"] {
  color: var(--fg-dim);
  cursor: not-allowed;
  border-bottom-style: dashed;
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  padding: 2rem clamp(1rem, 5vw, 3rem) 2.5rem;
  border-top: 1px solid var(--line);
  background: var(--chrome);
  color: var(--fg-dim);
  font-size: 0.82rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--accent);
  text-decoration: none;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--sunken);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--accent);
}

/* A half-filled disc: the dark side is lit, the light side is not. */
.theme-toggle-face {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  background: linear-gradient(
    90deg,
    var(--accent) 0 50%,
    transparent 50% 100%
  );
  transition: transform 0.4s var(--ease);
}

[data-theme="light"] .theme-toggle-face {
  transform: rotate(180deg);
}
