
body {
  margin: 0;
  padding: 0;
  width: 100vw;
  height: 100vh;
  overflow-x: hidden;
  background: black;
  font-family: 'Exo', 'Helvetica', 'Arial', sans-serif;
  color: #fff;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  max-width: 100%;
}

header, footer {
  width: 100%;
  box-sizing: border-box;      
  padding: 1px 2px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  position: relative;
  font-family: 'Exo', 'Helvetica', 'Arial', sans-serif;
  left: 0;
  right: 0;
  margin: 0;
}

body > * {
  position: relative;
  z-index: 1; 
}

#introCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 9999;        
  pointer-events: none; 
}

#bgCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;     
  height: 100%;    
  display: block;
  z-index: 0;      
  background: none;
}

header {
  padding: 20px 40px;
  position: fixed;
  margin: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  z-index: 100;
}

.cv-button {
  background: linear-gradient(135deg, #313131, #747474);
  padding: 8px 16px;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;

  transition: all 0.3s ease;
}

.cv-button:hover {
  background: linear-gradient(135deg, #ff3b2f, #ff6f61);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 111, 97, 0.6);
  color: #fff;
}

/* General nav styles (desktop) */
.nav-links {
  list-style: none;
  display: flex;
  gap: 2vw;
}

.nav-links li a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #ff6f61;
  text-shadow: 0 0 5px rgba(255,111,97,0.7);
}


.burger {
  display: none; 
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  cursor: pointer;
}

.burger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}


@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: -100%; 
    top: 60px; 
    width: 200px; 
    background: #222;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 1rem;
    gap: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: right 0.3s ease;
    z-index: 999;
  }

  .nav-links.active {
    right: 10px;
  }

  .burger {
    display: flex;
  }
}

.hero {
  padding: 40vh 10vw;
  text-align: center;
}

.hero h1 {
  font-size: 3em;
  margin-bottom: 20px;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
}

.hero p {
  font-size: 1.25em;
  margin-bottom: 30px;
  line-height: 1.6;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

.mainPieceContainer {
  display: grid;
  container-type: inline-size;
  grid-template-columns: repeat(auto-fit, minmax(min(600px, 100%), 1fr));
  gap: 2rem;
  padding: 2rem;
  margin: 20px auto;
  max-width: 90vw;
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}

.mainPiece {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 10px 30px #000000;
  border-radius: 1%;
  max-height: 1000px;
  transition: all 0.3s ease;
}

.mainPieceContainer--gameProject {
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
}
.mainPiece--gameProject {
  aspect-ratio: 1 / 3;
}

@media (max-width: 980px) {
  .mainPiece--gameProject   {aspect-ratio: 2 / 1;}
  .mainPieceContainer--gameProject {grid-template-columns: repeat(auto-fit, minmax(min(400px, 100%), 1fr));}
}

.mainPiece img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mainPiece::before {
  content: '';
  z-index: 10;
  width: 100%;
  height: 100%;
  display: block;
  position: absolute;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 50%);
  z-index: auto;
}

.mainPiece:hover, .projectButton {
  transform: translateY(-5px);
  opacity: 1;
}

.mainPiece:hover img {
  filter: brightness(0.5) grayscale(50%) blur(2px);
}

.mainPiece .mainPiecetext {
  position: absolute;
  width: 100%;
  text-align: center;
  color: #ffffff;
  object-fit: fill;
  transition: all 2s ease;
}

.mainPiecetext {
  display: flex;
  flex-direction: column;
  justify-content: space-between; 
  height: 100%;
  text-decoration: none;
  position: relative;
  z-index: 20;
}

.mainPiecetext h3 {
  margin: 4%;
  font-size: 2em;
  font-weight: lighter;
}

.mainPiecetext p {
  flex-grow: 1; 
  margin: 0 5%;
  overflow-y: hidden;
  align-content: center;
  text-decoration: none;
}

@media (max-width: 768px) {
  .mainPiecetext h3 {
    font-size: 1.2em; 
    margin: 2%;
  }
  .mainPiecetext p {
    font-size: 0.8em; 
    margin: 0 1%;
  }
}



/* Mobile reveal state */
.mainPiece.show-description img {
  filter: brightness(0.5) grayscale(50%) blur(2px);
}

.mainPiece.show-description .projectDescription,
.mainPiece.show-description .projectButton {
  opacity: 1;
  transform: translateY(-5px);
}

.mainPiece.show-description {
  box-shadow: 10px 10px 30px rgb(68, 68, 68);
}
/* End */

.projectButton {
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  height: max(5%, 35px);
  overflow: hidden; 
  font-weight: 150;
  opacity: 0;
  transition: all 0.5s ease;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* FadeIn animation */
/*
.mainPiece, .about {
  animation: fadeIn linear;
  animation-timeline: view();
  animation-range: entry 0% cover 20%;
}
*/
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(150px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.projectDescription {
  opacity: 0;      
  transition: opacity 0.8s ease, max-height 3s ease;
  overflow: hidden;
}

.projectDescription p {
  margin-right: 5%;
  margin-left: 5%;
}

.mainPiece:hover .projectDescription {
  opacity: 1;          
}
.mainPiece:hover .projectButton {
  opacity: 1;
  transform: translateY(-5px); 
}

.mainPiecetext {
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.about {
  padding: 5px 40px;
  max-width: 100vw;
  margin: 0 auto;
  line-height: 1.8;
  font-size: 1.1em;
  text-align: center;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
  background-color: #0000005e;
  padding: 1% 10vw;
}

.sectionTitle {
  padding: 15px 1vw;
  max-width: 100vw;
  margin: 0 auto;
  line-height: 1.5;
  font-size: 1.8em;
  text-align: center;
  text-shadow: 0px 0px 10px rgba(0,0,0, 1);
}

footer {
  padding: 30px 40px;
  text-align: center;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(5px);
  font-size: 0.95em;
  letter-spacing: 0.5px;
}

.cv-snippet-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 0 2%;
}

.cv-snippet-box {
  display: flex;
  flex-direction: column;
  padding: 2%;
  border-left-style: groove;
  border-right-style: groove;
  border-color: #ffffff98;
}

@media (max-width: 1268px) {
  .cv-snippet-box {  border-top-style: groove;}
  .cv-snippet-box {  border-bottom-style: groove;}
  .cv-snippet-box {  border-left-style: none;}
  .cv-snippet-box {  border-right-style: none;}
  .cv-snippet-container {  grid-template-columns: 1fr;}
}

ul {
  text-align: justify;
  align-self: center;
  list-style-position: inside;
  list-style: none;
  padding-left: 1.5em;  
}

.icon-list {
  list-style: none;
  padding: 0;
  margin: 0;

  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2em;
  row-gap: 0.78em;
  font-size: var(--font-size, 16px);
}

.icon-list li {
  position: relative;
  padding-left: calc(var(--icon-size, 20px) + 12px); 
  margin-bottom: 0.5rem;
}

.icon-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-60%);
  width: var(--icon-size, 20px);
  height: var(--icon-size, 20px);
  background-image: var(--icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.mainPiece img.image-overlay {
  position: absolute;
  height: 20%;
  width: 40%;
  bottom: 1%;
  left: 1%;
  object-fit: contain;
  object-position: left bottom;
}


.div-overlay {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  bottom: 0%;
  left: 0%;
  object-fit: contain;
}

.mainPiece img.TGA-overlay {
  position: absolute;
  bottom: 1%;
  left: 1%;

  width: 35%;
  height: auto;

  object-fit: contain;
}

.software-overlay {
  position: absolute;
  bottom: 2%;
  right: 2%;
  display: flex;
  gap: 6px;
}

.software-overlay img {
  width: min(40px, 4.5vw);
  height: auto;
}

.dark-background {
  background: linear-gradient(-117deg, rgba(27, 27, 27, 0.829) 0%, rgba(8, 8, 8, 0.781) 50%);
}

.personal-title-index {
  padding-top: 15vh;
  max-width: 100vw;
  text-align: center;
  font-size: 2em;
  margin-bottom: 15vh;
}

.personal-title-index h1{
  margin-bottom: 0px;
}

.personal-title-index p{
  margin-top: 0px;
  color: #b3b3b3;
  font-size: 0.8em;
}

@media (max-width: 768px) {
  .personal-title-index h1{
    font-size: 1.4em;
    font-weight: 500;
  }
  
  .personal-title-index p{
    font-size: 0.6em;
  }
}

/* Contact Section - matching .about style */
.contact {
  padding: 3% 3%;
  margin: 3% auto 0 auto;
  text-align: center;
  line-height: 1.6;
  font-size: 1.1em;
  background-color: #0000005e;
  border-radius: 4px;
}

.contact h2 {
  font-size: 1.8em;
  margin-bottom: 0.5em;
  text-shadow: 0 0 10px rgba(0,0,0,0.6);
}

.contact p {
  margin-bottom: 1.5em;
  color: #ccc;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  align-items: center;
}

.contact-list li a {
  color: #ff6f61;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-list li a:hover {
  color: #ffa08c;
}

/* Social icons row */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #222;
  border-radius: 6px;
  color: #fff;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #ff6f61;
  transform: scale(1.1);
}

.social-icon svg {
  width: 60%;
  height: 60%;
  fill: currentColor;
}

@media (max-width: 480px) {
  .contact h2 {
    font-size: 1.5em;
  }
  
  .contact p {
    font-size: 0.9em;
  }

  .social-icon {
    width: 32px;
    height: 32px;
  }
}