@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@300;400;500;600;700&display=swap');

:root {
  --bg-main: #ffffff;
  --bg-alt: #f7f7f5;
  --text-dark: #111111;
  --text-muted: #666666;
  --border: #e2e2e0;
  --font-title: 'Bebas Neue', sans-serif;
  --font-body: 'Montserrat', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  font-family: var(--font-body);
  line-height: 1.6;
  width: 100%;
  overflow-x: hidden;
}

.content-container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(1.5rem, 4vw, 3.5rem);
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  height: 65px;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-family: var(--font-title);
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--text-dark);
  text-decoration: none;
}

.brand span {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 7vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-muted);
  max-width: 650px;
}

/* ==========================================================================
   GRIGLIA PRINCIPALE (4 Colonne perfette)
   ========================================================================== */
.main-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
  width: 100%;
  align-items: center; /* Centra il testo in altezza rispetto allo slider */
}

/* 1. Slider (Copre le prime 2 colonne) */
.slider-wrapper {
  grid-column: span 2;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  width: 100%;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.slider-container {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
  min-width: 100%;
  height: 100%;
}

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

.slider-controls {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.slider-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* 2. Testo Fisso Affiancato (Copre le restanti 2 colonne) */
.slider-static-text {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 1rem;
}

.static-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.static-title {
  font-family: var(--font-title);
  font-size: clamp(2.2rem, 3.5vw, 3.2rem);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.static-description {
  font-size: 1rem;
  color: #444444;
  line-height: 1.6;
}

/* 3. Intestazione Sezione Libri */
.section-header-row {
  grid-column: 1 / -1;
  margin-top: 3rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--text-dark);
  padding-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-title);
  font-size: 3rem;
  letter-spacing: 0.03em;
}

/* 4. Libri (1 colonna ciascuno su Desktop) */
.book-card {
  grid-column: span 1;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.book-cover {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--bg-alt);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

.book-card:hover .book-cover img {
  transform: scale(1.04);
}

.book-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  line-height: 1.1;
  margin-bottom: 0.2rem;
}

.book-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.book-cover-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.book-title a {
  color: inherit;
  text-decoration: none;
}

.book-title a:hover {
  text-decoration: underline;
}
/* About / CV */
.about-section {
  padding: 4rem 0 5rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 4vw;
}

.about-text p {
  margin-bottom: 1.2rem;
  color: #333333;
}

.cv-block-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.cv-item {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed var(--border);
}

.cv-year {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cv-role {
  font-weight: 600;
  font-size: 0.95rem;
}

.cv-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}
/* Sezione Interviste & Media */
.interviews-section {
  margin-top: 4rem;
  margin-bottom: 4rem;
}

.interviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.interview-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.interview-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.4);
  background-color: rgba(255, 255, 255, 0.06);
}

.interview-source {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-bottom: 0.75rem;
}

.interview-title {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 1.5rem 0;
}

.interview-link-text {
  font-size: 0.85rem;
  font-weight: bold;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
/* Footer */
.footer {
  background-color: #111111;
  color: #ffffff;
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.footer-title {
  font-family: var(--font-title);
  font-size: 2.5rem;
}

.social-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  background-color: #222222;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #333333;
}

.footer-copy {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: #777777;
  border-top: 1px solid #222222;
  padding-top: 1.5rem;
  width: 100%;
}

/* ==========================================================================
   RESPONSIVE MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  .header { height: 56px; }
  .mobile-menu-btn { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 1.5rem 5vw;
    gap: 1.2rem;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.active { display: flex; }

  /* Incolonna tutto su mobile */
  .main-portfolio-grid { 
    grid-template-columns: 1fr; 
    gap: 2rem;
  }
  
  .slider-wrapper,
  .slider-static-text,
  .book-card {
    grid-column: span 1;
  }

  .slider-static-text {
    padding-left: 0;
  }

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

@media (min-width: 769px) and (max-width: 1024px) {
  .main-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .book-card {
    grid-column: span 1;
  }
}