/* ========================================
   Arthur Nieuwenhuys - Global Styles
   ======================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Jost', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #333;
  background: #fff;
}

/* Layout Containers */
header, main, footer {
  padding: 1rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Full-width override for portfolio pages */
.portfolio-page main {
  max-width: none;
  margin: 0;
  padding: 0 1rem 1rem 0;
}

.portfolio-page header,
.portfolio-page footer {
  max-width: none;
  padding-left: 0;
  padding-right: 1rem;
}

.portfolio-page footer {
  text-align: left;
}

/* Header & Navigation */
header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

nav a {
  margin-left: 1rem;
  text-decoration: none;
  color: #333;
  font-weight: 400;
}

nav a:hover {
  text-decoration: underline;
}

/* Dropdown menu (Works) */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  list-style: none;
  padding: 0.25rem 0;
  margin: 0;
  min-width: 280px;
  z-index: 1000;
  border: 1px solid #e0e0e0;
}

/* Onzichtbare brug tussen Works en dropdown zodat het niet sluit bij bewegen */
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  display: block;
}

.dropdown-menu li {
  display: block;
  width: 100%;
}

.dropdown-menu li a {
  display: block;
  width: 100%;
  padding: 0.45rem 1rem;
  color: #333;
  text-decoration: none;
  font-family: 'Jost', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 0;
  box-sizing: border-box;
}

.dropdown-menu li a:hover {
  background: #f5f5f5;
  text-decoration: none;
  color: #333;
}

/* Footer */
footer {
  margin-top: auto;
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  padding-top: 2rem;
  /*border-top: 1px solid #e0e0e0;*/
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Jost', sans-serif;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
}

h2 {
  font-size: clamp(1.25rem, 3vw, 2rem);
}

h3 {
  font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

a {
  color: #0070f3;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: inherit;
  text-decoration: underline;
}

/* Artist name (on portfolio pages) */
.artist-name {
  font-size: clamp(1.125rem, 3vw, 1.875rem);
  font-weight: 300;
  font-family: 'Jost', sans-serif;
  margin-bottom: 1.125rem;
  padding-left: 0;
  color: inherit;
  text-decoration: none;
  display: block;
}

.artist-name:hover {
  text-decoration: none;
}

/* Back link (hidden by default, shown if needed) */
.back-link {
  display: none;
}

/* Project Card (homepage) */
.project-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  background: white;
  transition: box-shadow 0.2s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.project-card h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.25rem;
}

.project-card a {
  text-decoration: none;
  color: inherit;
  flex-grow: 1;
}

.project-card a:hover h3 {
  color: #0070f3;
}

.project-card .meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-card .status {
  padding: 0.125rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  text-transform: capitalize;
}

.project-card .status.published {
  background: #d4edda;
  color: #155724;
}

.project-card .status.draft {
  background: #f8d7da;
  color: #721c24;
}

/* Homepage specific */
.homepage-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 1rem 1rem 0;
}

.homepage-title {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 400;
  font-family: 'Jost', sans-serif;
  margin-bottom: 0.75rem;
  padding-left: 0;
}

.homepage-subtitle {
  font-size: 1.125rem;
  color: #666;
  margin-bottom: 2rem;
  padding-left: 0;
}

.projects-grid {
  margin-bottom: 3rem;
}

.projects-grid h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  padding-left: 0;
}

.projects-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  padding-left: 0;
}

/* Masonry Grid (portfolio pages) */
.masonry-grid {
  column-count: 4;
  column-gap: 0.5rem;
  margin-bottom: 3rem;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 0.5rem;
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  border: none;
  outline: none;
}
.image-btn {
  all: unset;
  cursor: pointer;
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  outline: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  font-size: 3rem;
  cursor: pointer;
  color: #aaa;
  z-index: 10000;
  line-height: 1;
  transition: color 0.2s ease;
}

.lightbox-close:hover {
  color: #555;
}

.lightbox-image {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: none;
}

/* Related Works (portfolio) */
.related {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e0e0e0;
}

.related h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.related-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.related-list li a {
  color: #0070f3;
  text-decoration: none;
  padding: 0.5rem 1rem;
  background: #f5f5f5;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.related-list li a:hover {
  background: #e8e8e8;
  text-decoration: none;
}

/* No images message */
.no-images {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 3rem;
  background: #f5f5f5;
  border-radius: 8px;
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .masonry-grid {
    column-count: 3;
  }
}

@media (max-width: 900px) {
  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
  .masonry-grid {
    column-count: 1;
  }
}

@media (max-width: 768px) {
  header, main, footer {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  nav a {
    margin-left: 0.75rem;
  }
}

@media (max-width: 480px) {
  header, main, footer {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }
  
  nav a {
    margin-left: 0.5rem;
    font-size: 0.9rem;
  }
}