/**
 * style.css — Paolo Internò portfolio
 *
 * Palette: warm, dark editorial theme used site-wide (not just the
 * lightbox) — a deep umber background scale (--paper*), warm parchment
 * ink tones (--ink*) for text, and a brass --accent for hover states.
 * Change tokens in :root to re-theme.
 */

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

:root {
  --ink: #f4ece0;
  --ink-mid: #d9c9b3;
  --ink-light: #b39d80;
  --ink-dim: #8c7d6b;
  --paper: #201a14;
  --paper-dark: #100c08;
  --paper-mid: #17120d;
  --accent: #c89a4d;
  --sidebar-w: 270px;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Manrope', sans-serif;
  --radius: 3px;
  --tr: 0.18s ease
}

html,
body {
  height: 100%;
  background: var(--paper);
  color: var(--ink)
}

body {
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden
}

a {
  color: inherit;
  text-decoration: none
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}

.site {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 3rem 2rem;
  border-right: 1px solid var(--paper-dark);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  scrollbar-width: none
}

.sidebar::-webkit-scrollbar {
  display: none
}

.sidebar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--paper));
  pointer-events: none
}

.sig-wrap {
  margin-bottom: .3rem
}

.sig-wrap img {
  width: 100%;
  max-width: 240px;
  height: auto;
  display: block;
  opacity: .88
}

.sig-fallback {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--ink);
  display: none
}

.role {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 2.2rem
}

.divider {
  height: 1px;
  background: var(--paper-dark);
  margin-bottom: 1.6rem
}

.about-bio {
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.72;
  color: var(--ink-mid);
  margin-bottom: 1.6rem
}

.about-bio strong {
  color: var(--ink);
  font-weight: 500
}

.sidebar-label {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: .6rem
}

.sidebar-section {
  margin-bottom: 1.6rem
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-mid);
  padding: 4px 0;
  transition: color var(--tr), gap var(--tr)
}

.sidebar-link:hover {
  color: var(--ink);
  gap: 11px
}

.sidebar-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: .6;
  transition: opacity var(--tr)
}

.sidebar-link:hover svg {
  opacity: 1
}

.contact-block {
  margin-bottom: 1.6rem
}

.contact-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink-dim);
  margin-bottom: 1rem;
  letter-spacing: .02em
}

.avail-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6fa168;
  flex-shrink: 0;
}

.avail-dot {
  position: relative;
  overflow: visible
}

.avail-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(111, 161, 104, .5);
  animation: pulse 2.8s ease-in-out infinite;
  z-index: -1
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: .5
  }

  50% {
    transform: scale(2.2);
    opacity: 0
  }
}

.contact-email-row {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(244, 236, 224, .12);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: .55rem;
  transition: border-color var(--tr)
}

.contact-email-row:hover {
  border-color: rgba(244, 236, 224, .25)
}

.contact-email-label {
  background: rgba(255, 255, 255, .04);
  padding: .55rem .75rem;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(244, 236, 224, .08);
  flex-shrink: 0
}

.contact-email-label svg {
  width: 13px;
  height: 13px;
  color: var(--ink-dim);
  opacity: .7
}

.contact-email-link {
  flex: 1;
  padding: .55rem .8rem;
  font-size: 11.5px;
  color: var(--ink-mid);
  letter-spacing: .01em;
  display: flex;
  align-items: center;
  transition: color var(--tr)
}

.contact-email-link:hover {
  color: var(--ink)
}

.contact-cta {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  background: rgba(200, 154, 77, .08);
  border: 1px solid rgba(244, 236, 224, .1);
  border-radius: var(--radius);
  color: var(--ink-mid);
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 400;
  text-align: center;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background var(--tr), color var(--tr), border-color var(--tr)
}

.contact-cta:hover {
  background: rgba(200, 154, 77, .12);
  color: var(--ink);
  border-color: rgba(244, 236, 224, .22)
}

.sidebar-caption-area {
  margin-bottom: 1.6rem;
  display: none
}

.sidebar-caption-area.active {
  display: block
}

.sidebar-caption-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-style: italic;
  color: var(--ink);
  margin-bottom: .2rem;
  line-height: 1.35
}

.sidebar-caption-meta {
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: .85rem
}

.sidebar-nav-btns {
  display: flex;
  gap: 8px
}

.sidebar-nav-btn {
  flex: 1;
  padding: 7px 0;
  background: transparent;
  border: 1px solid var(--paper-dark);
  border-radius: var(--radius);
  color: var(--ink-mid);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--tr), color var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px
}

.sidebar-nav-btn:hover {
  background: rgba(200, 154, 77, .08);
  color: var(--ink)
}

.sidebar-nav-btn svg {
  width: 11px;
  height: 11px
}

.gallery-area {
  padding: 3rem 2.5rem;
  background: var(--paper)
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px
}

.gallery-item {
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--paper-dark);
  border-radius: var(--radius);
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  opacity: 0;
  animation: fadeUp .5s ease forwards
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.25, .46, .45, .94), filter .3s ease
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(244, 236, 224, 0);
  transition: border-color .25s ease;
  pointer-events: none;
  z-index: 2
}

.gallery-item:hover::after {
  border-color: rgba(244, 236, 224, .15)
}

.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(16, 12, 8, .75) 0%, transparent 52%);
  opacity: 0;
  transition: opacity .25s ease;
  display: flex;
  align-items: flex-end;
  padding: 12px 14px;
  z-index: 1
}

.gallery-item:focus-visible {
  outline: 2px solid rgba(244, 236, 224, .4);
  outline-offset: 2px
}

.gallery-item:focus-visible .item-overlay {
  opacity: 1
}

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

.item-label {
  font-family: var(--font-serif);
  font-size: 13.5px;
  font-style: italic;
  color: rgba(244, 236, 224, .94)
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(14px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@media(prefers-reduced-motion:reduce) {
  .gallery-item {
    animation: none;
    opacity: 1
  }
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 12, 8, .95);
  cursor: zoom-out
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  height: 100%;
  align-items: stretch
}

.lightbox-scroll-area {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
  padding: 4rem 3rem 4rem;
  scrollbar-width: thin;
  scrollbar-color: var(--paper-dark) transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem
}

.lightbox-scroll-area::-webkit-scrollbar {
  width: 4px
}

.lightbox-scroll-area::-webkit-scrollbar-thumb {
  background: var(--paper-dark);
  border-radius: 2px
}

.lightbox-process-item {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem
}

.lightbox-process-item img {
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .7);
  display: block
}

.lightbox-panel {
  width: 255px;
  flex-shrink: 0;
  background: var(--paper-mid);
  border-left: 1px solid var(--paper-dark);
  display: flex;
  flex-direction: column;
  padding: 2.5rem 1.8rem 2rem
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.3rem;
  background: transparent;
  border: none;
  color: var(--ink-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color var(--tr);
  z-index: 10
}

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

.lightbox-close-mobile {
  display: none
}

.lightbox-counter {
  font-size: 9px;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1rem
}

.lightbox-title {
  font-family: var(--font-serif);
  font-size: 21px;
  font-style: italic;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: .3rem
}

.lightbox-meta {
  font-size: 9px;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 1.4rem
}

.lightbox-desc {
  font-family: var(--font-serif);
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--ink-mid);
  flex: 1
}

.lightbox-divider {
  height: 1px;
  background: var(--paper-dark);
  margin: 1.4rem 0
}

.lightbox-nav {
  display: flex;
  gap: 8px
}

.lightbox-nav-btn {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: 1px solid var(--paper-dark);
  border-radius: var(--radius);
  color: var(--ink-mid);
  font-family: var(--font-sans);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--tr), color var(--tr);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px
}

.lightbox-nav-btn:hover {
  background: rgba(200, 154, 77, .08);
  color: var(--ink)
}

.lightbox-nav-btn svg {
  width: 12px;
  height: 12px
}

.lightbox-panel {
  transform: translateX(18px);
  opacity: 0;
  transition: transform .32s cubic-bezier(.25, .46, .45, .94), opacity .28s ease
}

.lightbox.open .lightbox-panel {
  transform: translateX(0);
  opacity: 1
}

.mobile-bottom-contact {
  display: none
}

.legal-notice {
  text-align: center;
  padding: 1.2rem 1rem;
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 400;
  color: var(--ink-dim);
  letter-spacing: .13em;
  text-transform: uppercase;
  border-top: 1px solid var(--paper-dark);
  background: var(--paper)
}

@media(max-width:768px) {
  .site {
    grid-template-columns: 1fr
  }

  .sidebar {
    position: relative;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--paper-dark);
    padding: 0;
    background: var(--paper);
    display: block
  }

  .sidebar::after {
    display: none
  }

  .sidebar-text-content {
    padding: 2rem 1.4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center
  }

  .sidebar-text-content .sig-wrap {
    display: flex;
    justify-content: center
  }

  .sidebar-text-content .sig-wrap img {
    max-width: 180px
  }

  .sidebar-text-content .divider {
    width: 100%
  }

  .sidebar-caption-area,
  .sidebar-divider-before-social,
  .sidebar-section {
    display: none !important
  }

  .contact-block {
    width: 100%;
    max-width: 300px;
    margin-bottom: 0
  }

  .contact-email-row {
    width: 100%
  }

  .contact-cta {
    width: 100%
  }

  .contact-status {
    justify-content: center
  }

  .gallery-area {
    padding: 1.4rem 1rem 2.5rem
  }

  .gallery-grid {
    gap: 8px;
    flex-direction: column
  }

  .gallery-item {
    flex: none !important;
    width: 100% !important;
    height: 220px !important
  }

  .mobile-bottom-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.4rem;
    border-top: 1px solid var(--paper-dark);
    background: var(--paper);
    text-align: center
  }

  .mobile-bottom-contact .contact-block {
    width: 100%;
    max-width: 300px;
    margin-bottom: 0
  }

  .mobile-bottom-contact .contact-status {
    justify-content: center
  }

  .mobile-bottom-contact .contact-email-row {
    width: 100%
  }

  .mobile-bottom-contact .contact-cta {
    width: 100%
  }

  .mobile-bottom-contact .divider {
    width: 100%;
    max-width: 300px;
    margin: 1.6rem 0 1.6rem
  }

  .mobile-bottom-contact .sidebar-section {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 300px;
    margin-bottom: 0
  }

  .mobile-bottom-contact .sidebar-link {
    justify-content: center
  }

  .lightbox-inner {
    flex-direction: column
  }

  .lightbox-scroll-area {
    padding: 3.5rem 1rem 8rem;
    gap: 2rem
  }

  .lightbox-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-left: none;
    border-top: 1px solid var(--paper-dark);
    background: var(--paper-mid);
    padding: 1rem 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    z-index: 10
  }

  .lightbox-close-mobile {
    display: flex;
    order: 1;
    align-items: center;
    justify-content: flex-end;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 18px;
    color: var(--ink-dim);
    padding: 0 0 6px 0;
    transition: color var(--tr);
    line-height: 1
  }

  .lightbox-close-mobile:hover {
    color: var(--ink)
  }

  .lightbox-counter {
    font-size: 9px;
    order: 2
  }

  .lightbox-title {
    font-size: 16px;
    margin-bottom: 0;
    order: 3
  }

  .lightbox-meta {
    margin-bottom: 0;
    order: 4
  }

  .lightbox-desc {
    font-size: 12px;
    line-height: 1.6;
    order: 5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden
  }

  .lightbox-divider {
    display: none
  }

  .lightbox-nav {
    order: 6
  }

  .lightbox-counter,
  .lightbox-title,
  .lightbox-meta,
  .lightbox-desc,
  .lightbox-nav,
  .lightbox-close-mobile {
    width: 100%
  }
}

@media(max-width:480px) {
  .gallery-item {
    height: 180px !important
  }
}

.gallery-item figure {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%
}

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

.gallery-item figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0
}