/* Original CSS with improvements */
body {
  background-color: rgb(0, 0, 0);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin:0;
  /* Add smooth scrolling */
  scroll-behavior: smooth;
}

body h1 {
  color: white;
}

#book {
  color: #e2e2e2;
  border-color: #1EAEDB;
}

.container {
  background-color:transparent;
}

/* Improved Slick carousel styles */
.slick-slide {
  margin: 0 15px; /* Reduced margin for better mobile experience */
  transition: transform 0.3s ease; /* Smooth hover effects */
}

/* Improve carousel container styling for ALL carousels */
.boxbox,
.clients-carousel,
.past-projects-carousel {
  overflow: hidden;
  margin-bottom: 30px; /* Space for carousel */
}

.hero {
  width: 100%;
  box-sizing: border-box;
  margin: 0%;
  display: block;
}

#circle-container {
  display: flex;
  border: 2px solid rgb(0, 0, 0);
  justify-content: center;
  align-items: center;
}

.profile-circle {
  margin-right: 2vw;
  margin-left: 3vw;
  margin-top: 5vh;
  position: relative;
  border-radius: 50%;
  width: 300px;
  height: 300px;
  overflow: hidden;
  /* Add subtle shadow for depth */
  box-shadow: 0 8px 32px rgba(30, 174, 219, 0.2);
}

#headshot {
  height: auto;
  width: 100%;
  bottom: -auto;
  position:relative;
  object-fit:cover;
}

#profile-right {
  margin-top: 1vh;
  background-color:rgb(0, 0, 0);
  color: white;
  text-align: center;
}

/* profile-text */
#profile-text {
  width: 100%;
  margin-top: 1vh;
  background-color:rgb(0, 0, 0);
  color: white;
  text-align: center;
}

#profile-text a {
  text-decoration: underline;
  text-decoration-color: rgba(0, 240, 240, 0.288);
  transition: all 0.3s ease; /* Smooth hover transitions */
}

#profile-text a:hover {
  text-decoration-color: #1EAEDB;
  color: #1EAEDB;
}

/* Disable animations on mobile for better performance */
@media (max-width: 768px) {
  .change-text {
    animation: none !important;
  }
  
  .change-text:hover {
    animation: none !important;
    color: white !important;
    transform: none !important;
  }
  
  .change-text::after,
  .change-text:hover::after {
    display: none !important;
    animation: none !important;
    opacity: 0 !important;
  }

  /* Optimize carousel for mobile */
  .slick-slide {
    margin: 0 8px;
  }
  
  /* Reduce motion for users who prefer it */
  .profile-circle {
    box-shadow: 0 4px 16px rgba(30, 174, 219, 0.1);
  }
}

.change-text {
  display: inline-block;
  width:fit-content;
  position: relative;
  font-weight: bold;
}

.change-text::after {
  content: "Cheezfish";
  position: absolute;
  white-space: nowrap;
  width: 100%;
  left: 0;
  top: 0;
  opacity: 0;
  color: #1EAEDB;
}

.change-text:hover {
  animation: glitch 0.8s steps(1, end) forwards;
}

.change-text:hover::after {
  animation: showNew 0.8s steps(1, end) forwards;
}

@keyframes glitch {
  0% {
    transform: translate(0);
    color: inherit;
  }
  10% {
    transform: translate(-2px, 2px);
    color: #ff00ff;
  }
  20% {
    transform: translate(2px, -2px);
    color: #00ffff;
  }
  30% {
    transform: translate(-2px, -2px);
    color: #ffff00;
  }
  40% {
    transform: translate(2px, 2px);
    color: #ff00ff;
  }
  50% {
    transform: translate(-2px, 2px);
    color: #00ffff;
  }
  60% {
    transform: translate(-2px, -2px);
    color: inherit;
  }
  100% {
    transform: translate(0);
    color: transparent;
  }
}

@keyframes showNew {
  0% {
    opacity: 0;
    transform: translate(0);
  }
  60% {
    opacity: 0;
    transform: translate(2px, -2px);
  }
  100% {
    opacity: 1;
    transform: translate(0);
  }
}

.socials-block {
  justify-content: space-evenly;
  display: flex;
}

.social-icon {
  display: inline-block; 
  margin: 0 6%;
  transition: transform 0.3s ease; /* Smooth hover effect */
}

.social-icon:hover {
  transform: translateY(-2px);
}

.about-text {
  padding-top: 5%;
  text-align: center;
  color: white;
}

.about-text p {
  font-size: 1em;
  line-height: 1.6; /* Better readability */
}

h3 {
  color: #1EAEDB;
  text-align: center;
}

/* === CORRECTED & CONSOLIDATED PROJECT STYLES START === */

/* This wrapper rotates ALL project images consistently */
.parallellogram {
  transform: rotate(0deg);
  cursor: pointer;
  transition: transform 0.3s ease;
  /* ADDED: Set a max-width for the slide container and center it */
  max-width: 300px; 
  margin: 0 auto;
}

/* This styles the image inside the wrapper */
.project {
  /* MODIFIED: Changed from object-fit:fill to cover to prevent stretching */
  object-fit: cover;
  /* MODIFIED: Changed max-width to 100% to fill the container */
  width: 100%; 
  max-height: auto;
  transform: skewX(-5deg);
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0.9);
}

/* This applies a consistent hover effect to the image */
.slick-slide:hover .project {
  filter: brightness(1.1);
  transform: skewX(-5deg) scale(1.05);
}

/* === CORRECTED & CONSOLIDATED PROJECT STYLES END === */


#contact {
  margin-bottom: 1vh;
  color: #1EAEDB;
  border-color: #1EAEDB;
  transition: all 0.3s ease; /* Smooth button transition */
}

#contact:hover {
  background-color: rgba(30, 174, 219, 0.1);
  transform: translateY(-1px);
}

#hello {
  display: inline;
  font-family: 'Space Mono', monospace;
  font-size: xx-large;
}

#contact-form {
  color: #1EAEDB;
  display: none;
  /* Add smooth animation properties */
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease-in-out;
}

#contact-form.show {
  opacity: 1;
  transform: translateY(0);
}

/* Improve form styling */
#contact-form input,
#contact-form textarea,
#contact-form select {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(30, 174, 219, 0.3);
  color: white;
  transition: border-color 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus,
#contact-form select:focus {
  border-color: #1EAEDB;
  box-shadow: 0 0 0 2px rgba(30, 174, 219, 0.2);
}

#contact-form label {
  color: #1EAEDB;
}

.downloadCV {
  color: rgb(255, 255, 255);
}

/* Loading animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero,
.about-text,
.boxbox,
.clients-carousel,
.past-projects-carousel {
  animation: fadeInUp 0.8s ease-out;
}

/* Stagger animations */
.hero {
  animation-delay: 0.1s;
}

.about-text {
  animation-delay: 0.3s;
}

.boxbox,
.clients-carousel,
.past-projects-carousel {
  animation-delay: 0.5s;
}

/* Larger than mobile */
@media (min-width: 400px) {
}

/* Larger than phablet */
@media (min-width: 550px) {
}

/* Larger than tablet */
@media (min-width: 750px) {
}

/* Larger than desktop */
@media (min-width: 1000px) {
  /* REMOVED .parallellogram rules from here as they are now global */

  .hero {
    width: 100%;
    box-sizing: border-box;
    margin: 0%;
    display: flex;
  }
  
  #circle-container {
    display: flex;
    border: 2px solid black;
    justify-content: center;
    align-items: center;
  }
  
  .profile-circle {
    margin-right: 2vw;
    margin-left: 9vw;
    margin-top: 10vh;
    position: relative;
    border-radius: 50%;
    width: 300px;
    height: 300px;
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(30, 174, 219, 0.3); /* Enhanced shadow on desktop */
  }
  
  #headshot {
    height: auto;
    width: 100%;
    bottom: -auto;
    position:relative;
    object-fit:cover;
  }
  
  #profile-right {
    margin-top: 12vh;
    margin-left: 2vw;
    margin-right: 2vw;
    background-color:rgba(0, 0, 0, 0);
    color: white;
    text-align: center;
  }
  
  .socials-block {
    display: flex;
    margin-right: 60px;
  }
  
  .social-icon {
    display: inline-block; 
    margin: 0 6%;
  }  
}

/* Larger than Desktop HD */
@media (min-width: 1200px) {}

/* Rest of your existing CSS for tabs, etc. */
#lastcontainer input {
  position: absolute;
  opacity: 0;
  z-index: -1;
}

.row {
  display: flex;
}
.row .col {
  flex: 1;
}
.row .col:last-child {
  margin-left: 1em;
}

/* Enhanced Accordion styles */
.tabs {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 4px -2px rgba(0, 0, 0, 0.5);
}

.tab {
  width: 100%;
  color: white;
  overflow: hidden;
}

.tab-label {
  display: flex;
  justify-content: space-between;
  text-align: center;
  padding: 1em;
  background: #2c3e5072;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease; /* Smooth transition */
}

.tab-label:hover {
  background: #1a252f;
}

.tab-label::after {
  content: "❯";
  width: 1em;
  height: 1em;
  text-align: center;
  transition: all 0.35s;
}

.tab-content {
  text-align: center;
  max-height: 0;
  padding: 0 1em;
  color: #ffffff;
  background: rgb(0, 0, 0);
  transition: all 0.35s ease; /* Smoother transition */
}

.tab-close {
  display: flex;
  justify-content: flex-end;
  padding: 1em;
  font-size: 0.75em;
  background: #2c3e50;
  cursor: pointer;
  transition: background 0.3s ease;
}

.tab-close:hover {
  background: #1a252f;
}

input:checked + .tab-label {
  background: #1a252f;
}

input:checked + .tab-label::after {
  transform: rotate(90deg);
}

input:checked ~ .tab-content {
  max-height: 100vh;
  padding: 1em;
}

#lastcontainer {
}

#finalcontainer {
  padding-top: 2%;
  padding-bottom: 5%;
}

/* Enhanced Title text highlighting CSS */
.underlined {
  color: rgb(255, 255, 255);
  flex: 1;
  font-size: 1em;
  line-height: 1.2;
  text-decoration: none;
  background-image: linear-gradient(to right, yellow 0, yellow 100%);
  background-position: 0 1.2em;
  background-size: 0 100%;
  background-repeat: no-repeat;
  transition: background 0.5s ease; /* Smoother transition */
}

.underlined:hover {
  background-size: 100% 100%;
}

.underlined--thin {
  background-image: linear-gradient(to right, black 0, black 100%);
}

.underlined--thick {
  background-position: 0 -0.1em;
}

.underlined--offset {
  background-position: 0 0.2em;
  box-shadow: inset 0 -0.5em 0 0 white;
}

.underlined--gradient {
  background-position: 0 -0.1em;
  background-image: linear-gradient(to right, yellow 0, lightgreen 100%);
}

.underlined--reverse {
  background-position: 100% -0.1em;
  transition: background 1s ease;
  background-image: linear-gradient(to right, yellow 0, yellow 100%);
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .change-text:hover {
    animation: none !important;
  }
}