/* Benanti Portfolio — Site Styles
   Builds on colors_and_type.css design tokens.
   ─────────────────────────────────────────── */

/* ── MAP DESIGN TOKENS TO LOCAL ALIASES ── */
:root {
  --font:     var(--bp-font-sans);
  --mono:     var(--bp-font-mono);
  --black:    var(--bp-black);
  --white:    var(--bp-white);
  --gray-600: var(--bp-gray-600);
  --gray-500: var(--bp-gray-500);
  --gray-100: var(--bp-gray-100);
  --gray-50:  var(--bp-gray-50);
  --focus:    var(--bp-focus);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; cursor: none !important; }

/* ── ACCENT ─────────────────────────────────────── */
:root { --accent: #F48C06; }

/* ── CURSOR ─────────────────────────────────────── */
.cursor {
  position: fixed; top: 0; left: 0;
  width: 12px; height: 12px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  will-change: transform;
  transition: opacity .15s;
}
.cursor.hovering {
  opacity: 0.4;
}
@media (hover: none) {
  * { cursor: auto !important; }
  .cursor { display: none; }
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
}

/* ── NAV ──────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 40px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: rgba(0,0,0,0.06) 0px -1px 0px 0px inset;
  transition: background .3s;
}
nav.dark {
  background: rgba(23,23,23,0.95);
  box-shadow: rgba(255,255,255,0.06) 0px -1px 0px 0px inset;
}
nav.menu-open {
  background: rgba(255,255,255,0.97);
  box-shadow: rgba(0,0,0,0.06) 0px -1px 0px 0px inset;
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; cursor: pointer; background: none; border: none; padding: 0;
  color: var(--black); transition: color .3s;
}
nav.dark .nav-logo { color: #fff; }
nav.menu-open .nav-logo { color: var(--black); }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1; gap: 2px; }
.nav-logo-name {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  letter-spacing: 2px; color: var(--black);
  transition: color .3s;
}
nav.dark .nav-logo-name { color: #fff; }
nav.menu-open .nav-logo-name { color: var(--black); }
.nav-logo-sub {
  font-family: var(--mono); font-size: 9px; color: #aaa;
  transition: color .3s;
}
nav.dark .nav-logo-sub { color: rgba(255,255,255,0.35); }
nav.menu-open .nav-logo-sub { color: #aaa; }

.nav-links { display: flex; gap: 28px; }
.nav-link {
  font-family: var(--font); font-size: 13px; font-weight: 500;
  color: #666; text-decoration: none; cursor: pointer;
  background: none; border: none; padding: 0;
  transition: color .2s;
  position: relative;
}
.nav-link::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transition: transform .2s;
}
.nav-link:hover { color: var(--black); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--black); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }
nav.dark .nav-link { color: rgba(255,255,255,0.5); }
nav.dark .nav-link::after { background: var(--accent); }
nav.dark .nav-link:hover,
nav.dark .nav-link.active { color: #fff; }

.nav-cta {
  font-family: var(--font); font-size: 13px; font-weight: 500;
  background: var(--black); color: #fff;
  padding: 7px 18px; border-radius: 9999px; border: none; cursor: pointer;
  transition: opacity .15s;
  text-decoration: none;
}
.nav-cta:hover { opacity: 0.8; }
nav.dark .nav-cta { background: #fff; color: var(--black); }

/* ── HAMBURGER ──────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  width: 32px;
  height: 32px;
}
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--black);
  transition: transform .28s cubic-bezier(0.16,1,0.3,1), opacity .2s;
  transform-origin: center;
}
nav.dark .nav-hamburger span { background: #fff; }
nav.menu-open .nav-hamburger span { background: var(--black); }
nav.menu-open .nav-hamburger span:first-child { transform: translateY(7.5px) rotate(45deg); }
nav.menu-open .nav-hamburger span:last-child  { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MOBILE MENU ────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: 56px; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 199;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 32px 80px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-link {
  font-family: var(--font);
  font-size: clamp(36px, 10vw, 52px);
  font-weight: 600;
  letter-spacing: -0.05em;
  color: var(--black);
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0;
  text-align: left;
  line-height: 1.1;
  transition: opacity .15s;
  display: block;
}
.mobile-link:hover { opacity: 0.35; }
.mobile-menu-cta {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  background: var(--black);
  color: #fff;
  padding: 12px 28px;
  border-radius: 9999px;
  text-decoration: none;
  margin-top: 36px;
  display: inline-block;
  transition: opacity .15s;
}
.mobile-menu-cta:hover { opacity: 0.8; }

/* ── SECTIONS ───────────────────────────────── */
section { position: relative; }

/* ── HERO ───────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px 40px 0;
  border-bottom: 1px solid var(--gray-100);
}
.hero-name {
  font-size: clamp(80px, 14vw, 160px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -0.055em;
  color: var(--black);
  text-wrap: balance;
}
.hero-sub {
  margin-top: 28px;
  font-size: 16px; font-weight: 400; color: var(--gray-600); line-height: 1.6;
}
.hero-mono {
  margin-top: 20px;
  font-family: var(--mono); font-size: 11px; color: #aaa; letter-spacing: 0.3px;
}
.hero-bottom {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-top: 80px;
}
.hero-scroll-line { display: flex; align-items: flex-end; gap: 16px; }
.hero-vr { width: 1px; height: 64px; background: var(--gray-100); }
.hero-scroll-label {
  font-family: var(--mono); font-size: 10px; color: #bbb;
  writing-mode: horizontal-tb; margin-bottom: 4px;
}
.hero-socials { display: flex; gap: 28px; padding-bottom: 32px; }
.hero-social {
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: #888; background: none; border: none; cursor: pointer; padding: 0;
  transition: color .15s; text-decoration: none;
}
.hero-social:hover { color: var(--black); }

/* ── ABOUT ──────────────────────────────────── */
#about {
  background: var(--black);
  padding: 100px 40px;
}
.about-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  max-width: 1100px; margin: 0 auto;
}
.about-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: rgba(255,255,255,0.25); letter-spacing: 1.5px;
  text-transform: uppercase; margin-bottom: 28px;
}
.about-headline {
  font-size: clamp(32px, 4vw, 52px); font-weight: 600;
  line-height: 1.05; letter-spacing: -0.05em; color: #fff;
}
.about-body {
  font-size: 16px; font-weight: 400; line-height: 1.8;
  color: rgba(255,255,255,0.5); margin-bottom: 36px;
}
.about-skills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.about-skill {
  font-family: var(--font); font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.65);
  background: rgba(255,255,255,0.07);
  padding: 5px 12px; border-radius: 9999px;
  box-shadow: rgba(255,255,255,0.1) 0 0 0 1px;
}
.about-link {
  font-size: 13px; font-weight: 500; color: #fff;
  background: none; border: none; cursor: pointer; padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 2px;
  transition: border-color .2s;
  text-decoration: none;
}
.about-link:hover { border-color: #fff; }

/* ── PROJECTS ───────────────────────────────── */
#projects {
  padding: 0 0 80px;
  border-bottom: 1px solid var(--gray-100);
}
.projects-header {
  padding: 64px 40px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: baseline; gap: 12px;
}
.projects-title { font-size: 32px; font-weight: 600; letter-spacing: -1.28px; }
.projects-count { font-family: var(--mono); font-size: 13px; color: #aaa; }
.projects-filters {
  padding: 14px 40px; border-bottom: 1px solid var(--gray-100);
  display: flex; gap: 8px; flex-wrap: wrap;
}
.filter-btn {
  font-family: var(--font); font-size: 12px; font-weight: 500;
  padding: 5px 14px; border-radius: 9999px; border: none; cursor: pointer;
  transition: all .15s;
  background: var(--white); color: #666;
  box-shadow: rgb(235,235,235) 0 0 0 1px;
}
.filter-btn.active { background: var(--black); color: #fff; box-shadow: none; }
.filter-btn:not(.active):hover { background: var(--gray-50); color: var(--black); }

.project-row {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--gray-100);
  cursor: pointer; transition: background .2s;
  text-decoration: none; color: inherit;
}
.project-row:hover { background: var(--gray-50); }
.project-num {
  padding: 32px 16px 32px 40px; padding-top: 36px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  color: #bbb; width: 60px; flex-shrink: 0;
}
.project-content { flex: 1; padding: 28px 0; }
.project-name { font-size: 20px; font-weight: 600; letter-spacing: -0.5px; margin-bottom: 8px; }
.project-desc { font-size: 14px; color: var(--gray-600); line-height: 1.65; max-width: 540px; margin-bottom: 12px; }
.project-meta { display: flex; gap: 16px; align-items: center; }
.project-tag {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: #aaa; text-transform: uppercase; letter-spacing: 0.4px;
}
.project-year { font-family: var(--mono); font-size: 10px; color: #ccc; }
.project-right { display: flex; align-items: center; gap: 16px; padding: 0 40px; }
.project-thumb {
  width: 0; height: 56px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  transition: width .25s cubic-bezier(0.16,1,0.3,1);
  display: flex; align-items: center; justify-content: center;
}
.project-row:hover .project-thumb { width: 80px; }
.project-cta {
  font-size: 12px; font-weight: 500; color: var(--black);
  opacity: 0; transition: opacity .2s; white-space: nowrap;
}
.project-row:hover .project-cta { opacity: 1; }

/* ── PHOTOGRAPHY ────────────────────────────── */
#photography {
  padding: 80px 40px;
  border-bottom: 1px solid var(--gray-100);
}
.photo-header { margin-bottom: 40px; display: flex; align-items: baseline; gap: 12px; }
.photo-title { font-size: 32px; font-weight: 600; letter-spacing: -1.28px; }
.photo-sub { font-family: var(--mono); font-size: 12px; color: #aaa; }

.photo-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.photo-group {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}
.photo-cell {
  border-radius: 8px; overflow: hidden;
  box-shadow: rgb(235,235,235) 0 0 0 1px;
  cursor: pointer;
  position: relative;
  background: #ebebeb;
}
.photo-cell img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  opacity: 0;
  transition: opacity .5s ease, transform .4s cubic-bezier(0.16,1,0.3,1);
}
.photo-cell img.is-loaded {
  opacity: 1;
}
.photo-cell:hover img { transform: scale(1.03); }
.photo-cell-overlay {
  position: absolute; inset: 0;
  background: rgba(23,23,23,0);
  transition: background .3s;
  display: flex; align-items: flex-end; padding: 16px;
}
.photo-cell:hover .photo-cell-overlay { background: rgba(23,23,23,0.35); }
.photo-cell-label {
  font-family: var(--mono); font-size: 11px; color: #fff;
  opacity: 0; transition: opacity .25s; letter-spacing: 0.3px;
}
.photo-cell:hover .photo-cell-label { opacity: 1; }
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.photo-dot { border-radius: 50%; opacity: 0.5; }

/* ── CONTACT ────────────────────────────────── */
#contact {
  padding: 100px 40px 80px;
  background: var(--white);
}
.contact-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  max-width: 1100px; margin: 0 auto;
}
.contact-label {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  color: #aaa; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 24px;
}
.contact-headline {
  font-size: clamp(40px, 5vw, 64px); font-weight: 600;
  line-height: 1.0; letter-spacing: -0.055em; color: var(--black);
  margin-bottom: 24px;
}
.contact-tagline {
  font-size: 16px; color: var(--gray-600); line-height: 1.7; max-width: 380px; margin-bottom: 40px;
}
.contact-links { display: flex; flex-direction: column; gap: 12px; }
.contact-ext-link {
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: #888;
  text-decoration: none; transition: color .15s;
}
.contact-ext-link:hover { color: var(--black); }

.contact-form { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; pointer-events: none; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 500; color: #666; }
.form-input, .form-textarea {
  font-family: var(--font); font-size: 14px; color: var(--black);
  background: var(--white); border: none;
  box-shadow: rgba(0,0,0,0.08) 0 0 0 1px;
  border-radius: 6px; padding: 10px 14px; outline: none;
  transition: box-shadow .15s;
}
.form-input:focus, .form-textarea:focus {
  box-shadow: rgba(0,0,0,0.08) 0 0 0 1px, 0 0 0 3px rgba(244,140,6,.15);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit {
  font-family: var(--font); font-size: 14px; font-weight: 500;
  background: var(--black); color: #fff;
  padding: 12px 24px; border-radius: 6px; border: none;
  align-self: flex-start; transition: background .2s, opacity .15s; margin-top: 8px;
}
.form-submit:hover { background: var(--accent); opacity: 1; }

/* ── FOOTER ─────────────────────────────────── */
footer {
  border-top: 1px solid var(--gray-100);
  padding: 24px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-copy { font-family: var(--mono); font-size: 11px; color: #bbb; }
.footer-links { display: flex; gap: 24px; }
.footer-link {
  font-family: var(--mono); font-size: 11px; color: #aaa;
  text-decoration: none; transition: color .15s;
}
.footer-link:hover { color: var(--black); }

/* ── ABOUT PHOTO ────────────────────────────── */
.about-left {
  display: flex;
  flex-direction: column;
}
.about-photo-wrap {
  flex: 1;
  min-height: 200px;
  margin-top: 0;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}
.about-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── PROJECT DETAIL PANEL ───────────────────── */
.project-detail {
  overflow: hidden;
  border-bottom: 1px solid var(--gray-100);
}
.project-detail-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 40px 48px 60px;
}
.project-detail-image {
  border-radius: 8px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-detail-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-detail-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--gray-600);
  margin-bottom: 32px;
}
.project-detail-cta {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid rgba(23,23,23,0.25);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.project-detail-cta:hover { border-color: var(--black); }

.project-row.active { background: var(--gray-50); }
.project-row.active .project-cta { opacity: 1; }

/* ── PROJECT DETAIL MATERIALS ───────────────── */
.project-detail-materials {
  margin-bottom: 32px;
}
.project-detail-materials-label {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  color: #aaa;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.project-detail-materials-list {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ── PHOTO LIGHTBOX ─────────────────────────── */
.photo-cell[data-photo] { cursor: zoom-in; }

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(23,23,23,0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
}
.photo-lightbox.open { pointer-events: auto; }

.lightbox-close {
  position: absolute;
  top: 24px; right: 32px;
  font-family: var(--mono);
  font-size: 22px;
  line-height: 1;
  color: rgba(255,255,255,0.45);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
  padding: 4px;
}
.lightbox-close:hover { color: #fff; }

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 18px;
  color: rgba(255,255,255,0.3);
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s;
  padding: 20px 28px;
}
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }
.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 56px 100px;
}
.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  display: block;
}
.lightbox-label {
  position: absolute;
  bottom: 28px; left: 50%; transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.lightbox-counter {
  position: absolute;
  top: 28px; left: 32px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255,255,255,0.25);
}

/* ── MOBILE ─────────────────────────────────── */
@media (max-width: 768px) {

  /* Nav */
  nav { padding: 0 20px; }
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }

  /* Hero */
  #hero { padding: 90px 20px 40px; }
  .hero-name { font-size: clamp(48px, 13vw, 80px); }
  .hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
  .hero-socials { padding-bottom: 0; gap: 20px; }

  /* About */
  #about { padding: 64px 20px; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  .about-photo-wrap {
    flex: none;
    width: 100%;
    height: 220px;
    min-height: unset;
    border-radius: 6px;
  }

  /* Projects */
  #projects { padding-bottom: 48px; }
  .projects-header { padding: 40px 20px 16px; }
  .projects-filters { padding: 12px 20px; }
  .project-num { padding: 20px 8px 20px 20px; width: 44px; }
  .project-content { padding: 16px 0; }
  .project-desc { font-size: 13px; max-width: 100%; }
  .project-right { padding: 0 16px; gap: 8px; }

  /* Photography */
  #photography { padding: 48px 20px; }
  .photo-grid { gap: 24px; }
  .photo-group { grid-template-columns: 1fr 1fr; gap: 8px; }
  .photo-cell {
    grid-column: auto !important;
    height: 160px !important;
    min-height: unset !important;
  }

  /* Contact */
  #contact { padding: 64px 20px; }
  .contact-inner { grid-template-columns: 1fr; gap: 48px; }
  .contact-tagline { max-width: 100%; }

  /* Footer */
  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 24px 20px;
  }

  /* Project detail */
  .project-detail-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 20px;
  }
  .project-detail-image { aspect-ratio: 16 / 9; }

  /* Lightbox */
  .lightbox-content { padding: 56px 20px; }
  .lightbox-prev { padding: 20px 16px; }
  .lightbox-next { padding: 20px 16px; }
  .lightbox-close { top: 20px; right: 20px; }
  .lightbox-counter { left: 20px; }
}
