/* ─────────────────────────────────────────────────────────
   BENGA — Portfolio
   Black + White only. Swiss design meets creative coder.
   Font: Inter (optical sizing — display at large scale)
───────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* ── Reset ── */

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

html {
  scroll-behavior: smooth;
  font-optical-sizing: auto;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  color: #000;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: crosshair;
}

a {
  color: inherit;
  cursor: crosshair;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* ── Navigation ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 3rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #000;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

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

.nav-links a {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: #000;
  transition: width 0.28s ease;
}

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

/* ── Hero ── */

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10rem 3rem 6rem;
}

.hero-tagline {
  font-size: clamp(3rem, 8vw, 8.5rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
  max-width: 13ch;
  animation: hero-in 0.9s ease both;
  animation-delay: 0.15s;
}

.hero-tagline em {
  font-style: italic;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.hero-scroll-hint {
  display: inline-block;
  margin-top: 4rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.35;
  text-decoration: none;
  transition: opacity 0.2s;
  animation: hero-in 0.9s ease both;
  animation-delay: 0.35s;
}

.hero-scroll-hint:hover {
  opacity: 0.9;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Work Section ── */

#work {
  border-top: 1px solid #000;
  padding: 5rem 3rem 6rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
}

.section-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.section-count {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  opacity: 0.35;
}

/* ── Projects Grid ── */

.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #000;
}

.project-box {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: #fff;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  cursor: crosshair;
}

.project-box:nth-child(even) {
  border-right: none;
}

.project-box:nth-child(n+3) {
  border-bottom: none;
}

.project-box:hover {
  z-index: 10;
}

.icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  pointer-events: none;
  position: relative;
  z-index: 1;
  transition: filter 0.25s ease;
}

.icon-slot svg,
.icon-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.placeholder-icon {
  width: 44px;
  height: 44px;
  color: #000;
  opacity: 0.1;
  flex-shrink: 0;
}

.project-label {
  position: absolute;
  bottom: 1.25rem;
  left: 1.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.18;
  pointer-events: none;
  z-index: 1;
  transition: color 0.2s ease;
}

.project-box:hover .project-label {
  color: #fff;
  opacity: 0.35;
}

/* ═══════════════════════════════════════════════════════════
   HOVER — Expanding square fill + trailing white outline
   ::before  black fill, expands from center point outward.
   ::after   white square outline, chases the fill ~60ms later.
═══════════════════════════════════════════════════════════ */

/* ── Black fill ── */
.project-box::before {
  content: '';
  position: absolute;
  inset: 50%;
  background: #000;
  z-index: 0;
  transition: inset 0.25s cubic-bezier(0.7, 0, 0.15, 1);
}

.project-box:hover::before {
  inset: 0;
}

/* ── White outline — starts at outer edge, sweeps inward ── */
.project-box::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid #fff;
  z-index: 2;
  pointer-events: none;
  transition: inset 0.25s cubic-bezier(0.7, 0, 0.15, 1);
  transition-delay: 0.06s;
}

.project-box:hover::after {
  inset: 40px;
}

.project-box:hover .icon-slot {
  filter: invert(1);
}


/* ── About Section ── */

#about {
  border-top: 1px solid #000;
}

.about-manifesto {
  padding: 5rem 3rem;
  border-bottom: 1px solid #000;
  font-size: clamp(1.65rem, 3.2vw, 3rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 24ch;
}

.about-manifesto em {
  font-style: normal;
  font-weight: 800;
}

.about-body {
  padding: 5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 6rem;
  align-items: start;
}

.about-text .section-label {
  margin-bottom: 2rem;
}

.about-bio {
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.75;
  opacity: 0.8;
  max-width: 52ch;
}

.about-bio + .about-bio {
  margin-top: 1.25rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 2.5rem;
}

.tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border: 1px solid #000;
  white-space: nowrap;
}

/* Stats column */

.about-stats {
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  padding-left: 2.5rem;
}

.about-stat {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.about-stat:first-child {
  padding-top: 0;
}

.about-stat:last-child {
  border-bottom: none;
}

.stat-n {
  display: block;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 0.4rem;
}

.stat-l {
  display: block;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.38;
}

/* ── Contact Section ── */

#contact {
  border-top: 1px solid #000;
  padding: 8rem 3rem 7rem;
}

.contact-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.contact-heading {
  font-size: clamp(3.5rem, 7.5vw, 7.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.contact-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1.1rem;
  padding-bottom: 0.5rem;
}

.contact-link {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-bottom: 1.5px solid #000;
  padding-bottom: 0.15rem;
  transition: opacity 0.2s;
}

.contact-link:hover {
  opacity: 0.4;
}

/* ── Footer ── */

footer {
  border-top: 1px solid #000;
  padding: 1.4rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

footer p {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.32;
}

/* ═══════════════════════════════════════════════════════════
   PROJECT PAGES
═══════════════════════════════════════════════════════════ */

.project-hero {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 9rem 3rem 5rem;
  border-bottom: 1px solid #000;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  margin-bottom: 3.5rem;
  opacity: 0.38;
  transition: opacity 0.2s;
}

.back-link:hover {
  opacity: 1;
}

.back-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.back-link:hover .back-arrow {
  transform: translateX(-4px);
}

.project-meta-row {
  display: flex;
  gap: 3.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.meta-label {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.32;
}

.meta-value {
  font-size: 0.85rem;
  font-weight: 500;
}

.project-title {
  font-size: clamp(3rem, 7.5vw, 7rem);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.035em;
}

/* Project body content */

.project-body {
  padding: 6rem 3rem;
}

.project-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  margin-bottom: 6rem;
  padding-bottom: 6rem;
  border-bottom: 1px solid #000;
}

.project-intro h2 {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.project-intro p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  opacity: 0.75;
}

.project-intro p + p {
  margin-top: 1rem;
}

/* Image placeholders */

.img-placeholder {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.img-placeholder span {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.28;
}

.img-full {
  width: 100%;
  height: 540px;
}

.img-half {
  height: 380px;
  flex: 1;
}

.img-pair {
  display: flex;
  gap: 2px;
  margin-bottom: 2px;
}

.img-row {
  margin-bottom: 5rem;
}

/* Process section */

.process-section {
  margin-bottom: 6rem;
}

.process-section h3 {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #000;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: #000;
}

.process-card {
  background: #fff;
  padding: 2.5rem 2rem;
}

.process-num {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  opacity: 0.28;
  margin-bottom: 1.25rem;
}

.process-card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.process-card p {
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.7;
  opacity: 0.7;
}

/* Next project link */

.next-project {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4rem 3rem;
  border-top: 1px solid #000;
  text-decoration: none;
  cursor: crosshair;
  transition: background 0.35s ease, color 0.35s ease;
}

.next-project:hover {
  background: #000;
  color: #fff;
}

.next-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.next-eyebrow {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.38;
  transition: opacity 0.35s;
}

.next-project:hover .next-eyebrow {
  opacity: 0.65;
}

.next-title {
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.next-arrow {
  font-size: 2.5rem;
  font-weight: 300;
  line-height: 1;
  transition: transform 0.3s ease;
}

.next-project:hover .next-arrow {
  transform: translateX(10px);
}

/* ── Responsive ── */

@media (max-width: 960px) {
  nav {
    padding: 1.1rem 1.5rem;
  }

  .nav-links {
    gap: 1.75rem;
  }

  #hero {
    padding: 8rem 1.5rem 4rem;
  }

  #work {
    padding: 4rem 1.5rem 5rem;
  }

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

  .project-box {
    border-right: none;
    aspect-ratio: 16 / 9;
  }

  .project-box:nth-child(even) {
    border-right: none;
  }

  .project-box:nth-child(n+3) {
    border-bottom: 1px solid #000;
  }

  .project-box:last-child {
    border-bottom: none;
  }

  .about-manifesto {
    padding: 3.5rem 1.5rem;
  }

  .about-body {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 3.5rem 1.5rem;
  }

  .about-stats {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    padding-left: 0;
    padding-top: 2.5rem;
    flex-direction: row;
    gap: 0;
  }

  .about-stat {
    flex: 1;
    padding: 0 1.5rem 0 0;
    border-bottom: none;
    border-right: 1px solid rgba(0, 0, 0, 0.1);
  }

  .about-stat:last-child {
    border-right: none;
    padding-right: 0;
    padding-left: 1.5rem;
  }

  .about-stat:not(:first-child):not(:last-child) {
    padding-left: 1.5rem;
  }

  .stat-n {
    font-size: 3rem;
  }

  #contact {
    padding: 5rem 1.5rem 5rem;
  }

  .contact-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 3rem;
  }

  .contact-actions {
    align-items: flex-start;
  }

  footer {
    padding: 1.25rem 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  /* Project pages mobile */
  .project-hero {
    padding: 8rem 1.5rem 4rem;
  }

  .project-body {
    padding: 4rem 1.5rem;
  }

  .project-intro {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
  }

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

  .img-full {
    height: 260px;
  }

  .img-half {
    height: 200px;
  }

  .img-pair {
    flex-direction: column;
  }

  .next-project {
    padding: 3rem 1.5rem;
  }
}
