:root {
  color-scheme: light dark;
}

* {
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
  margin: 0;
  color: #333;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  flex: 1;
  width: 100%;
  box-sizing: border-box;
}

h1 {
  font-size: 2rem;
  margin: 0 0 0.25rem;
}

h1 a {
  color: inherit;
  text-decoration: none;
}

h1 a:visited {
  /* color: inherit; */
}

.role {
  font-size: 1.1rem;
  color: #444;
  margin: 0 0 0.5rem;
}

.meta {
  font-size: 0.95rem;
  color: #555;
  margin: 0 0 1.5rem;
}

header {
  text-align: center;
  background: #f2f2f2;
  border-bottom: 1px solid #ddd;
  padding: 1.75rem 1.25rem 1.5rem;
}

header h1 {
  font-family: Futura, "Century Gothic", "Trebuchet MS", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

footer {
  background: #f2f2f2;
  border-top: 1px solid #ddd;
  padding: 1.25rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: #555;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

footer a {
  color: #555;
  text-decoration: none;
}

footer a:hover {
  color: #111;
  text-decoration: underline;
}

nav {
  margin: 0.75rem 0 0 0;
  display: flex;
  justify-content: center;
  gap: 1rem;
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
  color: #333;
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  transition: background-color 0.15s ease;
}

nav a:hover {
  background-color: rgba(0, 0, 0, 0.07);
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #333;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #f2f2f2;
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #111c;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 1;
  pointer-events: none;
}

.project-card:hover::after {
  opacity: 1;
}

.project-card span {
  position: relative;
  z-index: 2;
  padding: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.project-card:hover span {
  color: #fff;
}

video {
  width: 100%;
  border-radius: 0.4rem;
  display: block;
  margin-top: 1rem;
}

.project-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-images img {
  width: 100%;
  border-radius: 0.4rem;
  display: block;
}

.project-images a {
  display: block;
}

.img-placeholder {
  aspect-ratio: 16 / 10;
  background: #e2e2e2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  border-radius: 0.4rem;
}

h2 {
  font-size: 1.1rem;
  border-bottom: 1px solid #ddd;
  padding-bottom: 0.25rem;
  margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
}

.dates {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 0.35rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.tag-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 400;
  text-decoration: none;
  color: #555;
  background: #eee;
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  transition: background-color 0.15s ease;
}

.tag-pill:hover {
  background: #ddd;
}

.tag-group {
  display: inline-flex;
}

.tag-pill.is-topic {
  border-radius: 0.4rem 0 0 0.4rem;
}

.tag-rss {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: #0645ad;
  padding: 0.3rem 0.7rem;
  border-radius: 0 0.4rem 0.4rem 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  transition: background-color 0.15s ease;
}

.tag-rss:hover {
  background: #043a8c;
}

#related-posts h2 {
  border-bottom: none;
  padding-bottom: 0;
}

.paginator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
}

.paginator a {
  color: #0645ad;
  text-decoration: none;
}

.paginator a:hover {
  text-decoration: underline;
}

.paginator-disabled {
  color: #bbb;
}

.paginator-pages {
  display: flex;
  gap: 0.6rem;
}

.paginator-current {
  font-weight: 700;
}

article {
  margin-bottom: 1.25rem;
}

a {
  color: #333;
}

/* links.html */
.links-page {
  text-align: center;
}

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

.card-list a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem 0.5rem;
  border-radius: 0.4rem;
  background: #f2f2f2;
  text-decoration: none;
  color: #111;
  font-weight: 600;
  transition: background-color 0.15s ease;
}

.card-list a:hover {
  background: #e2e2e2;
}

.card-list .dates {
  font-weight: 400;
  font-size: 0.85rem;
  color: #666;
}

.link-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.link-list li {
  margin-bottom: 0.85rem;
}

.link-list a {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  border: 1px solid #ccc;
  border-radius: 0.4rem;
  text-decoration: none;
  color: #111;
}

.link-title {
  font-weight: 600;
}

.link-desc {
  font-weight: 300;
  font-size: 0.85rem;
  color: #666;
}

.link-separator {
  border: none;
  border-top: 1px solid #ddd;
  margin: 1rem 0;
}

.link-list a:hover {
  border-color: #888;
  background-color: #f2f2f2;
}

.back {
  font-size: 0.9rem;
}

.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
  gap: 0.5rem;
}

.error-code {
  font-family: Futura, "Century Gothic", "Trebuchet MS", sans-serif;
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ddd;
  margin: 0;
}

.error-msg {
  font-size: 1.1rem;
  color: #555;
  margin: 0 0 1rem;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #eee;
    background: #111;
  }
  .role { color: #bbb; }
  .meta { color: #999; }
  h2 { border-color: #333; }
  .dates { color: #999; }
  a { color: #eee; }
  /* a:visited { color: #eee; } */
  .link-list a {
    border-color: #444;
    color: #eee;
  }
  .link-desc { color: #999; }
  .link-list a:hover { border-color: #777; background-color: #1e1e1e; }
  .link-separator { border-top-color: #333; }
  .card-list a { background: #1e1e1e; color: #eee; }
  .card-list a:hover { background: #2a2a2a; }
  .card-list .dates { color: #999; }
  nav a { color: #ddd; }
  nav a:hover { background-color: rgba(255, 255, 255, 0.1); }
  .project-card { background: #191919; color: #ddd; }
  .project-card::after { background: #f5f5f5db; }
  .project-card:hover span { color: #111; }
  .img-placeholder { background: #2a2a2a; color: #aaa; }
  header { background: #191919; border-color: #333; }
  .tag-pill { background: #262626; color: #bbb; }
  .tag-rss { background: #3a6dd8; }
  .tag-rss:hover { background: #5182e6; }
  .paginator { border-color: #333; }
  .paginator a { color: #8ab4ff; }
  .paginator-disabled { color: #555; }
  .tag-pill:hover { background: #333; }
  .error-code { color: #333; }
  .error-msg { color: #999; }
  footer { background: #191919; border-color: #333; color: #999; }
  footer a { color: #999; }
  footer a:hover { color: #eee; }
}
