/* ================================================
   artQ13 — Sympatric Areas for Artistic Research
   Documento, non depliant.
   ================================================ */

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --text: #1a1a1a;
  --bg: #ffffff;
  --accent: #1a1a1a;
  --muted: #888;
  --border: #d0cec9;
  --nav-w: 200px;
  --body-font: "EB Garamond", "Georgia", serif;
  --nav-font: "Space Mono", "Courier New", monospace;
}

@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Space+Mono:wght@400;700&display=swap");

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--body-font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* --- Navigation — sempre visibile, piatta, nessuna gerarchia nascosta --- */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--bg);
  z-index: 10;
}

#nav .site-title {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  text-decoration: none;
}

#nav .site-logo {
  width: 180px;
  height: auto;
}

#nav ul {
  list-style: none;
}

#nav ul li {
  margin-bottom: 0.6rem;
}

#nav ul li a {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--muted);
  text-transform: lowercase;
  letter-spacing: 0.04em;
  transition: color 0.15s;
}

#nav ul li a:hover,
#nav ul li a.active {
  color: var(--text);
}

/* --- Main Content --- */
#content {
  margin-left: var(--nav-w);
  padding: 1.5rem 2rem 2rem;
  max-width: 780px;
  width: calc(100% - var(--nav-w));
}

/* --- Footer --- */
#footer {
  margin-left: var(--nav-w);
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  font-family: var(--nav-font);
  font-size: 0.7rem;
  color: var(--muted);
}

/* --- Typography --- */
h1 {
  font-family: var(--body-font);
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h2 {
  font-family: var(--nav-font);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  color: var(--muted);
}

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

h2 a:hover {
  color: var(--text);
}

p {
  margin-bottom: 0.6rem;
}

a {
  color: var(--text);
}

blockquote {
  border-left: 2px solid var(--border);
  padding-left: 1.2rem;
  margin: 0.8rem 0;
  font-style: italic;
  color: var(--muted);
}

/* --- Home --- */
.home-statement {
  margin-bottom: 4rem;
  font-size: 1.15rem;
  line-height: 1.7;
}

.home-statement p:first-child {
  font-size: 1.3rem;
  line-height: 1.5;
}

.home-section {
  margin-bottom: 3rem;
}

/* --- Section Headers --- */
.section-header {
  margin-bottom: 1.5rem;
}

.section-intro {
  font-size: 1rem;
  color: var(--muted);
  max-width: 600px;
}

/* --- Project Lists --- */
.project-list {
  border-top: 1px solid var(--border);
}

.project-entry {
  border-bottom: 1px solid var(--border);
}

.project-entry a {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  text-decoration: none;
  transition: background 0.1s;
}

.project-entry a:hover {
  background: rgba(0,0,0,0.02);
}

.project-date {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
  width: 3.5rem;
}

.project-title {
  font-family: var(--body-font);
  font-size: 1.05rem;
  color: var(--text);
  flex-grow: 1;
}

.project-status {
  font-family: var(--nav-font);
  font-size: 0.65rem;
  text-transform: lowercase;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.project-status.ongoing {
  color: #2d6a30;
  background: #e8f5e9;
}

.project-status.archived {
  color: var(--muted);
  background: #eee;
}

/* --- Hero Image & Placeholder --- */
.hero-image {
  margin: 0.8rem 0 1rem;
}

.hero-image img {
  width: 66%;
  height: auto;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s;
}

.hero-image img:hover {
  opacity: 0.85;
}

.image-placeholder {
  width: 100%;
  min-height: 200px;
  background: #1a1a1a;
  margin: 0.8rem 0 1rem;
}

/* --- Project Gallery (multi-image) --- */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin: 0.8rem 0 1.2rem;
}

.project-gallery .gallery-item {
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #1a1a1a;
}

.project-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
  transition: opacity 0.15s;
}

.project-gallery .gallery-item img:hover {
  opacity: 0.85;
}

@media (max-width: 700px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Single Project --- */
.project-single header {
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.5rem;
}

.meta {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  color: var(--muted);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.question {
  margin-top: 1rem;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.5;
  border-left: 2px solid var(--text);
  padding-left: 1rem;
}

.project-body {
  font-size: 1rem;
  line-height: 1.7;
}

/* ALL images inside project-body and extended-content = tiny inline thumbnails */
.project-body img,
.extended-content img {
  display: inline-block !important;
  width: 80px !important;
  height: 56px !important;
  object-fit: cover !important;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.15s;
  margin: 2px !important;
  vertical-align: middle;
}

.project-body img:hover,
.extended-content img:hover {
  opacity: 0.75;
}

/* --- Project Images --- */
.project-images {
  margin-top: 1.5rem;
}

.project-images figure {
  margin-bottom: 1.5rem;
}

.project-images img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Page (chi-siamo, contatti) --- */
.page-single {
  max-width: 600px;
}

.page-body {
  font-size: 1rem;
  line-height: 1.7;
}

.page-body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- Mobile — sotto 768px, nav sopra il contenuto --- */
@media (max-width: 768px) {
  #nav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1.5rem;
  }

  #nav .site-title {
    margin-bottom: 0;
    margin-right: auto;
  }

  #nav .site-logo {
    width: 30px;
  }

  #nav ul {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
  }

  #nav ul li {
    margin-bottom: 0;
  }

  #content {
    margin-left: 0;
    padding: 1.5rem 1.2rem;
  }

  #footer {
    margin-left: 0;
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.4rem;
  }
}

/* --- Extended Content (Level 2) --- */
.extended-gate {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.extended-label {
  font-family: var(--nav-font);
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.8rem;
}

.extended-unlock-btn {
  font-family: var(--nav-font);
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 1.2rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.extended-unlock-btn:hover {
  background: rgba(0,0,0,0.04);
  border-color: var(--text);
}

.extended-content {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.extended-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  margin: 1.5rem 0;
}

.extended-lock-btn {
  display: block;
  margin-top: 2.5rem;
  font-family: var(--nav-font);
  font-size: 0.72rem;
  text-transform: lowercase;
  letter-spacing: 0.04em;
  padding: 0.4rem 1.2rem;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.extended-lock-btn:hover {
  background: rgba(0,0,0,0.04);
  border-color: var(--text);
  color: var(--text);
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 100;
  cursor: pointer;
  justify-content: center;
  align-items: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 92%;
  max-height: 92vh;
  object-fit: contain;
}
