/* ============================================
   Roberto Mongardini — Archive Styles
   ============================================ */

:root {
  --bg: #FAFAF8;
  --fg: #1A1A1A;
  --fg-muted: #6B6B6B;
  --accent: #C26148;
  --accent-dark: #A34D37;
  --border: #E5E2DF;
  --surface: #FFFFFF;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --radius: 4px;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', system-ui, sans-serif;
  --container: 1200px;
  --gap: 24px;
  --transition: 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-dark);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* ============================================
   Header
   ============================================ */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.site-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg);
}

.logo-tagline {
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.site-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
}

.site-nav a {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
  position: relative;
}

.site-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--fg);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle .bar {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--fg);
  transition: var(--transition);
}

/* ============================================
   Main & Sections
   ============================================ */

main {
  min-height: calc(100vh - 72px - 80px);
}

.section {
  padding: 80px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 48px;
  text-align: center;
  letter-spacing: 0.02em;
}

.section-subtitle {
  text-align: center;
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: -36px;
  margin-bottom: 48px;
}

/* ============================================
   Hero (Home)
   ============================================ */

.hero {
  position: relative;
  padding: 160px 0 100px;
  text-align: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.hero-slideshow {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  transform: scale(1.05);
}

.hero-slide[data-active="true"] {
  opacity: 1;
  transform: scale(1);
  transition: opacity 2s ease-in-out, transform 20s linear;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 250, 248, 0.82);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--fg-muted);
  max-width: 560px;
  margin: 0 auto 40px;
}

.hero-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--fg);
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.btn:hover {
  background: var(--fg);
  color: var(--bg);
}

.btn-accent {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-accent:hover {
  background: var(--accent);
  color: #fff;
}

/* ============================================
   Works Grid
   ============================================ */

.works-grid.layout-1col {
  grid-template-columns: 1fr;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.filter-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-btn {
  padding: 6px 16px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.work-card .media {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eee;
}

.work-card .media img,
.work-card .media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.work-card:hover .media img,
.work-card:hover .media video {
  transform: scale(1.04);
}

.work-card .info {
  padding: 20px;
}

.work-card .category {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.work-card h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 4px;
}

.work-card .year {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

/* ============================================
   Work Detail
   ============================================ */

.work-header {
  padding: 60px 0 40px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.work-header .category {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.work-header h1 {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.work-header .meta {
  color: var(--fg-muted);
  font-size: 0.9rem;
}

.work-body {
  padding: 48px 0;
  max-width: 800px;
  margin: 0 auto;
}

.work-body p {
  margin-bottom: 1.2em;
}

.work-media {
  margin: 40px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.work-media .media-item {
  margin-bottom: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eee;
  border-radius: var(--radius);
}

.work-media img,
.work-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 600px) {
  .work-media {
    grid-template-columns: 1fr;
  }
}

.work-media img,
.work-media video {
  width: 100%;
  border-radius: var(--radius);
}

.work-media figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--fg-muted);
  margin-top: 8px;
}

.work-links {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ============================================
   Related Cards (Works ↔ News)
   ============================================ */

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}

.related-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.related-thumb {
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #eee;
}

.related-thumb img,
.related-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.related-card:hover .related-thumb img,
.related-card:hover .related-thumb video {
  transform: scale(1.04);
}

.related-info {
  padding: 16px;
}

.related-info time,
.related-info .category {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
  display: block;
}

.related-info h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fg);
}

/* ============================================
   News / Events List
   ============================================ */

.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.news-item:first-child {
  padding-top: 0;
}

.news-item time {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.news-item h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 8px 0 12px;
  line-height: 1.3;
}

.news-item h2 a {
  color: var(--fg);
}

.news-item h2 a:hover {
  color: var(--accent);
}

.news-item p {
  color: var(--fg-muted);
  font-size: 0.95rem;
}

/* Events list with thumbnail (homepage) */
.events-list {
  max-width: 800px;
  margin: 0 auto;
}

.event-item {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.event-item:first-child {
  padding-top: 0;
}

.event-thumb {
  width: 90px;
  flex-shrink: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eee;
  min-height: 60px;
}

.event-thumb img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.event-item:hover .event-thumb img {
  opacity: 1;
}

.event-info time {
  font-size: 0.75rem;
  color: var(--fg-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-info h2 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 6px 0 8px;
  line-height: 1.3;
}

.event-info h2 a {
  color: var(--fg);
}

.event-info h2 a:hover {
  color: var(--accent);
}

.event-info p {
  color: var(--fg-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .event-item {
    flex-direction: column;
    gap: 12px;
  }
  .event-thumb {
    width: 100%;
    max-width: 140px;
  }
}

/* ============================================
   News Detail
   ============================================ */

.news-header {
  padding: 60px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.news-header time {
  font-size: 0.8rem;
  color: var(--fg-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.news-header h1 {
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 400;
  margin-top: 12px;
  line-height: 1.2;
}

.news-body {
  padding: 48px 0;
  max-width: 720px;
  margin: 0 auto;
}

.news-body p {
  margin-bottom: 1.2em;
}

/* ============================================
   Pictures (Gallery)
   ============================================ */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 8px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
  background: #eee;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.gallery-item .overlay span {
  color: #fff;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}

/* ============================================
   Bio
   ============================================ */

.bio-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
  padding: 64px 0;
}

.bio-portrait {
  position: sticky;
  top: 96px;
}

.bio-portrait img {
  width: 100%;
  border-radius: var(--radius);
  filter: grayscale(20%);
}

.bio-text h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 400;
  margin-bottom: 8px;
}

.bio-text .tagline {
  color: var(--fg-muted);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 32px;
}

.bio-text p {
  margin-bottom: 1.2em;
}

.bio-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.bio-contact a {
  font-size: 0.85rem;
}

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--fg-muted);
}

.footer-social {
  display: flex;
  gap: 20px;
}

.footer-social a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
}

.footer-social a:hover {
  color: var(--accent);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .site-nav.open {
    max-height: 300px;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 12px var(--gap);
  }

  .site-nav a {
    display: block;
    padding: 10px 0;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

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

  .bio-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .bio-portrait {
    position: static;
    max-width: 280px;
    margin: 0 auto;
  }

  .work-header h1,
  .news-header h1 {
    font-size: 1.8rem;
  }
}
