:root {
  color-scheme: light dark;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  --black: #0a0a0a;
  --white: #ffffff;
  --gray: #f0f0f0;
  --dark-gray: #333333;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--white);
  color: var(--black);
  font-family: "DM Serif Display", serif;
  font-weight: 300;
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
}

a {
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.5;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 5%;
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 100;
}

.logo {
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--black);
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-size: 0.85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--black);
}

/* Hero Section */
header {
  height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 5%;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4rem);
  margin-bottom: 1rem;
  letter-spacing: 3rem;
  text-indent: 3rem;
}

.hero-subtitle {
  font-size: 1.4rem;
  color: #aaa;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Gallery Section */
.gallery-container {
  padding: 5rem 5%;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.artwork {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3/4;
}

.artwork img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.7s ease;
}

/* Add this to make the wrapper the positioning anchor */
.artwork-wrapper {
  position: relative;
  overflow: hidden; /* Keeps the image zoom effect contained */
  cursor: pointer;
}

.artwork-info {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #eee;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 10, 10, 0.7); /* Dark semi-transparent overlay */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 10;
}

/* Show the overlay when hovering anywhere over the artwork */
.artwork-wrapper:hover .artwork-info {
  opacity: 1;
}

/* Typography for the Title */
.artwork-info span:first-child {
  font-size: 1.5rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

/* Typography for the Year */
.artwork-info span:last-child {
  font-size: 0.9rem;
  letter-spacing: 4px;
  color: #eee;
}

/* About Section */
.about-section {
  padding: 8rem 5%;
  background-color: var(--black);
  color: var(--white);
  text-align: center;
}

.about-content {
  max-width: 600px;
  margin: 0 auto;
}

.about-content h2 {
  margin-bottom: 2rem;
}

.about-content p {
  font-family: "Lato", sans-serif;
  font-size: 1.1rem;
  color: #ccc;
}

.about-img {
  max-width: 90vw;
  margin: 2rem auto;
  display: block;
}

/* Footer */
footer {
  padding: 4rem 5%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  filter: invert(100%);
  backface-visibility: hidden;
}

.social-links img {
  transition: transform 0.3s ease;
}

.copyright {
  font-size: 0.8rem;
  color: #888;
  margin-top: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links > a {
    display: none; /* In a full build, add a hamburger menu here */
  }
}

/* Dialog / Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.98); /* Solid white gallery feel */
  opacity: 0;
  transition: opacity 0.4s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-content {
  display: flex;
  max-width: 1200px;
  width: 90%;
  max-height: 90vh;
  gap: 4rem;
  align-items: center;
}

.modal-content img {
  max-width: 55%;
  max-height: 85vh;
  object-fit: contain;
}

.modal-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.modal-text h3 {
  font-size: 2.5rem;
  margin-bottom: 0.2rem;
}

.modal-year {
  font-size: 0.9rem;
  color: #888;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  display: block;
}

.modal-text p {
  font-family: "Lato", sans-serif;
  color: #333;
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 400px;
}

.close-btn {
  position: absolute;
  top: 2rem;
  right: 3rem;
  font-size: 3rem;
  font-weight: 300;
  cursor: pointer;
  color: var(--black);
  transition: opacity 0.3s ease;
  z-index: 1001;
}

.close-btn:hover {
  opacity: 0.4;
}

/* Responsive Dialog for Mobile */
@media (max-width: 768px) {
  .modal-content {
    flex-direction: column;
    gap: 2rem;
    overflow-y: auto;
    padding: 4rem 0 2rem 0;
  }
  .modal-content img {
    max-width: 100%;
    max-height: 50vh;
  }
  .modal-text {
    text-align: center;
    align-items: center;
  }

  .close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--black);
    transition: opacity 0.3s ease;
    z-index: 1001;
  }
}
