/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Goudy Bookletter 1911', Georgia, serif;
  font-weight: 400;
  line-height: 1.4;
  color: #000000;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
  /* Mobile Safari viewport height fix */
  height: 100dvh;
}

/* Canvas background for colored rectangles */
.background-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  /* Mobile Safari viewport height fix */
  height: 100dvh;
  z-index: 1;
  background-color: #ffffff;
}

/* Content overlay */
.content {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100vh;
  /* Mobile Safari viewport height fix */
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 2rem;
}

/* Header */
.header {
  position: absolute;
  text-align: left;
  z-index: 4;
}

.header-top-left {
  top: 2rem;
  left: 2rem;
}

.name-container {
  max-width: 640px;
  position: relative;
}

.name {
  font-family: 'Goudy Bookletter 1911', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: #000000;
  margin: 0;
  white-space: normal;
  word-wrap: break-word;
}

/* Bio text - hidden by default */
.bio-text {
  visibility: hidden;
  line-height: 1.4;
  font-size: 24px;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: normal;
  max-width: 200px !important;
  width: 200px;
}

/* Bio links styling */
.bio-link {
  color: #000000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: all 0.3s ease;
}

.bio-link:hover {
  color: #EFEFEF;
  text-decoration-thickness: 2px;
}

.bio-link:visited {
  color: #000000;
}

/* Bio image styling */
.bio-image {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 240px;
  height: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  z-index: 5;
  visibility: hidden;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  animation: slideInImage 0.8s cubic-bezier(0.4, 0, 0.2, 1) 1.5s forwards;
  animation-play-state: paused;
}

@keyframes slideInImage {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Back button */
.back-btn {
  font-family: 'Goudy Bookletter 1911', Georgia, serif;
  font-size: 16px;
  color: #000000;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-left: 1rem;
  display: inline;
  text-decoration: none;
}

.back-btn:hover {
  opacity: 0.7;
}

.back-btn:active {
  opacity: 0.5;
}

/* Main content container */
.main-content {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Content sections */
.content-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  filter: blur(10px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.content-section.active {
  opacity: 1;
  visibility: visible;
  filter: blur(0);
  transform: translateY(0);
}

.content-section:not(.active) {
  transform: translateY(20px);
}

/* Navigation */
.nav {
  position: absolute;
  z-index: 4;
}

.nav-top-right {
  position: absolute;
  top: 2rem;
  right: 2rem;
}

.nav-link {
  font-family: 'Goudy Bookletter 1911', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  color: #000000;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  padding: 0.5rem 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-radius: 0;
  border: none;
  transform: none;
  will-change: auto;
  isolation: auto;
  position: relative;
  overflow: hidden;
}

.nav-link .text-content {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.nav-link .text-content.changing {
  opacity: 0;
  transform: translateY(-10px);
}

.nav-link:hover {
  opacity: 0.7;
}

.nav-link:active {
  opacity: 0.5;
}

.nav-link:visited {
  color: #000000;
}

/* Left corner navigation */
.nav-left {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
  z-index: 4;
}

/* Bottom corners */
.nav-bottom-left {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 4;
}

.nav-bottom-right {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 4;
}

/* Bottom corner navigation with transitions */
.nav-bottom-left, .nav-bottom-right, .nav-top-right {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-bottom-left.hidden, .nav-bottom-right.hidden, .nav-top-right.hidden {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(10px);
  pointer-events: none;
}

/* Move Close text to bottom-left on mobile when About modal is open */
@media (max-width: 768px) {
  #about-toggle:checked ~ .content .nav-top-right {
    top: auto;
    bottom: 1.5rem;
    left: 1.5rem;
    right: auto;
  }
}

@media (max-width: 480px) {
  #about-toggle:checked ~ .content .nav-top-right {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    right: auto;
  }
}


/* Responsive design */
@media (max-width: 768px) {
  .content {
    padding: 1.5rem;
    flex-direction: column;
    justify-content: space-between;
    /* Mobile Safari safe area support */
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  }
  
  .bio-image {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 170px;
  }
  
  /* Keep navigation in corners on mobile */
  .header {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 2rem;
  }
  
  .bio-text {
    font-size: 24px;
  }
  
  .bio-text p {
    font-size: 24px;
    max-width: 300px;
  }
  
  .name-container {
    max-width: 100%;
  }
  
  /* Keep corner navigation visible on mobile */
  .nav-top-right,
  .nav-bottom-left,
  .nav-bottom-right {
    display: block;
  }
  
  /* Adjust navigation positioning to match content padding on mobile */
  .nav-top-right {
    top: 1.5rem;
    right: 1.5rem;
  }
  
  .nav-bottom-left {
    bottom: 1.5rem;
    left: 1.5rem;
  }
  
  .nav-bottom-right {
    bottom: 1.5rem;
    right: 1.5rem;
  }
  

  

}

@media (max-width: 480px) {
  .content {
    padding: 1rem;
    /* Mobile Safari safe area support */
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }
  
  .bio-image {
    bottom: 1rem;
    right: 1rem;
    width: 140px;
  }
  
  .header {
    margin-bottom: 1rem;
  }
  
  .nav-link, .name {
    font-size: 20px;
  }
  
  .bio-text {
    font-size: 20px;
  }
  
  .bio-text p {
    font-size: 20px;
  }
  
  .name-container {
    max-width: 100%;
  }
  
  /* Adjust navigation positioning to match content padding on mobile */
  .nav-top-right {
    top: 1rem;
    right: 1rem;
  }
  
  .nav-bottom-left {
    bottom: 1rem;
    left: 1rem;
  }
  
  .nav-bottom-right {
    bottom: 1rem;
    right: 1rem;
  }
  

}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #ffffff;
    color: #000000;
  }
}

/* Hide the checkbox */
.about-checkbox {
  display: none;
}

/* Color change states - when checkbox is checked */
#about-toggle:checked ~ .content {
  background-color: #A5BCC7;
}

#about-toggle:checked ~ .content .name {
  color: #67222A;
}

#about-toggle:checked ~ .content .nav-link {
  color: #67222A;
}

/* Show bio text when about is checked */
#about-toggle:checked ~ .content .bio-text {
  visibility: visible;
  opacity: 1;
  font-weight: 400;
  filter: blur(0);
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 200px !important;
  width: 200px;
}

/* Ensure bio links maintain their styling when about is checked */
#about-toggle:checked ~ .content .bio-link {
  color: #67222A;
}

#about-toggle:checked ~ .content .bio-link:hover {
  color: #EFEFEF;
}

#about-toggle:checked ~ .content .bio-link:visited {
  color: #67222A;
}

/* Show bio image when about is checked */
#about-toggle:checked ~ .content .bio-image {
  visibility: visible;
  animation-play-state: running;
  filter: blur(0);
  transform: translateY(0);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide bio image when about is unchecked */
#about-toggle:not(:checked) ~ .content .bio-image {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(20px);
  animation: none;
}

/* Typing effect styles */
.bio-text.typing {
  opacity: 1;
}

/* Hide default content when checked */
#about-toggle:checked ~ .content #default-content {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Hide mobile draw message when about is checked */
#about-toggle:checked ~ .content #mobile-draw-message {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Mobile drawing message */
.mobile-draw-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Goudy Bookletter 1911', Georgia, serif;
  font-size: 18px;
  color: #888888;
  text-align: center;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
  display: none;
}

.mobile-draw-message.hidden {
  opacity: 0;
}

/* Show mobile message only on mobile devices */
@media (max-width: 768px) {
  .mobile-draw-message {
    display: block;
  }
}



