/* ==========================================================================
   1. VARIABILI GLOBALI & RESET
   ========================================================================== */
@font-face {
  font-family: 'Questrial';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Questrial-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Inter-Light.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Inter-Medium.woff2') format('woff2');
}

:root {
  --bg-color: #F8F8F7;
  --text-main: #1A1A1A;
  --text-muted: #737373;
  --border-light: #E4E4E2;

 /* ACCENT: CARMINIO VINCENZO */
  --accent-terra: #810000;
  --accent-terra-soft: rgba(129, 0, 0, 0.08);

  --font-logo: "Questrial", "Century Gothic", "ITC Avant Garde Gothic", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   2. HEADER STANDARD & MOBILE DRAWER
   ========================================================================== */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2.5rem 4vw 2rem 4vw;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-color);
}

/* Logo con accento terracotta sul '21' */
.brand-logo {
  font-family: var(--font-logo);
  font-size: 1.65rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text-main);
  text-transform: lowercase;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  transition: opacity 0.2s ease;
}

.brand-logo .logo-accent {
  color: var(--accent-terra);
  font-weight: 400;
}

.brand-logo:hover {
  opacity: 0.8;
}

.brand-sub {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-left: 0.75rem;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: baseline;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-main);
  font-size: 0.95rem;
  transition: opacity 0.2s ease;
}

.nav-link:hover {
  opacity: 0.6;
}

.lang-switch {
  display: flex;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  margin-left: 1rem;
}

.lang-btn {
  text-decoration: none;
  color: var(--text-muted);
  padding: 0.15rem 0.35rem;
}

.lang-btn.is-active {
  color: var(--text-main);
  font-weight: 600;
  border-bottom: 1px solid var(--text-main);
}

.mobile-header-controls,
.mobile-drawer {
  display: none;
}

@media (max-width: 860px) {
  .site-header {
    padding: 1.5rem 5vw;
    position: relative;
    flex-wrap: wrap;
  }

  .brand-sub,
  .desktop-only {
    display: none;
  }

  .mobile-header-controls {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }

  .mobile-menu-btn {
    background: none;
    border: 1px solid var(--border-light);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.25rem 0.5rem;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-light);
    padding: 2.5rem 5vw 3rem 5vw;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  }

  .mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .mobile-link {
    font-family: var(--font-logo);
    font-size: 1.75rem;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 300;
  }

  .mobile-drawer-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--text-muted);
  }
}

/* ==========================================================================
   3. ARCHIVIO PROGETTI & FILTRI
   ========================================================================== */
.archive-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4vw;
  border-bottom: 1px solid var(--border-light);
}

.filter-nav {
  display: flex;
  gap: 1.75rem;
}

.filter-nav button, 
.view-controls button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  transition: all 0.2s ease;
}

.filter-nav button:hover, 
.view-controls button:hover {
  color: var(--text-main);
}

.filter-nav button.is-active, 
.view-controls button.is-active {
  color: var(--accent-terra);
  font-weight: 500;
  border-bottom: 1.5px solid var(--accent-terra);
}

.view-controls {
  display: flex;
  gap: 0.75rem;
}

.projects-grid {
  display: grid;
  list-style: none;
  padding: 3rem 4vw;
  gap: 3.5rem 2.5rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects-grid.grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.projects-grid.grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 860px) {
  .projects-grid.grid-two, 
  .projects-grid.grid-three {
    grid-template-columns: 1fr;
  }
}

.project-card {
  position: relative;
}

.project-card__link {
  display: block;
  text-decoration: none;
  color: inherit;
  position: relative;
}

.project-card__cover {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ebebeb;
}

.project-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-card__cover img {
  transform: scale(1.03);
}

.project-card__info {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.project-card__title {
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.project-card__meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.project-card__scatter {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scatter-img {
  position: absolute;
  top: 50%;
  left: 50%;
  max-width: 58%;
  opacity: 0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  transform: translate(-50%, -50%) 
             translate(var(--pos-x, 0), var(--pos-y, 0)) 
             scale(var(--pos-scale, 0.75));
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}

.project-card:hover .scatter-img {
  opacity: 1;
  transform: translate(-50%, -50%) 
             translate(calc(var(--pos-x, 0) * 1.1), calc(var(--pos-y, 0) * 1.1)) 
             scale(var(--pos-scale, 0.75));
}

/* ==========================================================================
   4. DETTAGLIO PROGETTO (Split View 60/40)
   ========================================================================== */
.project-detail {
  padding: 3rem 4vw;
}

.project-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .project-container {
    grid-template-columns: 58% 38%;
    gap: 4%;
  }
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.gallery-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.project-sidebar {
  position: relative;
}

@media (min-width: 1024px) {
  .sidebar-sticky {
    position: sticky;
    top: 3rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }
}

.meta-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.project-title {
  font-family: var(--font-logo);
  font-size: 2.4rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0.3rem 0;
}

.project-headline {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
}

.project-facts {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 0;
}

.fact-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.9rem;
}

.fact-row dt {
  color: var(--text-muted);
}

.fact-row dd {
  font-weight: 500;
  text-align: right;
}

.project-text {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #2b2b2b;
}

.project-text p + p {
  margin-top: 1rem;
}

.project-credits {
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
}

.cta-button, .hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--text-main);
  color: var(--text-main);
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
}

.cta-button:hover, .hero-cta:hover {
  background: var(--accent-terra);
  border-color: var(--accent-terra);
  color: #FFFFFF;
}

.project-pagination {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
  font-size: 0.85rem;
}

.project-pagination a {
  text-decoration: none;
  color: var(--text-muted);
}

.project-pagination a:hover {
  color: var(--accent-terra);
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border-light);
  padding: 4rem 4vw 2.5rem 4vw;
  background-color: var(--bg-color);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--border-light);
}

@media (min-width: 860px) {
  .footer-top {
    grid-template-columns: 2fr 1.2fr 1.5fr;
    gap: 4vw;
  }
}

.footer-logo {
  font-family: var(--font-logo);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--text-main);
  display: block;
  margin-bottom: 0.4rem;
}

.footer-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.col-title {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.footer-address {
  font-style: normal;
  line-height: 1.6;
}

.footer-address a {
  color: inherit;
  text-decoration: none;
}

.footer-address a:hover {
  color: var(--accent-terra);
  text-decoration: underline;
}

.chamber-info {
  line-height: 1.6;
  font-size: 0.82rem;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-top: 2rem;
  font-size: 0.8rem;
}

@media (min-width: 600px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-legal {
  display: flex;
  gap: 1.5rem;
}

.footer-legal a {
  color: inherit;
  text-decoration: none;
}

.footer-legal a:hover {
  color: var(--accent-terra);
  text-decoration: underline;
}

/* ==========================================================================
   6. HOMEPAGE COMPLETA (HERO MANIFESTO + FLUSSO PORTFOLIO)
   ========================================================================== */
.home-exhibition {
  background-color: var(--bg-color);
  min-height: 100vh;
}

/* --- Hero Manifesto con Hauptbild & Citazione Goethe --- */
.home-hero-manifesto {
  padding: 2.5rem 4vw 4rem;
  border-bottom: 1px solid var(--border-light);
  background-color: var(--bg-color);
}

.hero-image-wrap {
  width: 100%;
  margin-bottom: 3.5rem;
}

.hero-frame {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  aspect-ratio: 21 / 9;
  max-height: 60vh;
  overflow: hidden;
  background: #EBEBE9;
  border: 1px solid var(--border-light);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
}

.hero-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

@media (max-width: 600px) {
  .hero-frame {
    aspect-ratio: 4 / 3;
  }
}

.hero-statement-strip {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .hero-statement-strip {
    grid-template-columns: 3fr 1fr;
    gap: 4rem;
  }
}

.goethe-inscription {
  margin: 0;
  padding: 0;
  border: none;
}

.inscription-body {
  font-family: var(--font-logo);
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  font-weight: 300;
  line-height: 1.45;
  letter-spacing: -0.015em;
  color: var(--text-main);
  text-wrap: balance;
}

.inscription-author {
  display: block;
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-style: normal;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scroll-indicator {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding-bottom: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

@media (min-width: 900px) {
  .scroll-indicator {
    align-items: flex-end;
  }
}

.scroll-arrow {
  display: inline-block;
  font-size: 1.1rem;
  color: var(--accent-terra);
  animation: scroll-bounce 2s infinite ease-in-out;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* --- Filtri Curatoriali --- */
.curatorial-filter {
  position: sticky;
  top: 0;
  background: rgba(248, 248, 247, 0.94);
  backdrop-filter: blur(12px);
  z-index: 50;
  border-bottom: 1px solid var(--border-light);
  padding: 1.25rem 6vw;
}

.filter-wrapper {
  display: flex;
  gap: 2.2rem;
  overflow-x: auto;
  white-space: nowrap;
}

.filter-wrapper button {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  transition: all 0.25s ease;
}

.filter-wrapper button:hover,
.filter-wrapper button.is-active {
  color: var(--accent-terra);
  font-weight: 500;
  border-bottom: 1.5px solid var(--accent-terra);
}

/* --- Stream Progetti in Home --- */
.exhibition-stream {
  padding: 6rem 6vw 8rem 6vw;
  display: flex;
  flex-direction: column;
  gap: 10rem;
}

.stream-item {
  position: relative;
  width: 100%;
}

.stream-link {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  text-decoration: none;
  color: inherit;
}

@media (min-width: 960px) {
  .stream-item.layout-standard .stream-link {
    grid-template-columns: 62% 34%;
    gap: 4%;
    align-items: center;
  }

  .stream-item.layout-reversed .stream-link {
    grid-template-columns: 34% 62%;
    gap: 4%;
    align-items: center;
  }

  .stream-item.layout-reversed .stream-visual {
    order: 2;
  }

  .stream-item.layout-reversed .stream-dossier {
    order: 1;
  }
}

.stream-visual {
  position: relative;
}

.visual-frame {
  width: 100%;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  background: #EBEBE9;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.visual-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-link:hover .visual-frame img {
  transform: scale(1.03);
}

.stream-ghost-visual {
  position: absolute;
  bottom: -2.5rem;
  right: -2rem;
  width: 38%;
  aspect-ratio: 4 / 3;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  border: 4px solid #FFFFFF;
  overflow: hidden;
  pointer-events: none;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stream-ghost-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stream-link:hover .stream-ghost-visual {
  transform: translateY(-8px) scale(1.02);
}

.stream-dossier {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dossier-index {
  font-family: var(--font-logo);
  font-size: 2.8rem;
  font-weight: 300;
  color: var(--accent-terra);
  opacity: 0.6;
  line-height: 1;
}

.dossier-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.dossier-title {
  font-family: var(--font-logo);
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.dossier-summary {
  font-size: 0.98rem;
  line-height: 1.6;
  color: #555552;
  margin-bottom: 1.25rem;
}

.dossier-explore {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent-terra);
  border-bottom: 1px solid var(--accent-terra);
  padding-bottom: 2px;
  display: inline-block;
  transition: transform 0.2s ease;
}

.stream-link:hover .dossier-explore {
  transform: translateX(4px);
}

/* ==========================================================================
   STRISCIA REFERENZE ISTITUZIONALI CON LOGHI SVG
   ========================================================================== */
.institutional-strip {
  border-top: 1px solid var(--border-light);
  padding: 4.5rem 6vw;
  background: #F4F4F2;
}

.strip-header {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.strip-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3.5rem 4.5rem;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

/* REGOLAZIONE PROPORZIONATA LOGHI PARTNER / KHM */
.partner-logo {
  height: 75px;          /* Porta l'altezza a 75px per rendere le scritte nitide e visibili */
  width: auto;
  max-width: 220px;
  object-fit: contain;
  opacity: 0.65;
  filter: grayscale(100%);
  display: block;
  transition: opacity 0.3s ease, filter 0.3s ease, transform 0.2s ease;
}

.partner-item:hover .partner-logo,
.partner-logo:hover {
  opacity: 1;
  filter: grayscale(0%);
  transform: translateY(-1px);
}

/* ALLINEAMENTO VERTICALE TRA LOGO E TESTI */
.strip-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem 4.5rem;
}

/* Tipografia coordinata per le istituzioni non ancora dotate di file SVG */
.partner-item-text {
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 300;
  letter-spacing: -0.01em;
  color: #666663;
  transition: color 0.2s ease;
}

.partner-item-text:hover {
  color: var(--text-main);
}

@media (max-width: 860px) {
  .exhibition-stream {
    gap: 6rem;
    padding: 3rem 5vw 5rem 5vw;
  }
  .stream-ghost-visual {
    display: none;
  }
}

/* ==========================================================================
   7. PAGINA STUDIO, FILOSOFIA & TEAM
   ========================================================================== */
.studio-page {
  padding: 4rem 4vw 6rem 4vw;
}

.philosophy-section {
  padding-bottom: 5rem;
  border-bottom: 1px solid var(--border-light);
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 900px) {
  .section-grid {
    grid-template-columns: 28% 68%;
    gap: 4%;
  }
}

.section-label h2 {
  font-family: var(--font-logo);
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  position: sticky;
  top: 3rem;
}

.section-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #2b2b2b;
}

.lead-text p {
  font-size: 1.15rem;
  line-height: 1.65;
  margin-bottom: 2rem;
}

/* Schema ridimensionato e proporzionato */
.philosophy-schema {
  margin: 2.5rem 0;
  max-width: 440px;
  background: #ffffff;
  padding: 1.25rem;
  border: 1px solid var(--border-light);
}

.philosophy-schema img {
  width: 100%;
  height: auto;
  display: block;
}

.body-text p + p {
  margin-top: 1.25rem;
}

.vision-block {
  margin-top: 4rem;
  padding: 2.5rem 0 1rem 0;
  border-top: 1px solid var(--border-light);
}

.vision-title {
  font-family: var(--font-logo);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.vision-text p {
  font-size: 1.1rem;
  line-height: 1.7;
}

.vision-text p:first-child {
  font-family: var(--font-logo);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--text-main);
  margin-bottom: 0.75rem;
}

.team-section {
  padding-top: 4rem;
}

.team-section__bar {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.team-section__title {
  font-family: var(--font-logo);
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4rem 2.5rem;
}

@media (min-width: 900px) {
  .team-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.team-card {
  display: flex;
  flex-direction: column;
}

.team-card__figure {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ebebeb;
  margin-bottom: 1.25rem;
}

.team-card__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  transition: filter 0.4s ease, transform 0.5s ease;
}

.team-card:hover .team-card__figure img {
  filter: grayscale(0%);
  transform: scale(1.02);
}

.team-card__placeholder {
  width: 100%;
  height: 100%;
  background: #E5E5E2;
}

.team-card__name {
  font-family: var(--font-logo);
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.team-card__role {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.team-card__cv {
  margin: 0.4rem 0;
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.team-card__cv a {
  color: var(--accent-terra);
  text-decoration: underline;
}

.team-card__bio-toggle {
  background: none;
  border: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-main);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  margin-top: 0.25rem;
}

.team-card__bio-toggle:hover {
  color: var(--accent-terra);
}

.team-card__bio {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #444444;
  margin-top: 0.75rem;
  border-top: 1px dotted var(--border-light);
  padding-top: 0.75rem;
}

[x-cloak] {
  display: none !important;
}