/* =============================================
   Andrew Tosiello — Portfolio
   Soft Brutalist / Fine Art
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300&family=DM+Serif+Display:ital@0;1&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1a1a18;
  --white: #f5f3ee;
  --gray-mid: #888780;
  --gray-light: #d3d1c7;
  --gray-lighter: #eeece8;
  --border-thin: 1px solid rgba(26,26,24,0.18);
  --border-mid: 1px solid rgba(26,26,24,0.35);
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-mono: 'DM Mono', 'Courier New', monospace;
  --nav-h: 56px;
  --page-pad: clamp(16px, 4vw, 48px);
  --transition: 0.15s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-mono);
  font-weight: 300;
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button { cursor: pointer; font-family: inherit; }
a { color: inherit; text-decoration: none; }

/* --- Layout --- */
.site-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* --- Nav --- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-top: 3px solid var(--black);
  border-bottom: var(--border-thin);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
}

.nav-logo {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

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

.nav-links a {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  transition: color var(--transition);
  padding-bottom: 2px;
}

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

.nav-links a.active {
  border-bottom: 1px solid var(--black);
}

/* --- Pages --- */
.page { display: none; padding-bottom: 80px; }
.page.active { display: block; }

/* --- Hero --- */
.hero {
  padding: clamp(32px, 6vw, 72px) 0 clamp(24px, 4vw, 48px);
  border-bottom: var(--border-thin);
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(48px, 9vw, 100px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.hero-title em {
  font-style: italic;
}

.hero-sub {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-mid);
}

/* --- Section Label --- */
.section-label {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-mid);
  border-bottom: var(--border-thin);
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: var(--gray-lighter);
  aspect-ratio: 3 / 4;
}

.gallery-item.featured {
  grid-row: span 2;
  aspect-ratio: unset;
}

.gallery-item img {
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--black);
  color: var(--white);
  padding: 8px 11px;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.cap-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.cap-meta {
  font-size: 10px;
  opacity: 0.55;
  letter-spacing: 0.03em;
}

/* --- Lightbox --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 20, 18, 0.94);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox.open {
  display: flex;
}

.lb-inner {
  position: relative;
  max-width: 560px;
  width: 100%;
}

.lb-image-wrap {
  width: 100%;
  background: var(--gray-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 75vh;
  overflow: hidden;
}

.lb-image-wrap img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.lb-info {
  background: #111110;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  border-top: 1px solid rgba(245,243,238,0.08);
}

.lb-title {
  font-size: 14px;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.lb-meta {
  font-size: 11px;
  color: rgba(245,243,238,0.5);
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.lb-close {
  background: none;
  border: 1px solid rgba(245,243,238,0.25);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  flex-shrink: 0;
  transition: border-color var(--transition);
}

.lb-close:hover { border-color: rgba(245,243,238,0.7); }

.lb-nav-btns {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: calc(100% + 100px);
  left: -50px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}

.lb-prev, .lb-next {
  background: none;
  border: none;
  color: rgba(245,243,238,0.5);
  font-size: 24px;
  padding: 16px 12px;
  pointer-events: all;
  transition: color var(--transition);
}

.lb-prev:hover, .lb-next:hover { color: var(--white); }

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  padding: 8px 0;
}

.about-name {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 20px;
}

.about-text {
  font-size: 13px;
  line-height: 1.85;
  color: #444441;
  margin-bottom: 18px;
}

.brut-btn {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  border: none;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 11px 22px;
  margin-top: 8px;
  cursor: pointer;
  transition: opacity var(--transition);
}

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

/* --- Row Lines --- */
.row-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: var(--border-thin);
  padding: 11px 0;
  font-size: 12px;
  gap: 16px;
}

.row-line .rl-label {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  flex-shrink: 0;
}

.row-line .rl-val {
  text-align: right;
  color: var(--black);
}

/* --- Contact Page --- */
.contact-intro {
  font-size: 14px;
  line-height: 1.85;
  color: #444441;
  max-width: 480px;
  margin-bottom: 32px;
}

/* --- Footer --- */
.site-footer {
  border-top: var(--border-thin);
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-mid);
  margin-top: 80px;
}

/* --- Mobile --- */
@media (max-width: 680px) {
  :root { --page-pad: 16px; }

  .nav-inner { padding: 12px 0; }
  .nav-logo { font-size: 10px; }
  .nav-links { gap: 16px; }

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

  /* On mobile, captions always visible — no hover */
  .gallery-caption {
    opacity: 1;
  }

  .lb-nav-btns {
    width: 100%;
    left: 0;
    top: auto;
    bottom: 56px;
    transform: none;
    padding: 0 8px;
  }

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

  .lightbox { padding: 0; align-items: flex-end; }

  .lb-inner { max-width: 100%; }

  .lb-image-wrap { aspect-ratio: 3/4; max-height: 65vh; }
}
