/* ---------- Base layout ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f5f2;
  color: #2b2520;
  line-height: 1.7;
  transition: background-color 0.4s ease, color 0.4s ease, background 0.4s ease;
  position: relative;
}

/* Subtle film‑grain texture */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVQIW2P4//8/AwAI/AL+fZMhNwAAAABJRU5ErkJggg==");
  opacity: 0.05;
  mix-blend-mode: multiply;
  z-index: 0;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

h1, h2, h3 {
  font-family: "Playfair Display", "Georgia", serif;
}


/* ---------- Header & hero ---------- */

.site-header {
  background: #ece7df;
  border-bottom: 1px solid #d2c5b4;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  position: relative;
  z-index: 20;
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.site-branding {
  position: relative;
  text-align: center;
}

.site-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: #7c6b57;
  margin: 0 0 0.6rem;
}

.site-title {
  font-size: clamp(3rem, 4.5vw, 3.8rem);
  margin: 0 0 0.35rem;
  color: #332318;
  letter-spacing: -0.02em;
}

.site-subtitle {
  margin: 0;
  max-width: 100%;
  font-size: 1rem;
  color: #4e4337;
}

.site-branding::after {
  content: "Digital Humanities · LOD · TEI";
  display: inline-flex;
  margin-left: auto;
  margin-right: auto;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(156, 47, 47, 0.25);
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9c2f2f;
}

.hero-actions {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

/* Base button style */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

/* Primary button */
.btn-primary {
  background: #9c2f2f;
  color: #fffaf3;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #a63a3a;
}

/* Ghost button */
.btn-ghost {
  background: rgba(255, 255, 255, 0.7);
  color: #5b4733;
  border-color: rgba(156, 47, 47, 0.4);
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: #fff;
  border-color: #9c2f2f;
  color: #9c2f2f;
}


/* ---------- Navigation ---------- */

.site-nav {
  margin-top: 0.8rem;
  width: 100%;
  max-width: 900px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.95rem;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 0.65rem 1.1rem 0.55rem;
  background: #ece7df;
  backdrop-filter: blur(6px);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  margin-left: auto;
  margin-right: auto;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: #5b4733;
  padding: 0.25rem 0;
  font-weight: 500;
}

/* Animated underline */
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: #9c2f2f;
  transition: width 0.25s ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
  width: 100%;
}


/* ---------- Hero photo ---------- */

.hero-photo {
  width: 100%;
  margin-top: 0.2rem;
  align-self: center;
}

.hero-photo figure {
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
  background: #1a1412;
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  filter: contrast(1.1) brightness(0.97) saturate(1.05);
}

.hero-photo figcaption {
  font-size: 0.8rem;
  padding: 0.6rem 0.8rem;
  color: #f7f0e7;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 70%);
  position: absolute;
  inset-inline: 0.5rem;
  bottom: 0.5rem;
  border-radius: 6px;
}


/* ---------- Sections ---------- */

.section {
  background: #ffffff;
  margin-top: 3rem;
  padding: 3rem 2.2rem 2.4rem;
  border-radius: 18px;
  border-top: 4px solid #9c2f2f;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUpSoft 0.7s ease-out forwards;
}

.section h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 1.2rem;
  color: #3b2b1d;
}

.section-intro {
  margin-top: 0.4rem;
  margin-bottom: 1.2rem;
  font-size: 1.1rem;
  color: #4e4337;
  line-height: 1.7;
}

.section p {
  margin-top: 0.6rem;
  position: relative;
  z-index: 1;
  font-size: 1.05rem;
  line-height: 1.7;
}

.section ul {
  padding-left: 1.2rem;
  position: relative;
  z-index: 1;
}

.section ul li {
  margin-bottom: 0.4rem;
  font-size: 1.02rem;
}


/* ---------- Split layout ---------- */

.section-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.1fr);
  gap: 2rem;
}

.box-muted {
  background: #f7f4ef;
  border-radius: 14px;
  padding: 1.5rem 1.6rem;
  border: 1px solid #d8cfc4;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}


/* --- Team supervision box --- */

.team-supervision {
  background: #f3ebe2;
  padding: 1.5rem 1.7rem;
  border-radius: 18px;
  border-left: 4px solid #9c2f2f;
  max-width: 360px;
  margin: 0 auto;
}

.team-supervision h3 {
  margin-top: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #7a4b2a;
}

.team-supervision p {
  margin: 0.5rem 0;
  line-height: 1.5;
  font-size: 1rem;
}


/* ---------- Item list as cards ---------- */

.item-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1.2rem;
}

.item-list li {
  background: #faf7f3;
  border-radius: 14px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.8rem;
  border: 1px solid #d8cfc4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  transition: 0.25s ease;
}

.item-list li::before {
  content: "●";
  font-size: 0.65rem;
  margin-top: 0.2rem;
  color: #9c2f2f;
}

.item-list li:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.08);
}


/* ---------- Code & links ---------- */

code {
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f1ece4;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  color: #3b2b1d;
}

.cta-link {
  margin-top: 1rem;
}

.cta-link a {
  font-weight: 600;
  text-decoration: none;
  color: #9c2f2f;
  border-bottom: 1px solid rgba(156, 47, 47, 0.45);
  transition: 0.2s ease;
}

.cta-link a:hover {
  border-color: #9c2f2f;
}


/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid #d2c5b4;
  padding: 1.6rem 1.5rem 1.8rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #7c6b57;
  text-align: center;
  background: #ece7df;
}

.site-footer a {
  color: #9c2f2f;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}


/* ---------- Global link styles ---------- */

a {
  color: #9c2f2f;
  transition: color 0.2s ease;
}

a:hover {
  color: #a63a3a;
}


/* ---------- Fade-in animation ---------- */

@keyframes fadeInUpSoft {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .header-inner {
    padding: 1.5rem 1.1rem 1rem;
  }

  .site-branding::after {
    display: inline-flex;
  }

  .site-nav {
    font-size: 0.9rem;
    gap: 0.4rem 1.1rem;
    align-self: stretch;
    justify-content: center;
  }
}

@media (max-width: 780px) {
  .page {
    padding: 2.2rem 1.2rem 3.4rem;
  }

  .section {
    padding: 2rem 1.4rem 1.6rem;
    border-radius: 16px;
  }

  .section-split {
    grid-template-columns: 1fr;
  }

  .hero-photo figcaption {
    font-size: 0.75rem;
  }
}

@media (max-width: 520px) {
  .site-title {
    font-size: 2.2rem;
  }

  .site-nav {
    position: static;
    padding-top: 0.4rem;
  }

  .hero-photo figure {
    border-radius: 10px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ---------- Photo gallery ---------- */

.section-photos {
  margin-top: 3rem;
}

.section-photos .photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 1.6rem;
}

.section-photos .photo-card {
  margin: 0;
  background: #faf7f3;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #d8cfc4;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: 0.25s ease;
}

.section-photos .photo-card img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.25s ease;
}

.section-photos .photo-card figcaption {
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.95rem;
  color: #4e4337;
  line-height: 1.45;
}

.section-photos .photo-card:hover img {
  transform: scale(1.03);
}

.section-photos .photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  .section-photos .photo-card img {
    height: 200px;
  }
}


/* ---------- Lightbox ---------- */

.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.lightbox-backdrop.is-visible {
  display: flex;
}

.lightbox-inner {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.75);
}

.lightbox-caption {
  margin-top: 0.9rem;
  font-size: 1rem;
  color: #f5f0e6;
  text-align: center;
  line-height: 1.5;
}

.lightbox-close {
  position: absolute;
  top: 1.4rem;
  right: 1.6rem;
  border: none;
  background: rgba(0, 0, 0, 0.65);
  color: #f5f0e6;
  font-size: 1.7rem;
  line-height: 1;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.08);
}

/* ---------- Dark mode (auto) ---------- */

@media (prefers-color-scheme: dark) {
  body {
    background: #0f0c0a;
    color: #f5f0e6;
  }

  .site-header {
    background: #1a1412;
    border-bottom-color: #3a2519;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  }

  .site-nav {
    background: #1a1412;
  }

  .site-kicker {
    color: #c1b09c;
  }

  .site-title {
    color: #f1e2d4;
  }

  .site-subtitle {
    color: #d4c4b3;
  }

  .site-branding::after {
    background: rgba(47, 29, 21, 0.9);
    border-color: rgba(156, 47, 47, 0.5);
    color: #f1d2b8;
  }

  .site-nav a {
    color: #dec6ab;
  }

  .site-nav a:hover,
  .site-nav a:focus,
  .site-nav a.is-active {
    color: #ffb27b;
  }

  .section {
    background: #1b130f;
    border-top-color: #9c2f2f;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.7);
  }

  .section h2 {
    color: #f2dfc7;
  }

  .section-intro {
    color: #e2d0bf;
  }

  .box-muted {
    background: #231710;
    border-color: #4a3222;
  }

  .item-list li {
    background: #231813;
    border-color: #3c2920;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.7);
  }

  .section-photos .photo-card {
    background: #231813;
    border-color: #3c2920;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.7);
  }

  .section-photos .photo-card figcaption {
    color: #e9d7c5;
  }

  code {
    background: #2b1b14;
    color: #f3e1cf;
  }

  .cta-link a {
    color: #ffb27b;
  }

  .site-footer {
    background: #21150f;
    border-top-color: #3a2519;
    color: #c4b19c;
  }

  .site-footer a {
    color: #ffb27b;
  }

  .btn-primary {
    background: #9c2f2f;
    color: #fffaf3;
  }

  .btn-primary:hover {
    background: #b33a3a;
  }

  .btn-ghost {
    background: rgba(35, 23, 17, 0.9);
    border-color: rgba(156, 47, 47, 0.6);
    color: #f3ddc5;
  }

  .btn-ghost:hover {
    background: #2c1c14;
    color: #ffb27b;
  }
}


/* ---------- Tables for documentation pages ---------- */

.meta-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6rem 0 2.4rem;
  font-size: 1rem;
  background: #ffffff;
  border: 1px solid #d8cfc4;
  border-radius: 8px;
  overflow: hidden;
}

.meta-table th,
.meta-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e3dbd2;
  text-align: left;
}

.meta-table thead th {
  font-weight: 700;
  color: #3b2b1d;
  background: #f2ede7;
}

.meta-table tbody tr:nth-child(even) {
  background: #faf7f3;
}

.note {
  font-size: 0.95rem;
  color: #6a5a4c;
  margin-top: -0.4rem;
  font-style: italic;
}


/* ---------- Items table (index) ---------- */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
  margin-top: 1.4rem;
  min-width: 760px;
  background: #ffffff;
  border: 1px solid #d8cfc4;
  border-radius: 10px;
  overflow: hidden;
}

.items-table th,
.items-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #e3dbd2;
  vertical-align: top;
}

.items-table thead th {
  font-weight: 700;
  color: #3b2b1d;
  background: #f2ede7;
  position: sticky;
  top: 0;
  z-index: 2;
}

.items-table tbody tr:nth-child(even) {
  background: #faf7f3;
}

.muted {
  opacity: 0.75;
}

.note-muted {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #6a5a4c;
  font-style: italic;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.2rem;
}

.hub-card {
  align-self: start;
}

.hub-links {
  list-style: none;
  padding-left: 0;
  margin: 0.9rem 0 0;
}

.hub-links li {
  margin-bottom: 0.45rem;
}

@media (max-width: 780px) {
  .items-table {
    min-width: 640px;
  }
}


/* ---------- Miro embed (responsive) ---------- */

.embed-wrap {
  position: relative;
  margin-top: 1.4rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d8cfc4;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.08);
  background: #faf7f3;
}

/* 16:9 ratio */
.embed-wrap::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.embed-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
