/* ======================================
   LEANDRO BELLONE — Portfolio Site
   ====================================== */

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

:root {
  --color-text: #222222;
  --color-bg: #ffffff;
  --color-light: #f5f5f5;
  --color-muted: #888888;
  --color-border: #e0e0e0;
  --nav-height: 60px;
  --font: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ======================================
   NAVIGATION
   ====================================== */

#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.nav-logo {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--color-text);
  text-transform: uppercase;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 36px;
}

.nav-link {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--color-muted);
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
}

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

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--color-text);
  transition: all 0.3s;
}

/* ======================================
   SECTIONS
   ====================================== */

.section {
  display: none;
  min-height: calc(100vh - var(--nav-height));
  padding-top: var(--nav-height);
}

.section.active {
  display: block;
}

/* ======================================
   WORK — PORTFOLIO GRID
   ====================================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
}

.portfolio-thumb {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, opacity 0.4s ease;
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.portfolio-item:hover .portfolio-thumb img {
  transform: scale(1.04);
}

.portfolio-title {
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 20px;
}

/* No image fallback — show project name centered */
.portfolio-thumb:not(:has(img[src])) .portfolio-title,
.portfolio-thumb .portfolio-overlay {
  /* always show title over dark bg when no image loads */
}

/* ======================================
   CONTENT PAGES (Press / About / Contact)
   ====================================== */

.content-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 40px;
}

/* ======================================
   PRESS
   ====================================== */

.press-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.press-item {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--color-border);
  text-decoration: none;
  color: var(--color-text);
  transition: opacity 0.2s;
}

.press-item:first-child {
  border-top: 1px solid var(--color-border);
}

.press-item:hover {
  opacity: 0.6;
}

.press-publication {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.press-title {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.4;
}

.press-arrow {
  font-size: 18px;
  color: var(--color-muted);
  transition: transform 0.2s;
}

.press-item:hover .press-arrow {
  transform: translateX(4px);
  color: var(--color-text);
}

/* ======================================
   ABOUT
   ====================================== */

.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-image img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.about-caption {
  margin-top: 12px;
  font-size: 12px;
  color: var(--color-muted);
  letter-spacing: 0.04em;
}

.about-text h1 {
  font-size: 26px;
  font-weight: 300;
  line-height: 1.35;
  margin-bottom: 32px;
  letter-spacing: -0.01em;
}

.about-text p {
  font-size: 15px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 20px;
}

.cta-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 2px;
  transition: opacity 0.2s;
}

.cta-link:hover {
  opacity: 0.5;
}

/* ======================================
   CONTACT
   ====================================== */

.contact-layout h1 {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.02em;
  margin-bottom: 48px;
}

.contact-form {
  max-width: 560px;
}

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 0;
  font-family: var(--font);
  font-size: 15px;
  color: var(--color-text);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-bottom-color: var(--color-text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #ccc;
}

.submit-btn {
  margin-top: 12px;
  background: var(--color-text);
  color: #fff;
  border: none;
  padding: 14px 36px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.submit-btn:hover {
  opacity: 0.75;
}

/* ======================================
   MOBILE NAV OPEN STATE
   ====================================== */

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

/* ======================================
   RESPONSIVE
   ====================================== */

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

  .about-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .press-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .press-arrow {
    display: none;
  }
}

@media (max-width: 640px) {
  #nav {
    padding: 0 20px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    flex-direction: column;
    padding: 20px 20px 30px;
    gap: 20px;
    border-bottom: 1px solid var(--color-border);
  }

  .nav-toggle {
    display: flex;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-page {
    padding: 40px 20px;
  }

  .contact-layout h1 {
    font-size: 26px;
    margin-bottom: 32px;
  }

  .about-text h1 {
    font-size: 22px;
  }
}

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

/* ======================================
   PROJECT MODAL
   ====================================== */

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 200;
}

.modal-backdrop.open {
  display: block;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 201;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
}

.modal.open {
  display: flex;
}

.modal-inner {
  display: grid;
  grid-template-columns: 1fr 380px;
  width: 92vw;
  max-width: 1200px;
  max-height: 90vh;
  background: #fff;
  margin: auto;
  position: relative;
  overflow: hidden;
}

.modal-gallery {
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-height: 400px;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 82vh;
  display: block;
  transition: opacity 0.25s ease;
}

.modal-info {
  padding: 48px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  overflow-y: auto;
}

.modal-info h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.modal-info p {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.modal-dots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.dot.active {
  background: #222;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 24px;
  z-index: 202;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px 8px;
  transition: opacity 0.2s;
}

.modal-close:hover { opacity: 1; }

.modal-prev,
.modal-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 202;
  background: rgba(34,34,34,0.7);
  border: none;
  color: #fff;
  font-size: 22px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.modal-prev { left: 16px; }
.modal-next { right: 16px; }
.modal-prev:hover, .modal-next:hover { background: rgba(34,34,34,0.95); }

/* Mobile modal */
@media (max-width: 768px) {
  .modal-inner {
    grid-template-columns: 1fr;
    max-height: 100dvh;
    width: 100vw;
    margin: 0;
  }

  .modal-gallery {
    min-height: 50vw;
    max-height: 55vw;
  }

  .modal-gallery img {
    max-height: 55vw;
  }

  .modal-info {
    padding: 28px 24px;
  }
}
