/* Base Reset & Typography */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.5;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: #222;
  background-color: #fafafa;
}

body {
  margin: 0;
  padding: 0;
}

/* Basic Layout */
header,
footer {
  background: #f0f0f0;
  padding: 1rem;
}

header nav ul.menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

header nav a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
}

main {
  padding: 2rem 1rem;
  container-type: inline-size;
  column-count: 5;
  column-gap: 1.5rem;
}

#cv main {
  column-count: 4;
}

@media (max-width: 1600px) {
  main {
    column-count: 4;
  }
}


@media (max-width: 1200px) {
  main {
    column-count: 3;
  }
}

@media (max-width: 950px) {
  main {
    column-count: 2;
    column-gap: 1rem;
  }
}

@media (max-width: 615px) {
  main {
    column-count: 1;
  }
}

section,
.article-labels {
  margin: auto;
}

article,
#cv main {
  max-width: 60%;
  margin: auto;
}

h1,
h2,
h3 {
  color: #111;
}

h1,
h2,
h3,
blockquote {
  break-after: avoid;
}

a {
  color: #0066cc;
}

a:hover {
  text-decoration: underline;
}

dt {
  font-weight: bold;
}

#about-me h1 {
  margin-top: 0;
}

#about-me,
#blog {
  break-inside: avoid;
}

main img,
article img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

img.logo {
  display: inline;
  margin-top: auto;
  margin-bottom: auto;
  border-radius: none;
  width: 1em;
}

#blog address>img,
#tags address>img,
#photos address>img,
#blogpost header img,
#cv header img {
  width: 150px;
}

button.pill {
  all: unset;
  display: inline-flex;
  cursor: pointer;
  color: #0066cc;
}

button.pill:hover {
  text-decoration: underline;
}

button.pill:focus-visible {
  outline: 2px solid #0066cc;
  outline-offset: 2px;
}

ul,
ol,
dl {
  list-style: none;
  margin-left: 0;
  padding-inline-start: 0;
}

dd {
  margin-inline-start: 0;
}

footer {
  font-size: 0.9rem;
}

details {
  margin-top: 1rem;
}

#blogpost p {
  break-inside: avoid;
}

#blogposts li {
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

#blogposts li p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #696969;
  margin: 0;
}

.pill {
  margin: 0.5rem;
}

.pill:first-child,
.pill:last-child {
  margin-left: 0;
  margin-right: 0;
}

.pill.tag::before {
  content: "#";
}

#tags,
#years {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

#tags a,
#years a {
  margin-bottom: 0.5rem;
  display: inline-flex;
  white-space: normal;
  margin: 0;
}

#blog address>span,
#tags address>span,
#photos address>span,
#blogpost header span,
#cv header span,
#cv address>span,
#blogpost address>span {
  display: none;
}

#cv div>section {
  margin: 0;
  padding: 0;
}

#blogpost h1 {
  margin-top: 0;
  padding-top: 0;
}

#blog h1,
#tags h1,
#photos h1 {
  display: none;
}

#blog section,
#tags section {
  columns: auto;
}

#photos section {
  columns: auto;
  max-width: 80%;
}

#photos section {
  justify-items: center;
}

#blog section p,
#tags section p,
#photos section p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #696969;
  margin: 0;
}

#blog main,
#cv main,
#tags main,
#photos main,
#blogpost main {
  container-type: inline-size;
  column-count: unset;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.8);
  font-size: 0.8rem;
  overflow-y: auto;
  padding: 2rem 1rem;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  display: block;
  text-align: center;
  max-width: 90%;
  max-height: 90vh;
}

#modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

#modal-caption {
  color: white;
  margin-top: 10px;
}

#modal-close {
  position: fixed;
  top: 20px;
  left: 30px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  z-index: 1010;
}


.photo-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  width: 100%;
}

.photo-item img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
}

.pagination a.active {
  font-weight: bold;
  text-decoration: underline;
}

.pagination a {
  margin: 0 0.5rem;
  text-decoration: none;
  color: #0066cc;
}

.latest-photos {
  background-color: #f7f7f7;
  padding: 2rem 1rem;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  text-align: center;
  max-width: none;
  column-count: unset;
}

.latest-photos h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.photo-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 1rem;
}

.photo-strip img {
  width: 140px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.2s ease;
}

.photo-strip img:hover {
  transform: scale(1.05);
}

.see-more {
  display: inline-block;
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.2s ease;
}

.see-more:hover {
  color: #666;
}

.latest-social,
.latest-nanopubs {
  background-color: #f7f7f7;
  padding: 2rem 1rem;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  text-align: center;
  max-width: none;
}

.latest-social h2,
.latest-nanopubs h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.social-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 1rem;
}

.social-card {
  background: white;
  border: 1px solid #ddd;
  text-align: left;
  border-radius: 6px;
  padding: 0.5rem;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-card a {
  text-decoration: none;
  color: #0066cc;
  font-size: 0.85rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}

.social-card span {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.25rem;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#archived-notice {
  background-color: #FFFFC5;
  padding: 1rem;
}