/* ————————————————————————————————————————————————
   a directory of my projects
   interface lifted from personalsit.es: system type, plain list,
   screenshots first, tags you can filter with.
   ———————————————————————————————————————————————— */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body,
h1,
h2,
p,
ul,
ol,
li,
header,
nav,
article,
section,
figure,
figcaption,
footer {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

:root {
  color-scheme: light dark;

  --bg: #f7f7f7;
  --text: #171717;
  --text-soft: #6b6b6b;
  --text-faint: #8a8a8a;
  --border: #e2e2e2;
  --card: #ffffff;
  --accent: #b4121b;
  --focus: #171717;

  --max: 65rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f2123;
    --text: #f5f5f5;
    --text-soft: #b8b8b8;
    --text-faint: #9a9a9a;
    --border: #3a3d40;
    --card: #26292c;
    --accent: #ff6b74;
    --focus: #f5f5f5;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 100%;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* —— header —— */

.site-head {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: 5rem 1rem 2.5rem;
}

.wordmark {
  font-size: clamp(2rem, 7vw, 3.75rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-block-end: 1.75rem;
}

.wordmark em {
  font-style: normal;
  color: var(--accent);
}

.intro {
  max-inline-size: 44rem;
  font-size: 1.0625rem;
}

.intro + .intro {
  margin-block-start: 1rem;
  color: var(--text-soft);
}

.intro a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--text-faint);
}

.intro a:hover {
  text-decoration-color: currentColor;
}

/* —— bits under the intro —— */

.head-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-block-start: 1.75rem;
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.head-tools button,
.head-tools a {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--text-faint);
}

.head-tools button:hover,
.head-tools a:hover {
  color: var(--text);
  text-decoration-color: currentColor;
}

/* —— skills —— */

.skills {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: 1.75rem 1rem 0.5rem;
  border-block-start: 1px solid var(--border);
}

.skills__title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-block-end: 0.5rem;
}

.skills__list {
  display: grid;
  gap: 0.3rem;
  max-inline-size: 46rem;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.skills__list li {
  display: grid;
  grid-template-columns: 0.9rem 1fr;
  gap: 0.4rem;
}

.skills__list li::before {
  content: "–";
  color: var(--text-faint);
}

/* —— the list —— */

.grid {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: 2.25rem 1rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 2rem 1.5rem;
}

.entry__shot {
  display: block;
  position: relative;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
  aspect-ratio: 16 / 10;
}

/* —— private / public label on the card —— */

.entry__badge {
  position: absolute;
  inset-block-start: 0.5rem;
  inset-inline-end: 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.01em;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #2f2f2f;
  border: 1px solid rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px) saturate(160%);
  -webkit-backdrop-filter: blur(8px) saturate(160%);
}

.entry__badge--private {
  background: rgba(255, 245, 231, 0.9);
  color: #8a4b00;
  border-color: rgba(138, 75, 0, 0.2);
}

@media (prefers-color-scheme: dark) {
  .entry__badge {
    background: rgba(32, 32, 34, 0.82);
    color: #e8e8e8;
    border-color: rgba(255, 255, 255, 0.14);
  }

  .entry__badge--private {
    background: rgba(62, 45, 20, 0.85);
    color: #f3c07d;
    border-color: rgba(243, 192, 125, 0.25);
  }
}

.entry__shot img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 200ms ease;
}

.entry__shot:hover img {
  transform: scale(1.015);
}

.entry__foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-block-start: 0.7rem;
}

.entry__name {
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.entry__name:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry__open {
  font-size: 0.8125rem;
  color: var(--text-faint);
  text-decoration: none;
  white-space: nowrap;
}

.entry__open:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry__desc {
  margin-block-start: 0.35rem;
  font-size: 0.9375rem;
  color: var(--text-soft);
}

.entry__meta {
  margin-block-start: 0.3rem;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.entry__meta code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.entry__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-block-start: 0.55rem;
  font-size: 0.75rem;
  color: var(--text-faint);
}

.entry__tags li + li::before {
  content: "· ";
  opacity: 0.7;
}

.empty {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: 0 1rem 4rem;
  color: var(--text-soft);
}

.foot {
  max-inline-size: var(--max);
  margin-inline: auto;
  padding: 0 1rem 4rem;
  font-size: 0.875rem;
  color: var(--text-faint);
}

.foot a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .entry__shot img,
  .tag {
    transition: none;
  }

  .entry__shot:hover img {
    transform: none;
  }
}

[hidden] {
  display: none !important;
}
