:root {
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
}

#search-input {
  display: block;
  width: min(100%, 480px);
  margin: 1.5rem auto 1rem;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}

#post-list, #results-container {
  width: 80%;
  max-width: 480px;
  margin: 1rem auto 1rem;
  padding: 0.25rem 1rem;
}

#post-list li {
  margin: 0.25rem 0;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

section > h1 {
  padding-bottom: 1rem;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  background: var(--surface-color, #ffffff);
  color: var(--text-color, #111827);
  border: 1px solid var(--border-color, rgba(15, 23, 42, 0.08));
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.14);
  border-color: var(--accent-color);
}

.card > picture {
  display: block;
  background: var(--card-image-bg, #f3f4f6);
}

.card picture img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.card h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin: 1rem 1rem 0.35rem;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--heading-color, #111827);
  font-weight: 700;
}

.card h3 span {
  display: inline-block;
  margin-left: auto;
  margin-top: 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-color, #2563eb);
  white-space: nowrap;
}

.card p {
  margin: 0 1rem 1rem;
  color: var(--text-color, #4b5563);
  line-height: 1.65;
  font-size: 0.95rem;
}

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

.card .tags span {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--tag-bg, #f3f4f6);
  color: var(--tag-color, #374151);
  border: 1px solid var(--tag-border, rgba(15, 23, 42, 0.06));
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.card .links {
  display: flex;
  gap: 0.65rem;
  margin: 0 1rem 1rem;
  padding-top: 0.9rem;
  position: relative;
}

.card .links::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-color, rgba(15, 23, 42, 0.08));
}

.card .links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  transition: background-color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.card .links a:hover {
  background: #93c5fd;
  border-color: #60a5fa;
  transform: translateY(-1px);
}

.card .links img {
  width: 0.95rem;
  height: 0.95rem;
  filter: brightness(0) saturate(100%) invert(24%) sepia(88%) saturate(1616%) hue-rotate(201deg) brightness(96%) contrast(94%);
}

/* Gallery width */
#galleria {
  height:800px;
}

#special {
  display: block;
  margin: 0 auto 10px auto;
  width: 50%;
  border-radius: 10px;
}

#portrait {
  display: block;
  margin: 0 auto;
  width: 50%;
  border-radius: 50%;
}

.site-nav {
  z-index:  2147483647;
}

.home, .post, #bio {
  max-width: -webkit-calc(900px - (30px * 2));
  max-width: calc(900px - (30px * 2));
  margin-right: auto;
  margin-left: auto;
  padding-right: 30px;
  padding-left: 30px
}

#bio h2, #bio p{
  padding-top: 1em;
}

hr {
  width: 75%;
  text-align: center;
  margin-top: 2em;
  margin-bottom: 1.5em;
}

.center {
  text-align: center;
}

.contact {
  text-align: center;
}

.social_icons {
  text-align: center;
  font-size: 2em;
}

.social_icons a {
  padding-right: 0.5em;
}

h1, h2 {
  text-align: center;
}

/* Don't show the "I am a ..." titles */
.title {
  display: none;
}

/* Don't show the "more info" links */
.galleria-info-link {
  display: none;
}

form {
  max-width: 600px;
  margin: 1.5em auto 0;
  text-align: left;
}

form label {
  display: block;
  margin-top: 1em;
  font-size: 0.95em;
}

form input,
form textarea {
  width: 100%;
  margin-top: 0.35em;
  padding: 0.6em 0;
  border: 0;
  border-bottom: 1px solid #ccc;
  background: transparent;
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

form textarea {
  min-height: 110px;
  resize: vertical;
}

form input:focus,
form textarea:focus {
  outline: none;
  border-bottom-color: #111;
}

form button {
  display: block;
  margin: 1em auto 0;
  min-width: 140px;
  padding: 0.85rem 1.5rem;
  border: 1px solid #3b82f6;
  border-radius: 999px;
  background: #3b82f6;
  color: #fff;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  cursor: pointer;
}

form button:hover {
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* Dropdown Navigation System for Sublinks */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 100px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
  z-index: 9999;
  border: 1px solid #e8e8e8;
  border-radius: 4px;
}

.dropdown-menu .page-link {
  display: block;
  padding: 8px 16px;
  margin-left: 0 !important;
}

/* Open dropdown on hover */
.dropdown-wrapper:hover .dropdown-menu {
  display: block;
} 



@media screen and (max-width: 768px) {
  #galleria {
    height: calc(100vh - 120px);
    max-height: 700px;
  }

  /* Sublinks on hover */
  .site-nav .page-link:not(:last-child) {
    margin-left: 0;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  #search-input {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}