/* ============================================
   MARTA ARCA — Sito Artista Visiva
   ============================================ */

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

:root {
  --black: #1a1a1a;
  --dark: #2a2a2a;
  --grey: #6b6b6b;
  --light-grey: #b0b0b0;
  --pale: #e8e8e8;
  --white: #f5f5f5;
  --bg: #fafafa;
  --font-body: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-heading: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --transition: 0.6s cubic-bezier(0.25, 0, 0.25, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--black);
  line-height: 1.7;
  letter-spacing: 0.01em;
  overflow-x: hidden;
}

/* ---- NAVIGATION ---- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.4s ease;
}

nav .nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

nav .logo {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
}

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

nav .nav-links a {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  transition: color var(--transition);
  position: relative;
}

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

nav .nav-links a:hover,
nav .nav-links a.active {
  color: var(--black);
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--black);
  margin: 5px 0;
  transition: all 0.3s ease;
}

/* ---- SECTIONS ---- */

section {
  min-height: 100vh;
  padding: 0 2.5rem;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* ---- HOME ---- */

#home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 80px;
}

#home .home-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: center;
  max-width: 1200px;
  width: 100%;
}

#home .home-text {
  padding: 2rem 0;
}

#home .home-text h1 {
  font-size: 2.8rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.2;
  margin-bottom: 2rem;
  color: var(--black);
}

#home .home-text p {
  font-size: 1rem;
  color: var(--grey);
  line-height: 1.9;
  max-width: 420px;
  font-weight: 300;
}

#home .home-image {
  position: relative;
  overflow: hidden;
}

#home .home-image img {
  width: 100%;
  height: 80vh;
  max-height: 700px;
  object-fit: cover;
  display: block;
  filter: grayscale(0%);
  transition: filter 1.2s ease;
}

/* ---- ABOUT ---- */

#about {
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 120px;
}

#about .about-content {
  max-width: 720px;
  margin: 0 auto;
}

#about .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 3rem;
}

#about .about-text p {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--dark);
  margin-bottom: 1.8rem;
  font-weight: 300;
}

#about .about-text p:last-child {
  margin-bottom: 0;
}

/* ---- OPERE ---- */

#opere {
  padding-top: 120px;
  padding-bottom: 120px;
  min-height: auto;
}

#opere .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 3rem;
  text-align: center;
}

/* Filter navigation */
.filter-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 4rem;
  flex-wrap: wrap;
}

.filter-nav button {
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--light-grey);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem 0;
  transition: color var(--transition);
  position: relative;
}

.filter-nav button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width var(--transition);
}

.filter-nav button:hover,
.filter-nav button.active {
  color: var(--black);
}

.filter-nav button.active::after {
  width: 100%;
}

/* Works grid */
.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
}

.work-item {
  cursor: pointer;
  transition: opacity var(--transition);
}

.work-item.hidden {
  display: none;
}

.work-item:hover {
  opacity: 0.85;
}

.work-item .work-image {
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
  background: var(--pale);
}

.work-item .work-image img {
  width: 100%;
  display: block;
  transition: transform 1.2s cubic-bezier(0.25, 0, 0.25, 1);
}

.work-item:hover .work-image img {
  transform: scale(1.02);
}

.work-item .work-info {
  padding: 0.2rem 0;
}

.work-item .work-info h3 {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--black);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.work-item .work-info .work-meta {
  font-size: 0.75rem;
  color: var(--light-grey);
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* ---- LIGHTBOX ---- */

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(250, 250, 250, 0.97);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 1000px;
  width: 100%;
  display: flex;
  gap: 3rem;
  align-items: center;
}

.lightbox-content img {
  max-width: 65%;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-info {
  flex: 1;
}

.lightbox-info h3 {
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  letter-spacing: 0.02em;
}

.lightbox-info p {
  font-size: 0.85rem;
  color: var(--grey);
  line-height: 1.8;
  margin-bottom: 0.3rem;
  font-weight: 300;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--grey);
  transition: color 0.3s ease;
  line-height: 1;
}

.lightbox-close:hover {
  color: var(--black);
}

/* ---- CV ---- */

#cv {
  padding-top: 120px;
  padding-bottom: 120px;
}

#cv .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 3rem;
}

#cv .cv-content {
  max-width: 720px;
  margin: 0 auto;
}

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

.cv-section h3 {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--pale);
}

.cv-entry {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.7rem;
  gap: 2rem;
}

.cv-entry .cv-text {
  font-size: 0.88rem;
  color: var(--dark);
  font-weight: 300;
  line-height: 1.6;
}

.cv-entry .cv-year {
  font-size: 0.78rem;
  color: var(--light-grey);
  white-space: nowrap;
  font-weight: 300;
}

/* ---- CONTATTI ---- */

#contatti {
  display: flex;
  align-items: center;
  padding-top: 120px;
  padding-bottom: 120px;
}

#contatti .contatti-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

#contatti .section-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--light-grey);
  margin-bottom: 3rem;
}

#contatti .contact-email {
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--black);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: color var(--transition);
  display: inline-block;
  margin-bottom: 2rem;
}

#contatti .contact-email:hover {
  color: var(--grey);
}

#contatti .contact-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

#contatti .contact-links a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--light-grey);
  text-decoration: none;
  transition: color var(--transition);
}

#contatti .contact-links a:hover {
  color: var(--black);
}

/* ---- FOOTER ---- */

footer {
  padding: 2rem 2.5rem;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.04);
}

footer p {
  font-size: 0.7rem;
  color: var(--light-grey);
  letter-spacing: 0.08em;
  font-weight: 300;
}

/* ---- FADE IN ANIMATION ---- */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease, transform 1s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 968px) {
  #home .home-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  #home .home-text h1 {
    font-size: 2.2rem;
  }

  #home .home-image img {
    height: 50vh;
  }

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

  .lightbox-content {
    flex-direction: column;
    overflow-y: auto;
  }

  .lightbox-content img {
    max-width: 100%;
    max-height: 60vh;
  }
}

@media (max-width: 640px) {
  section {
    padding: 0 1.5rem;
  }

  nav .nav-inner {
    padding: 1rem 1.5rem;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(250, 250, 250, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.2rem;
    border-bottom: 1px solid rgba(0,0,0,0.04);
  }

  nav .nav-links.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
  }

  #home .home-text h1 {
    font-size: 1.8rem;
  }

  .filter-nav {
    gap: 1rem;
  }

  .cv-entry {
    flex-direction: column;
    gap: 0.2rem;
  }
}
