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

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "josefin sans", sans-serif;
  margin: 0;
  background-color: #101010;
  overflow: hidden;
}

.container {
  display: flex;
  width: 100vw;
  height: 100vh;
}

main.no-scroll,
main.no-scroll .photography-grid,
main.no-scroll .design-grid {
  overflow: hidden !important;
}

/* ==========================================================================
   # Sidebar
   ========================================================================== */

aside {
  width: 16vw;
  min-width: 300px;
  flex-shrink: 0;
  padding: 4% 2%;
  background-color: #1f1f1f;
  color: #efefef;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
}

.name {
  font-size: 22pt;
  line-height: 22pt;
  margin-bottom: 60px;
  cursor: pointer;
}

.name:hover {
  color: #9a9a9a;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 30px; 
}

.dropdown-header {
  font-size: 16pt;
  color: #cdcdcd;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  cursor: pointer;
}

.dropdown-header:hover {
  color: #ffffffff;
}

.dropdown-header .arrow {
  font-size: 14pt;
  transition: transform 0.4s ease;
}

.dropdown.active .arrow {
  transform: rotate(90deg);
}

.dropdown-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 15px;
  padding-left: 10px;
  transition: max-height 0.5s cubic-bezier(0.25, 1, 0.2, 1), opacity 0.5s ease, margin-top 0.5s ease;
}

.dropdown-content a {
  font-size: 14pt;
  color: #ededed;
  text-decoration: none;
  width: fit-content;
  cursor: pointer;
}

.dropdown-content a:hover {
  color: #ffffffff;
}

.dropdown.active .dropdown-content {
  max-height: 300px;
  margin-top: 15px;
  opacity: 1;
}

/* ==========================================================================
   # Contact
   ========================================================================== */

.contact {
  font-size: 14pt;
  margin-top: auto;
  width: fit-content;
  cursor: pointer;
}

.contact:hover {
  color: #9a9a9a;
}

.contact-container {
  display: flex;
  gap: 60px;
  width: 60vw;
  max-width: 1200px;
  background-color: #1f1f1f;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.contact-form-box, .contact-info-box {
  flex: 1;
}

.contact-container h2 {
  font-size: 20pt;
  color: #efefef;
  margin-bottom: 24px;
  font-weight: 400;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#contact-form input, #contact-form textarea {
  width: 100%;
  padding: 12px;
  background-color: #101010;
  border: 1px solid #333;
  border-radius: 4px;
  color: #efefef;
  font-family: inherit;
  font-size: 11pt;
  transition: border-color 0.3s ease;
}

#contact-form textarea {
  resize: none;
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  border-color: #888;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

#submit-success {
  color: #4cd137;
  font-size: 12pt;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  animation: fadeLifecycle 4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeLifecycle {
  0% { 
    opacity: 0; 
    transform: translateX(-8px); 
  }
  10% { 
    opacity: 1; 
    transform: translateX(0); 
  }
  85% { 
    opacity: 1; 
    transform: translateX(0); 
  }
  100% { 
    opacity: 0; 
    transform: translateX(-8px); 
  }
}

#contact-form button {
  width: auto;
  padding: 12px 24px;
  background-color: #efefef;
  color: #101010;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color, color 0.4s ease;
}

#contact-form button:hover {
  background-color: #101010;
  color: #efefef;
}

.contact-email {
  font-size: 14pt;
  color: #cdcdcd;
  margin-bottom: 30px;
}

.contact-email a {
  color: #cdcdcd;
  text-decoration: none;
}

.contact-email a:hover {
  color: #ffffff;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.social-icon {
  color: #888;
  text-decoration: none;
  font-size: 13pt;
  transition: color 0.3s ease, transform 0.2s ease;
  width: fit-content;
}

.social-icon:hover {
  color: #ffffff;
  transform: translateX(4px);
}

/* ==========================================================================
   # Home
   ========================================================================== */

main {
  display: flex;
  flex: 1;
  height: 100vh;
  background-color: #101010;
  padding: 40px;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.intro {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 65px;
  width: 65vw;
  max-width: 1400px;
}

.image {
  flex: 0 0 35%;
}

.profile {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

.bio {
  flex: 1;
}

.bio::first-letter {
  font-size: 40pt;
  font-weight: 400;
  float: left;
  line-height: 0.85;
  margin-right: 6px;
  margin-top: 8px;
}

.bio p {
  font-size: 14pt;
  line-height: 20pt;
  font-weight: 350;
  color: #e2e2e2;
}

.hide {
  display: none !important;
}

/* ==========================================================================
   # Photographs
   ========================================================================== */

#astro-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#building-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#street-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#landscape-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#panorama-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#wildlife-view {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.photography-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 100px);
  padding: 10px;
  overflow-x: hidden;
  overflow-y: scroll;
  -webkit-overflow-scrolling: touch;
}

.photography-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(35, 35, 35, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  transform: translateZ(0);
}

.photography-grid.panorama-layout {
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 20px;
}

.photography-grid.panorama-layout img {
  width: 100%;
  height: auto;
  max-height: 50vh;
}

.photography-grid img:hover {
  transform: scale(1.03);
  cursor: pointer;
}

/* ==========================================================================
   # Design Projects
   ========================================================================== */

#movie-view, #magazine-view, #website-view {
  width: 100%;
  height: 100%;
}

.design-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  gap: 40px;
  padding: 10px 20px;
}

.project-header {
  align-self: flex-start;
  max-width: 900px;
}

.project-title {
  font-size: 36pt;
  margin: 0 0 10px 0;
  color: #efefef;
  font-weight: 300;
  letter-spacing: -1px;
}

.project-desc {
  font-size: 14pt;
  line-height: 18pt;
  color: #adadad;
  margin: 0;
}

/* ==========================================================================
   # Movie Poster
   ========================================================================== */

.section-label, .showcase-item .label {
  font-size: 10pt;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
  margin-bottom: 12px;
  display: block;
}

.thumb-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr); 
  gap: 16px;
  width: 100%;
}

.thumb-row img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.thumb-row img:hover {
  transform: translateY(-4px);
  border-color: #efefef;
  cursor: pointer;
}

.showcase-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 10px;
  padding-bottom: 40px;
}

.showcase-item img {
  width: 100%;
  height: auto;
  max-height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(35, 35, 35, 0.3);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.showcase-item img:hover {
  transform: scale(1.03);
  cursor: pointer;
}

/* ==========================================================================
   # Band Magazine
   ========================================================================== */

.design-grid#magazine-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  gap: 20px;
  padding: 10px 20px;
}

.book-viewport {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  height: 60vh;
  margin-top: 20px;
  perspective: 1500px;
}

.magazine-book {
  position: relative;
  aspect-ratio: 32/45;
  height: 100%;
  width: auto;
  transform-style: preserve-3d;
  transform: translateX(50%); 
  transition: transform 0.5s ease;
}

.magazine-book.is-open {
  transform: translateX(150%); 
}

.book-page {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.page-side {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.page-side.front {
  z-index: 2;
}

.page-side.back {
  transform: rotateY(180deg);
  z-index: 1;
}

.book-page img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-side.front img {
  border-radius: 0 4px 4px 0;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
}

.page-side.back img {
  border-radius: 4px 0 0 4px;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

.book-page.flipped {
  transform: rotateY(-180deg);
}

/* ==========================================================================
   # Company Website
   ========================================================================== */

.design-grid#website-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.website-image {
  width: 100%;
  max-width: 50vw;
  height: auto;
  margin-top: -20px;
}

.website-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  cursor: pointer;
  border-radius: 4px;
  filter: blur(4px);
  transition: filter 0.8s ease, transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.website-image:hover img {
  filter: blur(0);
  transform: scale(1.02);
}

/* ==========================================================================
   # Lightbox
   ========================================================================== */

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 40px;
  z-index: 9999;
  touch-action: none;
}

.lightbox-content {
  max-width: 75%;
  max-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.lightbox-arrow {
  background: none;
  border: none;
  color: #888888;
  font-size: 32pt;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  padding: 20px;
  user-select: none;
}

.lightbox-arrow:hover {
  color: #ffffff;
  transform: scale(1.1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #888888;
  font-size: 36pt;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.view:not(.hide) {
  animation: tabFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(100px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   # Mobile
   ========================================================================== */

@media (max-width: 768px) {
  body {
    overflow-y: auto; 
  }

  .container {
    flex-direction: column;
    height: auto;
    width: 100%;
  }

  aside {
    width: 100%;
    min-width: unset;
    padding: 20px;
    height: auto;
  }

  .intro {
    width: 85vw;
  }

  .name {
    margin-top: 20px;
    margin-bottom: 40px;
  }

  .contact {
    margin-top: 60px;
  }

  main {
    padding: 20px;
    height: auto;
    overflow: visible;
  }

  .intro {
    flex-direction: column; 
    gap: 0px;
  }

  .image {
    flex: 0 0 100%;
    max-width: 200px;
  }

  .photography-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 12px;
    max-height: none;
    overflow-y: visible;
  }
  
  .photography-grid img {
    height: 150px;
  }

 .book-viewport {
    height: 60vh;
    justify-content: flex-start;
    padding-left: 20px;
    overflow-x: auto;
    scrollbar-width: none;
    overflow: visible;
  }

  .magazine-book {
    transform: translateX(-5%) scale(1);
    transition: transform 0.5s ease;
  }

  .magazine-book.is-open {
    transform: translateX(95%) scale(1);
  }

  .website-image img {
    width: 80vw;
    filter: blur(0);
  }

  .contact-container {
    flex-direction: column;
    gap: 30px;
    min-width: 90vw;
    padding: 30px;
  }

  .lightbox {
    padding: 0 10px;
  }

  .lightbox-content {
    max-width: 90%;
  }

  .lightbox-arrow {
    font-size: 24pt;
    padding: 10px;
  }
}

/* ==========================================================================
   # Mobile Landscape
   ========================================================================== */

@media (max-width: 1000px) and (orientation: landscape) {
  body {
    overflow: hidden;
  }
  
  .container {
    flex-direction: row;
    height: 100vh;
    width: 100vw;
  }

  .contact {
    margin-top:45px;
  }

  aside {
    height: 100vh; 
    max-height: none; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 15px 20px 15px;
  }

  main {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 15px 20px 15px;
  }

  .intro {
    flex-direction: row; 
    gap: 30px;
  }

  .photography-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    max-height: 100%;
    overflow-y: visible;
  }

  .photography-grid img {
    height: 180px;
  }

  .design-grid#magazine-grid {
    margin-top: 40px; 
    display: flex !important;
    justify-content: flex-start;
    width: 100%;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
  }

  .book-viewport {
    overflow: visible;
    min-width: 100%;
    min-height: 150%;
    width: max-content;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -20px;
    margin-bottom: 20px;
  }

  .magazine-book {
    transform: translateX(0) scale(0.85); 
    transition: transform 0.5s ease;
  }

  .magazine-book.is-open {
    transform: translateX(140px) scale(0.85);
  }

  .contact-container {
    margin-top: 60px;
  }
}