body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  color: #111;
  background: #fff;
}

@keyframes textPulse {
  0% { color: #55ce74; }
  100% { color: #111; }
}

nav.pulse-intro, nav.pulse-intro a, nav.pulse-intro .name {
  animation: textPulse 1s ease-out forwards;
}

nav ul { list-style: none; padding: 0; margin: 0; }
nav ul li { margin-bottom: 5px; }
nav ul.sub-nav {
  margin-left: 20px;
  margin-top: 5px;
  display: none;
}
nav ul.sub-nav.active { display: block; }
nav a { color: inherit; text-decoration: none; display: inline-block; padding: 2px 4px; cursor: pointer; }
nav a.visited-nav { }
nav a.active { }

.mobile-nav-toggle {
  display: none;
  padding: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 18px;
  font-weight: 500;
  background: #fff;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  position: sticky;
  top: 0;
  z-index: 100;
}

.mobile-nav-content {
  display: none;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.mobile-nav-content.active {
  display: block;
}

.mobile-nav-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-content ul li {
  margin-bottom: 15px;
}

.mobile-nav-content a {
  font-size: 18px;
  display: block;
  padding: 5px 0;
  cursor: pointer;
  color: inherit;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 100vh;
}

nav {
  padding: 60px 10px 40px 60px;
  font-size: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-sizing: border-box;
}

nav .name {
  font-weight: 500;
  margin-bottom: 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 16px;
}

main {
  padding: 40px 100px 40px 30px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 76px;
}

.work {
  width: 100%;
  margin: 0;
}

.work img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

.caption {
  margin-top: 6px;
  font-size: 14px;
  color: #555;
  text-align: center;
  font-family: 'Roboto Mono', monospace;
  font-weight: 300;
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 76px;
  align-items: center;
}

.project-article {
  margin-top: 76px;
}

.project-gallery img {
  width: 100%;
  max-width: 800px;
  height: auto;
  display: block;
}

.project-article img, .about-image {
  width: 100%;
  max-width: 250px;
  margin: 20px 0;
  display: block;
}

.project-article p, .about-section p {
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 16px;
}

.about-section {
  width: 100%;
  max-width: 800px;
  margin-top: 76px;
}

.about-section p {
  line-height: 1.6;
  margin-bottom: 40px;
}

.about-section img {
  width: 100%;
  display: block;
}

.about-layout {
  display: flex;
  gap: 30px;
}

.about-layout .about-image {
  width: 250px;
  flex-shrink: 0;
  height: fit-content;
}

.about-layout .about-text {
  flex: 1;
}

.about-layout .about-text p {
  margin-bottom: 20px;
}

.cv-section p {
  margin-bottom: 10px;
}

.cv-section h3 {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 30px;
  margin-bottom: 15px;
  color: #333;
}

.placeholder-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #e0e0e0;
  display: block;
}

.blog-section {
  margin-top: 60px;
}

.blog-post {
  margin-bottom: 40px;
  overflow: hidden;
}

.blog-post img {
  width: auto;
  max-width: 300px;
  margin-right: 20px;
  float: left;
  display: inline-block;
}

.blog-post p {
  line-height: 1.6;
}

.blog-nav {
  padding: 116px 10px 40px 10px;
}

.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 1000;
  cursor: default;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  display: flex;
  width: 100%;
  height: 100%;
  padding: 60px;
  box-sizing: border-box;
  gap: 40px;
}

.lightbox-image-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  cursor: pointer;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.lightbox-description {
  width: 300px;
  flex-shrink: 0;
  padding-top: 20px;
  overflow-y: auto;
}

.lightbox-description h2 {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 20px 0;
  font-family: 'Roboto Mono', monospace;
}

.lightbox-description p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
}

.lightbox-counter {
  font-size: 12px;
  color: #999;
  margin-top: 20px;
  font-family: 'Roboto Mono', monospace;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #111;
  font-size: 40px;
  font-weight: 300;
  cursor: pointer;
  z-index: 1001;
}

@media(max-width: 1400px){
  .blog-nav { display: none !important; }
  main {
    padding: 40px 60px 40px 30px;
  }
}

@media(max-width: 900px){
  .layout { grid-template-columns: 200px 1fr; }
  nav {
    padding: 40px 15px;
    font-size: 15px;
  }
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-top: 54px;
  }
  .project-gallery,
  .project-article,
  .about-section {
    margin-top: 54px;
  }
}

@media(max-width: 700px){
  .layout {
    grid-template-columns: 1fr;
    display: block;
  }

  #main-nav, #blog-nav {
    display: none !important;
  }

  .mobile-nav-toggle {
    display: block;
  }

  main {
    padding: 20px;
  }

  .work-grid,
  .project-gallery,
  .project-article,
  .about-section {
    margin-top: 0;
  }

  .project-gallery { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr; }
  .work img, .project-article img, .about-image, .blog-post img {
    width: 100%;
    max-width: none;
    float: none;
    margin-right: 0;
  }

  .about-layout {
    flex-direction: column;
  }

  .about-layout .about-image {
    width: 100%;
  }

  .lightbox-content {
    flex-direction: column;
    padding: 60px 20px 20px 20px;
  }

  .lightbox-image-container {
    flex: none;
    height: 50vh;
  }

  .lightbox-description {
    width: 100%;
    padding-top: 20px;
  }
}
