/* ============================================
   Minimal portfolio stylesheet
   White background, black text, Inter, images first
   ============================================ */

:root {
  --text: #000;
  --text-light: #888;
  --bg: #fff;
  --max-width: 1400px;
  --gutter: 24px;
  --nav-height: 80px;
}

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

html {
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a {
  color: var(--text);
  text-decoration: none;
}

/* ---------- Navigation ---------- */

.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-height);
}

.site-nav .nav-name {
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.02em;
}

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

.site-nav .nav-links a {
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
}

.site-nav .nav-links a:hover {
  color: var(--text-light);
}

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

/* ---------- Page container ---------- */

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter) 80px;
}

.page-title {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 32px;
}

/* ---------- Category grid (homepage) ---------- */

.category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
}

.category-card {
  display: block;
}

.category-card img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.category-card:hover img {
  opacity: 0.85;
}

.category-card .category-title {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ---------- Gallery grid (aspect-ratio flexible 2-column) ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gutter);
  align-items: start; /* lets mixed aspect ratios sit naturally */
}

.gallery-grid a {
  display: block;
  cursor: pointer;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  transition: opacity 0.3s ease;
}

.gallery-grid a:hover img {
  opacity: 0.85;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  width: auto;
  height: auto;
}

.lightbox .lightbox-close,
.lightbox .lightbox-prev,
.lightbox .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-weight: 300;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lightbox .lightbox-close:hover,
.lightbox .lightbox-prev:hover,
.lightbox .lightbox-next:hover {
  opacity: 1;
}

.lightbox .lightbox-close {
  top: 24px;
  right: 32px;
  font-size: 32px;
  line-height: 1;
}

.lightbox .lightbox-prev,
.lightbox .lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  line-height: 1;
  padding: 20px;
}

.lightbox .lightbox-prev { left: 16px; }
.lightbox .lightbox-next { right: 16px; }

/* ---------- About page ---------- */

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

.about-layout img {
  width: 100%;
  height: auto;
}

.about-text p {
  margin-bottom: 1.2em;
  max-width: 480px;
}

.about-text a {
  border-bottom: 1px solid var(--text);
}

.about-text a:hover {
  color: var(--text-light);
  border-bottom-color: var(--text-light);
}

/* ---------- Contact page ---------- */

.contact-block {
  max-width: 480px;
}

.contact-block p {
  margin-bottom: 1.2em;
}

.contact-block a {
  border-bottom: 1px solid var(--text);
}

.contact-block a:hover {
  color: var(--text-light);
  border-bottom-color: var(--text-light);
}

/* ---------- Back link ---------- */

.back-link {
  display: inline-block;
  margin-top: 48px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}

.back-link:hover {
  color: var(--text);
}

/* ---------- Footer ---------- */

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--gutter);
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
  letter-spacing: 0.03em;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .category-grid,
  .gallery-grid,
  .about-layout {
    grid-template-columns: 1fr;
  }

  .about-layout {
    gap: 32px;
  }

  .site-nav {
    height: 64px;
  }

  .site-nav .nav-links {
    gap: 20px;
  }

  .lightbox .lightbox-prev { left: 0; }
  .lightbox .lightbox-next { right: 0; }
}
