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

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  background-color: #ffffff;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.portfolio-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.legend {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100vh;
  padding: 2rem;
  border-right: 1px solid #e5e5e5;
  background-color: #fff;
  z-index: 100;
}

.legend-top,
.legend-bottom {
  display: flex;
  flex-direction: column;
}

.logo {
  margin-bottom: 2rem;
}

.logo h1 {
  font-size: 1.25rem;
  font-weight: 500;
  color: #111;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-links a {
  font-size: 0.875rem;
  color: #666;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: #111;
}

.nav-links a.active {
  color: #111;
  font-weight: 500;
}

.contact {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.contact a {
  color: #666;
  transition: color 0.2s ease;
}

.contact a:hover {
  color: #111;
}

.menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111;
  transition: all 0.3s ease;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 99;
}

.overlay.active {
  display: block;
}

#right-column {
  min-height: 100vh;
  overflow-y: auto;
}

.home-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.bio {
  max-width: 600px;
}

.bio p {
  font-size: clamp(1.5rem, 4vw, 3rem);
  line-height: 1.4;
}

.hidden-text {
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-color: #fff;
}

.visible {
  color: black;
  -webkit-text-fill-color: black;
  font-weight: bold;
}

.hidden-text::selection {
  background: #3399ff;
  color: #3399ff;
}

.gallery {
  padding: 2rem;
  background-color: #ffffff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.art-card {
  background-color: #ffffff;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.art-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.art-card-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background-color: #f5f5f5;
}

.art-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.art-card:hover .art-card-image img {
  transform: scale(1.02);
}

.art-card-image::after {
  content: 'Brakes Off, Brain Off';
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  font-size: 0.625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em;
  pointer-events: none;
}

.art-card-info {
  padding: 0.75rem 1rem;
  border-top: 1px solid #f0f0f0;
}

.art-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #222222;
  margin-bottom: 0.125rem;
}

.art-card-subtitle {
  font-size: 0.75rem;
  color: #888888;
}

.error-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.error-page h1 {
  font-size: 1.5rem;
  font-weight: 400;
  color: #666;
}

@media (max-width: 992px) {
  .portfolio-container {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .portfolio-container {
    grid-template-columns: 1fr;
  }

  .legend {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-right: 1px solid #e5e5e5;
    box-shadow: none;
  }

  .legend.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
  }

  #right-column {
    min-height: 100vh;
  }

  .home-page {
    padding: 4rem 1.5rem 2rem;
  }

  .gallery {
    padding: 4rem 1.5rem 1.5rem;
  }

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

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .gallery {
    padding: 4rem 1rem 1rem;
  }

  .home-page {
    padding: 4rem 1rem 1rem;
  }

  .bio p {
    font-size: 1.25rem;
  }
}
