/* style.css */

/* Import custom font */
@font-face {
  font-family: 'Aller Display';
  src: url('../fonts/Aller Display.woff2') format('woff2'),
       url('../fonts/Aller Display.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Root variables */
:root {
  --color-dark: #333;
  --color-light: #eee;
  --color-bordeaux: #800020;
  --gap: 30px;
  --frame-width: 15px;
  --transition-fast: 0.3s ease;
  --transition-mid: 0.5s ease;
}

/* Reset & base */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
html, body { height: 100%; background: #fff; }
body { margin: var(--gap); font-family: 'Inter', sans-serif; overflow-x: hidden; }

/* Navigation */
.nav-container {
  position: fixed;
  top: var(--gap);
  left: var(--gap);
  z-index: 1000;
  background: #fff;
  padding: 16px 24px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--transition-fast);
}
.nav-container.hidden { transform: translateX(-200%); }
.logo {
  font-family: 'Aller Display', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-dark);
  text-decoration: none;
  padding: 8px 16px;
  transition: color var(--transition-fast);
}
.logo:hover {
  color: var(--color-bordeaux);
}
.nav-item {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: #999;
  text-decoration: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: color var(--transition-fast);
}
.nav-item:hover { color: var(--color-bordeaux); }

/* Hero */
.hero {
  position: relative;
  margin: calc(-1 * var(--gap));
  padding: var(--frame-width);
  height: 100vh;
  overflow: hidden;
}
.hero video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Projects layout */
.projects-section {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
  margin-top: var(--gap);
}
.project-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}
.project-card.full {
  flex: 0 0 100%;
  height: calc(100vh - var(--gap));
}
.project-card.half {
  flex: 0 0 calc((100% - var(--gap)) / 2);
  height: calc(50vh - 0.5 * var(--gap));
}
.project-card.third {
  flex: 0 0 calc((100% - 2*var(--gap)) / 3);
  height: calc(50vh - 0.5 * var(--gap));
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-mid);
}
.project-card:hover img { transform: scale(1.05); }
.project-card.half:hover img { transform: scale(1.15); }
.scierie img { object-position: bottom center; }

/* Project info overlay */
.project-info {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 10px 25px;
  text-align: center;
}
.project-info h3 {
  font-family: 'Aller Display', sans-serif;
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 4px;
}
.project-info p { font-size: 1rem; color: var(--color-dark); }

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-content {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 90%;
  max-height: 85%;
}
.lightbox-content img {
  max-height: 80vh;
  width: auto;
  object-fit: contain;
  transition: opacity 0.2s ease;
}
.lightbox-text {
  color: #fff;
  max-width: 400px;
  text-align: left;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  line-height: 1.5;
}
.lightbox-text h3 {
  font-family: 'Aller Display', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.lightbox-close,
.lightbox-nav {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 2rem;
  position: absolute;
}
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-close { top: 20px; right: 20px; }

/* Hidden container */
.hidden { display: none; }
.spacer-bottom { height: var(--gap); }

/* Responsive */
@media (max-width: 768px) {
  .project-card.full,
  .project-card.half,
  .project-card.third {
    flex: 0 0 100%;
    height: 50vh;
  }
  :root { --frame-width: 2px; }
}
@media (max-width: 480px) {
  :root { --frame-width: 1px; }
}

/* Performance hints */
img { will-change: transform; }
